|
POST
|
What "proximity search" tool are you using? If you have an ArcInfo license, I would try using the Generate Near Table tool. This will output a table of all features w/in 1000m (you specify 1000m as the search radius). You can then select all records that have a NEAR_DIST of 15m or less and delete them, leaving you with features between 15m and 1000m. You can then use the Summary Statistics tool to find the closest feature to each point by finding the MIN of NEAR_DIST. Use IN_FID as the case field.
... View more
09-08-2011
04:25 PM
|
0
|
0
|
450
|
|
POST
|
Use the Feature Vertices To Points tool with the BOTH_ENDS option
... View more
08-23-2011
09:22 AM
|
0
|
0
|
470
|
|
POST
|
See the help topic Setting script tool parameters. It appears you want a derived output parameter, so pay particular attention to the write-ups about derived output parameters.
... View more
08-22-2011
11:26 AM
|
0
|
0
|
2190
|
|
POST
|
I tried this in a Python interactive window and it worked: >>> import os
>>> newbase = r"C:\xxx\yyy\S12_G16_V00_ULABSH10_00.shp"
>>> y = os.path.split(newbase)
>>> print y
('C:\\xxx\\yyy', 'S12_G16_V00_ULABSH10_00.shp')
>>> print y[0]
C:\xxx\yyy
>>> print y[1]
S12_G16_V00_ULABSH10_00.shp
>>> z = y[1].split('_')
>>> print z
['S12', 'G16', 'V00', 'ULABSH10', '00.shp']
>>> print z[0]
S12
>>> I think your issue is that os.path.filename returns two values?
... View more
08-19-2011
03:46 PM
|
0
|
0
|
2035
|
|
POST
|
The Fishnet tool is a hard one to figure out. The topic How Create Fishnet Works can help you figure out the parameters and what values you should use. Grid Index Features is a tool in the cartography toolbox that creates regular grids as well. I haven't used it. See Creating Grid Index Features for more info. You should be able to create your custom grid index by creating a new polygon feature class and digitizing new polygons. Here's a quote from the topic What are data driven pages? that confirms you can use your own index (it doesn't have to be a grid): The index layer does not have to be a grid. It can be map features. For example, you can create Data Driven Pages using a polygon layer of U.S. states. In this case, a page is created for each state.
... View more
08-18-2011
03:36 PM
|
0
|
0
|
1199
|
|
POST
|
You don't need any of these AddToolBox calls: # 10.0 Code
# Load required toolboxes...
ARCGISHOME="C:/Program Files/ArcGIS/Desktop10.0/"
arcpy.AddToolbox(ARCGISHOME+"ArcToolbox/Toolboxes/Data Management Tools.tbx")
arcpy.AddToolbox(ARCGISHOME+"ArcToolbox/Toolboxes/Analysis Tools.tbx") System tools are automatically found. It's only custom toolboxes that need to be added. See Using tools in Python for more info on how you can avoid having to append the toolbox alias. I'm not positive about this, but if the name of the tool is unique (not found in any other system toolbox), you may not have to append the _<alias>. But the best practice is to always identify the toolbox, using _<alias> or other methods mentioned in Using tools in Python
... View more
08-15-2011
03:50 PM
|
0
|
0
|
376
|
|
POST
|
Check out this blog on Calculate Field. It shows how to use .split. Although it's about Calculate Field and not Calculate Value, I think you'll get the idea -- a code block w/in Calculate Value that breaks apart a string and returns a new string.
... View more
08-15-2011
01:26 PM
|
0
|
0
|
2035
|
|
POST
|
Use the Calculate Value tool. Assuming you have a model variable named "Input Features" and its contents is "E:\Data\Iowa\IowaCo.shp". Add the Calculate Value tool to your model. For the Expression parameter, enter: base("%Input Features%") (the name of the variable) In the Code Block parameter: enter: def base(filename):
import os
y = os.path.basename(filename)
return y[:y.rfind(".")] In the Data Type parameter, set it to String. The output of Calculate Value ("output_value") by default will contain (when model is run) "IowaCo". You can then use %output_value% to name your file.
... View more
08-15-2011
10:44 AM
|
0
|
0
|
2035
|
|
POST
|
Make XY Event Layer tool. To "batch" the process, right-click the tool and select Batch. Or write a model.
... View more
08-15-2011
08:31 AM
|
1
|
0
|
667
|
|
POST
|
See Setting script tool parameters. It appears you want a single derived output parameter, so pay particular attention to the write-ups about derived output parameters.
... View more
08-11-2011
04:15 PM
|
0
|
0
|
1368
|
|
POST
|
Vector overlay should work just fine, but upon re-reading your original post, performance is an issue and raster overlay will be faster than pure vector overlay. But if this is just a one-off query, I'd still go vector. But if you're building some sort of service that'll be used frequently, rasterizing your static data (parcels) would be an acceptable approach. But of course you'll have to deal with resolution issues as others have posted. I'm not a raster guy, but I'm thinking you'd just use the Zonal Statistics tool (after rasterizing your land parcels).
... View more
08-08-2011
10:52 AM
|
0
|
0
|
1149
|
|
POST
|
Several issues here: - You're mixing gp = arcgisscripting.create() with arcpy. Choose one or the other. While it's technically feasible to mix them in a script, there are numerous issues that can arise. - A tool returns a result object. You were setting the output parameter to this result object and it fails. Here's a snippet (from your code) that works with arcpy... Note that I'm using SetParameterAsText. I tested this in a model and it updates the derived output correctly arcpy.env.overwriteOutput = True
#sr = gp.CreateSpatialReference("C:\\Program Files\\ArcGIS\\Desktop10.0\\Coordinate Systems\\Geographic Coordinate Systems\\North America\\NAD 1983.prj")
sr = "#"
result = arcpy.CreateFeatureclass_management(r"E:\scratch\scratch.gdb", "Test", "Point", "#", "#", "#", sr)
ptfile = result.getOutput(0)
arcpy.AddMessage("output feature class is: " + ptfile)
arcpy.SetParameterAsText(8, ptfile)
arcpy.AddMessage("Checking: set output parameter 8")
... View more
08-08-2011
10:43 AM
|
0
|
0
|
1670
|
|
POST
|
Here's a blog post on getting error descriptions. It may help you to debug.
... View more
08-08-2011
09:22 AM
|
0
|
0
|
1670
|
|
POST
|
Take a look at this 9.3 topic: An overview of advanced modeling through simulations
... View more
08-05-2011
04:18 PM
|
0
|
0
|
1463
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-30-2013 04:37 PM | |
| 1 | 03-27-2013 10:03 AM | |
| 2 | 11-15-2013 12:33 PM | |
| 1 | 04-30-2013 11:26 AM | |
| 1 | 07-26-2011 08:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|