-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented bluetopo, updated gebco, fixed bugs
- Loading branch information
Showing
50 changed files
with
1,823 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Tests for sliderule bluetopo raster support.""" | ||
|
||
import pytest | ||
from pathlib import Path | ||
import sliderule | ||
|
||
TESTDIR = Path(__file__).parent | ||
|
||
sigma = 1.0e-9 | ||
|
||
lon = -80.87 | ||
lat = 32.06 | ||
|
||
file = '/vsis3/noaa-ocs-nationalbathymetry-pds/BlueTopo/BH4SX59B/BlueTopo_BH4SX59B_20241115.tiff' | ||
|
||
expElevation = -2.02 | ||
expUncertainty = 1.00 | ||
expContributor = 31156 | ||
|
||
@pytest.mark.network | ||
class TestBlueTopo: | ||
def test_samples(self, init): | ||
rqst = {"samples": {"asset": "bluetopo-bathy", "bands": ["Elevation", "Uncertainty", "Contributor"]}, "coordinates": [[lon,lat]]} | ||
rsps = sliderule.source("samples", rqst) | ||
assert init | ||
print(rsps) | ||
assert rsps["samples"][0][0]["file"] == file | ||
assert rsps["samples"][0][0]["band"] == "Elevation" | ||
assert rsps['samples'][0][0]['value'] == pytest.approx(expElevation, rel=1e-3) | ||
assert rsps["samples"][0][1]["band"] == "Uncertainty" | ||
assert rsps['samples'][0][1]['value'] == pytest.approx(expUncertainty, rel=1e-3) | ||
assert rsps["samples"][0][2]["band"] == "Contributor" | ||
assert rsps['samples'][0][2]['value'] == expContributor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
message (STATUS "Including bluetopo dataset") | ||
|
||
target_compile_definitions (slideruleLib PUBLIC __bluetopo__) | ||
|
||
target_sources(slideruleLib | ||
PRIVATE | ||
${CMAKE_CURRENT_LIST_DIR}/package/bluetopo.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/package/BlueTopoBathyRaster.cpp | ||
) | ||
|
||
target_include_directories (slideruleLib | ||
PUBLIC | ||
$<INSTALL_INTERFACE:${INCDIR}> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/package | ||
) | ||
|
||
install ( | ||
FILES | ||
${CMAKE_CURRENT_LIST_DIR}/package/bluetopo.h | ||
${CMAKE_CURRENT_LIST_DIR}/package/BlueTopoBathyRaster.h | ||
DESTINATION | ||
${INCDIR}/bluetopo | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Raster sampling support for BlueTopo (The compilation of the nation's best available bathymetric data.) |
Oops, something went wrong.