POST
|
Hi, I'm trying to access files in a geodatabase in python, but python returns the error that the file doesn't exist. In a way, this makes sense since when I look at the folder in my finder window, I can't actually access the files. Is there a way to access these files in python? I've attached some screen shots to make the problem clearer. Thanks, Julian
... View more
07-07-2013
05:10 PM
|
0
|
1
|
651
|
POST
|
Hi, I changed it to a feature class and deleted the null values and it is still taking an exteremely long time to do the join. There are about 30,000 observations in the file. Could it just be the size of the file? Is there anything else that I should try or think about? Thanks. Julian
... View more
07-02-2013
06:22 AM
|
0
|
0
|
2804
|
POST
|
Hi, I'm using a shapefile. I'm performing the action in ArcMap. Best, Julian
... View more
06-20-2013
10:16 AM
|
0
|
0
|
2804
|
POST
|
Hi, I'm using arcmap 10.0 SP5 to do a spatial join with a file that has about 61,000 observations, many of which are null, but it is taking an extremely long time (around 1 day). I thought that it would take a shorter period because I've done spatial joins with bigger files that took a shorter amount of time. Is it typical for it to be taking so long? Is there something that I can do to speed it up? Thanks, Julian
... View more
06-20-2013
08:48 AM
|
0
|
14
|
11979
|
POST
|
Hey, I'm having this same problem, right now. Did you ever figure out how to fix it? Thanks, Julian
... View more
06-19-2013
11:11 AM
|
0
|
0
|
185
|
POST
|
Hi, I think that you may be right, but when I change it, python no longer even finds the file... So, I don't know why that is. #Julian Katz-Samuels
#May 1, 2013
#Geocode addresses
import arcpy
from arcpy import env
parts=range(10)
parts.remove(0)
parts=map(str, parts)
years=["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009"]
env.workspace="X:\ebruch\shared\GeocodedHistoryFiles\GeocodedHistoryFiles.gdb"
address_locator = "X:\ebruch\shared\Locator\Street_Addresses_US"
#Check that file exists
try:
with open(address_locator): pass
except IOError:
print 'Oh dear address locator.'
for i in years:
for j in parts:
address_table= "X:\ebruch\shared\HistoryFile" + i + "_part" + j +".csv"
geocode_result= "X:\ebruch\shared\GeocodedHistoryFiles\GeocodedHistoryFiles.gdb\GeocodedHistoryFile" + i + "_part" + j + ".shp"
try:
with open(address_table): pass
except IOError:
print 'Oh dear address table.'
arcpy.GeocodeAddresses_geocoding(address_table, address_locator, "Street or Intersection StreetNumStreetName VISIBLE NONE;City or Placename SRmailCITY VISIBLE NONE;State SRmailSTATE VISIBLE NONE;Zip SRmailZIP VISIBLE NONE", geocode_result, "STATIC")
print "Done!"
... View more
06-14-2013
09:38 AM
|
0
|
0
|
311
|
POST
|
Hi, I've been trying to use arcpy to geocode a set of files, but I don't know what input fields to use. If I try to manually geocode a file one at a time, one of my input fields is "Street or Intersection" and another is "City or Placename", but I'm not sure how to put these into arcpy because of the spaces. When I just put them in as below, I get the error as in the subject. How should I refer to these input fields? Also, notice that I've tried "Address" and "City" instead and these returned the same error. #Julian Katz-Samuels
#May 1, 2013
#Geocode addresses
import arcpy
parts=range(10)
parts.remove(0)
parts=map(str, parts)
years=["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009"]
Geocoder = r"X:\ebruch\shared\Locator\Street_Addresses_US.loc.xml"
#Check that file exists
try:
with open(Geocoder): pass
except IOError:
print 'Oh dear geocoder.'
for i in years:
for j in parts:
address_table= r"X:\ebruch\shared\HistoryFile" + i + "_part" + j +".csv"
geocode_result= r"X:\ebruch\shared\GeocodedHistoryFiles\GeocodedHistoryFiles.gdb\GeocodedHistoryFile" + i + "_part" + j + ".shp"
try:
with open(address_table): pass
except IOError:
print 'Oh dear address table.'
arcpy.GeocodeAddresses_geocoding(address_table, Geocoder, "Street or Intersection StreetNumStreetName VISIBLE NONE;City or Placename SRmailCITY VISIBLE NONE;State SRmailSTATE VISIBLE NONE;Zip SRmailZIP VISIBLE NONE", geocode_result, "STATIC")
print "Done!"
Thank you, Julian
... View more
06-13-2013
07:49 PM
|
0
|
2
|
779
|
POST
|
Hi, Thanks for the reply. The error is that it can't find the address locator. I don't understand why this is occuring since I checked that I got the correct file path. One odd thing is that it seems to be reading the file in incorrectly. Consider the following code and error: >>> open(r'GIS Servers\arcgis on tasks.arcgisonline.com\Locators\TA_Address_NA_10.GeocodeServer')
Runtime error <type 'exceptions.IOError'>: [Errno 2] No such file or directory: 'GIS Servers\\arcgis on tasks.arcgisonline.com\\Locators\\TA_Address_NA_10.GeocodeServer' It seems to read in too many back slashes. I have also tried to open other files on my computer in python in arcgis and it doesn't work. Could there be a problem with python in arcgis where it doesn't allow me to open other files? Thanks, Julian
... View more
05-19-2013
04:24 PM
|
0
|
0
|
1535
|
POST
|
Hi all, I'm trying to use python to geocode a set of files, but it returns the above error after a few minutes of running the code every time. I've read that I might need to convert my files into a .dbf format, but I'm not sure. I've put my code below. #Julian Katz-Samuels
#May 1, 2013
#Geocode addresses
import arcpy
arcpy.env.workplace="X:\ebruch\shared"
parts=range(10)
parts.remove(0)
parts=map(str, parts)
years=["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009"]
Geocoder = r"GIS Servers\arcgis on tasks.arcgisonline.com\Locators\TA_Address_NA_10.geocodeServer"
for i in years:
for j in parts:
address_table= r"X:\ebruch\shared\HistoryFile" + i + "_part" + j +".csv"
geocode_result= r"X:\ebruch\shared\GeocodedHistoryFiles\GeocodedHistoryFile" + i + "_part" + j
arcpy.GeocodeAddresses_geocoding(address_table, Geocoder, "Address SRmailSTREETNAME VISIBLE NONE;City SRmailCITY VISIBLE NONE;State SRmailSTATE VISIBLE NONE;Zip SRmailZIP VISIBLE NONE", geocode_result, "STATIC")
print "Done!"
Best, Julian
... View more
05-19-2013
07:11 AM
|
0
|
4
|
5539
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|