POST
|
Hi Lauren, Do you happen to know the algorithm behind the K nearest neighbor option? For example, is it measuring feature edge to feature edge or centroid to centroid? Thanks. Ryan
... View more
12-11-2012
07:05 AM
|
0
|
0
|
569
|
POST
|
Thanks again Wayne for the good ideas. They worked. Here is my final script: # convert well known text to geometry, and compile shapes into a single feature class... # 11/15/2012 import arcpy File = "Y:\\Projects\\Ryan\\Analysis\\CNickerson\\OK\\OKraw.mdb\\OK_AgparcelsWKT" # dimension the WKT string field and poly ID field... # the field holding the WKT string... field1 = "coord_1" # the field holding the unique ID... field2 = "fidfips" # set up the empty list... featureList = [] # iterate on table row... cursor = arcpy.SearchCursor(File) row = cursor.next() while row: print (row.getValue(field2)) WKT = row.getValue(field1) # this is the part that converts the WKT string to geometry... temp = arcpy.FromWKT(WKT, "") # append the current geometry to the list... featureList.append(temp) row = cursor.next() # copy all geometries in the list to a feature class... arcpy.CopyFeatures_management(featureList, "Y:\\Projects\\Ryan\\Analysis\\CNickerson\\OK\\AgParcelShapes.shp") # clean up... del row, temp, WKT, File, field1, featureList, cursor
... View more
11-15-2012
10:01 AM
|
0
|
0
|
3019
|
POST
|
I have a text file that includes a well known text type field representing polygons. I noticed version 10.1 has a python function that imports WKT to a geometry type (fromWKT). The help however does not include an example of how that function is used. Here is a test a entered into the python scripting window in ArcMap: import arcpy test = arcpy.FromWKT("POLYGON ((X Y,X Y,X Y,X Y,X Y))", "") >>> It runs with no error, but how will I retrieve or view this result? Does syntax look correct? I have many records in the text file from which I have to retrieve the WKT string for each polygon and run this function, so do I need to build this function into a record loop in order to finally get a single polygon feature class? Thanks for the help. Ryan Williams
... View more
11-14-2012
09:28 AM
|
0
|
7
|
11434
|
POST
|
I'm getting the '010067: Error in executing grid expression' error when running the zonal statistics as table tool, selecting all statistics to be run. If I run the zonal statistics tool (output grid) using median I get the same error. However, if I run zonal statistics using mean, the tool completes successfully. I would ideally like to have a median value per zone, as well as other statistics specified in the ALL option. The zones are gridded counties, with the VALUE being the integer of FIPS. The value raster is integer type with values ranging from 1012 to 522731. Running version 10, service pack 1. Does anyone have an explanation as to why this tool does not work using these specs? Thanks, Ryan
... View more
03-16-2011
11:03 AM
|
0
|
2
|
495
|
POST
|
I'm getting the 000303 error joining a dbf to a grid VAT in version 10. The field I added to my VAT is 'EIE' defined as integer. I tried right clicking the field to calculate it, and also the ArcToolbox calculate field tool. Both result in same error. Thanks to anyone with ideas on this.
... View more
11-02-2010
06:28 AM
|
0
|
0
|
290
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|