|
POST
|
Hi @steve kenneth, which version of ArcGIS you are using? 10.1 or later? If so then you can use arcpy.da.SearchCursor to step through data row by row as shown below. If you are on 9.3 or earlier then use arcpy.SearchCursor instead (see documentation for sample code). Consult this topic more details: Accessing data using cursors—Help | ArcGIS for Desktop This topic contains code examples for arcpy.da.SearchCursor: SearchCursor—Help | ArcGIS for Desktop There is an argument named where_clause - set it in a similar way you'd in a SQL expression. The above topic has examples.
... View more
10-06-2015
02:17 PM
|
1
|
2
|
1851
|
|
POST
|
Please mention ArcGIS version. I need to reproduce the issue as I cannot repro on my machine with ArcGIS 10.3.1 Please provide a screenshot (or description) of the Model along with the dataset type (polygon, polyline, point etc) along with their size (number of features) of target and join data. Otherwise, it would be difficult and time-consuming to reproduce the issue.
... View more
08-31-2015
08:31 AM
|
0
|
1
|
2775
|
|
POST
|
Make sure ([Field1]^2) - ([Field]^2) value is not negative in any case.
... View more
08-20-2015
10:23 AM
|
1
|
1
|
4508
|
|
POST
|
Hi Denis, is it possible for you to send me the steps and data to reproduce the issue?
... View more
06-04-2015
08:10 AM
|
0
|
1
|
2775
|
|
POST
|
Hi Ryan, could you please let us know which version of ArcGIS you are using? Also, if possible, please share your model as well or post a screenshot of your Model workflow.
... View more
06-03-2015
09:31 AM
|
0
|
0
|
2775
|
|
POST
|
Your field mappings is not properly populated. There is no .addInputField(....) method on a FieldMappings object. There are two ways you can populate an empty FieldMappings object: 1. .addTable() method of FieldMappings object - this is a wholesale course-grain approach - it adds all the fields of the table. 2. Create FieldMap object individually and then add the field map to FieldMappings object. Code sample here: http://resources.arcgis.com/en/help/main/10.1/#/FieldMappings/018z00000078000000/ See this image to find the difference between FieldMap and FieldMappings objects: [ATTACH=CONFIG]29918[/ATTACH] I would strongly encourage you to explore the field mapping mechanism as it is a "very powerful" tool to manipulate data. Once you spend some time you'll feel how easy it is to use 🙂
... View more
12-16-2013
08:52 AM
|
0
|
0
|
1857
|
|
POST
|
Could you please let me know which version of ArcGIS you are using?
... View more
12-09-2013
12:26 PM
|
0
|
0
|
591
|
|
POST
|
Use Generate Near Table tool (under ArcToolbox > Analysis Tools > Proximity toolset) as follows: Input Features: your points shapefile Near Features: your points shapefile again. Find Only Closest Feature (optional): make sure it is unchecked Maximum number of closest matches (optional): 5 Run the tool - the output table should contain 400 records. Follow the tool help for details. Let me know if encounter any issue.
... View more
10-02-2013
08:43 AM
|
0
|
0
|
608
|
|
POST
|
One more thing. What's the coordinate systems of your data "before" you are applying Define Projection? If not "Unknown" then try using Project tool instead. Define projection does not change the coordinate system - it just updates the metadata. And, if you can share your data then I can try to reproduce your issue on my machine and see what's going on.
... View more
07-19-2013
11:26 AM
|
0
|
0
|
1422
|
|
POST
|
In case you do not find a way to get a solution using the system tool, here is a python script you can try on. import arcpy
proposed = r'D:\data\f.gdb\points_A'
original = r'D:\data\f.gdb\points_B'
# create an empty dictionary to store shapes
proposed_points = {}
with arcpy.da.SearchCursor(proposed, ("5k_ID", "Shape@")) as cursor:
for row in cursor:
# populate the dictionary
# use 5k_ID field value as the key of the dictionary
proposed_points[row[0]] = row[1]
# create another dictionary
original_points = {}
with arcpy.da.SearchCursor(original, ("5k_ID", "Shape@")) as cursor:
for row in cursor:
# populate the dictionary
# use 5k_ID field value as the key of the dictionary
original_points[row[0]] = row[1]
# iterate one of the dictionaries with ID values
for id_5k in proposed_points:
# get proposed and original points with same ID
orig = original_points[id_5k]
prop = proposed_points[id_5k]
# now find the distance
dist = prop.distanceTo(orig)
print dist
... View more
07-19-2013
08:52 AM
|
0
|
0
|
958
|
|
POST
|
I don't get the error with only this code:
#Loop through Excel
for rownum in range(sh1.nrows):
columns = sh1.row_values(rownum)
print "row num = ", rownum
#skip first row
if Skip == True:
Skip=False
else:
ProjCode = columns[0]
print ProjCode
print type(ProjCode) # check type for all rows
ProjCode = int(ProjCode)
sr = arcpy.SpatialReference(ProjCode)
sr.create()
print sr.name
Could you just try the same? I'm also confused on this line (may be not related to your problem): if (arcpy.Exists(myPath + "\\TigerFiles\\" + InputRoadShpfl)) and (myPath + "\\TigerFiles\\" + InputBoundaryShpfl): Here, Exists checks only the first shapefile but not the second one.
... View more
07-19-2013
08:03 AM
|
0
|
0
|
1422
|
|
POST
|
Add a print statement to check type of ProjCode as follows: ProjCode = rows[12]
print type(ProjCode) Most probably the type is not an "int" - in that case convert it to an int: ProjCode = rows[12]
ProjCode = int(ProjCode.strip())
... View more
07-18-2013
03:43 PM
|
0
|
0
|
1422
|
|
POST
|
Could you please be more specific with some examples? What values are provided for the 'UTM Zone' parameter? The name of the coordinate systems? Like this 'WGS 1984 UTM Zone 11N', 'WGS 1984 UTM Zone 12N', 'WGS 1984 UTM Zone 13N' ... ? And then you want the model to select which UTM coordinate system to use?
... View more
07-18-2013
03:25 PM
|
0
|
0
|
452
|
|
POST
|
As you are new - you can just try using the normal toolbox instead of Python toolbox - give it a try. The product engineer who might answer your question better is on vacation. I'll let him of your issue once he is back.
... View more
07-18-2013
03:09 PM
|
0
|
0
|
551
|
|
POST
|
Are the 5k_ID values unique for each of the point feature classes? If possible, could you please share your data (keeping only the 5k_ID field)? You can send the data to my email as well: nahmed@esri.com It will be easier if you use Python script - do you want that?
... View more
07-17-2013
01:05 PM
|
0
|
0
|
2008
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-18-2019 03:56 PM | |
| 1 | 05-06-2020 01:18 PM | |
| 1 | 07-23-2021 10:33 AM | |
| 1 | 07-28-2020 09:10 AM | |
| 2 | 07-27-2020 04:47 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-25-2021
03:13 PM
|