You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Playing around with 'NpgsqlNetTopologySuite' instead, it turns out that the column has to be defined as 'POINTZ', however if I change the above mentioned test to use POINTZ
var table = await CreateTempTable(conn, "field geometry(POINTZ, 4326)");
I get this error:
22023: Column has Z dimension but geometry does not
Not quite sure what that means... or how to move on from here, except use 'NpgsqlNetTopologySuite' instead
@smolesen, adding to @vonzshik. There is maybe a confusion between builtin postgres geometry (2 dimensions only) and the PostGIS ones.
Using PostGIS, when you open Npgsql connection you should ask to handle Z coordinates this way: await using var conn = await OpenConnectionAsync(handleOrdinates: Ordinates.XYZ);
Activity
smolesen commentedon May 8, 2026
Playing around with 'NpgsqlNetTopologySuite' instead, it turns out that the column has to be defined as 'POINTZ', however if I change the above mentioned test to use POINTZ
I get this error:
Not quite sure what that means... or how to move on from here, except use 'NpgsqlNetTopologySuite' instead
vonzshik commentedon May 13, 2026
Well, geometry explicitly documented as two-dimensional spatial object, so yeah, no z coord.
xfischer commentedon May 14, 2026
@smolesen, adding to @vonzshik. There is maybe a confusion between builtin postgres geometry (2 dimensions only) and the PostGIS ones.
Using PostGIS, when you open Npgsql connection you should ask to handle Z coordinates this way:
await using var conn = await OpenConnectionAsync(handleOrdinates: Ordinates.XYZ);xfischer commentedon Jun 9, 2026
Regarding the first issue (GeoJSON with altitude), there's a bug in the converter: reading Z values is supported but writing isn't.
Will submit a PR.
npgsql#6567 write geojson with Z
npgsql#6567 write geojson with Z
npgsql#6567 write geojson with Z
npgsql#6567 write GeoJSON with Z values