[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-devel
Subject:    Re: [postgis-devel] topology : cosmetic changes to troubleshoot geometry failing to convert to topog
From:       Sandro Santilli <strk () keybit ! net>
Date:       2013-08-11 11:55:00
Message-ID: 20130811115500.GA23679 () gnash
[Download RAW message or body]

Hey Remi, I do feel your pain. This very problem is common with GEOS
exceptions too. Sometime one would want a NULL rather than an exception.

This is so common that I was thinking we could use a session variable
to determine the behavior. See http://trac.osgeo.org/postgis/ticket/1393 =

and feel free to add suggestions to http://trac.osgeo.org/postgis/wiki/DevG=
UC

Adding extra args to functions is always something I try to think a lot
about. Few args are easier to remember. There's already another request
for extra toTopoGeom arg here: http://trac.osgeo.org/postgis/ticket/2144
I wonder if we should start using flags, like the ST_AsGML family of funtio=
ns.

--strk;

On Thu, Aug 01, 2013 at 02:43:51PM +0200, R=E9mi Cura wrote:
> 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 precisio=
n)
> 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=E9mi-C
_______________________________________________
postgis-devel mailing list
postgis-devel@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic