Thursday, December 19, 2013

Lidar data for Tiger Mountain, King County

An orienteering map is in thinking for Tiger Mountain "middle earth" for homebrew oc, but a major pain is LIDAR/elevation data available for the region. King County does have lidar data which is available to general public in some form, but it is old (like 2001) and for some reason it is extremely horrible, especially when under tree cover. This blog post is to serve as an explanation to what is "unusable lidar data" and why lidar data is not always perfect, especially in King County.

How LIDAR data works

If you know what is LIDAR and how it works, skip over. If you don't, this probably explains it in yet another way and most likely includes some imprecision. Ask in comments if something is unclear. 

A plane with extremely precisely known position shoots a laser ray against earth for a tiny impulse. It tries to note when it sees the "red" point on the ground. Sometimes it hits trees, sometimes it hits bushes, sometimes houses, rocks, but sometimes bare earth - these all are called reflections. Sometimes the "red" laser spot is seen on both a tree and on some bushes, these are called first and second reflections. 

The machinery notes when it saw the "red" dot on the ground and how it was acquired. It notes its planes position, angle of the laser beam, intensity of reflection. From this data, one can generate - (x,y,z) data - where x, y - coordinate on ground, z - some altitude. 

The generated data is LARGE. For example - some data sets contain 1 point per square meter. That yields 1 million points per square kilometer. If described in (x,y,z) in a somewhat efficient format - it would yield 12 bytes per triplet and 12 megabytes or so per 1 square kilometer. In an in-efficient format (like human readable text) - it could be as much as 30 bytes per point and 30 megabytes per square kilometer. 

From this cloud of data then by some clever algorithms, different points are picked - for example, bare earth points - ones which represent surface of earth with trees and rocks and houses removed. In some cases this is hard or to do. Especially in data sets where points are few. Another interesting point set is the top surface data. Subtract bare earth from that and you get vegetation, rock and building altitudes. All useful for mapping. 

King county LIDAR data

Lidar data in King County can be downloaded in several places, but as far as I can see it is of the same origin. The easiest place to download it is this: http://viewer.nationalmap.gov/viewer/ . Play around a bit with it. It can provide quite a few different data sets. It does not call the most precise LIDAR data, but you can find it by looking for the most dense altitude data.

King county LIDAR data can be also downloaded from Puget Sound LIDAR consortium. They also share full return data (which includes all reflections seen by the plane) and some more.

Tiger mountain data

The area we are interested in is here: http://www.gmap-pedometer.com/?r=6160161
It is a bit less than half a square of a kilometer.
This is the reference of it in the old USGS topomap:
Note the nice 20 feet contours, the road, the shape of the hills. The contours here are questionable a bit - they are acquired by analyzing areal photographs. Did the magician who created them really saw this?

This first "LIDAR data" image shows the individual bare earth points as vertices. The rest are approximations of the points. This data is downloaded from the USGS website mentioned above. The exact file name - ned19_n47x50_w122x00_wa_puget_sound_2000.zip.

You can clearly see the road. The algorithm on the LIDAR original data has identified the points correctly as bare earth and the road is cleanly seen. The rest are some large triangulation planes, which are completely unhelpful. Why? Well, this is how 5 meter contours would look like on it:
OMG. What the hell is that? You can, of course smoothen them or what not, but the hills are gone. There is nothing really that matches to what was seen. The LIDAR data presented here is USELESS for orienteering contours.

Can we get better data?

One solution would be to re-fly this area and probably get better data since the LIDAR technology is 10 years older now than when this data was created. This is unlikely to happen unless someone with money cares. I just don't see it happening. 

A solution which I have been thinking of is looking at the original data and trying to get out more information from there. There are two thoughts why it might work: 
1) the algorithms were unlikely sophisticated. This was close to the beginning of LIDAR when the data was acquired. 
2) When the data was acquired, the projects included both cities and forests. I find it unlikely that an algorithm good for towns is also usable for tree covers. 
3) my home computer power probably is a good match to what the company had 10 years ago. Also I have lots of time and somewhat limited data I care about. 

