Generating Bahn Layouts

This area is dedicated to our foreign guests of this forum. Contributions can be written in any language.
[Diese Kategorie ist den ausländischen Gästen dieses Forums gewidmet. Beiträge können in beliebiger Sprache verfasst werden.]
BertTijhuis
Beiträge: 27
Registriert: Donnerstag 8. Mai 2008, 23:56
Wohnort: Nederland

Re: Generating Bahn Layouts

Beitrag von BertTijhuis »

Please run first the S option (Start the extractor)


It will create the view such as node_total and extract the data from the Openstreetmap server.
Also on you're local desktop/laptop a 'cache' directory will be created.
Within this directory a lot of files will be placed during the extraction moment.


It realy takes a long time to extract some data.

After a certain while it is possible to start a second box and run the generator (G) at the same time.


Good luck
BertTijhuis
Beiträge: 27
Registriert: Donnerstag 8. Mai 2008, 23:56
Wohnort: Nederland

Re: Generating Bahn Layouts

Beitrag von BertTijhuis »

Sorry to tell you
The're was a bug in the extractor. It didn't create the view.
I've uploaded the ops2jbss_0161 package solving this bug.
Please download (latest version) and run firstly the extractor. It will create now the view.

Regards, Bert TIjhuis
stpunktgpunkt
Beiträge: 73
Registriert: Mittwoch 31. Januar 2007, 16:38
Wohnort: Chur, Graubünden, Schweiz
Kontaktdaten:

Re: Generating Bahn Layouts

Beitrag von stpunktgpunkt »

thank you
now it works via import from openstreetmap.
but the import from an osm-file still produces just empty files.
BertTijhuis
Beiträge: 27
Registriert: Donnerstag 8. Mai 2008, 23:56
Wohnort: Nederland

Re: Generating Bahn Layouts

Beitrag von BertTijhuis »

Hello,
After processing the XML files it generates an 0 bytes file to indicate that this file is already processed.

There is maybe a better solution for this (within a processing table) but till now this is what I can offer you

It is an idea to work on for one of the next releases.

Regards, Bert Tijhuis
stpunktgpunkt
Beiträge: 73
Registriert: Mittwoch 31. Januar 2007, 16:38
Wohnort: Chur, Graubünden, Schweiz
Kontaktdaten:

Re: Generating Bahn Layouts

Beitrag von stpunktgpunkt »

when i import an osm-file, also the file ".gisdata" and the bna-output-file are empty.
BertTijhuis
Beiträge: 27
Registriert: Donnerstag 8. Mai 2008, 23:56
Wohnort: Nederland

Re: Generating Bahn Layouts

Beitrag von BertTijhuis »

Hello stpunktgpunkt

This is only happening when you're directly start up the script and use the G
(in this case the database is not created and empty)

See below:

OpenStreetMap for JBSS BNA Output Menu

V. View Params
C. Change Params
K. Customize Road and Railtypes

