Geohumanities Tools for Investigating Charcoal and Colliers.

Geohumanities Tools- April 3, 2021

All of these were discussed (or maybe just used) in Ben Carter’s presentation “Geohumanities tools for examining 19th century charcoal-making communities in eastern Pennsylvania” presented at Lafayette College, April 3, 2021. See https://sites.lafayette.edu/lvehc/2021/02/28/past-place-and-presence-in-the-lehigh-valley/

  • Pennsylvania Imagery Navigator- https://maps.psiee.psu.edu/ImageryNavigator/
    • Navigate and visualize aerial, satellite and LiDAR data for the entire state. All downloadable with a right click. Note that historic aerial images are not visualized, but are available for download.
  • Pennsylvania Spatial Data Access- https://www.pasda.psu.edu/
    • Much of the same material above (plus more) is available here. You can find downloadable data as well as WMS (and other) links for streaming GIS data into your GIS software
  • QGIS- https://qgis.org/en/site/
    • Full featured FOSS (Free and Open Source Software) GIS (Geographical Information System) software. Relatively user friendly “out-of-the-box” (but note that GIS programs are complicated, so you will likely need some training- see link to my videos below).
    • Can be greatly expanded with plugins (and Python scripts). My favorite plugins include:
      • QuickMapServices- provides access to a wide array of background maps, Google, OpenStreetMap, NASA, LandSat, USGS, etc.
        Azimuth and distance- for mapping “legal descriptions” of plots of land from deeds
      • Profile Tool- for examining the profile of the landscape (I use this to double check charcoal hearths)
      • MMQGIS- a wide array of tools (some of which are already provided), including Geocoding, which converts an address into a geolocated point (latitude/ longitude)
      • Want to learn how to use QGIS? Try this- http://benjaminpcarter.com/workshops/
        • Note that the videos are organized into workshops. Start at the beginning.
  • FamilySearch.org- https://www.familysearch.org/search/
    • Census and more. Similar to, but more limited than, Ancestry.com. Must sign up for an account, but not cost.
  • Qfield- https://qfield.org/
    • Android app designed to take your QGIS maps, layers, etc. into the field. Data is fully editable.
  • LASTools- https://rapidlasso.com/lastools/
    • A simple tool for working with Lidar data (which comes in .las files). Not all components are open source, but there are workarounds. Note that this can also be used within the QGIS environment.
  • Zenodo- https://zenodo.org/
    • Data publishing service. Data gets a DOI (and is therefore permanent), but can also be versioned. Located on the servers at CERN and available for all researchers.
      Some of my data- https://zenodo.org/record/1255101
  • University of Michigan’s The Encyclopedia of Diderot and D’Alembert- https://quod.lib.umich.edu/d/did/
    • Images of and text (most translated in English, but some still in French) of the Encyclopédie, ou dictionnaire raisonné des sciences, des arts et des métiers (English: Encyclopedia, or a Systematic Dictionary of the Sciences, Arts, and Crafts). Lots of great information about “crafts.”
  • Kemper’s book on charcoal-
  • Library of Congress Map Collection- https://www.loc.gov/maps/
  • Mask R-CNN- https://github.com/matterport/Mask_RCNN
    • You’ll need lots of programming skills for this one. Used for Deep Learning. Sharing in case anyone is interested.
  • Transcribus- https://readcoop.eu/transkribus/
    • Software for transcribing handwritten documents. I’ve only used this on a handful of deeds, but has produced amazing results so far.
  • Is there anything that you would like to share with the group? Share in the Comments.

Why Use Geopackage?

Recently, I rediscovered Geopackage. It’s a long story, but I tried to use them a while ago and it didn’t work so well. But, when I tried to use QField the other day to collect some data as I have done for years, it had -as you may not be surprised to hear- updated automatically. So, some things had changed – mostly for the better and easily adapted to. One of these was that I wasn’t able to load my DEM. It’s a bit of a monster (c. 20 miles long and a couple miles wide with resolution at around one meter- about a 1GB) and I have always used TIFF format (or more precisely GeoTiff). But, QField was now forcing me to convert to GeoPackage. So I shrugged and did it – easily in QGIS, which is where the maps that I use in QField are built.

But, this may have changed my life!

Alright, maybe that’s being a bit dramatic. Here’s the thing. I want to share data and publish it openly. My first experience with this was a bit of a bear (see my data in the Journal of Open Archaeology Data). What’s the problem, you ask? First, the standard file format for vectors (point, line, polygon) is shapefile (Do I hear some “boo”s?). Anyone who has used shapefiles knows that, in order to share shapefiles you need to share a minimum of three files (and usually more). If you have ten layers you would like to share with collaborators this means you need to share around 50 files. That’s just ridiculous! Not only is it an unnecessary hassle that makes it very difficult to collaborate and to version. But, the solution to that particular problem is a GeoJSON file. This solves a number of problems associated with shape files (see these links- 1, 2, and 3– for more information on  other issues with shapefiles). But, this still means that I need to share separate files for each layer, so for five layers, that’s five files. Not too bad, right. By the way, one of the major benefits of a GeoJSON file is that all of the information is internal to the file. That means, for example, I can publish the file online and stream the data (in my case, using QGIS– if you want to try it, you can use my data on charcoal hearths in PA). So, the data can live in an online repository such as Zenodo or Open Context and I can visualize that same data in a GIS program (I recommend QGIS) along with any other layers that live locally. Because the data is stored in a repository, I can rely upon it being consistent and so can my collaborators.

