On 9-Jul-08, at 12:14 PM, Bart van den Eijnden (OSGIS) wrote:

Hi list,

at least starting Mapserver 4.10 (GDAL 1.3.2) there seems to be a problem with reading empty MapInfo TAB files, whereas in the past (4.6 for sure) this used to work. Is this issue known to someone?

The error I get is:

09-Jul-2008 18:08:23] PHP Warning: [MapServer Error]: msOGRFileNextShape(): InitBlockFromData(): Invalid Block Type: got 0 expected 2 in D:\ms4w\apps\stragisweb\htdocs\common\chameleon\htdocs\common \wrapper\drawmap.php on line 533

An example TAB file can be found here:
www.osgis.nl/download/mapserver/gemgrens.zip

Best regards,
Bart

Bart,

I tried your test TAB with ms4w 2.2.7 (GDAL 1.5.0 and Mapserver 5.0.2) and: 1) ogrinfo reads the tab normally, 2) shp2img created the blank map image properly with no errors, and 3) I modified /ms4w/Apache/ htdocs/quickmap.php to point to this test mapfile and it also correctly produced a blank map image in the browser.

The key points in my test mapfile are:

...
EXTENT 149999 349999 150000 350000
UNITS METERS
...

LAYER
  NAME gemgrens
  TYPE POLYGON
  STATUS ON
  CONNECTIONTYPE OGR
  CONNECTION "./gemgrens.TAB"
  CLASS
    NAME "gemgrens"
    STYLE
      COLOR 240 240 240
      OUTLINECOLOR 199 199 199
    END
  END
END # layer


---
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to