<div dir="ltr">Solved the mistery :)<div>Osgeo4W's GDAL seems to not have splite, so the output SQLite db wasn't a spatialite db.</div><div><br></div><div>giovanni</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-05-16 10:12 GMT+02:00 G. Allegri <span dir="ltr"><<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Even, thanks.<div>A new run ended with the mentioned errors and a warning about a bad polygon. </div><div>I thought it was a bad sqlite because QGIS couldn't load it, but ogrinfo and ogr2ogr work well with it (I could convert to shapefiles).</div>

<div><br></div><div>giovanni</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-15 20:06 GMT+02:00 Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span>:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le jeudi 15 mai 2014 16:29:52, G. Allegri a écrit :<br>
<div>> I'm trying to use the OGR OSM driver to convert an .osm file to sqlite<br>
> (spatialite)<br>
> Running:<br>
><br>
> ogr2ogr -f SQlite myosm.sqlite myosm.osm -dsco SPATIALITE=YES<br>
><br>
> I obtain:<br>
><br>
> ERROR 1: Too many tags in relation 365331<br>
> ERROR 1: Too many tags in relation 365331<br>
> ERROR 1: Too many tags in relation 365331<br>
> ERROR 1: Too many tags in relation 365331<br>
> ERROR 1: Too many tags in relation 365331<br>
> ERROR 1: Too many tags in relation 365331<br>
> ERROR 1: Too many tags in relation 365331<br>
><br>
> (yes, it's repeated)<br>
> Relation 365331 is the italian administrative boundary (<br>
> <a href="http://www.openstreetmap.org/relation/365331" target="_blank">http://www.openstreetmap.org/relation/365331</a>). It contains a lot of tags<br>
> (mainly translations).<br>
><br>
> Is there a limit to the number of relations OSM's driver can manage?<br>
<br>
</div>The error comes from the XML .osm parser in fact. I see it has not the logic<br>
of the PBF parser to increase the hard-coded initial values. So the max is<br>
256.<br>
If you convert your .osm into a .pbf, I suspect you wouldn't have this error.<br>
Otherwise if you compile from source you can increase the value at line 2246<br>
of ogr/ogrsf_frmts/osm/osm_parser.cpp ( psCtxt->nTagsAllocated = 256; ).<br>
But that error is not critical. The extra tags after the 256 first ones will<br>
just be ignored.<br>
Anyway it might be good if you can open a ticket about that issue.<br>
<div><br>
> How to<br>
> avoid loading all those name "subtags"?<br>
><br>
> giovanni<br>
<br>
--<br>
</div>Geospatial professional services<br>
<a href="http://even.rouault.free.fr/services.html" target="_blank">http://even.rouault.free.fr/services.html</a><br>
</blockquote></div></div></div><br><br clear="all"><div class=""><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>
Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div>
<div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div>
<div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div>