[Gdal-dev] Additional questions regarding PHP_OGR (Not sure if
it went through)
Daniel Morissette
dmorissette at mapgears.com
Wed Jul 26 06:28:51 EDT 2006
Ben Crane wrote:
> Hi all, I'm resending this in case it didn't get
> through...
>
Yes, your original message got through and I meant to reply but then I
forgot.
> Thanx you all for the response, I have a few more
> questions from working on it last night if you
> guys/gals don't mind?
>
> Question 1:
> Okay, so if I loaded a TAB file into the php script,
> made a physical copy of it (using php copy command),
> renamed it-would I be able to edit the copied file? Or
> would I need to go through the php_ogr code to create
> a new layer and copy the data across? I am trying to
> reduce the number of calculations being performed by
> the script to aid speed.
>
No, just copying the file won't help. It is really that MITAB only
supports reading existing files *OR* creating new files, but it doesn't
support opening existing files for update.
> Question 2:
> Does the SHP driver allow update/write of existing
> files? I don't mind making a copy of the file to work
> on, but I'd rather not...I can work in SHP or TAB file
> format.
>
I believe it does, will let Frank confirm that.
> Question 3:
> I have tried to use OGR_L_GetExtents. I had no idea
> what it meant by "psExtent - the structure in which
> the extent value will be returned." so I used a
> standard variable (since it just indicated it needed a
> container?) in it's place. It did return an object,
> but how do I actually access the 2 coordinate sets?
>
do a 'print_r(psExtent);' ... it's a PHP object with 4 member variables:
minx, miny, maxx, maxy... or is it xmin, ymin, xmax, ymax? I don't
remember but you'll find out with print_r().
> Question 4:
> Question 3 brings me to another point. Is there any
> additional information on functions and their
> parameters? Some of very simple, but there are some
> where I don't quite understand what the functions are
> actually looking for? I have the php code that comes
> with ms4w-very helpful in many cases, but doesn't have
> code for some of the smaller, less used functions.
>
The API docs at http://gdal.maptools.org/ogr/ogr__api_8h.html is really
it I think.
> Question 5:
> I currently do not have an internet connection at
> home. Is there a downloadable copy of all the OGR API
> information found on the DOxygen website?
>
I don't know if a copy is available for download somewhere, perhaps
check in the GDAL source package. If it's not there then you should be
able to generate a local copy of all the docs using the 'make docs' GDAL
makefile target (which uses doxygen).
Daniel
--
Daniel Morissette
http://www.mapgears.com/
More information about the Gdal-dev
mailing list