Created
November 29, 2022 18:31
-
-
Save farhan-raza/a056487cc5991e6da097844df6269365 to your computer and use it in GitHub Desktop.
Convert KML to SHP Programmatically in C# .NET | KML to SHP converter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Specify conversion settings. | |
Aspose.Gis.ConversionOptions options = null; | |
// This options assigns Wgs84 to the destination layer. | |
if (Aspose.Gis.Drivers.Shapefile.SupportsSpatialReferenceSystem(Aspose.Gis.SpatialReferencing.SpatialReferenceSystem.Wgs84)) | |
{ | |
options = new Aspose.Gis.ConversionOptions() | |
{ | |
DestinationSpatialReferenceSystem = Aspose.Gis.SpatialReferencing.SpatialReferenceSystem.Wgs84, | |
}; | |
} | |
// Convert file format from KML to SHP | |
Aspose.Gis.VectorLayer.Convert("second.kml", Aspose.Gis.Drivers.Kml, "destination.shp", Aspose.Gis.Drivers.Shapefile, options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment