Brecon Beacons Industrial Remains

These days the Brecon Beacons National Park is a protected area with restrictions on the development that can take place. However it was not always like this and remnants of all sorts of different industries and habitation can be found scattered around if you know where to look. This post describes some of the remains that can be found on the western end of the Beacons around the area of the Mynydd Du. All of the sites below are reachable on foot from the car park on the A4069, OS grid ref SN730192.

Hazards

It’s unlikely that the modern explorer will suffer the same fate as David Davies ( left ). I don’t think that there are many lime carts along the A4069 these days. However, although none of these sites is more than a couple of hours walk from the car park, the weather can change quite quickly and there are few well defined paths. For the summer months a waterproof jacket and a good set of ( preferably waterproof ) boots is usually all you need. For the winter more serious preparation is required and there are any number of websites that will supply clothing recommendations.

Resources

Some resources that I’ve found useful for research and exploration are:

  • OS Maps – the 1:25000 Explorer series are the most useful. Map OL12 covers both the western and central areas of the Brecon Beacons.
  • Older maps – The National Library of Scotland has older OS maps online in a very user friendly viewer. There are several versions of maps available going back to the 19th Century. I find that the “OS Six Inch, 1888 – 1913” to be the most useful for this exercise. Unfortunately the OS 25 Inch version from that date is not yet available for all of Wales. The feature to overlay the older map over a current satellite photo and change the transparency of the overlay is extremely useful.
  • National Monuments Record of Wales (NMRW) – Coflein is an online database containing the national collection of information about the historic environment of Wales. There’s an associated mapping site which is useful for researching sites in a particular geographical area.
  • The Megalithic Portal is a volunteer site recording ancient sites ( UK and worldwide ) and has very good interactive searching and mapping features. The Mynydd Du area is littered with cairns, stone circles, standing stones etc. and the Megalithic Portal is a useful reference.

Foel Fawr Lime Workings

The car park on the A4069 is right next to the old Foel Fawr Lime Workings. There’s a marked trail around the workings together with some information boards. Most of the site dates from the 19th Century but some areas, the Rhiw Wen kiln, were in use up to the 1950s. Remains of the equipment used can still be seen at various points.

It’s quite a pleasant walk on a sunny summer day but it must have been pretty bleak up there during the winter even though the view from the “office window” would have been spectacular. The picture on the left was taken after Storm Caroline dumped a load of snow and, with the wind chill, it was probably about -10°C. The modern day Health and Safety Executive would have a fit 🙂

Pen Rhiw-Wen, Silica Workings

OS six Inch Map 1888 – 1913

Back down the A4069 towards Brynamman lies a disused quarry ( grid ref SN730180 ) linked by a tramway to the road. The Coflein entry states “According to the Geological Survey in 1907, ‘disintegrated Millstone Grit or silica sand was being carted by road in 1900 from Pen Rhiw-wen to Brynaman Station’.” From what I have read silica sand was a key component of refractory bricks. These were used in high heat areas like kilns, furnaces and fireplaces and obviously critical to the local industries of the time. These days the tramway has been lost under a modern track and the quarry itself is a series of grass covered mounds with few clues as to its origin.

 

Foel Fraith Limeworking Complex

Slightly further afield ( grid ref SN763176 ) is the Foel Fraith Limeworking complex. This consists of several different quarries for both limestone and silica sand and was connected to the main railway line via a tramway. The line of the tramway can easily be seen on aerial photographs and is easy to trace on the ground. Judging by the steepness of the slope some sections at least must have been cable hauled inclined planes. There’s a limestone quarry at the top of the complex which is very similar to the Foel Fawr quarry but on a smaller scale.

One interesting artefact that I found in what looked like an old silica sand quarry was the remains of a digger. I’ve no idea of its age, there were remains of plastic parts which I guess held hydraulic fluid of some sort and may date the digger to the mid part of the 20th C. However, classic car magazines would describe it as “in need of some light restoration” 🙂

Note: the route to Foel Fraith will take you over Garreg Lwyd which is interesting in itself. On the top there’s a large bronze age cairn ( Coflein, Megalithic Portal ) and there’s a great view looking south over Swansea, the Gower and the Bristol Channel.

Fforch Ceulan Longhouse

I got intrigued by the “house (rems of)” text on the latest version of the 1:25000 OS map ( grid ref SN753202 ). Interestingly it’s not marked on either the 1996 or 1976 versions of this map that I have and it’s not on the 1948 online archived version either. There is a Coflein entry which states “A ruined longhut is situated on the W edge of a level spur between two deeply incised stream valleys at c.385m above O.D.” The aerial view on Bing maps seemed to show some walls remaining so I thought that I would take a look.

Well they’re not kidding about the “deeply incised stream valleys” and it’s an extremely steep drop down from Cefn y Cylchau. It was also slightly underwhelming when I got to the bottom as the pictures show:

