[Gdal-dev] SetField & GetExtents Query
Daniel Morissette
dmorissette at mapgears.com
Thu Aug 17 11:23:05 EDT 2006
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.
>
Did you call OGR_L_SetFeature() to write the updated feature to the
shapefile after setting the field values?
http://gdal.maptools.org/ogr/ogr__api_8h.html#a144
> 2. I have managed to get GetExtents to work, but how
> do I actually seperate the 4 coordinate pairs in the
> GetExtents object into 4 variables that I can use with
> the SVG ViewBox command...I've tried treating it as an
> array but had no joy.
>
I believe it's an associative array with 2 pairs of coordinates (not 4).
Try print_r($extent_var); to see what it contains exactly.
Daniel
--
Daniel Morissette
http://www.mapgears.com/
More information about the Gdal-dev
mailing list