PostgreSQL Invalid Datatype: GEOMETRY

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
ChrisMH
Posts: 14
Joined: Tue 15 Mar 2011 18:11

PostgreSQL Invalid Datatype: GEOMETRY

Post by ChrisMH » Mon 28 Mar 2011 18:08

I have some tables with GEOMETRY fields. Currently, if I try to retrieve data from a table containing a GEOMETRY field, I get an error "Invalid Datatype: GEOMETRY".

How do I handle those fields in LinqConnect? Is there an accepted way to handle this type (other than not including a GEOMETRY field in my schema). For example, could I convert the geometry to WKT or to lat/lon and back?

Thanks,
Chris

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 30 Mar 2011 13:24

At the moment, LinqConnect does not support the geometry data type, though you can read data of this type as 'plain' byte arrays. To do so, you can, e.g., set the 'Server Data Type' property of the corresponding entity field to 'bytea'. We will analyze the possibility of implementing proper support for the geometry type, and inform you about the results.

Also, you can work with PostGIS via Entity Framework models instead. For more information about this, please refer to http://blog.devart.com/postgis-and-enti ... ework.html.

Post Reply