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
13 changes: 7 additions & 6 deletions docs/roadmap/implementation-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ lane, the core libraries, the initial GeoTIFF window reader, the metadata
authoring library, and the first format-specific plugin are built and tested.
The optional libtiff backend now decodes Deflate, LZW, and PackBits windows
through the RandomAccessSource client-I/O boundary. Uncompressed floating-point
predictor windows are decoded in the reader, while broad read planning and converter
sources are not implemented yet. The initial GeoTIFF-to-regular-grid mesh slice is now
connected and tested, including its interactive vertex ceiling, and no release
has been tagged.
predictor windows are decoded in the reader, and read planning, memory budgets,
and tile-boundary cancellation are covered by tests. Converter sources are not
implemented yet. The initial GeoTIFF-to-regular-grid mesh slice is now connected
and tested, including its interactive vertex ceiling, and no release has been
tagged.

Status words, from
[MODULE_README_CONTRACT.md](../contributing/MODULE_README_CONTRACT.md):
Expand Down Expand Up @@ -128,8 +129,8 @@ Detail in [phase-1-raster-core.md](phase-1-raster-core.md).
| `ReadScanlines` | implemented |
| Read planning and range coalescing | implemented |
| I/O counters and amplification reporting | implemented |
| Memory budget enforcement | planned |
| Cancellation at tile boundaries | planned |
| Memory budget enforcement | implemented |
| Cancellation at tile boundaries | implemented |

## Milestone 4 — mesh authoring (in progress, `v0.3.0`)

Expand Down
27 changes: 27 additions & 0 deletions libs/usd-geotiff/tests/test_geotiff_pixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,33 @@ int main() {
usdgeo::DiagnosticCode::Cancelled, diagnostics);
options.isCancelled = {};

diagnostics.Clear();
auto midReadBytes = ReadFile(std::string(FIXTURE_DIR) +
"/geotiff-8x8-uint16-striped.tif");
usdraster::MemorySource midReadSource(midReadBytes.data(),
midReadBytes.size(), "mid-read");
usdraster::RecordingSource midReadRecording(midReadSource);
usdgeotiff::GeoTiffReader midReadReader(midReadRecording);
std::size_t cancellationChecks = 0;
options.isCancelled = [&cancellationChecks] {
return ++cancellationChecks >= 3;
};
grid = usdraster::RasterGrid{};
Check(!midReadReader.ReadWindow({0, 0, 8, 8}, options, &grid,
&diagnostics),
"mid-read cancellation fails the window");
Check(HasCode(diagnostics, usdgeo::DiagnosticCode::Cancelled),
"mid-read cancellation has typed diagnostic");
Check(grid.IsEmpty(), "mid-read cancellation releases the partial grid");
const std::uint64_t midReadPixelOffset = midReadBytes.size() - 128;
std::size_t midReadPixelRanges = 0;
for (const auto& range : midReadRecording.GetRanges()) {
if (range.offset >= midReadPixelOffset) ++midReadPixelRanges;
}
Check(midReadPixelRanges == 1,
"mid-read cancellation stops at a segment boundary");
options.isCancelled = {};

diagnostics.Clear();
CheckIntegerFixture("geotiff-2x2-uint8-striped.tif",
usdraster::RasterDataType::UInt8, 4,
Expand Down
Loading