POST
|
[INDENT]Is there a way to change the geocoding options in python? I geocoded the file and the standard score is 85, well all the 84.19 scores work perfectly. I have not figured out how to set the score in python.[/INDENT]
... View more
02-07-2012
04:12 AM
|
0
|
2
|
130
|
POST
|
See told you those quotes are nasty.... Yeah it worked thanks! import arcpy ## Workspace ## FIPS = "C:\\Users\\D2148\\Documents\\Maps\\FIPS" #FIPSlist = ('001', '003', '005', '007', '009', '011', '013', # '015', '017', '019', '021', '023', '025', '027', # '029', '031', '033', '035', '037', '039', '041', # '043', '045', '047', '049', '051', '053', '055', # '057', '059', '061', '063', '065', '067', '069', # '071', '073', '075', '077', '079', '081', '083', # '085', '087', '089', '091', '093', '095', '097', # '099', '101', '103', '105', '107', '109', '111', #'113', '115', '117', '119', '121', '123', '125', #'127') FIPSlist = ('001', '003') ###### CLEAR SELECTION FIRST ######## for fip in FIPSlist: ## SQL for "Master_TAHI" ## query = "FIPS_PARIS ='" + fip + "'" ## SQL for "All_roads_cityjoin" ## query2 = "Parish_FIP ='" + fip + "'" ## Create FIPS###.dbf from Master_TAHI ## arcpy.TableSelect_analysis("Master_TAHI", FIPS + "\\FIPS" + fip + ".dbf",query) ## Create AllRoadsParish###.shp from All_roads_cityjoin ## arcpy.Select_analysis("All_roads_cityjoin",FIPS + "\\AllRoadsParish" + fip + ".shp",query2) ## Create Address Locator ## Output_Address_Locator = "C:\\Users\\D2148\\Documents\\Maps\\FIPS\\add" + fip arcpy.CreateAddressLocator_geocoding("US Address - Street Name", "AllRoadsParish" + fip + " 'Primary Table'", "'Feature ID' OBJECTID VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' <None> VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' Street_Cat VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' <None> VISIBLE NONE;'Right City or Place' <None> VISIBLE NONE;'Left ZIP Code' ZIPL VISIBLE NONE;'Right ZIP Code' ZIPR VISIBLE NONE;'Left State' STATE VISIBLE NONE;'Right State' STATE VISIBLE NONE;'Left Additional Field' Parish_FIP VISIBLE NONE;'Right Additional Field' Parish_FIP VISIBLE NONE", Output_Address_Locator, "") Final Code
... View more
02-06-2012
09:59 AM
|
0
|
0
|
2
|
POST
|
well what I did was hardcode the "AllRoadsParish001 'Primary Table'" into the address locator script and it worked. But, if I put the "AllRoadsParish" + fip + "'Primary Table'" in there it will not
... View more
02-06-2012
09:50 AM
|
0
|
0
|
2
|
POST
|
I get this error now. Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000039: Not enough reference data tables for this style. I edited like you said and the .shp and .dbf were created correctly, just the create address locator didn't work.
... View more
02-06-2012
09:29 AM
|
0
|
0
|
2
|
POST
|
import arcpy ## Workspace ## FIPS = "C:\\Users\\D2148\\Documents\\Maps\\FIPS" #FIPSlist = ('001', '003', '005', '007', '009', '011', '013', # '015', '017', '019', '021', '023', '025', '027', # '029', '031', '033', '035', '037', '039', '041', # '043', '045', '047', '049', '051', '053', '055', # '057', '059', '061', '063', '065', '067', '069', # '071', '073', '075', '077', '079', '081', '083', # '085', '087', '089', '091', '093', '095', '097', # '099', '101', '103', '105', '107', '109', '111', #'113', '115', '117', '119', '121', '123', '125', #'127') FIPSlist = '001' ###### CLEAR SELECTION FIRST ######## for fip in FIPSlist: ## SQL for "Master_TAHI" ## query = "FIPS_PARIS ='" + fip + "'" ## SQL for "All_roads_cityjoin" ## query2 = "Parish_FIP ='" + fip + "'" ## Create FIPS###.dbf from Master_TAHI ## arcpy.TableSelect_analysis("Master_TAHI", FIPS + "\\FIPS" + fip + ".dbf",query) ## Create AllRoadsParish###.shp from All_roads_cityjoin ## arcpy.Select_analysis("All_roads_cityjoin",FIPS + "\\AllRoadsParish" + fip + ".shp",query2) ## Create Address Locator ## Output_Address_Locator = "C:\\Users\\D2148\\Documents\\Maps\\FIPS\\add" + fip arcpy.CreateAddressLocator_geocoding("US Address - Street Name", "AllRoadsParish" + fip 'Primary Table'", "'Feature ID' OBJECTID VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' <None> VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' Street_Cat VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' <None> VISIBLE NONE;'Right City or Place' <None> VISIBLE NONE;'Left ZIP Code' ZIPL VISIBLE NONE;'Right ZIP Code' ZIPR VISIBLE NONE;'Left State' STATE VISIBLE NONE;'Right State' STATE VISIBLE NONE;'Left Additional Field' Parish_FIP VISIBLE NONE;'Right Additional Field' Parish_FIP VISIBLE NONE", Output_Address_Locator, "") These stupid parentheses keep making me so mad.... Are there rules as how to place parentheses? I can't get this code to work, there is a syntax error on this part.
... View more
02-06-2012
05:30 AM
|
0
|
8
|
360
|
POST
|
import arcpy import sys import string import os from arcpy import env Input = arcpy.GetParameterAsText(0) Attribute = arcpy.GetParameterAsText(1) Attributelist = Attribute.split(";") sqlclause = arcpy.GetParameterAsText(2) env.workspace = arcpy.GetParameterAsText(3) for att in Attributelist: query = sqlclause + "'" + att + "'" arcpy.TableSelect_analysis(Input, Input + att + ".dbf", query) Final Code
... View more
02-03-2012
10:55 AM
|
0
|
0
|
6
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|