|
POST
|
Although I have no idea what you are doing in VB.NET... Are you sure that the shapefile (in reality dbf, dbase) can support precision and scale. specifying-precision-and-scale-of-new-field-using-arcpy
... View more
11-19-2016
01:11 AM
|
0
|
0
|
2622
|
|
POST
|
As I said above, you don't need the "while i < countvar" bit. Simply iterating through the fields would be enough. Then the pointer would not have gone out of range either.
... View more
11-19-2016
12:56 AM
|
0
|
1
|
2400
|
|
POST
|
Well, then it should have ".lyr" on the end as the extension. Do yourself a favour and in the file explorer, view setting untick to options which says "hide extensions for known file types". But, I think an update cursor should be run on the data itself. Not a layer file which is a superset (including defrinitions and symbology) and a pointer to the data itself. So, where is the feature you are trying to update and what is it?
... View more
11-18-2016
08:16 AM
|
2
|
7
|
7306
|
|
POST
|
The xyz files will probably be text. So open them in something like Notepad++ and have a look. tif is an image so that should be no problem. No idea what a *.sgy file might be, but again, have a look at it in a text editor just to see what the contents are. And, of most importance, you will need to know, up front, what the coord sys is for all this stuff.
... View more
11-18-2016
08:12 AM
|
1
|
5
|
4538
|
|
POST
|
So, what is this layer you are trying to run an update cursor on? cursor = arcpy.da.UpdateCursor("C:\\Users\\30030839\\Desktop\\Python\\capacity_points_layer2", ["DEM"]) It is not a shapefile, nor anything in a file geodatabase, so what is it and does it exist.
... View more
11-18-2016
08:07 AM
|
0
|
9
|
7306
|
|
POST
|
Is this the same line 77 as in the script above. I don't think so somehow. Firstly in you script, you don't need the whole while loop. For f in fields will already iterate through the fields in the fields list. So you don't need i. And the whole of the while inner block should come in one indentation. for field in fields:
statsFields = [[field,"COUNT"]]
caseFields = [field]
outTable = generalVar + "_" + field
# Execute SummaryStatistics
arcpy.Statistics_analysis(inFC, outTable, statsFields, caseFields)
# Set local variables
inTable = inFC
saveGDB = outPath + str(dateToday) + "/" + outGDB
# Execute TableToTable
arcpy.TableToTable_conversion(inTable, saveGDB, outTable, "", "", "")
arcpy.AddMessage("Summary table created for the " + field + " field!")
# Set local variables
inTable = outTable
outXLS = outPath + str(dateToday) + "/" + generalVar + "_" + field + ".xls"
# Execute TableToExcel
arcpy.TableToExcel_conversion(inTable, outXLS)
arcpy.AddMessage("Excel sheet created for the " + field + " field!")
print("General Features summary tables have been created for all fields!") As this appears to be run inside the python window in ArcMap, you don't need all the addmessage stuff either. I suppose you want to turn this into a script tool, but this is not doing anything at the moment. Just use some more print statements. What does the list fields look like at the moment? What is line 77 of the current script?
... View more
11-18-2016
08:01 AM
|
1
|
10
|
5613
|
|
POST
|
f.required is a property of f (field object) and is True or False. Hence if not f.required So you don't need anything else.
... View more
11-18-2016
01:32 AM
|
1
|
1
|
3213
|
|
POST
|
So, why not try : fields = [f.name for f in arcpy.ListFields(inFC) if not f.required] To skip over the OID, SHAPE@ etc
... View more
11-17-2016
11:32 PM
|
2
|
7
|
3214
|
|
POST
|
Is the input a feature class, ie has a geometry column? Perhaps you are trying the generate statistics on a field which makes no sense.
... View more
11-17-2016
11:10 PM
|
1
|
9
|
3214
|
|
POST
|
But if "That's why I want to keep and match same number of records as my original shapefile." Then you are not achieving anything by using zonal statistics. The original data is the same as the "summary".
... View more
11-17-2016
10:58 PM
|
0
|
0
|
1099
|
|
POST
|
Well the whole idea of zonal statistics is to aggregate or summarise a variable within spatial zones. So why should you have a zonal file with exactly the same number of records as your data? What are you trying to achieve here?
... View more
11-17-2016
11:54 AM
|
0
|
2
|
1099
|
|
POST
|
Well, there you go. Someone messed up. Transformation 7 is for DRC. But I am curious, I am just looking at both in a new ArcMap session, so the frame is still WebMerc (WGS84 based). There is an offset. I think that the 2d layer is just badly referenced.
... View more
11-17-2016
11:45 AM
|
1
|
0
|
1124
|
|
POST
|
Change over time? I think you would have to give us some more info about your data and what it looks like. And it sounds like you would like to "interpolate" this data into a surface. Lots of potential pitfalls there.
... View more
11-17-2016
08:51 AM
|
0
|
0
|
1456
|
|
POST
|
Well done that. And if you look at them together, perhaps using the effects / swipe tool, you can see that there is an approx 70m offset between World 2d and the standard imagery (which is much better anyway). I was looking at some data in northern Zam around the benguelu swamps. Why are you focusing on this 2d layer anyway? Data is data, somethings are better than others.
... View more
11-17-2016
08:49 AM
|
0
|
2
|
4164
|
|
POST
|
Been looking at the basemap data. I have Imagery, Imagery with labels, NatGeo, OSM etc. But I can't find one called ESRI Imagery World 2D. Where is this coming from?
... View more
11-17-2016
05:14 AM
|
0
|
5
|
4161
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-08-2015 11:28 PM | |
| 1 | 12-20-2013 08:59 PM | |
| 1 | 05-14-2014 10:38 PM | |
| 1 | 12-16-2013 09:05 PM | |
| 1 | 05-31-2019 02:50 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|