Hexagon Geospatial
MENU

Spatial Modeler

Discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 219
Registered: ‎11-16-2015
Accepted Solution

Nibble Function

Hi. Is there any way to replicate the Nibble function from ESRI (http://bit.ly/2T9iJJY) in IMAGINE/Spatial Modeler?

 

Cheers,

 

Johnnie

Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Nibble Function

[ Edited ]

Hi Johnnie,

 

Proximity Spread should do it I think, but currently has a problem (refer to IM-46021 if you have access).

 

Ooops - had't noticed that Proximity Spread creates an "OrignalSourceValue" attribute. So it's workling correctly and is exactly what you need to do a "Nibble" model,

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Nibble Function

Here's the core of what you need:

 

nibble_model.PNG

 

This one assumes the input raster already has NoData holes in it. Would be easy to alter that to take a second image and turn that into a NoData mask instead.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Nibble Function

[ Edited ]

I sat down and started to flesh this model out as an article for the Spatial Models Tutorial section and realised that this model does pretty much the exact same thing:

 

https://community.hexagongeospatial.com/t5/Spatial-Modeler-Tutorials/Filter-an-Image-n-Times-using-t...

 

The results of applying sequential Focal Majority filters will definitely be different from that produced by Proximity Spread, but for relatively small gaps/holes they are almost identical. In some instances I might argue that the Focal approach result is better. 

 

The Focal Majority approach also appeared to be much faster than Proximity Spread, with the possible downside of using temporary disk space. However, interestingly, Proximity Spread does not seem to be slowed down as you increase the MaximumCost (i.e. distance to fill), whereas the Focal Majority is definitely going to take linearly longer as you increase the number of iterations (i.e. distance). So the Proximity Spread may be a better option if you have large holes to fill and want to specify an arbitrarily large distance to force all holes to be filled completely.

 

If you were attempting to build Thiessen Polygons from very sparse samples I would use Proximity Spread. But for filling relatively small areas of unknown values, the Focal Majority approach could be a solid option to consider. 

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Nibble Function

Here's the more elegant, fully featured version of the Spatial Model:

 

https://community.hexagongeospatial.com/t5/Spatial-Modeler-Tutorials/Replace-NoData-locations-with-t...

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.