[postgis-users] casting a geometry

Richard Greenwood richard.greenwood at gmail.com
Wed Jun 3 12:40:30 PDT 2009


That what I needed. Thank you very much!

Rich


On Wed, Jun 3, 2009 at 1:24 PM, Luigi Castro Cardeles
<luigi.cardeles at gmail.com> wrote:
> Hi
> if they are polygon's, you can turn then into multi
> ST_Multi(geometry)
>
> Returns the geometry as a MULTI* geometry. If the geometry is already a
> MULTI*, it is returned unchanged.
>
> SELECT ST_MULTI(wkb_geometry) FROM table;
> See if your postgis version have that function.
> best regards,
> Luigi Castro Cardeles
>
>
> 2009/6/3 Richard Greenwood <richard.greenwood at gmail.com>
>>
>> I am having trouble inserting geometries into a table. The geometry
>> column has a constraint:
>>   enforce_geotype_wkb_geometry CHECK (geometrytype(wkb_geometry) =
>> 'MULTIPOLYGON'::text
>>      OR wkb_geometry IS NULL);
>>
>> I am attempting to insert what I assume are polygons generated by
>> st_buffer() but they violate the constraint. If I pgsql2shp the
>> polygons out I can insert them into the table, but that's pretty ugly.
>>
>> Thanks,
>> --
>> Richard Greenwood
>> richard.greenwood at gmail.com
>> www.greenwoodmap.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
>
>



-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the postgis-users mailing list