The International Simutrans Forum

 

Author Topic: Openstreetmap  (Read 6100 times)

0 Members and 1 Guest are viewing this topic.

h4ck3rm1k3

  • Guest
Openstreetmap
« on: April 18, 2010, 03:36:15 PM »
is there anyone working on being able to import openstreetmap data into the game?
any tips on how to start?
mike

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: Openstreetmap
« Reply #1 on: April 18, 2010, 03:58:44 PM »
As far as I know, nobody who migh be working on it has made a public announcement about such an issue. Anyway, I'm afraid you couldn't export all data from OPM to Simutrans, just terrain and roads layouts, but not the street names for example.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10565
  • Languages: De,EN,JP
Re: Openstreetmap
« Reply #2 on: April 18, 2010, 08:39:24 PM »
As short glance at openstreetmap shows maps without height definitions. Those are not suited for simutrans; moreover real connections are not suited to a game map without deleting most of them. (I.e. german would have a very dense net even onely with Autobahns.)

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Openstreetmap
« Reply #3 on: April 18, 2010, 09:38:48 PM »
I just imagine Paris'suburb with all its highways ...

Offline rainer

  • SMSC winner
  • *
  • Posts: 100
Re: Openstreetmap
« Reply #4 on: April 19, 2010, 06:11:27 PM »
Penny, an admin and programmer and me thought about that idea a while ago, but considered it as far too complicated.
I fiddled around with some PHP code using Openstreetmap output, but it still needs a lot of hand made work to have usable results.

Anyway, this would an interesting project. I would really love to be able to convert "real world maps" to .ppm for to use them in Simutrans. For now, I do not see a realistic chance - but that might change in future.

Offline ij

  • *
  • Posts: 41
Re: Openstreetmap
« Reply #5 on: November 29, 2010, 09:25:30 PM »
I'm considering it, SRTM data would be used to get the elevations included. I expect to need very large maps though to make it even slightly real looking and still some pruning is likely to be necessary.

!i!

  • Guest
Re: Openstreetmap
« Reply #6 on: February 12, 2011, 12:12:19 PM »
Hi, I'm coming from the openstreetmap project, too and would like to see if I could do this.

Even if I'm a bit familar with OSM data processing I don't see a simutrans developer documentation. So can anybody tell me further details on the files, their formats ... please?
Think I understood this pak thing only :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10565
  • Languages: De,EN,JP
Re: Openstreetmap
« Reply #7 on: February 12, 2011, 08:27:10 PM »
If you can generate a height map, this could be a good starting point. Other than that I thing I would parse text files during map creations. Something like pairs of x,y coordinates
road=12,23,18,19,...
river=200,41,77,41,...

!i!

  • Guest
Re: Openstreetmap
« Reply #8 on: February 12, 2011, 09:45:54 PM »
Hi, yes generating the PPM raster maps should be an easier step. But how about buildings and infrastructure. How is the scenery file composed? Depend they on the PPK and it's dimensions?

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Openstreetmap
« Reply #9 on: February 12, 2011, 10:00:11 PM »
Not only in the dimension (actually it doesn't matter) but each building's object name, which are different in all paksets. So I guess a generic thing would not be able to deal with buildings; maybe a first step like "city=x,y;size=z" would do the job.
Anyway, and considering how the game deals with scales, I would consider detailing as much as mapping streets in a city something hardly doable (only an oppinion though).

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Openstreetmap
« Reply #10 on: February 12, 2011, 11:21:39 PM »
There is some code that deals with replacing houses instead of compat.tab. A house can be defined just as com/ind/res of level n at x,y. So, this part is perfectly reusable.

!i!

  • Guest
Re: Openstreetmap
« Reply #11 on: February 13, 2011, 07:57:39 AM »
@zeno there can we use an abstraction layer that dispatchs OSM objects into the right names per PAK and that can be addapted by an external config file

@VS Sorry I dont understand. Is there an example input?

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Openstreetmap
« Reply #12 on: February 13, 2011, 08:47:00 AM »
City buildings can be defined as commercial, residential or industrial (com/res/ind), and they have a "level" which determines number of people live in them and how many "mail" they generate/receive (small houses will have low level, while skyscrappers will have a very high one).
Then you could specify a list of buildings like "type=T;level=L;position=X,Y;"; the code that VS says would do the rest and pick a proper building to match your specifications of type and level.

!i!

  • Guest
Re: Openstreetmap
« Reply #13 on: February 13, 2011, 08:49:00 AM »
So are there specific type definitions? What does I have to choose to add e.g. a hospital?

Offline Zeno

  • ENASSA Designer
  • Devotees (Inactive)
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Openstreetmap
« Reply #14 on: February 13, 2011, 09:13:47 AM »
The type is only a generic property, and can only be commercial, residential or industrial. Commercial buildings should look like offices or shops, residential ones like houses or flat buildings, and industrial like small industrial buildings. That is the maximum detail you can get of this. There are only this types, and there are no types such as "hospital" or "supermarket" :(
More deep in this, there are several types of industries (which produce goods, and include supermarkets, coal mines, steel mills, etc), but again these are PAK dependant.

!i!

  • Guest
Re: Openstreetmap
« Reply #15 on: February 13, 2011, 09:23:49 AM »
thanks, this is one first step towards :)

!i!

  • Guest
Re: Openstreetmap
« Reply #16 on: February 14, 2011, 07:51:33 AM »
Well another question: Forests etc. aren't modeled by the heightmap, don't they?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10565
  • Languages: De,EN,JP
Re: Openstreetmap
« Reply #17 on: February 14, 2011, 10:29:36 AM »
No. But it would be very easy to incorporate them, if they are defined in a file.

!i!

  • Guest
Re: Openstreetmap
« Reply #18 on: March 25, 2011, 10:55:24 AM »
You might be interested, that we hope to start a project concerning games at the upcomming Google Summer of Code
http://wiki.openstreetmap.org/wiki/GSoC_Project_Ideas_2011#OSM_4_games