CaveSurveying / tunnelx

GNU General Public License v3.0
6 stars 3 forks source link

Aligning passage colours with surface contour colours? #10

Open ChrisDensham opened 4 years ago

ChrisDensham commented 4 years ago

Now you have (very impressively) worked out how to export tunnel to surface GIS, is there any chance you could get the tunnel passage colours to align with the surface topography colours, ie to show the depth of the passage beneath the surface?

goatchurchprime commented 4 years ago

The surface colours are done inside QGIS, so it's going to be very difficult to specify the output colour scale to match at all.

However, if I can output a bitmap of the same resolution and coordinate frame which has the elevations in it (like a digital elevation model that is only valid inside the cave passage) then we could use QGIS to shade the cave image (which will start out as white) by the same colour scale. (We're going to ignore the problem of self-crossing passages).

Maybe Nat has some ideas about how these combinations of layers could be combined.

It should be possible to make a greyscale PNG that is just a continuous slope in altitude from one side to the other of the same resolution as a current geotiff, then convert it to a geotiff using the gdal_translate function, and then interpret this as an altitude to see if the images can be combined.

Then, if this works, I can program tunnel to render the correct height maps for the job.

It would be even better if geotiff could incorporate pixel elevation of each point, but I don't know if this is possible. Maybe it can be encoded into the alpha channel or something.

ND84 commented 4 years ago

Probably - It's fairly easy to set colour ramps in qgis with set values/set colours (and presumably relatively easy when exporting from tunnel?) the advantage of not doing so is that when zooming on gis around you can change the colour ramp to only reflect the values (e.g. of the surface model) that are displayed, obviously this reason is irrelevant for paper surveys :)].

The other thing that makes it less useful I think is that it's probably most helpful to colour the cave by level (in a paper survey), which as the passages dip isn't horizontal is challenging; I think, correct me if I'm wrong Julian this currently gets bodged to work presently?

I think once I've had a bit more of a think about it, and prior to next expo I might produce a 'prospecting' survey (hopefully paper and digital - phone compatible) which will have in it: surface elevation model and contours (perhaps a bit less colourful), centreline data coloured by elevation (possibly matched to contour or elevation model colours), aerial imagery (if I can some useful stuff), cave entrances, difference between depth of cave and surface heat map thing and gpx tracks (fee free to suggest anything else :) )

ND84 commented 4 years ago

I think what would massively increase the utility of tunnel (and make it better than therion :P) is if it could output tunnel drawings as georeferenced vector data (maybe it already can?) and then all labelling, colouring, etc could be done in qgis and be synced in with all the other data (e.g. elevation) in addition to being scalable (the same data could be viewed in different ways at different scales) - but I think this is something we need to have a proper think about

ChrisDensham commented 4 years ago

Well I'm delighted to hear Nat that you think colouring-in the tunnel passage to match the surface contour colours is feasible. I don't understand the issue about the passage dip - the passage would change colour as it changes depth based on the centreline, so you could clearly see how all the separate layers in the cave relate to each other (so you can easily see which passage should be on top and which should be below (ho-ho!))