|
POST
|
I suppose if I collect an object I can click on the location of the object and attach the picture to it, while the picture was takes at a certain distance. If it is location and angle (direction of the foto) you need, you may need a GPS camera (but that wouldn't be connected to the Collector App). If the App really strips EXIF data, you may want to suggest an enhancement (but there may be a reason why they do it).
... View more
01-23-2015
03:56 AM
|
1
|
3
|
2372
|
|
POST
|
The help (Perform analysis—ArcGIS Online Help | ArcGIS ) states: License: In order to perform analysis, the administrator of your organization needs to grant you certain privileges. To use any of the analysis tools, you will need the following privileges Create, update, and delete content Publish hosted features Spatial Analysis Certain tools need additional privileges such as Network Analysis and GeoEnrichment. These additional privileges are noted below in the description of each tool. Some more links: ArcGIS REST API: Spatial Analysis Service | ArcGIS for Developers Get started with the Spatial Analysis service—ArcGIS REST API: Spatial Analysis Service | ArcGIS for Developers Programmatically accessing analysis services—ArcGIS REST API: Spatial Analysis Service | ArcGIS for Developers
... View more
01-23-2015
03:48 AM
|
1
|
0
|
1761
|
|
POST
|
If you have an attachment, isn't that attached to a feature (location)? The image itself may not be aware of its location (through the EXIF header), but since it is attached to a feature, you can derive the location. Or not?
... View more
01-23-2015
03:43 AM
|
1
|
5
|
2372
|
|
POST
|
It helps to "trace back" the line where the error occurred. The documentation can be found here: 28.10. traceback — Print or retrieve a stack traceback — Python 2.7.9 documentation And you should read this help topic: Error handling with Python
... View more
01-22-2015
05:21 PM
|
0
|
0
|
3633
|
|
POST
|
If you want to make it a little more robust, but slightly more complex you could use: "{0}-{1}".format("{0}".format(int(!ACONTROL!)).zfill(4),"{0}".format(int(!ASECTION!)).zfill(2)) This will yield: as the first suggestion will yield:
... View more
01-22-2015
04:04 PM
|
1
|
0
|
1538
|
|
POST
|
It is not something that is missing... you have a parenthesis too much: "00{0}-0{1}".format(int(!ACONTROL!),int(!ASECTION!))
... View more
01-22-2015
03:43 PM
|
0
|
1
|
1538
|
|
POST
|
I just posted the code and attached the result using your shapefiles. Let me know if it is what you were looking for.
... View more
01-22-2015
03:20 PM
|
0
|
4
|
1913
|
|
POST
|
This code seems to get the result (assuming that I understand it now): import arcpy, os
import sys
import traceback
from arcpy import env
# Set environment settings
# env.workspace = r"C:\GIS\Track1\1_Orig\int2"
env.workspace = r"C:\Forum\updateCursorsAtts\testdata"
# Set local variables
dct_flds = {'PorousMed': ['PM1','PM2','PM3','PM4','PM5'],
'Kcond_1': ['Kcond1','Kcond2','Kcond3','Kcond4','Kcond5'],
'Porosity_1': ['Poros1','Poros2','Poros3','Poros4','Poros5'],
'Leng_m': ['leng_m1','leng_m2','leng_m3','leng_m4','leng_m5']}
# changed fieldnames corresponding to the data
# PorousMed: Text
# K_1= Kcond_1: Double
# Pity_1=Porosity_1: Double
# Leng_m: Double
def_tuple = ("",0,0,0)
# create list of fields from dictionary (contains all fields: input and output)
flds = []
for k, lst in dct_flds.items():
flds.append(k)
for fld in lst:
flds.append(fld)
flds_in = dct_flds.keys()
try:
fcList = arcpy.ListFeatureClasses("","POLYLINE")
print fcList
for fc in fcList:
print fc
# create the list from the input fields
valueList = []
with arcpy.da.SearchCursor(fc, flds_in) as curs:
for row in curs:
valueList.append(list(row))
# correct for less than 5 elements
while len(valueList) <= 5:
valueList.append(def_tuple)
with arcpy.da.UpdateCursor(fc, flds) as curs:
for row in curs:
for fld_in, lst_out in dct_flds.items():
# val_in = row[flds.index(fld_in)]
for fld_out in lst_out:
num = int(fld_out[-1:])
lst_vals = list(valueList[num])
row[flds.index(fld_out)] = lst_vals[flds_in.index(fld_in)]
curs.updateRow(row)
except Exception as e:
print e
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
print pymsg + "\n"
print msgs I'll attach the updated dataset for you to check the result. Kind regards, Xander
... View more
01-22-2015
03:16 PM
|
1
|
0
|
4765
|
|
POST
|
You're welcome, but don't thank me yet.. there are still some things that need to be resolved. I just downloaded the files (thanks) and will have a look at it to see if with the additional explanation I can make it work.
... View more
01-22-2015
02:46 PM
|
0
|
1
|
2214
|
|
POST
|
Does the polygon has a single Z value? Probably not. How would you like to retrieve the Z value of the polygon?
... View more
01-22-2015
02:39 PM
|
0
|
0
|
1473
|
|
POST
|
I suppose the info in the classes depend on each provider, but I suppose you should be able to trust it. To generate a DEM you don't have to pass through multi point.
... View more
01-22-2015
10:38 AM
|
0
|
2
|
2242
|
|
POST
|
The best thing would be to share some sample data. That would make it so much easier. My next best guess is this (not testes and should best be run on a copy of the data): import arcpy, os
from arcpy import env
# Set environment settings
env.workspace = r"C:\GIS\Track1\1_Orig\int2"
# Set local variables
dct_flds = {'PorousMed': ['PM1','PM2','PM3','PM4','PM5'],
'K_1': ['K1','K2','K3','K4','K5'],
'Pity_1': ['P1','P2','P3','P4','P5'],
'Leng_m': ['leng_m1','leng_m2','leng_m3','leng_m4','leng_m5']}
# create list of fields from dictionary (contains all fields: input and output)
flds = []
for k, lst in dct_flds.items():
flds.append(k)
for fld in lst:
flds.append(fld)
flds_in = dct_flds.keys()
try:
fcList = arcpy.ListFeatureClasses("","POLYLINE")
for fc in fcList:
print fc
# create the list from the input fields
valueList = []
with arcpy.da.SearchCursor(fc, flds_in) as curs:
for row in curs:
valueList.append(list(row))
with arcpy.da.UpdateCursor(fc, flds) as curs:
for row in rows:
for fld_in, lst_out in dct_flds.items():
# val_in = row[flds.index(fld_in)]
for fld_out in lst_out:
num = int(fld_out[-1:])
lst_vals = list(valueList[num])
row[flds.index(fld_out)] = lst_vals[flds_in.index(fld_in)]
curs.updateRow(row)
except:
print arcpy.GetMessages(0)
print arcpy.GetMessages(1)
print arcpy.GetMessages(2)
... View more
01-22-2015
10:32 AM
|
0
|
3
|
2214
|
|
POST
|
OK, I think I am starting to get the picture when there are 5 features. But with if the featureclass has more or less, what should happen then?
... View more
01-22-2015
10:25 AM
|
0
|
5
|
2214
|
|
POST
|
bare earth are normally those called the "last" return
... View more
01-22-2015
09:54 AM
|
0
|
4
|
2242
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|