Aerial photos

Stefanie Weykam sweykam at TELELINE.ES
Wed Jul 27 04:30:33 EDT 2005


Nhamoinesu,
this is the 'world file format' (jgw is just the same as tfw):

ESRI World File Format

Used as attribute file associated with corresponding image file.
World files consist of 6 lines, denoting the following:
sampleFile.tfw
5.000000000000	(size of pixel in x direction)
0.000000000000	(rotation term for row)
0.000000000000	(rotation term for column)
-5.000000000000	(size of pixel in y direction)
492169.690845528910	(x coordinate of centre of upper left pixel in map units)
5426523.318065105000	(y coordinate of centre of upper left pixel in map units)

If you open the image in Photoshop, PhotoEditor or similar, you may look up the image size in pixels (width and height) so that you can calculate the extension in UL, LL, LR, UR. Remember, you have the midpoint of the pixel and need to correct the values for half a pixel.
Anyway, I thing that MapServers reads the world file automatically.

As for the second question - simply echo the variable $imgURL
   $img=$map->draw(); 
   $imgURL=$img->saveWebImage();  
   echo $imgURL;

The result looks like this:
/tmp/ms_tmp/11224525985001.PNG

You can do the same with your legends and reference images...

Stefanie
------------------------------

Date:    Tue, 26 Jul 2005 17:51:18 +0100
From:    Nhamoinesu Mtetwa <nmt at CS.STIR.AC.UK>
Subject: Aerial photos

Hello there,

How do I form a mapfile base layer using Aerial photos? The files are in
pairs with extensions .jpg and .jgw

One of the .jgw has the following numbers:
0.250000
0.000000
0.000000
-0.250000
166000.000000
45000.000000

which I think are the extent values but I am not sure.

The other question is that: is there anyway of getting the name of the
image that CGI program mapserv creates when one is in browse mode?

Cheers,

Nhamo.

-- 
The University of Stirling is a university established in Scotland by
charter at Stirling, FK9 4LA.  Privileged/Confidential Information may
be contained in this message.  If you are not the addressee indicated
in this message (or responsible for delivery of the message to such
person), you may not disclose, copy or deliver this message to anyone
and any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.  In such case, you should destroy this
message and kindly notify the sender by reply email.  Please advise
immediately if you or your employer do not consent to Internet email
for messages of this kind.

------------------------------



More information about the mapserver-users mailing list