mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 06:49:18 +02:00
"New map" now asks what is being started. A fictional scenery keeps its own frame, where coordinates mean nothing outside it. A real one pins the scenery's zero to a point picked off a map of Poland, so the plan is drawn in EPSG:2180 - the frame the layout library already works in, and the one Geoportal serves imagery in. The projection is the standard transverse Mercator series for PUWG 1992 on GRS80. Checked against known values: the central meridian comes out at easting 500000 exactly, Warszawa at 637382/486757, Krakow at 567614/244588, Gdansk at 477038/720937. The map behind the picker is a schematic border outline plus the larger cities, projected from geographic coordinates on first use. It is coarse on purpose - it is there to point at a region, not to measure against - and the dialog says so. No network is involved.
35 lines
802 B
C++
35 lines
802 B
C++
/*
|
|
This Source Code Form is subject to the
|
|
terms of the Mozilla Public License, v.
|
|
2.0. If a copy of the MPL was not
|
|
distributed with this file, You can
|
|
obtain one at
|
|
http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
namespace editor
|
|
{
|
|
|
|
// a named point to start a scenery from, in EPSG:2180 metres
|
|
struct map_place
|
|
{
|
|
std::string name;
|
|
glm::dvec2 position;
|
|
};
|
|
|
|
// schematic outline of the country's border, in EPSG:2180 metres. coarse on purpose: it is here so
|
|
// a region can be pointed at, not so anything can be measured against it
|
|
std::vector<glm::dvec2> const &poland_outline();
|
|
|
|
// larger cities, to put the view somewhere recognisable before picking the exact spot
|
|
std::vector<map_place> const &poland_places();
|
|
|
|
} // namespace editor
|