Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brunosalerno/tags2nodes
An OSM tool for attaching relation tags to the member nodes
https://github.com/brunosalerno/tags2nodes
Last synced: 1 day ago
JSON representation
An OSM tool for attaching relation tags to the member nodes
- Host: GitHub
- URL: https://github.com/brunosalerno/tags2nodes
- Owner: BrunoSalerno
- License: mit
- Created: 2014-12-20T00:34:09.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-28T01:18:22.000Z (over 9 years ago)
- Last Synced: 2024-10-12T23:07:02.244Z (about 1 month ago)
- Language: JavaScript
- Size: 195 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tags2nodes
==========An OSM tool for attaching relation tags to the member nodes.
You have to specify the osm input file, the relation you want to filter, the postgres user and db data and the program
creates a table to store the ouput nodes with 5 columns: id, tags, lat, lon and geometry.In the column tags (json stringified by default) you can find, besides the node tags, something like this:
```
relations : {relationid1:{name:'relation1 name', id:'relation1 id',...},
relationid2:{name:'relation2 name', id:'relation2 id',...}}
```... all the relations that have the node as member, and their tags!
Install
-------```
sudo npm install -g tags2nodes
```
or git clone this repository.Usage
-----```
tags2nodes [arguments]
```Arguments
-------```
-f input osm.pbf file.
-u postgres user.
-p postgres password.
-h postgres host.
-d postgres db name.
-c osm relation condition json (without quotes!). I.e.: {route:subway}.
-r [optional] role of members of relation to be filtered. I.e.: stop.
Default: all roles.
-e [optional] condition that allows to fetch also nodes outside relations.
I.e: {station:subway}.
-t [optional] postgres output table name. Default: tags2nodes.
-j [optional] output projection. Default: WGS84 (4326).
--json [optional] json format for tags field. Only valid for Postgres >= 9.3.
Default: text
--jsonb [optional] jsonb format for tags field (faster!). Only valid for
Postgres >= 9.4. Default: text.
--help this help.
```
License
-------MIT.