0

I have received a geocoded .png image (2380 x 2396 pixels) that comes with a world file containing georeferencing information in UTM format:

worldFileParams = [0.5,0.0,0.0,-0.5,690920.0,5335407.5]

Now, I would like to overlay this image with map data. I thought about using OSM data for that purpose. In order to solve the task, I tried the following workflow:

  1. Download shapefile of OpenStreetMap data from https://mapzen.com/data/metro-extracts/
  2. Load both shapefile(s) and .png raster image in QGIS.

However, this surely naive approach hasn't worked, as both datasets are not co-located in QGIS, which is probably caused by the fact that QGIS data is provided in WGS84 (EPSG:4326) coordinates, while the png world file data is in UTM32N (EPSG:32632). When I try to reproject the png file, I receive the error

ERROR 1: latitude or longitude exceeded limits ERROR 1: Too many points (2401 out of 2401) failed to transform, unable to compute output bounds.

Thus, long story short: What can I do to reach my goal? Although using GDAL, QGIS, MATLAB and OpenStreetMap would come in handy for me, I am not bound to using these things.

  • How did you try to reproject the png file? There should be no problem if you do it right and the top-left coordinate should change into 11.5666096466514 48.1432449377215 as long-lat coordinates. – user30184 Jan 11 '18 at 11:58
  • Apparently I made a mistake before. Now I have used gdalwarp -overwrite -s_srs EPSG:32632 -t_srs EPSG:4326 -of GTiff imageUTM.png imageWGS.tif and it worked... – Michael Jan 11 '18 at 12:16
  • Still, the shape file representation of OpenStreetMap does look nothing like the original online OSM product. How can one generate a raster map from OSM data? – Michael Jan 11 '18 at 12:25
  • 1
    the OSM data is in raw WGS84 (EPSG:4326) CRS and, depending on your on-the-fly-projection settings in QGIS but I assume, is displayed as such. the OSM webmap is projected in Spherical Mercator ('WebMercator', e.g. EPSG:3857). try setting the on-the-fly-projection (bottom far-right button in QGIS) to EPSG:3857 to get the same visual representation. generating raster data from OSM data is a whole different topic...quite unlikely to be what you want and rather unusual. – ThingumaBob Jan 11 '18 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.