S. Start Extractor
O. Read in one XML (OSM file) (Specify this as -> o MAP.OSM
G. Generate BNA input file

CCA. Clean Cache Area
CDB. Clean SQlite Database

E. End
Choise ?: >


First choose C and walk through the options

The start the extractor S and wait for a certain period of time (mostly at least 30 minutes)

After this start the G (generator) now at least the .gisdata file should contain some data en the BNA file could be generated

Good luck
BertTijhuis
Beiträge: 27
Registriert: Donnerstag 8. Mai 2008, 23:56
Wohnort: Nederland

Re: Generating Bahn Layouts

Beitrag von BertTijhuis »

Due to a newer version of the API of OpenStreetmap. The download posibility was n't available anymore since 20 april 2009.
I've changed the code.

Please download the latest version when you want to use a working version

Regards, Bert Tijhuis
Signaller 76

Re: Generating Bahn Layouts

Beitrag von Signaller 76 »

Hey, Bert.

Would it be possible to have option to remove paths, pedestrian ways, cycleways but have residential streets intact? Also would it be possible to set the water lines as scenery water, not path for boats.

Many thanks.
Gast

Re: Generating Bahn Layouts

Beitrag von Gast »

Hello Signaller 76

Of course this will be possible, but I've to dig through the code and do maybe some changes to the code,
I hope to finish this within 2 weeks from now with an update of the program(s)

Regards, Bert Tijhuis
Signaller761

Re: Generating Bahn Layouts

Beitrag von Signaller761 »

Hello,

Thanks for quick response. After I get rid of those tracks and paths I might try to generate 400km x 400km mega layout representing about 30% of whole country.
BertTijhuis
Beiträge: 27
Registriert: Donnerstag 8. Mai 2008, 23:56
Wohnort: Nederland

Re: Generating Bahn Layouts

Beitrag von BertTijhuis »

Hello Signaller and all other readers of this message

I've just published version 0.18 on the website: http://www.xs4all.nl/~wanl0049/ops2jbss/

From now it is possible to Customize
- the roads
- the rail
- water more specific on all kind of detail

Please use K. Customize to use this

Road Types

[B0->Bus way, dark gray]
[B1->ditto, light gray]
[B2->ditto, red gray]
[B3->ditto, concrete gray]
[M0->Road (scenery, no bus way), with white lines, dark gray]
[M1->ditto, light gray]
[M2->ditto, red gray]
[M3->ditto, concrete gray]
[N0->Road (scenery, no bus way), without white lines, dark gray]
[N1->ditto, light gray]
[N2->ditto, red gray]
[N3->ditto, concrete gray]
[NONE->Don\t want this kind of track]
[P0->Path (no driving way)]
[P1->Path (bus way, since BAHN 3.83)]
Road Type Motorway?: M0>

Type NONE is now possible for all types of ROADs, RAILs and Water

...
Road Types

[B0->Bus way, dark gray]
[B1->ditto, light gray]
[B2->ditto, red gray]
[B3->ditto, concrete gray]
[M0->Road (scenery, no bus way), with white lines, dark gray]
[M1->ditto, light gray]
[M2->ditto, red gray]
[M3->ditto, concrete gray]
[N0->Road (scenery, no bus way), without white lines, dark gray]
[N1->ditto, light gray]
[N2->ditto, red gray]
[N3->ditto, concrete gray]
[NONE->Don\t want this kind of track]
[P0->Path (no driving way)]
[P1->Path (bus way, since BAHN 3.83)]
Road Type cycleway?: NONE>

...

Rail Types

[NONE->Don\t want this kind of track]
[R0->Track on road, dark gray]
[R1->ditto, light gray]
[R2->ditto, red gray]
[R3->ditto, concrete gray]
[T0->Track on own trackbed, concrete sleepers]
[T1->ditto, wooden sleepers]
[T2->ditto, lawn track (grassy)]
[T3->ditto, local line track (less sleepers, gravel)]
Rail Type rail?: T0>
...

Water Types

[NONE->Don\t want this kind of track]
[W0->Water way (driving way for ships)]
[W1->Water (river/lake/sea, no driving way)]
Natural Water?: W1>

Good luck
:? :lol:
Bert Tijhuis
Signaller761

Re: Generating Bahn Layouts

Beitrag von Signaller761 »

Thank you for quick response. Going to try that today. Now the only problem lies in too many control points which destroy the routes when building the layout in import stage. Perhaps your program could in future ignore too close waypoints of same path/road and have some sort of minimum radius to give jbss line builder more space to build the lines.
Chris
Beiträge: 175
Registriert: Donnerstag 24. Mai 2007, 03:26
Wohnort: Cardiff

Re: Generating Bahn Layouts

Beitrag von Chris »

[s]Having left the generator running overnight on a fast box with a fast connection, should I still be seeing "SQL process" lines and log entries after a whole day? Many of these are not corresponding with files in the cache directory, and the number of .PROCESSED files is not increasing.[/s]

Cleaned out the cache and the database, started it off again, took around 12-18 hours to process what turned out to be over 250MB of data. I suspect something got stuck somewhere the previous time. The only problem now is that some paths aren't being shown in the layout, though I don't know if perhaps this is because the path becomes obstructed by some other object in the layout being built first.
BertTijhuis
Beiträge: 27
Registriert: Donnerstag 8. Mai 2008, 23:56
Wohnort: Nederland

Re: Generating Bahn Layouts

Beitrag von BertTijhuis »

Hello Chris:
You're saying
"
s]Having left the generator running overnight on a fast box with a fast connection, should I still be seeing "SQL process" lines and log entries after a whole day? Many of these are not corresponding with files in the cache directory, and the number of .PROCESSED files is not increasing.[/s]




