Opened 18 years ago

Last modified 14 years ago

#1700 closed defect

OGR tileindex source-files incorrectly opened as shapefile — at Initial Version

Reported by: jacob.delfos@… Owned by: mapserverbugs
Priority: high Milestone: 6.0 release
Component: MapScript-PHP Version: 4.8
Severity: blocker Keywords:
Cc: mapserver@…

Description

I have created a tileindex of DGN files. It works fine in the Mapserver CGI
(same version), but in PHP_Mapscript the layer causes fatal errors. The PHP log
says things like:

******************************************
[20-Feb-2006 14:45:49] PHP Warning:  [MapServer Error]: msTiledSHPOpenFile():
Unable to open a single tile to use as a template in layer DGNs.

 in C:\chameleon\htdocs\common\wrapper\drawmap.php on line 560 
[20-Feb-2006 14:45:49] PHP Warning:  [MapServer Error]: msSHPOpenFile():
(c:/data/hongkong/10nwb.dgn) 
 in C:\chameleon\htdocs\common\wrapper\drawmap.php on line 560 
******************************************


I based my layer definition on:
http://mapserver.gis.umn.edu/docs/howto/ogr_howto/#tileindex-with-ogr


My Layer definition is:

******************************************
LAYER 
  NAME "DGNs" 
  TYPE LINE 
  STYLEITEM "AUTO" 
  CONNECTIONTYPE OGR 
  TILEINDEX "dindex.shp,0" 
  STATUS ON 
  CLASS 
     COLOR 150 150 150 
  END 
END 
******************************************


It appears that although the layer is defined as OGR, PHP_Mapscript tries to
open it as a shapefile (I guess because the tileindex is a shapefile). Testing
showed that the connectiontype returned by PHP_Mapscript is that of a shapefile,
not OGR. Bart reported having had similar problems with TAB files. I'm using
PHP_Mapscript 4.6.1 on Windows.

Jacob

Change History (0)

Note: See TracTickets for help on using tickets.