[postgis-devel] topology : cosmetic changes to troubleshoot geometry failing to convert to topogeometry

Rémi Cura remi.cura at gmail.com
Thu Aug 1 05:43:51 PDT 2013


Hello Dear list,

I'm currently having trouble importing polygon data from geom to topogeom.

As I understand it, it is currently difficult to find which geometry is
going to fail the conversion.
Maybe there is a better way, but for me I have to try to import the whole
table, then it fails, then I cut the table in 2, then it fails, then ...
I can't try individually to convert geom as failing will depend on what
other geom were converted before.


Hence I'm suggesting a very cosmetic change to the
topology.totopogeom(geometry, character varying, integer, double precision)
function.

I tried a topology.totopogeom(ageom geometry, atopology character varying,
alayer integer, atolerance double precision DEFAULT 0, witherror boolean
DEFAULT true) function,
which is just the original totopogeom, but add a catch for exception when
creating topogeom, and return null if exception is catched.

This way the workflow is easier :
I import my whole table, then look for NULL topogeom, and I can deal with
the problematic geometries, maybe by changing precision and so.

Please let me know if you think this is worth it or if this is too minor
tweak.

Cheers,

Rémi-C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20130801/166b2311/attachment.html>


More information about the postgis-devel mailing list