Register | Login
Attackpoint - performance and training tools for orienteering athletes

Training Log Archive: cedarcreek

In the 7 days ending Apr 10, 2015:

activity # timemileskm+m
  Orienteering1 17:02 1.02(16:40) 1.64(10:22) 35
  Total1 17:02 1.02(16:40) 1.64(10:22) 35

«»
0:17
0:00
» now
SaSuMoTuWeThFr

Tuesday Apr 7, 2015 #

Note

A small success story tonight. I've been struggling to figure out how to handle aerial photos for both large and small mapping projects. Often when I get aerials, they are tiled, usually in the same tile system as the lidar. So once in a while I'll get lucky and have the entire area covered by one lidar tile. Usually, though, it's two, four, or more tiles.

With lidar, for small projects I get UTM coordinates from Acme Mapper for a rectangle around the area of interest. Then I'll reproject (las2las), then merge and clip (lasmerge), using the UTM rectangle. This gives one file that is usually small enough to process without having to tile the input files. For large projects, I do the same process, but end up tiling the laz input files into 1km tiles (although smaller tiles of 250m or 500m also have advantages, especially if you have to classify lidar using lastools).

Oh---I discovered laz files. They're compressed las files, and they're awesome. They take up about 1/7th the space of las, so they're easy to email and don't hog hard drive space. Highly recommended. Everything I use (software) uses laz files seamlessly. Again---awesome.

So I had to combine four las tiles to make one laz tile for processing. Up til now I haven't had a way to combine aerials. But---it's pretty easy. I haven't tried this with overlapping aerials such as those from Pictometry, but only with tiled aerials that line up nicely in the native projection. Here's how I did it:

Open QGIS and start a new project. Go to "File, Project Properties, CRS, and Enable on-the-fly projection changes and select the native projection of the aerials. For me, it's Southern Ohio with feet. Now load the aerials using the checkerboard button (add raster layer). They should load up and be visible without gaps or black wedges. Now select "Raster--Miscellaneous---Merge". This opens a dialog box. Select the aerials again, and create an output file name such as "Mosaic_OH.tif" (for Ohio projection). The gdal tools really prefer tif, so this stuff gets big, but the tif has the world file embedded, so you can ignore world files (until the last step). There might be some more things you have to select, but I don't think so. Run it. If the box is checked to automatically load it to the current project, you can X the boxes and verify the mosaic file is correct.

But, it's still in the Ohio projection. So select "Raster-Conversion-Projection" (??? I'll update if that's not right. It might be a day or two.) This brings up a dialog box where you select Mosaic_OH as an input and Mosaic_UTM.tif as an output. You also have to select the source and target projections. I use 32616 (UTM zone 16, northern hemisphere) as a target.

Now I go to File--Project Properties, and change the CRS to UTM 16N (32616). Again, I click and unclick the X's for the two mosaic files to verify they're perfectly aligned. One will have black wedges, though.

Now you clip to the same UTM coordinates that you used for the lidar "park" file. Got to "Raster--Conversions---Clipper". Select Mosaic_UTM as input, and a park file name as output, such as storywoods.tif. Type in the min UTMs into the "1" boxes, and the max UTMs into the "2" boxes, and run it. I do one more step here, but it hasn't been helpful because it's not in UTM: I force a world file. Click on the pencil tool and edit the command line. I clicked at the end of the line and added:

-co "tfw=yes" and then run the command. (-co is creation option.)

Again, check and uncheck the boxes between the park file and the mosaic_UTM file to verify it's all perfectly aligned.

Now, if the park TIF file is small enough, you're done. But if you want a smaller file, it's a bit messy. Here's what I do. I open the tif file in Paint, and "Save As" a jpg. If the tif is big, like bigger than 125MB, it won't work. I was able to open big ones in GIMP (free open source, like "photoshop") and "export" as a jpg.

Finally, you need a world file, but the one created by gdal isn't in UTM, but rather long-lat or something. Here's what I did. I went to my OL-Laser output directory and grabbed a random jgw file. I pasted it into my aerial directory and renamed it to match the jpg. The upper left hand pixel should be the min X and max Y UTM coordinates. But rows 1 and 4 will probably be wrong. Write down the x and y pixel counts of the donor jgw file jpg (from OL-Laser or Karttapullautin). Then write down the x and y pixel counts of your clipped "park" aerial. (My lidar files tend to have 1m pixels, and aerials are much higher resolution.) So the donor jgw file has 1 and -1 as row 1 and 4. Divide the lidar pixel size by the aerial pixel size. My aerials were one-foot pixels, so the number was a touch bigger than 0.3048. Now edit the donor jgw file, changing row 1 to 0.3048xxx, and row 4 to -0.3048xx (it needs the minus). Click save, and load it up into QGIS. I was using FR (for Forest Run) as my park aerial name, and I couldn't tell the tif from the jpg in QGIS, so I edited the file names to be FRt.tif and tfw, and FRj.jpg and jgw. Be careful that your "clip" coordinates are fully within the lidar and aerial files, or it will cause problems.

(And if you got any improvements, I really want to know.)

Future research:
1. Try this with overlapping aerials, such as those from Pictometry.
2. Try the selection "creation options" "Use JPEG compression" in the merge and later steps. It will still be a TIF file, but I'm hoping it's more jpg-like in filesize.

Saturday Apr 4, 2015 #

1 PM

Orienteering race 17:02 [2] 1.64 km (10:22 / km) +35m 9:22 / km
shoes: Salomon Speedcross CS

White Course at Gov Bebb, set by Mike Minium.

My leg has been weird this week. It was really bothering me Wednesday and Thursday, but Thursday morning the swelling was noticeably reduced---almost the same as my non-injured L leg. But I did the Thursday white course, walking, and the swelling had come back, even though I wore a compression sleeve on that side. As had happened before, the pressure of the compression sleeve was just too much, and the pain forced me to take it off. I'm guessing this is mostly an infection of the open wounds, rather than a bone thing.

Thursday night it was swollen and pretty painful, as well as a bit hot and red, and I was, for the first time, seriously considering seeing a doctor.

Friday. Wow. It wasn't good. Excruciating pain when I'd stand up or stand still without moving. I had called my doctor's office at 8:30am, but they didn't answer, so I assumed they were closed. Decided I'd go to urgent care Friday night. But at lunch, I tried one more time, and my doctor's office answered. Appt at 2:30pm. Treatment: Antibiotics.

Wasted 90 minutes waiting on the pharmacy. I was standing in line bouncing from foot to foot to reduce the pain. Left and sat for about an hour. Still not ready. Walked around the store---finally, got it.

Got home, took two doses (recommended by pharmacist), elevated leg and watched a movie. Not three hours later, the pain was noticeably less, and the swelling a bit better.

Saturday---almost normal size. Used a compression sleeve, which I tolerated all day. Was almost feeling good enough for e 3.2km Brown course, but decided to play it safe and do White. I did run a bit, and I think that is a problem. I told the doctor that I suspected a dented bone, and she wrote a prescription for an x-ray, with instructions to use it if the antibiotics didn't work. They're still working, but I'm really believing I've got a bone issue. I took it easy all day Sunday, and it's kinda better. I'm still having specific, intense pains when I do certain things. (The real issue is---if it is dented, what would a doctor do? I'm guessing it would just be to take it easy, so that's what I'm doing. I'll do some biking this week to keep impact forces off of it.) If it's still bugging me Friday or so, I'll go get it x-rayed. I'm pretty confident the wound infection is handled, but if the bone is dented, then having the infection nearby is semi-dangerous.

« Earlier | Later »