But, that still means that each layer is a separate layer and you cannot use GeoJSON for rasters (that’s not totally true, but it certainly was not designed for it). So, what would work better? How about a file that holds all of your rasters and your vectors AND styles them. That’s what GeoPackage does. It’s actually a “container” for a SQLite database, where each layer is a separate table. Rasters are stored as JPEGs and PNG– JPEGS provide lossless compression and PNGs are used at the edges because they support transparency.

Imagine this. I complete an archaeological project that involves georeferenced historical data, original LiDAR data (e.g., as LAS files), derivatives from the LiDAR (such as DEM, hillshade, slope analysis, etc.), points collected in the field, various polygons (in my case, State Game Lands boundaries, Appalachian Trail boundary, etc.) and lines (historic and modern roads, etc.). I want to archive everything. The way I did this the last time, I archived each file separately. The only link they had was a description (see this) that discussed how each layer was derived and interconnected. But, they still live as distinct, if tenously connected, digital objects. However, Geopackage allows me to bundle all of this together- remember it is a database- into a single package (i.e. file). I can then archive that file and everything REMAINS connected. So much easier for me and for any present or future collaborators and so much better for digital preservation . If I do another project, I can either archive a new Geopackage file or, if is additional research using the same data,  version the old one (retaining all versions, of course).

Lastly, as I mentioned above, it is very important for me to be able to archive data in an online repository AND be able to stream that data to my workstation (in QGIS). I could do this with GeoJSON, so I am a big fan. However, I have not been able to figure out how to do this with GeoPackage, but I’m still investigating.

