-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to reference a field value in mosaic table to use in Python RFT #81
Comments
You can create a RasterCollection from the mosaic and use getFieldValues to access the fields |
Thanks for you answer.
The mintest and maxtest variables return lists with all values in my mosaic
How to access correct list index from the pixelblock in process ? |
I don't think it tells you which image the block comes from. What do you want to do with the min/max? |
Rasters have a priority order thanks to the Zorder field in the mosaic. But
in this case i don’t have overlapping raster. All raster are in different
places.
Min and max field are reference altitudes and i try to get these field
values to make à dynamic remap with a colorscale. Min and max values for
each raster have different ranges.
I managed to do what i want using a user defined min and max parameters.
But it is manual, i need to access the values in the mosaic field. As a
result, when I zoom in one of the raster, the RFT displays the appropriate
color scale ranging from the min and max value for the corresponding raster.
NB: I make also other tests for other python RFT process and the
possibility to acess a numeric value inside a mosaic field would be very
useful.
Le lun. 12 sept. 2022 à 20:58, Shengan Zhan ***@***.***> a
écrit :
I don't think it tells you which image the block comes from. How do you
make sure you get the correct one when there is overlapping images?
What do you want to do with the min/max?
—
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2SZSM7DIS45YARJCBZPOPTV554M5ANCNFSM6AAAAAAQIPRUZI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Anouk VILLE
|
How did you apply this to the current raster in the mosaic you are viewing?
|
I made 2 versions of the RFT.
To generate the min and max constant value rasters, I use the Rasterize feature raster function on a feature layer containing the min and max field. It works and depending of the rasster zoomed on, the colorscale automatically adapt to the range defined by the min and max in the feature layer (I manually created the feature layer polygons for each raster). On the home page I read an exemple which makes what I want (https://github.com/Esri/raster-functions): "Fish Habitat Suitability [FishHabitatSuitability.rft.xml](https://github.com/Esri/raster-functions/blob/master/functions/FishHabitatSuitability.rft.xml] is a grouping raster function template that accepts the temperature and salinity rasters (in that order). This template—when used in the Add Rasters to Mosaic Dataset tool with the Table raster type or as a processing template on a mosaic dataset—is capable of obtaining the value of the depth parameter from a specific field (StdZ, if available) in the table." I tried to reproduce this example using the @Field.min and @Field.max but not working. I am loosing hope to find a solution |
I tried to use as suggested a RasterCollection and make the intersection of the pixelblock object with the raster from the mosaic to access the values. Here is my updatePixel() function:
It seems to work at a certain level of zoom. But when zooming out, nothing is displayed |
It would be best if you could provide a reproducible case so we can diagnose. |
Ok, I will try to prepare some test data. |
Hi,
I made a simple Python RFT chained with another RFT template. I use a Rasterize Feature to access a value inside a feature table. Then I am able to apply my python RFT to a mosaic. But It is not optimal for me.
I would like to directly use this numeric value stored in a field of my mosaic (this value can change from one raster to another inside the mosaic).
I made lot of test but unsuccessful.
Does someone has an idea on how to do that ?
thanks for your help.
The text was updated successfully, but these errors were encountered: