[postgis-users] noding problem
Martin Davis
mbdavis at refractions.net
Tue Oct 23 15:25:27 PDT 2007
The TopologyException is telling you exactly where the error occurs. I
would try subsetting your date to just the area around the give location
(and say make it 50% larger). Then try the "noding" query again and see
if it gives the same result.
It is unusual for ST_Union to find a problem when noding linework, but
it can happen due to precision issues. Another thing you can try is to
reduce the precision of your data slightly (using snap-to-grid). This
sometimes "jiggles" things enough that the noding will work.
These kind of precision issues usually happen because there are line
segments in adjacent polygons which are *nearly but not precisely*
parallel. This in turn happens when you have data which looks like a
polygonal coverage but which isn't in fact fully noded together. Is
this possibly what your data looks like?
If this all still fails, consider sending this to us as 2 shapefiles to
have a look at.
Chris Hermansen wrote:
> Hi Kevin;
>
> Sorry to take so long to get back on this!
>
> How "isolated" do you want it? What I have right now is a three polygon
> table that I wish to overlay on a 3378 polygon table.
>
> Meantime, I'm working on making the problem smaller...
>
> Kevin Neufeld wrote:
>
>> Can you isolate the geometry that is causing the error? If geos is
>> broken, it would be nice to have a test case.
>> IE. Try noding half the lines at a time, then try noding half of a
>> half, etc...
>>
>> -- Kevin
>>
>> Chris Hermansen wrote:
>>
>>> Hi folks;
>>>
>>> I posted something a few days back on a noding problem I'm having, and
>>> received no answer. At this point I have more details and I think there
>>> is something seriously wrong.
>>>
>>> This is Postgis 1.3.1 and GEOS 3.0.0rc4.
>>>
>>> The Postgis Wiki has an example of putting two somewhat overlapping
>>> polygon networks together:
>>>
>>> http://www.postgis.org/support/wiki/index.php?ExamplesOverlayTables
>>>
>>> Basically, two tables of polygons are converted into linestrings and put
>>> in a third table.
>>>
>>> Then, the table of linestrings is noded; in the Wiki, the code given is:
>>>
>>> CREATE TEMP TABLE noded_lines AS
>>> SELECT St_Union(the_geom) AS the_geom
>>> FROM all_lines;
>>>
>>> Right, my problem! I have two tables with multi-polygons. I convert
>>> them to polygons. I use isValid() on their geometries to make sure that
>>> they are in good shape.
>>>
>>> Then! I run the "noding query" - which I might add takes a
>>> loooooooooooooooong time - and in the end I see:
>>>
>>> dustin=# create temp table step2 as
>>> dustin-# select st_union(geom) as geom from step1;
>>> NOTICE: TopologyException: found non-noded intersection between
>>> 1.40568e+06 507100, 1.40568e+06 507100 and 1.40568e+06 507100,
>>> 1.40568e+06 507100 1.40568e+06 507100
>>> ERROR: GEOS union() threw an error!
>>>
>>> OK, now to me this doesn't seem at all fair! If the st_union() command
>>> is supposed to node the linework then WHY is complaining about non-noded
>>> intersections?
>>>
>>> Thanks in advance for any light you can shed on this!
>>>
>>>
>>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
>
>
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
More information about the postgis-users
mailing list