[Mapserver-users] Raster layer and Projection
Jan Hartmann
jhart at frw.uva.nl
Wed Dec 11 06:37:53 PST 2002
Frauke,
I saw that you changed the extents, as suggested on this list. However,
this new extent cannot be right. Extent should be set as: [minx] [miny]
[maxx] [maxy] in geographical coordinates. Your maxy is below miny;
probably you should switch the y-values
Probably you have been confused by the specification of the world file.
There are six lines:
- size of pixel in x direction
- rotation term for row
- rotation term for column
- size of pixel in y direction
- x coordinate of centre of upper left pixel in map units
- y coordinate of centre of upper left pixel in map units
The last two numbers describe the coordinates of the first pixel in the
tif-file. Seen geographically, this is the most western/most northern
position, i.e. the point with the lowest x and the HIGHEST y. In terms
of EXTENT: the [minx] and [maxy].
Coordinate systems for computer monitors (and raster files) start at the
top and proceed to the bottom, while geographical coordinates start at
the bottom (south) and increase to the top (north). The reason for this
is that a computer builds its screen moving an electron beam from upper
left to lower right. So screen coordinates also progress that way. It
would be nice for GIS if computers would beam upward (like Scotty), but
as long as that is not the case you always have to switch y when
converting from world to screen
Jan Hartmann
frauke.trurnit at gmx.de wrote:
> Jan,
> I've changed the LAYER-STATUS to DEFAULT but nothing happens.
> Frauke
>
> NAME "Raster-Stuttgart"
> STATUS ON
> EXTENT 509900 5410000 520000 5400000
> UNITS METERS
> #EXTENT 9.1351 48.8274 9.2707 48.7373
> #UNITS dd
> SIZE 500 500
> SHAPEPATH "/www/projects/raster/data/raster/"
> IMAGECOLOR 230 230 230
> IMAGETYPE GIF
>
> PROJECTION
> "init=epsg:32632"
> #proj=UTM
> #ellps=WGS84
> #datum=WGS84
> #zone=32
> #north
> #no_defs
> END
>
> WEB
> TEMPLATE "./raster.html"
> IMAGEPATH "/usr/local/httpd/htdocs/ms_temp/"
> IMAGEURL "http://172.23.71.157/ms_temp/"
> END
> ...
> LAYER
> NAME "Stuttgart-Mairs"
> DATA "stgt_d7517_70pdi.tif"
> TYPE Raster
> STATUS DEFAULT
> PROJECTION
> "init=epsg:32632"
> #proj=UTM
> #ellps=WGS84
> #datum=WGS84
> #zone=32
> #north
> #no_defs
> END
> END #layer
> END #mapfile
>
> -----Ursprüngliche Nachricht-----
> Von: Jan Hartmann [mailto:jhart at frw.uva.nl]
> Gesendet: 10 December 2002 19:07
> An: f.tr at dds.ptv.de
> Betreff: Re: [Mapserver-users] Raster layer and Projection
>
>
> Frauke,
>
> Please please please set "STATUS DEFAULT". This is a "rite de
passage" every MapServer user has to go through. Is there any
kind-hearted person who can explain why we need STATUS DEFAULT in
addition to STATUS OFF and STATUS ON? If you want to set layers on via
the URL, you can just as well use STATUS OFF in the MapFile.
>
> Jan Hartmann
>
> frauke.trurnit at gmx.de wrote:
>
>> Hello list,
>>
>> I've some problems with rasterlayer. I hava a 8bit-tif and a tfw world
>
>
> file
>
>> in the same directory. In the Browser however no map appears. What's
wrong
>> with the mapfile?
>>
>> In addition an error message appears in the Browser, if I use the
>> projection indicated down.
>> Error message:
>> msProcessProjection(): Projection library error. unknown projection id
>>
>>
>> The world file looks like that:
>
>
> this worldfile is correct- 6 digits before the decimal point is o.k.
>
>> 1.00000000000000000
>> 0.0
>> 0.0
>> -1.00000000000000000
>> 509854.76027950307 5408094.4232678544
>>
>> My mapfile:
>> NAME "Raster-Stuttgart"
>> STATUS ON
>> EXTENT 9.1351 48.8274 9.2707 48.7373
>> UNITS dd
>> SIZE 500 500
>> SHAPEPATH "/www/projects/raster/data/raster/"
>>
>> IMAGECOLOR 230 230 230
>> IMAGETYPE GIF
>>
>> #PROJECTION
>> # proj=UTM
>> # ellps=WGS84
>> # datum=WGS84
>> # zone=32
>> # north
>> # no_defs
>> #END
>>
>> WEB
>> TEMPLATE "./raster.html"
>> IMAGEPATH "/usr/local/httpd/htdocs/ms_temp/"
>> IMAGEURL "http://172.23.71.157/ms_temp/"
>> END
>>
>> #LAYER
>
>
> DEFINITIONEN---------------------------------------------------------
>
>> LAYER
>> NAME "Stuttgart"
>> DATA "stgt_d7517_unk.tif"
>> TYPE Raster
>> STATUS ON
>> END
>> END #mapfile
>>
>> Frauke Trurnit
>>
>
>
> Jan Hartmann
> Department of Geography
> University of Amsterdam
> jhart at frw.uva.nl
>
Jan Hartmann
Department of Geography
University of Amsterdam
jhart at frw.uva.nl
More information about the MapServer-users
mailing list