-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed static spec #33
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6041a5b
added examples and json schema
jeffnaus ad94bb6
Updated examples
jeffnaus 96ef14a
added acquisition schema
jeffnaus d71f7c3
Changed to bandwidth
jeffnaus be6221a
Moved DG stuff to an "impementation" folder
jeffnaus 374a188
Modified readme.md and removed obsolete spec
jeffnaus fccf627
Merge branch 'dev' of https://github.com/radiantearth/stac-spec into …
jeffnaus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
25 changes: 25 additions & 0 deletions
25
static-catalog/implementations/DigitalGlobe/example_validator/validate_examples.py
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,25 @@ | ||
import os | ||
import json | ||
from jsonschema import validate, RefResolver | ||
|
||
# find our schema root folder | ||
schema_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "json-schema")) | ||
schema_root_url = "file:///{}/".format(schema_folder.replace('\\', '/')) | ||
|
||
# get the schema and the reference resolver | ||
with open(os.path.join(schema_folder, 'spatiotemporal_feature.json')) as schema_file: | ||
schema = json.load(schema_file) | ||
resolver = RefResolver(schema_root_url, schema) | ||
|
||
# for each example file in the folder validate against the schema | ||
example_directory = os.path.join(os.path.dirname(__file__), '..', 'examples') | ||
for filename in os.listdir(example_directory): | ||
with open(os.path.join(example_directory, filename)) as example_file: | ||
example = json.load(example_file) | ||
|
||
# validate against the schema | ||
validate(example, schema, resolver=resolver) | ||
print('validated {}'.format(filename)) | ||
|
||
|
||
|
320 changes: 320 additions & 0 deletions
320
static-catalog/implementations/DigitalGlobe/examples/DigitalGlobeAcquisition.json
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,320 @@ | ||
{ | ||
"id": "103001004B316600", | ||
"type": "Feature", | ||
"schema": "DigitalGlobeAcquisition", | ||
"geometry": { | ||
"type": "MultiPolygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
[ | ||
-104.9506689, | ||
38.96469654 | ||
], | ||
[ | ||
-105.1608127, | ||
38.95840828 | ||
], | ||
[ | ||
-105.1610212, | ||
39.00241359 | ||
], | ||
[ | ||
-105.1609342, | ||
39.04661305 | ||
], | ||
[ | ||
-105.1605798, | ||
39.09107845 | ||
], | ||
[ | ||
-105.1603734, | ||
39.13571925 | ||
], | ||
[ | ||
-105.1606414, | ||
39.18033946 | ||
], | ||
[ | ||
-105.160482, | ||
39.22534091 | ||
], | ||
[ | ||
-105.1617257, | ||
39.26986031 | ||
], | ||
[ | ||
-105.1614253, | ||
39.31538951 | ||
], | ||
[ | ||
-105.1608883, | ||
39.3612619 | ||
], | ||
[ | ||
-105.1613922, | ||
39.40685628 | ||
], | ||
[ | ||
-105.163213, | ||
39.45187733 | ||
], | ||
[ | ||
-105.1635238, | ||
39.4980186 | ||
], | ||
[ | ||
-105.1622525, | ||
39.54545705 | ||
], | ||
[ | ||
-105.1624777, | ||
39.59229898 | ||
], | ||
[ | ||
-105.1624785, | ||
39.63959411 | ||
], | ||
[ | ||
-105.1636219, | ||
39.68637975 | ||
], | ||
[ | ||
-105.1634848, | ||
39.73439091 | ||
], | ||
[ | ||
-105.1637438, | ||
39.78249578 | ||
], | ||
[ | ||
-105.1642909, | ||
39.83069735 | ||
], | ||
[ | ||
-105.1649241, | ||
39.87919405 | ||
], | ||
[ | ||
-105.165344, | ||
39.92821627 | ||
], | ||
[ | ||
-105.1659454, | ||
39.97750376 | ||
], | ||
[ | ||
-105.1659608, | ||
40.02059078 | ||
], | ||
[ | ||
-104.9357658, | ||
40.04463773 | ||
], | ||
[ | ||
-104.9362418, | ||
40.00097208 | ||
], | ||
[ | ||
-104.9371883, | ||
39.95044437 | ||
], | ||
[ | ||
-104.9376547, | ||
39.90071155 | ||
], | ||
[ | ||
-104.9380541, | ||
39.85136537 | ||
], | ||
[ | ||
-104.9387179, | ||
39.80218228 | ||
], | ||
[ | ||
-104.9394349, | ||
39.75327832 | ||
], | ||
[ | ||
-104.9400211, | ||
39.70483598 | ||
], | ||
[ | ||
-104.9406978, | ||
39.65662621 | ||
], | ||
[ | ||
-104.9412063, | ||
39.60882697 | ||
], | ||
[ | ||
-104.94199, | ||
39.56114115 | ||
], | ||
[ | ||
-104.9429155, | ||
39.51371447 | ||
], | ||
[ | ||
-104.9433825, | ||
39.46682092 | ||
], | ||
[ | ||
-104.9436075, | ||
39.42030036 | ||
], | ||
[ | ||
-104.9441694, | ||
39.37382041 | ||
], | ||
[ | ||
-104.9450015, | ||
39.32748833 | ||
], | ||
[ | ||
-104.9454518, | ||
39.28152803 | ||
], | ||
[ | ||
-104.9459165, | ||
39.23581207 | ||
], | ||
[ | ||
-104.9476415, | ||
39.18976879 | ||
], | ||
[ | ||
-104.9485045, | ||
39.14430328 | ||
], | ||
[ | ||
-104.9491347, | ||
39.09911019 | ||
], | ||
[ | ||
-104.9500794, | ||
39.05402796 | ||
], | ||
[ | ||
-104.9507337, | ||
39.00920829 | ||
], | ||
[ | ||
-104.9506689, | ||
38.96469654 | ||
] | ||
] | ||
] | ||
] | ||
}, | ||
"properties": { | ||
"bands": [ | ||
{ | ||
"common_name": "COASTAL", | ||
"gsd": 2.047, | ||
"center_wavelength": 427.0, | ||
"effective_bandwidth": 62.0 | ||
}, | ||
{ | ||
"common_name": "Blue", | ||
"gsd": 2.047, | ||
"center_wavelength": 478.0, | ||
"effective_bandwidth": 73.0 | ||
}, | ||
{ | ||
"common_name": "Green", | ||
"gsd": 2.047, | ||
"center_wavelength": 546.0, | ||
"effective_bandwidth": 80.0 | ||
}, | ||
{ | ||
"common_name": "Yellow", | ||
"gsd": 2.047, | ||
"center_wavelength": 608.0, | ||
"effective_bandwidth": 48.0 | ||
}, | ||
{ | ||
"common_name": "Red", | ||
"gsd": 2.047, | ||
"center_wavelength": 659.0, | ||
"effective_bandwidth": 70.0 | ||
}, | ||
{ | ||
"common_name": "RedEdge", | ||
"gsd": 2.047, | ||
"center_wavelength": 724.0, | ||
"effective_bandwidth": 50.0 | ||
}, | ||
{ | ||
"common_name": "NIR", | ||
"gsd": 2.047, | ||
"center_wavelength": 833.0, | ||
"effective_bandwidth": 136.0 | ||
}, | ||
{ | ||
"common_name": "NIR", | ||
"gsd": 2.047, | ||
"center_wavelength": 949.0, | ||
"effective_bandwidth": 187.0 | ||
}, | ||
{ | ||
"common_name": "PAN", | ||
"gsd": 0.512, | ||
"center_wavelength": 627.0, | ||
"effective_bandwidth": 361.0 | ||
} | ||
], | ||
"startDateTime": "2015-11-09T18:04:44.203Z", | ||
"endDateTime": "2015-11-09T18:04:44.203Z", | ||
"links": [ | ||
{ | ||
"rel": "self", | ||
"href": "uri of self" | ||
} | ||
], | ||
"feature_type": [ | ||
"GBDXCatalogRecord", | ||
"Acquisition", | ||
"DigitalGlobeAcquisition", | ||
"WV02" | ||
], | ||
"offNadirAngle_min": 17.4232692718506, | ||
"offNadirAngle_start": 17.4232692718506, | ||
"targetAzimuth_min": 39.8670921325684, | ||
"multiResolution_min": 2.01992535591125, | ||
"cloudCover": 8, | ||
"sunAzimuth_max": 168.897964477539, | ||
"targetAzimuth": 52.0153427124023, | ||
"multiResolution": 2.11924600601196, | ||
"catalogID": "103001004B316600", | ||
"panResolution_max": 0.562737643718719, | ||
"timestamp": "2015-11-09T18:04:44.203Z", | ||
"sunAzimuth_min": 168.697967529297, | ||
"targetAzimuth_max": 68.5699844360352, | ||
"sunAzimuth": 168.800811767578, | ||
"sunElevation_min": 32.4971733093262, | ||
"offNadirAngle": 21.3762378692627, | ||
"stereoPair": null, | ||
"platformName": "WORLDVIEW02", | ||
"multiResolution_start": 2.01992535591125, | ||
"sunElevation": 33.0273399353027, | ||
"scanDirection": "Reverse", | ||
"panResolution_end": 0.562737643718719, | ||
"panResolution_start": 0.505126416683197, | ||
"targetAzimuth_end": 39.8670921325684, | ||
"panResolution_min": 0.505126416683197, | ||
"offNadirAngle_max": 25.6806030273438, | ||
"multiResolution_end": 2.24830341339111, | ||
"multiResolution_max": 2.24830341339111, | ||
"sunElevation_max": 33.5694541931152, | ||
"offNadirAngle_end": 25.6806030273438, | ||
"panResolution": 0.530210316181183, | ||
"footprintWkt": "MULTIPOLYGON(((-104.9506689 38.96469654, -105.1608127 38.95840828, -105.1610212 39.00241359, -105.1609342 39.04661305, -105.1605798 39.09107845, -105.1603734 39.13571925, -105.1606414 39.18033946, -105.160482 39.22534091, -105.1617257 39.26986031, -105.1614253 39.31538951, -105.1608883 39.3612619, -105.1613922 39.40685628, -105.163213 39.45187733, -105.1635238 39.4980186, -105.1622525 39.54545705, -105.1624777 39.59229898, -105.1624785 39.63959411, -105.1636219 39.68637975, -105.1634848 39.73439091, -105.1637438 39.78249578, -105.1642909 39.83069735, -105.1649241 39.87919405, -105.165344 39.92821627, -105.1659454 39.97750376, -105.1659608 40.02059078, -104.9357658 40.04463773, -104.9362418 40.00097208, -104.9371883 39.95044437, -104.9376547 39.90071155, -104.9380541 39.85136537, -104.9387179 39.80218228, -104.9394349 39.75327832, -104.9400211 39.70483598, -104.9406978 39.65662621, -104.9412063 39.60882697, -104.94199 39.56114115, -104.9429155 39.51371447, -104.9433825 39.46682092, -104.9436075 39.42030036, -104.9441694 39.37382041, -104.9450015 39.32748833, -104.9454518 39.28152803, -104.9459165 39.23581207, -104.9476415 39.18976879, -104.9485045 39.14430328, -104.9491347 39.09911019, -104.9500794 39.05402796, -104.9507337 39.00920829, -104.9506689 38.96469654)))", | ||
"targetAzimuth_start": 68.5699844360352, | ||
"sensorPlatformName": "WORLDVIEW02", | ||
"plaform": "WV02", | ||
"instrument": "VNIR", | ||
"provider": "DigitalGlobe", | ||
"license": "(C) COPYRIGHT 2016 DigitalGlobe, Inc., Longmont CO USA 80503" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the idea in the feature_type that the above feature_type's would all have schemas that fields in this record would validate against? Or is it just meant to be informative in some way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That list is more because that is how our current catalog "tags" the records, so that you can search for and find all WV02 related records (not just acquisitions) for instance. There is a singular type, DigitialGlobeAcquisition that this record would validate against.