DAS-BAHN-FORUM.de

Herzlich willkommen im ersten offiziellen Forum zum Programm BAHN von JBSS

Aktuelle Zeit: Samstag 19. Juni 2021, 05:03

Alle Zeiten sind UTC + 1 Stunde




Ein neues Thema erstellen Auf das Thema antworten  [ 88 Beiträge ]  Gehe zu Seite Vorherige  1, 2, 3, 4, 5, 6
Autor Nachricht
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Montag 9. Dezember 2019, 00:05 
Offline

Registriert: Donnerstag 24. Mai 2007, 02:26
Beiträge: 175
Wohnort: Cardiff
For security reasons, recent distributions of Perl don't include the current directory in the include path.

You need to run it with the environment variable PERL_USE_UNSAFE_INC set.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Montag 9. Dezember 2019, 23:22 
Offline

Registriert: Montag 15. Juli 2019, 14:20
Beiträge: 2
Wohnort: Baarn, die Niederlande
Or, you can copy the file ops2jbss.pm, from your C:\ops2\ into C:\Strawberry\perl\site\lib


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Dienstag 10. Dezember 2019, 20:23 
Offline

Registriert: Montag 13. März 2006, 15:28
Beiträge: 20
Wohnort: Leiden, The Netherlands
Thanks Chris, I did not understand the explanation in your link, but I got it working by putting al the PL en PM files in the Strawbery\perl\site\lib map :).

Currently the script is working on creating the UK (or part of it at least). It did run a test area successfully.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Donnerstag 12. Dezember 2019, 16:53 
Offline

Registriert: Donnerstag 24. Mai 2007, 02:26
Beiträge: 175
Wohnort: Cardiff
Do27flyer hat geschrieben:
Or, you can copy the file ops2jbss.pm, from your C:\ops2\ into C:\Strawberry\perl\site\lib


It's not normally advised, but you can do that, and if you're on Windows and not likely to use Perl for anything else it will at least get it working. I've got a project on the back-burner to overhaul this, but if it's anything like the rate of progress on my other projects you can probably expect an early broken alpha sometime by 2030 :P


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Donnerstag 12. Dezember 2019, 22:02 
Offline

Registriert: Montag 13. März 2006, 15:28
Beiträge: 20
Wohnort: Leiden, The Netherlands
No I won't use Perl for much else, if anything at all ;). But it did work!
The script ran for 5 hours, creating a 6.3 GB Sqlite database of a 19GB OSM map file, which then resulted in a 33.9MB BNA File. That file took 30(!) hours to process by Bahn 3.89, resulting in almost the whole of the UK (Metro, Rail and Highway) and a 14MB save file. I do feel both Bahn as the Perl script could use some parallelisation, Core 2 ran at top speed for hours and hours while the rest was doing nothing :).


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Freitag 20. Dezember 2019, 05:03 
Offline

Registriert: Donnerstag 24. Mai 2007, 02:26
Beiträge: 175
Wohnort: Cardiff
For information, if anyone didn't know, there's this handy thing called Overpass API which will let you extract just the features you want, and will produce much smaller files that will be easier both for the generator and BAHN to process. Not sure if I've still got the scripts I used, but I was able to produce only the features I was interested in, limited to a radius that would only have data where it would be visible if a vehicle were followed on 1:1 zoom.

(edit)
Ah, found it. The two funny lines mean "get the nodes (points) for all the ways (lines) the previous step spat out":
Code:
[timeout:3600][maxsize:2147483647];
way[railway=rail]($top,$left,$bottom,$right);
(._;>;);
way(around:1500);
(._;>;);
out meta;


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Montag 13. April 2020, 16:39 
Offline

Registriert: Sonntag 12. April 2020, 22:21
Beiträge: 1
Hi there! First of all, forgive my Google English. I have installed ops2jbss but cannot use it. I have read the manual on the web several times but I do not understand it. I just want to make my city (Valladolid, Spain).
Thank you.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Montag 20. April 2020, 13:14 
Offline

Registriert: Freitag 19. August 2011, 12:15
Beiträge: 63
isidromapache hat geschrieben:
Hi there! First of all, forgive my Google English. I have installed ops2jbss but cannot use it. I have read the manual on the web several times but I do not understand it. I just want to make my city (Valladolid, Spain).
Thank you.


viewtopic.php?f=2&t=4398&start=15

Use https://www.deepl.com/translator for translation.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Montag 26. April 2021, 09:54 
Offline

Registriert: Dienstag 20. Januar 2009, 18:53
Beiträge: 223
Wohnort: Dänemark
Hi again, I'm amazed that the program is still available for download. Unfortunately the newest version (0.22) is corrupted according to winRAR. Version 0.20 unzips fine, but PERL refuses to run the script - too many errors. I know I've run this program before, but I do not remember how

Does anybody have new information about a configuration that works?

Code:
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 48, near "do S_init("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 52, near "do menu("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 58, near "do S_cls("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 116, near "do S_cls("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 144, near "do S_cls("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 189, near "do S_cls("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 194, near "do S_cls("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 200, near "do S_cls("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 206, near "do S_cls("
syntax error at C:\Users\Matias\Desktop\lib\ops2jbss.pl line 211, near "do S_cls("
C:\Users\Matias\Desktop\lib\ops2jbss.pl has too many errors.

