From e45e8d5f0a4c0326ce87e86e330e289ced8a42aa Mon Sep 17 00:00:00 2001 From: bourgesl <bourges.laurent@gmail.com> Date: Wed, 18 Jul 2018 16:00:51 +0200 Subject: [PATCH] fixed geoLocationBox (SWNE convention) for OHMCV --- conf/OHMCV/inputs/OHMCV.ADV.CLA.13-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.MRE.12-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.PVI.11-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.SEF.12-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.SOU.12-16.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.TOU.12-16.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.VAL.12-16.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.VB1.12-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.VB2.11-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.DSD.VB3.12-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.ERO.PRA.10-13.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.HSS.CLA.11-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.LIM.CLA.12-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.RTS.AUZ.10-14.1.csv | 2 +- conf/OHMCV/inputs/OHMCV.SMO.CLA.13-14.1.csv | 2 +- resources/xsl/csw2txt_ohmcv.xsl | 43 +++++++++++++++------ 16 files changed, 46 insertions(+), 27 deletions(-) diff --git a/conf/OHMCV/inputs/OHMCV.ADV.CLA.13-14.1.csv b/conf/OHMCV/inputs/OHMCV.ADV.CLA.13-14.1.csv index 9d4673d..33e40e9 100644 --- a/conf/OHMCV/inputs/OHMCV.ADV.CLA.13-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.ADV.CLA.13-14.1.csv @@ -14,5 +14,5 @@ The Claduègne hydro-sedimentary station (http://mistrals.sedoo.fr/?editDatsId=9 format;CSV;;;; format;"ESRI Grid";;;; geoLocationPlace;Claduègne hydro-sedimentary station -geoLocationBox;4.478 44.562 4.478 44.562 +geoLocationPoint;44.562 4.478 # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.MRE.12-14.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.MRE.12-14.1.csv index 44936a6..e683250 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.MRE.12-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.MRE.12-14.1.csv @@ -15,7 +15,7 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2011-09-10/2014-12-31 geoLocationPlace;Mont Redon -geoLocationBox;4.5148 44.6141 4.5148 44.6141 +geoLocationPoint;44.6141 4.5148 relatedIdentifier:IsSupplementedBy:DOI;10.5072/OHMCV.DSD.MRE.12-16.1 description:Other;"This dataset has been extended and updated by the following dataset: 10.17178/OHMCV.DSD.MRE.12-16.1" # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.PVI.11-14.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.PVI.11-14.1.csv index 0890557..dac6a74 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.PVI.11-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.PVI.11-14.1.csv @@ -14,7 +14,7 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2011-01-11/2014-12-31 geoLocationPlace;Pradel-Vignes -geoLocationBox;4.495 44.5801 4.495 44.5801 +geoLocationPoint;44.5801 4.495 relatedIdentifier:IsSupplementedBy:DOI;10.5072/OHMCV.DSD.PVI.12-16.1 description:Other;"This dataset has been extended and updated by the following dataset: 10.17178/OHMCV.DSD.PVI.12-16.1" # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.SEF.12-14.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.SEF.12-14.1.csv index 8fead8b..00fb0bb 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.SEF.12-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.SEF.12-14.1.csv @@ -14,7 +14,7 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2012-09-05/2014-12-31 geoLocationPlace;Saint-Etienne-de-Fontbellon -geoLocationBox;4.3826 44.6 4.3826 44.6 +geoLocationPoint;44.6 4.3826 relatedIdentifier:IsSupplementedBy:DOI;10.5072/OHMCV.DSD.SEF.12-16.1 description:Other;"This dataset has been extended and updated by the following dataset: 10.17178/OHMCV.DSD.SEF.12-16.1" # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.SOU.12-16.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.SOU.12-16.1.csv index 0238658..7753306 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.SOU.12-16.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.SOU.12-16.1.csv @@ -15,5 +15,5 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2012-07-27/2016-12-31 geoLocationPlace;La Souche -geoLocationBox;4.1235 44.6285 4.1235 44.6285 +geoLocationPoint;44.6285 4.1235 # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.TOU.12-16.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.TOU.12-16.1.csv index 9f7b0fb..92edaa6 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.TOU.12-16.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.TOU.12-16.1.csv @@ -14,5 +14,5 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2012-11-08/2016-09-12 geoLocationPlace;Tourgueille -geoLocationBox;3.6622 44.1288 3.6622 44.1288 +geoLocationPoint;44.1288 3.6622 # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.VAL.12-16.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.VAL.12-16.1.csv index e8189c9..84dccae 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.VAL.12-16.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.VAL.12-16.1.csv @@ -14,5 +14,5 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2012-11-07/2016-12-31 geoLocationPlace;Valescure -geoLocationBox;3.8353 44.0939 3.8353 44.0939 +geoLocationPoint;44.0939 3.8353 # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.VB1.12-14.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.VB1.12-14.1.csv index 111b023..03e60fa 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.VB1.12-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.VB1.12-14.1.csv @@ -14,7 +14,7 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2012-01-06/2014-12-31 geoLocationPlace;Collège Laboissière -geoLocationBox;4.4953 44.5548 4.4953 44.5548 +geoLocationPoint;44.5548 4.4953 relatedIdentifier:IsSupplementedBy:DOI;10.5072/OHMCV.DSD.VB1.12-16.1 description:Other;"This dataset has been extended and updated by the following dataset: 10.17178/OHMCV.DSD.VB1.12-16.1" # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.VB2.11-14.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.VB2.11-14.1.csv index cda74f2..1c41b8d 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.VB2.11-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.VB2.11-14.1.csv @@ -15,7 +15,7 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2011-11-04/2014-12-31 geoLocationPlace;Villeneuve-de-Berg -geoLocationBox;4.4954 44.5547 4.4954 44.5547 +geoLocationPoint;44.5547 4.4954 relatedIdentifier:IsSupplementedBy:DOI;10.5072/OHMCV.DSD.VB2.12-16.1 description:Other;"This dataset has been extended and updated by the following dataset: 10.17178/OHMCV.DSD.VB2.12-16.1" # END; diff --git a/conf/OHMCV/inputs/OHMCV.DSD.VB3.12-14.1.csv b/conf/OHMCV/inputs/OHMCV.DSD.VB3.12-14.1.csv index ebd292a..8132336 100644 --- a/conf/OHMCV/inputs/OHMCV.DSD.VB3.12-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.DSD.VB3.12-14.1.csv @@ -15,7 +15,7 @@ subject:main;Fixed Observation Stations contributorName:WorkPackageLeader;Brice Boudevillain;affiliation;IGE date:Collected;2012-01-06/2014-12-31 geoLocationPlace;Villeneuve-de-Berg -geoLocationBox;4.4955 44.5548 4.4955 44.5548 +geoLocationPoint;44.5548 4.4955 relatedIdentifier:IsSupplementedBy:DOI;10.5072/OHMCV.DSD.VB3.12-16.1 description:Other;"This dataset has been extended and updated by the following dataset: 10.17178/OHMCV.DSD.VB3.12-16.1" # END; diff --git a/conf/OHMCV/inputs/OHMCV.ERO.PRA.10-13.1.csv b/conf/OHMCV/inputs/OHMCV.ERO.PRA.10-13.1.csv index 5481189..74178f8 100644 --- a/conf/OHMCV/inputs/OHMCV.ERO.PRA.10-13.1.csv +++ b/conf/OHMCV/inputs/OHMCV.ERO.PRA.10-13.1.csv @@ -18,5 +18,5 @@ The measurement site is part of the OHMCV observatory. It is located at Le Prade format;CSV;;;; format;"ESRI Grid";;;; geoLocationPlace;Pradel-Vignes -geoLocationBox;4.495 44.5801 4.495 44.5801 +geoLocationPoint;44.5801 4.495 # END; diff --git a/conf/OHMCV/inputs/OHMCV.HSS.CLA.11-14.1.csv b/conf/OHMCV/inputs/OHMCV.HSS.CLA.11-14.1.csv index 7130cbb..0d250e1 100644 --- a/conf/OHMCV/inputs/OHMCV.HSS.CLA.11-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.HSS.CLA.11-14.1.csv @@ -21,5 +21,5 @@ The data provided are continuous series of water temperature, water level, disch format;CSV;;;; format;"ESRI Grid";;;; geoLocationPlace;Gazel and Claduègne hydro-sedimentary stations -geoLocationBox;4.478 44.562 4.4943 44.5793 +geoLocationBox;44.562 4.478 44.5793 4.4943 # END; diff --git a/conf/OHMCV/inputs/OHMCV.LIM.CLA.12-14.1.csv b/conf/OHMCV/inputs/OHMCV.LIM.CLA.12-14.1.csv index 0d180d5..c632c48 100644 --- a/conf/OHMCV/inputs/OHMCV.LIM.CLA.12-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.LIM.CLA.12-14.1.csv @@ -24,5 +24,5 @@ The data provided are continuous series of water temperature, total pressure, wa format;CSV;;;; format;"ESRI Grid";;;; geoLocationPlace;Claduègne catchment -geoLocationBox;4.4789 44.562 4.547 44.6671 +geoLocationBox;44.562 4.4789 44.6671 4.547 # END; diff --git a/conf/OHMCV/inputs/OHMCV.RTS.AUZ.10-14.1.csv b/conf/OHMCV/inputs/OHMCV.RTS.AUZ.10-14.1.csv index 93d86a6..ea7740c 100644 --- a/conf/OHMCV/inputs/OHMCV.RTS.AUZ.10-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.RTS.AUZ.10-14.1.csv @@ -16,5 +16,5 @@ A interactive software based on R allows to interactively plot and extract the d description:SeriesInformation;The data provided are 5-min rainfall amounts at 19 raingauges situated in an area of about 7x5km^2. Rainfall data are provided only for rainfall events which are defined as a succession of rainy days during which at least 2 raingauges have recorded 10mm or more. format;CSV;;;; format;"ESRI Grid";;;; -geoLocationBox;4.44838 44.54993 4.5148 44.6141 +geoLocationBox;44.54993 4.44838 44.6141 4.5148 # END; diff --git a/conf/OHMCV/inputs/OHMCV.SMO.CLA.13-14.1.csv b/conf/OHMCV/inputs/OHMCV.SMO.CLA.13-14.1.csv index 7669e9c..9c24c71 100644 --- a/conf/OHMCV/inputs/OHMCV.SMO.CLA.13-14.1.csv +++ b/conf/OHMCV/inputs/OHMCV.SMO.CLA.13-14.1.csv @@ -15,5 +15,5 @@ Nine sites with different land uses (two vineyards, four pastures, one piece of format;CSV;;;; format;"ESRI Grid";;;; geoLocationPlace;Claduègne catchment -geoLocationBox;4.49379283 44.57625496 4.54757162 44.66844587 +geoLocationBox;44.57625496 4.49379283 44.66844587 4.54757162 # END; diff --git a/resources/xsl/csw2txt_ohmcv.xsl b/resources/xsl/csw2txt_ohmcv.xsl index 2874000..271261b 100644 --- a/resources/xsl/csw2txt_ohmcv.xsl +++ b/resources/xsl/csw2txt_ohmcv.xsl @@ -316,18 +316,37 @@ <xsl:variable name="box" select="gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicBoundingBox"/> <xsl:if test="$box"> - <xsl:call-template name="row"> - <xsl:with-param name="key">geoLocationBox</xsl:with-param> - <xsl:with-param name="value"> - <xsl:value-of select="$box/gmd:westBoundLongitude/gco:Decimal/text()"/> - <xsl:text> </xsl:text> - <xsl:value-of select="$box/gmd:southBoundLatitude/gco:Decimal/text()"/> - <xsl:text> </xsl:text> - <xsl:value-of select="$box/gmd:eastBoundLongitude/gco:Decimal/text()"/> - <xsl:text> </xsl:text> - <xsl:value-of select="$box/gmd:northBoundLatitude/gco:Decimal/text()"/> - </xsl:with-param> - </xsl:call-template> + <xsl:variable name="west" select="$box/gmd:westBoundLongitude/gco:Decimal/text()"/> + <xsl:variable name="east" select="$box/gmd:eastBoundLongitude/gco:Decimal/text()"/> + <xsl:variable name="north" select="$box/gmd:northBoundLatitude/gco:Decimal/text()"/> + <xsl:variable name="south" select="$box/gmd:southBoundLatitude/gco:Decimal/text()"/> + + <xsl:choose> + <xsl:when test="$west = $east and $north = $south"> + <xsl:call-template name="row"> + <xsl:with-param name="key">geoLocationPoint</xsl:with-param> + <xsl:with-param name="value"> + <xsl:value-of select="$north"/> + <xsl:text> </xsl:text> + <xsl:value-of select="$west"/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="row"> + <xsl:with-param name="key">geoLocationBox</xsl:with-param> + <xsl:with-param name="value"> + <xsl:value-of select="$south"/> + <xsl:text> </xsl:text> + <xsl:value-of select="$west"/> + <xsl:text> </xsl:text> + <xsl:value-of select="$north"/> + <xsl:text> </xsl:text> + <xsl:value-of select="$east"/> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> </xsl:if> </xsl:template> -- GitLab