-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from noaa-ocs-modeling/develop
workflow updates and link fixes
- Loading branch information
Showing
8 changed files
with
179 additions
and
41 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,17 @@ | ||
import numpy | ||
|
||
from seabed.ngdc import NGDCSeabedDescriptions | ||
|
||
if __name__ == '__main__': | ||
# define bounds | ||
bounds = numpy.array([[-77, 39], [-75, 40]]) | ||
|
||
# retrieve a list of the first 5 surveys | ||
first_5_surveys = NGDCSeabedDescriptions.all_surveys()[:5] | ||
|
||
# get surveys within specific bounds | ||
seabed_object = NGDCSeabedDescriptions(surveys=first_5_surveys, bounds=bounds) | ||
surveys_within_bounds = seabed_object.surveys | ||
|
||
print(f'all surveys: {first_5_surveys}') | ||
print(f'surveys within transformed bounds: {surveys_within_bounds}') |
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,28 @@ | ||
import numpy | ||
from pyproj import CRS, Transformer | ||
|
||
from seabed.ngdc import NGDCSeabedDescriptions | ||
|
||
if __name__ == '__main__': | ||
# define bounds | ||
bounds = numpy.array([[-77, 39], [-75, 40]]) | ||
|
||
# transform bounds to desired CRS | ||
source_crs = CRS.from_epsg(4326) | ||
transformed_crs = CRS.from_epsg(32618) | ||
transformed_bounds = numpy.ravel( | ||
numpy.stack( | ||
Transformer.from_crs(source_crs, transformed_crs).transform(bounds[:, 0], bounds[:, 1]), | ||
axis=1, | ||
) | ||
) | ||
|
||
# retrieve a list of the first 5 surveys | ||
first_5_surveys = NGDCSeabedDescriptions.all_surveys()[:5] | ||
|
||
# get surveys within specific bounds | ||
seabed_object = NGDCSeabedDescriptions(surveys=first_5_surveys, bounds=transformed_bounds, crs=transformed_crs) | ||
surveys_within_bounds = seabed_object.surveys | ||
|
||
print(f'all surveys: {first_5_surveys}') | ||
print(f'surveys within transformed bounds: {surveys_within_bounds}') |
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