_________________
Kind regards - Matias
Denmark 2018 in BAHN finished!


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Dienstag 27. April 2021, 11:33 
Offline

Registriert: Dienstag 20. Januar 2009, 18:53
Beiträge: 223
Wohnort: Dänemark
Okay, it seems like I got the program working and able to export a small test area. How to:

Download an old version of Perl: https://strawberryperl.com/releases.html
I used version 5.14.4.1 from 2013. It opens ops2jbss fine. You might need to uninstall other versions of Perl for the installer to work.

Use command CCA and then CDB to clear anything remaining from earlier attempts. Then use command C to confirm the data parameters before continuing.
Use command S to initiate the file structure needed (this seems to avoid the empty .bna file bug), after a moment or two terminate ops2jbss.
Start ops2jbss again and use command O to select the .osm file to import, for example "O testarea.osm", then use command G to generate a .bna file. This should make a .bna file with the specified filename. This can be imported to BAHN.

Now, to the next problem of mine: How do I split a big .osm file into smaller bits? It seems 3 gigabytes is way too big for the script to handle. Either make different .osm files containing exclusively roads, another with railways, and so on; or simply cut the files into smaller bits that could be stitched together after importing to BAHN. But how?
Maybe this is not the right forum to ask, but where can I find help then? I've tried looking at Osmosis myself, but I am not tech savvy, so it's all gibberish to me, unfortunately. The readme files there are no help at all.

EDIT: I have managed to make the whole process work from OpenStreetMap data to a finished BAHN-import. It is difficult to explain here, but should you need help please let me know. I can explain it to you or generate the necessary .bna files for you. Importing them to BAHN is the easiest step :)

_________________
Kind regards - Matias
Denmark 2018 in BAHN finished!


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Mittwoch 5. Mai 2021, 09:13 
Offline

Registriert: Dienstag 20. Januar 2009, 18:53
Beiträge: 223
Wohnort: Dänemark
Sorry for hijacking this thread, but I gotta say... BAHN might be slow, but it is definitely stable! Guess the country:
Bild

So by accident I started importing a 250 MB .bna-file containing all railways and roads and forests and everything in Ireland. After 72 hours I stopped it and this was the result, a 37 MB nt3 savefile. Unfortunately it's too sluggish to work with, so I'll try again with fewer roads.
Hint: have your .bna-file on a USB-stick, so you can pull it out to stop the import. BAHN will give you an "unexpected end of file" error, and then you will be able to use the map as it was imported until that moment.

_________________
Kind regards - Matias
Denmark 2018 in BAHN finished!


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Mittwoch 5. Mai 2021, 10:06 
Offline

Registriert: Donnerstag 23. Februar 2006, 19:35
Beiträge: 794
Wohnort: Königstein/Ts. (Frankfurt/Main)
1993matias hat geschrieben:
Sorry for hijacking this thread, but I gotta say... BAHN might be slow, but it is definitely stable! Guess the country:
Bild

So by accident I started importing a 250 MB .bna-file containing all railways and roads and forests and everything in Ireland. After 72 hours I stopped it and this was the result, a 37 MB nt3 savefile. Unfortunately it's too sluggish to work with, so I'll try again with fewer roads.
Hint: have your .bna-file on a USB-stick, so you can pull it out to stop the import. BAHN will give you an "unexpected end of file" error, and then you will be able to use the map as it was imported until that moment.

This is great. Can you generate us a Version from Germany? It will be don´t work by me.

Thanks and best regards


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags: Re: Generating Bahn Layouts
BeitragVerfasst: Samstag 8. Mai 2021, 23:04 
Offline

Registriert: Dienstag 20. Januar 2009, 18:53
Beiträge: 223
Wohnort: Dänemark
RMV05 hat geschrieben:
This is great. Can you generate us a Version from Germany? It will be don´t work by me.

Thanks and best regards


Send me a screenshot of the map (from Google Maps, Open Street Map, Bing, etc.) and the .osm-file, then I can generate the .bna file for you. Importing into BAHN you will have to do yourself, I'm afraid - but that's the easiest part

_________________
Kind regards - Matias
Denmark 2018 in BAHN finished!


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 88 Beiträge ]  Gehe zu Seite Vorherige  1, 2, 3, 4, 5, 6

Alle Zeiten sind UTC + 1 Stunde


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste


Sie dürfen keine neuen Themen in diesem Forum erstellen.
Sie dürfen keine Antworten zu Themen in diesem Forum erstellen.
Sie dürfen Ihre Beiträge in diesem Forum nicht ändern.
Sie dürfen Ihre Beiträge in diesem Forum nicht löschen.
Sie dürfen keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron

Bei allen Fragen zum Forum wenden Sie sich bitte an ronny@das-bahn-forum.de!

Unterstützen Sie das BAHN-Forum mit einer Bestellung bei Amazon.de!
Unterstützt durch phpBB
Version des BAHN-Forums: 4.5.1

Mit dem Lesen und Verfassen von Beiträgen akzeptieren Sie die Regelungen zur Nutzung des BAHN-Forums!