The International Simutrans Forum

 

Author Topic: Reduction of endorheic lakes  (Read 4077 times)

0 Members and 1 Guest are viewing this topic.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5523
  • Languages: EN, NO
Reduction of endorheic lakes
« on: January 18, 2014, 09:16:17 PM »
For the first time in years I generated a new map today. What struck me was the (relatively) huge number of rivers ending in tiny lakes, often located a short distance from the main seas representing the global water level. I think this really ought to be fixed, so that rivers continue out from these tiny lakes and down to the global water level. How difficult is this to achieve?

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Reduction of endorheic lakes
« Reply #1 on: January 21, 2014, 07:11:48 AM »
At the moment rivers connect hills to water. There would need to be another pass connecting lakes to seas/oceans/lower lakes. Wouldn't be impossible at a guess...

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Reduction of endorheic lakes
« Reply #2 on: January 21, 2014, 08:16:12 AM »
I like the idea!


Sent from my iPhone using Tapatalk

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5523
  • Languages: EN, NO
Re: Reduction of endorheic lakes
« Reply #3 on: January 21, 2014, 04:14:12 PM »
Connecting all lakes downwards may be too much, and to do so, the river limit would have to be violated.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9507
  • Languages: De,EN,JP
Re: Reduction of endorheic lakes
« Reply #4 on: January 21, 2014, 04:30:58 PM »
Why, it is the same river, only temporary widening as a loke like in reality.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5523
  • Languages: EN, NO
Re: Reduction of endorheic lakes
« Reply #5 on: January 21, 2014, 05:21:58 PM »
Why, it is the same river, only temporary widening as a loke like in reality.

And that shouldn't require a second pass, or?

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Reduction of endorheic lakes
« Reply #6 on: January 21, 2014, 06:33:00 PM »
At the moment rivers start on a tile which is classed as a hill, and end on a tile which is classed as water. They won't travel through lakes to get to the sea, and one end has to be on land. Therefore there'd need to be a second pass. Or you'd need to alter the existing pass to give the potential for both ends to be water.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5523
  • Languages: EN, NO
Re: Reduction of endorheic lakes
« Reply #7 on: January 21, 2014, 07:16:34 PM »
I thought more like just keep going, even through water, until either the edge of the world is reached, or the global water level.

Just doing a second pass may not be enough, because that may just end in another lake. Then you'd need a third pass, and maybe a fourth pass.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9507
  • Languages: De,EN,JP
Re: Reduction of endorheic lakes
« Reply #8 on: January 21, 2014, 10:38:01 PM »
You can detect the sea by pos.z <= water level. That is not a big issue. The only question remains, whether lake are then hit or most river bypass the lakes. In this regard, a second pass sound much more sensible, so all lakes above ground water level have a flow up to the sea.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Reduction of endorheic lakes
« Reply #9 on: January 21, 2014, 11:50:00 PM »
2 passes should be enough - imagine you have lakes A (highest), B, C and D (lowest). On the first pass a river terminates at lake A. On the second each lake attempts to connect to a body of water of a lower height than itself. Therefore A connects to B, C, D or the sea, B connects to C, D or the sea, C connects to D or the sea and D connects to the sea. Whichever choices are made regarding connections all bodies of water will end up connected to the sea.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5523
  • Languages: EN, NO
Re: Reduction of endorheic lakes
« Reply #10 on: January 22, 2014, 05:59:42 AM »
2 passes should be enough - imagine you have lakes A (highest), B, C and D (lowest). On the first pass a river terminates at lake A. On the second each lake attempts to connect to a body of water of a lower height than itself. Therefore A connects to B, C, D or the sea, B connects to C, D or the sea, C connects to D or the sea and D connects to the sea. Whichever choices are made regarding connections all bodies of water will end up connected to the sea.

Yes, but that requires that the second pass has to ignore the river limit. That means that there is no longer any direct means of controlling how much time is spent creating rivers, as it depends on how many lakes are formed. Not a show-stopper, but an issue to have in mind. The setting for number of rivers becomes a setting for the number of mountain springs, which it already is, except that the two are the same now.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Reduction of endorheic lakes
« Reply #11 on: January 22, 2014, 01:11:51 PM »
Unless you subtract from the number of springs the number of lakes, thus preserving the overall limit.
Another issue is the fact that the outlet of a lake should be at least as big as the biggest inlet.


Sent from my iPhone using Tapatalk

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5523
  • Languages: EN, NO
Re: Reduction of endorheic lakes
« Reply #12 on: January 22, 2014, 04:58:46 PM »
Unless you subtract from the number of springs the number of lakes, thus preserving the overall limit.
Another issue is the fact that the outlet of a lake should be at least as big as the biggest inlet.

The number of springs minus the number of lakes might easily be negative. It certainly was for my map. I'm not sure Simutrans bothers keeping a count of lakes at the moment, but that shouldn't be too hard to add. The size of the river would be preserved by default if a single pass is used. A possible problem with a single pass, is that it is easy to have two or more rivers running both into and out of a lake. Although there does exist lakes with two natrual outlets, these are rare, and I've never heard of any with three or more. (I know of a lake with 1.1 outlets.)


Sent from something that doesn't spam.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9507
  • Languages: De,EN,JP
Re: Reduction of endorheic lakes
« Reply #13 on: January 22, 2014, 05:09:03 PM »
Since this is done by the waysearch, one can certainly avoid a second outlet. That is rather trivial compared to fin the nearest sea-level body of water ...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5523
  • Languages: EN, NO
Re: Reduction of endorheic lakes
« Reply #14 on: January 22, 2014, 05:38:00 PM »
Rivers did manage to find a way to sea-level before. Sometimes by an odd route, but that's a different issue, and sometimes realistic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9507
  • Languages: De,EN,JP
Re: Reduction of endorheic lakes
« Reply #15 on: January 22, 2014, 09:48:32 PM »
Well, finding and efficiently finding the next body of water are two pair of shoes. But I have some ideas to get this with decent speed.