Showing posts with label georeference. Show all posts
Showing posts with label georeference. Show all posts

Saturday, January 21, 2012

Mapping New York - GPS and quality control

Last time, we loaded up a photograph of an old map of the Mohawk River State Park (the former Schenectady Museum Nature Preserve) and traced its borders to put them in our map. It turns out that I have multiple sources of data regarding this pretty parcel of undeveloped public land - including my own boots on the ground. In this installment, I'm going to have a look at superimposing them and comparing them.

The first additional data source is a set of GPS tracks that Andy Arthur obtained under Freedom of Information laws. These show the trail routings in New York state park lands, much as the DEC files do for the state forests. (I may at some point discuss the data quality of those files; they're available in several redundant formats, and the data do not match.)

The second additional data source is that I tried walking the trails about a month ago with a GPS receiver. Unfortunately, it was the GPS on my Android phone, which suffered an operating system crash partway through the walk. But I was able to recover my tracks for at least one of the trails, the blue trail (marked as 'purp' in the DEC files) that runs from the entrance by the Lock 7 parking up to the east power line near River Road.

Mohawk River State Park trails
To compare what I found, I added vector layers with the KML file of the park (orange) and with the GPX file from my phone (blue). Looking at them superimposed in QGIS, I note the following.

  1. In the southern part of the preserve, the old trail map is largely schematic. I know from experience that the white trail follows the ridge top on the east bluffs and always has. The orange tracks match my memory, even if the phone had stopped recording.

  2. Similarly, the orange GPS tracks and my tracks (I *know* that I was following the blue blazes) largely align. on the blue trail, placing it a bit to the south of where the old map puts it.

  3. It also appears that whoever laid out the orange tracks missed a double blaze at one point and just bashed north to the power line. The blue blazes weren't hard to follow, and I have confidence in my track at that point.

  4. The orange tracks look a good bit better aligned with the map up at the north end near Whitmyer Drive. (There were better defined lanes through the old tree nursery, so this doesn't really surprise me.)


Conclusion: I have a lot of confidence in the park outline that I traced and in the alignment of the blue trail in my GPS tracks. I need more ground data for the rest of the trails before I'm willing to make my map available as something nearly definitive.

Before the snow gets too deep, I hope!

Read more...

Tuesday, January 17, 2012

Mapping New York - georeferencing an old map

Last time, I mentioned that the Mohawk River State Park (former Schenectady Museum Nature Preserve) is missing from my map - because it appears neither in OpenStreetMap nor in the New York State inventory of public lands. How can I get it included?

Fortunately, I found online that someone had snapped a photograph of an old copy of the map that had once been posted at the Whitmyer Road parking lot, and posted it to a mountain bike forum. The picture looks to be output from a CAD system, or perhaps an early GIS. In any case, it appears to have been done to scale, and have just enough points that we can reference it to the map. Let's give it a try.



Pull up ‘Plugins->Georeferencer->Georeferencer’ from the QGIS menu bar.
Georeferencing a map

Select the ‘Open Raster’ button in the toolbar, and load the ‘niskabike.jpg file that we downloaded from the mountain bike forum. Zoom in a couple of levels; you can use the ‘hand’ tool to pan around, just as you can with the map.

Now we have to identify corresponding points in the two maps. Click the ‘Add Point’ button in the toolbar, and click a point for which we can identify a corresponence. (I used the intersection of Whitmyer Drive and River Road as the first point.)
Adding a control point
A dialog appears asking what corresponding point in the map to use. Click ‘From map canvas’ and select the point on the main map. The co-ordinates will be filled into the dialog box. Click ‘OK’

Continue this process for identifiable points that cover the map over a wide area. I used the turn of Whitmyer Road, the right angle in the upstream breakwater above the lock, the junction of the lock's retaining wall with the dam, the turn of Lock 7 Road near the parking area, and the junction of River Road and Rosendale Road.

Once you have a data table of corresponding points, you can let the georeferencer do its job by selecting ‘Start georeferencing’ in the toolbar.
Transform settings for georeferencer
You will need to fill out the dialog that appears, at least giving it a TIFF file for the output, and a projection to use (which should usually be the projection of the main project). The rest of the choices should be filled out as shown.

Clicking ‘OK’, we get the old map loaded up as a layer in the QGIS project. Lowering this layer in the stack (I put it below the contour lines), we can see that it aligns nearly perfectly. The retaining wall of the lock, the roads, and the bike path all superimpose nicely. The stream appears to have meandered a little, but it's pretty soggy around there, and I'll say that it's good enough.
Georeferenced map

Now we can start transcribing data by tracing over the old map. Create a new shapefile layer, choosing a Polygon layer, and adding a few attributes.
Create a new layer
In the new layer, turn on edit mode (‘Toggle Editing’ in the toolbar). Create polygons that outline the land parcels of interest. Save the newly-created shapefile, and turn editing mode back off.

Lower the layer below the relief shading, style the land use appropriately, remove the temporary layer with the old map, and we're done.

(I could have transcribed the walking tracks, and so on, but I have other data sources for them. So read on to the next installment to see where that material is coming from.)

Read more...