Help with rasters

Bart van den Eijnden (OSGIS) bartvde at OSGIS.NL
Fri Oct 20 12:49:14 EDT 2006


First of all, change:

DATA "rasterindex"

into:

TILEINDEX "rasterindex"

Best regards,
Bart

Jeff Dege schreef:
> A customer has sent us a bunch of mapdata, to see if we can make any
> sense from it.  I've been messing around with mapserver for a while,
> now, and I've figured out how to work some of its capabilities, but this
> is my first attempt to handle rasters.
>
> The data set has four sets of shape files, three of which are
> point/line/polygon data and the fourth which seems to be a tileindex for
> the thousands of jpg and jgw files.
>
> I'm starting simple - writing a map file and trying to get a map image
> using shp2img.  I have no problem doing this with the three
> point/line/polygon layers.  But I've not been able to do this with the
> raster data.
>
> I can run gdalinfo on the jpg files:
>
>   Driver: JPEG/JPEG JFIF
>   Size is 1610, 1609
>   Coordinate System is `'
>   Origin = (-93.112361,44.933805)
>   Pixel Size = (0.00001279,-0.00000900)
>   Corner Coordinates:
>   Upper Left  ( -93.1123608,  44.9338046)
>   Lower Left  ( -93.1123608,  44.9193245)
>   Upper Right ( -93.0917678,  44.9338046)
>   Lower Right ( -93.0917678,  44.9193245)
>   Center      ( -93.1020643,  44.9265646)
>   Band 1 Block=1610x1 Type=Byte, ColorInterp=Red
>   Band 2 Block=1610x1 Type=Byte, ColorInterp=Green
>   Band 3 Block=1610x1 Type=Byte, ColorInterp=Blue
>
> I can run gdaltindex to create my own tileindex shape file:
>
>   gdaltindex  \\server\share\test\data\rasterindex
> \\server\share\test\data\data\*.jpg
>
> And I can run ogrinfo on the generated shapefile:
>
>   INFO: Open of `\\server\share\app\data'
>   using driver `ESRI Shapefile' successful.
>
>   Layer name: rasterindex
>   Geometry: Polygon
>   Feature Count: 683
>   Extent: (-93.338884, 44.455961) - (-92.721094, 44.933805)
>   Layer SRS WKT:
>   (unknown)
>   location: String (255.0)
>
> But when I run shp2img, I get nada.  With DEBUG=ON:
>
>   Unable to open file rasterindex for layer A ... ignoring this missing
> data.
>   msDrawMap(): Layer 0 (A), 0.000s
>   msDrawMap(): Drawing Label Cache, 0.000s
>   msDrawMap() total time: 0.000s
>
> The rastedindex shape files (.dbf, .shp, and .shf) files are in the same
> directories as the other point/line/polygon shape files that I've been
> able to successfully draw layers with using this mapfile.  Ogrinfo has
> no trouble accessing the file.
>
> The underlying .jpg files are in the same directory, and gdalinfo and
> gdaltindex had no trouble opening them.
>
> The layer in the mapfile itself is pretty simple:
>
>   LAYER
>     NAME "A"
>     TYPE RASTER
>     STATUS ON
>     DATA "rasterindex"
>   END
>
> Any hints as to what I'm doing wrong?
>
>
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl



More information about the mapserver-users mailing list