PostgreSQL Invalid Datatype: GEOMETRY

PostgreSQL Invalid Datatype: GEOMETRY

Postby 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?

Posts: 14
Joined: Tue 15 Mar 2011 18:11

Postby 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
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Return to LinqConnect (LINQ to SQL support)