Osmosis exception

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Osmosis exception

Carsten Nielsen-2

When extracting a OSM dataset for denmark from the geofabrik europe file, I use a line
like this on my Windows 7 system

call "%OSMTOOLS%\Osmosis\osmosis-0.37\bin\osmosis.bat" --read-bin
"%DATADIR%\europe.osm.pbf" --bounding-polygon-0.6 file="%DATADIR%\CTN OSM DK mm.poly.txt"
--write-xml-0.6 file="%DATADIR%\denmark_mm.osm"


But I get en error like this

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.codehaus.classworlds.Launcher.  Program will exit.

Any clues to what I might do wrong ?


Carsten

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Brett Henderson
Do any of those paths have spaces in them?  That might cause the issue.  Also, are multiple drive letters involved?  The osmosis.bat launch script appears to have an issue where it requires Osmosis to be on the same drive as the working directory.

Brett

On Sun, Nov 7, 2010 at 11:46 PM, Carsten Nielsen <[hidden email]> wrote:

When extracting a OSM dataset for denmark from the geofabrik europe file, I use a line like this on my Windows 7 system

call "%OSMTOOLS%\Osmosis\osmosis-0.37\bin\osmosis.bat" --read-bin "%DATADIR%\europe.osm.pbf" --bounding-polygon-0.6 file="%DATADIR%\CTN OSM DK mm.poly.txt" --write-xml-0.6 file="%DATADIR%\denmark_mm.osm"


But I get en error like this

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.codehaus.classworlds.Launcher.  Program will exit.

Any clues to what I might do wrong ?


Carsten

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk


_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Carsten Nielsen-2
I now finaly fond the time to reorganize my stuff so it is all placed on same disk and paths without spaces.

I use a command like this
call "%OSMTOOLS%\Osmosis\osmosis-0.37\bin\osmosis.bat" --read-bin "%DATADIR%\europe.osm.pbf" --bounding-polygon file="%DATADIR%\CTN OSM DK mm.poly.txt" --write-xml file="%DATADIR%\denmark_mm.osm"

And I actually get an denmark_mm.osm file but it dont contain any <way id=xx> elements but a lot of <node id=xx> elemets,
the europe.osm.pbf file is downloaded from geofabrik and has a size of 4232.793.

Since the input file is pbf format I dont know how to verify that it contains ways, but assuming it is ok it must be my osmosis arguments that are wrong, or the polygon file.

The polygon file contains the points listed below, and is used to work
Danmark
1
     7.756207319697012    57.17811114244406
     8.122594433896197    54.68542279355479
     8.772571888815218    53.85912300120899
     9.250266351894227    53.87320365806346
    10.66898056896869    53.75668842833822
    10.93022352993368    53.84640031897176
    11.12155571155283    54.05808521807632
    13.35762574640139    54.77019857454743
    13.35762574640139    54.77019857454743
    15.73963894254106    54.7487272064959
    15.19043058475876    55.39229018737169
    12.64819507638499    55.23659923627502
    12.87130748255543    55.60615224672924
    12.64369438952046    55.91525904110308
    12.6523968241681    56.04250834511427
    12.58172181799832    56.08257976119043
    10.94988684158892    57.98475542747029
     7.768299604349267    57.32327528330718
END
END


Any clues to why I dont get any ways in my OSM file ?


Carsten


Den 09-11-2010 03:51, Brett Henderson skrev:
On Tue, Nov 9, 2010 at 2:51 AM, Carsten Nielsen <[hidden email]> wrote:
Hi

Thankyou for the answer.

There are a no spaces in the path %OSMTOOLS%, but there are two in the %DATADIR% path
The thow paths are pointing to seperate drives, yes.

Are there no workarounds for these issues besides having to put all the stuff on the same drive ?

Not that I'm aware of.  I only found out about the problem a few days ago.  My batch file skillz are sorely lacking and I haven't tried to fix it.  The other option is to edit the osmosis.bat file and do some hard-coding for your environment.  That's possibly your best option right now.

Brett

Ingen virus fundet i denne indkommende meddelelse. Kontrolleret af AVG - www.avg.com Version: 9.0.864 / Virusdatabase: 271.1.1/3244 - Udgivelsesdato: 11/08/10 08:34:00

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Stephan Knauss
On 05.12.2010 17:52, Carsten Nielsen wrote:
> call "%OSMTOOLS%\Osmosis\osmosis-0.37\bin\osmosis.bat" --read-bin
> "%DATADIR%\europe.osm.pbf" --bounding-polygon file="%DATADIR%\CTN OSM DK
> mm.poly.txt" --write-xml file="%DATADIR%\denmark_mm.osm"
> Any clues to why I dont get any ways in my OSM file ?

Have you tried the read-pbf task? I did a similar thing and it worked.
You could also use a more recent version of osmosis.

