mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 02:19:13 +01:00
Georeference a new map against a point in Poland
"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.
This commit is contained in:
@@ -32,6 +32,11 @@ class plan_panel : public ui_panel
|
||||
void render_toolbar();
|
||||
void render_gaps();
|
||||
void render_storage();
|
||||
// asks what kind of scenery is being started, and where on the map it sits
|
||||
void render_newmap_dialog();
|
||||
void render_location_dialog();
|
||||
// clears the drawing and sets the point of EPSG:2180 that the scenery's zero stands for
|
||||
void start_map(bool const Georeferenced, double const Originx, double const Originy);
|
||||
// paints the solved plan over the rendered scenery and takes the clicks that build it
|
||||
void handle_scene();
|
||||
void draw_on_scene();
|
||||
@@ -64,4 +69,11 @@ class plan_panel : public ui_panel
|
||||
double m_pendingy{0.0};
|
||||
std::string m_status;
|
||||
char m_path[256]{"editor/plan.m0s"};
|
||||
// location picker: the point being considered, and the view over the schematic map of Poland
|
||||
bool m_pickingplace{false};
|
||||
double m_pickx{0.0};
|
||||
double m_picky{0.0};
|
||||
double m_mapviewx{0.0};
|
||||
double m_mapviewy{0.0};
|
||||
double m_mapscale{0.0};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user