[postgis-users] Using exteriorring

Benoit Ogier benoit.ogier at cbconseil.com
Fri Feb 18 11:47:19 PST 2005


thanks for your help...
i succed with the above request under 0.9.0...

Le 18 févr. 05, à 18:25, RIBOT, Nicolas a écrit :

>> ExteriorRing() returns a LINESTRING, as per OGC specifications.
>> Output column should be LINESTRING.
>> I'm sorry I forgot that, so you need another function to store
>> it as a polygon...
>>
>> With postgis-1.0 you can use MakePolygon(ExteriorRing(...)).
>> With postgis-0.x I'm afraid you have no easy way (but other
>> users might give you better suggestions)
>>
>
> Maybe using astext(ExteriorRing(...)) and the "substr" String function  
> to
> generate a polygon textual representation from the linestring, by  
> removing
> the "LINESTRING" keyword and replacing it with the "POLYGON" one and  
> the
> extra set of parentheses. something like:
>
> geometryFromText('POLYGON(' || substr(astext(exteriorRing(...)), 10)  
> || ')',
> <srid>)
>
> Nicolas  
> Ribot<important_notice.txt>____________________________________________ 
> ___
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-- 
Benoît Ogier{
Carte Blanche Conseil
47, rue de Lancry
75010 Paris
Tel : +33 1 42 41 21 21
Fax : +33 1 42 41 70 40
email : benoit.ogier at cbconseil.com
};
-- 




More information about the postgis-users mailing list