News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Openstreetmap

Started by h4ck3rm1k3, April 18, 2010, 03:36:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

h4ck3rm1k3

is there anyone working on being able to import openstreetmap data into the game?
any tips on how to start?
mike

vilvoh

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.

Escala Real...a blog about Simutrans in Spanish...

prissi

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.)

gauthier

I just imagine Paris'suburb with all its highways ...

rainer

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.

ij

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!

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 :)

prissi

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!

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?

Zeno

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).

VS

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.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

!i!

@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?

Zeno

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!

So are there specific type definitions? What does I have to choose to add e.g. a hospital?

Zeno

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!

thanks, this is one first step towards :)

!i!

Well another question: Forests etc. aren't modeled by the heightmap, don't they?

prissi

No. But it would be very easy to incorporate them, if they are defined in a file.

!i!

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