Updating Geometry

Started by Asli Akarsakaryaover 14 years ago2 messagesgeneral
Jump to latest
#1Asli Akarsakarya
asliakar@yahoo.com

Hello,

I am having trouble when attempting to update an existing geometry on a spatial table. The table stores 2D Point geometry, with the SRID 101. The update statement i am trying to use to update the geometry with the id 110 is as follows:

UPDATE <Table Name> SET <Geometry Column Name> = GeometryFromText('POINT(44 31)', 101) WHERE <id Column>=110

But I get an error that says the statement violates the "enforce_srid_position" restriction. Though the SRID's are the same. 

What is the right way to update an existing geometry?

Thank you. 

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Asli Akarsakarya (#1)
Re: Updating Geometry

Asli Akarsakarya <asliakar@yahoo.com> writes:

I am having trouble when attempting to update an existing geometry on a spatial table. The table stores 2D Point geometry, with the SRID 101. The update statement i am trying to use to update the geometry with the id 110 is as follows:

UPDATE <Table Name> SET <Geometry Column Name> = GeometryFromText('POINT(44 31)', 101) WHERE <id Column>=110

But I get an error that says the statement violates the "enforce_srid_position" restriction. Though the SRID's are the same.

You'll probably have better luck asking about this on the postgis
mailing lists ...

regards, tom lane