While I was there I did wonder why anybody would want to build a house here? The Coflein entry states that it’s “Period: Post Medieval, Medieval” so I guess that it predates the building of the A4069 at the start of the 19thC. However if it was connected, for example, with managing livestock then there are much easier ways up onto the higher ground than the steep hill behind the house. Also it’s only a 30 minute walk down to the valley in the background which is a much more hospitable place for building. My cursory research hasn’t come with any more details so I may have to investigate further.

Conclusion

I’ve only really scratched the surface here, there are plenty more remains to see. Every summit seems to have a cairn on it and you could spend years just investigating those. I’ve no particular interest in “peak bagging” during my walking but give me some industrial remains and I’ll have the GPS fired up pretty quickly 🙂

 

Advertisements
Posted in Travel, Wales | Leave a comment

Open LiDAR Data

LiDAR is “… a surveying method that measures distance to a target by illuminating that target with a pulsed laser light, and measuring the reflected pulses with a sensor. Differences in laser return times and wavelengths can then be used to make digital 3D-representations of the target.”

Natural Resources Wales and the Welsh Government have made available a large amount of LiDAR data which has been gathered over the years and they have compiled it into a convenient data set. There are various levels of resolution ranging from 2m down to 25cm, with the majority of the data at 2m resolution.

The Lle site has a very good on-line data browser to get an overview of the data and a technical note giving more details of data formats etc.

The licence for its use is quite liberal which started me down the road of thinking about what I could do with this data. My first thought was to try and convert the data to a “proper” 3D format so that it can be loaded and viewed in tools like Meshlab and maybe even into some VR gear. This post details the work so far.

Data Format

The data format is a simple ascii file and is best described with an example ( the technical note has the full details if needed ).

OS map excerpt from http://www.bing.com/maps

The data is split into a number of separate files, each file covers a 1km x 1km square area, corresponding to one of the blue squares on an Ordnance Survey ( OS ) map. Some of the higher resolution files are actually split further so that 4 files cover one square.

The files are named according to the map square that they refer to so the one in the image, for the 2m data will be “sn8021_dsm_2m.asc”.

( More details about OS Grid system )

The text formatting in the technical note seems to have gone awry a bit when giving example data but the data looks something like the following

ncols 500
nrows 500
xllcorner 280000
yllcorner 221000
cellsize 2
NODATA_value -9999
537.8225 537.4125 ...

The first six rows provide some meta data while the actual ground spot heights then appear from line seven onwards. One point to note which initially caught me out is that the lower left corner is actually the top left corner when the map is viewed in the normal manner with the north to the top. I have no idea why this convention is used but it does actually help us later.

Conversion to PLY

The LiDAR data essentially contains the X, Y, Z coordinates of each point in the square. X & Y are derived from the position in the data matrix while Z is the value at that position. This is perfect as the PLY file format consists of a list of X, Y, Z coordinates of each point ( or vertex ) in 3D space with optional extra data ( faces ) to convert the verticies into a mesh. Converting the LiDAR data to PLY was therefore a relatively simple data transposition process.

Details of the transformation script ( which is written in Lua ) can be found below but there are a few points to note about the conversion:

  1. There are discontinuities in the LiDAR data, indicated by the “NODATA_value” field. These points were omitted from the PLY file.
  2. The LiDAR data contains just points, additional work was needed to convert these points into a mesh. I initially thought that I could import the points into Meshlab and use one of its built-in tools to create the mesh. However I had very mixed results so I added some extra code to create the mesh.
  3. PLY files can have ascii or binary format. For simplicity, and ease of debugging, the script uses the ascii format. For now a binary version can be created by opening in Meshlab and exporting in binary format.

Model Annotation

The initial version of my script created just a plain grey mesh. This was OK but a little boring and difficult to discern details so I decided to experiment with overlaying different data from elsewhere. Other than the false colour, all of these involve overlaying an image over the top of the 3D data. The image files need to match the dimensions of the LiDAR data ( 500px square for the 2m data ) and each vertex colour is set to match that of the relevant pixel. I’ve uploaded some of these to my demo site, click on the headings below to open the 3D model in a browser viewer.

I used square SN8021 for the example because it contains some reasonably spectacular scenery but, disappointingly, the lake surface data is missing hence the gap in the model.

One of the problems that I encountered was the lack of an image import library for Lua. I found a few that should have done the job but they either didn’t work with the latest Lua ( 5.3 ) or were ‘C’ based but wouldn’t compile for various reasons. Eventually I used Imagemagick’s ‘convert’ command to create a TXT format file which I then parsed with Lua. Annoying but it meant that any type of image could be easily supported.  convert command is:

convert image.png image.txt

False Colour

3D representation of grid square SN8021 in false colour

My first thought was to add some false colour based on the height of the terrain. This was OK but less successful than I had hoped. The option for adding the false colour is still in the script but I don’t really use it.

 

JPG files from LiDAR Data

