[Mapserver-users] Reprojecting Problem

kgrootendorst at baird.com kgrootendorst at baird.com
Wed Jul 14 17:09:53 EDT 2004


This is a multipart message in MIME format.
--=_alternative 0074454185256ED1_=
Content-Type: text/plain; charset="US-ASCII"

Ed,
I did what you suggested, and the shoreline displayed fine in UTM extents.

Kevin




"Ed McNierney" <ed at topozone.com> 
07/14/2004 01:34 PM

To
<kgrootendorst at baird.com>
cc
<mapserver-users at lists.gis.umn.edu>
Subject
RE: [Mapserver-users] Reprojecting Problem






Kevin -
 
Thanks; I'd suggest next modifying the MAP file to comment out ALL 
PROJECTION blocks, and turn off all the layers except the shore line. 
You'll need to adjust the EXTENT to have the right values in UTM 
coordinates, but this should get you a UTM-output map of the shoreline. 
I'm trying to make sure that all your data is valid and is really in the 
projection you think it is.
 
    - Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

From: kgrootendorst at baird.com [mailto:kgrootendorst at baird.com] 
Sent: Wednesday, July 14, 2004 12:45 PM
To: Ed McNierney
Cc: mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] Reprojecting Problem


Ed, 
Yes, it supports proj, and the other layers look okay.  These other layers 
are in the same projection as the map object. 
The custom projection I'm using in the map is as follows: 
# Custom Lambert Conformal Conic 
<50000> +proj=lcc +lat_1=49 +lat_2=63 +lat_0=49 +lon_0=-91.86 +x_0=6200000 
+y_0=2958000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs  no_defs <> 
I've had no problems using this projection with ArcMap. 

I'm running the following: 
Mapserver 4.2 
PHP 4.3.4 
Win2000 

Kevin




"Ed McNierney" <ed at topozone.com> 
07/14/2004 10:50 AM 


To
<kgrootendorst at baird.com>, <mapserver-users at lists.gis.umn.edu> 
cc

Subject
[SPAM] - RE: [Mapserver-users] Reprojecting Problem - Email found in 
subject








Kevin - 
  
Do all your other layers look OK in the output map?  BTW, I think it's 
good practice to include a PROJECTION block in ALL layers if they're not 
all the same projection. 
  
If you run "mapserv -v" from the command line, does it show 
"SUPPORTS=PROJ"? 
  
    - Ed 
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

