POST
|
Input vector = shapefile with many overlapping polygons Identify feature = only one polygon When the identify feature crosses the input feature I receive two or more readings (with the same FID) due to the fact that the identity feature many times crosses the polygons within the input feature class. See it below: fid 1319, 885 - 1 fid 1319, 347 - 0 (1 within, 0 - outside) Could I set up my code in a way (or use other function), that the input polygon is either and only in or out of the identify feature but not in both, even though the identity feature crossed it? arcpy.analysis.Identity(fc, idFeat, output, "ALL", relationship="NO_RELATIONSHIPS")
... View more
09-07-2015
07:20 AM
|
0
|
2
|
3825
|
POST
|
Hi Freddie, Both worked like charm, million thanks! Additional Q - as the input vector contains many polygons while the identify feature has only one polygon, however, when the identify feature crosses the input feature I receive two or more readings (with the same FID) . See it below: Could I set up the code in a way, that the input polygon is either and only in or out of the identify feature but not in both?
... View more
09-03-2015
08:32 AM
|
0
|
0
|
1090
|
POST
|
Hi, I was following this simple example from ESRI (ArcGIS Desktop 😞 import arcpy from arcpy import env import os # The workspace environment needs to be set before ListFeatureClasses # to identify which workspace the list will be based on env.workspace = "c:/data" out_workspace = "c:/data/results/" clip_features = "c:/data/testarea/boundary.shp" # Loop through a list of feature classes in the workspace for fc in arcpy.ListFeatureClasses(): # Set the output name to be the same as the input name, and # locate in the 'out_workspace' workspace # output = os.path.join(out_workspace, fc) # Clip each input feature class in the list # arcpy.Clip_analysis(fc, clip_features, output, 0.1) I would like to run a very similar code with "Identity_analysis", however, I receive an error message when run my code, as it wants to create only one shapefile rather many with the same name(s) as the input file(s). Here is the code. It generates only one file " identity_country.shp" and than gives me an error msg that the file already exist. import arcpy from arcpy import env import os dirpath = r'C:\reggie\stat\spatial' arcpy.env.workspace = dirpath #set local parameters identity_feature = r'C:\reggie\stat\GIS_stats\country.shp' out_workspace = r'C:\reggie\stat\spatial\identity_country' for fc in arcpy.ListFeatureClasses("*"): output = os.path.join(out_workspace, fc) arcpy.Identity_analysis(fc, identity_feature, output, "ALL", "", "NO_RELATIONSHIPS")
... View more
09-01-2015
07:42 AM
|
0
|
2
|
4377
|
POST
|
I have dozens of DBFs and each contains a classification error matrix. From each of these matrices I would like to calculate overall, user's and producer's accuracies. What would be the best method to do that? I have one additional obstacle, just to make the problem a little more challenging; sometimes (but not always) I have more/less predicted classes than the "truth" class has. See the example below, where in the "predicted (Class)" column there is class "B" while the same class does not appear in the "truth" classes. I have used dbfread to read the dbf data. OrderedDict([(u'Class', u'A'), (u'_A', 14), (u'_C', 0), (u'_D', 3), (u'_E', 9), (u'_F', 8)]) OrderedDict([(u'Class', u'B'), (u'_A', 0), (u'_C', 0), (u'_D', 29), (u'_E', 1), (u'_F', 0)]) OrderedDict([(u'Class', u'C'), (u'_A', 0), (u'_C', 149), (u'_D', 101), (u'_E', 0), (u'_F', 2)]) OrderedDict([(u'Class', u'D'), (u'_A', 33), (u'_C', 0), (u'_D', 594), (u'_E', 41), (u'_F', 96)]) OrderedDict([(u'Class', u'E'), (u'_A', 62), (u'_C', 1), (u'_D', 38), (u'_E', 12), (u'_F', 28)]) OrderedDict([(u'Class', u'F'), (u'_A', 95), (u'_C', 34), (u'_D', 665), (u'_E', 38), (u'_F', 47)])
... View more
02-09-2015
05:57 AM
|
0
|
1
|
3755
|
POST
|
Hi, So far I got this far: import arcpy from arcpy import env env.workspace = r"C:\SouthA\Bolivia.gdb" listFCs = arcpy.ListFeatureClasses("*") for fc in listFCs: rows = arcpy.UpdateCursor(fc, , , ["field1", "field2", "field6", "field7"]) for row in rows: if row.getValue() == 0: rows.deleteRow(row) The idea is that in each table select and delete the rows which have "0"s in either/or field1, field2.... Thanks Ert
... View more
02-05-2015
05:42 AM
|
0
|
5
|
5610
|
POST
|
Created surface using kriging. when trying to export the output into raster, ArcMap crashes all the time, no exceptions. using winxp, arcgis 9.3 when do it with spatial anlyst there is no problem.
... View more
07-26-2010
07:27 AM
|
0
|
1
|
2214
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|