mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-28 21:37:31 +01:00
feat(editor): heightmap terrain from the terrain model of GUGiK, fitted to the tracks of the scenery
- editorNmt: squares of 500 m of the NMT at 1 m from the WCS service of geoportal.gov.pl, as GeoTIFF, fetched in the background, kept in editor/cache/nmt and sampled in the coordinates of the scenery, placed as its orthophoto is - the terrain panel's Terrain model section: Fit to the tracks moves the model up or down by the median of the differences to the formation of the tracks (Biała Podlaska, built at 0: -145.73 m, 0.28 m around it); Along the tracks and Around the camera make the chunks as the model comes in; each path gets its formation and slopes 1:1.5 as a modifier of the terrain, laid over each other into one corridor, bridges and tunnels keep the model; the orthophoto is turned on and laid onto the new ground - the http client of the orthophoto in editorHttp, shared; fill_from_nearest in editormodeshared.h - after the generator of Hirek (MaszynaTerrainGenerator): the WCS requests, the cache of squares, the corridor by envelopes - self-tests nmtfit, nmtmake, nmtwait
This commit is contained in:
44
editor/editorHttp.hpp
Normal file
44
editor/editorHttp.hpp
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
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 <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// a minimal blocking https GET for the services the editor fetches its aids from (orthophoto, terrain model)
|
||||
namespace editor_http
|
||||
{
|
||||
|
||||
// true to give the transfer up
|
||||
using stop_check = std::function<bool()>;
|
||||
|
||||
// one instance per worker thread
|
||||
class client
|
||||
{
|
||||
public:
|
||||
client();
|
||||
~client();
|
||||
client(client const &) = delete;
|
||||
client &operator=(client const &) = delete;
|
||||
|
||||
bool get(std::string const &Url, std::vector<std::uint8_t> &Out, std::string &Error, stop_check const &Stop);
|
||||
|
||||
private:
|
||||
struct platform;
|
||||
std::unique_ptr<platform> m_platform;
|
||||
};
|
||||
|
||||
// whether this build can fetch anything
|
||||
bool available();
|
||||
|
||||
} // namespace editor_http
|
||||
Reference in New Issue
Block a user