[OSM-talk] mkgmap questions

Karl Newman siliconfiend at gmail.com
Thu Aug 28 00:41:33 BST 2008


On Wed, Aug 27, 2008 at 3:48 PM, <simon at mungewell.org> wrote:

>
> >
> > What version of Osmosis are you using, because I added that feature
> > (writing
> > of the bound element) a while ago, so it should work if your input file
> > has
> > a bound element.
> >
>
> Hi Karl,
> I am use 'osmosis-latest'/version 0.29 downloaded yesterday.
>
> The problem may be that the source data files do not contain the bound
> element itself, and therefore it might not be transfer to the output.
>
> Source data is made with mkcntr2.pl (for contours) and OSM data requested
> via XAPI with:
> wget -O crowsnest.osm
> http://www.informationfreeway.org/api/0.5/*[bbox=-115,49,-114,50]<http://www.informationfreeway.org/api/0.5/*%5Bbbox=-115,49,-114,50%5D>
>
> Head of 'crowsnest.osm' is
> --
> <?xml version='1.0' standalone='no'?>
> <osm version='0.5' generator='osmxapi: OSM Extended API'
> xmlns:osmxapi='http://www.informationfreeway.org
> /osmxapi/0.5'
> osmxapi:uri='/api/0.5/*%5bbbox=-115,49,-114,50%5d'
> osmxapi:planetDate='200808262236' osmxapi:copyright='2008 OpenStreetMap
> contributors' osmxapi:instance='zappy2'>
>  <node id='26655039' lat='49.0000002' lon='-110.0000001' user='srw777'
> osmxapi:users='srw777' timestamp='2007-03-20T22:11:53Z'>
>  </node>
> --
>
>
> I am using osmosis to merge the OSM source with contours (after sorting
> both) with the command
> --
> java -jar osmosis.jar --read-xml temp1.osm --read-xml temp2.osm --merge \
>        --bb completeWays=yes top=50 bottom=49 left=-115 right=-114 \
>        --write-xml temp.osm
> --
>
> Head of 'temp.osm' is
> --
> <?xml version='1.0' encoding='UTF-8'?>
> <osm version="0.5" generator="Osmosis 0.29">
>  <node id="27611078" timestamp="2007-04-25T03:42:36Z" user="NytOwl"
> lat="50.0015304" lon="-114.917867"/>
> --
>
> Hopefully it's something simple going wrong.
> Simon
>

You're right. It's because the source files don't have bounds. If you have
only a couple files, you could insert a dummy bound element before the first
node. It should work as long as it includes the area that you're cropping
with --bb. You could just make it span the entire planet, like <bound
box="-90,-180,90,180" origin="osmxapi"/> and then Osmosis will cut it down
to your bounding box.

Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20080827/2f6761b6/attachment.html>


More information about the talk mailing list