Npgsql.NetTopologySuite 8.0.2

Npgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.

This package is an Npgsql 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 Npgsql;
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.

Showing the top 20 packages that depend on Npgsql.NetTopologySuite.

Packages Downloads
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
19
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
20
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
21
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
22
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
23
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
24
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
25
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
27
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
28
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
29
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
32
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
35
Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite
NetTopologySuite PostGIS spatial support plugin for PostgreSQL/Npgsql Entity Framework Core provider.
40

.NET Standard 2.0

Version Downloads Last updated
8.0.2 2 02/20/2024
8.0.1 5 12/08/2023
8.0.0 6 11/21/2023
8.0.0-rtm 4 11/21/2023
8.0.0-rc.2 5 10/13/2023
8.0.0-preview.4 16 06/06/2023
8.0.0-preview.3 22 05/22/2023
8.0.0-preview.2 8 04/04/2023
8.0.0-preview.1 18 04/04/2023
7.0.6 5 09/26/2023
7.0.4 5 06/06/2023
7.0.2 10 04/04/2023
7.0.1 17 01/15/2023
7.0.0 19 12/02/2022
7.0.0-rc.2 8 08/22/2023
7.0.0-rc.1 15 09/22/2022
7.0.0-preview.7 22 08/19/2022
7.0.0-preview.6 13 09/21/2022
7.0.0-preview.5 9 06/13/2023
7.0.0-preview.4 25 09/24/2022
7.0.0-preview.3 50 09/24/2022
7.0.0-preview.2 34 09/21/2022
7.0.0-preview.1 42 09/24/2022
6.0.10 5 09/30/2023
6.0.9 15 04/04/2023
6.0.8 15 01/15/2023
6.0.7 18 09/24/2022
6.0.6 14 09/10/2022
6.0.5 18 09/09/2022
6.0.4 36 09/08/2022
6.0.3 45 06/27/2022
6.0.2 16 09/09/2022
6.0.1 9 09/11/2022
6.0.0 38 09/10/2022
6.0.0-rc.2 23 09/24/2022
6.0.0-rc.1 5 09/24/2022
6.0.0-preview7 26 09/24/2022
6.0.0-preview6 52 09/24/2022
6.0.0-preview5 9 09/24/2022
6.0.0-preview4 13 09/24/2022
6.0.0-preview3 20 09/23/2022
6.0.0-preview2 11 09/21/2022
5.0.17 6 09/28/2023
5.0.16 25 04/04/2023
5.0.15 9 09/22/2022
5.0.14 12 06/06/2023
5.0.13 16 09/21/2022
5.0.12 31 09/24/2022
5.0.11 44 09/24/2022
5.0.10 25 09/22/2022
5.0.7 15 09/09/2022
5.0.5 29 09/13/2022
5.0.4 31 09/10/2022
5.0.3 13 09/09/2022
5.0.2 55 09/09/2022
5.0.1.1 21 09/21/2022
5.0.0 7 09/09/2022
5.0.0-preview1.1 17 09/23/2022
5.0.0-alpha1 55 09/24/2022
4.1.12 10 05/12/2023
4.1.11 20 09/24/2022
4.1.9 45 09/09/2022
4.1.8 20 09/14/2022
4.1.7 20 09/09/2022
4.1.6 23 09/09/2022
4.1.5 47 09/11/2022
4.1.4 19 09/10/2022
4.1.3 32 09/11/2022
4.1.2 56 09/23/2022
4.1.1 41 09/10/2022
4.1.0 15 09/10/2022
4.1.0-preview2 34 09/21/2022
4.1.0-preview1 8 09/17/2022
4.0.13 17 09/24/2022
4.0.11 45 09/24/2022
4.0.10 9 08/22/2023
4.0.9 24 09/10/2022
4.0.8 54 09/07/2022
4.0.7 45 09/13/2022
4.0.6 20 09/09/2022
4.0.5 36 09/09/2022
4.0.4.1 9 09/24/2022
1.0.2 32 09/09/2022
1.0.1 10 09/07/2022
1.0.0 41 09/09/2022
1.0.0-rc1 8 09/24/2022