Comments (9)
Hi Ellen,
- No the fill raster code is a code sample that a user committed to our Git Hub repo. It much simpler that the elevation void fill tool. It essentially populates an array with a user defined value. In this case it fills the entire raster with that value. The code being used is a numpy function:
pixelBlocks['output_pixels'] = np.full(shape, self.fillValue, dtype=props['pixelType'])
We don't document these as they are code samples uploaded from our users. It is up to them to document/comment their code.
There is a function that is available out-of-the-box that does what you want.
http://pro.arcgis.com/en/pro-app/help/data/imagery/elevation-void-fill-function.htm
-
I'm not sure if i can send you the code for the out-of-the -box function as it is is proprietary.
-
You can open the code from any text editor or Python IDE.
from raster-functions.
Thanks for the quick response. I was using the elevation void fill function within ArcGIS Pro but it is not performing as expected. It is leaving cells unfilled that should be filled.
If I actually had the code, I understand I can open it in any text editor, but from what you are saying, I cannot access the code for the elevation-void-fill-function because its proprietary - yes?
Is there a way to call the function directly from python? I understand it is NOT part of ArcPy.
from raster-functions.
it can't really be called from Python. We do have a generate raster gp tool that will consume a raster+ function template a generate a physical output raster. You can place the void fill function in the template and use it. If you are using the out-of-the-box function and it is not working we can investigate that. What are you setting as your max void width? Can you share the raster?
from raster-functions.
The raster is just a selected HUC6 from the 10M NED available from the USGS.
I left the Max Void width to the default 0 so that all voids were to be filled.
I am running code but can share the raster when the data is free.
from raster-functions.
Ok. I can take a look at it and see what is causing the problem. The developer that worked on that tool is just down the hall. I can have him take a look at it. Are the holes that are not being filled doughnut holes or are they on the edge of your data?
from raster-functions.
Hi @ellend999,
Do you still want me to take a look at your data?
from raster-functions.
I noticed the issue when I went on to produce flow direction grids from the fill grid produced by the raster function. The flow direction grids produced values that are not legitimate flow direction values (in other words not 1,2,4,8,16,32,64, or 128). This happens when there are sinks in the data. When I run the Spatial Analyst/Fill tool and then run the flow direction, the flow direction values were all appropriate. I tried attaching the dem I was using but it was too big. Let me know if you have an alternative way for me to get you the data.
from raster-functions.
@ellend999. I just took a closer look at the fill gp tool and the elevation fill function. They are actually doing different things. The elevation void fill function actually fills nodata values in your DEM using either a fitted plane or idw interpolation. This was deigned to fill in holes created in Lidar derived DEMs caused in bare earth DTMs (i.e. building footprints or lakes).
The fill gp tool actually fills sinks which are hydrological anomalies in DEMs and not just holes from missing data.
So these two tools do different things at the end of the day. Maybe we can try to make a Python raster function that does something similar to the fill gp tool. Try plugging this function into the Python raster fucntion and see what it does:
Use the fill function from our repo as a starting point. Replace the current function in the updatepixels() method with this one. I can help if you get stuck.
from raster-functions.
from raster-functions.
Related Issues (20)
- can not import scikit-image in ArcGIS Pro 1.4 HOT 4
- Slope-Aspect Customized Slope Values HOT 1
- Add support for non c-contiguous arrays in the python raster function HOT 1
- How to use code HOT 3
- Write Wiki to have instructions for ArcGIS Pro instead or in addition to ArcMap HOT 2
- Add Section to Wiki on Writing RFTs to Process Collections of Imagery HOT 4
- How reference many Rasters to other rasters (Warb) HOT 1
- Implement FMask based cloud filtering
- Add error catching to pixel percentile calculations
- Hillshade.py in ArcGIS Pro HOT 4
- Python extension packages missing
- Zonal stats function HOT 4
- How to write YOLO or U-Net Deep Learning code which is integrated with RasterFrames? HOT 5
- Hyperlinks Missing for select Raster Functions and Templates HOT 1
- Deploy Raster function on server HOT 4
- How to reference a field value in mosaic table to use in Python RFT HOT 9
- error running Clip raster function using Foreach loop HOT 2
- Difficulties with publishing a rft with a python raster function from Pro to ArcGIS server 10.9.1 HOT 1
- Issue with XGBoost loading a pretrained model in a custom raster function HOT 3
- Clearification regarding "resampling" in wiki needed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raster-functions.