<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [mapserver-users] hints wanted</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Marian,</FONT>
</P>

<P><FONT SIZE=2>Good news: Mapserver can do what you want!</FONT>
</P>

<P><FONT SIZE=2>Shapefiles are vector data - point, line and polygon co-ordinates. They are different from rasters (images - like JPGs) so they are not essential.</FONT></P>

<P><FONT SIZE=2>What you need to create is a 'world file' for each of your JPGS to reference it your chosen co-ordinate system. World files are described in the Mapserver HOWTO for rasters, but basically use:</FONT></P>

<P><FONT SIZE=2>X pixel size in your co-ordinate system</FONT>
<BR><FONT SIZE=2>0.0</FONT>
<BR><FONT SIZE=2>0.0</FONT>
<BR><FONT SIZE=2>Y pixel size in your co-ordinate system (usually minus if the origin is top-left)</FONT>
<BR><FONT SIZE=2>X co-ordinate of top-left</FONT>
<BR><FONT SIZE=2>Y co-ordinate of top-left</FONT>
</P>

<P><FONT SIZE=2>So if your map top-left is at 100,100 in your co-ordinates and each pixel represents 5 meters then use:</FONT>
</P>

<P><FONT SIZE=2>5.0</FONT>
<BR><FONT SIZE=2>0.0</FONT>
<BR><FONT SIZE=2>0.0</FONT>
<BR><FONT SIZE=2>-5.0</FONT>
<BR><FONT SIZE=2>100.0</FONT>
<BR><FONT SIZE=2>100.0</FONT>
</P>

<P><FONT SIZE=2>Create this as a text file - just those six lines - and save it with the same filename as the JPG but a .WLD or .JGW extension.</FONT></P>

<P><FONT SIZE=2>Then use a very simple map file like the one below. You could add 'MINSCALE' and 'MAXSCALE' properties if you want to set one or other so they only appear at a given scale, perhaps.</FONT></P>

<P><FONT SIZE=2>I hope this gives you some pointers. Good luck with Mapserver!</FONT>
</P>

<P><FONT SIZE=2>Matt Hatcher.</FONT>
</P>

<P><FONT SIZE=2>---- map.map ----</FONT>
<BR><FONT SIZE=2>NAME MAP</FONT>
<BR><FONT SIZE=2>STATUS ON</FONT>
<BR><FONT SIZE=2>SIZE 600 350&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # set size of output image</FONT>
<BR><FONT SIZE=2>UNITS METERS</FONT>
<BR><FONT SIZE=2>SHAPEPATH &quot;data&quot;</FONT>
<BR><FONT SIZE=2>IMAGECOLOR 255 255 255&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # set background colour of image</FONT>
<BR><FONT SIZE=2>IMAGETYPE jpeg</FONT>
<BR><FONT SIZE=2>IMAGEQUALITY 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # only appropriate for jpeg output</FONT>
</P>

<P><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># Projection definition</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2>PROJECTION</FONT>
<BR><FONT SIZE=2>&nbsp; &quot;init=epsg:4326&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # set this to whatever, maybe just 'geographic'</FONT>
<BR><FONT SIZE=2>END</FONT>
</P>

<P><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># Start of web interface definition</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2>WEB</FONT>
<BR><FONT SIZE=2>&nbsp; TEMPLATE template.html</FONT>
<BR><FONT SIZE=2>&nbsp; IMAGEPATH &quot;d:\Inetpub\wwwroot\tmp\&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; IMAGEURL &quot;/tmp/&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; METADATA</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; WMS_TITLE &quot;title&quot;</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; WMS_ABSTRACT &quot;abstract&quot;</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; WMS_ACCESSCONSTRAINTS none</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp; # change this value to match your setup</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; WMS_ONLINERESOURCE &quot;<A HREF="http://localhost" TARGET="_blank">http://localhost</A>&quot;</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp; WMS_SRS &quot;EPSG:4326&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; END</FONT>
<BR><FONT SIZE=2>END</FONT>
</P>

