Re: [OSM-dev] Osmosis: Filter way/node *without* key x - recommendation

2009-02-14 Thread Rolf Bode-Meyer
2009/2/14 Brett Henderson br...@bretth.com:
 In the absence of an updated plugin, try this.
 http://gweb.bretth.com/osmosis-0.29.zip

Thanks for providing this, and indeed the plugin works with this version.

Umm, well depends on how one defines works. No errors are thrown
now, but the output file always is the full input file, regardless
what is given as transform XML.
I guess I must have misunderstood the whole concept of that filter. :-/

Rolf

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-13 Thread Dave Stubbs
2009/2/13  marcus.wolsc...@googlemail.com:
 On Thu, 12 Feb 2009 21:34:21 +0100, Rolf Bode-Meyer rob...@gmail.com
 wrote:
 That indeed looks promissing.
 Unfortunatelly one seems to have be a programmer to use osmosis. Every
 problem is presented as a Java exception. Some of them contain at
 least a faint idea of what could be wrong. But something like this
 leaves me clueless:

 java.lang.AbstractMethodError
   at

 com.bretth.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:72)

 This looks like the plugin was compiled against a different version of
 osmosis.
 My guess would be, that it was build against the latest development-version
 and you are using
 the last stable release of osmosis. Something like this.
 It's something Randomjunk the developer of the plugin has to fix.
 I have not seen any contact-info on his wiki-user-page so I hope he reads
 this
 mailing-list.



It was built against v0.29 of Osmosis which is the version I'm still
using -- it should work with that.

I hadn't realised the plugin interface had changed. I'll have to take
a look some time.

Dave

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-13 Thread Rolf Bode-Meyer
2009/2/13 Dave Stubbs osm.l...@randomjunk.co.uk:

 It was built against v0.29 of Osmosis which is the version I'm still
 using -- it should work with that.

 I hadn't realised the plugin interface had changed. I'll have to take
 a look some time.

I can't tell if an interface changed but I'm using version 0.30 from
2009-01-12 which is http://gweb.bretth.com/osmosis-latest.zip right
now. So I thought that would be sensible.
In the meantime I also tried the oldest on Bretts site (0.29.5) but to no avail.

Rolf

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x - recommendation

2009-02-13 Thread marcus.wolschon
On Fri, 13 Feb 2009 12:57:02 +0100, Rolf Bode-Meyer rob...@gmail.com
wrote:
 2009/2/13 Dave Stubbs osm.l...@randomjunk.co.uk:
 
 It was built against v0.29 of Osmosis which is the version I'm still
 using -- it should work with that.

 I hadn't realised the plugin interface had changed. I'll have to take
 a look some time.
 
 I can't tell if an interface changed but I'm using version 0.30 from
 2009-01-12 which is http://gweb.bretth.com/osmosis-latest.zip right
 now. So I thought that would be sensible.
 In the meantime I also tried the oldest on Bretts site (0.29.5) but to no
 avail.

I recomment we use the plugin-version -attribute to the requires-element
to state what version of osmosis we require when writing plugins and that
the version-attribute of the plugin-element in corePlugin.xml is kept
up to date with the released version-number of osmosis-releases.
This is the mechanism ment to deal with such issues.

Brett: for you this means to look at corePlugin.xml when making a new
stable
release

Dave and me: we should explicitely specify what version of osmosis our
plugins
are for.

Marcus

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x - recommendation

2009-02-13 Thread Brett Henderson
marcus.wolsc...@googlemail.com wrote:
 On Fri, 13 Feb 2009 12:57:02 +0100, Rolf Bode-Meyer rob...@gmail.com
 wrote:
   
 2009/2/13 Dave Stubbs osm.l...@randomjunk.co.uk:

 
 It was built against v0.29 of Osmosis which is the version I'm still
 using -- it should work with that.

 I hadn't realised the plugin interface had changed. I'll have to take
 a look some time.
   
The plugin interface itself shouldn't have changed, but the rest of 
osmosis might have.
 I can't tell if an interface changed but I'm using version 0.30 from
 2009-01-12 which is http://gweb.bretth.com/osmosis-latest.zip right
 now. So I thought that would be sensible.
 In the meantime I also tried the oldest on Bretts site (0.29.5) but to no
 avail.
 
In the absence of an updated plugin, try this.
http://gweb.bretth.com/osmosis-0.29.zip

 I recomment we use the plugin-version -attribute to the requires-element
 to state what version of osmosis we require when writing plugins and that
 the version-attribute of the plugin-element in corePlugin.xml is kept
 up to date with the released version-number of osmosis-releases.
 This is the mechanism ment to deal with such issues.

 Brett: for you this means to look at corePlugin.xml when making a new
 stable
 release
   
