[OSM-dev] how to setup api/xapi server?

Ian Dees ian.dees at gmail.com
Thu Jan 13 00:56:37 GMT 2011


On Wed, Jan 12, 2011 at 6:12 PM, Mateusz L <mateuszzz88 at tlen.pl> wrote:

>
> Ian Dees wrote:
>
> > (...)
> > Once this is finished, you should have a database that allows you to
> > recreate the OSM XML data for bounding boxes of any size. Keep in mind
> > that using an entire planet with this method will require 360GB or so and
> > take a few days to import (depending on your disk speed).
> >
>
> Hi, thanks for your answer.
> I did as you advised and now I have database of my country (checked by
> $psql
> osm   and select * from nodes limit 10; ). Now I need sth to serve the data
> over network. Are there any tools avilable, preferably cgi-scripts?
> If not, I can code sth tailor-made, BUT I have one problem with osmosis:
> I understand that to read the data from a bounding box i run command:
>
> $bin/osmosis \
> --read-pgsql host="localhost" database="osm" user="osmuser" password="osm"
> \
> --bounding-box top=49.5138 left=10.9351 bottom=49.3866 right=11.201 \
> --write-xml file="-"
>
> or even simpler
> $bin/osmosis --read-pgsql host="localhost" database="osm" user="osmuser"
> password="osm" --write-xml file="test.osm"


You need to use the --dataset-bounding-box argument to grab data out of the
database.

http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#--dataset-bounding-box_.28--dbb.29

<http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#--dataset-bounding-box_.28--dbb.29>If
you only want to expose bounding box queries I can clean up the code a bit
and release a bounding-box only Java servlet if you're interested.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110112/5929b7af/attachment-0001.html>


More information about the dev mailing list