این صفحه هنوز ترجمه نشده است؛ نسخهٔ انگلیسی نمایش داده می‌شود.

IRI.Maptor.Infrastructure.SqlServer

NuGet Target

Persistence adapter for SQL Server Spatial — a Maptor vector data source for reading spatial features stored in SQL Server geometry / geography columns, materialized through Microsoft.SqlServer.Types (SqlGeometry) and converted to native Geometry<Point> objects.

Installation

dotnet add package IRI.Maptor.Infrastructure.SqlServer

Features

  • SqlServerDataSource — Maptor vector data source (VectorDataSource, IEditableVectorDataSource) over a SQL Server spatial table or a free-form select query (CreateForQueryString)
  • Reads spatial rows as SqlGeometry and converts them to native Geometry<Point> objects
  • Spatial filtering: bounding-box queries (GetAsFeatureSetAsync(BoundingBox)), WKT/WKB intersects filters (GetGeometriesWhereIntersects), and custom where clauses
  • FeatureSet loading for map display, including a map-scale-aware overload
  • SqlServerInfrastructure — connection helpers, feature selection to dictionaries, bulk DataTable insert (Insert, InsertTable), ExecuteNonQuery, and table delete
  • SqlServerSourceParameter — strongly-typed source parameters (connection string, table, spatial/label columns, query string)

Usage

using IRI.Maptor.Infrastructure.SqlServer;

var source = new SqlServerDataSource(
    connectionString, "Roads", spatialColumnName: "SHAPE", labelColumnName: "Name");

// features inside a bounding box
var featureSet = await source.GetAsFeatureSetAsync(boundingBox);

// geometries intersecting a WKT polygon
var geometries = source.GetGeometriesWhereIntersects(
    "POLYGON((51 35, 52 35, 52 36, 51 36, 51 35))");

Limitations

  • Windows only (depends on Microsoft.SqlServer.Types).
  • Editing is partially implemented: Add/Remove delegate to caller-supplied AddAction/RemoveAction callbacks; UpdateGeometry, UpdateAttributes, SaveChangesAsync, and SearchAsync are not implemented yet.

NuGet package · Report issues · Back to IRI.Maptor.Infrastructure