The build scripts already do a search and replace on a few files to 
update the version number (a java constants file, and the jar manifest 
from memory).  It should be possible to update the plugin xml file as well.


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Brett Henderson
All tasks are documented here (with the exception of a custom database 
implementation that is unrelated):
http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage

If one of them doesn't do what you want then you're out of luck.  It 
would be nice to add a comprehensive set of tasks for tag manipulation 
but it's not high on my priority list at the moment.  Patches welcome of 
course.

Rolf Bode-Meyer wrote:
 Hi,

 is there a way (maybe not documented) to filter out ways/nodes without
 a specific key?

 Rolf
   



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Celso González
On Thu, Feb 12, 2009 at 07:48:02PM +1100, Brett Henderson wrote:
 All tasks are documented here (with the exception of a custom database 
 implementation that is unrelated):
 http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage

Its in the doc but it seems that its not possible because of the type of
output but... is there a way to get something like this?

$osmosis --rxc file=changes.osc --bp poly.poly --wxc=changes.limited.osc


-- 
Celso González (PerroVerd)
http://mitago.net

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Brett Henderson
Celso González wrote:
 On Thu, Feb 12, 2009 at 07:48:02PM +1100, Brett Henderson wrote:
   
 All tasks are documented here (with the exception of a custom database 
 implementation that is unrelated):
 http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage
 

 Its in the doc but it seems that its not possible because of the type of
 output but... is there a way to get something like this?

 $osmosis --rxc file=changes.osc --bp poly.poly --wxc=changes.limited.osc
   
Is this related to Rolf's original question or is it a separate question?

Rolf was discussing filtering data by tag.  The above question discusses 
filtering changesets by polygon which is entirely different.  You cannot 
filter a changeset by polygon because a changeset doesn't contain enough 
information, all nodes for changed ways may not be included in the file 
therefore the location of ways may not be known.

Brett


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Dave Stubbs
2009/2/7 Rolf Bode-Meyer rob...@gmail.com:
 Hi,

 is there a way (maybe not documented) to filter out ways/nodes without
 a specific key?



You can try the TagTransform plugin:
http://wiki.openstreetmap.org/wiki/Osmosis/TagTransform

A translation along the lines of this should drop entities not
matching the regex:

translation
   nameDrop/name
   descriptionDrop without mykey/description
   match
 notag k=mykey v=.*/
   /match
   !-- no output description means matching entities are dropped --
/translation

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Lennard
Brett Henderson wrote:

 You cannot 
 filter a changeset by polygon because a changeset doesn't contain enough 
 information, all nodes for changed ways may not be included in the file 
 therefore the location of ways may not be known.

Would it be a workable option to have fully referenced diff files, next 
to the current sparse format?

Would there be a lot of overhead in generation and/or filesize?

With the current interest in hourly/minutely updated maps, this seems to 
me to be an interesting option for people that don't or can't load the 
whole planet.

-- 
Lennard

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Rolf Bode-Meyer
2009/2/12 Dave Stubbs osm.l...@randomjunk.co.uk:
 You can try the TagTransform plugin:
 http://wiki.openstreetmap.org/wiki/Osmosis/TagTransform

 A translation along the lines of this should drop entities not
 matching the regex:

 translation
   nameDrop/name
   descriptionDrop without mykey/description
   match
 notag k=mykey v=.*/
   /match
   !-- no output description means matching entities are dropped --
 /translation

That indeed looks promissing.
Unfortunatelly one seems to have be a programmer to use osmosis. Every
problem is presented as a Java exception. Some of them contain at
least a faint idea of what could be wrong. But something like this
leaves me clueless:

java.lang.AbstractMethodError
  at 
com.bretth.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:72)
 at 
com.bretth.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:50)
 at com.bretth.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:112)
 at com.bretth.osmosis.core.Osmosis.run(Osmosis.java:79)
 at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:30)

Happens as soon I'm adding the --tt option, regardless with what arguments.

Rolf

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Brett Henderson
Lennard wrote:
 Brett Henderson wrote:

 You cannot filter a changeset by polygon because a changeset doesn't 
 contain enough information, all nodes for changed ways may not be 
 included in the file therefore the location of ways may not be known.

 Would it be a workable option to have fully referenced diff files, 
 next to the current sparse format?
Anything is possible but for complexity and performance reasons it's not 
trivial.  Currently osmosis runs through the database history tables and 
extracts records that were created in the change interval of interest.  
(ie. a SQL WHERE clause specifying a timestamp in a certain range).  It 
does that separately for nodes, ways and relations.  To create a fully 
referenced diff file would require osmosis to read the ways, then read 
the nodes, then go and load all the other nodes that were referenced by 
ways but not found in the first pass.  Fully referenced relations would 
also require something similar but it gets slightly more complicated for 
them.  The current number of queries is fixed at one per table.  This is 
likely to drastically increase that.

 Would there be a lot of overhead in generation and/or filesize?
