-
Couldn't load subscription status.
- Fork 284
capture dct:spatial as bbox, if it contains a box #963
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
Open
pvgenuchten
wants to merge
1
commit into
geopython:master
Choose a base branch
from
pvgenuchten:if_dct_spatial_has_a_box
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
This file contains hidden or 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 hidden or 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
15 changes: 15 additions & 0 deletions
15
tests/resources/9250AA67-F3AC-6C12-0CB9-0662231AA181_dc2.xml
This file contains hidden or 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,15 @@ | ||
| <?xml version="1.0" encoding="ISO-8859-1"?> | ||
| <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | ||
| <rdf:Description rdf:about="https://doi.org/10.3390/rs12142299"> | ||
| <dct:license>Open Access</dct:license> | ||
| <dc:description>In viticulture, detailed spatial information about actual evapotranspiration (ETa) and vine water status within a vineyard may be of particular utility when applying site-specific, precision irrigation management. Over recent decades, extensive research has been carried out in the use of remote sensing energy balance models to estimate and monitor ETa at the field level. However, one of the major limitations remains the coarse spatial resolution in the thermal infrared (TIR) domain. In this context, the recent advent of the Sentinel missions of the European Space Agency (ESA) has greatly improved the possibility of monitoring crop parameters and estimating ETa at higher temporal and spatial resolutions. In order to bridge the gap between the coarse-resolution Sentinel-3 thermal and the fine-resolution Sentinel-2 shortwave data, sharpening techniques have been used to downscale the Sentinel-3 land surface temperature (LST) from 1 km to 20 m. However, the accurate estimates of high-resolution LST through sharpening techniques are still unclear, particularly when intended to be used for detecting crop water stress. The goal of this study was to assess the feasibility of the two-source energy balance model (TSEB) using sharpened LST images from Sentinel-2 and Sentinel-3 (TSEB-PTS2+3) to estimate the spatio-temporal variability of actual transpiration (T) and water stress in a vineyard. T and crop water stress index (CWSI) estimates were evaluated against a vine water consumption model and regressed with in situ stem water potential (Ψstem). Two different TSEB approaches, using very high-resolution airborne thermal imagery, were also included in the analysis as benchmarks for TSEB-PTS2+3. One of them uses aggregated TIR data at the vine+inter-row level (TSEB-PTairb), while the other is based on a contextual method that directly, although separately, retrieves soil and canopy temperatures (TSEB-2T). The results obtained demonstrated that when comparing airborne Trad and sharpened S2+3 LST, the latter tend to be underestimated. This complicates the use of TSEB-PTS2+3 to detect crop water stress. TSEB-2T appeared to outperform all the other methods. This was shown by a higher R2 and slightly lower RMSD when compared with modelled T. In addition, regressions between T and CWSI-2T with Ψstem also produced the highest R2.</dc:description> | ||
| <dc:subject>evapotranspiration; TSEB; Sentinel-2; Sentinel-3; crop water stress index; vine water status; grapevines</dc:subject> | ||
| <dc:subject>crop water stress index</dc:subject> | ||
| <dc:subject>Science</dc:subject> | ||
| <dc:creator>Joaquim Bellvert, Christian Jofre-Ĉekalović, Ana Pelechá, Mercè Mata, Hector Nieto, </dc:creator> | ||
| <dc:title>Feasibility of Using the Two-Source Energy Balance Model (TSEB) with Sentinel-2 and Sentinel-3 Images to Analyze the Spatio-Temporal Variability of Vine Water Status in a Vineyard</dc:title> | ||
| <dc:identifier>10.3390/rs12142299</dc:identifier> | ||
| <dc:type>document</dc:type> | ||
| <dct:spatial>-180,-90,180,90</dct:spatial> | ||
| </rdf:Description> | ||
| </rdf:RDF> |
This file contains hidden or 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,69 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| import io | ||
|
|
||
| from owslib import util | ||
| from owslib.etree import etree | ||
| from owslib.csw import ( | ||
| CswRecord | ||
| ) | ||
| from owslib.namespaces import Namespaces | ||
|
|
||
|
|
||
| def get_md_resource(file_path): | ||
| """Read the file and parse into an XML tree. | ||
| Parameters | ||
| ---------- | ||
| file_path : str | ||
| Path of the file to read. | ||
| Returns | ||
| ------- | ||
| etree.ElementTree | ||
| XML tree of the resource on disk. | ||
| """ | ||
| namespaces = Namespaces().get_namespaces(keys=('dc', 'dct', 'ows', 'rdf', 'gml', 'csw')) | ||
|
|
||
| with io.open(file_path, mode='r', encoding='utf-8') as f: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use |
||
| data = f.read().encode('utf-8') | ||
| mdelem = etree.fromstring(data) | ||
|
|
||
| return mdelem | ||
|
|
||
|
|
||
| def test_md_parsing(): | ||
| """Test the parsing of a metadatarecord | ||
| GetRecordById response available in | ||
| tests/resources/9250AA67-F3AC-6C12-0CB9-0662231AA181_dc.xml | ||
| """ | ||
| md_resource = get_md_resource('tests/resources/9250AA67-F3AC-6C12-0CB9-0662231AA181_dc.xml') | ||
| md = CswRecord(md_resource) | ||
|
|
||
| assert type(md) is CswRecord | ||
|
|
||
| assert md.identifier == '9250AA67-F3AC-6C12-0CB9-0662231AA181' | ||
| assert md.title == 'ALLSPECIES' | ||
| assert md.format == 'text/xml' | ||
| assert md.bbox.minx == '-180' | ||
| assert md.contributor == 'EMAN Office' | ||
| assert md.creator == 'EMAN Coordinating Office, Environment Canada' | ||
| assert md.created == '2009-09-03' | ||
| assert md.language == 'eng; CAN' | ||
|
|
||
| def test_spatial_parsing(): | ||
| """Test the parsing of a metadatarecord | ||
| GetRecordById response available in | ||
| tests/resources/9250AA67-F3AC-6C12-0CB9-0662231AA181_dc2.xml | ||
| """ | ||
| md_resource = get_md_resource('tests/resources/9250AA67-F3AC-6C12-0CB9-0662231AA181_dc2.xml') | ||
| md = CswRecord(md_resource) | ||
|
|
||
| assert type(md) is CswRecord | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. assert isinstance(CswRecord, md) |
||
| assert md.title == "Feasibility of Using the Two-Source Energy Balance Model (TSEB) with Sentinel-2 and Sentinel-3 Images to Analyze the Spatio-Temporal Variability of Vine Water Status in a Vineyard" | ||
| assert md.bbox.minx == '-180' | ||
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.
Suggest the below (also for
owslib/catalogue/csw3.py):