[OSM-dev] {To Brett} Re: OSM Data Question from FireGirl

Jason Reid osm at bowvalleytechnologies.com
Wed Feb 13 05:13:05 GMT 2008


Fire Girl wrote:
>
>
>     Firstly you need to figure out what you want to do with the data :-)
>     That will help limit your options. You'll need to determine things
>     like:
>     1. How many different areas do you need?
>     2. How large are the areas that you need?
>     3. How up-to-date does the data need to be?
>
>     If you're pulling out many different areas at regular intervals then
>     something like osmosis will give you a lot of flexibility. If you need
>     a specific area that isn't *too* large, osmxapi will be the simplest.
>     If up-to-date data isn't critical then a pre-generated extract may be
>     more appropriate.
>
>     In general, large amounts of data are best served by osmosis. With
>     osmosis you can slice and dice to your hearts content without
>     consuming
>     server resources (other than the initial planet download). Very small
>     areas may be served by the standard osm api but try to limit your
>     usage
>     of this. Somewhere in between lies osmxapi which will handle larger
>     areas than the main API, but probably not ideal for downloading whole
>     countries.
>
>     The main API will provide the most up-to-date data, osmxapi will be
>     within 10 minutes, and osmosis just works with whatever files (ie.
>     planet file) and changesets (ie. daily/hourly/minute) you choose to
>     download but can also be within 10 minutes with a bit of effort.
>
>     If you're just trying to get used to OSM and don't know what you need
>     yet, I'd suggest downloading one of the extracts suggested by Milenko
>     (http://planet.king-nerd.com/usa/) and playing with it. When you get
>     something working using that data then you can figure out how to get
>     your updates to that data.
>
>
>
>
> Ah thank you Brett... I think this is leading me down the right path. 
> :) Basically, yes, I am looking for a Pre-Generated extract and just 
> plan to use the OSM data for in-house rendering (don't need to serve 
> it up). So given that fact, it sounds like osmxapi - is the way to go 
> to get to specific tailored OSM data files?  I am a Windows girl, but 
> can setup Linux with some effort ... but maybe you know a way to do 
> this in Windows.  I've got a pretty souped up box and that would be 
> ideal for me.
>
> One thing I noticed is these OSM files, ..... even State files are 
> very huge.  They sit in a compressed BZ2 format like at 50MB for a 
> state... but once you fluff it up, it grows to over 1GB for just one 
> single State. ........ Can the data within these compressed files be 
> extracted for what is needed without fully un-compressing it.... or 
> *must* you un-compress it.  I guess that is a stupid question perhaps, 
> but just checking.
>
> finally... what is on my mind is, let's say I need to get to just a 
> very small geographic region, a Neighborhood within a City within a 
> State for example.  To extract the OSM file for a City, I need BBOX 
> coordinates, correct?  If that is the case, what is my best bet for 
> getting to the BBOX (I hope I am using the correct nomenclature), to 
> finagle the SOME_CITY_DATA.OSM file (for instance) from a 
> SOME_STATE_DATA.OSM file?  Using osmxapi first against the STATE OSM 
> file that contains the CITY i am interested in? :)
>
> Am I on the right track in my thinking here?
>
> **** Summary *****
>
> LOGIC: >> STATE OSM FILE (1GB) > COULD POTENTIALLY EXTRACT INTO 100'S 
> OF CITY OSM FILES USING OSMXAPI
>
> QUESTION: IS OSMXAPI THE FASTEST WAY TO JUST GET FIXED DATA FOR 
> IN-HOSUE RENDERING, NON-SERVER USE?
>
> ALSO: IS THERE A WINDOWS PATH TO GETTING TO THIS LIMITED DATA?
>
> AND FINALLY: HOW TO NAVIGATE RELIABLE BBOX COORDINATES, I presume to 
> feed into OSMXAPI to get to smaller Sub-Set data files for Cities or 
> smaller areas :)
>
> Have a very nice evening.
> Best wishes, FireGirl.
>
Osmosis can extract from compressed files (see the wiki page for 
examples that show how). It's written in java so it can be run on 
windows without much problem so far as I know.

The format of a polygon file is simply points on the map, theres a tool 
in the svn at 
http://svn.openstreetmap.org/applications/utils/osm-extract/polygons/osm2poly.pl 
that can take a osm file and return a polygon based on the ways within 
it. So you could use JOSM with the wms (and ywms if needed) plugins to 
view the aerial imagery for an area and draw the polygons that you want 
in JOSM as ways, then use the script to convert it to a polygon for use 
in osmosis.

-Jason Reid




More information about the dev mailing list