Tuesday, March 20, 2012

Trip report: Balsam Mountain (Ulster County) 2012-03-17

Balsam Mountain

Saint Patrick's Day, and the last weekend of winter by the calendar: Kevin and Catherine decide to try for one more "winter" high peak in the Catskills. Alberto, a colleague of Kevin's from work, has been asking to come along on these outings, and so Kevin invites him as well.
The three get on the road about 0730, and hit the trail before 1000. (Everyone shakes their heads at the all-too-obvious evidence of Hurricane Irene's wrath in the Schoharie Valley: it will be years before things are rebuilt there.)

Trailhead

At 3610 feet, Balsam is one of the 35 Catskill 3500's. (And it's one that the club says has to be climbed in the winter.) It seems a little like cheating to claim a "winter" ascent in such wonderful weather, but all technicalities count.

We start up from Rider Hollow to the west, climbing the Oliverea-Mapledale Trail. The trail has had the benefit of two newly rebuilt footbridges: one fellow hiker tells us that one of them went up in the last week.

Footbridge

Nevertheless, it has several extra stream crossings because of washouts. Catherine and Alberto rock-hop all of these confidently. Kevin, whose balance is considerably poorer, decides to put on Neoprene kayak shoes and wade across. (FSM bless wetsuit material, this process is comfortable even in fresh snowmelt.)

Washout

We find that the Rider Hollow lean-to is a pigsty, bring out a big plastic bag and trash it out. (Why, oh why, do so many hikers expect others to clean up after them?)

The trail conditions continue poor for some distance, as the streambank is badly eroded and there's a considerable amount of blowdown. At one point, we lose the trail entirely (we don't lose ourselves, because we know that the trail more-or-less follows the creek and we'll run into it again), and suddenly realize that it's some distance above us. We whack up the hill and rejoin it.

Lost the trail

The trail ascends steeply all the way to the ridge between Balsam Mountain and Haynes Mountain. On the way, we pass some magnificent old-growth trees, including some majestic hemlocks that must be 3-4 centuries old - look at the diameter of that behemoth at far right!

Majestic hemlocks

Turning left at the trail junction, we climb more gradually up the ridge past the 3500 foot marker.

3500 feet

Very shortly after it, the trail goes up a short ledge and steps into another world: the ash, beech and striped maple are suddenly replaced by balsam fir and scrubby gray birch. The abruptness of the transition never ceases to amaze.

Entering the subalpine zone

The Balsam Mountain summit lies only a few steps beyond, and we stop for the obligatory summit photos.

Alberto at the summitKevin and Cathy at the summit

The actual summit is almost viewless, but there's a nice overlook a short distance to the north, where the trail briefly crosses over from state wilderness into Nature Conservancy land. At this point, since we're descending on a north face, the trail starts getting icy. Catherine is able to rock-hop confidently - she's a native of a cold climate. She lends Alberto her microspikes, so Kevin and Alberto are able to be sure-footed. When we reach the overlook, we engage in compulsive photography and cook lunch.

View from the overlook
Cooking lunch
Panorama from the overlook

