[odb-users] Mapping PostGIS POLYGON type

Alexandre Pretyman alexandre.pretyman at gmail.com
Wed Mar 30 09:48:05 EDT 2016

I'm extremely sorry, it's been long since I've done this. The link from
Boris' blog has all info, but to complete the example of SpatiaLite, I did
put the following db pragma before mapping the the object:

#pragma db map type("GEOMETRY") as("TEXT") to("GeomFromText((?),
4326)") from("AsText((?))")

On 30 March 2016 at 08:52, Boris Kolpackov <boris at codesynthesis.com> wrote:

> Hi Yoav,
> Weiss, Yoav <yoav.weiss at intel.com> writes:
> > error: unknown PostgreSQL type 'GEOMETRY'
> The way to handle this in ODB is via the extended database type mapping
> support:
> http://www.codesynthesis.com/~boris/blog/2012/07/18/custom-database-to-cxx-type-mapping-in-odb/
> See also Section 14.8, "Database Type Mapping Pragmas" in the manual as
> well as the pgsql/custom test in the odb-tests package.
> Boris

Alexandre Pretyman

More information about the odb-users mailing list