Shallow Thoughts : : mapping

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Thu, 01 Aug 2024

Fetching OpenStreetMap Details with OSMPythonTools

I was talking to a friend about LANL's proposed new powerline. A lot of people are opposing it because the line would run through the Caja del Rio, an open-space piñon-juniper area adjacent to Santa Fe which is owned by the US Forest Service. The proposed powerline would run from the Caja across the Rio Grande to the Lab. It would carry not just power but also a broadband fiber line, something Los Alamos town, if not the Lab, needs badly. On the other hand, those opposed worry about road-building and habitat destruction in the Caja.

[A bad map showing a proposed route but with no details labeled] I'm always puzzled reading accounts of the debate. There already is a powerline running through the Caja and across the Rio via Powerline Point. The discussions never say (a) whether the proposed line would take a different route, and if so, (b) Why? why can't they just tack on some more lines to the towers along the existing route?

For instance, in the slides from one of the public meetings, the map on slide 9 not only doesn't show the existing powerline, but also uses a basemap that has no borders and NO ROADS. Why would you use a map that doesn't show roads unless you're deliberately trying to confuse people?

Read more ...

Tags: , , , ,
[ 12:14 Aug 01, 2024    More mapping | permalink to this entry | ]

Wed, 03 Apr 2024

Making OsmAnd Overlays with QGIS (2024 Edition)

Several years ago I wrote about Making a Land Ownership Overlay with QGIS and Making Overlay Maps for OsmAnd. I've been using that land use overlay for years. But recently I needed to make several more overlays: land ownership for Utah for a hiking trip, one for the eclipse, and I wanted to refresh my New Mexico land ownership overlay since it was several years out of date. It turns out some things have changed, so here's an update, starting from the point where your intended overlay is loaded as a layer in QGIS.

Read more ...

Tags: , , ,
[ 18:15 Apr 03, 2024    More mapping | permalink to this entry | ]

Mon, 27 Nov 2023

A Smaller, Lighter Dataset: Clip Layers in QGIS

[QGIS screenshot showing a manufactured polygon to clip a river layer]

The dataset I used for mapping fire perimeters is huge: not surprising if it's all historic fires for the US. Classifying it in QGIS gave a warning, and operations were very slow. Here's how to clip a big dataset in QGIS to restrict it to a smaller geographic area.

Read more ...

Tags: , , ,
[ 11:43 Nov 27, 2023    More mapping | permalink to this entry | ]

Thu, 23 Nov 2023

How to Use QGIS to Identify Fire Areas

[]

