[postgis-users] How to trim a GeometryCollection toget aMultiPolygon?

Obe, Regina robe.dnd at cityofboston.gov
Tue Aug 5 06:31:50 PDT 2008


Great idea.  Yes I think that is better, less prone to error and probably faster since integer checks are faster than string checks.  I'm assuming the cost of accessing the ST_Dimension is not any more (and probably less) than the cost of accessing the geometry type and both are fairly negligable.


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of postgis.domain.thewild at spamgourmet.com
Sent: Tuesday, August 05, 2008 8:39 AM
To: postgis-users at postgis.refractions.net
Subject: Re: [postgis-users] How to trim a GeometryCollection toget aMultiPolygon?

Obe Regina - robe.dnd at cityofboston.gov a écrit :
>  WHERE ST_GeometryType(foo.the_geom) ILIKE '%polygon%'

Would it be enough to check the dimension of the geomtry in that case ?
(i.e. ST_Dimension(foo.the_geom) = 2)

And, more important, do you think it be faster than checking its type 
against a string ?

postgis-users mailing list
postgis-users at postgis.refractions.net
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

More information about the postgis-users mailing list