Subscribe to this thread
Home - General / All posts - Grid buffers in M9
danb

2,064 post(s)
#07-May-22 20:26

Is there an easy way to create a grid ring buffer in Manifold 9? I dug out a bit of code from Manifold 8 which created one using a distance function between a vector object and each pixel centroid, but I can't see how to do this at a tile level in M9. Perhaps the least cost path functions can be used?

At the moment, I am doing it by first creating a vector buffer and then transposing this to a surface. I would however prefer to do this straight in the surface, being able to specify a buffer distance and a maximum number of buffers.

Thanks in advance for any thoughts.


Landsystems Ltd ... Know your land | www.landsystems.co.nz

tjhb
10,094 post(s)
#08-May-22 16:13

What us a “grid ring buffer”?

The picture helps, but (for my part) I am still not sure what you need to do (or why).

(I think you will be looking at one or more of the TileFilterDef* functions, passed as an arg to TileFilter.)

danb

2,064 post(s)
#08-May-22 22:37

Hi Tim,

Same as a vector ring buffer but done in a grid. I thought they were available in ESRI (and I am still not convinced that they aren't, though can't face waiting for Pro to boot to give it a go). However from my ESRI searches, I came across lost of references to Euclidean distance which I believe we can already do so I will have a look there first. Thanks however for the filter suggestion which I will also have a look at.

Regards the purpose. I have made a LiDAR seam blender in M9 similar to the one in Global Mapper but which deals with holes in the LiDAR. I have it working by transposing a vector buffer 'seam' to raster but would like to do it all in raster mode which I think would probably be more performant given Manifold's grid infrastructure.

Top = LiDAR and your LINZ 8m DEM merged

Bottom = LiDAR and LINZ 8m DEM blended

Attachments:
Clipboard-1.png


Landsystems Ltd ... Know your land | www.landsystems.co.nz

tjhb
10,094 post(s)
#09-May-22 00:06

Perhaps we need to talk. I am travelling between islands (yes, still...). Early next week?

danb

2,064 post(s)
#09-May-22 01:00

Shame Euclidean distance from a trace of the raster extent would have been just the job. Unfortunately we can currently only use points rather than lines as a starting point for the calculations.

Attachments:
Clipboard-1.jpg


Landsystems Ltd ... Know your land | www.landsystems.co.nz

tjhb
10,094 post(s)
#09-May-22 01:23

I don't think that's true Dan. We can certainly use filters.

Sorry I'm not much use at the moment.

What I think you're thinking of is painting lines onto an image or surface as a selection, then working in code with selected pixels.

Very useful.

danb

2,064 post(s)
#09-May-22 01:31

This is the Manifold 8 example map I was referring to in my original post

Attachments:
M8 GRID DISTANCE BUFFER.map


Landsystems Ltd ... Know your land | www.landsystems.co.nz

adamw


10,447 post(s)
#12-May-22 15:06

This looks like a type of TileDistanceXxx functions, the current ones we have compute distances to a set of points (specified as XY+ID). If I understand you correctly, you want to start with a raster where eg, pixels with the value of 0 would be treated as sources and all other pixels would have to be set to distance / direction to closest source. Or maybe all visible pixels would be treated as sources and all invisible pixels would have to be set to distance / direction / ID of closest source. Right?

danb

2,064 post(s)
#15-May-22 20:41

Thanks Adam, I will have a look.


Landsystems Ltd ... Know your land | www.landsystems.co.nz

yves61
438 post(s)
#12-May-22 16:27

@danb : For inspiration purpose : this M9 video might help to transfer e.g. buffer attributes from the drawing layer into the pixels in the raster layer.

https://www.youtube.com/watch?v=C27V4FHGk94

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.