The International Simutrans Forum

 

Author Topic: [r7122] Town Hall partially engulfed by neighbouring city  (Read 2840 times)

0 Members and 1 Guest are viewing this topic.

Offline dree12

  • *
  • Posts: 5
  • Languages: EN, EO, FR, ZH
[r7122] Town Hall partially engulfed by neighbouring city
« on: April 13, 2014, 04:31:10 PM »
Over the years, the southern city of Hillmouth has expanded its borders northward, so that they overlap with Newmouth's borders.


Newmouth's Town Hall is partially in the zone of overlap:


The northmost two squares of this Town Hall display the correct city screen:


However, the southmost two squares are displaying Hillmouth's city screen instead:


Since this is Newmouth's Town Hall, the expected behaviour would be that any square of the Town Hall displays Newmouth's city screen. However, Hillmouth's expanding borders seem to have engulfed part of the Town Hall.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9438
  • Languages: De,EN,JP
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #1 on: April 13, 2014, 09:43:01 PM »
Yes that is well know and not considerated a bug.

Offline dree12

  • *
  • Posts: 5
  • Languages: EN, EO, FR, ZH
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #2 on: April 14, 2014, 12:19:53 AM »
Why is this not considered a bug? If it is intended behaviour, that seems strange... Maybe it is too difficult to fix?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5454
  • Languages: EN, NO
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #3 on: April 14, 2014, 08:38:23 AM »
Can this in theory cause Hillmouth to completely lose its city hall, by all the city hall's tiles being assigned to Newmouth?

Offline IgorEliezer br

  • Devotee
  • Administrator
  • *
  • Posts: 4083
  • Cake recipes are cool... REALLY!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #4 on: April 14, 2014, 08:57:42 AM »
I sometimes think that Simutrans should have municipality boundaries. Even if a city spreads beyond the boundary, the "off-limits" buildings would be then part of another municipality.
« Last Edit: April 14, 2014, 09:12:09 AM by IgorEliezer »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5454
  • Languages: EN, NO
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #5 on: April 14, 2014, 09:55:04 AM »
The problem seems to be that boundaries in Simutrans are rectangles. I don't see how municipalities are going to help. Cities do grow and their limits will follow in time, until some point. The exact detail probably vary with time and place. (Norway used to have municipalites that were cities and municpalities that were not. The former used to devour the latter as they grew, piece by piece or whole. Now there is no formal concept of cities, just municipalites, of which just a few are "fully" urban.)

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #6 on: April 14, 2014, 11:46:06 AM »
how difficult would it be to merge cities that have grown into each other?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4564
  • Languages: EN, DE, AT
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #7 on: April 14, 2014, 12:06:12 PM »
Technically, the townhall still belongs to its original city. Clicking on it does open the wrong window.

@AEO: merging is simple. It is more difficult to decide when to merge.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #8 on: April 14, 2014, 12:09:21 PM »
I would consider, maybe, 40% overlap of borders, or higher, to be a candidate for merging.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9438
  • Languages: De,EN,JP
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #9 on: April 14, 2014, 12:29:23 PM »
Ok, bringing up the wrong screen is a bug, overlapping cities not. (A similar problem happens with the industry connect tool, which only works on the upper tiles.)

Back to topic: we can try to to enforce non-overlapping city limits. That way a rural area between two cities would be found.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5454
  • Languages: EN, NO
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #10 on: April 14, 2014, 12:55:17 PM »
I don't think cities normally merge when growing into each other. Altough one city tends to be the main city in the metropolitan area, I don't have the impression that it has any juristiction over the other cities. Nor does it seem right that there must be rural area between them.

If a town hall does have a distinct link to the city/town it belongs to, then one can perhaps code something that makes sure its building tiles belong to its city. One could perhaps even go as far as to associate building tiles with the closest town hall, among the town halls of overlapping town boundaries. (I haven't tried looking at the code for this.)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4564
  • Languages: EN, DE, AT
Re: [r7122] Town Hall partially engulfed by neighbouring city
« Reply #11 on: April 17, 2014, 09:29:19 AM »
@dree12: the bug in the first post should be fixed in nightly r7147. thanks for the report.