X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/32c8dabefe8cc0e70f8d6b2313d5ad98d2022406..2e6f5ba7e68d52aff93775ebffcdb5c59f7f65df:/utils/tigerAddressImport.py
diff --git a/utils/tigerAddressImport.py b/utils/tigerAddressImport.py
index 5da493dc..5499f50e 100755
--- a/utils/tigerAddressImport.py
+++ b/utils/tigerAddressImport.py
@@ -1366,7 +1366,7 @@ county_fips = {
'24043' : 'Washington, MD' ,
'24045' : 'Wicomico, MD' ,
'24047' : 'Worcester, MD' ,
-'24510' : 'Baltimore city, MD' ,
+'24510' : 'Baltimore City, MD' ,
'25000' : 'MASSACHUSETTS' ,
'25001' : 'Barnstable, MA' ,
'25003' : 'Berkshire, MA' ,
@@ -1752,7 +1752,7 @@ county_fips = {
'29225' : 'Webster, MO' ,
'29227' : 'Worth, MO' ,
'29229' : 'Wright, MO' ,
-'29510' : 'St. Louis city, MO' ,
+'29510' : 'St. Louis City, MO' ,
'30000' : 'MONTANA' ,
'30001' : 'Beaverhead, MT' ,
'30003' : 'Big Horn, MT' ,
@@ -1922,7 +1922,7 @@ county_fips = {
'32029' : 'Storey, NV' ,
'32031' : 'Washoe, NV' ,
'32033' : 'White Pine, NV' ,
-'32510' : 'Carson City city, NV' ,
+'32510' : 'Carson City, NV' ,
'33000' : 'NEW HAMPSHIRE' ,
'33001' : 'Belknap, NH' ,
'33003' : 'Carroll, NH' ,
@@ -1964,7 +1964,7 @@ county_fips = {
'35007' : 'Colfax, NM' ,
'35009' : 'Curry, NM' ,
'35011' : 'De Baca, NM' ,
-'35013' : 'Doña Ana, NM' ,
+'35013' : 'Dona Ana, NM' ,
'35015' : 'Eddy, NM' ,
'35017' : 'Grant, NM' ,
'35019' : 'Guadalupe, NM' ,
@@ -3328,97 +3328,97 @@ county_fips = {
'56043' : 'Washakie, WY' ,
'56045' : 'Weston, WY' ,
'60000' : 'AMERICAN SAMOA',
-'60010' : 'Eastern district, AS' ,
-'60020' : 'Manua district, AS' ,
-'60030' : 'Rose island, AS' ,
-'60040' : 'Swains island, AS' ,
-'60050' : 'Western district, AS' ,
+'60010' : 'Eastern District, AS' ,
+'60020' : 'Manu\'a District, AS' ,
+'60030' : 'Rose Island, AS' ,
+'60040' : 'Swains Island, AS' ,
+'60050' : 'Western District, AS' ,
'66000' : 'GUAM' ,
'66010' : 'Guam, GU' ,
'69000' : 'COMMONWEALTH OF THE NORTHERN MARIANA ISLANDS' ,
-'69085' : 'Commonwealth of the Northern Mariana Islands, MP' ,
-'69100' : 'Commonwealth of the Northern Mariana Islands, MP' ,
-'69110' : 'Commonwealth of the Northern Mariana Islands, MP' ,
-'69120' : 'Commonwealth of the Northern Mariana Islands, MP' ,
-'72000' : 'PUERTO RICO',
-'72001' : 'Adjuntas, PR',
-'72003' : 'Aguada, PR',
-'72005' : 'Aguadilla, PR',
-'72007' : 'Aguas Buenas, PR',
-'72009' : 'Aibonito, PR',
-'72011' : 'Anasco, PR',
-'72013' : 'Arecibo, PR',
-'72015' : 'Arroyo, PR',
-'72017' : 'Barceloneta, PR',
-'72019' : 'Barranquitas, PR',
-'72021' : 'Bayamon, PR',
-'72023' : 'Cabo Rojo, PR',
-'72025' : 'Caguas, PR',
-'72027' : 'Camuy, PR',
-'72029' : 'Canovanas, PR',
-'72031' : 'Carolina, PR',
-'72033' : 'Catano, PR',
-'72035' : 'Cayey, PR',
-'72037' : 'Ceiba, PR',
-'72039' : 'Ciales, PR',
-'72041' : 'Cidra, PR',
-'72043' : 'Coamo, PR',
-'72045' : 'Comerio, PR',
-'72047' : 'Corozal, PR',
-'72049' : 'Culebra, PR',
-'72051' : 'Dorado, PR',
-'72053' : 'Fajardo, PR',
-'72054' : 'Florida, PR',
-'72055' : 'Guanica, PR',
-'72057' : 'Guayama, PR',
-'72059' : 'Guayanilla, PR',
-'72061' : 'Guaynabo, PR',
-'72063' : 'Gurabo, PR',
-'72065' : 'Hatillo, PR',
-'72067' : 'Hormigueros, PR',
-'72069' : 'Humacao, PR',
-'72071' : 'Isabela, PR',
-'72073' : 'Jayuya, PR',
-'72075' : 'Juana Diaz, PR',
-'72077' : 'Juncos, PR',
-'72079' : 'Lajas, PR',
-'72081' : 'Lares, PR',
-'72083' : 'Las Marias, PR',
-'72085' : 'Las Piedras, PR',
-'72087' : 'Loiza, PR',
-'72089' : 'Luquillo, PR',
-'72091' : 'Manati, PR',
-'72093' : 'Maricao, PR',
-'72095' : 'Maunabo, PR',
-'72097' : 'Mayaguez, PR',
-'72099' : 'Moca, PR',
-'72101' : 'Morovis, PR',
-'72103' : 'Naguabo, PR',
-'72105' : 'Naranjito, PR',
-'72107' : 'Orocovis, PR',
-'72109' : 'Patillas, PR',
-'72111' : 'Penuelas, PR',
-'72113' : 'Ponce, PR',
-'72115' : 'Quebradillas, PR',
-'72117' : 'Rincon, PR',
-'72119' : 'Rio Grande, PR',
-'72121' : 'Sabana Grande, PR',
-'72123' : 'Salinas, PR',
-'72125' : 'San German, PR',
-'72127' : 'San Juan, PR',
-'72129' : 'San Lorenzo, PR',
-'72131' : 'San Sebastian, PR',
-'72133' : 'Santa Isabel, PR',
-'72135' : 'Toa Alta, PR',
-'72137' : 'Toa Baja, PR',
-'72139' : 'Trujillo Alto, PR',
-'72141' : 'Utuado, PR',
-'72143' : 'Vega Alta, PR',
-'72145' : 'Vega Baja, PR',
-'72147' : 'Vieques, PR',
-'72149' : 'Villalba, PR',
-'72151' : 'Yabucoa, PR',
-'72153' : 'Yauco, PR',
+'69085' : 'Northern Islands, MP' ,
+'69100' : 'Rota, MP' ,
+'69110' : 'Saipan, MP' ,
+'69120' : 'Tinian, MP' ,
+'72000' : 'PUERTO RICO' ,
+'72001' : 'Adjuntas, PR' ,
+'72003' : 'Aguada, PR' ,
+'72005' : 'Aguadilla, PR' ,
+'72007' : 'Aguas Buenas, PR' ,
+'72009' : 'Aibonito, PR' ,
+'72011' : 'Anasco, PR' ,
+'72013' : 'Arecibo, PR' ,
+'72015' : 'Arroyo, PR' ,
+'72017' : 'Barceloneta, PR' ,
+'72019' : 'Barranquitas, PR' ,
+'72021' : 'Bayamon, PR' ,
+'72023' : 'Cabo Rojo, PR' ,
+'72025' : 'Caguas, PR' ,
+'72027' : 'Camuy, PR' ,
+'72029' : 'Canovanas, PR' ,
+'72031' : 'Carolina, PR' ,
+'72033' : 'Catano, PR' ,
+'72035' : 'Cayey, PR' ,
+'72037' : 'Ceiba, PR' ,
+'72039' : 'Ciales, PR' ,
+'72041' : 'Cidra, PR' ,
+'72043' : 'Coamo, PR' ,
+'72045' : 'Comerio, PR' ,
+'72047' : 'Corozal, PR' ,
+'72049' : 'Culebra, PR' ,
+'72051' : 'Dorado, PR' ,
+'72053' : 'Fajardo, PR' ,
+'72054' : 'Florida, PR' ,
+'72055' : 'Guanica, PR' ,
+'72057' : 'Guayama, PR' ,
+'72059' : 'Guayanilla, PR' ,
+'72061' : 'Guaynabo, PR' ,
+'72063' : 'Gurabo, PR' ,
+'72065' : 'Hatillo, PR' ,
+'72067' : 'Hormigueros, PR' ,
+'72069' : 'Humacao, PR' ,
+'72071' : 'Isabela, PR' ,
+'72073' : 'Jayuya, PR' ,
+'72075' : 'Juana Diaz, PR' ,
+'72077' : 'Juncos, PR' ,
+'72079' : 'Lajas, PR' ,
+'72081' : 'Lares, PR' ,
+'72083' : 'Las Marias, PR' ,
+'72085' : 'Las Piedras, PR' ,
+'72087' : 'Loiza, PR' ,
+'72089' : 'Luquillo, PR' ,
+'72091' : 'Manati, PR' ,
+'72093' : 'Maricao, PR' ,
+'72095' : 'Maunabo, PR' ,
+'72097' : 'Mayaguez, PR' ,
+'72099' : 'Moca, PR' ,
+'72101' : 'Morovis, PR' ,
+'72103' : 'Naguabo, PR' ,
+'72105' : 'Naranjito, PR' ,
+'72107' : 'Orocovis, PR' ,
+'72109' : 'Patillas, PR' ,
+'72111' : 'Penuelas, PR' ,
+'72113' : 'Ponce, PR' ,
+'72115' : 'Quebradillas, PR' ,
+'72117' : 'Rincon, PR' ,
+'72119' : 'Rio Grande, PR' ,
+'72121' : 'Sabana Grande, PR' ,
+'72123' : 'Salinas, PR' ,
+'72125' : 'San German, PR' ,
+'72127' : 'San Juan, PR' ,
+'72129' : 'San Lorenzo, PR' ,
+'72131' : 'San Sebastian, PR' ,
+'72133' : 'Santa Isabel, PR' ,
+'72135' : 'Toa Alta, PR' ,
+'72137' : 'Toa Baja, PR' ,
+'72139' : 'Trujillo Alto, PR' ,
+'72141' : 'Utuado, PR' ,
+'72143' : 'Vega Alta, PR' ,
+'72145' : 'Vega Baja, PR' ,
+'72147' : 'Vieques, PR' ,
+'72149' : 'Villalba, PR' ,
+'72151' : 'Yabucoa, PR' ,
+'72153' : 'Yauco, PR' ,
'78000' : 'VIRGIN ISLANDS' ,
'78010' : 'St. Croix, VI' ,
'78020' : 'St. John, VI' ,
@@ -3893,8 +3893,8 @@ def addressways(waylist, nodelist, first_id):
# ret.append( "" % (iSource, VERSION, import_guid) )
# ret.append( "" % (iAttrib) )
# ret.append( "" )
-
- ret.append( "select tigger_create_interpolation(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
+ # call new tiger_line_import function to save the lines in the DB.
+ ret.append( "select tiger_line_import(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
( ",".join(rlinestring), rfromadd.replace("'", "''"), rtoadd.replace("'", "''"), interpolationtype.replace("'", "''"), name.replace("'", "''"), county.replace("'", "''"), zipr.replace("'", "''") ) )
if left:
@@ -3919,7 +3919,7 @@ def addressways(waylist, nodelist, first_id):
interpolationtype = "all";
else:
interpolationtype = "all";
- ret.append( "select tigger_create_interpolation(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
+ ret.append( "select tiger_line_import(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
( ",".join(llinestring), lfromadd.replace("'", "''"), ltoadd.replace("'", "''"), interpolationtype.replace("'", "''"), name.replace("'", "''"), county.replace("'", "''"), zipl.replace("'", "''") ) )
return ret