|
POST
|
Below the code based on the thread mentioned by Dan Patterson adapted to create squares or rectangles. Change lines 6 and 11 to point to your input and output (will be created) and change the sizes on lines 7 and 8. For some more snippets with Python have a look at: https://community.esri.com/docs/DOC-1927 import arcpy
def main():
arcpy.env.overwriteOutput = True
# inputs
fc = r'D:\Xander\Rectangles\data.gdb\points'
width = 0.005 # with of the output rectangle
height = 0.005 # height of the output rectangle
# output
fcout = r'D:\Xander\Rectangles\data.gdb\rectangles'
sr = arcpy.Describe(fc).spatialReference
features = []
with arcpy.da.SearchCursor(fc, ("SHAPE@")) as cursor:
for row in cursor:
rectangle = createRectangleFromPoint(row[0].firstPoint, width, height, sr)
features.append(rectangle)
# write to output
arcpy.CopyFeatures_management(features, fcout)
def createRectangleFromPoint(pnt, width, height, sr):
arrPnts = arcpy.Array()
pnt2 = arcpy.Point(pnt.X - width, pnt.Y - height)
arrPnts.add(pnt2)
pnt2 = arcpy.Point(pnt.X - width, pnt.Y + height)
arrPnts.add(pnt2)
pnt2 = arcpy.Point(pnt.X + width, pnt.Y + height)
arrPnts.add(pnt2)
pnt2 = arcpy.Point(pnt.X + width, pnt.Y - height)
arrPnts.add(pnt2)
pnt2 = arcpy.Point(pnt.X - width, pnt.Y - height)
arrPnts.add(pnt2)
return arcpy.Polygon(arrPnts, sr)
if __name__ == '__main__':
main()
... View more
01-13-2015
04:16 AM
|
0
|
6
|
5699
|
|
POST
|
If I do a manual IDW interpolation (Spatial Analyst Tools\Interpolation\IDW) it does appear in the Result window and I can copy the Python Snippet: Result from clipboard: # Replace a layer/table view name with a path to a dataset (which can be a layer file) or create the layer/table view within the script
# The following inputs are layers or table views: "points03"
arcpy.gp.Idw_sa("points03", "IDWval", "C:/Users/xbakker/Documents/ArcGIS/Default.gdb/Idw_points031", "4,21920391999947E-04", "2", "VARIABLE 12", "") You can also scroll down on the Help page and get some more detailed Python examples: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
01-13-2015
03:52 AM
|
2
|
0
|
2457
|
|
POST
|
Great that you have advanced on the matter, but it sounds a little strange a company is not willing to invest in some tools that you will need to process 49000 LAS file... The additional time you will have to invest to do things in a less optimal way (since you lack the proper tools) is costly too.
... View more
01-12-2015
09:53 AM
|
0
|
0
|
2280
|
|
POST
|
If you plan is to run the tool 800 times, you will want to script this. Don't do something 800 manual when with little effort it can be scripted A very easy start is to perform the IDW manually and in the Results windows, right click on the IDW result and select Copy Python Snippet from the context sensitive menu. This will give you the python syntax of the IDW interpolation. Based on that you can start scripting (changing dataset, IDW settings, etc). If you want some help with it, just explain what you would like to do with the 800 interpolations (how they differ from each other).
... View more
01-12-2015
09:50 AM
|
1
|
2
|
2457
|
|
POST
|
If you don't have access to 3D analyst then your options inside ArcGIS will be limited, LAStools (as Mike Cusi suggests is a very good alternative).
... View more
01-11-2015
08:05 PM
|
0
|
0
|
2280
|
|
POST
|
There should be a difference (Inside should give multiple results, while Enter should only provide one): and... Source: ArcGIS Help (10.2, 10.2.1, and 10.2.2) Are you sure that it enters the GeoFence only once? If it is a narrow GeoFence following the route of a car, GPS imprecision may invoke multiple entries.
... View more
01-11-2015
08:00 PM
|
1
|
0
|
733
|
|
POST
|
Try it without the double equal sign: SetNull("%wcs_int.tiff%","%wcs_int.tiff%","Value = 0")
... View more
01-11-2015
07:53 PM
|
0
|
0
|
2352
|
|
POST
|
Did ArcGIS work correctly before? Any changes occurred (other software installed)? You might want to re-install ArcGIS.
... View more
01-11-2015
05:55 PM
|
0
|
1
|
1466
|
|
POST
|
For that purpose you can use Cell Statistics to determine the range of a series of rasters (and min, max, etc): See: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
01-11-2015
05:17 PM
|
0
|
0
|
2761
|
|
POST
|
I would recommend using a file geodatabase. The personal geodatabase has too many limitations and is based Access. All the data you are mentioning are datasets (raster and vector), none of these are geodatabases, but can be loaded into the geodatabase. I would recommend you to read "Essential readings about the geodatabase". Depending on your level of experience with ArcGIS, you could read the Introduction to GIS | ArcGIS Resource Center . Maybe the topic "What is raster data" can be interesting. Also have a look at the tutorials: ArcGIS Help (10.2, 10.2.1, and 10.2.2) and visit the training site to follow some (sometimes free) courses: ArcGIS Foundational Courses like: Esri Training | Getting Started with GIS
... View more
01-11-2015
04:00 PM
|
2
|
0
|
667
|
|
POST
|
If you use a ArcGIS tool from a toolbox, the messages will contain information about the elapsed time: Messages Executing: CostDistance Water SlopeSetNull C:\Forum\Pasture\gdb\Pasture.gdb\CostWater2 # # Start Time: Thu Jan 08 22:33:20 2015 Succeeded at Thu Jan 08 22:33:45 2015 (Elapsed Time: 24,92 seconds) Would that be enough? If you would use python to program a process you can simply determine the moment the process started and the moment the process ended and determine the elapsed time ( datetime.timedelta) For exact measurement in Python, you can execute code multiple times and obtains stats, using the timeit module. 26.6. timeit — Measure execution time of small code snippets — Python 2.7.9 documentation
... View more
01-10-2015
07:50 PM
|
1
|
4
|
2457
|
|
POST
|
When you calculate the NDVI (Normalized Difference Vegetation Index) using visible and near infrared information obtained by remote sensing you have a "spatial variation" since the NDVI. See also: Normalized Difference Vegetation Index - Wikipedia, the free encyclopedia What does the included image represent? Is that a single year or the result of combining several years? Are you trying to seek the range of values for each pixel in the time series?
... View more
01-10-2015
05:26 PM
|
0
|
2
|
2761
|
|
POST
|
Yesterday I performed some steps on the dataset provided by Andrew. See them listed below: # Create a hillshade for visualization
arcpy.gp.HillShade_sa("ned10m34101g3","C:/Forum/Pasture/gdb/Pasture.gdb/HillShade","315","45","NO_SHADOWS","1")
# Calculate the slope in percentage based on your DEM ("ned10m34101g3")
arcpy.gp.Slope_sa("ned10m34101g3","C:/Forum/Pasture/gdb/Pasture.gdb/Slope","PERCENT_RISE","1")
# Reclassify the slope in two classes 0-15% and >15%
arcpy.gp.Reclassify_sa("Slope","Value","0 15 1;15 159,99526977539062 2","C:/Forum/Pasture/gdb/Pasture.gdb/SlopeClfy","DATA")
# Set those areas to NoData that have a slope > 15% (value = 2)
arcpy.gp.SetNull_sa("SlopeClfy","SlopeClfy","C:/Forum/Pasture/gdb/Pasture.gdb/SlopeSetNull","Value = 2")
# Calculate the cost distance from the water points, using SlopeSetNull as cost raster (slopes > 15% are inaccessible)
arcpy.gp.CostDistance_sa("Water","SlopeSetNull","C:/Forum/Pasture/gdb/Pasture.gdb/CostWater") The result looks something like this (accessibility calculated from water points are represented with blue area):
... View more
01-09-2015
09:46 AM
|
3
|
0
|
2417
|
|
POST
|
There are many option when converting Las to raster. What options did you use (Binning, Triangulation)? Is it posible to include a screenshot to show what your result is (refering to the -0.2)?
... View more
01-09-2015
09:39 AM
|
0
|
0
|
5131
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|