omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
726 stars 159 forks source link

Relation table #11

Closed olehz closed 8 years ago

olehz commented 10 years ago

Is it possible to add the ability to save in a separate table relations (members IDs and roles)? This would give the opportunity to add addressing, which is stored in relation street/associatedStreet for example

benjamin-rty commented 10 years ago

Is it possible to give me an example of a json mapping file that contains relationinfo in any way? I'am not able to find out myself...

olehz commented 10 years ago

You don't understand. I suggest to add new functionality. It will be cool if imposm3 could save relations in table without geometry (like http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema#planet_osm_rels). For example:

"tables": {
    "test": {
        "fields": [
            {
                "type": "id",
                "name": "osm_id",
                "key": null
            },
            {
                "type": "members",
                "name": "members",
                "key": null
            },
            {
                "type": "string",
                "name": "type",
                "key": "type"
            },
            {
                "type": "string",
                "name": "name",
                "key": "name"
            }
        ],
        "type": "relation",
        "mapping": {
            "type": [
                "associatedStreet", "street"
            ]
        }
    }
}
benjamin-rty commented 10 years ago

You have absolutely right ! It would be a nice functionality.

When I use your mapping json as a template, I get the error: "mapping file: unknown type relation" Can I do something about it ?

olt commented 8 years ago

The new relation an relation_member types should solve this. See #81