After lunch, everyone's feeling strong, and we've still got a lot more daylight. We decide to make an attempt at a second Catskill high peak, Eagle Mountain, a couple of miles (and a couple of 500-foot or so elevation gains) to the south. We get as far as the viewless summit of Haynes Mountain (which stands 80 feet short of being a high peak in its own right) and descend to the col between Haynes and Eagle. When we get down there, the safety factors start running against us:
  • Alberto is having trouble with a boot. (Kevin would have helped with the burgeoning blister, had he heard sooner!)

  • The party is starting to tire.

  • The slope faces due north, and is icier than anything we've encountered all day. Cathy wants her spikes back if she's going to try it (and Alberto has no traction aids, wouldn't really have needed them on the hike we planned originally).

  • Haynes took longer than we thought, and if we summit Eagle, we'll be running out of daylight by the time we're back at the trailhead.

So we make the hard decision of leaving Eagle Mountain for another day, and turn back.

Descent is uneventful. We stop off at the spring on the west side of the pass to pump some more water - we're all running a bit short, and have an easier time following the trail down the hill (although there's still some steep scrambling to 'whack around the washouts!). Kevin even keeps his boots on.

Out to the trailhead, and on the road home with an hour of daylight to spare.

What worked: Kevin and Alberto seem to be reasonably well suited as hiking partners. One is a tortoise, the other is a snail, so neither is going to hold up the other.

Kahtoola microspikes were a wonderful invention. Crampons would have been overkill, but Kevin and Alberto needed something. (And they seemed to be the uniform of the day on the other hikers we met!)

Cathy was a trouper, hauling more than her share of random stuff (including rubbish from the lean-to).

The spirit stove burns hot, cooks fast. Its flames are invisible in daylight, so be careful. (Nobody got burnt!)

Turning back was 100% the right decision. Arrival is optional, safe return is mandatory.

What didn't work: Kevin's Android phone's GPS is still problematic, despite having got a kernel patch that ostensibly fixes that bug. Alberto's Droid kept the track well, even though Kevin's crashed a couple of times.

Freezer bag cooking in a Reflectix bag cozy is not a guaranteed process. The contents of the bag got rapidly dumped into the pot after it burst. (No more than a spoonful of food was lost.)

Lessons learnt: Alberto needs his own traction aids, and needs to duct-tape his heels before starting out - or at least at the first sign of a hot-spot.

The electronic version of the DEC trail map lies. It misplaced the campsite above the Rider Hollow lean-to as being by the parking lot, it misplaced the lean-to itself as being up at the fork in the stream, and it placed the lookout directly on the north (false) summit of Balsam. And it misrouted the blue Pine Hill-West Branch trail - the magenta track in the map above shows us following the trail both directions. (Why would it take any route other than the ridge?)

Google Earth visualization of the route:
Google Earth visualization of the track

Read more...

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...

Mapping New York - point data

We're just about done with the basemap. While we'll eventually augment it - we'll come back later to adding things like hiking tracks in the state forest lands - I'll skip them for now because they're irrelevant to my map of the Niskayuna nature preserves.

About all that remains is to add data about points of interest (and other single-point features).
All of the data that I'm adding at this step is already in the database from the ‘new_york.osm’ file. It's all in the 'point' table.

The OSM point data is, you should forgive the expression, all over the map in terms of what it describes. In order to get it to layer correctly with other things, I've broken it out into multiple layers in the QGIS project:

  • Highway points - those for which

    upper(geometrytype("way")) IN ('POINT','MULTIPOINT')
    AND "highway" IS NOT NULL
    AND "highway" NOT IN ('bus_stop', 'crossing', 'stop_sign', 'street_lamp,
    'traffic_signals', 'traffic_signals;motorway_junction',
    'unclassified', 'yield')

    These are things like roundabouts, turning circles, and freeway interchanges. They layer right next to the roads, and have a simpleminded style sheet. (The only thing of interest is that its symbols are sized in map units rather than millimetres - I represent a traffic circle by a circle of diameter 15 m at map scale.) Eventually, I want to do better labeling for numbered interchanges, but that can wait for a version of QGIS that has highway shields.

  • A mixed bag of features that includes schools, houses of worship, hospitals, public toilets, miscellaneous buildings, helipads, gates, and boat launches. (I expect this list to expand over time, depending on what is relevant to a given map. There are dozens of things that might be included.)

    upper(geometrytype("way")) IN ('POINT','MULTIPOINT')
    AND place IS NULL
    AND highway IS NULL
    AND (amenity IS NULL OR amenity NOT IN ('fire_hydrant'))

    This layer goes above the building footprints.

  • Place names (and names of dams, which are shown the same way). This layer is topmost in the stack. Its style displays nothing. It merely exists as a place for the labeling engine to add the names of objects.

    "place" IN ('city', 'hamlet', 'island', 'islet', 'locality', 'suburb',
    'town', 'unincorporated_area', 'village')
    OR "waterway" IN ('dam')



With all of this in place, the map appears quite informative - except that it's missing one of the preserves that I want to show! (The Mohawk River State Park, formerly the Schenectady Museum Nature Preserve.) In the next installment, I'll try to get that on the map.

In the meantime, here are the style sheets for the layers I discussed in this lesson:



Read more...

Monday, January 16, 2012

Mapping New York - shading the relief

Last time, we added polygons to our base map that describe land use and show building footprints. Now let's make the map prettier by giving it shaded relief.

Recall that when we were drawing the contour lines, that I mentioned that we should keep the Digital Elevation Model (DEM) files around. Now we'll be returning to them, and getting shaded relief for them.

To do that, we create the shading layers for individual quadrangles. (While this process is running, you probably want to uncheck 'Render' in the status bar; updating the screen with the results is expensive.)

Select ‘Raster->Analysis->DEM (Terrain Models)’ from the ‘Raster’ menu.
Generating shaded relief
(1) In the ‘Input File,’ browse to a DEM file for a quadrangle that you saved from the earlier step. In the ‘Output File,’ enter (or browse to) the path of a new TIFF file that will hold the relief shading.

(2) Select ‘Hillshade’ under ‘Mode.’ You can leave all the other options at their default settings.

(3) Select ‘Load into canvas when finished,’ and select ‘OK’

Repeat the process for any other quadrangles that you need to process, then select ‘Close’ to dismiss the dialog.

Now drag the new layers in the left-hand column of the screen to a position below the 'subregions' layer but above the 'land use' and 'public lands' layers.

Right-click each of the new layers, and pull ‘Properties’ from the context menu.
Setting transparency
Go to the ‘Transparency’ tab, and change ‘Global Transparency’ to 50%.

Turn 'Render' back on in the status bar, and admire your shaded-relief map.
Shaded relief

Next installment: Adding some point features.


Read more...

Mapping New York - more polygons

Last time, we got the map to a pretty decent topographic road map. (In a future installment, I may discuss curating the OpenStreetMap data; it has recurrent errors that come from the Census Bureau TIGER files. But that's a side issue.) The next thing that I want to get into place is some polygon data: "who owns this land? What's it used for? Does the public have right of access? Where are the landmark buildings?

The relevant part of the first set of questions can mostly be answered by a database of publicly-owned lands. This database is getting into territory where the public databases aren't quite up to snuff. Within the Adirondack and Catskill Blue Line, the data are readily available from NYSGIS. The usual drill of using ‘ogr2ogr’ loads them into PostGIS:

ogr2ogr -f PostgreSQL -overwrite -t_srs EPSG:32618 \
"PG:dbname=gis" DEC_Lands.shp \
-nln nys_dec_lands -nlt MULTIPOLYGON -lco PRECISION=NO

Once again, the ‘-t_srs’ option is there to reproject the data into the projection that I intend to use for the finished map, and the ‘-lco PRECISION=NO’ works around a bug that causes a failure in inserting some of the numeric data.

Outside the Blue Line, the data come from a different place: the New York State Office of Cybersecurity. (I'd be intrigued to know why they became the custodian of the data.) In any case, they have a collection of files available on the NYSGIS web site.

Rather than putting each of these files into a separate table in the database, and hence needing a separate layer to show them, I decided to integrate them into a single table, and add a column to the data representing which data set a given row came from. For this, I decided to resort to scripting. Pulling out my handy-dandy Tcl interpreter, I ran the following loadall.tcl script:

set firsttime true
# Find all the shapefiles in the working directory
foreach file [glob *.shp] {

# Extract the base name of each file, and create an 'ogr2ogr' command to load it
set base [file rootname [file tail $file]]
set cmd [list ogr2ogr -f "PostgreSQL"]
if {$firsttime} {
set firsttime false
lappend cmd -overwrite
} else {
lappend cmd -append
}
# Add a 'data_source' column to identify which file we loaded
lappend cmd -sql "SELECT *, '$base' AS data_source FROM $base" \
-t_srs EPSG:32618 \
-skipfailures \
"PG:dbname=gis" \
$file \
-nln nys_public_land_boundaries \
-nlt MULTIPOLYGON \
-lco PRECISION=NO
# Report on the console which file we're processing, and load it
puts $cmd
exec {*}$cmd >@stdout 2>@stderr
}

With these boundaries, what I mostly care about is “recreational” (go ahead and access) versus “nonrecreational” (permission needed, or special land use such as prisons and schools). (And I also want to treat the ‘AdirondackCatskill’ file specially, because that's the Blue Line, rather than reflecting public ownership.

Both of these layers need some styling. Rather than walk through that whole process, I have QML files attached at the end of the post.

Dealing with OpenStreetMap polygon data is rather more complicated, because it's got so many different things in the same file. I therefore made several different layers, with SQL queries to extract specific features.

(1) The first layer, I just left with the name, new_york_osm_polygon. This layer really represents "here are polygons that I don't know what to do with, yet." It is stacked behind everything else, and I usually leave it unchecked unless I'm actively working on styling for polygons. Its query looks like:

admin_level IS NULL
AND ("boundary" IS NULL OR "boundary" NOT IN ('national_park'))
AND ("waterway" IS NULL OR "waterway" IN ('boatyard','dam','dock','rapids','waterfall'))
AND ("natural" IS NULL OR "natural" NOT IN ('bay', 'marsh', 'pond', 'swamp', 'water','waterway','wetland'))

This query excludes:

  • Anything with an ‘admin_level’ attribute: these are administrative regions (states, counties, cities, towns, etc.)

  • National park boundaries. I have these more accurately in the NYS Public Lands file.

  • All waterways, other than man-made assets on the water.

  • All wetlands, I've taken care of those already.


I style this letter either in bright yellow or icky purple, just to call attention to the unclassified features.

(2) The next layer is the layer where I describe land use. Its SQL query looks like:

"landuse" IS NOT NULL
OR ("leisure" IS NOT NULL AND "leisure" NOT IN ('ice_rink','pitch', 'track', 'tennis_court'))
OR "aeroway" IS NOT NULL
OR (amenity IN ('school', 'college', 'university', 'hospital') AND building IS NULL)

which translates to:

  • Land use polygons

  • Polygons marked 'leisure', except for a handful that usually appear inside parks and want to be rendered at a higher level.

  • Polygons marked 'aeroway'.

  • Polygons marked 'school', 'college', 'university', or 'hospital', except for buildings (these allow highlighting of campuses).


This set may need to be considered a work in progress; I expect these rules will need to be tweaked depending on the theme of the map.

For this layer, I created a fairly complex style with rules that fill the polygons in different colors according to land use. The QML is attached.

(3) Next up are the 'public lands' and 'DEC lands' layers, which I already discussed.

(4) Next, I have a few more types of region from OpenStreetMap. I call the layer OSM Subregion, and its query looks like:

(amenity IN ('parking')
OR leisure IN ('Dog Run', 'pitch' ,'tennis court','track'))
OR aeroway IN ('apron')
AND building IS NULL

so that it includes parking lots, dog runs, playing fields, tennis courts, racetracks, and airport aprons. What these types of object have in common is that they are usually layered atop another object (a shopping mall, industrial facility, park, airport, etc.), and so they look better rendered in an upper layer. Once again, I've attached a QML file to style them. This layer goes above the 'public lands' layers, but below the contour lines.

(5) Finally, there are polygons for a few man-made features:

building IS NOT NULL
OR leisure IN ('pool','swimmin_pool','swimming_pool','wading_pool')

that is to say, buildings and swimming pools. This layer goes very high in the stack - above the roads. It provides footprints for these structures. Once again, I've attached the QML that styles it.

Wow, that's a lot of layers from one data set. But with them all in place, our map now has quite a lot of detail.
Added polygon data to the basemap
Next time, we'll make the map prettier, by adding shaded relief.

Attachments:


Read more...

Saturday, January 14, 2012

Back to the street map

Last time we left off with a map that was getting pretty good at showing physical features. It displays waterways (rivers, streams, lakes), topography (with contour lines) and makes a first attempt at land cover (at least showing wetlands). Now, it's time to move back to the man-made features.

The first thing that nearly everyone wants to see on a map are the linear features: streets, roads, railroads, canals, tracks and so on. We've already loaded a wealth of information about these from Open Street Map into the PostGIS database. But we still need to show the stuff with appropriate styling. This styling winds up getting done with progressively more complex sets of rules, distinguishing one type of line from another: people like to see, for instance, a specific style of line for “hard surfaced secondary road” or “abandoned railroad.” Coming up with these rules is rather tedious, and I won't make you read through an entire posting of what the rules are. Rather, I'll just refer to QML files that contain the rules and link to them at the bottom of the posting.

The first thing we're going to have to do with the lines in the Open Street Map data is to get rid of the ones we don't want. Administrative boundaries, we'll skip for now. (I'm still working on getting those styled well.) We've already mostly done the waterways: we want to do some additional work to put in dams, locks, rapids and so on, but we want to exclude the lakes and streams. And 'routes' - such as numbered highways - duplicate the roads. We'll handle them separately.

So we need to select ‘new_york_osm_line’ (or whatever name we used to import the line graphics), and pull ‘Query’ from the 'Layer' menu. We enter the SQL query:

upper(geometrytype("way")) IN ('LINESTRING','MULTILINESTRING')
AND ("waterway" IS NULL
OR "waterway" IN ('breakwater', 'dam', 'dock', 'flume', 'lock_gate',
'rapids', 'waterfall', 'weir'))
AND ("boundary" IS NULL)
AND ("route" IS NULL)

(Read the query as: “We want only line graphics, that aren't waterways, boundaries, or routes, except that breakwaters, dams, ..., weirs are acceptable waterways.) Now we have a manageable set of lines to work with. After considerable fiddling, we come out with a set of rule-based styles to render them:
Styling OSM Roads
We also want to show highway numbers. While showing them on shields is promised functionality for QGIS, it isn't in the development main line yet. So for right now, we just use ordinary labels. We create a new layer against the same OpenStreenMap line layer, changing the query this time to:

"highway" IS NOT NULL AND "ref" IS NOT NULL

(which selects numbered highways). We render nothing for this layer: the easiest way to do this is to select “Simple Line” as the rendering style, and then select “No Pen” as the pen style. We use the “Labeling” dialog (from the “Layer” menu) to put in the labels, giving them a red foreground and a white buffer. When QGIS gets highway shields, we'll be able to change this one place and show proper shields instead.
Added OSM roads (and other line features)

Not too bad! The QML for the street style sheet is attached at the end of the post.

Next time, we'll start putting in some land use data, and add some building footprints.

Attachments

Read more...