[Mapserver-users] Using OGR with tab files

Frank Warmerdam warmerdam at pobox.com
Mon Oct 20 08:48:38 PDT 2003


Phil Maskell wrote:
> Hi,
> 
> I have set MapServer 4.0 up with the demo, I have used OGR to load a
> POLYGON type layer from a tab, but cannot get it to work with LINE or
> POINT.
> 
...
> # This doesn't work
> LAYER
> 	NAME Motorways
> 	TYPE LINE
> 	STATUS DEFAULT
> 	CONNECTIONTYPE OGR
> 	CONNECTION "data/Motorways.TAB"
> 	STYLEITEM "AUTO"
> 	CLASS
> 		NAME "Motorways"
> 	END
> 	PROJECTION
> 		"AUTO"
> 	END
> END # Layer

Phil,

In what way does it not work?  You just don't see any features drawn?

I would suggest:

  o Examine the file in question with ogrinfo and ensure the feature are
    actually displayed as LINESTRINGs.  "eg. ogrinfo -ro -al data/Motorways.TAB"

  o Also verify that the bounds reported by ogrinfo make sense.

  o Try removing the STYLEITEM "AUTO" and see if you get anything with default
    coloring.  You might have to set a color in your CLASS.

Good luck,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the MapServer-users mailing list