POST
|
Thanks Guenter. He is correct. It depends on the raster you are using. I wrote the code based on a geoeye raster product. These products actually store the band names as colors. If you are using a more generic raster it will be what Gunter suggested.
... View more
01-26-2018
10:00 AM
|
0
|
0
|
1431
|
POST
|
Sorry Alin. My mistake. Give this a shot. import arcpy
for row in arcpy.da.SearchCursor("c:\\test\\IKONOS.gdb\\IKONOS_CalVal_16bit", ["Raster"]):
res = arcpy.GetRasterProperties_management(row[0], "WAVELENGTH", "BLUE")
print(res)
... View more
01-23-2018
03:40 PM
|
0
|
1
|
1431
|
POST
|
Hi Alin, The get raster properties tool should do this. wavelength is one of the properties that the tool returns. Mosaic datasets are supported in this tool as well. Most of our tools treat mosaic datasets as rasters. If you would like to read porperties individual rasters within a mosaic dataset you will need to use a search cursor. For example: for row in arcpy.da.SearchCursor(mdPath, ["OBJECTID", "Name", "Raster"]):
GetRasterProperties_management(row, "WAVELENGTH", "Band_2")
... View more
01-22-2018
01:22 PM
|
1
|
3
|
1431
|
POST
|
Hi Kaixi, What kind of raster are you applying this function to? I am getting a blank output when i apply this to rasters. Jamie
... View more
01-18-2018
10:14 AM
|
0
|
3
|
1009
|
POST
|
Hi Spring, What kind of input data are you using for this? Are you applying this as a template on a mosaic dataset or are you just using a raster dataset and image service as an input to the function itself? Is there already a template applied to the image service before you publish it or are the raw pixels being transmitted in the image service? Would it be possible for you to send the Python function? Jamie
... View more
01-16-2018
03:33 PM
|
1
|
5
|
1009
|
POST
|
I haven't tried calling anything from grass in aPython raster function before but i assume it can be done since you can call grass functions in Python. This wiki explains how to do this: Using GRASS GIS through Python and tangible interfaces (workshop at FOSS4G NA 2016) - GRASS-Wiki You should be able to call the grass function in the update pixel method and pass in the pixel block you have defined as your input raster.
... View more
11-28-2017
02:35 PM
|
0
|
0
|
462
|
POST
|
Yes. It is broken for me too. Not sure what is wrong. I'll have to take a look when i get back from thanksgiving on Monday. Sorry about that. That section just describes some of the do's and don't of writing raster functions that are optimized for performance. For example. Avoiding looping through pixel arrays when possible. It can be done but it will slow down performance. It is better to use numpy/scipy and other array packages to process image instead. Jamie
... View more
11-22-2017
08:45 AM
|
0
|
3
|
1419
|
POST
|
Good to hear. We have a github repo with a bunch of samples in it. They are here. The sample range from basic NDVI to more complex raster functions. That would be a good place to start. Some of them have package dependencies that might not be installed with ArcGIS. Although most of them do come installed. The setup.py from here will install everything required by our repo. If you want to use a module that is not in there you will have to install it yourself. I would recommend pip install. It is probably the easiest way. Once you have written a Python function is can be inserted into a function chain as a first class item just like out of the box functions. Inserting a Python function in 10.x can be done by right clicking on an item in a function chain then selecting insert python raster function. Point to the .py file and you should be good to go. This can also be done in Pro. Just a slightly different workflow. There is a wiki for this repo that should explain all the details. Let me know if you have any questions along the way. I'd be happy to help. Jamie
... View more
11-21-2017
09:20 PM
|
0
|
5
|
1419
|
POST
|
Hi guys, You could use the Python raster function to do this, but I don't think it is necessary. This can probably be done using out of the box functions. Try building a fx chain that looks something like this in the function editor. You can extract the two bands you need the raw values from then for band G you can use band arithmetic with a user defined formula. In your case it will look something like this: At this point you can use composite band to put them all back together then use the stretch function to convert it back to 8 bit. If you still want to head down the Python raster fucntion path I can help you with that as well. It will just require a bit of coding. Hope this helps. Jamie.
... View more
11-21-2017
10:16 AM
|
1
|
7
|
1419
|
POST
|
We are noticing somewhat slow behavior when adding several rasters from a network location using this control. It was validating every record it was adding to the table control. Didn't really notice it so much when adding rasters locally (i tried 500) but that could still be the case for you depending on hardware configuration. We will have this fixed for the next release. Sorry for the inconvenience.
... View more
08-17-2016
04:31 PM
|
1
|
1
|
385
|
POST
|
Hi David, Thanks for letting us know about this. We will investigate and get back to you. Are all the rasters that you are using local or are some of them on a network. I can only see half of your list in the screenshot.
... View more
08-15-2016
03:33 PM
|
0
|
3
|
1579
|
POST
|
Hi Subu Swaminathan Can you send us a little bit more information on the problem that you are running into? We would like to try to get a repro case and fix this issue if possible. What kind of imagery are you adding to your mosaic dataset? How many images are you loading? Are you building overviews? Are you using a product definition when creating your MD?
... View more
07-29-2016
01:00 PM
|
0
|
6
|
1579
|
POST
|
The spectral bandwidth of the pan only covers blue (just a little), green, yellow, red, red edge and NIR (just a little) MS bands. So the most you can pan sharpen would be 6 bands, but the common bands would be 4 bands b, g, r, nir. Compute pan sharpen weights for Gramm Schmidt would give you the weights tailored for his specific image. This method is only available at 10.1 and later. You could sharpen b,g,y as one 3-band composite image and then ps r, re, nir for the 2nd 3-band composite, then combine them into one 6-band pansharpened image. You could even include the coastal and NIR2 unsharpened bands in this last composite image if you want all 8 bands. This would have to be done manually using the extract band/pansharpen function or suing the pan sharpen gp tool.
... View more
04-09-2014
10:09 AM
|
0
|
0
|
886
|
POST
|
Hi Beata, Are the rasters gray when you zoom in really close? Rasters typically display as gray when you don't have service overviews built. Base rasters in a mosaic dataset are only designed to display up to a certain scale. Beyond that scale these rasters will display as gray. It is recommended that you build service overviews on your mosaic dataset which will display at higher scales and ultimately improve overall performance. You can build overviews in one of two ways: 1. Right click on the mosaic dataset in ArcCatalog. Select 'optimize > build overviews'. 2. In ArcToolbox Navigate to 'data management tools > raster > mosaic dataset > build overviews'. I hope this helps.
... View more
12-06-2012
09:03 AM
|
0
|
0
|
1418
|
Title | Kudos | Posted |
---|---|---|
1 | 01-16-2018 03:33 PM | |
1 | 01-22-2018 01:22 PM | |
1 | 08-17-2016 04:31 PM | |
1 | 11-21-2017 10:16 AM | |
1 | 08-05-2011 02:35 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|