تبدیلکننده JSON به Shapefile
از کتابخانه Aspose.GIS برای .NET برای تبدیل JSON به فرمت فایل Shapefile استفاده کنید.
نمونه زنده
Aspose.GIS برای .NET / C# برنامه “تبدیلکننده JSON به Shapefile” را بهصورت آنلاین و رایگان در اختیار شما قرار میدهد، جایی که میتوانید عملکرد و کیفیت آن را بررسی کنید.
نمونه کد - تبدیلکننده JSON به Shapefile
قطعه کد زیر نحوه پیادهسازی تبدیلکننده JSON به Shapefile را نشان میدهد. اگر یک سیستم مختصات مکانی برای لایه Shapefile مقصد مشخص کنید، همه هندسهها به آن تبدیل میشوند.
// 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 JSON to Shapefile. | |
VectorLayer.Convert("source.geojson", Drivers.GeoJson, "destination.shp", Drivers.Shapefile, options); |
این نمونه امکانات کلی را نشان میدهد. Aspose.GIS برای .NET دارای گزینههای گستردهای برای تبدیل فایلها است. هر فرمت مبتنی بر بردار گزینه خواندن / نوشتن خود را دارد که از کلاس DriverOptions به ارث رسیده است.
پلتفرم - .NET / C#
ما از Framework 4.7 یا بالاتر در ویندوز، و .NET Core 2.0 یا بالاتر در ویندوز یا لینوکس پشتیبانی میکنیم.