[odb-users] Adding support for a new sql type
Boris Kolpackov
boris at codesynthesis.com
Fri Jul 13 04:28:43 EDT 2012
Hi Alexandre,
Alexandre Pretyman <alexandre.pretyman at gmail.com> writes:
> I guess you are talking about the tests with under
> odb-tests/pgsql/custom/tests.hxx and traits.hxx where you persist a
> type POINT. This looks like it will do the job!
Well, the PG test uses the built-in POINT type, not GEOMETRY. The
MySQL and MSSQL tests, on the other hand, do use GEOMETRY.
> Just FYI, PostGIS has asewkt and asewkb which are extended versions of
> the WKT and WKB which give you the SRID at the beggining:
> "SRID=5432;POINT(1 1)". Then it's up the the Geometry Library to parse
> it, but I'm not certain that GEOS supports it.
That's perfect. They obviously thought about it a bit more than me
and put SRID in front. This way you can parse it out manually and
then pass the rests of the string (i.e., "POINT(1 1)") to whatever
standard WKT function you use (GEOS, Boost, etc).
Boris
More information about the odb-users
mailing list