<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: EPSG Problems</title>
	<atom:link href="http://blogs.onterrasystems.com/gisblog/?feed=rss2&#038;p=80" rel="self" type="application/rss+xml" />
	<link>http://blogs.onterrasystems.com/gisblog/?p=80</link>
	<description>A fascination with XML maps</description>
	<lastBuildDate>Sun, 13 Jun 2010 21:55:03 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Randy</title>
		<link>http://blogs.onterrasystems.com/gisblog/?p=80&#038;cpage=1#comment-1549</link>
		<dc:creator>Randy</dc:creator>
		<pubDate>Tue, 01 Sep 2009 02:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.cadmaps.com/gisblog/?p=80#comment-1549</guid>
		<description>Hurray! found the problem!

Thanks to SharpGIS. Morten&#039;s input got me looking in the right direction!

My orginal hunch was correct it was the ellipsoid datum vs spherical. 

However, I finally realized I had made a big error on the eccentricity. Don&#039;t know what I was thinking at the time but e should be:
double f = 1 / 298.257223563;
e = Math.Sqrt(2*f - Math.Pow(f,2));
    or
e = 0.081819190842621486;

Use that in MercatorEllipsoid for com.esri.wms.Esrimap services and it all comes together correctly. 

So GeoServer must ignore the flattening 298.257223563 or else assume it is like the 900913 where flattening is overridden by making semi_minor axis = major.
PARAMETER[&quot;semi_minor&quot;,6378137.0]

At any rate I now must check to see if ESRI is providing the WMS or some other service and take into account datum difference between EPSG:3857 and ESRI:54004

