[Gdal-dev] SetField & GetExtents Query

Frank Warmerdam warmerdam at pobox.com
Thu Aug 17 11:18:43 EDT 2006


Bryan Keith wrote:
> Ben Crane wrote:
>> Hi all,
>>
>> I'm having a great time with the PHP OGR library but
>> have 2 questions:
>>
>> 1. I have used the SetField command and updated
>> browser view, but how do I actually save this
>> information into the core SHP files? I have tried
>> CommitTransaction but seems to have no joy? I need to
>> be able to update the core SHP file since it will be
>> opened and used by others after the update.
> 
> Ben,
> 
> I don't use PHP, but in Python it's necessary to call Layer.Destroy() to 
> get the changes you made to be saved to the shapefile.

Bryan / Ben,

I believe you need to ensure the *datasource* gets closed, which
can be done by invoking it's destroy method in Python.  Please
do *not* destroy layer's as they are owned by the datasource.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list