grote / osm2gtfs

Turn OpenStreetMap data and schedule information into GTFS
GNU General Public License v3.0
98 stars 31 forks source link

Support multiple values for the same OSM tag #123

Closed ialokim closed 6 years ago

ialokim commented 6 years ago

I've elaborated this little code change to support a config.json file as follows:

{
    "query": {
        "tags": {
            "public_transport:version": "2",
            "operator":  [
                "Incofer",
                "Alpizar S.A."
            ]
        }
    }
}

This generated the following Overpass query:

relation
  (9.8346,-84.2418,10.0365,-83.8507)
  ["public_transport:version" = "2"]
  ["operator" ~ "Incofer|Alpizar S.A."];
(._;);
out body;

Fixes #110

pantierra commented 6 years ago

Looks good to me, but haven't run the code myself. Have you tried it with special characters, like Estelí?

ialokim commented 6 years ago

Have you tried it with special characters, like Estelí?

It should work as before, the unicode handling isn't changed by this PR. So yes, special characters should be supported as before.