Commit graph

108 commits

Author SHA1 Message Date
Mark Cave-Ayland 137120a034 With the advent of LWGEOM_PARSER_RESULT, it is now possible to get rid of the horrible SERIALIZED_LWGEOM hack for PostgreSQL 8.3 to allow us to return the size separate from the result. This is good as it removes another level of indirection from the parser. Note that the size field has now been added to the LWGEOM_PARSER_RESULT structure.
git-svn-id: http://svn.osgeo.org/postgis/trunk@3025 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-28 16:18:12 +00:00
Mark Cave-Ayland b6083bfddc Update (E)WKT/WKB parser to return a structure (LWGEOM_PARSER_RESULT) instead of just the serialized lwgeom. This is in preparation for returning more detailed error information back to the caller.
git-svn-id: http://svn.osgeo.org/postgis/trunk@3023 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-28 15:32:46 +00:00
Mark Cave-Ayland a6a0bbc574 Add parser flags to the LWGEOM to (E)WKB/WKT parsers, similar to has already been done for the (E)WKB/WKT to LWGEOM parsers.
git-svn-id: http://svn.osgeo.org/postgis/trunk@3012 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-25 21:50:19 +00:00
Mark Cave-Ayland 742d9515ca Allow a flags parameter to be passed into the WKT parser to determine which consistency checks are performed out of polygon ring closure, minimum number of points and odd number of points.
git-svn-id: http://svn.osgeo.org/postgis/trunk@2949 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-09 21:10:46 +00:00
Mark Cave-Ayland b0641e9c1d Yet another update to the liblwgeom parser API - lwgeom_from_ewkt() has been renamed to serialized_lwgeom_from_ewkt() to indicate that the function returns a serialied LWGEOM rather than an unserialized LWGEOM structure.
git-svn-id: http://svn.osgeo.org/postgis/trunk@2945 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-07 11:02:05 +00:00
Mark Cave-Ayland bdaf9c2271 Rename the new parser function ewkt_to_lwgeom() to lwgeon_from_ewkt() so that it matches the rest of the parser API
git-svn-id: http://svn.osgeo.org/postgis/trunk@2841 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-13 17:33:19 +00:00
Mark Cave-Ayland 4f8c4b5e8f More work on improving the EWKT/B parser; remove all references to allocator functions from outside of liblwgeom by generating wrapper functions with more meaningful names. As well as cleaning up the API, it also makes the code much more readable
git-svn-id: http://svn.osgeo.org/postgis/trunk@2839 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-13 10:50:56 +00:00
Mark Cave-Ayland ffde636dc0 Split the basic geometry accessors into a separate static library liblwgeom.a; this potentially allows re-use of the liblwgeom functions from within PostGIS, or could be extended at a later date to include databases other than MySQL. This patch includes a change to the liblwgeom handler functions; instead of sprinkling init_pg_func()s around the source, I have changed the default liblwgeom handlers to make use of a callback to allow linked libraries to set their own handlers the first time any of them are called. I have also tidied up the parser API a little in liblwgeom.h, which means wktparse.h can be removed from all of the headers in the lwgeom/ directory, plus renamed wktunparse.c to lwgunparse.c to keep things similar to lwgparse.c. Finally, I renamed liblwgeom.c to lwutil.c to avoid confusion within the new interface. TODO: the liblwgeom Makefile has some gcc-specific options, but these can be fixed later - it seemed more important to make the warnings visible to developers.
git-svn-id: http://svn.osgeo.org/postgis/trunk@2815 b70326c6-7e19-0410-871a-916f4a2858ee
2008-06-29 19:11:48 +00:00
Renamed from lwgeom/lwgeom.c (Browse further)