[Mapserver-users] OGR MapInfo tab {Scanned}

Siki Zoltan siki at agt.bme.hu
Sat May 22 15:21:23 PDT 2004


Hi folks,

I would like to use MapInfo tab layers in mapserver.
Running Mapserver on a linux box everything is OK, but I have to use a 
windows box.

A get the following from mapserver:
msDrawMap(): Image handling error. Failed to draw layer named 'telek'. 
msOGRFileOpen(): OGR error. Open failed for OGR connection `c:/Program Files/Apache Group/Apache2/htdocs/xxii/teljes/telek.TAB'. File not found or unsupported format. 

Using ogrinfo on the same file I got:
ogrinfo "c:\Program Files\Apache Group\apache2\htdocs\xxii\teljes\telek.tab"
Had to open data source read-only.
INFO: Open of `c:\Program Files\Apache Group\apache2\htdocs\xxii\teljes\telek.tab'
using driver `MapInfo File' successful.
1: telek (Polygon)

OGR is supported:
mapserv.exe -v
MapServer version 4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ 
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

If I convert the tab file into esri shape then everything is OK.
I have tried relative and absolute path in the connection string.
Any idea?

Thanks
Zoltan

My Map file:

NAME budafok
EXTENT 642000 225000 651000 234000
SIZE 600 600
IMAGETYPE png
SHAPEPATH "c:/Program Files/Apache Group/Apache2/htdocs/xxii"
FONTSET "c:/Program Files/Apache Group/Apache2/htdocs/xxii/fonts.lst"
SYMBOLSET "c:/Program Files/Apache Group/Apache2/htdocs/xxii/xxii.sym"
UNITS meters

WEB
	TEMPLATE "xxii_template.html"
	IMAGEPATH "c:/Program Files/Apache Group/Apache2/htdocs/xxii/tmp/"
	IMAGEURL "/xxii/tmp/"
	HEADER "xxii_header.html"
	FOOTER "xxii_footer.html"
	MAXSCALE 100000
	MINSCALE 100
END

#
SCALEBAR
	IMAGECOLOR 0 0 255
	LABEL
		COLOR 0 0 0
		SIZE TINY
	END
	STYLE 0
	SIZE 350 10
	COLOR 0 0 0
	OUTLINECOLOR 0 0 0
	UNITS METERS
	INTERVALS 5
	TRANSPARENT TRUE
	STATUS TRUE
END

# overview map
REFERENCE
	IMAGE xxiiref.png
	EXTENT 642380 225000 650400 234000
	SIZE 325 363
	STATUS ON
	COLOR -1 -1 -1
	OUTLINECOLOR 255 0 0
END

#
LEGEND
    KEYSIZE 16 12
    LABEL
        TYPE BITMAP
        SIZE TINY
        COLOR 0 0 0
    END
    STATUS ON
END

# photos
LAYER
	NAME "raszter2002"
	TILEINDEX "raszter/2002/raszter2002.shp"
	TILEITEM "Location"
#	MINSCALE 999
	STATUS ON
	TYPE RASTER
END

# parcelsB
LAYER
	NAME "telek"
	CONNECTIONTYPE OGR
	CONNECTION "c:/Program Files/Apache Group/Apache2/htdocs/xxii/teljes/telek.tab"
	DATA "teljes/telek.shp"
	STATUS ON
	GROUP "telkek"
	TYPE POLYGON
	CLASSITEM KOZTER_KOD
	CLASS
		EXPRESSION /0/
		NAME 'Magánterület'
		COLOR -1 -1 -1
		OUTLINECOLOR 0 0 0
		TEMPLATE "telek_cim.html"
	END
	CLASS
		EXPRESSION /[12]/
		NAME 'Közterület'
		COLOR 198 198 198
		OUTLINECOLOR 0 0 0
		TEMPLATE "telek_cim.html"
	END
	HEADER "telek_cim_header.html"
	FOOTER "telek_cim_footer.html"
END

END # end of map file




More information about the MapServer-users mailing list