[postgis-users] Using exteriorring

Benoit Ogier benoit.ogier at cbconseil.com
Fri Feb 18 09:03:22 PST 2005


i tried 2 geometry columns types

the input geometry column is from MULTIPOLYGON type
the output geometry column is from POLYGON type

I tried also with an output column of MULTIPOLYGON type, and with  
request like :
update nt_ownership_ew set the_geom = exteriorring(the_geom)

Each time, i got an error like :
ERROR:  new row for relation "nt_ownership_ew" violates check constraint 
 "enforce_geotype_the_geom"

I use PostGIS 0.9.0 with GEOS 2.0.0 and Proj 4.4.8 under PostGres  
8.0.0beta1. My OS : Mac OS X 10.3.7.

Thanks,

BO

Le 18 févr. 05, à 17:27, strk at refractions.net a écrit :

> On Fri, Feb 18, 2005 at 05:04:19PM +0100, Benoit Ogier wrote:
>> Hi,
>>
>> I would use the exteriorring function to get the exterior ring of  
>> multi
>> polygons, convert them to a single poly and store result in a new  
>> field
>> of my table "poly_test".
>>
>> using this sql command :
>> update nt_ownership_ew SET the_geom2 = exteriorring(the_geom)
>>
>> I get :
>>
>> ERROR:  new row for relation "poly_test" violates check constraint "en 
>> force_geotype_the_geom2"
>>
>>
>> the_geom is MULTIPOLYGON kind,
>> the_geom2 is POLYGON kind,
>>
>> Questions :
>> - Is it the recommanded way to convert multi-polys to single polys ?
>> - If yes, where is the error ?
>
> You did everything the way you should, just a question, which
> geometry type did you specify in the AddGeometryColumn() call
> to create the poly_test field ?
>
> --strk;
>
>>
>> Thanks,
>>
>> BO
>>
>> --  
>> 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
>> };
>> --  
>>
>>
>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> 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
};
-- 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2285 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050218/d9961a78/attachment.bin>


More information about the postgis-users mailing list