Stephan

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Carsten Nielsen-2
I dont recall where I saw the "--read-bin" option but se it is also mentioned in the recent geofabrik blogpost http://blog.geofabrik.de/en/?p=75
and yes I have tried to replace it with the "--read.pbf" and the result is the same.

I have not tried with the 0.38 version of osmosis because, geofabrik menthion that it the 0.37 version should work, but I will give it a try.

Carsten

Den 05-12-2010 20:37, Stephan Knauss skrev:
On 05.12.2010 17:52, Carsten Nielsen wrote:
call "%OSMTOOLS%\Osmosis\osmosis-0.37\bin\osmosis.bat" --read-bin
"%DATADIR%\europe.osm.pbf" --bounding-polygon file="%DATADIR%\CTN OSM DK
mm.poly.txt" --write-xml file="%DATADIR%\denmark_mm.osm"
Any clues to why I dont get any ways in my OSM file ?

Have you tried the read-pbf task? I did a similar thing and it worked. You could also use a more recent version of osmosis.

Stephan

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Ingen virus fundet i denne indkommende meddelelse. Kontrolleret af AVG - www.avg.com Version: 9.0.872 / Virusdatabase: 271.1.1/3298 - Udgivelsesdato: 12/05/10 08:34:00

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Carsten Nielsen-2
Same situation with osmosis 0.38, only node no ways

Carsten

Den 05-12-2010 20:50, Carsten Nielsen skrev:
I dont recall where I saw the "--read-bin" option but se it is also mentioned in the recent geofabrik blogpost http://blog.geofabrik.de/en/?p=75
and yes I have tried to replace it with the "--read.pbf" and the result is the same.

I have not tried with the 0.38 version of osmosis because, geofabrik menthion that it the 0.37 version should work, but I will give it a try.

Carsten

Den 05-12-2010 20:37, Stephan Knauss skrev:
On 05.12.2010 17:52, Carsten Nielsen wrote:
call "%OSMTOOLS%\Osmosis\osmosis-0.37\bin\osmosis.bat" --read-bin
"%DATADIR%\europe.osm.pbf" --bounding-polygon file="%DATADIR%\CTN OSM DK
mm.poly.txt" --write-xml file="%DATADIR%\denmark_mm.osm"
Any clues to why I dont get any ways in my OSM file ?

Have you tried the read-pbf task? I did a similar thing and it worked. You could also use a more recent version of osmosis.

Stephan

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Ingen virus fundet i denne indkommende meddelelse. Kontrolleret af AVG - www.avg.com Version: 9.0.872 / Virusdatabase: 271.1.1/3298 - Udgivelsesdato: 12/05/10 08:34:00
_______________________________________________ talk mailing list [hidden email] http://lists.openstreetmap.org/listinfo/talk
Ingen virus fundet i denne indkommende meddelelse. Kontrolleret af AVG - www.avg.com Version: 9.0.872 / Virusdatabase: 271.1.1/3298 - Udgivelsesdato: 12/05/10 08:34:00

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Stephan Knauss
Hi,

On 06.12.2010 19:58, Carsten Nielsen wrote:
> Same situation with osmosis 0.38, only node no ways

on talk-de had been similar reports. Frederik mentioned he will replace
the version on the server.


Stephan

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Carsten Nielsen-2
Is it this thread
http://www.mail-archive.com/talk-de@.../msg78972.html 
I have to monitor ?

Carsten

Den 07-12-2010 01:15, Stephan Knauss skrev:
Hi,

On 06.12.2010 19:58, Carsten Nielsen wrote:
Same situation with osmosis 0.38, only node no ways

on talk-de had been similar reports. Frederik mentioned he will replace the version on the server.


Stephan

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Ingen virus fundet i denne indkommende meddelelse. Kontrolleret af AVG - www.avg.com Version: 9.0.872 / Virusdatabase: 271.1.1/3301 - Udgivelsesdato: 12/06/10 20:34:00

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Scott Crosby-2
In reply to this post by Carsten Nielsen-2
On Sun, Dec 5, 2010 at 1:50 PM, Carsten Nielsen <[hidden email]> wrote:
> I dont recall where I saw the "--read-bin" option but se it is also
> mentioned in the recent geofabrik blogpost http://blog.geofabrik.de/en/?p=75
> and yes I have tried to replace it with the "--read.pbf" and the result is
> the same.

The original osmosis task name of the pbf reader when it first put in
was --read-bin and that name was used in the geofabrik blog post as
well as some other examples. It was depreciated in favor of the more
descriptive --read-pbf.

Scott

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk
Reply | Threaded
Open this post in threaded view
|

Re: Osmosis exception

Stephan Knauss
In reply to this post by Carsten Nielsen-2
On 07.12.2010 19:17, Carsten Nielsen wrote:
> Is it this thread
> http://www.mail-archive.com/talk-de@.../msg78972.html
> I have to monitor ?

Yes, that's the one.

They have the same (or very similar) problem. Extracting from europe.pbf
results in missing ways.

Stephan

_______________________________________________
talk mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/talk