Global Mapper v25.0

OpenStreetMap datum is wrong

TobWen
TobWen Global Mapper UserTrusted User
edited October 2010 in Bug Report
Hi there,

I've just noticed that you're using the wrong datum for OpenStreetMap tiles!
You're using: Mercator (projection) on WGS84 (datum) => EPSG:3395
Correct setting would be: Mercator on a spheroid with a radius of 6378137 m => EPSG:3857 aka "900913"
This one is used by OpenStreetMap, Google Maps, Yahoo Maps, Bing Maps and so on.

You can have a look at the detailed parameters here: http://www.epsg-registry.org/ (retrieve by code)
proj4 parameters for 3857: "proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"

The results are similar, but wrong is wrong ;-)

Best regards,
Tobias

Comments

  • global_mapper
    global_mapper Administrator
    edited September 2010
    Tobias,

    Actually the 900913 projection with the "Google Maps" datum is used internally for pulling down the OpenStreetMap tiles, they are just converted to WGS84 as they are pulled down as that datum will be more familiar to people and usable in other software applications.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TobWen
    TobWen Global Mapper User Trusted User
    edited September 2010
    Actually the 900913 projection with the "Google Maps" datum is used internally for pulling down the OpenStreetMap tiles, they are just converted to WGS84 as they are pulled down as that datum will be more familiar to people and usable in other software applications.

    D'oh ... you're right. In Raster Options, the correct datum is selected.
    Changing the display projection to 'Google Maps' datum make them parse much faster, of course.

    Another question: Why is the resolution of the OSM-layer limited?
    Mapnik-layer serves tiles up to zoomlevel 18, GlobalMapper stops loading at level 16 and starts interpolation.
    It's easy to detect this bug, since housenumbers start at level 17 and they never appear on GM ;-(

    Best regards,
    Tobias
  • global_mapper
    global_mapper Administrator
    edited September 2010
    Tobias,

    I took a look and found a layer being left off at the bottom. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit v11 version there is a new build at http://www.globalmapper.com/global_mapper11_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TobWen
    TobWen Global Mapper User Trusted User
    edited September 2010
    I took a look and found a layer being left off at the bottom. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try.

    Great, works fine! And another issue ... perhaps only a rounding bug in calculation formular:
    GM sets the 1:1 pixelscaling of OSM to 0.59716428; everything looks a little bit blurry. When setting it to 0.6 it looks exactly like the view in OpenLayers.
  • global_mapper
    global_mapper Administrator
    edited September 2010
    I updated the sample spacing to round to the nearest 10th of a meter (the small difference was due to what ellipsoid model the pixel size in meters was calculated against), so you should now get 0.6 by default. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit v11 version there is a new build at http://www.globalmapper.com/global_mapper11_64bit.zip .

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TobWen
    TobWen Global Mapper User Trusted User
    edited September 2010
    In metadata, there's still "0.597 meters PIXEL WIDTH & PIXEL HEIGHT".
    Perhaps 0.597 is correct? If you compare OpenLayer's view at highest resolution with spacing of 0.597, it'll look nearly equal (small distortion only). If you compare it to a spacing of 0.6 it doesn't fit. 0.597 also fits much better than 0.6.

    I think, the spacing changes according to the location ... I have to do some calculations and will come back to you then.

    Another another idea: Could you please turn off resampling automatically, when zooming to 1:1 Pixel Mapping? The resampling is usless when working at this resolution at makes the image looks very weak and unsharp. And it uses some CPU power ;)
  • TobWen
    TobWen Global Mapper User Trusted User
    edited September 2010
    Oh, just another thing:
    When zooming to scale 4500 (which is about tile level 17), GM takes tiles from tile zoomlevel 18 and resizes them. You can't read any text, since this tile hasn't been rendered for scale 4500. Can you make GM download tile zoomlevel 17 and resize based on this one?

    Addition to #7:
    I was right ... the scale and spacing varies with latitude.
  • TobWen
    TobWen Global Mapper User Trusted User
    edited September 2010
    Addition to the additon (sorry, you can't edit any posts older than 5 minutes) ... Formular:
    ground resolution = (cos(latitude * pi/180) * 2 * pi * 6378137 meters) / (256 * 2^level pixels)

    OGC (Open Geospatical Consortium) defince a standard pixel size of 0.28, which is about 90.7 ppi. Is GlobalMapper working with 96 ppi? The tiles are rendered at 0.28 mm/90.7 ppi since maping uses this standard!
  • global_mapper
    global_mapper Administrator
    edited September 2010
    Global Mapper doesn't use any kind of DPI standard, it will use the DPI of your display to determine what map to get. It basically looks at the meters per pixel on your display as compared to the meters per pixel of each layer of the OpenStreetMap data to determine which layer to pull from.

    I did go ahead and make the OSM tiles underzoom a bit to make the text more readable. I have placed a new build at http://www.globalmapper.com/global_mapper12.zip with the change for you to try. Simply download that file and extract the contents into your existing v12.xx installation folder to give it a try. If you are using the 64-bit v12 version there is a new build at http://www.globalmapper.com/global_mapper12_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapper
    global_mapper Administrator
    edited September 2010
    Forgot to mention, you shouldn't be getting any resampling on your OSM data unless you have specifically enabled it or checked the option in the Advanced section of the Configuration dialog to automatically resample raster/imagery on import.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TobWen
    TobWen Global Mapper User Trusted User
    edited September 2010
    Global Mapper doesn't use any kind of DPI standard, it will use the DPI of your display to determine what map to get. It basically looks at the meters per pixel on your display as compared to the meters per pixel of each layer of the OpenStreetMap data to determine which layer to pull from.

    Ah, I see. Let me do some calculations over the weekend. Perhaps I can figure out what gets wrong.
    I did go ahead and make the OSM tiles underzoom a bit to make the text more readable.

    Thanks, this looks much nicer now!
  • TobWen
    TobWen Global Mapper User Trusted User
    edited October 2010
    Okay, coming back to the initial problem.
    I've found out that the pixel scale of those tiles always get calculated with latitude = 0!

    For ground resolution at zoomlevel 18 with latitude 0 this means:
    (cos(0) * 2 * pi * 6378137) / (256 * 2^18)
    = (6378137 pi) / 33554432
    = 0.59716428347793...

    I've generated my own tiles with worldfiles, which you can download here:
    http://87.230.55.31/osm_test.zip | Projection: Mercator, Datum: Google Spheroid
    As you can see, they perfectly fit! Good work.

    Could you please set back the pixel spacing for the GM-tile download to
    the calculated value above? 0.6 was wrong, 0.59716428347793... was right.

    Best regards,
    Tobias
  • global_mapper
    global_mapper Administrator
    edited October 2010
    Tobias,

    I have removed the rounding to the nearest tenth of a meter resolution for OSM export defaults. I have placed a new build at http://www.globalmapper.com/global_mapper12.zip with the change for you to try. Simply download that file and extract the contents into your existing v12.xx installation folder to give it a try. If you are using the 64-bit v12 version there is a new build at http://www.globalmapper.com/global_mapper12_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TobWen
    TobWen Global Mapper User Trusted User
    edited October 2010
    Very good work! Everything fits now!