|
POST
|
Hi Dan Patterson, doesn't the Spatial Adjustment tools transform the entire featureclass (all features) the same way? The help (ArcGIS Help (10.2, 10.2.1, and 10.2.2) ) may assist in programming the formula to apply for each polygon based on the attributes for that specific polygon. I just wonder when using rotation, will you rotate the feature around the center? And with 3D data things get a little more interesting... Maybe this resource helps you: geometry/transformations.py at hydro-devel · ros/geometry · GitHub
... View more
12-02-2014
07:37 PM
|
1
|
2
|
4251
|
|
POST
|
The actual Help page doesn't hep much... it just states that the alias is invalid and you should try a different alias. ArcGIS Help (10.2, 10.2.1, and 10.2.2) Did you print the str(fieldList.name) and str(fullNames) to see what it's trying to do? And you are using an empty string as the optional output field name. Are you sure that 's OK? Is it the first field where the error occurs or did it change some fields?
... View more
12-02-2014
07:27 PM
|
0
|
1
|
3797
|
|
POST
|
And to show an (untested) example of how that could be: create a toolbox add a script to the toolbox (see content below) define first parameter as a featureclass define second parameter as field, obtained from the fc in first parameter Add the output field to the featureclass and run the tool. import arcpy
def main():
fc = arcpy.GetParameterAsText(0)
fldname = arcpy.GetParameterAsText(1)
lst_OIDs = createRelObjectidListAttachments(fc)
flds = ("OID@", fldname)
with arcpy.da.InsertCursor(fc, flds) as curs:
for row in curs:
row[1] = 1 if row[0] in lst_OIDs else 0
curs.updateRow(row)
def createRelObjectidListAttachments(fc):
att = "{0}__ATTACH".format(fc)
fld_reloid = "REL_OBJECTID"
lst_relOID = list(set([r[0] for r in arcpy.da.SearchCursor(att, (fld_reloid))]))
return lst_relOID
if __name__ == '__main__':
main() Be aware: the code has not been tested and and does not perform any error handling.
... View more
12-02-2014
04:05 PM
|
1
|
3
|
6704
|
|
POST
|
You are absolutely right. It would be better to create a tool and use the arcpy.da.UpdateCursor to update the featureclass based on a list (dictionary is not necessary) with REL_OBJECTID's from the attachment table.
... View more
12-02-2014
03:05 PM
|
0
|
0
|
6704
|
|
POST
|
By default if you use the multiring buffer you option dissolve will be "ALL". This means that all buffers of the same distance will be merged into a single feature, and you will have no reference to the features from which they were created. If you change this to NONE, all the attributes of the input feature will be written to the output featureclass.
... View more
12-01-2014
06:10 PM
|
0
|
0
|
1160
|
|
POST
|
Yes, you are right about the tiles: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
12-01-2014
09:36 AM
|
0
|
0
|
2640
|
|
POST
|
If you hace access to Network Analyst, you can do this type of analysis without programming it yourself: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
12-01-2014
09:27 AM
|
2
|
0
|
1140
|
|
POST
|
Strange, in your code there is no reference to the OBJECTID field. Maybe due to the attachments it is trying to include it, but if the relationship is based on GlobalID, then there will be no OBJECTID (?). The only thing I saw missing is the quote at the end of line 14 (but I think that is a copy error).
... View more
12-01-2014
08:13 AM
|
0
|
2
|
5282
|
|
POST
|
I guess you would need a physical field in you attribute table that indicates if the feature has an attachment. You could do the following: add a new field calculate the field like this: This is the code used: def hasAttachment(oid):
fc = r"D:\Xander\GeoNet\Attachments\test.gdb\test"
att = "{0}__ATTACH".format(fc)
fld_reloid = "REL_OBJECTID"
lst_relOID = list(set([r[0] for r in arcpy.da.SearchCursor(att, (fld_reloid))]))
return 1 if oid in lst_relOID else 0 The bad thing is that you would have to change the reference on line 2 where the path and name of the featureclass is indicated (I don't know how to access the path to the fc from the field calculator). The other thing is that every time you update attachments, you will have to recalculate. You will need to be in an edit session to calculate the field. The result is a field that has value 1 for those features with attachments and value 0 for those that don't. Kind regards, Xander
... View more
12-01-2014
05:31 AM
|
1
|
6
|
6705
|
|
POST
|
Do you know Business Analyst Online (BAO) | Market Analysis Mapping Software Tools ?
... View more
12-01-2014
04:53 AM
|
0
|
0
|
652
|
|
POST
|
I don't see the selection symbol being exposed in the arcpy.mapping.Layer object. so I guess the answer is No.
... View more
12-01-2014
04:51 AM
|
0
|
2
|
1406
|
|
POST
|
You may be interested in this thread too: Re: Determine Floodplain: Based on known flood level
... View more
11-29-2014
01:49 PM
|
0
|
0
|
3966
|
|
POST
|
It's always cool to see some of William Huber ideas revive! Thanx for sharing Curtis Price
... View more
11-29-2014
09:55 AM
|
2
|
1
|
3796
|
|
POST
|
Not sure, but wouldn't it be easier to calculate the NDVI based on the imagery (in case you have access to the Spatial Analyst extension)? NDVI = ((IR - R)/(IR + R)) IR = pixel values from the infrared band R = pixel values from the red band
... View more
11-29-2014
09:49 AM
|
1
|
0
|
895
|
| 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 |
Friday
|