getShape w/ OGR and MapInfo Tabs

Frank Warmerdam fwarmerdam at GMAIL.COM
Mon May 9 11:20:04 EDT 2005


On 5/9/05, Stephan Holl <holl at gdf-hannover.de> wrote:
> 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.

Stephan, 

I looked through mapogr.cpp and there is no obvios reasons
why shapeObj's read through OGR would not have their
bounds set properly.  When you say that the extents
are set fine with shapefiles or PostGIS do you mean accessing
the shapefiles or PostGIS through OGR or using the direct support
for these types in MapServer? 

I would suggest that you submit a bug report via bugzilla
including the a sample data file, and a minimal script demonstrating
your problem. 

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 mapserver-users mailing list