Code Duplication    Length = 89-89 lines in 3 locations

src/egon/data/orm/openstreetmap.py 3 locations

@@ 317-405 (lines=89) @@
314
    tags = Column(ARRAY(Text()))
315
316
317
class OsmRoad(Base):
318
    __tablename__ = "osm_roads"
319
    __table_args__ = {
320
        "schema": "openstreetmap",
321
    }
322
323
    osm_id = Column(BigInteger)
324
    access = Column(Text)
325
    addr_housename = Column("addr:housename", Text)
326
    addr_housenumber = Column("addr:housenumber", Text)
327
    addr_interpolation = Column("addr:interpolation", Text)
328
    admin_level = Column(Text)
329
    aerialway = Column(Text)
330
    aeroway = Column(Text)
331
    amenity = Column(Text)
332
    area = Column(Text)
333
    barrier = Column(Text)
334
    bicycle = Column(Text)
335
    brand = Column(Text)
336
    bridge = Column(Text)
337
    boundary = Column(Text)
338
    building = Column(Text)
339
    construction = Column(Text)
340
    covered = Column(Text)
341
    culvert = Column(Text)
342
    cutting = Column(Text)
343
    denomination = Column(Text)
344
    disused = Column(Text)
345
    embankment = Column(Text)
346
    foot = Column(Text)
347
    generator_source = Column("generator:source", Text)
348
    harbour = Column(Text)
349
    highway = Column(Text)
350
    historic = Column(Text)
351
    horse = Column(Text)
352
    intermittent = Column(Text)
353
    junction = Column(Text)
354
    landuse = Column(Text)
355
    layer = Column(Text)
356
    leisure = Column(Text)
357
    line = Column(Text)
358
    lock = Column(Text)
359
    man_made = Column(Text)
360
    military = Column(Text)
361
    motorcar = Column(Text)
362
    name = Column(Text)
363
    natural = Column(Text)
364
    office = Column(Text)
365
    oneway = Column(Text)
366
    operator = Column(Text)
367
    place = Column(Text)
368
    population = Column(Text)
369
    power = Column(Text)
370
    power_source = Column(Text)
371
    public_transport = Column(Text)
372
    railway = Column(Text)
373
    ref = Column(Text)
374
    religion = Column(Text)
375
    route = Column(Text)
376
    service = Column(Text)
377
    sidewalk = Column(Text)
378
    shop = Column(Text)
379
    sport = Column(Text)
380
    surface = Column(Text)
381
    toll = Column(Text)
382
    tourism = Column(Text)
383
    tower_type = Column("tower:type", Text)
384
    tracktype = Column(Text)
385
    tunnel = Column(Text)
386
    water = Column(Text)
387
    waterway = Column(Text)
388
    wetland = Column(Text)
389
    width = Column(Text)
390
    wood = Column(Text)
391
    z_order = Column(Integer)
392
    way_area = Column(Float)
393
    abandoned_aeroway = Column("abandoned:aeroway", Text)
394
    abandoned_amenity = Column("abandoned:amenity", Text)
395
    abandoned_building = Column("abandoned:building", Text)
396
    abandoned_landuse = Column("abandoned:landuse", Text)
397
    abandoned_power = Column("abandoned:power", Text)
398
    area_highway = Column("area:highway", Text)
399
    tags = Column(HSTORE(Text()), index=True)
400
    geom = Column(Geometry("LINESTRING", 3857), index=True)
401
    gid = Column(
402
        Integer,
403
        primary_key=True,
404
        server_default=text(
405
            "nextval('openstreetmap.osm_roads_gid_seq'::regclass)"
406
        ),
407
    )
408
@@ 210-298 (lines=89) @@
207
    )
208
209
210
class OsmPolygon(Base):
211
    __tablename__ = "osm_polygon"
212
    __table_args__ = {
213
        "schema": "openstreetmap",
214
    }
215
216
    osm_id = Column(BigInteger)
217
    access = Column(Text)
218
    addr_housename = Column("addr:housename", Text)
219
    addr_housenumber = Column("addr:housenumber", Text)
220
    addr_interpolation = Column("addr:interpolation", Text)
221
    admin_level = Column(Text)
222
    aerialway = Column(Text)
223
    aeroway = Column(Text)
224
    amenity = Column(Text)
225
    area = Column(Text)
226
    barrier = Column(Text)
227
    bicycle = Column(Text)
228
    brand = Column(Text)
229
    bridge = Column(Text)
230
    boundary = Column(Text)
231
    building = Column(Text)
232
    construction = Column(Text)
233
    covered = Column(Text)
234
    culvert = Column(Text)
235
    cutting = Column(Text)
236
    denomination = Column(Text)
237
    disused = Column(Text)
238
    embankment = Column(Text)
239
    foot = Column(Text)
240
    generator_source = Column("generator:source", Text)
241
    harbour = Column(Text)
242
    highway = Column(Text)
243
    historic = Column(Text)
244
    horse = Column(Text)
245
    intermittent = Column(Text)
246
    junction = Column(Text)
247
    landuse = Column(Text)
248
    layer = Column(Text)
249
    leisure = Column(Text)
250
    line = Column(Text)
251
    lock = Column(Text)
252
    man_made = Column(Text)
253
    military = Column(Text)
