beginner: Again MapInfo .tab .dat .id .map with white image

Frank Warmerdam warmerdam at POBOX.COM
Thu Mar 1 07:09:32 PST 2007


Julien Buratto wrote:
> ogrinfo /root/data_cd/269140.TAB -summary 269140
...
> Extent: (2365748.451000, 4851329.181000) - (2366928.857000, 4852758.777000)

...
> EXTENT 0 0 3072800 3840000
> 
> LAYER
> NAME "269140"
> TYPE RASTER
> STATUS DEFAULT
> CONNECTIONTYPE OGR
> CONNECTION "/root/dati_cd/269140.TAB"
> STYLEITEM "AUTO"
> CLASS
>       NAME "Elevation Poly 5"
>       OUTLINECOLOR 0 0 0
>       COLOR 128 128 128
> END
> END # Layer
> 
> END
> 
> When I hit "shp2img" I don't get errors, the file is generated white.
> 
> My questions are:
> 1) Could be a problem of EXTENT ?

Julien,

The EXTENT in your map is for a huge region while the actual features in
your file cover a very small region.  I would suggest starting with the
extent:

  EXTENT  2365748 4851329 2366928 4852758

> 2) Howcomes I set a non-existant file as connection and the shp2img goes
> on without errors ? Shouldn't say something like "connection file not
> found" ?

You have your layer type set as "TYPE RASTER".  I think should likely
be either TYPE LINE or TYPE POLYGON depending on the feature geometries.
For this reason it is likely that MapServer isn't even using the OGR
connection information since it does not apply to raster files.

> 3) As I have hundreds of these files, should I create a LAYER for each
> file ?

If the files are spatially distinct then you could likely prepare a
tileindex for them.  Then you would use a single layer referencing
the tileindex, and the tileindex would have the list of all the individual
files.  The ogrtindex program can be used to create such a tile index.

There are a variety of issues with tileindex, so I'd encourage you
to read up about them before trying them.

Best regards,
-- 
---------------------------------------+--------------------------------------
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    | President OSGeo, http://osgeo.org



More information about the MapServer-users mailing list