Page 1 of 1

PostgreSQL Invalid Datatype: GEOMETRY

Posted: Mon 28 Mar 2011 18:08
by ChrisMH
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

Posted: Wed 30 Mar 2011 13:24
by StanislavK
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.