YBNpgsql.NetTopologySuite
9.0.2.1
dotnet add package YBNpgsql.NetTopologySuite --version 9.0.2.1
NuGet\Install-Package YBNpgsql.NetTopologySuite -Version 9.0.2.1
<PackageReference Include="YBNpgsql.NetTopologySuite" Version="9.0.2.1" />
<PackageVersion Include="YBNpgsql.NetTopologySuite" Version="9.0.2.1" />
<PackageReference Include="YBNpgsql.NetTopologySuite" />
paket add YBNpgsql.NetTopologySuite --version 9.0.2.1
#r "nuget: YBNpgsql.NetTopologySuite, 9.0.2.1"
#:package YBNpgsql.NetTopologySuite@9.0.2.1
#addin nuget:?package=YBNpgsql.NetTopologySuite&version=9.0.2.1
#tool nuget:?package=YBNpgsql.NetTopologySuite&version=9.0.2.1
NpgsqlYugabyteDB is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with YugabyteDB server using .NET.
This package is an NpgsqlYugabyteDB plugin which allows you to interact with spatial data provided by the PostgreSQL PostGIS extension; PostGIS is a mature, standard extension considered to provide top-of-the-line database spatial features. On the .NET side, the plugin adds support for the types from the NetTopologySuite library, allowing you to read and write them directly to PostgreSQL.
To use the NetTopologySuite plugin, add a dependency on this package and create a NpgsqlDataSource.
using YBNpgsql;
using NetTopologySuite.Geometries;
var dataSourceBuilder = new NpgsqlDataSourceBuilder(ConnectionString);
dataSourceBuilder.UseNetTopologySuite();
var dataSource = dataSourceBuilder.Build();
var conn = await dataSource.OpenConnectionAsync();
var point = new Point(new Coordinate(1d, 1d));
conn.ExecuteNonQuery("CREATE TEMP TABLE data (geom GEOMETRY)");
using (var cmd = new NpgsqlCommand("INSERT INTO data (geom) VALUES (@p)", conn))
{
cmd.Parameters.AddWithValue("@p", point);
cmd.ExecuteNonQuery();
}
using (var cmd = new NpgsqlCommand("SELECT geom FROM data", conn))
using (var reader = cmd.ExecuteReader())
{
reader.Read();
Assert.That(reader[0], Is.EqualTo(point));
}
For more information, visit the NetTopologySuite plugin documentation page.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- NetTopologySuite (>= 2.5.0)
- NetTopologySuite.IO.PostGIS (>= 2.1.0)
- NpgsqlYugabyteDB (>= 9.0.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
9.0.2.1 | 179 | 9/25/2025 |
8.0.3.2 | 213 | 11/25/2024 |
8.0.3-yb-1 | 105 | 7/12/2024 |