From: mapserver-users-admin at lists.gis.umn.edu 
[mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of 
kgrootendorst at baird.com
Sent: Wednesday, July 14, 2004 10:17 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Reprojecting Problem


Hello, 
I'm having trouble with reprojecting in Mapserver.  I'm trying to 
reproject my 'shoreline' file (defined as UTM 17N NAD83) to my map, which 
has been defined with a customized lambert conformal conic projection. 
Based on my Mapfile below, can anyone see why my data will not re-project? 
 Am I missing something?  I thought everything looked okay, but obviously 
something must be wrong! 


MAP 
 NAME "test" 
 STATUS ON 
 EXTENT 6000000 600000 9000000 1500000 
 #Minx Miny Maxx Maxy 
 SIZE 600 400 
 SHAPEPATH "./Data" 
 SYMBOLSET "./etc/symbols.sym" 
 FONTSET "./etc/fonts.txt" 
 IMAGETYPE PNG 
 UNITS METERS 
 WEB 
   IMAGEPATH "C:/Program Files/Apache Group/Apache2/htdocs/ms_tmp/" 
   IMAGEURL "/ms_tmp/" 
 END 
 PROJECTION 
   "init=epsg:50000"     #Custom LCC Projection - defined in proj/epsg 
 END 
LEGEND 
   STATUS ON 
   IMAGECOLOR 255 255 255 
   POSITION LL 
   KEYSIZE 18 12 
   KEYSPACING 5 5 
 END 
 SCALEBAR 
   STATUS ON 
   COLOR 255 255 255 
   OUTLINECOLOR 0 0 0 
   BACKGROUNDCOLOR 0 0 0 
   IMAGECOLOR 255 255 255 
   UNITS KILOMETERS 
   INTERVALS 5 
   SIZE 150 10 
   STYLE 0 
   POSITION LL 
 END 
 LAYER 
   NAME "ec_counties_LCC" 
   STATUS ON 
   DATA "./ec_counties_LCC" 
   TYPE POLYGON 
   UNITS METERS 
   SIZEUNITS PIXELS 
   CLASS 
     NAME "ec_counties_LCC" 
     TEMPLATE "ttt" 
     STYLE 
       SYMBOL 0 
       COLOR 211 255 190 
       OUTLINECOLOR 0 0 0 
     END 
   END 
 END 
 LAYER 
   NAME "New_York_County" 
   STATUS ON 
   DATA "./New_York_County" 
   TYPE POLYGON 
   #LABELITEM "NAME" 
   CLASS 
     #NAME "New_York_County" 
     TEMPLATE "ttt" 
     LABEL 
       TYPE bitmap 
       FONT "arial" 
       SIZE small 
       POSITION CC 
       COLOR 255 0 0 
     END 
     STYLE 
       SYMBOL 0 
       COLOR 252 241 207 
       OUTLINECOLOR 0 0 0 
     END 
   END 
 END 
 LAYER 
   NAME "Shoreline_UTM" 
   STATUS ON 
   DATA "./Shoreline_UTM" 
   TYPE LINE 
   UNITS METERS 
   SIZEUNITS PIXELS 
   PROJECTION 
     "init=epsg:26917"      #UTM Zone 17N NAD 83 
   END 
   CLASS 
     STYLE 
       SYMBOL 0 
       COLOR 0 0 255 
     END 
   END 
 END 
END 

Thanks. 

Kevin 

--=_alternative 0074454185256ED1_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Ed,</font>
<br><font size=2 face="sans-serif">I did what you suggested, and the shoreline
displayed fine in UTM extents.</font>
<br>
<br><font size=2 face="sans-serif">Kevin<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Ed McNierney&quot;
&lt;ed at topozone.com&gt;</b> </font>
<p><font size=1 face="sans-serif">07/14/2004 01:34 PM</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">&lt;kgrootendorst at baird.com&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">&lt;mapserver-users at lists.gis.umn.edu&gt;</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">RE: [Mapserver-users] Reprojecting
Problem</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 color=blue face="Arial">Kevin -</font>
<br><font size=3>&nbsp;</font>
<br><font size=2 color=blue face="Arial">Thanks; I'd suggest next modifying
the MAP file to comment out ALL PROJECTION blocks, and turn off all the
layers except the shore line. &nbsp;You'll need to adjust the EXTENT to
have the right values in UTM coordinates, but this should get you a UTM-output
map of the shoreline. &nbsp;I'm trying to make sure that all your data
is valid and is really in the projection you think it is.</font>
<br><font size=3>&nbsp;</font>
<br><font size=3>&nbsp; &nbsp; </font><font size=2 color=blue face="Arial">-
Ed</font>
<p><font size=2>Ed McNierney<br>
President and Chief Mapmaker<br>
TopoZone.com / Maps a la carte, Inc.<br>
73 Princeton Street, Suite 305<br>
North Chelmsford, MA &nbsp;01863<br>
ed at topozone.com<br>
(978) 251-4242 </font>
<p>
<br>
<hr><font size=2 face="Tahoma"><b>From:</b> kgrootendorst at baird.com [mailto:kgrootendorst at baird.com]
<b><br>
Sent:</b> Wednesday, July 14, 2004 12:45 PM<b><br>
To:</b> Ed McNierney<b><br>
Cc:</b> mapserver-users at lists.gis.umn.edu<b><br>
Subject:</b> RE: [Mapserver-users] Reprojecting Problem</font><font size=3><br>
</font>
<br><font size=2 face="sans-serif"><br>
Ed,</font><font size=3> </font><font size=2 face="sans-serif"><br>
Yes, it supports proj, and the other layers look okay. &nbsp;These other
layers are in the same projection as the map object.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
The custom projection I'm using in the map is as follows:</font><font size=3>
</font><font size=2 face="sans-serif"><br>
# Custom Lambert Conformal Conic</font><font size=3> </font><font size=2 face="sans-serif"><br>
&lt;50000&gt; +proj=lcc +lat_1=49 +lat_2=63 +lat_0=49 +lon_0=-91.86 +x_0=6200000
+y_0=2958000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs &nbsp;no_defs
&lt;&gt;</font><font size=3> </font><font size=2 face="sans-serif"><br>
I've had no problems using this projection with ArcMap.</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
I'm running the following:</font><font size=3> </font><font size=2 face="sans-serif"><br>
Mapserver 4.2</font><font size=3> </font><font size=2 face="sans-serif"><br>
PHP 4.3.4</font><font size=3> </font><font size=2 face="sans-serif"><br>
Win2000</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Kevin<br>
</font><font size=3><br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=34%><font size=1 face="sans-serif"><b>&quot;Ed McNierney&quot;
&lt;ed at topozone.com&gt;</b> </font>
<p><font size=1 face="sans-serif">07/14/2004 10:50 AM</font><font size=3>
</font>
<td width=65%>
<br>
<table width=100%>
<tr>
<td width=13%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=86% valign=top><font size=1 face="sans-serif">&lt;kgrootendorst at baird.com&gt;,
&lt;mapserver-users at lists.gis.umn.edu&gt;</font><font size=3> </font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">[SPAM] - RE: [Mapserver-users]
Reprojecting Problem - Email found in subject</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=49%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
</font><font size=2 color=blue face="Arial"><br>
Kevin -</font><font size=3> <br>
 &nbsp;</font><font size=2 color=blue face="Arial"><br>
Do all your other layers look OK in the output map? &nbsp;BTW, I think
it's good practice to include a PROJECTION block in ALL layers if they're
not all the same projection.</font><font size=3> <br>
 &nbsp;</font><font size=2 color=blue face="Arial"><br>
If you run &quot;mapserv -v&quot; from the command line, does it show &quot;SUPPORTS=PROJ&quot;?</font><font size=3>
<br>
 &nbsp;</font><font size=2 color=blue face="Arial"><br>
 &nbsp; &nbsp;- Ed</font><font size=3> </font>
<p><font size=2 color=blue face="Arial">Ed McNierney<br>
President and Chief Mapmaker<br>
TopoZone.com / Maps a la carte, Inc.<br>
73 Princeton Street, Suite 305<br>
North Chelmsford, MA &nbsp;01863<br>
ed at topozone.com<br>
(978) 251-4242 </font>
<p><font size=3><br>
</font>
<hr><font size=2 face="Tahoma"><b>From:</b> mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu] <b>On Behalf Of </b>kgrootendorst at baird.com<b><br>
Sent:</b> Wednesday, July 14, 2004 10:17 AM<b><br>
To:</b> mapserver-users at lists.gis.umn.edu<b><br>
Subject:</b> [Mapserver-users] Reprojecting Problem</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
<br>
Hello,</font><font size=3> </font><font size=2 face="sans-serif"><br>
I'm having trouble with reprojecting in Mapserver. &nbsp;I'm trying to
reproject my 'shoreline' file (defined as UTM 17N NAD83) to my map, which
has been defined with a customized lambert conformal conic projection.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
Based on my Mapfile below, can anyone see why my data will not re-project?
&nbsp;Am I missing something? &nbsp;I thought everything looked okay, but
obviously something must be wrong!</font><font size=3> </font><font size=2 face="sans-serif"><br>
</font><font size=2 face="Courier New"><br>
<br>
MAP</font><font size=3> </font><font size=2 face="Courier New"><br>
 NAME &quot;test&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 STATUS ON</font><font size=3> </font><font size=2 face="Courier New"><br>
 EXTENT 6000000 600000 9000000 1500000 <br>
 #Minx Miny Maxx Maxy</font><font size=3> </font><font size=2 face="Courier New"><br>
 SIZE 600 400 <br>
 SHAPEPATH &quot;./Data&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 SYMBOLSET &quot;./etc/symbols.sym&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 FONTSET &quot;./etc/fonts.txt&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 IMAGETYPE PNG</font><font size=3> </font><font size=2 face="Courier New"><br>
 UNITS METERS</font><font size=3> </font><font size=2 face="Courier New"><br>
 WEB</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; IMAGEPATH &quot;C:/Program Files/Apache Group/Apache2/htdocs/ms_tmp/&quot;</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; IMAGEURL &quot;/ms_tmp/&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 END</font><font size=3> </font><font size=2 face="Courier New"><br>
 PROJECTION</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &quot;init=epsg:50000&quot; &nbsp; &nbsp; #Custom LCC Projection
