Loading...
Searching...
No Matches
xyz_tiles.h
Go to the documentation of this file.
84 if (!std::isfinite(latitude) || !std::isfinite(longitude) || std::abs(latitude) > latitudeLimit ||
155 const auto opposite = XyzTiles::geographic(double(base.lastX) + 1, double(base.lastY) + 1, base.zoom);
160 if (zoom < minZoom || zoom > base.zoom) throw std::runtime_error("Zoom outside the XYZ export plan");
Forward and inverse WGS-84 Transverse Mercator conversion for one UTM zone.
Definition map_projection.h:46
double scale(double latitude, double longitude) const
Estimate local UTM point scale at a geographic position.
Definition map_projection.h:85
Convert Web-Mercator geographic coordinates to canonical XYZ addresses.
Definition xyz_tiles.h:55
static std::pair< double, double > geographic(double x, double y, int zoom)
Convert fractional tile coordinates back to latitude/longitude.
Definition xyz_tiles.h:92
static double groundPixel(int zoom, double latitude)
Ground metres per pixel at a latitude after Mercator scale correction.
Definition xyz_tiles.h:71
static std::filesystem::path path(const std::filesystem::path &root, int zoom, std::uint32_t x, std::uint32_t y)
Build the canonical zoom/x/y.jpeg path after range validation.
Definition xyz_tiles.h:105
static std::pair< double, double > pixel(std::uint64_t x, std::uint64_t y, int zoom)
Return the geographic centre of one global pixel address.
Definition xyz_tiles.h:100
static constexpr double latitudeLimit
Definition xyz_tiles.h:60
static std::pair< double, double > tileCoordinate(double latitude, double longitude, int zoom)
Convert WGS-84 latitude/longitude to fractional tile coordinates.
Definition xyz_tiles.h:83
static double dimension(int zoom)
Number of tiles across one axis at this zoom level.
Definition xyz_tiles.h:62
static double metresPerPixel(int zoom)
Equatorial Web-Mercator metres per pixel at this zoom.
Definition xyz_tiles.h:67
Own the survey mapper's validated configuration and mode defaults.
Convert between WGS-84 coordinates and one local UTM grid.
Definition camera_optics.h:32
Fully parsed settings shared by orthomap and XYZ export.
Definition map_config.h:41
std::size_t size() const
Count all requested tiles across the configured zoom pyramid.
Definition xyz_tiles.h:165
XyzPlan(const MapConfig &config)
Construct a bounded tile pyramid from the configured geographic bounds.
Definition xyz_tiles.h:128
void checkOutput(const std::filesystem::path &root) const
Reject any existing tile or partial file in the output plan.
Definition xyz_tiles.h:189
MapConfig workingConfig(const MapConfig &original) const
Derive the padded UTM working-grid settings needed for resampling.
Definition xyz_tiles.h:171
XyzRange range(int zoom) const
Return the aligned tile rectangle at a zoom within this plan.
Definition xyz_tiles.h:159