|
POST
|
I'm sorry, I'm pretty sure I led you wrong by not reading carefully enough. What you want to supply here is (I think) a feature layer. The user workflow would be to set the layer you're working with as the only selectable layer ( you could do this in a map document you give them to use before they start). Then select features, then run your tool. If you pass a feature layer instead of a parameter, the selected features in that feature layer are the only ones the tool in the script will use, for example, as copy features or append input.
... View more
06-05-2013
02:26 PM
|
0
|
0
|
2627
|
|
POST
|
I'm looking for a convenient raster edition tool for ArcGis 10.1. I have found and registed Raster Editor Extension (Minimum ArcGIS Release: 9.0) => but I can't use it. ArcObjects extensions written for 9.x are very unlikely to work in 10.x. I agree that ArcScan is your best bet if you want to interactively edit pixels -- but that editor only works with bilevel rasters. For more complex editing, I believe you are better off creating polygons, converting to raster and "burning them in" using tools like Con and Mosaic.
... View more
06-05-2013
10:02 AM
|
0
|
0
|
792
|
|
POST
|
Versions are important here. Are you updated to the latest available service pack? For example NIM 079095 is was fixed in 10.1 SP1 '>NIM079095 - The Reclassify tool crashes when clicked to open classification dialog box with an input dataset that contains no statistics or is all NODATA
... View more
06-05-2013
09:56 AM
|
0
|
0
|
1799
|
|
POST
|
The thing I really need to know before I spend too much time on this, is if it is possible to create this tool in python or if I need to find another way. (again) Is it possible to use coded domains limit what the users can enter in Python? Thanks. Yes. If you set this up as a tool, this is very straightforward. You can write validation code can detect the domains attached to a field (it's property of a field), go look at the domains, and assign them to a filter input. No problem there. (For simplicity, you could just hardcode the domains if they are static. See the section in the help Programming a Tool Validator Class. Doing this as a geoprocessing tool is much easier as you let the tool validation (which all users are already familiar with) do your interface - no need to futz with Tkinter etc. Note if you do this, it's a good idea to have a check in your code that only a couple parcels are selected so you don't accidentally wipe the database. You can either do this in validation code (preferred) or in the main tool code as an error.
... View more
06-05-2013
08:59 AM
|
0
|
0
|
2627
|
|
POST
|
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 14, in <module> import arcgisscripting ImportError: Module use of python26.dll conflicts with this version of Python. I've looked for the python27.dll But i CAN'T find it! This is because you are running the wrong version of Python. ArcGIS 10.0 uses 2.6.x, ArcGIS 10.1/10.2 uses 2.7.x. (10.2 isn't out yet, but I have it on good authority they are sticking with 2.7 for compatibility for now.) If you're running ArcGIS 10.0 you should download and install the 32 bit PythonWin for 2.6.
... View more
06-04-2013
08:19 AM
|
0
|
0
|
1625
|
|
POST
|
How do I determine the ranges of the bins using python? The easiest way to do this without ArcMap would be to run is to run Zonal Statistics As Table, using your binned output as the zone raster, and your original raster as the value raster. this will give you stats for each bin. You may want to look into the Slice tool as well. As for your calculations not exactly matching to ArcMap symbology, the renderers use approximations of the histograms; they are designed for display and not quantitative analysis. To get true histogram values you would want to use other tools.
... View more
06-03-2013
03:11 PM
|
0
|
0
|
2657
|
|
POST
|
Your path is set up to import the wrong Python (notice you are running 64 bit python and the arcpy path that fails is the 32 bit ArcGIS python). The easiest solution is to set up pythonwin to start up the 32-bit python shipped with ArcGIS, in your case: C:\python27\arcgis10.1\python.exe If you must have 64 bit Python (including, say the x64 background geoprocessing), you should have python launch from C:\python27\arcgis10.1x64\python.exe Unless you have a specific special need for 64 bit, I recommend using the 32 bit arcpy, as the 64 bit has some limitations and of course is not the same one you access from the ArcMap python command line. UPDATE: On more reflection, I think you can fix this issue easily by uninstalling PythonWin and then downloading and installing the 32-bit PythonWin instead of the 64-bit version. Just that one change should solve the problem for you.
... View more
06-03-2013
02:13 PM
|
0
|
0
|
2287
|
|
POST
|
Actually, I put something similar to this in my scripts: debug = "n"
if debug == "y":print "Processing ",infc
Even more Pythonesque: debug = False
...
if debug: print "Processing ", infc
... View more
06-03-2013
12:23 PM
|
0
|
0
|
2320
|
|
POST
|
Karl, I found the bug in your original script:
if now == previous:
row.setValue("LAST_PNT","FALSE")
print row.getvalue("LAST_PNT")
else:
row.setValue("LAST_PNT","TRUE")
print row.getvalue("LAST_PNT")
rows.UpdateRow(row) # note indent fix
row = rows.Next()
... View more
06-03-2013
12:07 PM
|
0
|
0
|
2320
|
|
POST
|
Does anybody have any ideas on how to speed this up? You're doing an updateRow when you don't have to; it would be more efficient to start by initilizing all rows to "FALSE" first and dropping your else clause. This still uses a cursor behind the scenes but it runs through quickly as there is no sort.
arcpy.AddField_management(inPts,"LAST_PNT","TEXT",)
arcpy.CalculateField_management(inPts,"LAST_PNT", "'TRUE'", "PYTHON")
If you're using ArcGIS 10.1, there is a new cursor function available that is 10x-100x faster: arcpy.da.SearchCursor. A whole different approach would be to locate your points of interest using the Summary Statistics tool instead of using a sorted cursor. You could then get the Animal ID and max time in the results, join to your point shapefile and tag using Calculate Field. If you're using 10.0, I recommend that approach. By the way, please [thread=48475]use code tags[/thread] so we can see your Python code!
... View more
06-03-2013
11:52 AM
|
0
|
0
|
2320
|
|
POST
|
Anna, You need to use the Lookup() tool to get at raster attributes, and "Con" to pick your coefficient from the vegstruct grid; this would be something along the lines of:
293.1 + (-15.3 * Lookup("soil type","HSeu")) + \
(-0.6 * Lookup("soil type","CMcr")) + \
(Con("vegstruct" == 1, -1.5, Con("vegstruct" == 2, -2.7)))
... View more
06-03-2013
10:19 AM
|
0
|
0
|
1714
|
|
POST
|
The main advice for you is that this will require the use of a Python add-in, as you want to interact with features your ArcMap edit session. Here's some info to get you started: Free video: Creating Desktop Add-ins Using Python (for ArcGIS 10.1) Desktop 10.1 Help: ArcGIS Desktop Python Add-Ins UPDATE: On rereading your use case, since it seems the only interactive part is selecting parcels and entering text information, you may be able to do this with a Python script tool that accepts a feature set as input. This would be easier than building an add-in.
... View more
06-03-2013
08:48 AM
|
0
|
0
|
2627
|
|
POST
|
Interesting problem... As for your original reason for switching, file geodatabase is not necessarily the fastest format. Depending on the tools involved, the old grid format or .tif or .img may be faster.
... View more
06-01-2013
07:52 PM
|
0
|
0
|
1970
|
|
POST
|
Do your element names have the underscores? Sometimes it's a bit tricky for the raster calculator parser to recognize rasters if they do not match the model dataset names *exactly*.
... View more
06-01-2013
06:36 PM
|
0
|
0
|
1970
|
|
POST
|
Is there any other recommended procedure to generate better results with ASTER? Any help would be greatly appreciated!. Two different sensors are going to give you different levels of accuracy; there is no way to get around that. Some SRTM data has had additional pre-processing done to it (ie burning in water bodies etc) that would make the datasets even more different. You may be able to do some filtering to remove noise, but you cannot create accuracy that isn't there. I noticed that the Aster data has rough areas in one of the water bodies (smooth areas in SRTM). Makes me wonder whether the Aster was acquired during a drier time of year when some of that water body (toward the lower left of your subset image) was dry.
... View more
06-01-2013
01:13 PM
|
0
|
0
|
1175
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-11-2021 01:26 PM | |
| 5 | 12-10-2021 04:58 PM | |
| 1 | 02-27-2017 09:30 AM | |
| 2 | 12-04-2023 01:05 PM | |
| 1 | 04-12-2016 10:17 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-19-2024
12:10 AM
|