[Gdal-dev] SetField & GetExtents Query
Bryan Keith
bryan at geomega.com
Thu Aug 17 11:31:36 EDT 2006
Frank Warmerdam wrote:
> 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,
Frank,
You're right. I should have looked at the code that I just got working
in the last few days instead of going by memory.
Bryan
More information about the Gdal-dev
mailing list