getShape w/ OGR and MapInfo Tabs

Stephan Holl holl at GDF-HANNOVER.DE
Mon May 9 01:46:53 PDT 2005


dear list,

trying on the chameleon-list I was directed to this list with more
mapserver-gurus subscribed :-)
My problem:
Using getShape () (php-mapscript) from Mapinfo-Tabs does not
fill up my boundary array.

it does not retrieve any bounds for the object:
$oLayer->open();
$oShape = $oLayer->getShape($nTile, 0 );
                $aszAttributes['name'] = $oLayer->name;
                $aszAttributes['index'] = $oLayer->index;
                $oRect = $oShape->bounds;
                $aszAttributes['minx'] = $oRect->minx;
                $aszAttributes['miny'] = $oRect->miny;
                $aszAttributes['maxx'] = $oRect->maxx;
                $aszAttributes['maxy'] = $oRect->maxy;

$oRect is alway empty when I try this on TAB-Files connected through
OGR. Using Shapes /PostGIS everything is fine.

My Mapfile-Snippet.
TYPE POLYGON
  STATUS ON
  CONNECTIONTYPE OGR #
  CONNECTION "/data/seen_tab/seen.tab"
CLASS
    NAME "Binnenseen"
...

Versions:
/usr/lib/cgi-bin/mapserv -v
MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT=EPPL7
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG

Mapscript:
($Revision: 1.220.2.2 $ $Date: 2004/12/19 22:17:59 $)

php:
PHP Version 4.3.9


I couldn`t find similar problems at google. Can anybody give some
hints?!

TIA
        Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office (TCH) -  Vahrenwalder Straße 7   -   D-30165 Hannover
Internet: www.gdf-hannover.de      -      Email: holl at gdf-hannover.de
Phone : ++49-(0)511-9357560       -          Fax: ++49-(0)511-9357100



More information about the MapServer-users mailing list