Convertitore da GDB a GPX
Utilizza la libreria Aspose.GIS per .NET per convertire il formato file GDB in GPX.
Esempio live
Aspose.GIS per .NET / C# ti presenta online gratuitamente l’applicazione “Convertitore da GDB a GPX”, dove puoi investigare la funzionalità e la qualità del suo funzionamento.
Esempio di codice - Convertitore da GDB a GPX
Il seguente snippet di codice mostra come implementare un convertitore da GDB a GPX. Se specifichi un sistema di riferimento spaziale per il layer GPX di destinazione, tutte le geometrie verranno convertite in esso.
// 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 GDB to GPX. | |
VectorLayer.Convert("source.gdbtable", Drivers.FileGdb, "destination.gpx", Drivers.Gpx, options); |
Questo esempio mostra le possibilità generali. Aspose.GIS per .NET ha ampie opzioni per convertire file. Ogni formato basato su vettori ha le proprie opzioni di lettura/scrittura che vengono ereditate dalla classe DriverOptions.
Piattaforma - .NET / C#
Supportiamo Framework 4.7 o successivo su Windows e .NET Core 2.0 o successivo su Windows o Linux