Basic Map rendering and export to SVG using Aspose.GIS for .NET 19.4

Share on FacebookTweet about this on TwitterShare on LinkedIn

So when we talk about some GIS API, rendering advanced map files seems to be the first thing which comes in mind. Good news is that the new release  Aspose.GIS for .NET 19.4 contains this feature. This is not all about this release as there are many other upgrades as well. You should go through the release notes to get a complete list of what is new and fixed. Let us see what is inspiring there in this release.

Basic map rendering

It seems you were waiting since long to render maps using Aspose.GIS and that’s it, the wait is over as this feature is provided in the latest API to render Shapefile, FileGDB, GeoJSON, KML or other supported file formats to SVG. We have put special effort to keep this process simple i.e. render maps using very few lines of code for the sake of simplicity and quick results without setting a large number of properties. Just have a look at how simple is it to render a map.

See how easy it is by just setting the resultant image resolution, selecting the driver according to the input file type and that’s all. The map is ready to render as SVG.

Here is the output of the program:

You may be worried about the look and feel like its just a black and white blueprint. Is this the new feature which was awaited since long? No! this is just the simplest output to show the functionality. You can customize rendering and feature styles in order to achieve the look you want. Here is an advanced sample code demonstrating more features in this new release.

Let us see how the styles will change the output using above sample code:

Wow! great. Now you can start working with this feature using your sample maps. Is it?

To understand the details of the code please visit this article in the documentation section.

Datum conversion due to incomplete SRS WKT

Aspose.GIS has introduced a new feature of converting between datums when SRS WKT definition is not complete. In order to transform between geographic SRS, TO_WGS84 parameters are required. If they are present in WKT definition, Aspose.GIS can transform between any geographic SRSs. If they are not present, Aspose.GIS tries to detect TO_WGS84 parameters by SRS name. If this fails, Aspose.GIS tries to find SRS with the same parameters and similar datum name, in order to take TO_WGS84 parameters from a similar SRS.

Other upgradations

Following up gradations are done to make the library more user friendly and error free.

  • Some extra content at the end of the document was reported while overwriting an existing file. This problem is no more there.
  • There were some issues while specifying paths in the same folder as the executable, however, this issue is resolved now.
  • There were instances where misleading error messages were thrown for a missing file. It was like “Unexpected end of file” which was not indicating the actual issue. This message is corrected now.
  • There was an un-necessary constructor in the GPX driver class which is removed now to avoid any confusion.

Hope you got a fair idea about this new release. Enjoy using this latest version and share your thoughts to enhance it on our support forum.

API Resources