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


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to