[postgis-users] Problem with st_polygonize()
Chris Hermansen
chris.hermansen at timberline.ca
Tue Oct 23 17:39:32 PDT 2007
Good people;
In my continuing attempts to merge two partially overlapping polygon
networks, I've run into a problem with st_polygonize() that seems to me
to be a bug.
I have the forestry equivalent of buildings on parcels. I'm following
the Wiki example of overlaying two different and not completely
overlapping polygon networks provided by Kevin Neufeld.
With some modifications to the method Kevin shows, I'm at the point
where I have some linework that I want to re-polygonize using the
following SQL adapted from Kevin's example:
CREATE TEMP TABLE newPolys (
gid serial PRIMARY KEY,
geom geometry);
INSERT INTO newPolys (geom)
SELECT geom AS geom
FROM st_dump((
SELECT st_polygonize(geom) AS geom
FROM nodedLinework));
This statement runs to completion very quickly. The only difficulty I
have is that a bunch of the lines in nodedLinework are dropped and so
there aren't enough polygons.
If I isolate the call to st_polygonize(), it generates a
GEOMETRYCOLLECTION with a deficit of polygons. So whatever problem is
occurring seems to be happening right there.
This is not a big dataset; by my count I expect 20 - 25 polygons and I
get 15.
Any suggestions?
--
Regards,
Chris Hermansen · mailto:clh at timberline.ca
tel:+1.604.714.2878 · fax:+1.604.733.0631
Timberline Natural Resource Group · http://www.timberline.ca
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5
C'est ma façon de parler.
More information about the postgis-users
mailing list