[Chameleon] getShape w/ OGR and MapInfo Tabs
Stephan Holl
sholl at gmx.net
Tue May 10 05:09:23 EDT 2005
Hello Stephan,
On Sat, 23 Apr 2005 21:41:16 +0200 Stephan Holl <sholl at gmx.net> wrote:
> dear list,
>
> I have a problem getting shape-information with getShape() from
> Mapinfo- Tabs generated with ogr2ogr from a shapefile.
>
> 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.
>
> My Mapfile-Snippet.
> TYPE POLYGON
> STATUS ON
> CONNECTIONTYPE OGR #
> CONNECTION "/data/lka/seen_tab/seen.tab"
> CLASS
> NAME "Binnenseen"
> ...
>
> I couldn`t find similar problems at goole.
> Does anybodyy can give me a hint?!
for the record.
Frank W. pointed me to the right direction.
In order to use the Label-widget to label OCG and local layers on the
fly it is needed to change this to make mapinfo-tab-files working.
Change from
$oShape = $oLayer->getShape($nTile, 0 );
to
$oShape = $oLayer->getShape($nTile, 1 );
in LayerAttributes.php:178
Cheers
Stephan
PS: just a dirty hack...
--
Stephan Holl
Check headers for GnuPG Key!
http://www.gdf-hannover.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/chameleon/attachments/20050510/5133a0a9/attachment.bin
More information about the Chameleon
mailing list