[postgis-users] CreateTopoGeom -- why can't create polygon topo from edges
Paragon Corporation
lr at pcorp.us
Tue Sep 13 21:17:57 PDT 2011
strk and Andrea,
Perhaps this is just illegal by specs, but I'm wondering why I couldn't
logically create a multi/poly topogeometry from edges that form the boundary
of a polygon? or do the specs just not
allow that. I see the CreateTopoGeom just throws an error if I dear try to
create a polygon from edges.
I was trying to take my neighborhoods table and convert my geometries to
topo geoms. So I used this update statement. That's a lot of faces though.
I think it would be
much faster if I could have built from the edges of the boundaries.
UPDATE boston.nei
SET topo =
topology.CreateTopoGeom('topo_boston'
,3,6
, foo.bedges)
FROM (SELECT n.gid, topology.TopoElementArray_Agg(DISTINCT
ARRAY[f.face_id,3]) As bedges
FROM boston.nei As n
INNER JOIN topo_boston.face As f ON n.geom && f.mbr
WHERE ST_Covers(n.geom, topology.ST_GetFaceGeometry('topo_boston',
f.face_id))
GROUP BY n.gid) As foo
WHERE foo.gid = boston.nei.gid;
It's also not quite what I hoped for but that could be because I'm still
missing faces or tiger doesn't care about Boston neighborhoods which is
quite possible or who ever drew the maps idea of streets are not aligned
with those of tiger. See attached images -- my original geometry and the
topo column
generated from it.
Boston neighborhoods are kind of dumb since no one can agree on the
boundaries and people get into fist fights about it. I think the same case
in Philadelphia.
Thanks,
Regina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110914/5fc295ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: topo_nei.png
Type: image/png
Size: 48566 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110914/5fc295ec/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: original_nei.png
Type: image/png
Size: 43970 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110914/5fc295ec/attachment-0001.png>
More information about the postgis-users
mailing list