How to define EXTENT
Banister Trevor
TBanister at SpaceImaging.com
Fri Sep 17 11:33:17 PDT 1999
That logic looks good to me. Just make sure that any shape files you plan to
use on top of the image are also encoded (or reprojected with PROJ.4) in DD.
One debugging technique I've used is to repetitively zoom out if I can't see
my map, eventually a few dots appear and I can zoom back in to see what went
wrong. The extents are coded into the URL, so you can check to see if the
map server agrees with your calculations.
Trevor
-----Original Message-----
From: Mark Cady [mailto:mcady at clh.net]
Sent: Friday, September 17, 1999 11:34 AM
To: Banister Trevor
Cc: Mapserver Users
Subject: Re: How to define EXTENT
Thanks Trevor:
Lets see if I understand it now!
My trusty sectional is a paper map that non instrument rated pilots
use for navigation.
It did not come with a "world file" but it is at a 1:1,000,000 scale and
has navigation aids, roads, lakes, etc. on it.
Would this example cover one fourth of the world in decimal degrees?
(North of the equator and east of England)
0.16666667535901 - distance of one unit (pixel?)in the positive
direction (East)
0.0 - max X
0.0 - min Y
-0.16666667535901 - distance of one unit (pixel?) in the negative
direction ( West)
-179.91666666232049 - Min X
89.91667605005205 - Max Y
If I want to create a map of aprox. the area of Minneapolis/St. Paul
the EXTENT would be
(I'll show my work)
>From my paper map (Twin Cities Sectional - for you pilots)
Lat Lon
NW corner is 45.5 N and 94W
NE corner is 45.5 N and 92.5W
SW corner is 44.5N and 94W
SE corner is 44.5N and 92.5W
EXTENT [xmin] [ymin][xmax][ymax]
EXTENT [94W][44.5N][92.5W][45.5N]
EXTENT[-94.000][44.500][-92.500][45.500]
for the .map file
EXTENT -94.000 44.500 -92.500 45.500
for the world file that goes with my raster layer ( mark.tif - if it
was 600 X 600 pixels)
0.0025 - distance of one unit (pixel?)in the positive direction
(East) (94 - 92.5 ) / 600
-92.500 - Max X
44.500 - Min Y
-0.0025 - distance of one unit (pixel?) in the negative direction (
West) (94- 92.5) / 600
-94.00 - Min X
45.500 - Max Y
Thanks for your help
Mark C.
More information about the MapServer-users
mailing list