File: extra-attributes.feature

package info (click to toggle)
osm2pgsql 2.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,772 kB
  • sloc: cpp: 60,940; python: 1,115; ansic: 763; sh: 25; makefile: 14
file content (53 lines) | stat: -rw-r--r-- 1,973 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Feature: Tests for including extra attributes

    Scenario: Importing data without extra attributes
        Given the grid
            | 11 | 12 |
            | 10 |    |
        And the OSM data
            """
            w20 v1 dV c31 t2020-01-12T12:34:56Z i17 utest Thighway=primary Nn10,n11,n12
            """
        When running osm2pgsql pgsql with parameters
            | --slim | -j |

        Then table planet_osm_roads contains
            | osm_id | tags->'highway' | tags->'osm_version' | tags->'osm_changeset' |
            | 20     | primary         | NULL                | NULL                  |

        Given the grid
            |    |    |
            |    | 10 |
        When running osm2pgsql pgsql with parameters
            | --slim | -j | --append |

        Then table planet_osm_roads contains
            |  osm_id | tags->'highway' | tags->'osm_version' | tags->'osm_changeset' |
            |  20     | primary         | NULL                | NULL                  |


    Scenario: Importing data with extra attributes
        Given the grid
            | 11 | 12 |
            | 10 |    |
        And the OSM data
            """
            w20 v1 dV c31 t2020-01-12T12:34:56Z i17 utest Thighway=primary Nn10,n11,n12
            """
        When running osm2pgsql pgsql with parameters
            | --slim | -j | -x |

        Then table planet_osm_roads contains
            |  osm_id | tags->'highway' | tags->'osm_version' | tags->'osm_changeset' |
            |  20     | primary         | 1                   | 31                    |

        Given the grid
            |    |    |
            |    | 10 |
        When running osm2pgsql pgsql with parameters
            | --slim | -j | --append | -x |

        Then table planet_osm_roads contains
            |  osm_id | tags->'highway' | tags->'osm_version' | tags->'osm_changeset' |
            |  20     | primary         | 1                   | 31                    |