OpenStreetMap

Isolar as farmácias...

Posted by Jorge Gustavo Rocha on 31 March 2011 in Portuguese (Português)

1) Usando a XAPI, a coisa demora um pouco a responder.

curl -g "http://jxapi.openstreetmap.org/xapi/api/0.6/*[amenity=pharmacy][bbox=-9.2,39.68,-6.2,42.19]" -o farmacias.osm

2) Isolar as farmácias a partir de um dump no formato osm

Para "isolar" as farmácias já registadas, sem despejar o dump portugal.osm no Postgresql, pode-se usar o osmosis.

sudo apt-get install osmosis

osmosis --read-xml portugal.osm --tf accept-nodes amenity=pharmacy --tf reject-ways --tf reject-relations --write-xml farmacias.osm

ou ainda

osmosis --read-xml portugal.osm --tf accept-nodes amenity=pharmacy --tf accept-ways amenity=pharmacy --tf reject-relations --write-xml farmacias.osm

Login to leave a comment