[Gdal-dev] Introducing myself and obtaining MBR geometry for TAB files

Daniel Morissette dmorissette at mapgears.com
Mon Jul 17 10:06:19 EDT 2006


Ben Crane wrote:
> 
> Question 1: I am reading MapInfo TAB files. So far so
> good, I can read the geometry and create SVG files
> from it. One thing I cannot do is get the MBR (Minimum
> Bounding Rectangle) of the data. I need to know what
> geometry frames the data so I can use it within SVG as
> part of the viewbox command. Does anyone know of the
> PHP class/function that can pick up how much "space"
> (ie, min x,y - max x,y of the dataset) the TAB vector
> data actually takes up?
> 

You should be able to get that with OGR_L_GetExtent(), see:
http://gdal.maptools.org/ogr/ogr__api_8h.html#a150


> Question 1: A bit of a mixer. I want to use AJAX
> technology to pass values back to a PHP script update
> the TAB file without needing the page refreshed (page
> refresh is optional so that the user can make several
> edits and then refresh all at once rather than having
> to refresh after every update)...I could use a
> seperate PHP script, but wondered whether it would
> work?
> 

Calling a PHP script without refreshing the page should be possible with 
AJAX, but note that the TAB driver doesn't support update of existing 
files: your PHP script would have to create a new dataset, copy the old 
features from the original file to it, and then add the new/updated 
features.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the Gdal-dev mailing list