11

So I'm pretty new to GIS, and I'm working on a mapping project using data for Vancouver, Canada. I want to combine OpenStreetMap data along with data provided by the City of Vancouver. But the City data don't line up with the OSM data when I map them in QGIS.

Following the advice of an answer to Projected maps should but do not overlap in ArcMap?, I checked the two data sources against a third (a map of the world). The OSM data is right -- British Columbia is in the right spot -- but the City data puts Vancouver in the south of France.

My data sources are:

  1. Bikeways and libraries from the City of Vancouver. (Both are SHP files.) These are the data that don't align with the others.
  2. A map of British Columbia from Open Street Map. I put the data into a database using osm2pgsql.
  3. A world map that's part of the Open Street Style project.

Projections:

  1. The City data are projected in UTM zone10, NAD83 (CSRS). I've selected this in QGIS's Layer Properties screen for those layers. Projection string: +proj=utm +zone=5 +ellps=GRS80 +datum=NAD83 +units=m +no_defs
  2. The OSM maps are in Mercator projection. QGIS has many Mercator choices, and I wasn't sure which one to use, so I guessed "Popular Visualization CRS / Mercator". +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
  3. For the world map, Quantum GIS loaded the projection from the .prj file. That's +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 +wktext +over +no_defs

Projected maps should but do not overlap in ArcMap? talks about zone problems. That sounds like what I might be experienceing. So I tried changing the libraries from UTM zone 10N to other zones (15N and 60N) but nothing changed.

Does anyone have suggestions for what to try next?

Evan
  • 1,103
  • 4
  • 10
  • 17
  • 2
    If your Vancouver data is in UTM zone 10N, is the proj string suppose to read +proj=utm +zone=10 and not +zone=5 because I would think zone 5 is very close to somewhere in the UK (starts with a G...) and that is why your data is coming up in France – SaultDon Aug 18 '11 at 04:24
  • You can head to http://lrdw.ca and download the UTM Zones shapefile with a BC Albers projection. Login as a guest and go to the 'Top Products' page; it's near the top. Pull that file into your QGIS project and see if your two datasets fall within zone 10N - using BC Albers as the "on the fly" CRS transformation (has to be enabled first Shift+Ctrl+P then place a checkmark in the required box). – SaultDon Aug 18 '11 at 04:28

3 Answers3

12

What we really have to find out here are the projections of your input data.

  1. City data

    The Shapefile comes with a .prj file that is perfectly interpreted by QGIS. Don't change the layer settings!

  2. OSM data

    If you are using OSM vector data, they are in WGS84 Geographic coordinates (EPSG:4326). Only the raster tiles are in Web Mercator (EPSG:900913).

  3. Open Street Style data

    If QGIS recognized the .prj content, leave it that way.

Finally, chose a project coordinate system (I'd suggest the UTM one) and activate on-the-fly reprojection as @Mike_Toews already explained.

underdark
  • 84,148
  • 21
  • 231
  • 413
6

You need to reproject the different layers to the same projection 'on the fly'. Go to:

Settings > Project Properties... > Coordinate Reference System (CRS)

and check on Enable 'on the fly' CRS transformation

Mike T
  • 42,095
  • 10
  • 126
  • 187
  • 1
    A small clarification: Using 'on the fly' will not re-project in the true sense as the files will retain their source projection, but instead be 'drawn' dynamically with a different projection that you specify. This answer will help you to get started in troubleshooting with QGIS. – SaultDon Aug 18 '11 at 04:34
  • 1
    disregard most of my comment above because his wording is actually correct, its my brain that wasn't =P – SaultDon Aug 18 '11 at 04:46
1

I just had this issue adding two rasters, one in UTM and one in Geographic. I followed the directions enabling on the fly projection but nothing happened. I removed the layers, and re-added them and the problem was solved

John
  • 11
  • 1