- defined in proj/epsg</font><font size=3> </font><font size=2 face="Courier New"><br>
 END</font><font size=3> </font><font size=2 face="Courier New"><br>
LEGEND</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; STATUS ON</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; IMAGECOLOR 255 255 255</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; POSITION LL</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; KEYSIZE 18 12 <br>
 &nbsp; KEYSPACING 5 5 <br>
 END</font><font size=3> </font><font size=2 face="Courier New"><br>
 SCALEBAR</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; STATUS ON</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; COLOR 255 255 255</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; OUTLINECOLOR 0 0 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; BACKGROUNDCOLOR 0 0 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; IMAGECOLOR 255 255 255</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; UNITS KILOMETERS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; INTERVALS 5</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; SIZE 150 10 <br>
 &nbsp; STYLE 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; POSITION LL</font><font size=3> </font><font size=2 face="Courier New"><br>
 END</font><font size=3> </font><font size=2 face="Courier New"><br>
 LAYER</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; NAME &quot;ec_counties_LCC&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; STATUS ON</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; DATA &quot;./ec_counties_LCC&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; TYPE POLYGON</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; UNITS METERS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; SIZEUNITS PIXELS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; CLASS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; NAME &quot;ec_counties_LCC&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; TEMPLATE &quot;ttt&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; STYLE</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; SYMBOL 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; COLOR 211 255 190</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; OUTLINECOLOR 0 0 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 END</font><font size=3> </font><font size=2 face="Courier New"><br>
 LAYER</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; NAME &quot;New_York_County&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; STATUS ON</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; DATA &quot;./New_York_County&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; TYPE POLYGON</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; #LABELITEM &quot;NAME&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; CLASS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; #NAME &quot;New_York_County&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; TEMPLATE &quot;ttt&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; LABEL</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; TYPE bitmap</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; FONT &quot;arial&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; SIZE small</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; POSITION CC</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; COLOR 255 0 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; STYLE</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; SYMBOL 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; COLOR 252 241 207</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; OUTLINECOLOR 0 0 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 END</font><font size=3> </font><font size=2 face="Courier New"><br>
 LAYER</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; NAME &quot;Shoreline_UTM&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; STATUS ON</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; DATA &quot;./Shoreline_UTM&quot;</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; TYPE LINE</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; UNITS METERS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; SIZEUNITS PIXELS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; PROJECTION</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &quot;init=epsg:26917&quot; &nbsp; &nbsp; &nbsp;#UTM Zone
17N NAD 83</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; CLASS</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; STYLE</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; SYMBOL 0</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; COLOR 0 0 255</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; END</font><font size=3> </font><font size=2 face="Courier New"><br>
 END</font><font size=3> </font><font size=2 face="Courier New"><br>
END</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
Thanks.</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
Kevin</font><font size=3> </font>
<p>
--=_alternative 0074454185256ED1_=--



More information about the mapserver-users mailing list