Comments (5)
We are in the process of writing this document at the moment. Let me try to explain it here in the meantime.
When applying a function to a stack of data in a mosaic dataset aggregation is controlled at the raster function template level. The properties of an rft can be accessed by right clicking on the top of the function chain and selecting Properties (in version 10.x).
The two settings in the rft properties that are used to aggregate records are the tag field name and group field name. you are also going to want to set the type parameter to item group The two fields that you reference in these parameters also need to exist in your mosaic dataset attribute table. The records in the group field will contain a unique identifier that will represent a group of items in the mosaic dataset while the tag field name will reference items in those individual groups. For example:
When referencing these items in the Python raster function you are going to set the data type of that parameter to *rasters *. You can see how this works in the aggregate function. Items in the mosaic dataset will be passed into the python raster function as a group. You can then use this group of items do perform operations like aggregation. I hope this helps. We will try to get the help topic up for this as soon as possible. Let me know if you have any questions.
from raster-functions.
Jamie,
I think you got the wrong Thomas ;)
From: Jamie Drisdelle [mailto:[email protected]]
Sent: Monday, February 29, 2016 3:08 PM
To: Esri/raster-functions [email protected]
Subject: Re: [raster-functions] Add documentation for Group Items in Processing Template (#29)
Hey Thomas,
We are in the process of writing this document at the moment. Let me try to explain it here in the meantime.
When applying a function to a stack of data in a mosaic dataset aggregation is controlled at the raster function template level. The properties of an rft can be accessed by right clicking on the top of the function chain and selecting Properties (in version 10.x).
The two settings in the rft properties that are used to aggregate records are the tag field name and group field name. you are also going to want to set the type parameter to item group The two fields that you reference in these parameters also need to exist in your mosaic dataset attribute table. The records in the group field will contain a unique identifier that will represent a group of items in the mosaic dataset while the tag field name will reference items in those individual groups. For example:
When referencing these items in the Python raster function you are going to set the data type of that parameter to *rasters *. You can see how this works in the aggregate functionhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_raster-2Dfunctions_blob_master_functions_Aggregate.py&d=CwMCaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=1m0wo-6vj-vRGTP5YsZeQQ&m=aSYreFdAoR1esOoznaH8DuoaVxzfjQKAsg66Dr97sXk&s=Nkt6_9ppkirRjgFjmL9MAB9pogQ2lOjy6RaCdjnT67Q&e=. Items in the mosaic dataset will be passed into the python raster function as a group. You can then use this group of items do perform operations like aggregationhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_raster-2Dfunctions_blob_master_functions_Aggregate.py&d=CwMCaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=1m0wo-6vj-vRGTP5YsZeQQ&m=aSYreFdAoR1esOoznaH8DuoaVxzfjQKAsg66Dr97sXk&s=Nkt6_9ppkirRjgFjmL9MAB9pogQ2lOjy6RaCdjnT67Q&e=. I hope this helps. We will try to get the help topic up for this as soon as possible. Let me know if you have any questions.
—
Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_raster-2Dfunctions_issues_29-23issuecomment-2D190440426&d=CwMCaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=1m0wo-6vj-vRGTP5YsZeQQ&m=aSYreFdAoR1esOoznaH8DuoaVxzfjQKAsg66Dr97sXk&s=qITHFoQPgTAIZ2nEMUEHsnrf5HdmcHkOjkaGbSZdG2I&e=.
from raster-functions.
Sorry @ThomasEmge . Not sure how that happened.
from raster-functions.
Thanks Jamie,
but how can I reference datasets in a specific group or with a specific tag inside the processing template?
By now I already figured out that if I write the tag in the Aliases field in the Variable Manager my raster function will only use rasters with that tag.
In the windchill raster function template I saw you were using something like this
t@SFC
What does that me? Can I reference a group like this?
Thanks,
Thomas
from raster-functions.
@thomas-maschler, I'm sorry you had to figure that out without any/sufficient documentation.
TL;DR: The string t@SFC is simply a tag associated with each temperature "slice" constructed by the GRIB raster type when used against an NDFD forecast data from the NWS.
Here's one way to think about it…
Windchill is a good example of a binary raster function--needing two input rasters, temperature and windspeed--housed in a template with two variables of type raster as input.
Unary functions like NDVI or KeyMetadata are even simpler needing only one raster along with one or more scalars as input.
A third category of function (based on cardinality) is one that expects an (unordered) stack of rasters, like the Aggregate function.
In addition to the notes from @jdrisdelle, these are the points I want to emphasize when we document the interaction between functions, templates, map, mosaic dataset, and the user.
- On one end, raster functions only define what their input expectations are in terms of data type and default value, using the
getParameterInfo
method. Raster functions do not (and cannot) determine how datasets or layers are eventually "connected" to those inputs. - On the other end, we have higher-level constructs that are containers of datasets like a map (containing image layers) or a mosaic dataset (containing items). As users, we are looking for ways to intuitively connect our raster function(s) with raster data.
- Raster function templates help make that connection. Exactly how ArcGIS uses your template is specific to the application and the context. Input raster datasets "bind" to input parameters of raster functions through variables defined in the template. More precisely, a raster dataset identified as, say, R, will bind with a particular template variable if it's named R or if it has an alias R.
In ArcMap, raster-based layers (like image server layer, mosaic layer and raster layer) are named based on their order in the Table of Contents. So, the first layer is Raster1
, the second one is Raster2
, and so on. This enables us to use any template (driven by any binary function) as long as the variable name (or alias) reads Raster1
and Raster2
. Additionally, the first layer also goes by the name Raster
to enable unary templates to work correctly. To enable aggregation, the virtual stack of all selected rasters is called Raster[]
. We use order-based naming here because other methods of tagging the layers (based on, say, the layer name) would severely diminish your function templates' re-usability.
Mosaic datasets add another level of complexity because we now have multiple groups of rasters against which the template needs to be repeatedly applied in order to construct the mosaicked image. We can use a field in the mosaic dataset to uniquely identify different groups of items—think of them as neighborhoods or subsets in your collection. As @jdrisdelle described, this field is indicated to the function template's Group Field Name parameter. We use another field—specified in the Tag Field Name parameter—to identify each item within a particular group. The item's tag is its name and is used for binding with template variables (as long as it matches the variable's name or one of the aliases). We can use this construct to group together multiple items (like temperature and windspeed) by, say, time. Analogous to the map-based scenario, all items in a group are made available as a virtual stack and tagged Raster[]
. This enables aggregation-type templates to work as well. Because a mosaic dataset is carefully authored and its items managed as records in a database table, we avoid order-based tagging of items and resort to using author-define or raster-type-specified names. Lastly, these rules for a mosaic dataset are in addition to prevailing constraints on each item w.r.t. visibility- and query-based filtering.
Hope that makes sense.
from raster-functions.
Related Issues (20)
- Elevation Fill Void - Fill raster function HOT 9
- aspect-slope raster function problems HOT 1
- 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
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.