When I have the custom projection defined in my mapfile and the native projection defined for layers the map does not show up when doing a WMS getmap request, it just appears white. <br><br>When I change it so that all layers have the custom projection, the map displays correctly from a WMS request but fails to display correctly in OpenLayers giving an SRS error.
<br><br><div><span class="gmail_quote">On 7/10/07, <b class="gmail_sendername">Ed McNierney</b> &lt;<a href="mailto:ed@topozone.com">ed@topozone.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Paul -<br><br>Those parameters look good.&nbsp;&nbsp;There is obviously not a &quot;standard&quot; EPSG code<br>for this projection.<br><br>Bradley, you need to decide whether you need to serve these WMS images out<br>to the wide world (
i.e. clients over which you have no control) or only use<br>them &quot;internally&quot; where you can control both your WMS server and the client.<br><br>If it&#39;s the former, you have a problem, as there is no EPSG code describing
<br>the projection you need that seems to be in general usage so your clients<br>can be expected to support it.&nbsp;&nbsp;If it&#39;s the latter, you&#39;re fine.&nbsp;&nbsp;You can<br>simply pick any number you like that&#39;s not already taken and add that line
<br>to your EPSG file.&nbsp;&nbsp;It&#39;s just a text file.&nbsp;&nbsp;Let&#39;s assume you&#39;ll pick 41002<br>(since 41001 seems to be in popular usage, but is wrong).&nbsp;&nbsp;Then you&#39;d add<br>the single text line:<br><br>&lt;41002&gt;+proj=merc +lat_ts=0 +lon_0=0 +k=
1.0 +x_0=0 +y_0=0 +a=6378137.0<br>+b=6378137.0 +units=m<br><br>To the EPSG files on your server and on each client.&nbsp;&nbsp;Then you can refer to<br>it as SRS=EPSG:41002 in your WMS requests and you&#39;re all set.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;- Ed
<br><br>&gt; From: Paul Spencer &lt;<a href="mailto:pspencer@DMSOLUTIONS.CA">pspencer@DMSOLUTIONS.CA</a>&gt;<br>&gt; Date: Mon, 9 Jul 2007 14:55:22 -0400<br>&gt; To: Ed McNierney &lt;<a href="mailto:ed@topozone.com">ed@topozone.com
</a>&gt;<br>&gt; Cc: &quot;<a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</a>&quot; &lt;<a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</a>&gt;<br>&gt; Subject: Re: [UMN_MAPSERVER-DEV] Projections
<br>&gt;<br>&gt; Thanks for the clarification Ed (and for fixing the cross-list-<br>&gt; posting-bug :)).&nbsp;&nbsp;I just looked into this more and you are correct (I<br>&gt; was completely wrong).&nbsp;&nbsp;From the site that Bradley quoted, they seem
<br>&gt; to think that the spherical projection is what is used by Google<br>&gt; etc.&nbsp;&nbsp;The (unverified) proj.4 parameters for this seem to be:<br>&gt;<br>&gt; +proj=merc +lat_ts=0 +lon_0=0 +k=1.0 +x_0=0 +y_0=0 +a=6378137.0
<br>&gt; +b=6378137.0 +units=m<br>&gt;<br>&gt; Cheers<br>&gt;<br>&gt; Paul<br>&gt;<br>&gt; On 9-Jul-07, at 2:06 PM, Ed McNierney wrote:<br>&gt;<br>&gt;&gt; Paul -<br>&gt;&gt;<br>&gt;&gt; This doesn&#39;t seem correct to me.&nbsp;&nbsp;You&#39;re suggesting a Transverse
<br>&gt;&gt; Mercator<br>&gt;&gt; projection on an ellipsoid when the request was for a Mercator on a<br>&gt;&gt; sphere.<br>&gt;&gt;<br>&gt;&gt; I did a little Googling around and while it appears that the 41001<br>&gt;&gt; projection is often referred to as &quot;Transverse Mercator&quot;, and there
<br>&gt;&gt; are<br>&gt;&gt; several references to the PROJ definition you mention (+proj=tmerc,<br>&gt;&gt; etc.),<br>&gt;&gt; there is a more sensible reference to 41001 being defined in a<br>&gt;&gt; GeoServer<br>&gt;&gt; install as:
<br>&gt;&gt;<br>&gt;&gt; PROJCS[&quot;WGS84 / Simple Mercator&quot;,<br>&gt;&gt;&nbsp;&nbsp; GEOGCS[&quot;WGS 84&quot;,<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; DATUM[&quot;WGS_1984&quot;,<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPHEROID[&quot;WGS_1984&quot;, 6378137.0, 298.257223563
]],<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; PRIMEM[&quot;Greenwich&quot;, 0.0],<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; UNIT[&quot;degree&quot;, 0.017453292519943295],<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; AXIS[&quot;Lon&quot;, EAST],<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; AXIS[&quot;Lat&quot;, NORTH]],<br>&gt;&gt;&nbsp;&nbsp; PROJECTION[&quot;Mercator_1SP&quot;],
<br>&gt;&gt;&nbsp;&nbsp; PARAMETER[&quot;central_meridian&quot;, 0.0],<br>&gt;&gt;&nbsp;&nbsp; PARAMETER[&quot;scale_factor&quot;, 1.0],<br>&gt;&gt;&nbsp;&nbsp; PARAMETER[&quot;false_easting&quot;, 0.0],<br>&gt;&gt;&nbsp;&nbsp; PARAMETER[&quot;false_northing&quot;, 
0.0],<br>&gt;&gt;&nbsp;&nbsp; UNIT[&quot;m&quot;, 1.0],<br>&gt;&gt;&nbsp;&nbsp; AXIS[&quot;x&quot;, EAST],<br>&gt;&gt;&nbsp;&nbsp; AXIS[&quot;y&quot;, NORTH],<br>&gt;&gt;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;41001&quot;]]<br>&gt;&gt;<br>&gt;&gt; This is more sensible (at least it&#39;s a Mercator projection!) but it
<br>&gt;&gt; is still<br>&gt;&gt; a ellipsoidal rather than spherical projection, so it&#39;s not quite<br>&gt;&gt; right.<br>&gt;&gt;<br>&gt;&gt; However, the entire universe of Web-based &quot;geographic&quot; projection
<br>&gt;&gt; fans,<br>&gt;&gt; stimulated by Google and Microsoft, obviously don&#39;t really get<br>&gt;&gt; bothered when<br>&gt;&gt; their maps are &quot;not quite right&quot;, so I should learn not to be so<br>&gt;&gt; fussy.
<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Ed<br>&gt;&gt;<br>&gt;&gt; P.S. I modified the reply to go only to the MAPSERVER-USERS list,<br>&gt;&gt; since the<br>&gt;&gt; original cross-posting to both lists only complicates matters for
<br>&gt;&gt; people<br>&gt;&gt; trying to help.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&gt; From: Paul Spencer &lt;<a href="mailto:pspencer@DMSOLUTIONS.CA">pspencer@DMSOLUTIONS.CA</a>&gt;<br>&gt;&gt;&gt; Reply-To: Paul Spencer &lt;
<a href="mailto:pspencer@DMSOLUTIONS.CA">pspencer@DMSOLUTIONS.CA</a>&gt;<br>&gt;&gt;&gt; Date: Sun, 8 Jul 2007 22:17:03 -0400<br>&gt;&gt;&gt; To: &lt;<a href="mailto:MAPSERVER-DEV@LISTS.UMN.EDU">MAPSERVER-DEV@LISTS.UMN.EDU
</a>&gt;<br>&gt;&gt;&gt; Subject: Re: [UMN_MAPSERVER-DEV] Projections<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; You need what is commonly referred to as EPSG:41001, defined as:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; &lt;41001&gt; +proj=tmerc +ellps=WGS84 +units=m +no_defs&nbsp;&nbsp;&lt;&gt;
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; To use this, add the above line to your &#39;epsg&#39; file and also add a<br>&gt;&gt;&gt; projection object to your map object:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; PROJECTION<br>&gt;&gt;&gt; &quot;init=epsg:41001&quot;
<br>&gt;&gt;&gt; END<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; You will also need to make sure that every layer in your map file has<br>&gt;&gt;&gt; a proper projection so mapserver can reproject it correctly.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Cheers
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Paul<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; On 8-Jul-07, at 9:44 PM, Bradley Mclain wrote:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; This is kind of hard to explain but what I want to do is use<br>&gt;&gt;&gt;&gt; Mapserver to project my data which is in the GDA94 projection as
<br>&gt;&gt;&gt;&gt; shown below:<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; &quot;# GDA94 / MGA zone 55<br>&gt;&gt;&gt;&gt; &lt;28355&gt; +proj=utm +zone=55 +south +ellps=GRS80<br>&gt;&gt;&gt;&gt; +towgs84=0,0,0,0,0,0,0 +units=m +no_defs&nbsp;&nbsp;&lt;&gt;&quot;
<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; to a projection that will be able to be properly merged with Google<br>&gt;&gt;&gt;&gt; maps (using OpenLayers) which uses a projection something like the<br>&gt;&gt;&gt;&gt; following:
<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; &quot;Update 4: Agreement frrom Melita Kennedy and David Burrows that<br>&gt;&gt;&gt;&gt; Google Maps and Virtual Earth use spherical equations for the<br>&gt;&gt;&gt;&gt; Mercator projection.&nbsp;&nbsp;The correct proj4&nbsp;&nbsp;settings are:
<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; +proj=merc +latts=0 +lon0=0 +k=1.0 +x0=0 +y0=0<br>&gt;&gt;&gt;&gt; +a=6378137.0 +b=6378137.0 +units=m<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Note this is different than using the&nbsp;&nbsp;ellipsoidal equations which
<br>&gt;&gt;&gt;&gt; would be:<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; +proj=merc +latts=0 +lon0=0 +k=1.0 +x0=0 +y0=0<br>&gt;&gt;&gt;&gt; +ellps=WGS84 +datum=WGS84 +units=m no_defs&quot;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; I believe that I need to use Mapserver to do this but I have no
<br>&gt;&gt;&gt;&gt; idea how to go about it. Currently my Mapserver is running fine<br>&gt;&gt;&gt;&gt; displaying the data correctly using the GDA94 projection except i<br>&gt;&gt;&gt;&gt; had to use a .vrt file to correctly align the raster image which
<br>&gt;&gt;&gt;&gt; was slightly out of alignment. I have also set up and can call my<br>&gt;&gt;&gt;&gt; Mapserver as a WMS (thought having issues with the WMS Layer<br>&gt;&gt;&gt;&gt; function in OpenLayers, just displays a white screen but I believe
<br>&gt;&gt;&gt;&gt; that this is to do with projections)<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; My Mapserver has been compiled with GD, GDAL, GEOS, PostGIS, PHP<br>&gt;&gt;&gt;&gt; and proj4.<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; In my mapfile I have defined each layer using &quot;init=epsg:28355&quot; as
<br>&gt;&gt;&gt;&gt; well as globally defining the map using the same projection.<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; This reason I am trying to do this is because currently I don&#39;t<br>&gt;&gt;&gt;&gt; think that my projection can be properly imported into OpenLayers
<br>&gt;&gt;&gt;&gt; and merged with Google Maps.<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Thanks<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Brad<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; +-----------------------------------------------------------------+
<br>&gt;&gt;&gt; |Paul Spencer&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;<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a>&nbsp;&nbsp;&nbsp;&nbsp;|<br>&gt;&gt;&gt; +-----------------------------------------------------------------+<br>&gt;&gt;&gt; |Chief Technology Officer&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
<br>&gt;&gt;&gt; |DM Solutions Group Inc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</a> |<br>&gt;&gt;&gt; +-----------------------------------------------------------------+<br>&gt;&gt;
<br>&gt;<br>&gt; +-----------------------------------------------------------------+<br>&gt; |Paul Spencer&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;<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a>&nbsp;&nbsp;&nbsp;&nbsp;|<br>&gt; +-----------------------------------------------------------------+
<br>&gt; |Chief Technology Officer&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>&gt; |DM Solutions Group Inc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</a> |<br>&gt; +-----------------------------------------------------------------+
<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br></blockquote></div><br>