Convert to GIS formats with advanced options
Leave feedback
On this page
GroupDocs.Conversion provides the GisConvertOptions class to specify GIS (Geographic Information System) file format conversion settings.
The following GIS (Geographic Information System) formats are supported:
| Format | Extension | Description |
|---|---|---|
| GeoJSON | .geojson | JSON-based format for geographical features |
| KML | .kml | Keyhole Markup Language (Google Earth) |
| GPX | .gpx | GPS Exchange Format |
| TopoJSON | .topojson | GeoJSON extension with topology encoding |
| GML | .gml | Geography Markup Language (XML-based) |
| OSM | .osm | OpenStreetMap XML format |
| SHP | .shp | ESRI Shapefile |
| GDB | .gdb | ESRI Geodatabase |
Format - Specifies the desired GIS file format. Available options are: GeoJson, Kml, Gpx, TopoJson, Gml, Osm, Shp, Gdb.
GisConvertOptions supports conversion between GIS formats. The following examples demonstrate common conversions.
Convert a GeoJSON file to KML (Keyhole Markup Language) for Google Earth:
using GroupDocs.Conversion;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.FileTypes;
string sourceFile = "geographic-data.geojson";
string outputFile = "geographic-data.kml";
using (var converter = new Converter(sourceFile))
{
var options = new GisConvertOptions
{
Format = GisFileType.Kml
};
converter.Convert(outputFile, options);
}
Convert a GPX (GPS Exchange Format) file to GeoJSON:
using GroupDocs.Conversion;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.FileTypes;
string sourceFile = "tracking-route.gpx";
string outputFile = "tracking-route.geojson";
using (var converter = new Converter(sourceFile))
{
var options = new GisConvertOptions
{
Format = GisFileType.GeoJson
};
converter.Convert(outputFile, options);
}
Convert a GeoJSON file to TopoJSON format for topology-preserving conversions:
using GroupDocs.Conversion;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.FileTypes;
string sourceFile = "map-boundaries.geojson";
string outputFile = "map-boundaries.topojson";
using (var converter = new Converter(sourceFile))
{
var options = new GisConvertOptions
{
Format = GisFileType.TopoJson
};
converter.Convert(outputFile, options);
}
GIS to GIS conversions are supported for most format combinations:
- GeoJSON → KML, GPX, TopoJSON, GML
- KML → GeoJSON, GPX, TopoJSON
- GPX → GeoJSON, KML, TopoJSON
- GML → GeoJSON, KML, GPX, TopoJSON
- OSM → GeoJSON, KML, GPX, TopoJSON
- TopoJSON → GeoJSON, KML, GPX
Note: To convert FROM GIS formats to PDF, images, or other document formats, use PdfConvertOptions, ImageConvertOptions, or other appropriate ConvertOptions classes.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.