Subscribe to this thread
Home - General / All posts - Possiblle raster functions request
dyalsjas102 post(s)
#10-Feb-19 16:19

Is there a raster neighborhood function (or combination of functions) that would allow me to collect the number of unique raster values that occur within a specified radius mask; then record the output (per raster) into a new raster tile?

Is there a raster neighborhood function (or combination of functions) that would allow me the collect the value representing the difference between the minimum and maximum raster values that occur within a specified radius mask, then record the output (per raster) into a new raster tile? (I'm examining combining Ceiling, Floor, Negate, and Add)

Is is likely that raster morphology functions (opening, closing, clump, and sieve) will be added sooner rather than later?

tjhb

8,805 post(s)
#10-Feb-19 23:17

In my opinion, non-core functions like these should be written by users (not Manifold), and shared on an open-source basis.

The most Manifold should do, I think, is check and validate, but even that is not necessary.

I suggest that you write a detailed spec for each of the functions you want. Inputs, outputs, corner cases, and above all, data (the curlier the better).

Someone might (a) write what you need or (b) show you how easy it is to write what you need.

The only hard thing is clear specification. That is actual real work, which is entirely up to you. ("Oh but it's well known. The name is enough." No it's not. Specify.)

Manifold engineering makes implementation easy.

dyalsjas102 post(s)
#11-Feb-19 02:43

I concur entirely. I don't think what I'm looking for should be a core function.

I'm looking for ways to evaluate areas of variability within classified (generally single band) images (like land use/land cover).

Perhaps a broader question that might help my self-learning would be:

Can I specify a radius when executing the TileToValues function.

With respect to my final question in the original post:

Is it likely that Manifold will add mathematical morphology functions (e.g. erosion, dilation, opening, and closing) for binary, single, and multi-band images? If so, when?

tjhb

8,805 post(s)
#11-Feb-19 03:09

Data, data, data, data, data, data, data. Examples.

Example:

Can I specify a radius when executing the TileToValues function.

You already know you can't. Why do you want to? What is the purpose?

(Of course, you can expand the tile with TileCutBorder() before using TileToValues.)

dyalsjas102 post(s)
#17-Feb-19 23:18

It seems like the new filter functions added to 9.1.168.9 will answer many of my needs.

I've been trying to simulate a model that I don't have permission to release, so I've had to be a bit less forthcoming than I would have liked. The model uses map algebra on land use/land cover data and other raster GIS layers. A similar modeling process would be raster wildfire modeling.

Part of the model uses mathematical morphology transforms (basic raster GIS functions erosion, dilation, opening, and closing) on raster GIS files to clean and filter the raster data for later ingest. While I can use other raster GIS software to handle the morphology functions, I hope I can eventually take advantage of the GPGPU acceleration in Manifold).

On a separate side note, I recently attended one of the larger ESRI conferences. It was surprising how many folks are beginning to use cloud or GPGPU raster acceleration as an integral part of their GIS modeling process.

tjhb

8,805 post(s)
#18-Feb-19 04:31

Erosion, dilation, opening and closing are easy to implement now (and will execute on GPGPU).

It would be great to collaborate on this.

tjhb

8,805 post(s)
#11-Feb-19 03:29
Is it likely that Manifold will add mathematical morphology functions ...

Give an example. Example data, example function, example result, along with a reason or purpose.

adamw


8,634 post(s)
#18-Feb-19 12:43

Just a quick recap after 9.0.168.9:

Collecting the number of unique raster values within a specified radius mask: TileFilterDiversity(...)

Collecting the difference between maximum and minimum raster values within a specified radius mask: TileFilterMax(...) - TileFilterMin(...)

Clump and sieve: no functions that output connected / cleaned up regions as a raster, but you can do TileTraceArea to extract all areas with different values, then you can remove areas that are smaller than a specific threshold. There is no way to convert the areas back to raster for now - we do not yet expose that as a function, but we might in the future. We might also add functions to do clump / sieve on rasters directly without dropping into vectors.

Any links for opening / closing (I am afraid of mixing things up)? Is this something like - "given value X, if a pixel not equal to X has X in one of its neighbors - however these neighbors are selected - set the pixel to X"? If so, we don't have that yet, but that's easy to add and we were planning to add something similar. If you could point us to what you are after specifically, that would help.

Added later: noticed the mention of erosion and dilation near opening and closing - all is clear now. We don't have this yet, but we will have it. In the meantime one can (fairly easily) do these operations using a script function that takes a tile, performs the operation, returns the result back as a tile, then call that in a query.

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