So yes, a large overhead in generation.  I suspect filesize wouldn't be 
too badly impacted but I don't have any numbers.

 With the current interest in hourly/minutely updated maps, this seems 
 to me to be an interesting option for people that don't or can't load 
 the whole planet.

You can still apply full planet changesets to your local file then run 
the result through a bounding box to remove unwanted data.

Brett

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Brett Henderson
Rolf Bode-Meyer wrote:
 2009/2/12 Dave Stubbs osm.l...@randomjunk.co.uk:
   
 You can try the TagTransform plugin:
 http://wiki.openstreetmap.org/wiki/Osmosis/TagTransform

 A translation along the lines of this should drop entities not
 matching the regex:

 translation
   nameDrop/name
   descriptionDrop without mykey/description
   match
 notag k=mykey v=.*/
   /match
   !-- no output description means matching entities are dropped --
 /translation
 

 That indeed looks promissing.
 Unfortunatelly one seems to have be a programmer to use osmosis. Every
 problem is presented as a Java exception. Some of them contain at
 least a faint idea of what could be wrong. But something like this
 leaves me clueless:
   
Yeah, Osmosis is written to be a library and has a command line bolted 
onto the front of it.  I try to create meaningful error messages but it 
does mean that you have to read through a stack trace to find them 
sometimes.
 java.lang.AbstractMethodError
   at 
 com.bretth.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:72)
  at 
 com.bretth.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:50)
  at 
 com.bretth.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:112)
  at com.bretth.osmosis.core.Osmosis.run(Osmosis.java:79)
  at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:30)
   
 Happens as soon I'm adding the --tt option, regardless with what arguments.
   
Well, in this case you'll have to be a programmer to debug it.  
Something about the plugin appears to be broken.  Perhaps it was 
compiled against an older version of osmosis?  Not sure, I don't have 
any experience debugging plugins yet.  Dave is going to have to help you 
with this one.

Brett


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Ldp
Brett Henderson wrote:

 Would it be a workable option to have fully referenced diff files, 
 next to the current sparse format?
 Anything is possible but for complexity and performance reasons it's not 
 trivial.  Currently osmosis runs through the database history tables and 

Hence my use of the word 'workable'. Thanks for the explanation.

 With the current interest in hourly/minutely updated maps, this seems 
 to me to be an interesting option for people that don't or can't load 
 the whole planet.

 You can still apply full planet changesets to your local file then run 
 the result through a bounding box to remove unwanted data.

I know, and I've done that in the past, but if you load diff files with 
osm2pgsql (in slim mode), that can't be done. You'd have to patch the 
extract with osmosis and reload (with osm2pgsql) the whole thing every time.

But I notice osm2pgsql's --bbox parameter, so I'd have to see if that 
works with --slim --append mode as well. And if it works, if it produces 
sane results around the extract edges.

-- 
Lennard

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread Brett Henderson
Ldp wrote:
 Brett Henderson wrote:

   
 You can still apply full planet changesets to your local file then run 
 the result through a bounding box to remove unwanted data.
 

 I know, and I've done that in the past, but if you load diff files with 
 osm2pgsql (in slim mode), that can't be done. You'd have to patch the 
 extract with osmosis and reload (with osm2pgsql) the whole thing every time.
   
I agree it's a pain.  If there was a simple way to fix it I would.
 But I notice osm2pgsql's --bbox parameter, so I'd have to see if that 
 works with --slim --append mode as well. And if it works, if it produces 
 sane results around the extract edges.
   
Okay.  Yep, the only option you'll have in most cases is to rely on the 
import tool using the database (which has the full view of data) to 
eliminate unwanted data.


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-12 Thread marcus.wolschon
On Thu, 12 Feb 2009 21:34:21 +0100, Rolf Bode-Meyer rob...@gmail.com
wrote:
 That indeed looks promissing.
 Unfortunatelly one seems to have be a programmer to use osmosis. Every
 problem is presented as a Java exception. Some of them contain at
 least a faint idea of what could be wrong. But something like this
 leaves me clueless:
 
 java.lang.AbstractMethodError
   at
  
com.bretth.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:72)

This looks like the plugin was compiled against a different version of
osmosis.
My guess would be, that it was build against the latest development-version
and you are using
the last stable release of osmosis. Something like this.
It's something Randomjunk the developer of the plugin has to fix.
I have not seen any contact-info on his wiki-user-page so I hope he reads
this
mailing-list.

Marcus

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Osmosis: Filter way/node *without* key x

2009-02-07 Thread Rolf Bode-Meyer
Hi,

is there a way (maybe not documented) to filter out ways/nodes without
a specific key?

Rolf

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev