|
POST
|
Use Con and FocalStatistics. Something like: Con("raster"==0, FocalStatistics("raster", NbrRectangle(3, 3, "CELL"), "MAJORITY"), "raster")
... View more
08-09-2013
03:13 PM
|
0
|
0
|
649
|
|
POST
|
Are you applying the MYD09A1 scale factor of 0.0001? 2.5 * (("%Band 4%" * 0.0001 - "%Band 3%" * 0.0001)) / (("%Band 4%" * 0.0001) + 6 * ("%Band 3%" * 0.0001) - 7.5 * ("%Band 1%" * 0.0001) + 1))
... View more
08-08-2013
06:10 PM
|
0
|
2
|
5963
|
|
POST
|
You're writing to "E:\\Melo\\USGS\\Roads.gml" but trying to convert "E:\\Roads.gml" You don't need the ArcGIS GDAL python bindings, you are not using them in your script. You can convert directly from the WFS (including defining the projection) using: ogr2ogr -a_srs EPSG:4267 -f "ESRI Shapefile" E:\\Roads.shp WFS:http://path/to/WFS/service?required_or_optional_parameters_etc...
... View more
08-06-2013
10:35 PM
|
0
|
0
|
474
|
|
POST
|
Just for info, here's a link to instructions on how to post Python code. # Import arcpy module
import arcpy
# Log file
logfile = "C:\\arcgis\\scripts\\log\\speedreturn2.log"
f = open(logfile, 'w')
arcpy.ImportToolbox(r"C:\arcgis\Tools\GPS_speed.tbx", "TBX")
try:
arcpy.Speed_TBX()
f.close()
except:
f.write(arcpy.GetMessages(2))
f.close()
... View more
08-06-2013
08:04 PM
|
0
|
0
|
2619
|
|
POST
|
Your linear units (XY) are metres. You do not need to change the Z factor as your elevation values should also be in metres. If for some reason your elevation values are in feet, you would use a z-factor of 0.3048 to convert your elevation from feet to meters (1 foot = 0.3048 meters). Ignore below (It's only relevant if your linear units are in degrees). See this thread: Z factor in slope tool and these articles: Setting the Z Factor parameter correctly and Determining a Z-factor for scaling linear elevation units to match geographic coordinate values.
... View more
08-06-2013
02:21 PM
|
0
|
0
|
1164
|
|
POST
|
I'm sure setting the output extent to MAXOF/union of inputs used to work in Workstation GRID/older versions of Spatial Analyst when the multiple inputs were Con(IsNull(...),...) functions. I think what is happening is that ArcGIS is processing the raster calculator statement from inside to out - i.e it processes the Con(IsNull(...),...) statements individually and as there is only one raster in each of those, the output extent for each Con... statement is set to that of the single input raster, instead of parsing the whole statement and working out the extent for all rasters before processing the Con statements. Workaround: Generate a dummy raster with output extent set to MAXOF/union of inputs using something like raster1+raster2+etc... Then set output extent = dummy raster and run HighestPosition(Con(IsNull(raster1),-999,raster1),etc...)
... View more
08-05-2013
03:15 PM
|
0
|
0
|
478
|
|
POST
|
If the output of the HighestPosition is the number of raster dataset, this function is not suitable for Jproville's purpose, its return is still to be replaced by the ralated dataset cell original value, and to eliminate the "NoData " output value. I understood from jproville's question that he wanted to find out which raster had the max value: ...one thing I'd like to see is a raster showing me which of the 23 layers contained the maximum value that was chosen. The Max function is fit this application, but why ESRI removed this tool in the 10 version? The Max functionality is still there, it's just been moved into a new tool. ESRI changed a lot of things at version 10, names (i.e. UPos -> HighestPosition) and merged some tools (Max/Min/etc = CellStatistics, FocalMax/FocalMean/etc = FocalStatistics etc...).
... View more
07-31-2013
04:47 PM
|
0
|
0
|
1856
|
|
POST
|
Thank you both. Very helpful responses. Then you should vote up the answers (click the ^ above the 0 to the right of the answers). If one of them answered your question completely, you can even mark it as such by clicking the check mark/tick to the right of the answer.
... View more
07-31-2013
02:14 PM
|
0
|
0
|
2046
|
|
POST
|
Running the tool with three or more input datasets seems to include only results that are an intersection of all the inputs. All other non-intersecting areas are NoData. What I would like is to have a dataset represented in the results, even if it is the only one with a value in a specific cell. It's working as expected. The default processing extent is the intersection of input extents, change this to union - see the help for more info. However, any cell with NoData will be NoData in the output. So change it to a low number first. i.e. in the raster calculator: HighestPosition(Con(IsNull(raster1), -999, raster1), Con(IsNull(raster2), -999, raster2), Con(IsNull(raster3), -999, raster3)) Did you check that HighestPosition (or Upos) function works well or not? I never use this function, but it seems the illustration from ESRI book is not correct - the return is not always the cell with Max value. ig: the downside left conner cell values from input raster datasets are 4, 3, 1, but the return value for this cell is 1. But the illustration for Max (9 version) function is correct - this cell return value is 4. No, the return value of 1 is correct. HighestPosition/Upos returns the position of the raster with the highest value in the list, not the maximum value itself. For your example of 4, 3, 1, 4 is the max and it is at position 1. For something like 9, 12, 7, the HighestPosition/Upos value would be 2 as the raster with the highest value is at the 2nd position in the list.
... View more
07-31-2013
02:08 PM
|
0
|
0
|
1856
|
|
POST
|
Use the HighestPosition function/tool. Used to be called UPos in earlier versions.
... View more
07-30-2013
07:13 PM
|
0
|
0
|
1856
|
|
POST
|
I did this using a simple linear interpolation for the 30- and 40-degree values referenced in the table contained in the link. Does this seem like a sound way to determine the appropriate z-factor? If not, could anyone suggest an alternative? No, it's not a linear relationship, but it's not that much of an issue as long as the z factor is roughly correct. To calculate it properly: z=1/(111320*COS(latitude*pi/180))
z=0.00001148 where latitude = 38.5 In Excel you can use the following formulas: =1/(111320*COS(38.5*PI()/180)) or =1/(111320*COS(RADIANS(38.5))) See this page for further info.
... View more
07-30-2013
06:08 PM
|
0
|
0
|
2046
|
|
POST
|
Then you should click the check mark/tick next to Wayne's answer to indicate that it answered your question.
... View more
07-28-2013
12:03 AM
|
0
|
0
|
1683
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-30-2025 03:00 PM | |
| 1 | 06-10-2025 08:06 PM | |
| 5 | 05-20-2025 07:56 PM | |
| 1 | 05-04-2025 10:34 PM | |
| 5 | 04-22-2025 09:04 PM |