Knowing When to Quit

One of the toughest decisions is knowing when to quit and when to hold on. Sometimes good experiences come out of adversary, you can’t just always walk away when things aren’t going your way. Things sometimes breakdown and fail; sometimes we all make a mistake.

This past weekend out hiking, I really wanted to end the day camping in the Adirondacks. I didn’t bring a lot of gear for the cold, I figured long johns and a change of socks, jeans, and long johns would be fine. I should have dressed warmer and been prepared, but I wasn’t. When I saw the deep snow of the Adirondacks, I should have turned around right away, but I didn’t.

I got invested in the idea of camping this weekend. I had a lot of fun camping last weekend on Irish Hill, and figured it would be a nice evening in the woods. I figured I could just get changed in the heated tent, and camp at the site I knew was plowed out. But that site is now closed. And there was a lot more snow then expected.

As soon as I saw how deep the snow was going to be in the Adirondacks, I probably should have quit. When I got lost and burned up a lot of daylight, I should have quit. But somehow in my mind, I thought I would be fine. I didn’t quit until I drove all the way up to camp, found the bad site and then started setting up at another site. I only quit when I found I couldn’t get the heater working right.

I think I should have quit earlier on. But I thought a nice campfire under starry skies would be a great way to kick off the New Year. Maybe not New Years Eve, but still a nice evening. I was going to shoot off fireworks and light sparklers. But it was not to be. No stove meant it would have been a very cold night with too little firewood. I should have quit earlier before I drove all the way up north, but I did not.

It probably was silly to have gone all the way north. I could have and should have quit earlier, when I saw the snow and how much trouble it would cause. I knew the propane wouldn’t work well, once it got chilled from the snow. But I thought I could do it. I guess there was no harm done besides the wasted gas and time, but I wish I had abandoned my plans for camping sooner.

January 3, 2017 Evening

Good evening! Kind of a cold wet evening commute with some modestly heavy rain and temperatures around 35 degrees in the City of Albany. There is a east-northeast breeze at 6 mph. Glad I wore my rain coat. 

Heavy traffic leaving the city tonight as everybody is back to work after the holidays and because everybody has to drive a bit slower because the roads are wet and somewhat slick. Traffic grinds along but I’m not in a rush to get home except maybe to play with my new vacuum cleaner. Unlike the old one it doesn’t create vast clouds of dust. 

The Christmas Cactus is in full bloom. At least for two of the four blooms are looking really nice. I never got around to taking a picture but maybe tomorrow. We will see. 

This evening into tonight will continue to rain, mainly before 2am. Near constant temperatures around 35 or 36 all night long.18 degrees above normal. Northeast wind 5 to 7 mph becoming light and variable after midnight. Chance of precipitation is 90%. New precipitation amounts between a quarter and half of an inch possible. In 2016, it got down to 6 degrees with periods of snow. The record low of -15 occurred back in 1904.

Waxing Crescent Moon tonight with 40% illuminated. The moon will set around 12:08 am. The First Quarter Moon is on Wednesday night with slight chance of snow expected. The Full β€œWolf” Moon is on Wednesday night.

Tomorrow looks to be quite cloudy with a chance of showers by afternoon and a high of 42 degrees by around 2pm. Not a terribly nice day but you’ll at least save on the heat. Colder but much sunnier weather for Thursday into the weekend but temperatures in the 20s.

A sunny but somewhat cool weekend by even early January standards coming up with seasonable temperatures. Saturday, mostly sunny, with a high near 26. Sunday, partly sunny, with a high near 24.Typical average high for the weekend is 31 degrees. A lot will depend on how windy it is those days but it should be bearable outside. Not going camping but might get out and some hiking locally depending on the wind chill. 

In four weeks on January 31 the sun will be setting at 5:08 pm, which is 33 minutes later then tonight. In 2016 on that day, we had mostly cloudy skies and temperatures between 52 and 36 degrees. Typically, you have temperatures between 32 and 15 degrees. The record high of 58 degrees was set back in 1913.

Script for Downloading NYS DHES LiDAR and Creating Contours and Hillshades

Here is a brief PHP script I use to download LiDAR data from NYGIS website. You simply supply it a list of quads on the command line like php getlidar.php u_3592573775_1m_DEM.img u_3600073175_1m_DEM.img then execute the below script. This script requires PHP and the dbase extension. If you use PHP7, you can download a version of dbase for PHP7 .

#!/usr/bin/php -q
 array_shift($argv); // remove program name

$lidarDir = "/home/andy/Documents/GIS.Data/lidar";

$tomerge = "";
$merged = "";
$conDir = "/tmp";

foreach ($argv as $quad) {
$wgetCommand = "wget -c -P $lidarDir \"ftp://ftporthos.dhses.ny.gov/lidar/nysdop/dem/$quad\"";
#echo "$wgetCommand\n";
system($wgetCommand);

$tomerge .= "$lidarDir/$quad ";

$merged = "merge".substr($quad,1,-4);
}

$mergeLidarCommand = "gdalwarp -co \"COMPRESS=LZW\" $tomerge $conDir/$merged.tif -r average -overwrite";
#echo "$mergeLidarCommand\n";
system($mergeLidarCommand);

// produce hillshade
system("gdaldem hillshade {$conDir}/{$merged}.tif {$conDir}/{$merged}hillshade.tif -z 2.0 -s 1.0 -az 315.0 -alt 45.0 -compute_edges");

// produce deeper hillshade
system("gdaldem hillshade {$conDir}/{$merged}.tif {$conDir}/{$merged}hillshade.6x.tif -z 6.0 -s 1.0 -az 315.0 -alt 45.0 -compute_edges &");

$minor = 5;
$major = 25;
$minorMeters = $minor * 0.3048;
$majorMeters = $major * 0.3048;

// produce contours
if (file_exists("{$conDir}/{$merged}{$major}ft-contour.shp")) {
unlink("{$conDir}/{$merged}{$major}ft-contour.shp");
}

if (file_exists("{$conDir}/{$merged}{$minor}ft-contour.shp")) {
unlink("{$conDir}/{$merged}{$minor}ft-contour.shp");
}

system("gdal_contour -a elev -i {$majorMeters} {$conDir}/{$merged}.tif {$conDir}/{$merged}{$major}ft-contour.shp");
system("gdal_contour -a elev -i {$minorMeters} {$conDir}/{$merged}.tif {$conDir}/{$merged}{$minor}ft-contour.shp");

// convert contour elevation to feet from meters

foreach (array("{$conDir}/{$merged}{$minor}ft-contour.dbf", "{$conDir}/{$merged}{$major}ft-contour.dbf") as $file) {
$db = dbase_open("$file", 2);

if ($db) {
$record_numbers = dbase_numrecords($db);
for ($i = 1; $i <= $record_numbers; $i++) {

// gets the old row
$row = dbase_get_record($db, $i);

// Update the date field with feet instead of meters
$row[1] = ceil($row[1] * 3.280839);

// remove the 'deleted' entry
unset($row['deleted']);

// replace record and save
dbase_replace_record($db, $row, $i);
}
}

dbase_close($db);
}

I use this script for my various map making efforts when I use LiDAR data in making hillshades and contours. I have automated the calling of this script from QGIS by using PyQGIS plugin that I developed.