|
POST
|
How do you decide which side of the polygon to turn into points?
... View more
06-13-2011
08:50 AM
|
0
|
0
|
456
|
|
POST
|
I assume this is happening because your parameter is a string, and in python strings are lists themselves (lists of characters). A better way to attack this would be to use the split function. thresholdlist = arcpy.GetParameterAsText(2)
splitthreshold = thresholdlist.split(",")
for threshold in splitthreshold:
...
... View more
06-10-2011
12:23 PM
|
0
|
0
|
1731
|
|
POST
|
If you want to remove a certain number of characters from the right, use rstrip(). Alternatively, you can return a list of "words" contained in a string separated by a given character using split(), then keep the ones you want. Your best bet is to Google "python string operations".
... View more
06-10-2011
11:51 AM
|
0
|
0
|
6406
|
|
POST
|
I can't remember exactly what software I was using, but I know for sure there are programs out there, for free, that will take all of your bearing/distance measurements and output a point shapefile. I think we may have been using Locate, it looks about right.
... View more
06-10-2011
09:01 AM
|
0
|
0
|
1945
|
|
POST
|
Hmmm. My field calculator only acts on selected records regardless of whether I "Show All Records" or "Show Selected Records". I'm using ArcGIS 10 SP1.
... View more
06-10-2011
08:28 AM
|
0
|
0
|
1497
|
|
POST
|
When you add other layers, for example Great Lakes, do your polygons fall where you expect them to, or do they get squished into a very small area? It sounds like you've got the wrong projection. By the way, feature classes in geodatabases automatically calculate the areas of your polygons.
... View more
06-08-2011
01:39 PM
|
0
|
0
|
2186
|
|
POST
|
You can either use Near or Generate Near Table, both of which require ArcInfo level licensing. If you don't have ArcInfo, it will be a little more difficult.
... View more
06-08-2011
01:21 PM
|
0
|
0
|
1252
|
|
POST
|
I might be mistaken, but I believe SQL requires strings to be enclosed in escaped single quotes (\'). So, your query would be: whereClause="[OBJECTID] = \'" + str(x) + "\'"
... View more
06-03-2011
01:27 PM
|
0
|
0
|
662
|
|
POST
|
Your "row" objects should inherit all of the field names from the dataset that the cursor is traversing (as described here). So, you would set the values as: cursor = arcpy.InsertCursor("test")
row = cursor.newRow()
row.fieldname1 = "value1"
row.fieldname2 = "value2"
cursor.insertRow(row)
... View more
06-03-2011
01:19 PM
|
0
|
0
|
471
|
|
POST
|
I see one place where you call: desc = gp.describe(fc) but you have not assigned anything to be called "fc", so Python doesn't know what to describe.
... View more
06-03-2011
01:11 PM
|
0
|
0
|
344
|
|
POST
|
ESRI tech support is lying to you. The reason it's not working is because I made a typo in the script (oops). It should be "for row in rows:", not "for each row in rows:". Here is an actual example, that calculates the minimum value for the field "Join_Count" in the feature class "points2sj". count = 0
def mini():
global count
global value
global rows
if count == 0:
rows = arcpy.SearchCursor("H:\GIS_Data\TEMP_GDB.gdb\points2sj","","","", "Join_Count A")
for row in rows:
if count == 0:
value = row.Join_Count
count = 1
return value
... View more
05-26-2011
07:43 AM
|
0
|
0
|
426
|
|
POST
|
Joins temporarily move pieces of data from one table (streets) into corresponding rows from another table (sidewalks), based on some common piece of data (ID numbers). Once there you can use the field calculator to permanently move what you want (street names) to where you want it (the column of your choosing in sidewalks).
... View more
05-25-2011
08:28 AM
|
0
|
0
|
645
|
|
POST
|
I haven't tested this at all, but it seems like you should be able to use Feature Vertices to Points, specifying you want both ends only. Then, Snap those endpoints to the polygons. Finally, snap your lines to those end points. The problem may come if you have several line vertices (the 2nd, 3rd, and so on) still within the snap tolerance that you don't want to be snapped to the moved end points. I'm not sure if they will all be condensed into the newly moved end points or not. A more involved python coding solution is to rip apart the entire geometry of every line, cycle though each vertex, decide if the first and last vertex are within a distance to any of the moved endpoints, then make the x and y coords of those vertices match the closest moved endpoint. Yikes.
... View more
05-24-2011
02:17 PM
|
1
|
0
|
1305
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|