<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3492" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>You have decided to take the most rocky road that
exists. Georeferencing scanned paper maps is not extra easy and I have not
seen many good, easy to use free utilities for doing that. If you just want
to learn Mapserver I would recommend you to acquire some ready, georeferenced
images to start with. But if you are not afraid then just go
ahead.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>First, your Mapserver map will remain empty because
your output extents are </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>EXTENT -2200000 -712631 3072800 3840000<BR> UNITS
DD</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>while all your scanned maps have their upper left
corner at point zero, zero</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>Upper Left (
0.0, 0.0)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>By the way, unit DD in the mapfile means
decimal degrees but judged by number values in extent line I guess
that they mean meters.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>What you should do is to georeference your scanned
images. It means that in some way you must tell Mapserver what place on
Earth the images are presenting. In most simple case giving coordinates of
one corner and pixel sizes in east-west and south-north direction is
enough. That is the information that ESRI style world file is giving.
For scanned maps it may not give very good results because images are more
or less rotated. Therefore more ground control points (GCP)
would be needed. If the original map has coordinate grid then finding good GPSs
is easy. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>A rather simple to use georeferencing utility that I
have tried is available as Quantum GIS plugin. Unfortunately it did not do
very good job for me but it may have been improved since then. I have been
mostly feeding coordinates manually for gdal_translate utility
and warped images then to target projection with gdalwarp but I wouldn't
say that its a great pleasure to work like that. Combining the user
interface of QGis and gdal_translate-gdalwarp chain would give rather a nice
tool for georeferencing.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>Or maybe the same functionality could be added to
OpenEV that comes with FWTools package.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>By the way, most simple way to get your scanned image
visible is to adjust mapfile extents to suit your imagery there around point
0,0. No other data would suit with your image but at least you can see
that the system works.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009>-Jukka Rahkonen-</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=399054411-20012009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>Lähettäjä:</B> Muizudeen
Kusimo [mailto:devboyng@gmail.com] <BR><B>Lähetetty:</B> 20. tammikuuta 2009
13:43<BR><B>Vastaanottaja:</B> Rahkonen Jukka; vtammineni@roulacglobal.com;
mapserver-users@lists.osgeo.org<BR><B>Aihe:</B> Re: [mapserver-users] Need Help
with Custom (Raster) Data as Input<BR></FONT><BR></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>Dear Rahkonen,<BR><BR>Thank you for your mail, it was very
helpful.<BR><BR>I have done the following:<BR><BR>1) Converted my .jpeg files
to .tif and run the gdaltindex program to georeference them. It returned a
.shp, .shx and .dbf files. But I don't have any .tfw file yet. Please see
output of GDALTINDEX below.<BR><BR>2) I tested my .map file with the shp2img
utility and it generated a blank (white) .png file for me. Expectedly, the
same blank file displays as blank in the browser (i.e. Ka-Map UI).<BR><BR>My
new questions:<BR><BR>1) My maps were scanned from a paper map, does this
affect my ability to Georeference them? <BR>2) How do I determine the
Projection of the scanned map images?<BR><BR>Thanks.<BR><BR>GDALTINDEX OUTPUT
(condensed):<BR>==========================<BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">C:\ms4w\Apache\cgi-bin>gdalinfo
c:\ms4w\apps\test\tmp\pg19.tif</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Driver: GTiff/GeoTIFF</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Files:
c:\ms4w\apps\test\tmp\pg19.tif</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Size is 1098, 1696</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Coordinate System is `'</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Metadata:</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">
TIFFTAG_XRESOLUTION=200</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">
TIFFTAG_YRESOLUTION=200</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> TIFFTAG_RESOLUTIONUNIT=2
(pixels/inch)</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Image Structure Metadata:</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> COMPRESSION=LZW</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> INTERLEAVE=BAND</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Corner Coordinates:</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Upper Left
( 0.0, 0.0)</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Lower Left
( 0.0, 1696.0)</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Upper Right (
1098.0, 0.0)</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Lower Right ( 1098.0,
1696.0)</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Center
( 549.0, 848.0)</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">Band 1 Block=1098x8 Type=Byte,
ColorInterp=Palette</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> Color Table (RGB with 256
entries)</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> 0:
0,0,0,255</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> 1:
165,171,167,255</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> 2:
255,197,98,255</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> 3:
239,168,102,255</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> 4:
206,150,75,255</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">
.</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> . #removed
to conserve space</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">
.</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> 255:
177,169,148,255</SPAN><BR style="FONT-FAMILY: courier new,monospace"><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">C:\ms4w\Apache\cgi-bin></SPAN><BR><BR>The
test.map file I used:<BR>=================<BR><SPAN
style="FONT-FAMILY: courier new,monospace">MAP</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> NAME test</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> STATUS ON</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> SIZE 1280 1280</SPAN><SPAN
style="FONT-FAMILY: courier new,monospace"></SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> EXTENT -2200000 -712631
3072800 3840000</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> UNITS DD</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> #IMAGECOLOR 255 255
255</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> IMAGETYPE JPEG</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> WEB</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> IMAGEPATH
"c:\ms4w\apps\test\tmp\"</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> IMAGEURL
"c:\ms4w\apps\test\"</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> END</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> LEGEND</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> TRANSPARENT
TRUE</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> END</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> SCALEBAR</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> TRANSPARENT
TRUE</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> END</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> LAYER</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> NAME "My Sample
Location"</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> TYPE RASTER</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> STATUS ON</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> TILEINDEX
"tmp\pg19.shp"</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> TILEITEM
"Location"</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> END</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">END #MAP END</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><BR><BR>@Venkat<BR><BR>I hope my
mail gives a clearer picture of my status for your further
advice.<BR><BR>Thanks.<BR><BR>
<DIV class=gmail_quote>On Tue, Jan 20, 2009 at 1:04 AM, Rahkonen Jukka <SPAN
dir=ltr><<A
href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>First of
all your jpeg files need to be georeferenced. Jpeg files are most
often georeferenced with world files which are named as .jgw.
Sometimes they are named as .tfw, even that name is actually reserved for
tiff files. And Mapserver understands also world files named as
.wld.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>If your
images are georeferenced you can continue to building one single layer from
all of your images. It is done with gdaltindex utility program.
Gdaltindex is building a shapefile that records the extents of all the
images to be indexed.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>Third
step is to make a new raster layer that is using the shapefile index as a
catalogue for finding the actual image files that needs to be opened when
user is requesting a map from a certain area.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>This
should be enough to show you images as a single layer. It would be a
benefit to know the projection where the images are because otherwise they
cannot be reprojected. And for optimising performance it may be good
to convert jpeg images to tiffs, but you can just start from jpegs and see
if you are happy with the speed.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>In
conclusion:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>1. Check
georeferencing and projection, gdalinfo program is a good help in
this.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>2. Make
tileindex with gdaltindex</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>3. Make
a new raster layer in mapfile referring to just created tileindex
file.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>-Jukka
Rahkonen-</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=fi dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>Lähettäjä:</B> <A
href="mailto:mapserver-users-bounces@lists.osgeo.org"
target=_blank>mapserver-users-bounces@lists.osgeo.org</A> [mailto:<A
href="mailto:mapserver-users-bounces@lists.osgeo.org"
target=_blank>mapserver-users-bounces@lists.osgeo.org</A>] <B>Puolesta
</B>Muizudeen Kusimo<BR><B>Lähetetty:</B> 20. tammikuuta 2009
10:45<BR><B>Vastaanottaja:</B> <A
href="mailto:mapserver-users@lists.osgeo.org"
target=_blank>mapserver-users@lists.osgeo.org</A><BR><B>Aihe:</B>
[mapserver-users] Need Help with Custom (Raster) Data as
Input<BR></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV></DIV>Hello Everyone,<BR><BR>I am new to MapServer, however I am
working on an application that is similar to Google Maps albeit with my
own custom maps.<BR><BR>The problem is:<BR><BR>1) I have several maps
mostly in .jpeg format and would like to use them as Data Inputs for this
Web Application. I can't seem to get it done correctly. Must I convert
these maps to a SHAPEFILE i.e. .shp or what? If so, how do I convert
them?<BR><BR>My development platform is:<BR><BR>- Microsoft Windows
XP<BR>- Ka-Map<BR>- MapServer (MS4W)<BR><BR>Thanks.<BR><BR>NB: I am
re-reading the documentation for a
solution.<BR></DIV></DIV></BLOCKQUOTE></DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>