Each LiDAR data file contains a JPG representation of the output. I think that the image is the same as the one used for the online browser. It is colour shaded dependent on height but also has some shadow data added and is quite effective. The colour shading is such that it should be consistent if several map squares were tiled together.

OS Map

Because I’m not very good at interpreting contour lines on an OS map I though that it would be informative to overlay a 1:25000 OS map onto the 3D plot. Sourcing and scaling the OS map extract is time consuming and I do it as follows:

  1. Visit https://www.bing.com/maps and select Ordnance Survey from the drop down on the right.
  2. Zoom in to the required square so that it fills as much of the screen as possible.
  3. Take a screenshot
  4. Using the blue lines as a guide crop the screenshot to just the square that you need and rescale to the appropriate size.

This is obviously fine for a test / demonstration but far too time consuming for more than one square not to mention the licencing issues in bulk copying.

Satellite Images

I wasn’t sure about overlaying satellite images but it turned out OK. I was worried about the shadows but I think that they add to the effect.

However, obtaining the image is even more time consuming than the OS maps. The way that I did it was as follows:

  1. Create a waypoint file containing two waypoints, one at the bottom left of the LiDAR square ( grid ref SN8021 ) and one at the top right ( grid ref SN8122 ). I use this site to convert from OS grid references to/from Lat/Long. I exclude the <sym>…</sym> field from the file so that a small black square is used as default.
  2. Display the waypoints on a map. I use Viking with “Bing Aerial” as the map layer. You may need to edit or hide the waypoint names so that they are not shown.
  3. Take a screenshot using the waypoint markers as a guide and edit as before. Note that the waypoints probably won’t be on the opposite corners of a square but I just did a “best fit” and it seemed to work OK 🙂

Multiple Tiles

The script as it stands only handles one file at a time. However it is possible, with some limitations, to create a single 3D model containing several tiles as follows:

  1. Obtain all the necessary LiDAR data files and make a note of their relative positions
  2. Run the script on each file in turn but offset the X & Y coordinates using the -x and -y options. For example, each 2m resolution square will be offset by 1000m in the X or Y direction from its neighbours
  3. Import each of the PLY models into Meshlab in turn as separate layers. If the offsetting has been done correctly then the individual models will line up to form one big surface.
  4. Flatten all the layers in Meshlab and export the complete model.

Model contains 1M verticies and 2M faces

This is a montage of 8 tiles with SN8021 in the top right. The view is looking southwards over Bannau Sir Gaer and Fan Brycheiniog in the Breacon Beacons. Although the data for Llyn y Fan Fach is missing the flat surface of Llyn y Fan Fawr can be clearly seen on the top left. The blue lines on the model are the gaps between the individual models where the mesh is not complete.

Conversion Script

The conversion script can be found in my Github respository ( lidar-ply subdirectory ). It consists of a single Lua file ( lidar2ply.lua ) and needs no other dependencies. Running the script with no parameters shows the help:

Usage: lidar2ply.lua <input file> [ options]
Options: -i <image file> : specify image overlay
            ( note that image must be in Imagemagick text format )
         -f : add false colour
         -x <value> : add X axis offset to PLY model
         -y <value> : add Y axis offset to PLY model
         -z <value> : add Z axis offset to PLY model

The <input_file> is the .asc file containing the LiDAR data and note the comments about the image file format in the text above. The PLY model is output to <input_file>.ply

As mentioned in the text above the LiDAR data is oriented with the north facing to the right rather than upwards so that the “lower left” is actually at the top left. This actually works in our favour because most image data also assumes that the origin point is top left so we avoid an image transformation process 🙂 However I find it easier to visualise north being at the top so the script should really transform the output so that this is the case.

The Github repository also contains a couple of smaller test files ( test20x20.asc, image.png ) that can be used to experiment with when doing code changes.

I couldn’t find a simple Lua command line options parser so I wrote my own “getopt” which has limitations but works fine for this application.

Further Work

There are two avenues to explore going forward:

Firstly the conversion script as it stands works fine but has a few too many limitations to make it really useful. A non-exhaustive list of improvements is:

  1. To make processing easier the script make some assumptions about the LiDAR data file layout that are probably not valid even though I haven’t ( yet ) found any files that break these assumptions.
  2. Export binary PLY files
  3. Attempt to fill in the missing LiDAR data. This is relatively trivial for large bodies of water and flat ground but maybe a little more challenging otherwise.
  4. Process and correctly tile multiple LiDAR files, mixing different resolution data if necessary
  5. Automatically download and overlay map data. Map licencing could be a problem here but maybe something like Open Street Map data would be suitable.
  6. Overlay other data on the models, for example, GPS tracks, rail or canal maps

Secondly more sophisticated ways of exploring the 3D model are needed. Meshlab is fine up to a point but other thoughts are:

  1. Import the model into a game engine and navigate the terrain or create fly throughs
  2. Use some cheap VR gear like Google Cardboard for a full immersive experience.
  3. 3D prints of the terrain, maybe with colour 🙂
Posted in LiDAR | 7 Comments