[postgis-users] adding additional points to multipoint

Christo Du Preez christo at mecola.com
Fri Mar 31 05:31:59 PST 2006


The result is:         "MULTIPOINT(1 1,2 2,3 3)"
The version is:      "POSTGIS="1.1.1" GEOS="2.2.1-CAPI-1.0.1" PROJ="Rel. 
4.4.9, 29 Oct 2004" USE_STATS"

Markus Schaber wrote:
> Hi, Christo,
>
> Christo Du Preez wrote:
>   
>> Thank you,
>>
>> When trying
>> update meclabel
>> set the_geom = geomunion(the_geom, GeomFromText('POINT(23 4)', -1))
>>
>> I get:: ERROR:  new row for relation "meclabel" violates check
>> constraint "enforce_geotype_the_geom"
>>     
>
> Hmm, I did not cast it in my tests, but I guess that, depending on your
> PostGIS version, Geomunion might return a GeometryCollection instead of
> an MultiPoint.
>
> Can you see what PostGIS version you have?
>
> Can you execute
>
>  select asText(geomunion('MULTIPOINT(1 1,3 3)',
>   geomFromText('POINT(2 2)',-1)));
>
> and tell us its output?
>
>
>   
>>  CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) =
>> 'MULTIPOINT'::text OR the_geom IS NULL),
>>     
>
> This is the "guilty" constraint that blocks all non-multipoint
> geometries from being inserted into the table.
>
> Markus
>   

-- 
Kind Regards,
Christo Du Preez

Senior Software Engineer
Mecola IT
http://www.mecola.com
+27 [0]83 326 8087




More information about the postgis-users mailing list