npgsql / efcore.pg

Entity Framework Core provider for PostgreSQL
PostgreSQL License
1.54k stars 226 forks source link

Support for ordinate-constrained spatial types (e.g. LineStringM) #1269

Closed netcorefan closed 4 years ago

netcorefan commented 4 years ago

Hi,

I have done a scaffold for my schema in pg. There are geometries inside some table. I have used NetTopologySuite. Everything ok but geomtries with M coordinate.

Could not find type mapping for column 'applicaction.axis.the_geom' with data type 'geometry(LineStringM,4326)'. Skipping column.

But I have add by hand column in the table after scaffolding, but using LineString only without M.

I have retrieved data with ef context select and I found within the table not only the data of the LineString but the data of the M coordinate. I think LineString (NTS) is valid for LineStringM (Postgis), but scaffold skip column with geomtries with M coordinates.

It's the same with PointM.

Can you do anything with scaffolding process to traspose "GeomtryM" to "Geometry"? I don't know about other coordinates types (Z, ...) I have no tried!

tia!

regards

YohDeadfall commented 4 years ago

Are you using EF or EF Core?

netcorefan commented 4 years ago

EF core

netcorefan commented 4 years ago

Is it possible to apply this patch in version 3.1? (next 3.1.x release)

roji commented 4 years ago

I think so, the fix seems low-risk enough to me.