Quantcast

Google Mercator

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Google Mercator

Nick Hopton
I avoid using the Google Mercator CRS (EPSG:900913, in QGIS Master) in QGIS projects because I know that it has problems. For example, users get into trouble trying to measuring distances using the tape measure. But people do use Google Mercator for projects and a recent post here suggest that they also do things like calculating the areas of polygons from shapefiles projected to EPSG:900913.

This looks like a dangerous thing to do. Recently I created a test shapefile containg one object, a polygon, square and having sides 100 km in length. This corresponded with the extents of the British Ordnance Survey's 100 km grid square 'SU'.

The shapefile was loaded into QGIS and the layer CRS and the project CRS were set to EPSG:27700. I then used the field calculator to calculate the area of the polygon, which it did correctly (10,000 sq km).

I then reprojected the shapefile to EPSG:900913 and used the field calculator to calculate the area of the polygon. The area of the 100 km x 100 km square was now reported as being *25502 sq km*.

One other oddity came to light too. As mentioned, I loaded the shapefile projected to EPSG:27700 into QGIS, set the layer CRS and the project CRS to EPSG:27700. The 'Identify Features' tool then correctly reported the area of the polygon correctly (10,000 sq km). Enabling OTF and checking again with the 'Identify Features' tool then produced an area of 9,980 sq km. But why?

Any comments?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Mercator

Hannah Pethen
I have observed a similar problem with Google mercator and vector files. I have a google satellite map, and several point vector files all in google mercator transformation, but the relationship between the locations on the map and the locations of the points of the vector files are not stable. If I open print composer or change the zoom I find the points have moved relative to the map, so that my points are not longer in the correct places, although I don't know whether the points or the map have moved (or both?). The same thing happens with vector line files. This happens whether or not I have 'on the fly transformation' checked and if I check 'on the fly transformation' and then use vector files in another transformation (e.g. EPSG4326) the same problem occurs. I wonder if there is an issue with the stability of the transformation and if this is affecting both my point locations and the polygon areas referred to by Nick.
 
Hope this is useful to anyone working in Google mercator.

From: Nick Hopton <[hidden email]>
To: [hidden email]
Sent: Tuesday, April 10, 2012 10:51 AM
Subject: [Qgis-user] Google Mercator

I avoid using the Google Mercator CRS (EPSG:900913, in QGIS Master) in QGIS
projects because I know that it has problems. For example, users get into
trouble trying to measuring distances using the tape measure. But people do
use Google Mercator for projects and a recent post here suggest that they
also do things like calculating the areas of polygons from shapefiles
projected to EPSG:900913.

This looks like a dangerous thing to do. Recently I created a test shapefile
containg one object, a polygon, square and having sides 100 km in length.
This corresponded with the extents of the British Ordnance Survey's 100 km
grid square 'SU'.

The shapefile was loaded into QGIS and the layer CRS and the project CRS
were set to EPSG:27700. I then used the field calculator to calculate the
area of the polygon, which it did correctly (10,000 sq km).

I then reprojected the shapefile to EPSG:900913 and used the field
calculator to calculate the area of the polygon. The area of the 100 km x
100 km square was now reported as being *25502 sq km*.

One other oddity came to light too. As mentioned, I loaded the shapefile
projected to EPSG:27700 into QGIS, set the layer CRS and the project CRS to
EPSG:27700. The 'Identify Features' tool then correctly reported the area of
the polygon correctly (10,000 sq km). Enabling OTF and checking again with
the 'Identify Features' tool then produced an area of 9,980 sq km. But why?

Any comments?

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Google-Mercator-tp4735771p4735771.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user



_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Mercator

Albin Blaschka-5
In reply to this post by Nick Hopton

Hello!

There are some possible pitfalls with the so-called Google Mercator
projection - look for example at

http://www.hydrometronics.com/downloads/Web%20Mercator%20-%20Non-Conformal,%20Non-Mercator%20%28notes%29.pdf

Specially at pages 5, 9 and 13 in the pdf linked above...might be the
root of the problem... The summary brought there is: Use Google Mercator
only for visualisation, but not for anything else...

And also interesting:

http://alastaira.wordpress.com/2011/01/23/the-google-maps-bing-maps-spherical-mercator-projection/


All this is not really a solution, but maybe an explanation...

regards,
Albin


Am 10.04.2012 11:51, schrieb Nick Hopton:

> I avoid using the Google Mercator CRS (EPSG:900913, in QGIS Master) in QGIS
> projects because I know that it has problems. For example, users get into
> trouble trying to measuring distances using the tape measure. But people do
> use Google Mercator for projects and a recent post here suggest that they
> also do things like calculating the areas of polygons from shapefiles
> projected to EPSG:900913.
>
> This looks like a dangerous thing to do. Recently I created a test shapefile
> containg one object, a polygon, square and having sides 100 km in length.
> This corresponded with the extents of the British Ordnance Survey's 100 km
> grid square 'SU'.
>
> The shapefile was loaded into QGIS and the layer CRS and the project CRS
> were set to EPSG:27700. I then used the field calculator to calculate the
> area of the polygon, which it did correctly (10,000 sq km).
>
> I then reprojected the shapefile to EPSG:900913 and used the field
> calculator to calculate the area of the polygon. The area of the 100 km x
> 100 km square was now reported as being *25502 sq km*.
>
> One other oddity came to light too. As mentioned, I loaded the shapefile
> projected to EPSG:27700 into QGIS, set the layer CRS and the project CRS to
> EPSG:27700. The 'Identify Features' tool then correctly reported the area of
> the polygon correctly (10,000 sq km). Enabling OTF and checking again with
> the 'Identify Features' tool then produced an area of 9,980 sq km. But why?
>
> Any comments?
>

--
| Albin Blaschka, Mag.rer.nat.
| Etrichstrasse 26, A-5020 Salzburg
| * www.albinblaschka.info * www.thinkanimal.info *
| - It's hard to live in the mountains, hard but not hopeless!
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Google Mercator

Andre Joost
In reply to this post by Hannah Pethen
Am 10.04.12 12:33, schrieb Hannah Pethen:

> I have observed a similar problem with Google mercator and vector
> files. I have a google satellite map, and several point vector files
> all in google mercator transformation, but the relationship between
> the locations on the map and the locations of the points of the
> vector files are not stable. If I open print composer or change the
> zoom I find the points have moved relative to the map, so that my
> points are not longer in the correct places, although I don't know
> whether the points or the map have moved (or both?). The same thing
> happens with vector line files. This happens whether or not I have
> 'on the fly transformation' checked and if I check 'on the fly
> transformation' and then use vector files in another transformation
> (e.g. EPSG4326) the same problem occurs. I wonder if there is an
> issue with the stability of the transformation and if this is
> affecting both my point locations and the polygon areas referred to
> by Nick.
>

You could try using EPSG:3857 instead of EPSG:900913. For some strange
reasons raster data transformed to EPSG:900913 is located on the map
different from EPSG:3857 projected rasters. Maybe another
Qgis-guesses-projection-issue.

Greetings,
Andre Joost


_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Loading...