I would also like to be able to store the files online, stream those to my workstation AND visualize them on the web. There is one tool that seems to be able to do this with Geopackage (see this) that promises to do this. You can use this link to see some a test of some of my data (http://ngageoint.github.io/geopackage-js/?gpkg=http://ironallentownpa.org/Testsmay27a_4326.gpkg ).  Sometimes it does not load (I don’t know why), but even when it loads, it does not seem to support rasters, which is a big problem.

Anyone out there with any thoughts, suggestions or recommendations please comment below!

Creating DEM from PASDA las files

The following is a description of how the maps discussed in the previous post were constructed. This information is provided in the spirit of open access and replicability. The following is a step-by-step guide to building digital elevation models (and their derivatives) from PASDA LiDAR data.

  • Download las tiles from PASDA.
    • Go to PASDA Imagery Navigator: http://maps.psiee.psu.edu/ImageryNavigator/
    • Zoom in on the area of interest.
    • Under the Display Tile Index drop down menu, select “Lidar Hillshade”
      • This will show you the tile index and the relevant file names
    • Place your cursor over a spot of interest and right click.
      • This will bring up a list of available data.
      • Click on the “LiDAR,, Topo and DEM” tab
      • At the right, you will see a listing of “LAS” files for download.
    • Select and download all the appropriate files.
  • Convert projection and reserve only category “2” points (2= ground return).
      • Note that Pennsylvania Data MUST be converted from NAD83 PA S (feet) to NAD83 PA S (meters)
      • Open las2las.exe
        • In the upper left, find and select all of the files from the above.
          • Note that you can use the wildcard (.las, not .laz as is the default)
        • Keep only ground points
          • Expand the “filter” menu
          • Select “keep_classification” under “by classification or return”
          • Under “number or value”, enter 2
        • Reproject from feet to meters.
          • Under “target projection” select
            • State plane 83
            • PA_S
            • Be sure “units” are in meters.

Your GUI should look something like this:

forWP

  • Choose an output location in the upper right.
    • Click “Run” (in the lower left; you may have to minimize (click the “-“))
    • In the command line, you should see something like:
    • las2las -lof file_list.7808.txt -target_sp83 PA_S –olaz
  • You should now have reprojected las files that include only the ground return.
  • Convert las files into smaller “tiles”
    • Open “lastile.exe”
    • Add the reprojected las files (actually now they should be laz files) in the upper left.
    • Choose a tile size of 1000 (for the above this means 1000 meters)
      • Choose a buffer of 25 (you need a buffer and just need to experiment with what works best for you.)

Your GUI should look like this:

2lastile

    • Hit “Run”
    • The command line should look something like this:
      • lastile -lof file_list.1576.txt -o “tile.laz” -tile_size 1000 -buffer 25 -odir “C:\Users\Benjamin\Desktop\Working_LiDAR\Repoj_tile_las” –olaz
  • Convert tiles into DEM
    • Open “BLAST2DEM.exe”
    • Add the tiles constructed in previous section
    • Choose your output location
    • Choose “tif” for file format

Your GUI should look like this:

3blast2dem

    • Click “RUN”
    • Your command line should look like this:
      • blast2dem -lof file_list.6620.txt -elevation -odir “C:\Users\Benjamin\Desktop\Working_LiDAR\DEM_tiles” –otif
    • Your DEM’s are now created.

From here, you will want to stitch the DEM’s back together, but you need a GIS program for that. You can use the open source QGIS.

  • Open QGIS
  • Click on Raster- Miscellaneous- Merge.
  • Select the “choose input directory instead of files” box
  • Select the destination location and file name.
  • Click “OK”-
    • I frequently get an error here, but the results appear complete.

At this point, all of your data should be in a single Geotiff file (be sure to save it) as a digital elevation model.

In order to complete the analysis in the previous post, I converted the DEM into a slope model, which shows high slope in lighter gray and low slope in darker gray.

  • To do this, all you need to do is, in QGIS, use Raster- Terrain analysis- Slope. The input is your DEM and the output is the new slope model.
  • Within QGIS, you should now be able to see maps similar to those shown in the previous post.

Finding Charcoal- LasTools + PASDA LiDAR data= Amazing!

For a long time, I have been interested in charcoal production on the mountains around the Lehigh Valley, which I first learned about along the Lehigh Gap Nature Center‘s  Charcoal Trail. I had hiked this trail many times before I discovered what the name meant. Along the trail are flat areas (around 30 feet [10 meters] in diameter) upon which colliers (charcoal makers) piled large mounds of wood that they charred to produce charcoal. One of the primary uses of that charcoal was iron production. Indeed, the area around the Lehigh Gap Nature Center (ok, a bit farther west) was owned by the Balliet family who owned and operated two iron furnaces, one on each side of the Blue (Kittatiny) Mountain (one in Lehigh Furnace, Washington Township and another in East Penn Township; and likely a forge in East Penn).

I became interested, but was not truly fascinated until I found and perused PASDA’s Imagery Navigator. Within the Navigator, you can view DEMs (digital elevation models) created from a LiDAR survey from around 10 years ago. To put it too simply, to collect LiDAR a plane flies over an area shooting the ground with lasers. Since the location of the plane is known (through an amazing combination of GPS and IMU) and the speed of light is known, lasers bouncing back to the plane effectively measure the distance to a “return”, which is an object, such as the tree canopy, a trunk, a roof, or the ground. A DEM is then constructed from the LiDAR point cloud. I wondered if this data could show me flat areas on the sloped landscape (like those clearly visible along the LGNC’s Charcoal Trail). They could!

I used the “hillshade,” which is a view of the landscape created by applying a light source to the DEM (digital elevation model). It’s as if all of the vegetation was removed from the landscape and it was painted gray with a sun shining on it from the NW at about 45 degrees. This way, I was able to identify over 400 charcoal pits over an area of approximately 100 square kilometers. .

So… many years later, I am finally doing something with this. My students and I, as a part of a Field Archaeology class, are investigating charcoal pits and the people who used them. More on this  part of the project another time.

In the meantime, my GIS skills have dramatically increased and I was lucky enough to attend a workshop on LiDAR (funded by NSF and run by NEON and Open Topography; a special thanks to Kathy Harring, Muhlenberg’s Interim Provost). I was interested in LiDAR for a new project that I am working on, but as a part of the workshop, we were to do a small “project” based upon new understandings and skills developed over the three days. I choose to download some of the original LiDAR data (props to Pennsylvania for providing all of this online) and build my own digital elevation model. The idea was that I could tweak it in order to see the landscape better. So, I started off just trying to remake the DEM provided via PASDA; that would at least show that I had developed some skills. However, just trying to do this resulted in spectacular results that have changed the way I conceptualize the landscape and our project.

Most importantly, the resolution of my reconstructed DEM is much, much greater than that of the DEM provided by PASDA. It is clear why this is true (see this description), but it is not apparent as it should be when viewing (or downloading) the PASDA DEM. PASDA provides a DEM based upon points that are categorized as “8,” which are “Model Key (thinned-out ground points used to generate digital elevation models and contours)”, not those categorized as “2,” which are “ground” points. So, I was working with all of the ground points and the PASDA provided DEMs were based solely upon a subsample.

Here’s what I found:

Here’s an image of one section of the area under study. This is original data from PASDA. Note the “eye-shaped” flat spots.

lidarchardemorig

In the following image, I have marked all of the charcoal pits I could find with a blue dot.

lidarchardemorigpoints

This image shows the hillshade made from the DEM I built. Honestly, it doesn’t look terribly different from far above. Perhaps a bit more granular.

lidarchardemnew

However, here’s a zoomed in comparison of the area just NE of the point in the lower left corner in the image above:

Before:

lidarchardemorigsm

After:

lidarchardemnewsm

However, once I do a slope analysis, which shows flatter areas in darker gray and steeper areas in lighter gray, the charcoal pits (which are flat areas on a sloped landscape) literally leap out of the image.

lidarchardemnewslope

The image below shows all of the all of the newly identified charcoal pits with red triangles. A landscape that I once thought had minimal charcoal pits (I wondered why… and was developing possible hypotheses) now appears to have been quite densely packed with charcoal pits.

lidarchardemnewslopepts

Next post… details on exactly how I did the above. Hint- LasTools and QGIS.