Guest User

Untitled

a guest
Oct 20th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. import re
  4. from imposm.mapping import (
  5. Options,
  6. Points, LineStrings, Polygons, PolygonTable,
  7. String, Bool, Integer, OneOfInt,
  8. set_default_name_type, LocalizedName,
  9. WayZOrder, ZOrder, Direction,
  10. GeneralizedTable, UnionView,
  11. PseudoArea, meter_to_mapunit, sqr_meter_to_mapunit,
  12. DropElem
  13. )
  14.  
  15. from imposm.db import postgis
  16.  
  17. import imposm.config
  18. imposm.config.import_partial_relations = True
  19. imposm.config.relation_builder = 'contains'
  20.  
  21. db_conf = Options(
  22. # db='osm',
  23. host='localhost',
  24. port=5432,
  25. user='osm',
  26. password='osm',
  27. sslmode='allow',
  28. prefix='osm_new_',
  29. proj='epsg:900913',
  30. )
  31.  
  32. class Highway(LineStrings):
  33. fields = (
  34. ('highway', String()),
  35. ('layer', Integer()),
  36. ('z_order', WayZOrder()),
  37. ('access', String()),
  38. ('bicycle', String()),
  39. ('footway', String()),
  40. )
  41. field_filter = (
  42. ('area', Bool()),
  43. ('tunnel', Bool()),
  44. ('bridge', Bool()),
  45. )
  46.  
  47. pedestrian_and_bicycle = Highway(
  48. name = 'pedestrian_and_bicycle',
  49. mapping = {
  50. 'highway': (
  51. 'cycleway',
  52. 'path',
  53. 'pedestrian',
  54. 'footway',
  55. 'bridleway',
  56. ),
  57. 'bicycle': (
  58. 'yes',
  59. 'designated'
  60. )
  61. }
  62. )
Add Comment
Please, Sign In to add comment