Generating Bahn Layouts
-
- Beiträge: 27
- Registriert: Donnerstag 8. Mai 2008, 23:56
- Wohnort: Nederland
Generating Bahn Layouts
Open StreetMap 2 BNA file
Introduction:
Tired of creating MAP files with BAHN. I’ve created a little tool to convert Open Street MAP data directly to a BNA map file that could be imported in BAHN.
Although it is possible to use a background map to use it. It is much easier and more accurate to import it from OpenStreetMap (see www.openstreetmap.org)
Please look at:
http://www.xs4all.nl/~wanl0049/ops2jbss/
The tool to convert from ESRI files becomes obsolete and will be deleted
within a short period. http://www.xs4all.nl/~wanl0049/rrline.html
Regards, Bert Tijhuis
Introduction:
Tired of creating MAP files with BAHN. I’ve created a little tool to convert Open Street MAP data directly to a BNA map file that could be imported in BAHN.
Although it is possible to use a background map to use it. It is much easier and more accurate to import it from OpenStreetMap (see www.openstreetmap.org)
Please look at:
http://www.xs4all.nl/~wanl0049/ops2jbss/
The tool to convert from ESRI files becomes obsolete and will be deleted
within a short period. http://www.xs4all.nl/~wanl0049/rrline.html
Regards, Bert Tijhuis
Re: Generating Bahn Layouts
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">Tired of creating MAP files with BAHN. I’ve created a little tool to convert Open Street MAP data directly to a BNA map file that could be imported in BAHN.
Although it is possible to use a background map to use it. It is much easier and more accurate to import it from OpenStreetMap (see www.openstreetmap.org)</tr></td></table>
Brilliant. Especially given the OSM data is free in all senses of the word. [img]icon_smile.gif[/img]
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">The tool to convert from ESRI files becomes obsolete and will be deleted
within a short period.</tr></td></table>
It has not and will not become obsolete for a long time. Coverage of the OSM data is still patchy, and there are significant areas even in Europe where little or no data. Please hold off on deleting anything until the old tool really is obsolete. We may be living in an age of CDs, DVDs and the Internet, but I still find my turntable, TV and VCR useful. [img]icon_wink.gif[/img]
Although it is possible to use a background map to use it. It is much easier and more accurate to import it from OpenStreetMap (see www.openstreetmap.org)</tr></td></table>
Brilliant. Especially given the OSM data is free in all senses of the word. [img]icon_smile.gif[/img]
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">The tool to convert from ESRI files becomes obsolete and will be deleted
within a short period.</tr></td></table>
It has not and will not become obsolete for a long time. Coverage of the OSM data is still patchy, and there are significant areas even in Europe where little or no data. Please hold off on deleting anything until the old tool really is obsolete. We may be living in an age of CDs, DVDs and the Internet, but I still find my turntable, TV and VCR useful. [img]icon_wink.gif[/img]
-
- Beiträge: 27
- Registriert: Donnerstag 8. Mai 2008, 23:56
- Wohnort: Nederland
Re: Generating Bahn Layouts
Hello Chris,
Thanx for the comment,
I've just put the old stuff again online again.
Maybe it is an idea to put it direct into the BAHN nt3 layout, but the documentation about this layout is quite difficult to read.
Within this layout it is even possible to use also turnouts directly as output.
But this will take serious a long time to develop this.
Till this time I'm looking for predefined symbols for asigning a
'residental' area
'industrial' area
'cemetery' area
'park' area
'forest' area (I don't want to fill it up completely with trees)
Regards,
Bert Tijhuis
Thanx for the comment,
I've just put the old stuff again online again.
Maybe it is an idea to put it direct into the BAHN nt3 layout, but the documentation about this layout is quite difficult to read.
Within this layout it is even possible to use also turnouts directly as output.
But this will take serious a long time to develop this.
Till this time I'm looking for predefined symbols for asigning a
'residental' area
'industrial' area
'cemetery' area
'park' area
'forest' area (I don't want to fill it up completely with trees)
Regards,
Bert Tijhuis
-
- Beiträge: 2489
- Registriert: Montag 17. März 2003, 17:53
- Wohnort: Pirna (an der Elbe, in Sachsen)
- Kontaktdaten:
Re: Generating Bahn Layouts
Hello Bert,
thank you for the very good program. Thus copying of railroad lines, cities and landscapes is very much simplified. The map data are very detailed, however so far still railroad line and roads are missing.
Heiko
thank you for the very good program. Thus copying of railroad lines, cities and landscapes is very much simplified. The map data are very detailed, however so far still railroad line and roads are missing.
Heiko
- schöner leben ohne nazis -
Re: Generating Bahn Layouts
Hello Heiko,
Please download the latest version 0.12 and run the script
(otherwise you're missing some new features, and it's only 21 Kbytes big)
ops2jbss.pl again
OpenStreetMap for JBSS BNA Output Menu
V. View Params
C. Change Params
S. Start Extractor
G. Generate BNA input file
CCA. Clean Cache Area
CDB. Clean SQlite Database
E. End
Choise ?: >
Choose C
OpenStreetMap for JBSS BNA View Param
Center X (longitude East = positive) ?: 0>
Center Y (latitude North = positive) ?: 51.7>
Elements in units/Kilometer Generating Output?: 90>
Cache Directory?: cache>
Max Age of cache files?: 50>
Outputfile?: testimport>
[3750->until BAHN 3.81: = 3750]
[3830->from BAHN 3.83: = 3830]
[3840->from BAHN 3.84: = 3840]
BNA Version?: 3750>
Height in km)?: 50>
Width in km)?: 50>
Index on location? (empty = no index): 0,0>
[N->No]
[Y->Yes]
Print Text (Streetname, Rivername)?: N>
[R->Rail]
[RS->Rail and Subway(lightrail)]
[RST->Rail/Subway(lightrail)/Tram]
[S ->Subway(lightrail)]
[ST->Subway(lightrail)/Tram]
[T->Tram]
Show Rail?: RST>
Choose at Show Rail: whatever you want to see and continue
After finishing this
OpenStreetMap for JBSS BNA Output Menu
V. View Params
C. Change Params
S. Start Extractor
G. Generate BNA input file
CCA. Clean Cache Area
CDB. Clean SQlite Database
E. End
Choise ?: >
Choose G to generate the BNA import file
Good luck
Regards, Bert Tijhuis
Please download the latest version 0.12 and run the script
(otherwise you're missing some new features, and it's only 21 Kbytes big)
ops2jbss.pl again
OpenStreetMap for JBSS BNA Output Menu
V. View Params
C. Change Params
S. Start Extractor
G. Generate BNA input file
CCA. Clean Cache Area
CDB. Clean SQlite Database
E. End
Choise ?: >
Choose C
OpenStreetMap for JBSS BNA View Param
Center X (longitude East = positive) ?: 0>
Center Y (latitude North = positive) ?: 51.7>
Elements in units/Kilometer Generating Output?: 90>
Cache Directory?: cache>
Max Age of cache files?: 50>
Outputfile?: testimport>
[3750->until BAHN 3.81: = 3750]
[3830->from BAHN 3.83: = 3830]
[3840->from BAHN 3.84: = 3840]
BNA Version?: 3750>
Height in km)?: 50>
Width in km)?: 50>
Index on location? (empty = no index): 0,0>
[N->No]
[Y->Yes]
Print Text (Streetname, Rivername)?: N>
[R->Rail]
[RS->Rail and Subway(lightrail)]
[RST->Rail/Subway(lightrail)/Tram]
[S ->Subway(lightrail)]
[ST->Subway(lightrail)/Tram]
[T->Tram]
Show Rail?: RST>
Choose at Show Rail: whatever you want to see and continue
After finishing this
OpenStreetMap for JBSS BNA Output Menu
V. View Params
C. Change Params
S. Start Extractor
G. Generate BNA input file
CCA. Clean Cache Area
CDB. Clean SQlite Database
E. End
Choise ?: >
Choose G to generate the BNA import file
Good luck
Regards, Bert Tijhuis
Re: Generating Bahn Layouts
It doesn't work for me, when I press G it generates a 1KB-BNA file with only "BNAFILEVERSION 3840" written in it. [img]icon_sad.gif[/img] [img]icon_sad.gif[/img] [img]icon_sad.gif[/img]
- micha88
- Beiträge: 1989
- Registriert: Freitag 18. Februar 2005, 12:50
- Wohnort: Marbach am Neckar
- Kontaktdaten:
Re: Generating Bahn Layouts
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">It doesn't work for me, when I press G it generates a 1KB-BNA file with only "BNAFILEVERSION 3840" written in it. [img]icon_sad.gif[/img] [img]icon_sad.gif[/img] [img]icon_sad.gif[/img]</tr></td></table>Have you loaded the map data from the server with "S"? This is needed!
Re: Generating Bahn Layouts
I'm a Vollidiot, thank you! [img]icon_rolleyes.gif[/img]
Re: Generating Bahn Layouts
Having tried it at home, extraction seemed to take forever. Killed it after a few hours, and then got nothing when I generated. Then, when I tried it on my server it grabbed most of the information quickly (a minute or so) and generated a 50x50km square (which I'll get to test a bit later today).
It looks like it would be a viable candidate for automation, i.e. give it dozen or so different sets of parameters, and get a dozen or so .bna files out the other end. I'll look into this, because it could be useful to build something like a Web interface to this (which for many people may at least be preferable to downloading and installing a Perl distribution).
It looks like it would be a viable candidate for automation, i.e. give it dozen or so different sets of parameters, and get a dozen or so .bna files out the other end. I'll look into this, because it could be useful to build something like a Web interface to this (which for many people may at least be preferable to downloading and installing a Perl distribution).
-
- Beiträge: 1974
- Registriert: Sonntag 18. April 2004, 17:40
- Wohnort: Nieuwveen (ZH), die Niederlande
- Kontaktdaten:
Re: Generating Bahn Layouts
Hy,
I haven't had much luck with installing the extra software for running the scripts. Can someone make a Lay-out BNA for the region of Alphen a/d Rijn ? (Zuid-Holland, NL).
thanks.
I haven't had much luck with installing the extra software for running the scripts. Can someone make a Lay-out BNA for the region of Alphen a/d Rijn ? (Zuid-Holland, NL).
thanks.
Bahn, immer etwas zu tun. Und ohne Verspätungen, wie die NS.
- micha88
- Beiträge: 1989
- Registriert: Freitag 18. Februar 2005, 12:50
- Wohnort: Marbach am Neckar
- Kontaktdaten:
Re: Generating Bahn Layouts
Bert, this programm is really cool! [img]icon_biggrin.gif[/img]
But, it's slow (because the osm server ist slow).
Creating very huge maps is impossible, because
* after to much requests, the osm server blocks further requests
* the sqlite database gets huge (200 MB) and your script consumes very much memory
So, would it be possible to alternatively use already downloaded xml files for ops2jbss (there are some available for wohle europe or individual countries)?
Also I think that it would be helpful to filter out the unwanted ways and nodes (like configured in the ini file) already before data is put in the database. This would reduce the database's size.
But, it's slow (because the osm server ist slow).
Creating very huge maps is impossible, because
* after to much requests, the osm server blocks further requests
* the sqlite database gets huge (200 MB) and your script consumes very much memory
So, would it be possible to alternatively use already downloaded xml files for ops2jbss (there are some available for wohle europe or individual countries)?
Also I think that it would be helpful to filter out the unwanted ways and nodes (like configured in the ini file) already before data is put in the database. This would reduce the database's size.
Zuletzt geändert von micha88 am Donnerstag 15. Mai 2008, 17:46, insgesamt 1-mal geändert.
-
- Beiträge: 27
- Registriert: Donnerstag 8. Mai 2008, 23:56
- Wohnort: Nederland
Re: Generating Bahn Layouts
>> Sander Fondse said:
I will put a demo of the region Alphen aan de Rijn ZH on the Website. So you could download this file.
But be aware I will do this only once
>> Chris said: It looks like it would be a viable candidate for automation
Having tried it at home, extraction seemed to take forever. Killed it after a few hours, and then got nothing when I generated. Then, when I tried it on my server it grabbed most of the information quickly (a minute or so) and generated a 50x50km square (which I'll get to test a bit later today).
It is possible to run the extractor during the night or the time when not using the computer. You could always restart it. It will continue where it ends.
It looks like it would be a viable candidate for automation
The problem is not to write such a server program but where to put the database and allow a fast extraction of the database for many customer of BAHN.
I will look if I could serve you with such a kind of solution in the future.
But if anyone could rewrite the script in another language then perl so be my guest.(Ruby, Python, C++, C##, Java etc)
>> micha88 said:
Creating very huge maps is impossible, because (This is not True)
after to much requests, the osm server blocks further requests (Please try it later in the future time and you will see that the work continues with extracting data)
the sqlite database gets huge (200 MB) and your script consumes very much memory
I do already have a database of about 600MB containing the netherlands, Belgium,, London and parts of west germany.
It is even possible to start up multiple extractors from different area’s which will overlap.
You’re suggestion to download an xml file directly in the program will be added in the near future. (This is called an .OSM file)
Also I think that it would be helpful to filter out the unwanted ways and nodes (like configured in the ini file) already before data is put in the database. This would reduce the database's size.
Let me think about this, (this should be something optional by the extracting of the data). It will not limit the size of the download.
<span style="color:darkred"> </span> <span style="color:black"> </span>
I will put a demo of the region Alphen aan de Rijn ZH on the Website. So you could download this file.
But be aware I will do this only once
>> Chris said: It looks like it would be a viable candidate for automation
Having tried it at home, extraction seemed to take forever. Killed it after a few hours, and then got nothing when I generated. Then, when I tried it on my server it grabbed most of the information quickly (a minute or so) and generated a 50x50km square (which I'll get to test a bit later today).
It is possible to run the extractor during the night or the time when not using the computer. You could always restart it. It will continue where it ends.
It looks like it would be a viable candidate for automation
The problem is not to write such a server program but where to put the database and allow a fast extraction of the database for many customer of BAHN.
I will look if I could serve you with such a kind of solution in the future.
But if anyone could rewrite the script in another language then perl so be my guest.(Ruby, Python, C++, C##, Java etc)
>> micha88 said:
Creating very huge maps is impossible, because (This is not True)
after to much requests, the osm server blocks further requests (Please try it later in the future time and you will see that the work continues with extracting data)
the sqlite database gets huge (200 MB) and your script consumes very much memory
I do already have a database of about 600MB containing the netherlands, Belgium,, London and parts of west germany.
It is even possible to start up multiple extractors from different area’s which will overlap.
You’re suggestion to download an xml file directly in the program will be added in the near future. (This is called an .OSM file)
Also I think that it would be helpful to filter out the unwanted ways and nodes (like configured in the ini file) already before data is put in the database. This would reduce the database's size.
Let me think about this, (this should be something optional by the extracting of the data). It will not limit the size of the download.
<span style="color:darkred"> </span> <span style="color:black"> </span>
Re: Generating Bahn Layouts
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">It is possible to run the extractor during the night or the time when not using the computer.</tr></td></table>
Sadly, my (wireless) Internet connection tends to break when I'm not looking
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">The problem is not to write such a server program but where to put the database and allow a fast extraction of the database for many customer of BAHN.</tr></td></table>
I'm not sure we have *that* many users but I see why it may become a problem. Out of interest, how does it handle changes in the OSM source data? If I re-extract the same area a week later, does it remove the old data, just merge in the changes, etc.?
Sadly, my (wireless) Internet connection tends to break when I'm not looking
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">The problem is not to write such a server program but where to put the database and allow a fast extraction of the database for many customer of BAHN.</tr></td></table>
I'm not sure we have *that* many users but I see why it may become a problem. Out of interest, how does it handle changes in the OSM source data? If I re-extract the same area a week later, does it remove the old data, just merge in the changes, etc.?
-
- Beiträge: 1974
- Registriert: Sonntag 18. April 2004, 17:40
- Wohnort: Nieuwveen (ZH), die Niederlande
- Kontaktdaten:
Re: Generating Bahn Layouts
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> <td><span class="genmed">Zitat:</span></td></tr><tr><td class="quote">But be aware I will do this only once </tr></td></table>
I only need one. [img]icon_rolleyes.gif[/img] But seriously, thanks. [img]icon_wink.gif[/img]
I only need one. [img]icon_rolleyes.gif[/img] But seriously, thanks. [img]icon_wink.gif[/img]
Bahn, immer etwas zu tun. Und ohne Verspätungen, wie die NS.
-
- Beiträge: 27
- Registriert: Donnerstag 8. Mai 2008, 23:56
- Wohnort: Nederland
Re: Generating Bahn Layouts
Hello all,
as promised:
I put version 0.13 online
Where you can process a single OSM file.
On the website the BNA for Alphen aan de Rijn is also available, although is large it is just a nice example.
When restarting the data extractor it will 'merge' new data with the old one.
Of course this could not be done forever due to cleanup the old situation.
But mostly it is very usefull
good luck with it
Bert Tijhuis
as promised:
I put version 0.13 online
Where you can process a single OSM file.
On the website the BNA for Alphen aan de Rijn is also available, although is large it is just a nice example.
When restarting the data extractor it will 'merge' new data with the old one.
Of course this could not be done forever due to cleanup the old situation.
But mostly it is very usefull
good luck with it
Bert Tijhuis