Dan -
If you are going to mix different projections in a mapfile,
you need to tell MapServer what's going on. It looks like you have a good
PROJECTION description for your input raster layer, and you seem to want the
same output projection used in the map image itself. That's fine.
But you are now creating a point layer with a DIFFERENT projection, but you're
not doing anything that would let MapServer know that.
You need three PROJECTION blocks - one at the top level
(just below the EXTENT and UNITS is fine) to tell MapServer what output
projection you're using (the stereographic one you've defined below). And
you need that same PROJECTION block in the raster layer to tell MapServer that
that's the input projection for that layer. And you then need a third one
in the point layer to tell MapServer that the coordinates you're using for that
layer are NOT in the stereographic projection but are in lat/lon degrees.
That is, a block like:
PROJECTION
"proj=latlong"
"datum=WGS84'
END
Then MapServer will know that it needs to reproject that
input projection to the same output projection used in the output
image.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com /
Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford,
MA 01863
[EMAIL PROTECTED]
(978) 251-4242
From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of d c
Sent: Friday, May 05, 2006 10:44 AM
To: [email protected]
Subject: Re: [UMN_MAPSERVER-USERS] Raster image doesn't show
This is the extent of my map:
EXTENT -3174450 -2816050 2867175 2406325
UNITS METERS
I'm trying to display a point element on a geotiff raster file, as follows (Note the decimal degree format):
LAYER
TYPE POINT
STATUS DEFAULT
FEATURE
POINTS
56.5333333 -71.5 # <------- DD
END
TEXT "HELLO WORLD"
END
CLASS
COLOR 255 0 0
SYMBOL 'cross'
LABEL
TYPE bitmap
END
END
TOLERANCE 5
END
The label, according to the coordinates given, sometimes appears, sometimes does not and most often
on the same (erroneous) spot.
I tried to change the EXTENT (and UNITS) to decimal degrees according to the output of gdalinfo which outputs corner coordinates both in meters and decimal degrees. I thought I could this way make Mapserver understand I was specifying the input in decimal degrees so it should output correctly the point I want to draw. The scalebar also revealed seriously confused.
I did not mention that the map is of Antarctica. This apparently complicates the matter since the EXTENT values are different than on most maps.
I'm new to this so I haven't got much knowledge about projections. The following two I have used successfully in displaying the map (but not the point):
PROJECTION
"proj=stere"
"ellps=WGS84"
"datum=WGS84"
"lon_0=0"
"lat_0=-90"
"lat_ts=-71"
"units=m"
END
PROJECTION
"init=esri:102021"
END
Thanks for your help,
Dan
2006/5/5, Ed McNierney <[EMAIL PROTECTED]>:
D C -The UNITS and EXTENT in your mapfile need to correspond to the units used in the projection of your data. If they don't, then you're looking to reproject the data and there's some extra work you need to do.gdalinfo will tell you the units and extent in the data source's native projection. Changing those values in the mapfile won't change the input data, and you're simply requesting an output image that doesn't correspond to any part of your input data, so you (correctly) get nothing displayed.What is it you're trying to do? Are you trying to display the image in a different projection than the raster source image is using? If so, what projection does the raster use and what output projection do you want?- EdEd McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
[EMAIL PROTECTED]
(978) 251-4242
From: UMN MapServer Users List [mailto:[email protected]] On Behalf Of d c
Sent: Friday, May 05, 2006 5:54 AM
To: [email protected]
Subject: [UMN_MAPSERVER-USERS] Raster image doesn't showHello,
I just changed the EXTENT of my mapfile which was in METERS to DD.
I just wrote down the corresponding decimals which were given by gdalinfo.
BEFORE
--------------
UNITS METERS
EXTENT -3174450 -3225675 2867175 2815950
AFTER
-----------
UNITS DD
EXTENT -131.5 -56.5 134 -52.3
nb: the map is a raster im. of antarctica
The PROBLEM now is that THE MAP DOESN'T SHOW.
I don't get an error or anything, the map just doesn't show.
Any suggestions?
Thanks in advance.
