[Mapserver-users] PHP MapScript and MapInfo files error

Denis Louvegnies denis at louvegnies.com
Fri Dec 12 14:09:52 PST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_00C8_01C3C105.0C650490
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there,

I am just starting to use MapServer. I have propertly configured =
php_mapscript_41 and run the europe exemple. Great step!!

I am now trying to open a MapInfo file and I got the following error:=20


Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named =
'test'. in c:\program =
files\easyphp1-7\www\mapserver\tutorial\example_mi.php on line 10

Warning: [MapServer Error]: msOGRFileOpen(): Open failed for OGR =
connection `C:\tmp\ms_tmp\mapinfo\test.TAB'. File not found or =
unsupported format. in c:\program =
files\easyphp1-7\www\mapserver\tutorial\example_mi.php on line 10


The TAB file is very basic, just one layer. If I run the ogrinfo tool :

C:\tmp\ms_tmp\mapinfo>ogrinfo test.tab
Had to open data source read-only.
INFO: Open of `test.tab'
using driver `MapInfo File' successful.
1: test (Polygon)


And the map file is :

NAME FIRSTMAP
SIZE 400 400
STATUS ON

SYMBOLSET "C:\tmp\ms_tmp\font\symbols_mapinfo.sym"
EXTENT -5696501 1923039 5696501 11022882
UNITS METERS


WEB
  IMAGEPATH "/tmp/ms_tmp/"=20
  IMAGEURL "/ms_tmp/"
END

LAYER
    NAME "test"
    TYPE POLYGON
    CONNECTIONTYPE OGR
    CONNECTION "C:\tmp\ms_tmp\mapinfo\test.TAB"
    STATUS ON
   =20
    CLASS
       END
END
END



Any clue ?

Thank you very much for your help !!

Denis
------=_NextPart_000_00C8_01C3C105.0C650490
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi there,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am just starting to use MapServer. I =
have=20
propertly configured php_mapscript_41 and run the europe exemple. Great=20
step!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am now trying to open a =
MapInfo file=20
and I got the following error: </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><FONT size=3D3><FONT=20
face=3D"Times New Roman"><STRONG>Warning</STRONG>: [MapServer Error]: =
msDrawMap():=20
Failed to draw layer named 'test'. in <B>c:\program=20
files\easyphp1-7\www\mapserver\tutorial\example_mi.php</B> on line=20
<B>10</B><BR><BR><B>Warning</B>: [MapServer Error]: msOGRFileOpen(): =
Open failed=20
for OGR connection `C:\tmp\ms_tmp\mapinfo\test.TAB'. File not found or=20
unsupported format. in <B>c:\program=20
files\easyphp1-7\www\mapserver\tutorial\example_mi.php</B> on line=20
<B>10</B></FONT></FONT><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The TAB file is very basic, just one =
layer. If I=20
run the ogrinfo tool :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>C:\tmp\ms_tmp\mapinfo>ogrinfo =
test.tab<BR>Had to=20
open data source read-only.<BR>INFO: Open of `test.tab'<BR>using driver =
`MapInfo=20
File' successful.<BR>1: test (Polygon)<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>And the map file is :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>NAME FIRSTMAP<BR>SIZE 400 400<BR>STATUS =

ON</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>SYMBOLSET=20
"C:\tmp\ms_tmp\font\symbols_mapinfo.sym"<BR>EXTENT -5696501 1923039 =
5696501=20
11022882<BR>UNITS METERS</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><BR>WEB<BR>  IMAGEPATH =
"/tmp/ms_tmp/"=20
<BR>  IMAGEURL "/ms_tmp/"<BR>END</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>    NAME=20
"test"<BR>    TYPE POLYGON<BR>    =
CONNECTIONTYPE=20
OGR<BR>    CONNECTION=20
"C:\tmp\ms_tmp\mapinfo\test.TAB"<BR>    STATUS=20
ON<BR>    <BR>   =20
CLASS<BR>       END<BR>END</FONT><FONT =
face=3DArial=20
size=3D2><BR>END</DIV></FONT>
<DIV><FONT face=3DArial size=3D2> </DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Any clue ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you very much for your help =
!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Denis</DIV></FONT></BODY></HTML>

------=_NextPart_000_00C8_01C3C105.0C650490--




More information about the MapServer-users mailing list