(A QGIS beginner's tutorial.)

For quite a while I've been wanting a map showing the perimeters of the big local fires. When walking through a burned area, I wonder, was this one from the Cerro Grande fire? Or Las Conchas? Or another fire?

Yesterday, inspired by Ryan Peek's #30DayMapChallenge toot on California Fire Perimeters, I decided to look for the data and load it in QGIS.

Also, I never did an entry for Day 3 of the #30DayMapChallenge, "Polygons", so this is it, not quite three weeks late.

Read more ...

Tags: , , , ,
[ 12:34 Nov 23, 2023    More mapping | permalink to this entry | ]

Mon, 20 Nov 2023

Pixel 6a Stores the Wrong GPS in Images: an Analysis

[Map of GPS from Pixel 6a photos compared with actual positions]

I've been relying more on my phone for photos I take while hiking, rather than carry a separate camera. The Pixel 6a takes reasonably good photos, if you can put up with the wildly excessive processing Google's camera app does whether you want it or not.

That opens the possibility of GPS tagging photos, so I'd have a good record of where on the trail each photo was taken.

But as it turns out: no. It seems the GPS coordinates the Pixel's camera app records in photos is always wrong, by a significant amount. And, weirdly, this doesn't seem to be something anyone's talking about on the web ... or am I just using the wrong search terms?

Read more ...

Tags: , , , , , , ,
[ 19:09 Nov 20, 2023    More mapping | permalink to this entry | ]

Thu, 16 Nov 2023

Lost and Found: Missed the Mitchell but Found Something Unexpected (also, 30-day Map Challenge #15)

[GPS Track of a hike in Los Alamos, NM] Yesterday's 30-Day Map Challenge theme was OpenStreetMap.

I use (and contribute to) OpenStreetMap quite a bit, and I use OSM basemaps in pretty much all my mapping. (I have used Google in the past, but between their changing or withdrawing APIs every few years, and suddenly deciding to charge for previously free APIs, I switched to using only open source maps.)

But that was yesterday, which was group hiking day, so I was out tramping over mountains instead of sitting at the computer making maps. But a wrong turn on the hike led to a serendipitous discovery that wouldn't have happened without OpenStreetMap.

Read more ...

Tags: , , , ,
[ 11:08 Nov 16, 2023    More mapping | permalink to this entry | ]

Sun, 05 Nov 2023

30-Day Map Challenge #5: An Old Paper Mountain Biking Map

Day 5 of the 30-Day Map Challenge is an analog map.

That got me searching back through old scans, and I found a couple good ones. In particular, some of my old El Corte de Madera maps. [Scan of an old hand-drawn map of El Corte de Madera OSP]

El Corte de Madera Open Space Preserve is one of the open space parks in the Bay Area, above Woodside, CA. It's beautiful, dense redwood forest on a steep hillside. When I lived (and biked) there in the 1990s, ECdM (as it was abbreviated) was particularly popular with mountain bikers for its highly technical trails.

Unfortunately, not everybody agreed about those trails. The Mid-Peninsula Open Space District (MROSD), which administers them, had a policy that there should never be more than one trail going to any particular place, and it also had guidelines for trails that would have eliminated most of the technical ones. The official maps mostly showed the fire roads, which were especially steep, not at all technical, and generally not very interesting for biking.

But there were a lot of good trails at ECdM that weren't on the official MROSD maps. The property had once been used for logging, then for a while it was owned by a motorcycle (dirt bike) club, so there are all sorts of unofficial trails.

Mountain bikers passed around many-times-photocopied unofficial maps, some dating back to the motorcycle club days. One of my treasures in those days was a much-annotated map, marked up with ink of many colors, carried so much in my bike bag that it was coming apart at the folds. Of course, the hand-drawn trails are all approximate: none of us carried any sort of GPS then, and the GPS of the day probably wouldn't have gotten a signal in the deep redwood forests anyway.

In 2013 as we were preparing to move to New Mexico, I tried to find and scan old documents that were prone to getting lost during a move. I found a couple of old ECdM maps, though I'm not sure I found my main one; I remember it being more colorful than this one. Still, this one has a lot of my annotations, so I scanned it in case I lost the paper copy. Looking at it now brings back a rush memories of mountain biking adventures. And the map seems perfect for the 30-Day Map Challenge Day 5: Analog Maps.

Day 4: A Bad Map

By the way, although I didn't do any new work for challenge Day 4: A Bad Map, I wrote an article this past September wherein I go through several quite bad iterations of a choropleth map (regions shaded according to a particular variable — in this case a red-blue voting map) before figuring out how to get the colors right: Los Alamos Voting Data on a Folium Choropleth Map.

Tags: , , ,
[ 15:23 Nov 05, 2023    More mapping | permalink to this entry | ]

Sat, 04 Nov 2023

Pytopo: Colorizing Lines According to Speed or Elevation (30 Day Map Challenge #2)

[PyTopo screen with a track colorized by elevation] I've been wistfully watching the hashtag #30DayMapChallenge on Mastodon. For several years in a row, I've told myself I'm going to try the 30 Day Map Challenge ... and each time, I get busy with other stuff. And this year is no different.

So instead of trying to do all thirty exercises, I'll just do a few of the challenges when I have time and motivation. Better than nothing, right?

And as it happened, yesterday I got the urge to do a map-related project. Except it lined up with Day 2, whereas I didn't get it working til this morning.

So, two days late, here is my:

30 Day Map Challenge Day 2: Lines

During a bike ride along the fast section of one of our fantastic White Rock trails, I found myself wishing I could view my track logs colorized according to how fast I was going. And I realized that I could pretty easily add that to PyTopo's track log displaying code. And as long as I was doing that, why not also add the ability to colorize by elevation as well?

Most GPX track logs already include elevation (though the ones I get from OsmAnd aren't super accurate: they're GPS elevation rather than using the barometric sensor that some phones have). Track logs from OsmAnd sometimes include speed, via the nonstandard construct

        <extensions>
          <osmand:speed>0.3</osmand:speed>
        </extensions>
which PyTopo already knows how to parse; and of course, for track logs that don't include speed, it can be calculated according to the distance and time difference from the previous track point.

[PyTopo screen with a track colorized by speed] Indeed, it was pretty easy to add. I put it on the context menu as a new submenu, Colorize Tracks.

I probably should play with the colormaps and use something smarter than a simple blue-to-red gradient, but even as it is, it's fun to look at a hike to Nambe Lake colorized by altitude (first image) or a mountain bike ride along Potrillo Mesa and the Boundary Trail colorized by speed (second image).

The code is on GitHub, in this commit.

Again, that's for the challenge two days ago. Today's Map Challenge is "A Bad Map". No promises that I'll have time for another mapping project today ... but I'm looking forward to seeing what other people come up with.

Tags: , , ,
[ 12:28 Nov 04, 2023    More mapping | permalink to this entry | ]