thanks
randy</description>
		<content:encoded><![CDATA[<p>Hurray! found the problem!</p>
<p>Thanks to SharpGIS. Morten&#8217;s input got me looking in the right direction!</p>
<p>My orginal hunch was correct it was the ellipsoid datum vs spherical. </p>
<p>However, I finally realized I had made a big error on the eccentricity. Don&#8217;t know what I was thinking at the time but e should be:<br />
double f = 1 / 298.257223563;<br />
e = Math.Sqrt(2*f &#8211; Math.Pow(f,2));<br />
    or<br />
e = 0.081819190842621486;</p>
<p>Use that in MercatorEllipsoid for com.esri.wms.Esrimap services and it all comes together correctly. </p>
<p>So GeoServer must ignore the flattening 298.257223563 or else assume it is like the 900913 where flattening is overridden by making semi_minor axis = major.<br />
PARAMETER["semi_minor",6378137.0]</p>
<p>At any rate I now must check to see if ESRI is providing the WMS or some other service and take into account datum difference between EPSG:3857 and ESRI:54004</p>
<p>thanks<br />
randy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy</title>
		<link>http://blogs.onterrasystems.com/gisblog/?p=80&#038;cpage=1#comment-1548</link>
		<dc:creator>Randy</dc:creator>
		<pubDate>Tue, 01 Sep 2009 01:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.cadmaps.com/gisblog/?p=80#comment-1548</guid>
		<description>Hi is it Morten,

Thanks for the input.

Yes there is no such thing as EPSG:900913 or 54004, or 41001, only EPSG:3857. Unfortunately the EPSG prefix seems to get used in various tools out there. Probably shouldn’t reference them that way, but I think it can’t be helped by this time.

Interesting, I thought that 900913 was around before Virtual Earth showed up. It does seem to be fairly commonly referenced as “900913=PROJCS[”WGS84 / Google Mercator, …”
I thought EPSG:3785 was sponsored by Microsoft and then it was deprecated in favor of EPSG:3857. I could be wrong on that.

I’m not sure what formula you are refering to above. The Mercator() uses spherical with no eccentricity, MercatorEllipsoid does/should use e since it was an attempt to see whether the datum diff noted would account for the shift. It didn’t seem to? It is used to calculate the BBOX coordinates for the GetMap requests.

Apparently GeoServers 54004 def is different from the ESRI def in some way since they give different results? GeoServers’s matches OSM, Yahoo etc, ESRI’s doesn’t.

When I get a chance I’ll look into it more. I want to change things a bit in my client so I can choose EPSG for each of the services independently and look at match ups.

thanks
randy</description>
		<content:encoded><![CDATA[<p>Hi is it Morten,</p>
<p>Thanks for the input.</p>
<p>Yes there is no such thing as EPSG:900913 or 54004, or 41001, only EPSG:3857. Unfortunately the EPSG prefix seems to get used in various tools out there. Probably shouldn’t reference them that way, but I think it can’t be helped by this time.</p>
<p>Interesting, I thought that 900913 was around before Virtual Earth showed up. It does seem to be fairly commonly referenced as “900913=PROJCS[”WGS84 / Google Mercator, …”<br />
I thought EPSG:3785 was sponsored by Microsoft and then it was deprecated in favor of EPSG:3857. I could be wrong on that.</p>
<p>I’m not sure what formula you are refering to above. The Mercator() uses spherical with no eccentricity, MercatorEllipsoid does/should use e since it was an attempt to see whether the datum diff noted would account for the shift. It didn’t seem to? It is used to calculate the BBOX coordinates for the GetMap requests.</p>
<p>Apparently GeoServers 54004 def is different from the ESRI def in some way since they give different results? GeoServers’s matches OSM, Yahoo etc, ESRI’s doesn’t.</p>
<p>When I get a chance I’ll look into it more. I want to change things a bit in my client so I can choose EPSG for each of the services independently and look at match ups.</p>
<p>thanks<br />
randy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sharpgis</title>
		<link>http://blogs.onterrasystems.com/gisblog/?p=80&#038;cpage=1#comment-1546</link>
		<dc:creator>sharpgis</dc:creator>
		<pubDate>Mon, 31 Aug 2009 21:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.cadmaps.com/gisblog/?p=80#comment-1546</guid>
		<description>First of all, there is no such thing as &quot;EPSG:900913&quot;. When you put EPSG in front of it, it says that this is defined by EPSG. This is not the case. It was a number coined by a blog, because it looks like it says &quot;google&quot; (never mind the fact that Virtual Earth was the first ones to use this, not Google).

Second, 54004 was never meant to be the same as 3857. The reason is that they are using different datums. You need to define a datum transform to go from one to the other to get your transformations to look right. The error you are seeing is exactly the expected error for a datum transform error.
Here&#039;s the main difference between the two spatial references:
54004: DATUM[&quot;WGS_1984&quot;, SPHEROID[&quot;WGS_1984&quot;,6378137,298.257223563]]
3857: DATUM[&quot;WGS_1984_SPHERE&quot;, SPHEROID[&quot;WGS_1984&quot;,6378137,0]]
The &#039;e&#039; value in your formula above is therefore also wrong, since a sphere has no flattening. It does work for 54004 since this one defines a flattening. The conversion is actually a lot simpler because of the lack of flattening as described here: http://cfis.savagexi.com/2006/05/03/google-maps-deconstructed

Here&#039;s a couple of others links that might also help you:
http://www.sharpgis.net/post/2007/07/27/The-Microsoft-Live-Maps-and-Google-Maps-projection.aspx
http://www.sharpgis.net/post/2008/05/15/SphericalWeb-Mercator-EPSG-code-3785.aspx
http://www.sharpgis.net/post/2007/05/05/Spatial-references2c-coordinate-systems2c-projections2c-datums2c-ellipsoids-e28093-confusing.aspx

If you are using ESRI software, use WKID 102113, since this was the ID ESRI chose before EPSG finally defined one.</description>
		<content:encoded><![CDATA[<p>First of all, there is no such thing as &#8220;EPSG:900913&#8243;. When you put EPSG in front of it, it says that this is defined by EPSG. This is not the case. It was a number coined by a blog, because it looks like it says &#8220;google&#8221; (never mind the fact that Virtual Earth was the first ones to use this, not Google).</p>
<p>Second, 54004 was never meant to be the same as 3857. The reason is that they are using different datums. You need to define a datum transform to go from one to the other to get your transformations to look right. The error you are seeing is exactly the expected error for a datum transform error.<br />
Here&#8217;s the main difference between the two spatial references:<br />
54004: DATUM["WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]]<br />
3857: DATUM["WGS_1984_SPHERE", SPHEROID["WGS_1984",6378137,0]]<br />
The &#8216;e&#8217; value in your formula above is therefore also wrong, since a sphere has no flattening. It does work for 54004 since this one defines a flattening. The conversion is actually a lot simpler because of the lack of flattening as described here: <a href="http://cfis.savagexi.com/2006/05/03/google-maps-deconstructed" rel="nofollow">http://cfis.savagexi.com/2006/05/03/google-maps-deconstructed</a></p>
<p>Here&#8217;s a couple of others links that might also help you:<br />
<a href="http://www.sharpgis.net/post/2007/07/27/The-Microsoft-Live-Maps-and-Google-Maps-projection.aspx" rel="nofollow">http://www.sharpgis.net/post/2007/07/27/The-Microsoft-Live-Maps-and-Google-Maps-projection.aspx</a><br />
<a href="http://www.sharpgis.net/post/2008/05/15/SphericalWeb-Mercator-EPSG-code-3785.aspx" rel="nofollow">http://www.sharpgis.net/post/2008/05/15/SphericalWeb-Mercator-EPSG-code-3785.aspx</a><br />
<a href="http://www.sharpgis.net/post/2007/05/05/Spatial-references2c-coordinate-systems2c-projections2c-datums2c-ellipsoids-e28093-confusing.aspx" rel="nofollow">http://www.sharpgis.net/post/2007/05/05/Spatial-references2c-coordinate-systems2c-projections2c-datums2c-ellipsoids-e28093-confusing.aspx</a></p>
<p>If you are using ESRI software, use WKID 102113, since this was the ID ESRI chose before EPSG finally defined one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy</title>
		<link>http://blogs.onterrasystems.com/gisblog/?p=80&#038;cpage=1#comment-1543</link>
		<dc:creator>Randy</dc:creator>
		<pubDate>Sat, 29 Aug 2009 16:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.cadmaps.com/gisblog/?p=80#comment-1543</guid>
		<description>Hi Brian,

Brian Timoney passed on your suggestion as well. I tried it but no change. 

Hi dnewcomb,

I looked at this in uDig but it&#039;s hard for me to see what the actual WMS url call is, so I can&#039;t tell whether uDig is warping after the image request (as 4326) or not. I also noted uDig doesn&#039;t seem to have 54004 in their list as of 1.1.1. Also missing are 900913 and 3857(does substitute AGD66(EPSG:4202)). The only spherical mercator I could try was 41001, which isn&#039;t published in the GetCapabilities and resulted in similar discrepancy. 
Of course 4326 does align as you zoom in to closer levels.

Also tried Glbal Mapper but I couldn&#039;t make it use 54004?

Still baffled. I guess the problem is really that EPSG:3857 is so rare and these other partly supported spherical mercators 41001, 900913, 54004 are not consistently published by WMS servers or consumed by WMS clients. The best solution would be for EPSG:3857 to be universally adopted.</description>
		<content:encoded><![CDATA[<p>Hi Brian,</p>
<p>Brian Timoney passed on your suggestion as well. I tried it but no change. </p>
<p>Hi dnewcomb,</p>
<p>I looked at this in uDig but it&#8217;s hard for me to see what the actual WMS url call is, so I can&#8217;t tell whether uDig is warping after the image request (as 4326) or not. I also noted uDig doesn&#8217;t seem to have 54004 in their list as of 1.1.1. Also missing are 900913 and 3857(does substitute AGD66(EPSG:4202)). The only spherical mercator I could try was 41001, which isn&#8217;t published in the GetCapabilities and resulted in similar discrepancy.<br />
Of course 4326 does align as you zoom in to closer levels.</p>
<p>Also tried Glbal Mapper but I couldn&#8217;t make it use 54004?</p>
<p>Still baffled. I guess the problem is really that EPSG:3857 is so rare and these other partly supported spherical mercators 41001, 900913, 54004 are not consistently published by WMS servers or consumed by WMS clients. The best solution would be for EPSG:3857 to be universally adopted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dnewcomb</title>
		<link>http://blogs.onterrasystems.com/gisblog/?p=80&#038;cpage=1#comment-1542</link>
		<dc:creator>dnewcomb</dc:creator>
		<pubDate>Sat, 29 Aug 2009 12:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.cadmaps.com/gisblog/?p=80#comment-1542</guid>
		<description>Have you tried other WMS clients like UDig or QGIS to ensure it&#039;s not the WMS client?</description>
		<content:encoded><![CDATA[<p>Have you tried other WMS clients like UDig or QGIS to ensure it&#8217;s not the WMS client?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bFlood</title>
		<link>http://blogs.onterrasystems.com/gisblog/?p=80&#038;cpage=1#comment-1541</link>
		<dc:creator>bFlood</dc:creator>
		<pubDate>Sat, 29 Aug 2009 11:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.cadmaps.com/gisblog/?p=80#comment-1541</guid>
		<description>thats a pretty large offset so I&#039;m not sure if this will help but ESRI servers usually change the requested bbox to match the aspect ratio of the image by default. This has been a problem aligning WMS to GM/VE/etc in the past so you could try to append reaspect=false to your WMS request url

cheers
brian</description>
		<content:encoded><![CDATA[<p>thats a pretty large offset so I&#8217;m not sure if this will help but ESRI servers usually change the requested bbox to match the aspect ratio of the image by default. This has been a problem aligning WMS to GM/VE/etc in the past so you could try to append reaspect=false to your WMS request url</p>
<p>cheers<br />
brian</p>
]]></content:encoded>
	</item>
</channel>
</rss>