<P><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># Layers</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2>LAYER</FONT>
<BR><FONT SIZE=2>&nbsp; NAME &quot;map1&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; TYPE RASTER</FONT>
<BR><FONT SIZE=2>&nbsp; STATUS OFF</FONT>
<BR><FONT SIZE=2>&nbsp; DATA &quot;map1.jpg&quot;</FONT>
</P>

<P><FONT SIZE=2>&nbsp; CLASS</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; NAME &quot;Map1&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; END</FONT>
</P>

<P><FONT SIZE=2>END</FONT>
</P>

<P><FONT SIZE=2>LAYER</FONT>
<BR><FONT SIZE=2>&nbsp; NAME &quot;map2&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; TYPE RASTER</FONT>
<BR><FONT SIZE=2>&nbsp; STATUS OFF</FONT>
<BR><FONT SIZE=2>&nbsp; DATA &quot;map2.jpg&quot;</FONT>
</P>

<P><FONT SIZE=2>&nbsp; CLASS</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp; NAME &quot;Map2&quot;</FONT>
<BR><FONT SIZE=2>&nbsp; END</FONT>
</P>
<BR>

<P><FONT SIZE=2>END # Map File</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Marian Grigoras [<A HREF="mailto:marian.grigoras@mchp.siemens.de">mailto:marian.grigoras@mchp.siemens.de</A>]</FONT>
<BR><FONT SIZE=2>Sent: 21 August 2002 10:01</FONT>
<BR><FONT SIZE=2>To: mapserver-users@lists.gis.umn.edu</FONT>
<BR><FONT SIZE=2>Subject: [mapserver-users] hints wanted</FONT>
</P>
<BR>

<P><FONT SIZE=2>Hello,</FONT>
</P>

<P><FONT SIZE=2>I am a new user of MapServer. I managed to run the demo and made a few</FONT>
<BR><FONT SIZE=2>easy programs by myself using the tutorial data.</FONT>
<BR><FONT SIZE=2>I want to configure a very simple map server that uses JPG (GIF or other</FONT>
<BR><FONT SIZE=2>image file), but I do not have the maps in shapefile format. I only need</FONT>
<BR><FONT SIZE=2>to specify they position relative to one another, or relative to a</FONT>
<BR><FONT SIZE=2>general coordinate system, no matter which one it is (what I mean is</FONT>
<BR><FONT SIZE=2>that I need the map server running on a campus level, so I do not care</FONT>
<BR><FONT SIZE=2>for global lat/lon coordinates or similar). Basically I would like to be</FONT>
<BR><FONT SIZE=2>able to toggle between 2 maps (JPGs) according to the zoom level and do</FONT>
<BR><FONT SIZE=2>some cropping on the selected map.</FONT>
<BR><FONT SIZE=2>MapServer looks great, but (there had to be a BUT :-) ) unfortunately I</FONT>
<BR><FONT SIZE=2>do not have time to invest 1 week in parsing the tutorial and the whole</FONT>
<BR><FONT SIZE=2>documentation just to find out that MapServer cannot handle this case</FONT>
<BR><FONT SIZE=2>(in 1 week I could write a small server by my own).</FONT>
<BR><FONT SIZE=2>So could someone more experienced:</FONT>
<BR><FONT SIZE=2>- at least tell me if MapServer could handle my application,</FONT>
<BR><FONT SIZE=2>- at most :-) give some hints on the easiest way to implement this</FONT>
<BR><FONT SIZE=2>(REFERENCE maps or something else)</FONT>
</P>

<P><FONT SIZE=2>Sorry if this looks trivial, but I need some information fast.</FONT>
<BR><FONT SIZE=2>Thanks a lot.</FONT>
</P>

<P><FONT SIZE=2>Marian Grigoras</FONT>
</P>

<CODE><FONT SIZE=3><BR>
<BR>
**********************************************************************<BR>
The information contained in this email and any subsequent<BR>
 correspondence is private and is intended solely for the <BR>
intended recipient(s). For those other than the intended<BR>
 recipient(s) any disclosure, copying, distribution, or any <BR>
action taken or omitted to be taken in reliance on such <BR>
information is prohibited and may be unlawful.<BR>
**********************************************************************<BR>
</FONT></CODE>
</BODY>
</HTML>