[gdal-dev] ogr2ogr with OSM data error Too many tags in relation
Even Rouault
even.rouault at mines-paris.org
Thu May 15 11:06:59 PDT 2014
Le jeudi 15 mai 2014 16:29:52, G. Allegri a écrit :
> I'm trying to use the OGR OSM driver to convert an .osm file to sqlite
> (spatialite)
> Running:
>
> ogr2ogr -f SQlite myosm.sqlite myosm.osm -dsco SPATIALITE=YES
>
> I obtain:
>
> ERROR 1: Too many tags in relation 365331
> ERROR 1: Too many tags in relation 365331
> ERROR 1: Too many tags in relation 365331
> ERROR 1: Too many tags in relation 365331
> ERROR 1: Too many tags in relation 365331
> ERROR 1: Too many tags in relation 365331
> ERROR 1: Too many tags in relation 365331
>
> (yes, it's repeated)
> Relation 365331 is the italian administrative boundary (
> http://www.openstreetmap.org/relation/365331). It contains a lot of tags
> (mainly translations).
>
> Is there a limit to the number of relations OSM's driver can manage?
The error comes from the XML .osm parser in fact. I see it has not the logic
of the PBF parser to increase the hard-coded initial values. So the max is
256.
If you convert your .osm into a .pbf, I suspect you wouldn't have this error.
Otherwise if you compile from source you can increase the value at line 2246
of ogr/ogrsf_frmts/osm/osm_parser.cpp ( psCtxt->nTagsAllocated = 256; ).
But that error is not critical. The extra tags after the 256 first ones will
just be ignored.
Anyway it might be good if you can open a ticket about that issue.
> How to
> avoid loading all those name "subtags"?
>
> giovanni
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list