[OSM-dev] {To All} Re: OSM Data Question from FireGirl
Brett Henderson
brett at bretth.com
Wed Feb 13 05:24:00 GMT 2008
Possibly best to keep this to the list because I'm about to head off for
three weeks and won't be checking email :-)
Fire Girl wrote:
> 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.
Osmosis is written in java so it will run on windows without too much
trouble (you will need java installed of course). The biggest issue is
that it has a bash launch script, and I've never written an equivalent
batch file in windows. You'll need to run it with a java -cp
osmosis.jar ... type command line (the full command is inside the
bin/osmosis shell script) instead of just calling the osmosis launch
script under linux.
Your other options (such as osmxapi) are all web based so you'll have no
windows issues there.
If you choose to use any of the OSM tools for rendering you may be best
served by linux though, many tools will run on windows but linux
provides the smoothest sailing and is what most people use.
>
> 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.
Almost all OSM tools will work with compressed files. Osmosis will work
natively with compressed files although its bz2 support is very slow (gz
is quite fast though ...). You are better piping from a bzip2 command
line app into osmosis although this won't work on windows with the
current release (You need to use a command line like "osmosis --read-xml
file=/dev/stdin ..." and /dev/stdin only works on unix/linux). Just try
osmosis, if it's too slow try piping, if you can't pipe you'll have to
deal with the disk space problem.
>
> 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? :)
I usually open the JOSM editor and use it's inbuilt world map to figure
out the boxes ... but this isn't ideal if you need accuracy. You should
be able to use Google Earth or something similar to give you the
coordinates. They're just simple latitude/longitude coordinates in degrees.
>
> 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
Ah, no not quite. If you call osmxapi it will return data from its own
database, it's a web-based app after all. Osmosis is a local
application working on your own data files. If you use osmxapi you
don't need to download a planet (or state) file at all.
>
> QUESTION: IS OSMXAPI THE FASTEST WAY TO JUST GET FIXED DATA FOR
> IN-HOSUE RENDERING, NON-SERVER USE?
Probably. If the size of the bounding box isn't too large osmxapi is
great. If you want a large area or many areas, then switch to osmosis.
>
> ALSO: IS THERE A WINDOWS PATH TO GETTING TO THIS LIMITED DATA?
osmxapi is a web interface so no issue there, osmosis is java based so
should also work without too many problems.
>
> 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 :)
Google Earth is probably the simplest, possibly Google Maps.
>
> Have a very nice evening.
> Best wishes, FireGirl.
>
Cheers,
Brett
More information about the dev
mailing list