[Gdal-dev] Simple SHP file creation with Python..API question

Frank Warmerdam warmerdam at pobox.com
Tue Feb 7 09:09:54 EST 2006


On 2/7/06, Aykut KOÇAK <aykutkocak at superonline.com> wrote:
>
> geo.SetPoint(0,float(loc[0]),float(loc[1]),0)
> map.Release()
> return
> main()

Aykut,

After updating the point geometry in your in-memory
feature, you need to push it back to the datastore to
save it.   Try adding something like:

  lyr.SetFeature( ftr )

after the SetPoint() call.

In place update of geometries in a shapefile is
relatively new and I only recently added test scripts
checking the capability.  Make sure you are using
at least GDAL/OGR 1.3.1.

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list