[Qgis-user] OSM import looses a lot of data when creating Spatialite tables
Andre Joost
andre+joost at nurfuerspam.de
Fri May 16 10:55:37 PDT 2014
Just for the record:
osm2pgsql creates from toscana.osm:
184189 points
241755 lines from ways
8420 lines from route relations
309712 polygons from closed ways and multipolygon relations
Using ogr2ogr to export the .osm into a sqlite database, I get
184141 points
243147 lines from ways
1476 multilinestrings from route relations
307208 polygons
The Openstreetmap Import of QGIS creates
235106 points
221335 polylines
291834 polygons
Note that osm2pgsql does not create multilinestrings, but a bunch of
simple lines for every route relations. So you can not directly compare
those two figures. Route relation objects are not created in QGIS.
I'm not sure what the GDAL people did better with their OSM driver. I
suggest to put both together.
Greetings,
André Joost
Am 15.05.2014 23:06, schrieb G. Allegri:
> Mmm, I wasn't aware of such numbers. Anyway, a lot of ways are linestrings,
> not polygons. Imposm import the correctly. I haven't trie
> spatialite_osm_map and ogr2ogr yet, but I can't understand why simple
> linestrings happen to get dropped during this phase...
>
> giovanni
>
>
> 2014-05-15 22:47 GMT+02:00 Andre Joost<andre+joost at nurfuerspam.de>:
>
>> Am 15.05.2014 16:56, schrieb G. Allegri:
>>
>>
>>
>>> Here are the counts on the tables generated by QGIS' OSM utilities:
>>>
>>> SELECT count(*) FROM ways
>>> union
>>> SELECT count(*) FROM toscana_osm_polylines
>>>
>>> count
>>> ----------
>>> 221335
>>> 568129
>>>
>>> More then a half ways are not translated.
>>>
>>
>> No, its not that bad.
>>
>> From 568129 ways, osm2pgsql detects 318028 ways are pending, and builds
>> 309712 polygons from it.
>> Remaing are 250175 objects in planet_line.
>>
>> Still some missing in the spatialite table, but not so much ;-)
>>
>> Greetings,
>> André Joost
>>
More information about the Qgis-user
mailing list