Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

### ? - ?

##### Fixes :wrench:

- Fixed various bugs with `CesiumRasterOverlays::GeoJsonDocumentRasterOverlay`:
- Line width is now factored in to calculations of what geometry is visible in any given tile, reducing the possibility that certain geometry (like perfectly vertical or horizontal lines) would be incorrectly ignored.
- Geometry near the antimeridian, such as lines that need to wrap around the entire globe, will now render correctly without gaps.
- Geometry contained in other objects, such as polygons within feature collections, will no longer cause the geometry to be incorrectly rendered multiple times.

### v0.57.0 - 2026-02-02

##### Additions :tada:
Expand Down
17 changes: 13 additions & 4 deletions CesiumGeospatial/src/GlobeRectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,19 @@ GlobeRectangle::computeUnion(const GlobeRectangle& other) const noexcept {
rectangleWest += CesiumUtility::Math::TwoPi;
}

const double west = CesiumUtility::Math::convertLongitudeRange(
glm::min(rectangleWest, otherRectangleWest));
const double east = CesiumUtility::Math::convertLongitudeRange(
glm::max(rectangleEast, otherRectangleEast));
double west = glm::min(rectangleWest, otherRectangleWest);
double east = glm::max(rectangleEast, otherRectangleEast);

// convertLongitudeRange will wrap values that are greater *or equal* to PI,
// which means a rectangle from [-PI, PI] would be wrapped to [-PI, -PI] - a
// completely different result. This is not what we want.
if (west != CesiumUtility::Math::OnePi) {
west = CesiumUtility::Math::convertLongitudeRange(west);
}

if (east != CesiumUtility::Math::OnePi) {
east = CesiumUtility::Math::convertLongitudeRange(east);
}

return GlobeRectangle(
west,
Expand Down
13 changes: 13 additions & 0 deletions CesiumNativeTests/include/CesiumNativeTests/checkFilesEqual.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <filesystem>

namespace CesiumNativeTests {
/**
* @brief Tests that the contents of `fileA` are equal to the contents of
* `fileB`.
*/
void checkFilesEqual(
const std::filesystem::path& fileA,
const std::filesystem::path& fileB);
} // namespace CesiumNativeTests
19 changes: 19 additions & 0 deletions CesiumNativeTests/src/checkFilesEqual.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <CesiumNativeTests/checkFilesEqual.h>
#include <CesiumNativeTests/readFile.h>

#include <doctest/doctest.h>

#include <cstddef>
#include <filesystem>
#include <vector>

namespace CesiumNativeTests {
void checkFilesEqual(
const std::filesystem::path& fileA,
const std::filesystem::path& fileB) {
const std::vector<std::byte>& bytes = readFile(fileA);
const std::vector<std::byte>& bytes2 = readFile(fileB);

REQUIRE(bytes == bytes2);
}
} // namespace CesiumNativeTests
Loading
Loading