[postgis-users] sync geometry with attributes

Bruce Rindahl rindahl at lrcwe.com
Fri May 23 13:10:33 PDT 2008


I think triggers may not be the answer here.  If you define the trigger 
as updating the geometry whenever the attributes change  then if you 
change the geometry the trigger will always reset the geometry to the 
old value.  The same thing happens if the trigger goes the other way.  I 
think what ever you use to update the geometry needs to also update the 
attributes.

Bruce

Matias Massigoge wrote:
> John
>
> I'think you need to define trigers in the updates of the table. In
> this triguers you should update the fields inspecting the new value of
> de Geometry.
>
> Hope this help you.
>
> Matías
>
> On Fri, May 23, 2008 at 4:48 PM, John Callahan <john.callahan at udel.edu> wrote:
>   
>> Please excuse my question if it seems too trivial.  I am just getting
>> started with PostGIS and couldn't quite find what I was looking for.
>>
>> For a point data set, it is common for us to store the lat/long (or
>> easting/northing) as attributes in the table. (Some programs we have require
>> this.)  However, when I edit the position through a GIS (like QGIS), the
>> spatial location is altered but obviously not the attributes.  And when
>> these attributes are altered in the table, the geometry is not updated,
>> obviously.   Is there a way to keep these synchronized?  Is this built into
>> PostGIS?
>> Thanks for your help.  Even is you don't know how this could be done, is it
>> possible?
>>
>> - John
>>
>> ****************************************
>> John Callahan
>> Geospatial Application Developer
>>
>> Delaware Geological Survey
>> University of Delaware
>> 227 Academy St, Newark DE 19716-7501
>> Tel: (302) 831-3584
>> Email: john.callahan at udel.edu
>> http://www.dgs.udel.edu
>> ****************************************
>>
>> _______________________________________________
>> 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
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080523/a49da17e/attachment.html>


More information about the postgis-users mailing list