[postgis-users] error updating multipoint: violates check constraint enforce_geotype
Biddy
newskatze at riomhphost.net
Wed Jul 7 02:37:04 PDT 2010
Hi,
Nicolas, thanks for your response.
I would hope that my query returns multipoints. At least it always has
in the test runs. For some reason when I let it run on our large
dataset, it doesn't work.
As a test I decided to skip that one troublesome column and load the
other points. But I get the same error for a different column now. On
a dataset of roughly 960k rows, I got the error 8 times.
I load data into several multipoint columns. For example, I have one
column that stores long, lat and alt as groups of multipoints with 1k
points per multipoint and then another column that stores x,y and z as
groups of multipoints with 1k points per multipoint. I have 6 of those
multipoint columns.
I am not sure if an ST_Multi around the ST_Union would do anything.
Does anybody have any ideas????
Any help is greatly appreciated, as I don't understand why this is
happening at all!!
B.
Quoting Nicolas Ribot <nicolas.ribot at gmail.com>:
>> Hi everyone,
>>
>> I have a program that updates a table containing multipoints.
>> Now, I have several columns with multipoints, but only one breaks with the
>> following error:
>>
>> org.postgresql.util.PSQLException: ERROR: new row for relation "lidarpoints"
>> violates check constraint "enforce_geotype_numtarclassidreflect"
>>
>> The code and setup for the other multipoint geometries is exactly the same,
>> which is why I am surprised that it's not working for this one case. I feel
>> I am overlooking something simple.
>>
>> My update sql is:
>> "update lidarpoints set numtarclassidreflect =
>> ST_UNION(numtarclassidreflect, ST_GeomFromEWKT('SRID=4326;MULTIPOINT(2 0
>> -1436)')) where lidarpts_id = currentRowID;"
>>
>> Does anybody know anything about this?
>>
>
> Hi,
>
> What is the geographic type of the ST_UNION returned by your query ?
> Can it be null, and no constraint allowing null geometries exists in
> the table ?
>
> Nicolas
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list