|
POST
|
If you don't mind, where did you get the field names for the data? The metadata file I have has short name (B23003e1) with a text description which can be very long. I've been using the description as a field name, but they get truncated when I pull them into a gdb table.
... View more
12-05-2014
08:19 AM
|
0
|
2
|
3352
|
|
POST
|
Are you working with the 5 year ACS estimates? Working on that myself right now.
... View more
12-03-2014
01:32 PM
|
0
|
5
|
3352
|
|
POST
|
# Import geoprocessing
import arcpy
# Set workspace
arcpy.env.workspace = r'U:\newberry\new.gdb'
# Creates a list of fields from the Metadata_2010 table
fieldListTable = arcpy.ListFields("METADATA_2010")
# Creates a cursor - a data access object
rows = arcpy.SearchCursor("METADATA_2010")
# Creates an empty table to store row values
fullNames = []
# For loop thats iterates through the rows in
# the Full_Name field of the Metadata_2010 table
for row in rows:
# Adds the row value to the fullNames list
fullNames.append(row.getValue(fieldListTable[2].name))
# Creates a sliced list of fields from the census block group
# polygon feature class
fieldList = arcpy.ListFields("please")[2:630]
# For loop thats changes the existing alias name in the table
# to the name in the fullNames list
for i in range(len(fieldList)):
try:
arcpy.AlterField_management('please', str(fieldList.name),'',str(fullNames))
except Exception as e:
print('FieldList name is: {0}\n
fullName is: {1}\n
Error: {2}'.format(fieldList.name, fullNames, e.message) You might want to consider using an arcpy.da.SearchCursor, much faster. I added a try statement to catch the error and show the problematic values. I think the root of the problem may be in the code building your lists, but am not sure, having a hard time working out the details.
... View more
12-03-2014
12:14 PM
|
0
|
7
|
3352
|
|
POST
|
As an aside, Curtis Price wrote a nice primer on how to post code on the Geonet forums. Makes it much easier to read. Posting Code blocks in the new GeoNet
... View more
12-03-2014
11:45 AM
|
0
|
0
|
3352
|
|
POST
|
I don't think that's the link you want. Goes to SalesForce.
... View more
12-02-2014
10:36 AM
|
0
|
0
|
2042
|
|
POST
|
Well, I'm on 10.2.2, maybe that particular bug has been taken care of, if I understand correctly. I've been caught by it myself before.
... View more
12-01-2014
01:16 PM
|
0
|
0
|
2042
|
|
POST
|
Not as far as I know. It should retain python within a session, but not as a general setting. It would seem like a no-brainer since ESRI's embraced python and VBScript is no longer supported, but there you have it. Maybe at 10.3 or 11, whenever they come out.
... View more
12-01-2014
12:38 PM
|
0
|
4
|
2042
|
|
POST
|
You may have done this, but since you didn't mention it specifically, have you checked the Snapping toolbar to see what snapping options are checked? In particular, in the dropdown arrow, make sure Use Snapping is checked. You can also go to Options on the same dropdown and choose to snap to basemap or feature service layers as well. You also mention you're georeferencing. Snapping doesn't work on the image file itself, only Arc features (lines, polygons, points, etc). Again, you probably know this, just thought I'd mention it.
... View more
12-01-2014
08:17 AM
|
1
|
0
|
751
|
|
POST
|
You could also set up a domain for field CFCC2 if this is in a geodatabase. Then no need for a separate Speed field. This is a more database-centric method, since having two fields essentially duplicates the same information in different display formats.
... View more
12-01-2014
06:23 AM
|
1
|
0
|
1311
|
|
POST
|
By 'backup map file' do you mean the mxd? You could try opening one, but I doubt that's the problem, since it appears to be in the feature class itself. Whatever mxd references it would presumably have the same problem. Did you try adding a new field and using Field Calculator to populate it with values from the old field? If that works, you could then delete the original field. Another possible option, if you have Arc 10.2 or above, is to rename the field with the Alter Field tool, although it may be too late for that to help. If none of that works, if you want to zip up your feature class and post it here, I'll take a look at it. Also post what you want the label to show. Good luck.
... View more
11-28-2014
10:48 AM
|
0
|
0
|
1681
|
|
POST
|
There's also the Alter Field tool available at ArcGIS 10.2 to change field names, although this could be tedious for a lot of fields. You could run it in a loop in python, I suppose, although you'd still have to set up all the field names you wanted to change.
... View more
11-26-2014
06:50 AM
|
0
|
0
|
1659
|
|
POST
|
Do you want the dam address or the owner address or the parcel address of the dam? They could all be different. If you can get parcel data, that typically has the parcel address and the owner address. If the dam is addressed separately, that should be in the dam layer. If not, you may want to check with your state/province regulatory body (DEQ in Michigan), or possibly a county drain commission, if one exists.
... View more
11-26-2014
06:22 AM
|
1
|
1
|
698
|
|
POST
|
Well, depending on how complex the gdb is, there are a couple of possible options. One is to set up a new, empty gdb with the schema you want - feature datasets, feature classes, fields, etc., then use the Simple Feature Loader to load the data, mapping source fields to your target fields. I frequently use this for smaller projects. For more complex migrations, you could download the X-Ray for ArcCatalog add-in. I haven't used this much myself, mostly because some of its features require Excel and we use Libre Office here. It has a bigger learning curve, but is also more versatile than the Simple Data Loader.
... View more
11-26-2014
06:12 AM
|
2
|
0
|
1659
|
|
POST
|
Instead of setting the workspace, try just putting the path there. In another thread. Richard Fairhurst stated that setting the env environment settings in a stand-alone script didn't actually do anything.
... View more
11-25-2014
01:08 PM
|
0
|
0
|
2943
|
| Title | Kudos | Posted |
|---|---|---|
| 6 | 08-22-2019 07:41 AM | |
| 1 | 05-05-2014 04:30 AM | |
| 1 | 08-15-2018 06:23 AM | |
| 3 | 08-06-2018 07:31 AM | |
| 1 | 03-30-2012 08:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2021
01:00 PM
|