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:
- Bikeways and libraries from the City of Vancouver. (Both are SHP files.) These are the data that don't align with the others.
- A map of British Columbia from Open Street Map. I put the data into a database using osm2pgsql.
- A world map that's part of the Open Street Style project.
Projections:
- 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
- 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
- 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?
Answer
What we really have to find out here are the projections of your input data.
City data
The Shapefile comes with a .prj file that is perfectly interpreted by QGIS. Don't change the layer settings!
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).
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.
No comments:
Post a Comment