|
POST
|
The discharge is normally calculated by multiplying the cross-sectional area of the river with the velocity of the water (m³/s). The "Flow Accumulation" creates a raster of accumulated flow into each cell. A weight factor can optionally be applied. If your weight map would be the amount of water that contributes to the discharge, then you could calculate it. Since you say you only have a DEM, this will be not enough to calculate the discharge. Kind regards, Xander
... View more
11-11-2013
11:28 PM
|
0
|
0
|
7298
|
|
POST
|
Hi Tianyi, I'm glad I could be of any assistance. If you think it was helpful you can use the "arrow" button in order to help other members find useful information: More info here: http://resources.arcgis.com/en/help/forums-mvp/ Kind regards, Xander
... View more
11-11-2013
11:18 PM
|
0
|
0
|
3112
|
|
POST
|
If this is the question: So far so good, but I want to resample and merge aws0150wta data. But I found I failed probably because the aws0150wta is still in table but not as a raster file (is it right reason?). Thus I am wondering how can I create raster from the value joined from a table in the production. ... then I still think there's no problem in doing what I described before. Just Join the table to the raster and either symbolize on the joined column (as described in the manual): [ATTACH=CONFIG]29010[/ATTACH] or create a new raster with Lookup based on the joined column: [ATTACH=CONFIG]29011[/ATTACH] Either way will give the result: [ATTACH=CONFIG]29012[/ATTACH] Kind regards, Xander
... View more
11-11-2013
07:00 AM
|
0
|
0
|
3112
|
|
POST
|
Xander, Wow, thank you so much for putting so much time into this. I am incredibly impressed. -spencer Hi Spencer, I'm glad I could be of any assistance. If you think it was helpful you can use the "arrow" button in order to help other members find useful information: More info here: http://resources.arcgis.com/en/help/forums-mvp/ Kind regards, Xander
... View more
11-11-2013
05:45 AM
|
0
|
0
|
2056
|
|
POST
|
Hi Tianyi, If you look at the Help on "Raster to Polygon (Conversion)" it states that the "raster field" (the field used to assign values from the cells in the input raster to the polygons in the output dataset) can only be integer or string. Your AWS is double and this will not work as you experienced. What I don't know is why one would want to convert the raster data to vector (polygons) if the "Lookup (Spatial Analyst)" tool will give you a raster with the AWS values. The help states that the "Lookup field" (the field containing the desired values for the new raster) can be numeric or string type. It is easy to merge raster together using the "Mosaic To New Raster (Data Management)" tool. Kind regards, Xander
... View more
11-11-2013
04:14 AM
|
0
|
0
|
3112
|
|
POST
|
Hello all, I am trying to model underground pipes in 3D. I have polyline data of the location of the pipes that includes a field of the absolute 'height' (depth) of the pipes, and a separate digital elevation model of the area. I want to add z-coordinates to the pipelines. Is 'features to 3D from attribute the correct' tool to use to do this (selecting the feature of the height in meters). It just seems like the program would need more information than just the absolute height in meters, since it wouldn't know that the unit was in meters, for example. Thanks for any information! Hi Erin, The Help on "Feature To 3D By Attribute (3D Analyst)" doesn't mention much about the units, but I assume it will be in the same unit as you input features (unless you have a vertical coordinate system defined). Some of the settings are managed by the environment settings. For this tool the following settings may be relevant: Output Coordinate System, Default Output Z Value, Z Resolution, Z Tolerance, Output Z Domain Kind regards, Xander
... View more
11-11-2013
03:50 AM
|
0
|
0
|
368
|
|
POST
|
Hi Spencer, I think that using numpy should be the way to go here. There is not much help on using numpy in ArcGIS, but I came across a nice blog post that explains some of the basics. I tried to calculate the E1 and E2 (see script and results below). import arcpy
from numpy import *
# based on
blog post:
# http://shreshai.blogspot.nl/2011/07/utilizing-numpy-to-perform-complex-gis.html
# input and output rasters
inputDEM = r'C:\Project\_Forums\numpy\grd\dem'
outRasE1 = r'C:\Project\_Forums\numpy\grd\dem01E1'
outRasE2 = r'C:\Project\_Forums\numpy\grd\dem01E2'
outRasAlt = r'C:\Project\_Forums\numpy\grd\dem01alt'
# determine dimensions of array
myArray = arcpy.RasterToNumPyArray(inputDEM)
[rows,cols]= myArray.shape
# cellsize = 10m, distance of 200m = 20, window size will be 41
# half the window size (20 = 20 pixels * 10m/pixel = 200 meters, moving window = 420 * 420)
winhalf = 20
# provide value in case of division by zero
infE1 = (winhalf * 2 + 1)^2
infE2 = (winhalf * 2 + 1)^2 * myArray.max()
IE1=zeros((cols,rows))
IE2=zeros((cols,rows))
Ialt=zeros((cols,rows))
cnt = 0
for r in range(0,rows):
if r % 10 == 0:
print "Processing row:{0}".format(r)
for c in range (1,cols):
cnt+=1
value = myArray[r,c]
r1 = r - winhalf
if r1 < 0:
r1 = 0
r2 = r + winhalf
if r2 > rows:
r2=rows
c1 = c - winhalf
if c1 < 1:
c1 = 1
c2 = c + winhalf
if c2 > cols:
c2 = cols
# size is number of pixels in moving window
size = (r2-r1+1) * (c2-c1+1)
# E1= (# cells in surrounding area with elev.< cell elev.)/(# cells in surrounding area with elev.> cell elev.)
data = myArray[r1:r2+1,c1:c2+1]
indicesGT = where(data>value,ones(data.shape),zeros(data.shape))
indicesLT = where(data<value,ones(data.shape),zeros(data.shape))
outGT = sum(indicesGT)
outLT = sum(indicesLT)
if outGT == 0:
outValE1 = infE1
else:
outValE1 = outLT / outGT
# E2= (sum[cell elev.-(elev.of surrounding cells<gage elev.)])/(sum[(elev.of surrounding cells>cell elev.)-cell elev.])
indicesGTE2 = where(data>value,data - (ones(data.shape)*value),zeros(data.shape))
indicesLTE2 = where(data<value,(ones(data.shape)*value) - data,zeros(data.shape))
outGTE2 = sum(indicesGTE2)
outLTE2 = sum(indicesLTE2)
if outGTE2 == 0:
outValE2 = infE2
else:
outValE2 = outLTE2 / outGTE2
# alternative output value could be:
# percentage of pixels in neighborhood with value higher than pixel value
indices = where(data>value,ones(data.shape),zeros(data.shape))
outVal = sum(indices)
outPerc = outVal * 100 / size
# assign values to output array
IE1[c,r] = outValE1 # E1
IE2[c,r] = outValE2 # E2
Ialt[c,r] = outPerc
# transpose
I2E1 = IE1.transpose()
I2E2 = IE2.transpose()
I2Alt = Ialt.transpose()
# retrieve meta from input raster
descData=arcpy.Describe(inputDEM)
cellSize=descData.meanCellHeight
extent=descData.Extent
spatialReference=descData.spatialReference
pnt=arcpy.Point(extent.XMin,extent.YMin)
#E1
newRasterE1 = arcpy.NumPyArrayToRaster(I2E1,pnt, cellSize,cellSize)
newRasterE1.save(outRasE1)
#E2
newRasterE2 = arcpy.NumPyArrayToRaster(I2E2,pnt, cellSize,cellSize)
newRasterE2.save(outRasE2)
#Alternative
newRasterAlt = arcpy.NumPyArrayToRaster(I2Alt,pnt, cellSize,cellSize)
newRasterAlt.save(outRasAlt)
print "ready..." Result of analysis E1 [ATTACH=CONFIG]29001[/ATTACH] In E2 there will be an nasty effect at the bottom and right side, since no compensation is applied for the reduction in the moving window size. Result of alternative As an alternative it might be interesting to look at the percentage of pixels in the neighborhood with a cell value higher than the value of the central pixel. This shows drainage with dark red colors and ridges in green. Don't know if this is useful... [ATTACH=CONFIG]29002[/ATTACH] Some useful links: http://shreshai.blogspot.nl/2011/07/utilizing-numpy-to-perform-complex-gis.html http://wiki.scipy.org/Tentative_NumPy_Tutorial RasterToNumPyArray (arcpy) NumPyArrayToRaster (arcpy) Kind regards, Xander
... View more
11-11-2013
03:37 AM
|
0
|
0
|
2056
|
|
POST
|
Hi Tianyi, I wasn't able to open any link in your thread. but if the data is in the VAT (Value Attribute Table) of the raster use the tool "Lookup (Spatial Analyst)". In case the data is in a separate table you can use the tool "Reclass by Table (Spatial Analyst)". From the Help: To reclassify individual values, use a simple remap table of two items. The first item identifies the value to reclassify, and the other item identifies the value to assign to it. Set the 'to value field' the same as the 'from value field'. The value to assign to the output is 'output value field'. Some more reading: Understanding reclassification Kind regards, Xander
... View more
11-10-2013
10:26 PM
|
0
|
0
|
458
|
|
POST
|
Hi Xander Your explanations and comments were very good, I really appreciate your help. Kind regards, Thomas For those interested; I attached the explanation of the steps as PDF document. Kind regards, Xander
... View more
11-10-2013
09:55 PM
|
0
|
0
|
1165
|
|
POST
|
You could use "Iterate Rasters (ModelBuilder)". Some more explanation can be found in this topic: "Examples of using iterators in ModelBuilder (Iterate Rasters)". Also "A quick tour of using iterators" may be interesting. Kind regards, Xander
... View more
11-07-2013
10:47 PM
|
0
|
0
|
2695
|
|
POST
|
What does the 'PATHCOST' field mean in the attribute table of the cost path tool output? How is it calculated? Thanks. Hi Joseph, The PATHCOST field holds the actual cost to travel to each destination. Each cell that belongs to a path will hold the value of the cost distance raster at the destination. In case a path is shared by more than one destination, the value will be 0. The result can be travel time in case you used a "time per distance unit" raster as cost raster. See the Help section: http://resources.arcgis.com/en/help/...0000025000000/ The cost assigned to each cell represents the cost per unit distance for moving through the cell. The final value per cell is the cell size multiplied by the cost value. For example, if the cost raster has a cell size of 30, and a particular cell has a cost value of 10, the final cost of that cell is 300 units. Kind regards, Xander
... View more
11-07-2013
10:34 PM
|
0
|
0
|
817
|
|
POST
|
Hi Adam, You are right that strange things happen with annotations. If you use the Field Calculator in an ArcMap session and calculate a new fontsize, it will directly display the changed annotation. If you use a cursor in Python to change the value, the value is changed, but this is not reflected in the map. Even after refreshing or removing the annotation and adding it again to the TOC. import arcpy
fc = r'C:\Project\_Forums\anno\anno.gdb\linesAnno'
fields = ('FontSize')
with arcpy.da.UpdateCursor(fc, fields) as cursor:
for row in cursor:
row[0] = 20
cursor.updateRow(row)
del row It will work in case you actually use the Field Calculator tool from python code: import arcpy
fc = r'C:\Project\_Forums\anno\anno.gdb\linesAnno'
fldFontSize = 'FontSize'
arcpy.CalculateField_management(fc,fldFontSize,"30","PYTHON_9.3")
After refreshing the map, the annotation will be drawn correctly. Kind regards, Xander
... View more
11-07-2013
09:50 PM
|
0
|
0
|
1781
|
|
POST
|
Hi I am converting point data to raster, so I can merge datasets using MOSAIC. To avoid MOSAIC resampling the raster's I would like the raster files to be aligned. When creating a raster file from point data how can I control the alignment of the raster points? Thanks Fay Hi Fay, If you look at the Help page "Point to Raster (Conversion)" and scroll to the bottom of the page you see "Environments". Relevant are: - Extent (here you can define the exact coordinates of the output extent) - Cell Size (the cell size of the output raster, which is also an option in the Point to Raster dialog) - Snap Raster (if you already have a raster and want to align it with that raster, set this raster as Snap Raster) Kind regards, Xander
... View more
11-07-2013
06:29 AM
|
0
|
0
|
312
|
|
POST
|
I am having this same problem. And I have tried to save the data to the attachment manager. It is called 3D Files to Gert. Hi Robbi, That's odd indeed. When doing the Difference3D it gives an error stating that the result is not simple: Executing: Difference3D ValleyBtm Level1 C:\Project\_Forums\dif3D\test.gdb\dif3Dv01 Start Time: Thu Nov 07 12:40:02 2013 WARNING 050097: Difference failed when subtracting from ValleyBtm, OID: 0, result is NOT simple. WARNING 050099: No Difference result generated. WARNING 050099: No Difference result generated. Succeeded at Thu Nov 07 12:40:08 2013 (Elapsed Time: 6,50 seconds) Both multipatches are closed correctly: Executing: IsClosed3D Level1 Start Time: Thu Nov 07 12:46:47 2013 Succeeded at Thu Nov 07 12:46:47 2013 (Elapsed Time: 0,44 seconds) Executing: IsClosed3D ValleyBtm Start Time: Thu Nov 07 12:47:05 2013 Succeeded at Thu Nov 07 12:47:05 2013 (Elapsed Time: 0,39 seconds) And when an Interect3D is done it works fine: [ATTACH=CONFIG]28918[/ATTACH] The green multipatch is the overlapping area. I tried it too with a Union 3D (after merging both multipatches together) and that also works and results in a closed multipatch: Executing: IsClosed3D MergedMultiPatches2union Start Time: Thu Nov 07 13:14:16 2013 Succeeded at Thu Nov 07 13:14:17 2013 (Elapsed Time: 1,34 seconds) Could this be a bug in Difference3D? Kind regards, Xander
... View more
11-07-2013
02:15 AM
|
0
|
0
|
863
|
|
POST
|
Hi Thomas, What kind of problems do you walk into? If you can share a small part of your data and the height you're evaluating against, I can have a look and see if this might be version related or data related. Kind regards, Xander
... View more
11-06-2013
09:02 PM
|
0
|
0
|
1165
|
| Title | Kudos | Posted |
|---|---|---|
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM | |
| 1 | 05-29-2019 02:45 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-26-2025
02:43 PM
|