[OSM-dev] bounding box

Thomas Wood grand.edgemaster at gmail.com
Fri May 8 17:23:50 BST 2009


2009/5/8 Sam Mor <sam_mor at y7mail.com>:
> Hi great Guys,
> maybe we misput our question. we need to show the world map , then we can
> zoom in,zoom in, zoom in..  to Russia...
> so are those the steps???
>  1.we need to download russian_federation.osm.bz2 ( downloaded from
> cloudmade)

Then import it using osm2pgsql.

>  2.then what ot change in generate_tiles.py file????
>
> # Change the following for different bounding boxes and zoom levels
>     #
>     # Start with an overview
>     # World
>     bbox = (-180.0,-90.0, 180.0,90.0)
>
>     render_tiles(bbox, mapfile, tile_dir, 0, 16, "World")
>
>     #minZoom = 10
>     #maxZoom = 16
>     #bbox = (-2, 50.0,1.0,52.0)
>     #render_tiles(bbox, mapfile, tile_dir, minZoom, maxZoom)
>
>     # Muenchen
>     #bbox = (11.4,48..07, 11.7,48.22)
>     #render_tiles(bbox, mapfile, tile_dir, 1, 12 , "Muenchen")
>
> how do we grab the bounding box for Russia , and how can we use it??

I've just created a wiki article to describe what a bounding box is,
essentially its a set of 4 coordinates, which describe the edges of a
box. You can get the figures by using the 'Export' tab on the main
website, clicking on "Manually select a different area" and drawing
the box on the map. Then use the figures given in this order:
left,bottom,right,top

The other numbers you may wish to change are those before the
description (eg: 1, 12, "Muenchen"), these are the zoom levels at
which the tiles will be generated.

http://wiki.openstreetmap.org/wiki/Bounding_Box

-- 
Regards,
Thomas Wood
(Edgemaster)




More information about the dev mailing list