Here is a picture of All-returns data (trees, rocks, grass - everything):
There are lots of points there (around half a million)! There are also some holes (and I have no idea why I don't have any data in that square there, but I just did not get it). 
The question is how we can get rid of some of them in a way that still gives us something meaningful. 
Just for kicks I generated 5 meter contour lines, but I will not share the image - they were way too dense to have any meaningful value. And it makes sense - after all we are looking at individual trees here. 
One interesting notice - in the lower part the density of the points is certainly larger. It could be that different original datasets were used (could be the case the LIDAR data was acquired in several steps). 

Experiments

The original data is in feet, in State Plane Coordinate System projection, Washington North Zone, NAD83 datum. We will use feet for this chapter. 

Experiment 1

Mininum values in 10x10 feet cells. The original data gives as points approximately 1 per 10 square feet, so this is an approximation which will give us 1 point from 10 original ones. Approximately. 
Data set for the small rectangle gets some 13 times smaller (15 to 1.2 megabytes) 
Does not help. The minimum points with their precise value is not helpful. 

Experiment 2

How about 100x100 feet minimums points? Now this translates to 30 meter grid, which is worse than the USGS topo map (which I don't trust too much - we have been in nature there and the small detail in it is close to imaginary).
There are very few points there, but it is extremely likely that the points found there are actually real points that exist in the nature. 

Experiment 3

How about we grow from experiment 2 by adding points which belong to the same cells, but do not happen to be much higher than the minimum point. For example, if the point is 100 feet it is unlikely it will be more than some 50 feet higher. So I experiment with ~30% maximum grade. To be pricese - dh*dh*10<dx*dx+dy*dy for all pairs of points in each cell. Note that the lower part starts looking very nice.


How about dh*dh*20<dx*dx+dy*dy? 


Not much of difference, but could it be somewhat usable?
I will merge this data with the original data from the place. This will fill holes and probably provide some other points.  

Update

Google has started to use some lidar data (some time last year) in the Tiger Mt. region: google maps link. The same horrible source!!!

Sunday, September 29, 2013

Crestwoods 2013, Zunguzeng.

Thanks for volunteering:
Wildwood OC for the cookies.
Ing and Nikolay for control pickup.
Gunta for supporter delivery.
Jan for Route gadget.

Weather was ok, could have been not that wet. Forbes creek was high enough to wet everyone's legs.

2k course (zung):
1 Jan Urban 32.54 0
HBOC
2 Matthew Knudsen 55.4 22.46
COC
3 Kathy Forgrave 57.5 24.56
COC

4k course (zeng):
1 Nikolay Nachev 28.25 0
COC
2 Rick Breseman 40.42 12.17
Wildwood
3 Ing Uhlin 45.32 17.07
COC
4 Rob Knudsen 46.03 17.38
COC
5 Susan&Berry 53.12 24.47
DrBlond
6 Richard Staudt 53.58 25.33
COC
7 Eileen Breseman 57.57 29.32
Wildwood
8 Bob Forgrave 01:07.3 39.06
COC
9 Kean Williams 01:07.5 39.21

Saturday, July 13, 2013

Help needed

1) We have lidar data for 2 new maps near Quincy.
2) We have some awesome terrain South of Cle Elum (2.5 hours drive time) for at least 2 maps.
3) Two maps close to Seattle in works (one likely to be cancelled).

I need help with field work.

Sunday, June 23, 2013

Home-brew field work guidelines

We are getting ready to do some fieldwork in PNW Cascade foothill forest (think Tiger Mt. and similar).
I have prepared a contour+some trails map.

We will try to split the fieldwork; we are not qualified mappers; the end result is a "race-able" map.
This is the process description:

  1. I will visit the area before hand and try to leave reference markers. Hopefully GPS coverage will be good.
    1. Thus I will have exact reference points on the map
  2. I will distribute the area by giving a proposed trajectory to those participating.
  3. I will print out the maps in twice the scale of the final version (e.g. 1:10000 will be printed as 1:5000)
  4. Information gathering protocol:
    1. GPS is always on
      1. I have means of putting GPS trace on the map very easily.
    2. When on field, follow route on map and add features to it
      1. Use 3 colors 
        1. Use 2 usually, use third sometimes. 
        2. more colors is messy and takes too much time
      2. Vegetation is encoded by the following number scheme:
        1. 0 - open forest (corresponds white map)
        2. 0-1 - open forest, bad undergrowth (white map, sparse green stripes)
        3. 0-2 - open forest, very bad undergrowth (white map close together green stripes)
        4. 1-, 2-, 3- correspond to different runnability of forest. 
          1. 3 is reserved for blackberries and places you would never go yourself. 
          2. 1- and 2- are somewhere in between
          3. 1- and 2- can be combined with the undergrowth symbol. 3 cannot
          4. In PNW forest 1- and 2- can happen with fallen trees or smaller trees.
          5. -1 and -2 describe the usual undergrowth in different forms of baddness. 
          6. 2-0 is most likely to be used (and not 2-1). 2-2 is 3, 2-2 is not. 
          7. 1-0, 2-0 is very unlikely either, there is always some undergrowth
          8. 2-1 and 2-2 is questionable. 
        5. So the most common are:
          1. 0, 0-1, 0-2, 1-0, 1-1,1-2, 2, 3
        6. Please write them down as 0-2 or 0/2 
      3. Pointwise features shall be kept as numbers that start with 10 and a list of the features on some side paper. 
      4. Linear features:
        1. Distinct vegetation boundaries shall be kept with dotted line with first color
        2. Trails will be drawn as on map with first color
        3. Water features will be drawn with second color
        4. Contour line changes (hopefully not to be done), with third color. 
      5. Area features:
        1. mark a region and add an explanation in the features list. 


