Changeset fd291d9 in osmose-backend


Ignore:
Timestamp:
Jan 16, 2015 11:13:30 PM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
2ef4c86
Parents:
f1a788c
Message:

Convert USA to country parent class in config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osmose_config.py

    rf1a788c rfd291d9  
    400400 
    401401# United States of Ameria 
    402 default_country("north-america", "usa_delaware", 162110, {"country": "US", "language": "en", "proj": 3509}, 
    403                 download_country="us/delaware") 
    404 default_country("north-america", "usa_district_of_columbia", 162069, {"country": "US", "language": "en", "proj": 3559}, 
    405                 download_country="us/district-of-columbia") 
    406 # note: projection for hawaii is the one used for center islands, not for the whole 
    407 default_country("north-america", "usa_hawaii", None, {"country": "US", "language": "en", "proj": 2783}, 
    408                 download_country="us/hawaii") 
     402class us_state(default_country): 
     403    def __init__(self, state, polygon_id=None, proj=None, analyser_options={}, 
     404                 download_repo=GEOFABRIK, download_country=None): 
     405 
     406        analyser_options = dict({"country": "US", "language": "en", "proj": proj}, **analyser_options) 
     407        default_country.__init__(self, "north-america", "usa_" + state, polygon_id, analyser_options, 
     408                                    download_repo, download_country or ("us/" + state)) 
     409 
     410us_state("delaware", 162110, 3509) 
     411us_state("district-of-columbia", 162069, 3559) 
     412us_state("hawaii", None, 2783) # note: projection for hawaii is the one used for center islands, not for the whole 
     413 
    409414 
    410415quebec = default_country("north-america", "canada/quebec", 61549, {"country": "QC","language": "fr", "proj": 2138}, download_repo=OSMFR) 
Note: See TracChangeset for help on using the changeset viewer.