Being defined by server and clients at the moment shouldn't be an issue because I am testing off the server at the moment which I have updated the proj epsg file. Is this correct have I correctly understood this concept?
<br><br>How do I get the correct extent for this new projection I have absolutely now idea how to do it? I'm not using bbox so this shouldn't be a problem.<br><br><br><div><span class="gmail_quote">On 7/10/07, <b class="gmail_sendername">
Ed McNierney</b> <<a href="mailto:ed@topozone.com">ed@topozone.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Bradley –</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Don't just experiment with combinatorial testing – think about
what you're trying to do, make sure you understand it, then be sure your map
file and request do it. Since we've explained that whatever EPSG code you're
using is not standard, you need to be sure that it is defined in both the
server and all clients. Have you done that? Failure to do so would be an
obvious cause of an "SRS error" from the client.</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Remember that when you change your map file output or your WMS
request to a different SRS, you need to change the extent or BBOX parameters,
too. In a WMS request the BBOX parameter always uses the units of the SRS used,
so you can't just keep the same GDA94 coordinates and expect them to work. If
you don't change them, you're requesting a Mercator output image at some random
location that bears no relation to your input data, so it is quite likely to
give you a white image (since no input data overlaps the requested map area).</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p style="margin-left: 29.25pt; text-indent: -0.25in;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><span>-<span>
</span></span></span><span style="font-size: 11pt; color: rgb(31, 73, 125);">Ed</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> UMN MapServer Users
List [mailto:<a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MAPSERVER-USERS@LISTS.UMN.EDU</a>] <b>On Behalf Of </b>Bradley Mclain<br>
<b>Sent:</b> Monday, July 09, 2007 9:12 PM<br>
<b>To:</b> <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MAPSERVER-USERS@LISTS.UMN.EDU</a><br>
<b>Subject:</b> Re: [UMN_MAPSERVER-USERS] [UMN_MAPSERVER-DEV] Projections</span></p>
</div><div><span class="e" id="q_113add97a0a84321_1">
<p> </p>
<p style="margin-bottom: 12pt;">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. </p>
<div>
<p><span>On 7/10/07, <b>Ed McNierney</b> <<a href="mailto:ed@topozone.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ed@topozone.com</a>> wrote:</span></p>
<p>Paul -<br>
<br>
Those parameters look good. There is obviously not a
"standard" 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 "internally" where you can control both your WMS server and the
client.<br>
<br>
If it'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. If it's the latter, you're
fine. You can<br>
simply pick any number you like that's not already taken and add that line <br>
to your EPSG file. It's just a text file. Let's assume
you'll pick 41002<br>
(since 41001 seems to be in popular usage, but is wrong). Then you'd
add<br>
the single text line:<br>
<br>
<41002>+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. Then you can
refer to<br>
it as SRS=EPSG:41002 in your WMS requests and you're all set.<br>
<br>
- Ed <br>
<br>
> From: Paul Spencer <<a href="mailto:pspencer@DMSOLUTIONS.CA" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pspencer@DMSOLUTIONS.CA</a>><br>
> Date: Mon, 9 Jul 2007 14:55:22 -0400<br>
> To: Ed McNierney <<a href="mailto:ed@topozone.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ed@topozone.com </a>><br>
> Cc: "<a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MAPSERVER-USERS@LISTS.UMN.EDU</a>"
<<a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MAPSERVER-USERS@LISTS.UMN.EDU</a>><br>
> Subject: Re: [UMN_MAPSERVER-DEV] Projections <br>
><br>
> Thanks for the clarification Ed (and for fixing the cross-list-<br>
> posting-bug :)). I just looked into this more and you are
correct (I<br>
> was completely wrong). From the site that Bradley quoted, they
seem <br>
> to think that the spherical projection is what is used by Google<br>
> etc. The (unverified) proj.4 parameters for this seem to be:<br>
><br>
> +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>
> Cheers<br>
><br>
> Paul<br>
><br>
> On 9-Jul-07, at 2:06 PM, Ed McNierney wrote:<br>
><br>
>> Paul -<br>
>><br>
>> This doesn't seem correct to me. You're suggesting a
Transverse <br>
>> Mercator<br>
>> projection on an ellipsoid when the request was for a Mercator on a<br>
>> sphere.<br>
>><br>
>> I did a little Googling around and while it appears that the 41001<br>
>> projection is often referred to as "Transverse Mercator",
and there <br>
>> are<br>
>> several references to the PROJ definition you mention (+proj=tmerc,<br>
>> etc.),<br>
>> there is a more sensible reference to 41001 being defined in a<br>
>> GeoServer<br>
>> install as: <br>
>><br>
>> PROJCS["WGS84 / Simple Mercator",<br>
>> GEOGCS["WGS 84",<br>
>> DATUM["WGS_1984",<br>
>> SPHEROID["WGS_1984",
6378137.0, 298.257223563 ]],<br>
>> PRIMEM["Greenwich", 0.0],<br>
>> UNIT["degree",
0.017453292519943295],<br>
>> AXIS["Lon", EAST],<br>
>> AXIS["Lat", NORTH]],<br>
>> PROJECTION["Mercator_1SP"], <br>
>> PARAMETER["central_meridian", 0.0],<br>
>> PARAMETER["scale_factor", 1.0],<br>
>> PARAMETER["false_easting", 0.0],<br>
>> PARAMETER["false_northing", 0.0],<br>
>> UNIT["m", 1.0],<br>
>> AXIS["x", EAST],<br>
>> AXIS["y", NORTH],<br>
>> AUTHORITY["EPSG","41001"]]<br>
>><br>
>> This is more sensible (at least it's a Mercator projection!) but it <br>
>> is still<br>
>> a ellipsoidal rather than spherical projection, so it's not quite<br>
>> right.<br>
>><br>
>> However, the entire universe of Web-based "geographic"
projection <br>
>> fans,<br>
>> stimulated by Google and Microsoft, obviously don't really get<br>
>> bothered when<br>
>> their maps are "not quite right", so I should learn not to
be so<br>
>> fussy. <br>
>><br>
>> - Ed<br>
>><br>
>> P.S. I modified the reply to go only to the MAPSERVER-USERS list,<br>
>> since the<br>
>> original cross-posting to both lists only complicates matters for <br>
>> people<br>
>> trying to help.<br>
>><br>
>><br>
>>> From: Paul Spencer <<a href="mailto:pspencer@DMSOLUTIONS.CA" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pspencer@DMSOLUTIONS.CA</a>><br>
>>> Reply-To: Paul Spencer < <a href="mailto:pspencer@DMSOLUTIONS.CA" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pspencer@DMSOLUTIONS.CA</a>><br>
>>> Date: Sun, 8 Jul 2007 22:17:03 -0400<br>
>>> To: <<a href="mailto:MAPSERVER-DEV@LISTS.UMN.EDU" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">MAPSERVER-DEV@LISTS.UMN.EDU
</a>><br>
>>> Subject: Re: [UMN_MAPSERVER-DEV] Projections<br>
>>><br>
>>> You need what is commonly referred to as EPSG:41001, defined as:<br>
>>><br>
>>> <41001> +proj=tmerc +ellps=WGS84 +units=m
+no_defs <> <br>
>>><br>
>>> To use this, add the above line to your 'epsg' file and also add a<br>
>>> projection object to your map object:<br>
>>><br>
>>> PROJECTION<br>
>>> "init=epsg:41001" <br>
>>> END<br>
>>><br>
>>> You will also need to make sure that every layer in your map file
has<br>
>>> a proper projection so mapserver can reproject it correctly.<br>
>>><br>
>>> Cheers <br>
>>><br>
>>> Paul<br>
>>><br>
>>> On 8-Jul-07, at 9:44 PM, Bradley Mclain wrote:<br>
>>><br>
>>>> This is kind of hard to explain but what I want to do is use<br>
>>>> Mapserver to project my data which is in the GDA94 projection
as <br>
>>>> shown below:<br>
>>>><br>
>>>> "# GDA94 / MGA zone 55<br>
>>>> <28355> +proj=utm +zone=55 +south +ellps=GRS80<br>
>>>> +towgs84=0,0,0,0,0,0,0 +units=m
+no_defs <>" <br>
>>>><br>
>>>> to a projection that will be able to be properly merged with
Google<br>
>>>> maps (using OpenLayers) which uses a projection something like
the<br>
>>>> following: <br>
>>>><br>
>>>> "Update 4: Agreement frrom Melita Kennedy and David
Burrows that<br>
>>>> Google Maps and Virtual Earth use spherical equations for the<br>
>>>> Mercator projection. The correct
proj4 settings are: <br>
>>>><br>
>>>> +proj=merc +latts=0 +lon0=0 +k=1.0 +x0=0 +y0=0<br>
>>>> +a=6378137.0 +b=6378137.0 +units=m<br>
>>>><br>
>>>> Note this is different than using the ellipsoidal
equations which <br>
>>>> would be:<br>
>>>><br>
>>>> +proj=merc +latts=0 +lon0=0 +k=1.0 +x0=0 +y0=0<br>
>>>> +ellps=WGS84 +datum=WGS84 +units=m no_defs"<br>
>>>><br>
>>>> I believe that I need to use Mapserver to do this but I have
no <br>
>>>> idea how to go about it. Currently my Mapserver is running
fine<br>
>>>> displaying the data correctly using the GDA94 projection
except i<br>
>>>> had to use a .vrt file to correctly align the raster image
which <br>
>>>> was slightly out of alignment. I have also set up and can call
my<br>
>>>> Mapserver as a WMS (thought having issues with the WMS Layer<br>
>>>> function in OpenLayers, just displays a white screen but I
believe <br>
>>>> that this is to do with projections)<br>
>>>><br>
>>>> My Mapserver has been compiled with GD, GDAL, GEOS, PostGIS,
PHP<br>
>>>> and proj4.<br>
>>>><br>
>>>> In my mapfile I have defined each layer using
"init=epsg:28355" as <br>
>>>> well as globally defining the map using the same projection.<br>
>>>><br>
>>>> This reason I am trying to do this is because currently I
don't<br>
>>>> think that my projection can be properly imported into
OpenLayers <br>
>>>> and merged with Google Maps.<br>
>>>><br>
>>>> Thanks<br>
>>>><br>
>>>> Brad<br>
>>><br>
>>>
+-----------------------------------------------------------------+ <br>
>>> |Paul
Spencer <a href="mailto:pspencer@dmsolutions.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pspencer@dmsolutions.ca</a> |<br>
>>> +-----------------------------------------------------------------+<br>
>>> |Chief Technology
Officer
| <br>
>>> |DM Solutions Group
Inc <a href="http://www.dmsolutions.ca/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.dmsolutions.ca/</a> |<br>
>>> +-----------------------------------------------------------------+<br>
>> <br>
><br>
> +-----------------------------------------------------------------+<br>
> |Paul
Spencer <a href="mailto:pspencer@dmsolutions.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pspencer@dmsolutions.ca</a> |<br>
> +-----------------------------------------------------------------+ <br>
> |Chief Technology
Officer
|<br>
> |DM Solutions Group
Inc <a href="http://www.dmsolutions.ca/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.dmsolutions.ca/</a> |<br>
> +-----------------------------------------------------------------+ <br>
><br>
><br>
><br>
><br>
></p>
</div>
<p> </p>
</span></div></div>
</div>
</blockquote></div><br>