Skip to main content

CalculateCity

Calculate the city name based on the provided coordinates. Compared to CalculateZone, cities define larger areas (actual cities) than zones, which can be smaller parts of cities or rural areas.

Initialization

The first time this function is called, it initializes the zones and cities data using InitZonesAndCities.

Return Value For Unknown City

If the city cannot be determined, the function returns "Unbekannt". It's the German word for Unknown. This return value may change in future versions to more universal English term Unknown.

Parameters:

  • posX: X coordinate as float
  • posY: Y coordinate as float
  • posZ: Z coordinate as float

Returns: City name as string, or "Unbekannt" if not found

Signature:

CalculateCity(posX, posY, posZ)