CCB
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET
// Specify conversion settings if necessary. It is optional.
ConversionOptions options = null;
// This options assigns Wgs84 to the destination layer.
// Conversion may throw error If destination layer does not support the Wgs84 spatial reference. So need to check.
if (Drivers.Shapefile.SupportsSpatialReferenceSystem(SpatialReferenceSystem.Wgs84))
{
options = new ConversionOptions()
{
DestinationSpatialReferenceSystem = SpatialReferenceSystem.Wgs84,
};
}
// Convert file format from OSM to KML.
VectorLayer.Convert("source.osm", Drivers.OsmXml, "destination.kml", Drivers.Kml, options);
Komentar