Menu
“The problem is that there is no standardised way to represent this “dual”-ellipsoid system”Ths makes no sense to me. You don’t have a dual ellipsoid.
![]()
Pcswmm Projected Layers Of The Heart. This video provides an introduction to creating sections (classes) for thematic rendering of vector. Jul 16, 2019 Structure of the Heart Wall The heart wall is made of 3 layers: epicardium, myocardium and endocardium.
What you have is an input and an output spatial reference. Each SR has each their ellipsoid. In the above case you have WGS84 (epsg:4326) and you have the Mercator projection with a spherical ellipsoid (epsg:3857). You use one for input, and another for output.
You will end up with two points (input and output), each representing the same point in the world, but in different “units”.The above WKT is also incorrect for 3857. Because its using an ellipsoid that’s a sphere, the 263 value is wrong, because this makes the WebMercator projection use a datum that has a flattening.
Instead enter “0” here to make it a sphere. The “semiminor” parameter for Mercator is not really needed, and I doubt most projection engines would know what to do with that (they should pull the value from the ellipsoid instead). The ones that use it I think is using a hack for WebMercator, instead of properly implementing the datum-transform. In this case the datum transform is really easy: you don’t really have to do anything, since it shares same scale, center and orientation as WGS84, so the TOWGS84 parameter would contain all zeros. However in many cases the TOWGS84 parameter is important, since this tells the projection engine how to perform the datum shift (often they will just skip this step without it, kinda like what happens with proj.4 without the nadgrids ‘hack’). Thanks for the comment, Morten – so much for me clearing the confusion, eh? ? The point I’m trying to make with the “dual-ellipsoid” comment is that the Bing Maps tiles are projected based on a different ellipsoid from that in which the coordinates are supplied (specifically, the “output” ellipsoid is a perfect sphere) – perhaps your phrasing is better than mine.However, I disagree with your comment about EPSG:3857 – the “input” geographic spatial reference system used by Bing / Google.is.
WGS84, and therefore needs to be stated with the appropriate inverse-flattening ratio (as it is in the latest EPSG database). I tried using the suggested projection for proj.net above and it gave me results orders of magnitude out. I don’t see any issue here you’ve started with a set of coordinates from the OSGB National Grid system, which is EPSG:27700. You’ve then converted it into WGS84 geographic coordinates (EPSG:4326) in your first example, and Spherical Mercator projection in your second (EPSG:3857).(518032, 169094) (EPSG:27700) =(-0.84791, 537841) (EPSG:4326) =(-521592, 660938) (EPSG:3857)These are the same results I get using either CS2CS or Proj.NET with the WKT listed in this post. Yeah – just to add even more confusion on the issue, ESRI appear to have created their own codes that mirror those of the EPSG. Comment on the issue from Melita Kennedy, Senior Product Engineer at ESRI:“The WKID was changed at version 10 to 3857. This is because this version of “web Mercator” closely aligns with the EPSG dataset’s entry.
Doc’s out-of-date, I’ll ask that it be updated.The multiple codes are due to release timings:A. 102113 (because that was the only way we could emulate the web services’ definition)B.
102100 added next, using a differently built, but.completely. equivalent, definitionC. EPSG then added 3857 (and deprecated their earlier 3785 entry which was closer to how 102113 was defined)D.
We changed the ESRI 102100 code to EPSG 3857.”Taken from the ESRI support forums atBut yes, as far as I’m aware EPSG:3857 is completely equivalent to ESRI:102100. Hello,i am one of the so-called “casual spatial developers”. I am trying to get the most functionality without the pain of understanding the details. I understand the concepts of datum and projection, but the least i need to know, the more i can do on what interests me (canoe maps).To me the 2 pieces of code that convert from Google to WGS84 have a great value, more than all newsgroups i have read about all this. But in addition to that, i have to convert between NAD27, NAD83, GWS84.
Do you please have similar recipes? Otherwise my only option is to check the corrections written on paper maps, and store, map-by-map, these corrections.So that would be of great help.Thx again!Charles. I agree, Alastair, that, given a sphere, the Wolfram equations are valid, no question. But where is that sphere? It’s a fiction. If you are gathering real-world geographicals with GPS, they are referenced to an ellipsoid, not a sphere. In this case, using the Wolfram equations would induce error.
Web Mercator projection of ellipsoidal geographicals is valid, but, unlike the spherical and ellipsoidal Mercators, it’s non-conformal. In that sense Web Mercator wouldn’t be used for surveying, geodetic or (I guess) scientific purposes. But.all. spatial data is only an approximation defined in reference to an ellipsoid model. The “real-world” information you’re gathering using a GPS is an approximation based on the WGS84 ellipsoid. Using a spherical model is a simpler approximation, certainly, but it’s just as valid (after all, a sphere is just a special case of an ellipsoid in which all three axes are equal).
Neither one truly reflects the shape of the geoid. So the “fictional” sphere is just as real as any other ellipsoid.WGS84 is not the single truth when it comes to geodesy (certainly not here in the UK, where the Ordnance Survey would refuse to let you taint their OSGB36 data by transforming it into “inferior” WGS84). I concede that all real-world measurements have error and, therefore, “.all. spatial data is only an approximation”. Surveyors recognize 3 kinds of error: (1) unavoidable random error that can be minimized as technology improves but which cannot be eliminated, (1) blunders (like a numerical transposition or multipath) that can be eliminated (in theory) with good technique, and (3) bias or systematic error due to an un-calibrated instrument (always reading long, for example) or an incorrect mathematical model (using a sphere instead of an ellipsoid, for example).
We get rid of the errors we can (blunders and bias) and use statistics to evaluate the errors we can’t (random). You are confusing random error with mathematical bias, Alastair.
The geocenter is 20km closer to the pole than the equator in the WGS84 ellipsoid. That’s a lot of mathematical bias to accept just because “a sphere is just a special case of an ellipsoid” or because your GPS receiver has a few decimeters of random error. BTW, the only reason OSGB36 may fit the geoid better in the UK than WGS84 is that it was locally adjusted (rather than worldwide). The switched-on Brits I know have moved to ETRF89. Time to put your parochialisms aside.
BTW great blog. Web Mercator is completely reversible between LL and xy, but that’s just the reprojection part of the transformation. Datum shifts are separate, and happen only in geographic coordinates. There is no systematic way to transform data cast on a sphere to WGS84 – no equivalent of the nadcon software for this transformation. But ESRI will allow you to specify this transformation anyway; their Project module will reassign input data from sphere to WGS84 and complete the reprojection. This works just fine as long as the data were originally in WGS84 or another datum – which was the case for a number of datasets I had to transform from sphere to NAD83. I “Asked a Cartographer” at ESRI about this last December:.
Still getting my head around Web Mercator, thanks for the comment. For John Hutchinson below (no reply button): This quote from the Matrix is helpful in understanding Web Mercator.Prodigy: “Do not try to think outside the box. That’s impossible.
Simply try to realize the truth.” Neo: “Which is?” Prodigy: “There is no box.”The truth is that there is no sphere in Web Mercator. Web Mercator is just a projection that maps from to ellipsoidal LL to XY and back to ellipsoidal LL. Yes, the Web Mercator uses spherical Mercator equations, but THERE IS NO SPHERE. You can still used NADCON to transform from NAD83 (or WGS84) ellipsoidal datum to NAD27 ellipsoidal datum and project on either end using Web Mercator.
Web Mercator is just a non-conformal projection and there are many non-conformal projections. The sphere is an illusion.
Get your head around that! Hi – I am a typical GoogleMaps user taht you describe and not a GIS professional – I’m a PhD student just learning to use ArcGIS. I have a problem working between the two – I don’t know how to apply the 3857 code you discussed.I’m digitizing features from Google Earth to use in ArcGIS (I work in India, where the mapping in GIS is at best scanty). I drew along a river in Google Earth, saved the line as a.kml file and then used the ‘from KML’ feature in ArcMaps10 to convert to a layer file. It worked, except my line is about 270m north of where it is meant to be. I tried downloading some python scripts from the ESRI website to convert.kml to.shp – they load fine into ArcToolbox but then won’t run my.kml files, citing bad magic numbers.
I also tried using an online converter which still left the line north of where it is meant to be.All my inherited raster and vector files for the area should be in GCSWGS1984 as they were either in this format or I’ve converted them. I’ve also added XY data I took using a GPS and converted from DD.MM.MMMM to DD.DDDD which is all correctly aligned with the raster and vector files I inherited. The.kml file I converted to a layer file says it has the same coordinate system and datum (DWGS1984). I’m banging my head against a brick wall trying to see where the problem is!
I’ve tried using bing maps as a base layer but the resolution for my area of rural India isn’t high enough, and I tried putting jpg files from google earth in but to get enough detail I’ll have to input millions of tiny files. Since a “real” GIS professional hasn’t stepped in yet, I can offer a couple comments. First, the 3857 projection is native to Google Maps and not Google Earth (which presents as something closer to an orthographic). If you’re pulling your river.kml from Google Earth, you’re in WGS84 geographicals.
But, have you set up your GIS projection as 3857? Second, the difference in Northing between Mercator and Web Mercator is way more than 270 meters north of Kanyakumari (that is, anywhere in India). You’d have to be a lot closer to the Equator for that “small” of a discrepancy. So, I think you need to look for a different solution to your problem. Enough to drive you batty, heh? Hi alastaira, thank you very much for your answer.
I agree that 18m is not a big deal, maybe it’s a matter of precision, but as you comment, a third source matches exactly one of them. Indeed the GIS software I use also matches the bing maps location, so I would dare to say that google maps is wrong by 18m, I wouldn’t expect that “error” from google maps.
I tried different positions around that area and all of them have the same amount of offset in the same direction (always East, North is correct), it’s not just random. I found out that this missmatching doesn’t take place in other cities that I checked and maybe it will be corrected on the next render/process of the google maps tiles. Do you think it would be worthy to notify the people working on google maps?The big deal was that the missmatching was driving me crazy because I was using the lat/lon coordinates from google maps in that area and they didn’t match my maps on the GIS software. Obviously I thought the problem was at my side, on a datum translation.Thank you again for your time.Regards,Guillermo. I did (what I thought was) a simple port of your code to python to use it within kartograph.py, but I found that using it to create a new GoogleBing projection within the kartograph proj module, cloning the Mercator projection atbut the resulting coordinates created an upside-down projection.I imagine that it’s simply due to a difference in the logic of SVG x/y coordinates compared to.Net. Multiplying the y coordinate by -1 superficially solves the problem.The projection added to my local kartograph now looks like# added by CH followingclass GoogleBing(Cylindrical):def init(self, lat0=0.0, lon0=0.0, flip=0):Cylindrical.init(self, lon0=lon0, flip=flip)self.minLat = -85self.maxLat = 85def project(self, lon, lat):lon, lat = self.ll(lon, lat)x = lon. 20037508.34 / 180y = math.log(math.tan((90 + lat).
math.pi / 360)) / (math.pi / 180)y = y. 20037508.34 / 180y = y.1 # added because appeared upside downreturn (x, y). I just looked a little bit at your other posts in this blog and saw that you are working with Unity and terrains as well. To explain my motivation for the comment a little more: I am working in environmental research center and I am trying to combine Unity terrains created with WorldComposer / TerrainComposer (, which rely on Bing map data) with data from GIS. Therefore I try to convert the shape-date into the Bing coordinate system / projection. Do you have any experience in combining Unity with GIS data?
Yes – I’ve used GIS data in Unity a little – specifically GB Ordnance Survey data. As this is already projected in Eastings/Northings expressed in metres, it was pretty straightforward to import into Unity (which, although not explicitly documented, is generally assumed to have a scale in which 1 unit = 1 metre). I added an offset to all coordinate values so that (0,0,0) in Unity worldspace corresponded to my desired origin (Norwich, which is about 600 in OSGB) and kept scale the same.I’ve not used TerrainComposer at all, but so long as you can export data with a similar flat projection it should be quite straightforward.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |