[osmosis-dev] new areas to points converter plugin

2011-05-22 Thread Christoph Wagner
Hello list,

Inspired by the mkgmap option add-pois-to-areas I have written a new small 
plugin for osmosis called AreaPoints.
You can find it in svn[1] now.

It will add points in the output for every closed way it finds.
The additional point will have the same tags as the way had.
It's position is the center of the bounding box of the way (maybe somebody has 
a better idea).

You will find some more details in the README or in the source itself ;)

I have not tested its performance on big datafiles.

I hope that someone else finds it usefull, too.

Best regards,
Christoph

[1] http://svn.openstreetmap.org/applications/utils/osmosis/plugins/areapoints/



signature.asc
Description: OpenPGP digital signature
___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


Re: [osmosis-dev] question about --merge

2010-05-18 Thread Christoph Wagner
Am 18.05.2010 15:18, schrieb Brett Henderson:

 To summarise, if you can draw a graph of the data flows in Osmosis, ensure
 that you never have data being split then recombined at a later point.
 
 In your case the only option is to split it into two steps using temporary
 XML files as you already appear to be doing.
 
 It would be nice if Osmosis could detect this situation and throw an error,
 but it would take a lot of effort and add a lot of complexity that I don't
 really wish to attempt.



Ok, thanks for your reply. I think now I understand the situation better.

While reading your answer I got an idea to solve the problem without writing to 
disk.

I use a very big buffer now:

osmosis-0.35.1/bin/osmosis --rx input.osm --t outPipe.1=points \
--wk keyList=addr:interpolation,addr:housenumber --un --s --b 1 \
--nk inPipe.0=points keyList=addr:housenumber --s --b 1 \
--m --wx addr.osm

This works very well if you have enough RAM and set the bufferCapacity high 
enough.


Another possibility would be a better tagfilter that allows me to filter POIs 
and ways at once.
The task would be for example: Give me all ways that match this way-filter and 
all nodes that match this node-filter or are part of the way that matches the 
way-filter

I don't know if this is difficult to implement but I think this would be 
usefull.

Thanks
Christoph



signature.asc
Description: OpenPGP digital signature
___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


[osmosis-dev] question about --merge

2010-05-17 Thread Christoph Wagner
Hello list,

I am new to this dev-list. My name is Christoph Wagner and I maintain the 
Garmin All in one Map:
http://wiki.openstreetmap.org/wiki/All_in_one_Garmin_Map

I want to reduce some server load (I omit details here) and tried to filter 
OSM-Data with osmosis.

For example I have the problem to filter out all kind of adresses in an 
osm-file.
My first guess was that:

osmosis-0.35.1/bin/osmosis --rx input.osm --t outPipe.1=points \
--wk keyList=addr:interpolation,addr:housenumber --un --s \
--nk inPipe.0=points keyList=addr:housenumber --s \
--m --wx addr.osm

The Problem is, that osmosis never finishes. I wonder why.
No error, no writing, no CPU-usage - it just waits and does nothing.
There must be something wrong with the --m I guess, but I don't know what.

This one here does what I want, but needs to write out and read in again xml 
files for that:

osmosis-0.35.1/bin/osmosis --rx input.osm --t outPipe.1=points \
--wk keyList=addr:interpolation,addr:housenumber --un --s --wx addr_lines.osm 
\
--nk inPipe.0=points keyList=addr:housenumber --s --wx addr_points.osm

osmosis-0.35.1/bin/osmosis --rx addr_lines.osm --rx addr_points.osm --m --wx 
addr.osm

Is this behaviour wanted? Can somebody give me a hint to do it better?
I have no idea what is wrong.

Thanks
Christoph



signature.asc
Description: OpenPGP digital signature
___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev