|
POST
|
How do you have the Parse Path tool set up? And, is it the Parse Path tool renamed, or a different tool called Parse Filename? I don't have anything called Parse Filename. What is the exact output value of FILENAME?
... View more
07-22-2015
02:19 PM
|
0
|
2
|
3801
|
|
POST
|
That's because you're appending the variables 'x' and 'y' that you calculated at the beginning. If you want 'x' and 'y' to hold the lat/long values, you need to assign them as such. x = pointA.centroid.X
y = pointA.centroid.Y ...but now I'm not even sure what the 'point' feature set is supposed to be doing. Anyhow, I think your code has undergone so many revisions that you should really sit down and figure out what all your variables are doing.
... View more
07-22-2015
02:08 PM
|
1
|
1
|
6151
|
|
POST
|
Oh, I think I see. Try using the full path to the shapefile. For example, C:/yourfolder/%FILENAME%.shp Or, have you set the workspace environment?
... View more
07-22-2015
01:45 PM
|
0
|
4
|
3801
|
|
POST
|
lana donaldson, post your code and we can help. Or, better yet, start a new question, since this one is answered.
... View more
07-22-2015
01:16 PM
|
0
|
0
|
4954
|
|
POST
|
Full disclosure, I don't use ModelBuilder very often, but this sounds like a job for a precondition.
... View more
07-22-2015
01:10 PM
|
0
|
8
|
3801
|
|
POST
|
Did you reload the table cache? If you have the table open, it won't automatically update until you reload it. Anyhow, this code updates my table with lat/long, from UTM. >>> with arcpy.da.UpdateCursor("coord_test",["ET_X","ET_Y"]) as cursor:
for row in cursor:
point_utm = arcpy.PointGeometry(arcpy.Point(row[0],row[1]),arcpy.SpatialReference(26910))
pointA = point_utm.projectAs(arcpy.SpatialReference(4269))
row[0]= pointA.centroid.X
row[1]= pointA.centroid.Y
cursor.updateRow(row)
... View more
07-22-2015
12:06 PM
|
1
|
0
|
4474
|
|
POST
|
It should be something like this (untested): def FindLabel ( [POLY_ID], [EV_CODE], [STAND_CONDITION_CODE] ):
if [STAND_CONDITION_CODE]:
SCC = [STAND_CONDITION_CODE]
else:
SCC = '?'
if [EV_CODE]:
EC = [EV_CODE]
else:
EC = '?'
return "<BOL><UND>" + " " + [POLY_ID] + " " + "</UND></BOL>" + '\n' + EC + "-" + SCC
... View more
07-22-2015
12:00 PM
|
2
|
1
|
952
|
|
POST
|
Try 4269 (the NAD83 geographic coordinate system) rather than 115702 (the NAD83 spheroid). For reference: Projected Coordinate Systems Geographic Coordinate Systems
... View more
07-22-2015
11:52 AM
|
0
|
2
|
4474
|
|
POST
|
Step 1: convert Excel to CSV file. If you don't want to do that, you can work with Excel directly, but it's more complicated. Step 2: run Python script. This will probably take some time to digest. Comments follow '#' (leave in or delete. They will be ignored). import arcpy, csv, os
fc = r'C:/junk/FILE_GDB.gdb/newEmptyFC' # point to where you want your FC
if arcpy.Exists(fc):
arcpy.Delete_management(fc) # delete FC if it exists
arcpy.CreateFeatureclass_management(os.path.dirname(fc),
os.path.basename(fc)) # create FC
fieldtypes = { 'char':'TEXT',
'inte':'LONG'} # dictionary to translate from your listed data types to ArcGIS data types. You'll have to add more.
with open(r'C:/junk/excel_test.csv', 'rb') as csvfile: # open CSV file
reader = csv.reader(csvfile, dialect='excel') # make a CSV reader
headers = reader.next() # skip header row
for row in reader: # read through rows
if row[0] <> 'OBJECTID': # don't create OID field. Will be created automatically
print fieldtypes[row[1][:4]] # convince yourself that it is using the dictionary properly
arcpy.AddField_management(fc, row[0], fieldtypes[row[1][:4]]) # create field of appropriate data type, based on first 4 characters in CSV file
... View more
07-22-2015
11:22 AM
|
1
|
9
|
2878
|
|
POST
|
This is certainly possible using Python. If you want to go in that direction, please post your starting script, or at least your Excel file as an example.
... View more
07-22-2015
10:32 AM
|
1
|
11
|
2878
|
|
POST
|
I suppose everything to do with the hydrology toolset would be applicable to physics (e.g. water flows from high to low elevation according to gravity). Or solar radiation. Or distance. You can work most geography back to physics if you really want.
... View more
07-22-2015
10:29 AM
|
0
|
0
|
1010
|
|
POST
|
See this thread for how you can use arcpy.PointGeometry.projectAs() to change coordinate systems at the individual point level.
... View more
07-22-2015
10:21 AM
|
1
|
6
|
4474
|
|
POST
|
Your questions are really straying from ArcGIS, but check out this page for an example of others doing pretty much exactly what you hope to do. They mark their own control points: As far as georeferencing goes, start here.
... View more
07-21-2015
12:02 PM
|
1
|
2
|
3574
|
|
POST
|
Curious. I was about to tell you that you must be doing something wrong, but I can replicate what you're seeing (mostly). 1.) Create CSV with space in field name. 2.) Add CSV to ArcMap. 3.) Attempt join. Validation produces the error above. 4.) Remove CSV from ArcMap. 5.) Remove space from CSV field name outside ArcGIS. 6.) Save over original CSV. 7.) Add CSV to ArcMap, again. 8.) Inspect CSV table - looks good, no space. 9.) Attempt join. Still greeted by error on join validation. I think this must be a bug of some sort. I'm not sure if the CSV file is kept in memory in some way. Anyhow, a workaround is to close ArcMap, reopen ArcMap, and join with the fixed CSV. Or, save CSV to new file, but it sounds like you did this. Saving to new file works for me.
... View more
07-21-2015
11:47 AM
|
1
|
1
|
2089
|
|
POST
|
I saw your other post about Orthorectifying a DEM, which led me to this page which gives some clues about what an RPC is, and how you may be able to get at it. Basically, it sounds like, hopefully, your UAV provides this information somewhere as a file with the image(s). If not, you should contact the manufacturer to see what your options are, if any. They may sell proprietary software that can extract this information from an encrypted file. Of course, the UAV may not even collect this information, in which case, you'd be out of luck.
... View more
07-21-2015
10:31 AM
|
1
|
1
|
1259
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-25-2015 01:51 PM | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|