[OSM-dev] Tool to simplify ways

Maarten Deen mdeen at xs4all.nl
Sun May 5 18:13:39 UTC 2013


On 2013-05-05 15:38, Christian Müller wrote:
> Hi,
> 
> have a look at
> 
> http://lists.openstreetmap.org/pipermail/dev/2012-May/024947.html
> https://github.com/podolsir/osmosis-simplifyways

That doesn't want to work for me. I have the latest germany file and 
when I run that (with enableDateParsing set to no, otherwise it won't 
even start reading it), I get this error:

maarten at watcheye:~/osm$ osmosis/bin/osmosis --read-xml 
file=germany-latest.osm enableDateParsing=no --simplify-ways 
epsilonMeters=10 --write-xml file=germany-simplifyied.osm
May 5, 2013 8:11:30 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.43.1
May 5, 2013 8:11:31 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
May 5, 2013 8:11:31 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
May 5, 2013 8:11:31 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
May 5, 2013 8:11:31 PM 
org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager 
waitForCompletion
SEVERE: Thread for task 1-read-xml failed
java.lang.AbstractMethodError: 
de.vwistuttgart.openstreetmap.osmosis.simplifyways.v0_6.WaySimplifier.initialize(Ljava/util/Map;)V
         at 
org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:95)
         at java.lang.Thread.run(Thread.java:679)
May 5, 2013 8:11:31 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more 
tasks failed.
         at 
org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
         at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
         at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:616)
         at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
         at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
         at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
         at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
         at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

Is this a case of not having it installed correctly, or is it something 
else?

Regards,
Maarten


> 
> 
> Regards,
> Christian
> 
> 
> Am 05.05.2013 14:56, schrieb Maarten Deen:
>> Hi,
>> 
>> is there a tool already existing that can simplify ways in an .osm 
>> file?
>> 
>> What I'm looking for is something that removes all intermediate nodes
>> from a way, as long as they are not used in another way.
>> 
>> Example:
>> <way id="1">
>>     <nd ref="1"/>
>>     <nd ref="2"/>
>>     <nd ref="3"/>
>>     <nd ref="4"/>
>>     <nd ref="5"/>
>>     <nd ref="6"/>
>> </way>
>> <way id="2">
>>     <nd ref="3"/>
>>     <nd ref="7"/>
>>     <nd ref="8"/>
>>     <nd ref="9"/>
>>     <nd ref="10"/>
>> </way>
>> 
>> After simplifying:
>> <way id="1">
>>     <nd ref="1"/>
>>     <nd ref="3"/>
>>     <nd ref="6"/>
>> </way>
>> <way id="2">
>>     <nd ref="3"/>
>>     <nd ref="10"/>
>> </way>
>> 
>> And then also remove the unused nodes from the osm files.
>> 
>> Regards,
>> Maarten
>> 
>> _______________________________________________
>> dev mailing list
>> dev at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/dev
>> 



More information about the dev mailing list