[Mapserver-users] Re: Question about MapInfo.

Daniel Morissette morissette at dmsolutions.ca
Mon Dec 15 08:06:36 PST 2003


Denis Louvegnies wrote:
> 
> According to phpInfo  the input=OGR is included. So I guest I should be able
> to open a Tab file.
> 
> However even if I can open the demo file europe.map I got the following
> error when opening a tab file :
> 
> 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)
> 


That's definitely very odd. Are you sure that the file is valid? Does 
the following command work? It should dump the coordinates/attributes of 
all the features in the file:

   ogrinfo test.tab test


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

Try using the following connection strings, just in case:

     CONNECTION "C:/tmp/ms_tmp/mapinfo/test.tab"
or
     CONNECTION "/tmp/ms_tmp/mapinfo/test.tab"

Another thing you could try would be to load and draw the mapfile using 
the mapserver/mapscript/php3/examples/the test_draw_map.phtml test 
script that comes with the MapServer source.

If none of the above works then you might have to file a bug with a copy 
of your mapfile and TAB data file to reproduce this with the 
test_draw_map.phtml.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the MapServer-users mailing list