[postgis-users] GeomUnion Bug?
Charlie Savage
cfis at savagexi.com
Fri Sep 7 08:51:57 PDT 2007
Hi Carl,
> Charlie ,
>
> neither of those polygons are valid
>
> repeating points, self intersecting and the second one is not a closed
> linestring
Interesting - that is what PostGis/Geos produces when you do this:
select astext(envelope(GeomFromText('POINT(-104 40)')))
"POLYGON((-104 40,-104 40,-104 40,-104 40,-104 40))"
But you are right, PostGis doesn't think they are valid:
select isvalid(envelope(GeomFromText('POINT(-104 40)')))
False
And this did work in older versions of GEOS - maybe it shouldn't have.
So here is my problem then. I have a map, a user enters a point. I
want to store the bounding box. So I use the envelope function as
above. User enters another point. Find its bounds. Then union them
together. I don't want to recalculate the bounds based on all the
points each time because its too expensive finding all the constituent
geometries.
Ideas?
Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070907/93ad6191/attachment.bin>
More information about the postgis-users
mailing list