This is a document in making and I expect changes as we go along.

Saturday, June 22, 2013

OCAD for Homebrewing

There are some tips and tricks that make home-brewing OCAD editing much easier. Most of them can be found in the internets, but I have not seen nice sources.


  1. Hiding of symbol
    1. How:
      1. Select an object or symbol
      2. On keyboard: F4. 
      3. All of the objects with the given symbol disappear.
      4. Do what you need to do
      5. select the symbol that was hidden.
      6. Click f2.
    2. You can do this also do a group of symbols - select everything and say F4
    3. This is useful for doing work in complicated/dense areas where lots of features are not allowing to draw clean lines. For example, when you are in a steep section with lots of contour lines, you may want to hide them.
  2. Following another line
    1. Why: 
      1. there is a road somewhere and you need to have green on one side and yellow on other.
      2. you don't want to get the green on the other side. 
      3. and you don't want the green to be away from the road.
    2. How:
      1. start drawing the line.
      2. press control, keep pressing it.
      3. click with mouse (left button) on the line you want to follow and keep holding it
      4. now move the pointer to the place till which you want follow
      5. release mouse
      6. the new line should be following 
    3. Sometimes even with this feature you can see tiny white line. OCAD has bugs.
    4. Once you have two lines together and you need to shape them somehow together, you are in bad luck - I do not know how to do that nicely.
  3. Custom shortcuts:
    1. Why:
      1. once by computer, you need to be working fast, don't waste time
      2. use shortcuts!
    2. I use the following:
      1. ctrl+d for duplicate in place (fill, make border, duplicate identically in object menu)
      2. ctrl+f for forcing a different symbol (usually duplicate in place, then choose a symbol and then force a symbol on top)
        1. this is useful when creating borders of sorts or just making some contour line a lake or similar.
      3. ctrl+r - for reverse a feature - if you have a cliff with ticks to one side, this is how you can get them to another
      4. ctrl+t - for removal of vertices 
    3. This was mentioned here.

Wednesday, April 10, 2013

Usage of NW trails/Switchbacks data

In some of the Homebrew maps I have been using NW Trails data - it has been in most cases used as a reference, but nevertheless, it has been.
So I need to give proper attribution.
From now on, I will make sure this happens better.

Their license, btw:
"Copyright © 2012 Jon Stanley

This software is provided 'as-is', without any express or implied warranty. In no event will the author(s) be held liable for any damages arising from the use of this software.

The accuracy of the data contained in this dataset varies greatly. These maps and data are to be used for reference purposes only. The author(s) are not responsible for any inaccuracies and no responsibility is assumed for damages or other liabilities due to the accuracy, availability, use or misuse of the data presented. Installation and use of this data is at your own risk.

Permission is granted to anyone to use this data for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of the data must not be misrepresented; you must not claim that you recorded and compiled the original data.
2. If you use this data in a product, an acknowledgment in the product documentation is required.
3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original data."

For amazing resources see this website:
http://www.switchbacks.com/nwtrails/

Tuesday, April 9, 2013

Willows training

Ing, Gunta and Rick participated in Willows training on rainy Sunday, April 7th.
This is the map:
PDF file can be acquired on request.
Note the forbidden and private areas - mostly ones with no trespassing signs.
Posession of the map does not grant you permission to go there.
Use it at your own risk.

Sunday, March 24, 2013

Quincy 2 days have finished!


Excellent racers, excellent volunteers, excellent weather!

Quincy West:


Fast courses with shorter legs.
Some confusion was caused by Finish on first day - "Navigate to finish" says the description sheet.
https://www.5z.com/urban/gadget/cgi-bin/reitti.cgi?act=map&id=130&kieli=
http://www.obasen.nu/winsplits/online/en/default.asp?page=classes&databaseId=24649

Quincy South:


Some longer route choices with a mix of shorter legs.
https://www.5z.com/urban/gadget/cgi-bin/reitti.cgi?act=map&id=131&kieli=
http://www.obasen.nu/winsplits/online/en/default.asp?page=classes&databaseId=24650
* Hannah's results are not recorded.

Special thanks to volunteers:
Help with children - Gunta & everybody else.
Control pickup - Nikolay, Dushka, Peteris, Richard, Andrew, Will, Susan, Barry.
Help with electronic equipment - Debbie, Ing, Don, Jan.
Routegadget - Jan
Cascade OC for renting me their SI stuffs.
Afterrace food - Marianne and Dobby.
(I am missing someone here, sorry about that).

Electronic maps of the race will be shared upon request.