|
POST
|
Does it work if you remove the quotes from around "field.name"? If it stays in quotes, python tries to delete a field literally called "field.Name", not the variable value.
... View more
05-24-2011
01:52 PM
|
0
|
0
|
470
|
|
POST
|
No problem - I've spent a lot of time tilting at that windmill in the past!
... View more
05-24-2011
11:57 AM
|
0
|
0
|
1195
|
|
POST
|
You can use regular geoprocessing tools if you use Python in the field calculator. I'm not sure how to specify "the current feature class" instead of typing the path in the field calculator. Wherever you see <fieldname>, simply type in the field name (no exclamation points or <>s). Keep all of the quotes where they are. Codeblock:
count = 0
def mini():
global count
global value
global rows
if count == 0:
rows = arcpy.SearchCursor("<path to feature class>","","","", "<fieldname> A")
for each row in rows:
if count == 0:
value = row.<fieldname>
count = 1
return value Expression: mini()
... View more
05-24-2011
11:40 AM
|
0
|
0
|
426
|
|
POST
|
I using ArcGIS 10, so I can't test this. But, in 10 you can use VBScript for the code block (although I'm not completely sure what 9.2 uses - the help says standard VB). I know that VBScript doesn't like it when you dim variables AS a datatype. I suggest either not dimming your variable, or at least remove "as string".
... View more
05-24-2011
11:03 AM
|
0
|
0
|
1195
|
|
POST
|
I've been making approximate centreline files of linear polygon feature classes using: 1.) Polygon to Raster 2.) Thin 3.) Raster to Polyline Since penisulas are just fat linear polygons, I thought I'd give it a try. I used Florida, but it's a little too stubby to work really nicely. If you have Spatial Analyst and just want a quick way to make a centreline, this works all right.
... View more
05-20-2011
08:42 AM
|
1
|
0
|
825
|
|
POST
|
I tried Split at Point, too, with a search distance of 5m and it gave very strange results. If you would be okay with slightly shifting your lines so that they meet, you can use the Feature to Line tool with a small XY tolerance (like 5m), inputting both your "lines" and "network" feature classes (I assume you have ArcInfo license since you tried Split at Points). Then you can use the Snap tool to bring the points to the endpoints in your new line feature class (make a copy first because it will change your original feature class). This all worked for me. Hope it helps.
... View more
05-20-2011
08:01 AM
|
0
|
0
|
2228
|
|
POST
|
Are you sure the points are exactly coincident to your line? In geodatabase or shapefile? Can you post the data, or an example of some points/lines that don't cut?
... View more
05-19-2011
03:17 PM
|
0
|
0
|
2228
|
|
POST
|
I don't think you can use an expression in the actual function call (ie. you can't type "AMR" + str(date) in the parentheses for gp.Rename_management). What you can do is pass a variable into the function call. datestring = "AMR" + str(date)
gp.Rename_management(NewAMR, datestring)
... View more
05-19-2011
09:26 AM
|
0
|
0
|
748
|
|
POST
|
Your polygons have many tiny, tiny segments which I think are confusing ArcMap. I assume the equipment used to create these polygons are not accurate to within millimetres. You should import them into a geodatabase and adjust the xy tolerance to reflect the accuracy of your data. This should simplify your polygons into something useable (I used the Feature to Polygon tool with an xy tolerance of 0.1m and then Union, and it worked fine).
... View more
05-18-2011
09:08 AM
|
0
|
0
|
1588
|
|
POST
|
Are you, by chance, working on a remote desktop? We experienced very slow calculations until we changed a network setting (particularly one instructing the remote session to use our local machine's Documents and Settings folder).
... View more
05-17-2011
01:28 PM
|
0
|
0
|
2616
|
|
POST
|
Thanks, you're a life saver - the shapefile worked fine (which is good, but annoying that this is the "solution"). I'm not sure if there were true curves in the feature class, but I inherited this dataset. As a side note, removing the dissolve option worked fine with the feature class, but then failed once I tried to run the Dissolve tool.
... View more
05-17-2011
06:52 AM
|
0
|
0
|
768
|
|
POST
|
I've got a street feature class in a file geodatabase that I'm trying to buffer by the value of metres in a field, and dissolve based on the values in another field. The output is totally useless (see below). There are ~34,000 roads, which I don't think should be hitting any sort memory limit. Any thoughts?
... View more
05-16-2011
01:35 PM
|
0
|
3
|
1076
|
|
POST
|
Yes, thank you. I ran the tool, and it looks like that would be a good starting point (it would need some work to clean up). I ended up finding a boundary polygon afterall, but it's nice to know this exists.
... View more
05-16-2011
12:41 PM
|
0
|
0
|
1984
|
|
POST
|
Is there a way to shorten the search distance for creating a minimum convex hull polygon from line features? Basically, I want a polygon surrounding the line features in picture 1, but the best I can do so far is what's in picture 2. It would be nice if I could say, "only look this far ahead and make a polygon edge from those lines it has encountered".
... View more
05-16-2011
11:25 AM
|
0
|
8
|
3234
|
| 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
|