این صفحه هنوز ترجمه نشده است؛ نسخهٔ انگلیسی نمایش داده میشود.
IRI.Maptor.Infrastructure.PostgreSql
Persistence adapter for PostgreSQL / PostGIS — a Maptor vector data source for reading spatial features stored in PostGIS geometry columns, built on Npgsql.
Installation
dotnet add package IRI.Maptor.Infrastructure.PostgreSql
Features
PostGisDataSource— Maptor vector data source (VectorDataSource) over a PostGIS table- Geometries are fetched as WKB (
ST_AsBinary) and parsed into nativeGeometry<Point>objects - Spatial filtering with
ST_Intersectsagainst a WKT polygon region (GetGeometriesWhereIntersects,GetAttributeColumnsWhereIntersects) - Attribute-table reads and raw SQL execution returning
DataTable(GetAttributeColumns,ExecuteSql) PostgreSqlInfrastructure— connection-string builder, column discovery, table existence check, bulkDataTableinsert, table delete, and connection testing
Usage
using IRI.Maptor.Infrastructure.PostgreSql;
var source = new PostGisDataSource(
server: "localhost", user: "postgres", password: "...",
database: "gis", port: "5432",
tableName: "roads", spatialColumnName: "geom");
// all geometries in the table
var geometries = source.GetGeometries();
// geometries intersecting a WKT polygon
var filtered = source.GetGeometriesWhereIntersects(
"POLYGON((51 35, 52 35, 52 36, 51 36, 51 35))");
Limitations
- Read-oriented: feature-level insert/update/delete through the data source is not implemented
(bulk
DataTableinsert is available viaPostgreSqlInfrastructure.Insert). - The
FeatureSetand search APIs of the data-source base class are not implemented for PostGIS yet.
NuGet package · Report issues · Back to IRI.Maptor.Infrastructure