[postgis-users] Union fails on 2389 linestrings.
Jeff Adams
jadams at azavea.com
Wed Jul 28 06:18:36 PDT 2010
The ST_SnapToGrid doesn't help. It changes the points slightly, but Union
still fails. I tried simplifying my input linework, snapping to grids of
various sizes, nothing seem to make it happy. I'm trying to reduce the
amount of lines being unioned to see if that either fixes it or at least I
can get a small enough test case to post here.
On Tue, Jul 27, 2010 at 10:59 AM, Jeff Adams <jadams at azavea.com> wrote:
> The challenge is I don't know the exact point it is unhappy about. If
> I check the one in the error message, none of my linestrings intersect
> it, which means it is probably being printed with insufficient
> precision. I have 19 linestrings that have a point that could be
> printed as -118.296 34.1185 due to rounding.
>
> Also, the two linestrings printed in the error aren't real inputs,
> they must be something created internally by ST_Union as it is
> processing.
>
> I tried adding a ST_SnapToGrid(..., 0.00001) (0.00001 is very roughly
> a meter in lat/lon) and it has been running for almost 40 minutes, so
> it is either slower than before or it has made it further than before
> :-).
>
> Jeff
>
> On Tue, Jul 27, 2010 at 10:27 AM, Nicolas Ribot <nicolas.ribot at gmail.com>
> wrote:
> >> ST_IsValid returns true for all of them. I'll try reducing the
> >> precision slightly, though I'm later going to do point-in-poly checks
> >> against some other original input data and the reduced precision will
> >> increase the chances of inaccurate results.
> >>
> >
> > Ok,
> > I'm wondering if using the notice message could be used in conjunction
> > with linear referencing functions to add the missing point to the
> > failing linestring(s):
> >
> > 1- identify failing linestrings (or offending coordinates, then
> > finding the closest linestring to this point)
> > 2- complete these linestrings with new points built from coordinates
> > 3- relaunch the union procedure.
> >
> > Though I've never done this.
> >
> > Nicolas
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100728/20a3a201/attachment.html>
More information about the postgis-users
mailing list