این صفحه هنوز ترجمه نشده است؛ نسخهٔ انگلیسی نمایش داده میشود.
IRI.Maptor.Infrastructure.SqlServerSpatialExtension
Extension methods and helpers for working with SQL Server spatial types (SqlGeometry,
SqlGeography) alongside the Maptor geometry model — conversions to Geometry<Point>, GeoJSON,
GML, and helpers for building SQL Server spatial values from other formats. All extension methods
live in the IRI.Maptor.Extensions namespace.
Installation
dotnet add package IRI.Maptor.Infrastructure.SqlServerSpatialExtension
Features
SqlGeometryExtensions— convertSqlGeometryto MaptorGeometry<Point>(AsGeometry), export GeoJSON (AsGeoJson), tile helpers (TileInfo.AsSqlGeometry), and WKT/projection utilitiesSqlGeographyExtensions— point extraction (AsPoint), reprojection toSqlGeometry(Project,GeodeticWgs84ToWebMercator, ...), GeoJSON and WKT exportGeometryExtensions— geodesic area (GetTrueArea),IPointtoSqlGeography, OpenGIS geometry-type mappingBoundingBoxExtensions— MaptorBoundingBoxtoSqlGeometryenvelopeFeatureExtensions—List<Feature<Point>>toDataTableGeoJsonExtensions— GeoJSON geometry toSqlGeometry/SqlGeography(and back viaAsGeoJson)GmlExtensions—SqlGeometryto GML3 (AsGml3) and GML3 parsing (ParseGML3)GpxExtensions— GPX waypoints, track points, segments, and tracks toSqlGeographyShapefileExtension— ESRI Shapefile shapes toSqlGeometrySqlSpatialHelper/SqlSpatialUtility— WKT and Esri JSON parsing, empty-geometry builders, bounding boxes from envelopes, union, and point-collection/linestring construction
Usage
using IRI.Maptor.Extensions;
// SqlGeometry -> Maptor geometry
Geometry<Point> geometry = sqlGeometry.AsGeometry();
// SqlGeometry -> GeoJSON
var geoJson = sqlGeometry.AsGeoJson();
// Maptor bounding box -> SqlGeometry envelope
SqlGeometry envelope = boundingBox.AsSqlGeometry(srid: 3857);
NuGet package · Report issues · Back to IRI.Maptor.Infrastructure