[Mapserver-users] Raster layers are all gray

Ed McNierney ed at topozone.com
Tue Nov 11 14:54:55 EST 2003


Dan -

First, don't fiddle with world files and expect magic to happen <g>.  Your other data are in decimal degrees, and your image is in UTM, and SOMETHING has to tell MapServer that they're different.

You need to decide what projection you want to use for your output map.  MapServer can reproject raster data to a "geographic" lat/lon projection, and MapServer can reproject vector data to UTM.  Your choice - either is valid, but I do not recommend "geographic" projections because they have many limitations (e.g. you can't have an accurate scale bar in units other than degrees).  Reprojecting raster data is more time-consuming than reprojecting vector data (because there's more of it), and to do that you'll need to rebuild MapServer to disable the default TIFF support and use GDAL instead (also a good idea for many reasons).

I would recommend you read a bit on the MapServer site about projections and how to use the PROJECTION block, and I would recommend you try making your output map in UTM, leaving the raster world file the way it was, and adding PROJECTION blocks to the vector layers to identify them as being in need of reprojection from decimal degrees to UTM.  I would start by simply getting the raster layer all by itself to display properly in a UTM output map.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

-----Original Message-----
From: Dan Harris [mailto:coronadh at coronasolutions.com]
Sent: Tuesday, November 11, 2003 1:51 PM
To: 'mapserver-users at lists.gis.umn.edu'
Subject: Re: [Mapserver-users] Raster layers are all gray


Thanks very much for your responses!

Yes, you're right.  It is a Terraserver image.  However, the original 
world file was in UTM coordinates but everything else in my map is based 
on DD.  So I converted the coordinates in the world file to DD.  When I 
left them in UTM, the image didn't appear on the map anywhere, but after 
converting to DD, I saw *something* at least!  So I thought I was on the 
right track.

So if I can't mix the two, how can I remedy this?  The map file UNITS is 
DD as are all my layers and points.  Do I need to do something else to 
the world file to tell it to register as DD or do I have to get a 
different image from another source?

Thanks again for your help, I'm still a newbie with rasters.

-Dan

Ed McNierney wrote:

>Dan -
>
>Frank's right, and your map request almost certainly does not intersect the defined image.  That's because your world file is wrong.
>
>This seems to be a Microsoft TerraServer image download.  The first and fourth lines in the file seem to be plausible, if your data is 16 meters per pixel in UTM projection.  But the last two lines are certainly not UTM coordinates and appear to be decimal degrees of latitude and longitude.  You can't mix the two, and you need to correct your world file.
>
>	- Ed
>
>  
>


_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list