omniscale/imposm3

Need Mapping.json for all tables, all columns, without filtering

danilshik opened this issue · 3 comments

Is there a mapping.json that would contain all objects with all tags at once (probably with the exception of custom ones)?

I want to first see how it will look, and then systematically exclude unnecessary objects for import.

Now I need to list
everything from here https://wiki.openstreetmap.org/wiki/Map_Features

imho:

check the __any__ : __any__ filtering in the doc

            "mapping": {
                "__any__": ["__any__"]

example:

or you can use with a specific key

  • highway: [__any__]
  • "amenity": ["__any__"]

on the other hand - you can download the Taginfo database (sqlite3) - if you need quick - planet info for tuning imposm3 mapping

for community support / best practices - the recommended mailing list is better:

I followed the example that you suggested to me on the link. Only points are imported in it.
I tried to import both lines, polygons, and relation, but I can't

{
    "tags": {
        "load_all": true,
        "exclude": [
            "created_by",
            "source"
        ]
    },
    "tables": {
        "point": {
            "columns": [
                {
                    "type": "id",
                    "name": "osm_id"
                },
                {
                    "type": "geometry",
                    "name": "geometry"
                },
                {
                    "type": "hstore_tags",
                    "name": "tags"
                }
 
            ],
            "type": "point",
            "mapping": {
                "__any__": ["__any__"]
            }
        },
        "line" : {
            "columns": [
                {
                    "type": "id",
                    "name": "osm_id"
                },
                {
                    "type": "geometry",
                    "name": "geometry"
                },
                {
                    "type": "hstore_tags",
                    "name": "tags"
                }
 
            ],
            "type": "linestring",
            "mapping": {
                "__any__": ["__any__"]
            }
        },
        "polygon": {
            "columns": [
                {
                    "type": "id",
                    "name": "osm_id"
                },
                {
                    "type": "geometry",
                    "name": "geometry"
                },
                {
                    "type": "hstore_tags",
                    "name": "tags"
                }
 
            ],
            "type": "polygon",
            "mapping": {
                "__any__": ["__any__"]
            }
        },
        "relation": {
            "columns": [
                {
                    "type": "id",
                    "name": "osm_id"
                },
                {
                    "type": "geometry",
                    "name": "geometry"
                },
                {
                    "type": "hstore_tags",
                    "name": "tags"
                }
 
            ],
            "type": "relation",
            "mapping": {
                "__any__": ["__any__"]
            }
        },
        "relation_member": {
            "columns": [
                {
                    "type": "id",
                    "name": "osm_id"
                },
                {
                    "type": "geometry",
                    "name": "geometry"
                },
                {
                    "type": "hstore_tags",
                    "name": "tags"
                }
 
            ],
            "type": "relation_member",
            "mapping": {
                "__any__": ["__any__"]
            }
        }
 
 
    }
}

Returns this error

SQL Error: pq: Invalid type name "RELATION(2)" - valid ones are: POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE, CURVEPOLYGON, MULTISURFACE, GEOMETRY, GEOMETRYCOLLECTION, POINTM, MULTIPOINTM, LINESTRINGM, MULTILINESTRINGM, POLYGONM, MULTIPOLYGONM, CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM CURVEPOLYGONM, MULTISURFACEM, TRIANGLE, TRIANGLEM, POLYHEDRALSURFACE, POLYHEDRALSURFACEM, TIN, TINM or GEOMETRYCOLLECTIONM in query SELECT AddGeometryColumn('import', 'osm_relation', 'geometry', '3857', 'RELATION', 2);

What should I correct to get a Relation?
Thanks

I followed the example that you suggested to me on the link. Only points are imported in it.

there are other examples you can adapt:

or just use this mapping: