[mapserver-users] Can't get a raster to display... projection issue?

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu May 1 09:00:48 PDT 2014


Peter,

Some things I would do when hitting that wall:

- remove all projections blocks
- use the coordinate values from gdalinfo in your EXTENT block (lower
left & upper right)
- change to UNITS DD
- remove all other LAYERS except the problem layer
- then test with the shp2img commandline utility
(http://www.mapserver.org/utilities/shp2img.html)


-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2014-05-01, 12:43 PM, Peter Gustafson wrote:
> Hi all, this didn't help and it is still not working. (1 month later). 
> Any further suggestions?  Does anyone know of a simple, fully functional
> raster only example?  Thanks,
> 
> 
> On Tue, Apr 1, 2014 at 6:08 PM, thomas bonfort <thomas.bonfort at gmail.com
> <mailto:thomas.bonfort at gmail.com>> wrote:
> 
>     typo: epsg:3857 instead of 3587?
> 
>     --
>     thomas
> 
>     On 1 April 2014 23:53, Peter Gustafson <pgustafson at gmail.com
>     <mailto:pgustafson at gmail.com>> wrote:
>     > Hi all, I'm brand new to mapserver.
>     > (The itasca workshop map works)
>     >
>     > I can't get a raster to display. I've tried various extents and
>     projections
>     > but suspect these are the cause. The mapfile is as below
>     (IMAGEPATH and
>     > IMAGEURL are changed -- working with itasca) as well as info from
>     gdal.
>     > Your help would be greatly appreciated!
>     >
>     > Thanks,
>     > Pete
>     >
>     > MAP
>     >         NAME MyMap
>     >         STATUS ON
>     >         CONFIG "MS_ERRORFILE" "ms_error.txt"
>     >         DEBUG 5
>     >         STATUS ON
>     >         SIZE 1000 600
>     >         EXTENT -20037508.34 -20037508.34 20037508.34 20037508.34
>     >         UNITS METERS
>     >         SHAPEPATH "data"
>     >         IMAGECOLOR 255 255 255
>     >
>     >         PROJECTION
>     >                 "init=epsg:3587"
>     >         END
>     >
>     >         WEB
>     >             IMAGEPATH "/var/www/localhost/htdocs/tmp/"
>     >             IMAGEURL "tmp/"
>     >         END
>     >
>     >         LAYER
>     >                 NAME "wac-48_1_4.tif"
>     >                 DATA "wac-48_1_4.tif"
>     >                 TYPE RASTER
>     >                 TRANSFORM TRUE
>     >                 STATUS ON
>     >                 UNITS DD
>     >                 PROJECTION
>     >                         "init=epsg:4326"
>     >                 END
>     >         END
>     > END
>     >
>     > Driver: GTiff/GeoTIFF
>     > Files: data/wac-48_1_4.tif
>     > Size is 512, 512
>     > Coordinate System is:
>     > GEOGCS["WGS 84",
>     >     DATUM["WGS_1984",
>     >         SPHEROID["WGS 84",6378137,298.257223563,
>     >             AUTHORITY["EPSG","7030"]],
>     >         AUTHORITY["EPSG","6326"]],
>     >     PRIMEM["Greenwich",0],
>     >     UNIT["degree",0.0174532925199433],
>     >     AUTHORITY["EPSG","4326"]]
>     > Origin = (-95.777952659785427,49.001030999999998)
>     > Pixel Size = (0.019025026914202,-0.019025026914202)
>     > Metadata:
>     >   AREA_OR_POINT=Area
>     > Image Structure Metadata:
>     >   COMPRESSION=LZW
>     >   INTERLEAVE=PIXEL
>     > Corner Coordinates:
>     > Upper Left  ( -95.7779527,  49.0010310) ( 95d46'40.63"W, 49d 0'
>     3.71"N)
>     > Lower Left  ( -95.7779527,  39.2602172) ( 95d46'40.63"W,
>     39d15'36.78"N)
>     > Upper Right ( -86.0371389,  49.0010310) ( 86d 2'13.70"W, 49d 0'
>     3.71"N)
>     > Lower Right ( -86.0371389,  39.2602172) ( 86d 2'13.70"W,
>     39d15'36.78"N)
>     > Center      ( -90.9075458,  44.1306241) ( 90d54'27.16"W, 44d
>     7'50.25"N)
>     > Band 1 Block=512x5 Type=Byte, ColorInterp=Red
>     > Band 2 Block=512x5 Type=Byte, ColorInterp=Green
>     > Band 3 Block=512x5 Type=Byte, ColorInterp=Blue
>     >
>     >





More information about the MapServer-users mailing list