[OSM-dev] XAPI and other solutions
yvecai
yvecai at gmail.com
Tue Apr 26 21:36:15 BST 2011
On 26. 04. 11 22:02, Pierre-Alain Dorange wrote:
> Pierre-Alain Dorange<pdorange at mac.com> wrote:
>
>>>> ./osmosis --rb "france.osm.pbf" -tf accept-nodes "place=*" --wx
>>>> fr_places.osm
>>> You're missing the second "-" before "tf", making Osmosis think that
>>> "-tf" was a second argument to "--rb".
>> Oh my god, shame on me.
>> Thanks.
>
> I finally build my proto and it works fine, but i'm disappointed : it's
> slow...
>
> curl "http://download.geofabrik.de/osm/europe/france.osm.pbf" \
> -o "./temp/france.osm.pbf"
> osmosis --rb "./temp/france.osm.pbf" \
> --tf accept-nodes "man_made=surveillance" --tf reject-ways \
> --tf reject-relations --wx "./temp/frn.xml"
> osmosis --rb "./temp/france.osm.pbf" \
> --tf accept-ways "man_made=surveillance" --tf reject-relations\
> --used-node --wx "./temp/frw.xml"
> osmosis --rb "./temp/france.osm.pbf" \
> --tf accept-relations "man_made=surveillance" --used-way\
> --used-node --wx "./temp/frr.xml"
> osmosis --rx "./temp/frn.xml" --rx "./temp/frw.xml" \
> --rx "./temp/frr.xml" --merge --merge \
> --wx "./data/fr_surveillance.xml"
>
> 75 minutes to download 1.2 GB of data (France)
> 60 minutes to filter and merge "man_made=surveillance" for nodes, ways
> and relations...
>
> Previously it requires only 10 minutes via XAPI (when server were up).
> But XAPI is no more a solution (see above
Nice explanation Igor, thanks, I'm testing it too!
Pierre Alain,
Yes, it is slow compared to Xapi, because Xapi is querying an database
while with this method you need to parse a file 3 times to get your result.
You could try to download france.osm.gz (or convert your pbf) and filter
it with Osmfilter. I'm pretty sure it is faster.
Yves
More information about the dev
mailing list