254
    motorcar = Column(Text)
255
    name = Column(Text)
256
    natural = Column(Text)
257
    office = Column(Text)
258
    oneway = Column(Text)
259
    operator = Column(Text)
260
    place = Column(Text)
261
    population = Column(Text)
262
    power = Column(Text)
263
    power_source = Column(Text)
264
    public_transport = Column(Text)
265
    railway = Column(Text)
266
    ref = Column(Text)
267
    religion = Column(Text)
268
    route = Column(Text)
269
    service = Column(Text)
270
    sidewalk = Column(Text)
271
    shop = Column(Text)
272
    sport = Column(Text)
273
    surface = Column(Text)
274
    toll = Column(Text)
275
    tourism = Column(Text)
276
    tower_type = Column("tower:type", Text)
277
    tracktype = Column(Text)
278
    tunnel = Column(Text)
279
    water = Column(Text)
280
    waterway = Column(Text)
281
    wetland = Column(Text)
282
    width = Column(Text)
283
    wood = Column(Text)
284
    z_order = Column(Integer)
285
    way_area = Column(Float)
286
    abandoned_aeroway = Column("abandoned:aeroway", Text)
287
    abandoned_amenity = Column("abandoned:amenity", Text)
288
    abandoned_building = Column("abandoned:building", Text)
289
    abandoned_landuse = Column("abandoned:landuse", Text)
290
    abandoned_power = Column("abandoned:power", Text)
291
    area_highway = Column("area:highway", Text)
292
    tags = Column(HSTORE(Text()), index=True)
293
    geom = Column(Geometry(srid=3857), index=True)
294
    gid = Column(
295
        Integer,
296
        primary_key=True,
297
        server_default=text(
298
            "nextval('openstreetmap.osm_polygon_gid_seq'::regclass)"
299
        ),
300
    )
301
@@ 19-107 (lines=89) @@
16
metadata = Base.metadata
17
18
19
class OsmLine(Base):
20
    __tablename__ = "osm_line"
21
    __table_args__ = {
22
        "schema": "openstreetmap",
23
    }
24
25
    osm_id = Column(BigInteger)
26
    access = Column(Text)
27
    addr_housename = Column("addr:housename", Text)
28
    addr_housenumber = Column("addr:housenumber", Text)
29
    addr_interpolation = Column("addr:interpolation", Text)
30
    admin_level = Column(Text)
31
    aerialway = Column(Text)
32
    aeroway = Column(Text)
33
    amenity = Column(Text)
34
    area = Column(Text)
35
    barrier = Column(Text)
36
    bicycle = Column(Text)
37
    brand = Column(Text)
38
    bridge = Column(Text)
39
    boundary = Column(Text)
40
    building = Column(Text)
41
    construction = Column(Text)
42
    covered = Column(Text)
43
    culvert = Column(Text)
44
    cutting = Column(Text)
45
    denomination = Column(Text)
46
    disused = Column(Text)
47
    embankment = Column(Text)
48
    foot = Column(Text)
49
    generator_source = Column("generator:source", Text)
50
    harbour = Column(Text)
51
    highway = Column(Text)
52
    historic = Column(Text)
53
    horse = Column(Text)
54
    intermittent = Column(Text)
55
    junction = Column(Text)
56
    landuse = Column(Text)
57
    layer = Column(Text)
58
    leisure = Column(Text)
59
    line = Column(Text)
60
    lock = Column(Text)
61
    man_made = Column(Text)
62
    military = Column(Text)
63
    motorcar = Column(Text)
64
    name = Column(Text)
65
    natural = Column(Text)
66
    office = Column(Text)
67
    oneway = Column(Text)
68
    operator = Column(Text)
69
    place = Column(Text)
70
    population = Column(Text)
71
    power = Column(Text)
72
    power_source = Column(Text)
73
    public_transport = Column(Text)
74
    railway = Column(Text)
75
    ref = Column(Text)
76
    religion = Column(Text)
77
    route = Column(Text)
78
    service = Column(Text)
79
    sidewalk = Column(Text)
80
    shop = Column(Text)
81
    sport = Column(Text)
82
    surface = Column(Text)
83
    toll = Column(Text)
84
    tourism = Column(Text)
85
    tower_type = Column("tower:type", Text)
86
    tracktype = Column(Text)
87
    tunnel = Column(Text)
88
    water = Column(Text)
89
    waterway = Column(Text)
90
    wetland = Column(Text)
91
    width = Column(Text)
92
    wood = Column(Text)
93
    z_order = Column(Integer)
94
    way_area = Column(Float)
95
    abandoned_aeroway = Column("abandoned:aeroway", Text)
96
    abandoned_amenity = Column("abandoned:amenity", Text)
97
    abandoned_building = Column("abandoned:building", Text)
98
    abandoned_landuse = Column("abandoned:landuse", Text)
99
    abandoned_power = Column("abandoned:power", Text)
100
    area_highway = Column("area:highway", Text)
101
    tags = Column(HSTORE(Text()), index=True)
102
    geom = Column(Geometry("LINESTRING", 3857), index=True)
103
    gid = Column(
104
        Integer,
105
        primary_key=True,
106
        server_default=text(
107
            "nextval('openstreetmap.osm_line_gid_seq'::regclass)"
108
        ),
109
    )
110