Cleaned out the cache and the database, started it off again, took around 12-18 hours to process what turned out to be over 250MB of data. I suspect something got stuck somewhere the previous time. The only problem now is that some paths aren't being shown in the layout, though I don't know if perhaps this is because the path becomes obstructed by some other object in the layout being built first.

"

This is correct, but normalwise old data that was missing should be added.
Only when the data is older than a certain period than it become invalid and will be deleted and new data will be added.

Otherwise forward me the details of you're plan and I could test this
Regards, Bert
Chris
Beiträge: 175
Registriert: Donnerstag 24. Mai 2007, 03:26
Wohnort: Cardiff

Re: Generating Bahn Layouts

Beitrag von Chris »

The resulting BNA file is something like 4MB,

Screenshot:
Bild

The map, at approximately the same scale: http://osm.org/go/euNKVcP--

Missing ways include 24540306, 25959301 and 32209690. I thought it might be a tagging issue, but 23036064 and 23887463 are built as normal. (Also, since I'm the one that put them I suspect that it may be failing at the import stage because the path of the way is obstructed somewhere.

This case isn't particularly urgent, I've got a long way to go before I get to running any buses up that way.

Config:

Code: Alles auswählen

centerx      = -4.065
centery      = 51.74
elements     = 64
elements_in  = 32
cache        = cache
cache_age    = 50
outputname   = xxx
bnaversion   = 3840
gis_data     = .gisdata
method			 = U
ellips			 = International
minx				 = 13184
miny				 = 13184
maxx				 = 19584
maxy				 = 19584
index				 = 0,0
printtext		 = Y
showrail		 = RST
railtracks	 = 1
showrailstop = RST
showroad     = MPSTU
showroadstop = Y
showwater		 = N
fillwater    = N
showwood		 = N
fillwood    = N
showresidental =  N
fillresidental = N
showindustry =  N
fillindustry = N
showother =  N
fillother = N
roadtype_motorway  	 		   = M0
roadtype_motorway_link		 = M0
roadtype_trunk				     = M0
roadtype_trunk_link				 = M0
roadtype_primary				   = B0
roadtype_primary_link		   = B0
roadtype_secondary				 = N0
roadtype_tertiary				   = N1
roadtype_residental				 = N1
roadtype_unclassified			 = N2
roadtype_track				     = P0
roadtype_living_street		 = P0
roadtype_pedestrian				 = P0
roadtype_cycleway				   = P0
roadtype_footway				   = P0
roadtype_steps				     = P0
roadtype_bridleway				 = P0
roadtype_cycle_lane				 = P0
roadtype_cycle_track			 = P0
roadtype_grade1				     = P0
roadtype_grade2				     = P0
roadtype_grade3				     = P0
roadtype_grade4				     = P0
rail_rail				           = T0
rail_subway				         = T3
rail_light_rail				     = T3
rail_tram				           = R0
water_natural				       = NONE
water_coastline				     = W1
water_river			           = NONE
water_canal		             = NONE
water_stream               = NONE
water_drain                = NONE
Antworten