comparison flys-backend/contrib/shpimporter/shpimporter.py @ 5353:d086ce6c13d3

Add jetties importer
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 20 Mar 2013 17:55:53 +0100
parents aa043641d9c8
children ed149d5d7fb7
comparison
equal deleted inserted replaced
5352:f1009aa7dcd1 5353:d086ce6c13d3
16 from crosssectiontracks import CrosssectionTrack 16 from crosssectiontracks import CrosssectionTrack
17 from floodplains import Floodplain 17 from floodplains import Floodplain
18 from boundaries import HydrBoundary, HydrBoundaryPoly 18 from boundaries import HydrBoundary, HydrBoundaryPoly
19 from hws import HWSLines, HWSPoints 19 from hws import HWSLines, HWSPoints
20 from gauges import GaugeLocation 20 from gauges import GaugeLocation
21 from jetties import Jetties
21 from dgm import insertRiverDgm 22 from dgm import insertRiverDgm
22 23
23 logger = logging.getLogger("shpimporter") 24 logger = logging.getLogger("shpimporter")
24 25
25 os.environ["NLS_LANG"] = ".AL32UTF8" 26 os.environ["NLS_LANG"] = ".AL32UTF8"
44 HydrBoundary(river_id, dbconn, dry_run), 45 HydrBoundary(river_id, dbconn, dry_run),
45 HydrBoundaryPoly(river_id, dbconn, dry_run), 46 HydrBoundaryPoly(river_id, dbconn, dry_run),
46 HWSLines(river_id, dbconn, dry_run), 47 HWSLines(river_id, dbconn, dry_run),
47 HWSPoints(river_id, dbconn, dry_run), 48 HWSPoints(river_id, dbconn, dry_run),
48 GaugeLocation(river_id, dbconn, dry_run), 49 GaugeLocation(river_id, dbconn, dry_run),
50 Jetties(river_id, dbconn, dry_run),
49 UESG(river_id, dbconn, dry_run) 51 UESG(river_id, dbconn, dry_run)
50 ] 52 ]
51 53
52 54
53 def getConfig(): 55 def getConfig():
71 parser.add_option("--skip_hws_points", type="int") 73 parser.add_option("--skip_hws_points", type="int")
72 parser.add_option("--skip_gauge_locations", type="int") 74 parser.add_option("--skip_gauge_locations", type="int")
73 parser.add_option("--skip_kms", type="int") 75 parser.add_option("--skip_kms", type="int")
74 parser.add_option("--skip_uesgs", type="int") 76 parser.add_option("--skip_uesgs", type="int")
75 parser.add_option("--skip_dgm", type="int") 77 parser.add_option("--skip_dgm", type="int")
78 parser.add_option("--skip_jetties", type="int")
76 (config, args) = parser.parse_args() 79 (config, args) = parser.parse_args()
77 80
78 if config.verbose > 1: 81 if config.verbose > 1:
79 initialize_logging(logging.DEBUG) 82 initialize_logging(logging.DEBUG)
80 elif config.verbose == 1: 83 elif config.verbose == 1:
119 elif config.skip_hws_points == 1 and isinstance(importer, HWSPoints) and \ 122 elif config.skip_hws_points == 1 and isinstance(importer, HWSPoints) and \
120 not isinstance(importer, HWSLines): 123 not isinstance(importer, HWSLines):
121 return True 124 return True
122 elif config.skip_gauge_locations == 1 and isinstance(importer, GaugeLocation): 125 elif config.skip_gauge_locations == 1 and isinstance(importer, GaugeLocation):
123 return True 126 return True
127 elif config.skip_jetties == 1 and isinstance(importer, Jetties):
128 return True
124 elif config.skip_kms == 1 and isinstance(importer, KM): 129 elif config.skip_kms == 1 and isinstance(importer, KM):
125 return True 130 return True
126 elif config.skip_uesgs == 1 and isinstance(importer, UESG): 131 elif config.skip_uesgs == 1 and isinstance(importer, UESG):
127 return True 132 return True
128 133

http://dive4elements.wald.intevation.org