Issue #2679 Multiple regions for a single collector mapped to single WFS source

Change-Id: I1e4b1eefe5f507742805886292ba67b24f40f34c

Former-commit-id: c57c27c843 [formerly 08625addba [formerly b888d311923ba0628fa015018ef2f62fce47fb43]]
Former-commit-id: 08625addba
Former-commit-id: eddceed756
This commit is contained in:
Dave Hladky 2014-01-13 17:15:52 -06:00
parent 19cbf638a6
commit bdaf00a48a
12 changed files with 1208 additions and 243 deletions

View file

@ -21,14 +21,827 @@
</provider>
<agent xsi:type="ogcAgent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dateFormat>HHddMMMyyyy</dateFormat>
<layer name="madis" namespace="http://madis.edex.uf.raytheon.com">
<layer name="madis-conus" namespace="http://madis.edex.uf.raytheon.com">
<!-- Geographic constraint of madis layer data -->
<minx>-120.0</minx>
<maxx>-70.0</maxx>
<miny>20.0</miny>
<maxy>50.0</maxy>
<crs>crs:84</crs>
<!-- Registry Parameters in madis layer -->
<!-- Registry Parameters in madis conus layer -->
<parameter name="timeObs" providerName="OBSTIME"
definition="Time of observation" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="provider" providerName="PVDR"
definition="Provider Network" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="sub_provider" providerName="SUBPVDR"
definition="Sub Provider Network" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="restriction" providerName="RES"
definition="Restriction Level" dataType="POINT" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="dataset" providerName="DS"
definition="Dataset" dataType="POINT" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="obsLocation" providerName="obsLocation"
definition="Location of Observation" dataType="POINT" units="Degrees"
missingValue="-9999" fillValue="-9999" baseType="ObsLocation">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint" providerName="TD"
definition="Dewpoint Temperature" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="K">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qcd" providerName="TD_QCD"
definition="Dewpoint QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qca" providerName="TD_QCA"
definition="Dewpoint QCD" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qcr" providerName="TD_QCR"
definition="Dewpoint QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh" providerName="RH"
definition="Relative Humidity" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="%">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qcd" providerName="RH_QCD"
definition="Relative Humidity QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qca" providerName="RH_QCA"
definition="Relative Humidity QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qcr" providerName="RH_QCR"
definition="Relative Humidity QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter" providerName="ALTSE"
definition="Altimeter Setting" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="Pa">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qcd" providerName="ALTSE_QCD"
definition="Altimeter Setting QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qca" providerName="ALTSE_QCA"
definition="Altimeter Setting QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qcr" providerName="ALTSE_QCR"
definition="Altimeter Setting QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature" providerName="T"
definition="Temperature" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="K">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qcd" providerName="T_QCD"
definition="Temperature QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qca" providerName="T_QCA"
definition="Temperature QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qcr" providerName="T_QCR"
definition="Temperature QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection" providerName="DD"
definition="Wind Direction" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qcd" providerName="DD_QCD"
definition="Wind Direction QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qca" providerName="DD_QCA"
definition="Wind Direction QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qcr" providerName="DD_QCR"
definition="Wind Direction QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed" providerName="FF"
definition="Wind Speed" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qcd" providerName="FF_QCD"
definition="Wind Speed QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qca" providerName="FF_QCA"
definition="Wind Speed QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qcr" providerName="FF_QCR"
definition="Wind Speed QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation" providerName="ELEV"
definition="Elevation" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qcd" providerName="ELEV_QCD"
definition="Elevation QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qca" providerName="ELEV_QCA"
definition="Elevation QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qcr" providerName="ELEV_QCR"
definition="Elevation QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qcd" providerName="LON_QCD"
definition="longitude QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qca" providerName="LON_QCA"
definition="Longitude QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qcr" providerName="LON_QCR"
definition="Longitude QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qcd" providerName="LAT_QCD"
definition="Latitude QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qca" providerName="LAT_QCA"
definition="Latitude QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qcr" providerName="LAT_QCR"
definition="Latitude QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate" providerName="PCPRATE"
definition="Precipitation Rate" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="in/hr">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qcd" providerName="PCPRATE_QCD"
definition="Precipitation Rate QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qca" providerName="PCPRATE_QCA"
definition="Precipitation Rate QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qcr" providerName="PCPRATE_QCR"
definition="Precipitation Rate QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust" providerName="FFGUST"
definition="Wind Gust" dataType="POINT"
missingValue="-9999" fillValue="-9999" baseType="Float" units="kts">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qcd" providerName="FFGUST_QCD"
definition="Wind Gust QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qca" providerName="FFGUST_QCA"
definition="Wind Gust QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qcr" providerName="FFGUST_QCR"
definition="Wind Gust QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater" providerName="PWV"
definition="Precipital Water Vapor" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="in">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qcd" providerName="PWV_QCD"
definition="Precipital Water Vapor QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qca" providerName="PWV_QCA"
definition="Precipital Water Vapor QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qcr" providerName="PWV_QCR"
definition="Precipital Water Vapor QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure" providerName="P"
definition="Pressure" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="Pa">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qcd" providerName="P_QCD"
definition="Pressure QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qca" providerName="P_QCA"
definition="Pressure QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qcr" providerName="P_QCR"
definition="Pressure QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
</layer>
<layer name="madis-alaska" namespace="http://madis.edex.uf.raytheon.com">
<!-- Geographic constraint of madis alaska layer data -->
<minx>-180.0</minx>
<maxx>-114.0</maxx>
<miny>55.0</miny>
<maxy>85.0</maxy>
<crs>crs:84</crs>
<!-- Registry Parameters in madis alaska layer -->
<parameter name="timeObs" providerName="OBSTIME"
definition="Time of observation" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="provider" providerName="PVDR"
definition="Provider Network" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="sub_provider" providerName="SUBPVDR"
definition="Sub Provider Network" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="restriction" providerName="RES"
definition="Restriction Level" dataType="POINT" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="dataset" providerName="DS"
definition="Dataset" dataType="POINT" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="obsLocation" providerName="obsLocation"
definition="Location of Observation" dataType="POINT" units="Degrees"
missingValue="-9999" fillValue="-9999" baseType="ObsLocation">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint" providerName="TD"
definition="Dewpoint Temperature" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="K">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qcd" providerName="TD_QCD"
definition="Dewpoint QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qca" providerName="TD_QCA"
definition="Dewpoint QCD" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qcr" providerName="TD_QCR"
definition="Dewpoint QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh" providerName="RH"
definition="Relative Humidity" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="%">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qcd" providerName="RH_QCD"
definition="Relative Humidity QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qca" providerName="RH_QCA"
definition="Relative Humidity QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qcr" providerName="RH_QCR"
definition="Relative Humidity QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter" providerName="ALTSE"
definition="Altimeter Setting" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="Pa">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qcd" providerName="ALTSE_QCD"
definition="Altimeter Setting QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qca" providerName="ALTSE_QCA"
definition="Altimeter Setting QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qcr" providerName="ALTSE_QCR"
definition="Altimeter Setting QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature" providerName="T"
definition="Temperature" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="K">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qcd" providerName="T_QCD"
definition="Temperature QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qca" providerName="T_QCA"
definition="Temperature QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qcr" providerName="T_QCR"
definition="Temperature QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection" providerName="DD"
definition="Wind Direction" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qcd" providerName="DD_QCD"
definition="Wind Direction QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qca" providerName="DD_QCA"
definition="Wind Direction QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qcr" providerName="DD_QCR"
definition="Wind Direction QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed" providerName="FF"
definition="Wind Speed" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qcd" providerName="FF_QCD"
definition="Wind Speed QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qca" providerName="FF_QCA"
definition="Wind Speed QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qcr" providerName="FF_QCR"
definition="Wind Speed QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation" providerName="ELEV"
definition="Elevation" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qcd" providerName="ELEV_QCD"
definition="Elevation QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qca" providerName="ELEV_QCA"
definition="Elevation QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qcr" providerName="ELEV_QCR"
definition="Elevation QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qcd" providerName="LON_QCD"
definition="longitude QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qca" providerName="LON_QCA"
definition="Longitude QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qcr" providerName="LON_QCR"
definition="Longitude QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qcd" providerName="LAT_QCD"
definition="Latitude QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qca" providerName="LAT_QCA"
definition="Latitude QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qcr" providerName="LAT_QCR"
definition="Latitude QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate" providerName="PCPRATE"
definition="Precipitation Rate" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="in/hr">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qcd" providerName="PCPRATE_QCD"
definition="Precipitation Rate QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qca" providerName="PCPRATE_QCA"
definition="Precipitation Rate QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qcr" providerName="PCPRATE_QCR"
definition="Precipitation Rate QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust" providerName="FFGUST"
definition="Wind Gust" dataType="POINT"
missingValue="-9999" fillValue="-9999" baseType="Float" units="kts">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qcd" providerName="FFGUST_QCD"
definition="Wind Gust QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qca" providerName="FFGUST_QCA"
definition="Wind Gust QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qcr" providerName="FFGUST_QCR"
definition="Wind Gust QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater" providerName="PWV"
definition="Precipital Water Vapor" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="in">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qcd" providerName="PWV_QCD"
definition="Precipital Water Vapor QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qca" providerName="PWV_QCA"
definition="Precipital Water Vapor QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qcr" providerName="PWV_QCR"
definition="Precipital Water Vapor QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure" providerName="P"
definition="Pressure" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="Pa">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qcd" providerName="P_QCD"
definition="Pressure QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qca" providerName="P_QCA"
definition="Pressure QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qcr" providerName="P_QCR"
definition="Pressure QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
</layer>
<layer name="madis-hawaii" namespace="http://madis.edex.uf.raytheon.com">
<!-- Geographic constraint of madis hawaii layer data -->
<minx>-162.0</minx>
<maxx>-152.0</maxx>
<miny>16.0</miny>
<maxy>24.0</maxy>
<crs>crs:84</crs>
<!-- Registry Parameters in madis hawaii layer -->
<parameter name="timeObs" providerName="OBSTIME"
definition="Time of observation" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="provider" providerName="PVDR"
definition="Provider Network" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="sub_provider" providerName="SUBPVDR"
definition="Sub Provider Network" dataType="POINT" baseType="String">
<levelType levelType="SFC" />
</parameter>
<parameter name="restriction" providerName="RES"
definition="Restriction Level" dataType="POINT" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="dataset" providerName="DS"
definition="Dataset" dataType="POINT" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="obsLocation" providerName="obsLocation"
definition="Location of Observation" dataType="POINT" units="Degrees"
missingValue="-9999" fillValue="-9999" baseType="ObsLocation">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint" providerName="TD"
definition="Dewpoint Temperature" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="K">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qcd" providerName="TD_QCD"
definition="Dewpoint QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qca" providerName="TD_QCA"
definition="Dewpoint QCD" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="dewpoint_qcr" providerName="TD_QCR"
definition="Dewpoint QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh" providerName="RH"
definition="Relative Humidity" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="%">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qcd" providerName="RH_QCD"
definition="Relative Humidity QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qca" providerName="RH_QCA"
definition="Relative Humidity QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="rh_qcr" providerName="RH_QCR"
definition="Relative Humidity QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter" providerName="ALTSE"
definition="Altimeter Setting" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="Pa">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qcd" providerName="ALTSE_QCD"
definition="Altimeter Setting QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qca" providerName="ALTSE_QCA"
definition="Altimeter Setting QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="altimeter_qcr" providerName="ALTSE_QCR"
definition="Altimeter Setting QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature" providerName="T"
definition="Temperature" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="K">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qcd" providerName="T_QCD"
definition="Temperature QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qca" providerName="T_QCA"
definition="Temperature QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="temperature_qcr" providerName="T_QCR"
definition="Temperature QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection" providerName="DD"
definition="Wind Direction" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Integer" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qcd" providerName="DD_QCD"
definition="Wind Direction QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qca" providerName="DD_QCA"
definition="Wind Direction QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windDirection_qcr" providerName="DD_QCR"
definition="Wind Direction QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed" providerName="FF"
definition="Wind Speed" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qcd" providerName="FF_QCD"
definition="Wind Speed QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qca" providerName="FF_QCA"
definition="Wind Speed QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windSpeed_qcr" providerName="FF_QCR"
definition="Wind Speed QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation" providerName="ELEV"
definition="Elevation" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="degrees">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qcd" providerName="ELEV_QCD"
definition="Elevation QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qca" providerName="ELEV_QCA"
definition="Elevation QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="elevation_qcr" providerName="ELEV_QCR"
definition="Elevation QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qcd" providerName="LON_QCD"
definition="longitude QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qca" providerName="LON_QCA"
definition="Longitude QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lon_qcr" providerName="LON_QCR"
definition="Longitude QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qcd" providerName="LAT_QCD"
definition="Latitude QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qca" providerName="LAT_QCA"
definition="Latitude QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="lat_qcr" providerName="LAT_QCR"
definition="Latitude QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate" providerName="PCPRATE"
definition="Precipitation Rate" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="in/hr">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qcd" providerName="PCPRATE_QCD"
definition="Precipitation Rate QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qca" providerName="PCPRATE_QCA"
definition="Precipitation Rate QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipRate_qcr" providerName="PCPRATE_QCR"
definition="Precipitation Rate QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust" providerName="FFGUST"
definition="Wind Gust" dataType="POINT"
missingValue="-9999" fillValue="-9999" baseType="Float" units="kts">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qcd" providerName="FFGUST_QCD"
definition="Wind Gust QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qca" providerName="FFGUST_QCA"
definition="Wind Gust QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="windGust_qcr" providerName="FFGUST_QCR"
definition="Wind Gust QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater" providerName="PWV"
definition="Precipital Water Vapor" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="in">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qcd" providerName="PWV_QCD"
definition="Precipital Water Vapor QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qca" providerName="PWV_QCA"
definition="Precipital Water Vapor QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="precipitalWater_qcr" providerName="PWV_QCR"
definition="Precipital Water Vapor QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure" providerName="P"
definition="Pressure" dataType="POINT" missingValue="-9999"
fillValue="-9999" baseType="Float" units="Pa">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qcd" providerName="P_QCD"
definition="Pressure QCD" dataType="POINT" baseType="QCD">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qca" providerName="P_QCA"
definition="Pressure QCA" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
<parameter name="pressure_qcr" providerName="P_QCR"
definition="Pressure QCR" dataType="POINT" missingValue="0"
fillValue="0" baseType="Integer">
<levelType levelType="SFC" />
</parameter>
</layer>
<layer name="madis-puertorico" namespace="http://madis.edex.uf.raytheon.com">
<!-- Geographic constraint of madis puerto rico layer data -->
<minx>-63.8</minx>
<maxx>-68.5</maxx>
<miny>16.5</miny>
<maxy>19.8</maxy>
<crs>crs:84</crs>
<!-- Registry Parameters in madis puerto rico layer -->
<parameter name="timeObs" providerName="OBSTIME"
definition="Time of observation" dataType="POINT" baseType="String">
<levelType levelType="SFC" />

View file

@ -111,7 +111,8 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* Nov 15, 2013 2545 bgonzale Added check for subscription events before sending
* notifications. Republish dataset metadata registry
* insert and update events as dataset metadata events.
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
* Jan 13, 2014 2679 dhladky Small Point data updates.
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
*
* </pre>
*
@ -437,8 +438,9 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
}
private void publishDataSetMetaDataEvent(RegistryEvent re) {
final String id = re.getId();
DataSetMetaData<?> dsmd = getDataSetMetaData(id);
DataSetMetaData<T> dsmd = getDataSetMetaData(id);
if (dsmd != null) {
// Repost the Object to the BandwidthEventBus to free

View file

@ -2,6 +2,7 @@ package com.raytheon.uf.edex.datadelivery.retrieval.util;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.regex.Pattern;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
@ -34,6 +35,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* Aug 23, 2013 2180 mpduff Implement changes to ProviderCredentialsUtil
* Aug 06, 2013 2097 dhladky WFS 2.0 compliance upgrade and switched to POST
* Nov 20, 2013 2554 dhladky Added GZIP capability to WFS requests.
* Jan 13, 2014 2697 dhladky Added util to strip unique Id field from URL.
*
* </pre>
*
@ -45,6 +47,8 @@ public class WfsConnectionUtil {
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(WfsConnectionUtil.class);
private static final Pattern COMMA_PATTERN = Pattern.compile(",");
/**
* Connect to the provided URL and return the xml response.
@ -66,7 +70,7 @@ public class WfsConnectionUtil {
try {
rootUrl = providerConn.getUrl();
rootUrl = getCleanUrl(providerConn.getUrl());
http = HttpClient.getInstance();
// accept gzipped data for WFS
http.setGzipResponseHandling(true);
@ -192,4 +196,13 @@ public class WfsConnectionUtil {
return httpPort;
}
}
/**
* Removes un-needed unique Identifier from PointDataSetMetaData derived URL's
* @param rootUrl
* @return
*/
private static String getCleanUrl(String providerUrl) {
return COMMA_PATTERN.split(providerUrl)[0];
}
}

View file

@ -13,6 +13,7 @@ import java.util.Date;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
/**
* Interface for extending layer collectors to perform additional tasks
@ -30,7 +31,7 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
* @author bclement
* @version 1.0
*/
public interface ICollectorAddon<D extends SimpleDimension, L extends SimpleLayer<D>, R extends PluginDataObject> {
public interface ICollectorAddon<D extends SimpleDimension, L extends SimpleLayer<D>, R extends PersistableDataObject> {
/**
* Called after record is added to layer. Both should be treated as

View file

@ -35,10 +35,12 @@ import com.raytheon.uf.common.datadelivery.registry.DataType;
import com.raytheon.uf.common.datadelivery.registry.Levels;
import com.raytheon.uf.common.datadelivery.registry.Parameter;
import com.raytheon.uf.common.datadelivery.registry.Provider;
import com.raytheon.uf.common.datadelivery.registry.Time;
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetHandler;
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
@ -48,7 +50,7 @@ import com.raytheon.uf.edex.ogc.common.db.SimpleDimension;
import com.raytheon.uf.edex.ogc.common.db.SimpleLayer;
/**
* TODO Add Description
* Collector Used to gather data with DPA, used for AWIPS registry data feeds from providers.
*
* <pre>
*
@ -58,6 +60,7 @@ import com.raytheon.uf.edex.ogc.common.db.SimpleLayer;
* ------------ ---------- ----------- --------------------------
* Jul 23, 2013 bclement Initial creation
* Aug 08, 2013 dhladky Made operational
* Jan 13, 2014 #2679 dhladky multiple layers
*
* </pre>
*
@ -108,7 +111,7 @@ public abstract class RegistryCollectorAddon<D extends SimpleDimension, L extend
* @param metaDatas
* @param dataSet
*/
public void storeMetaData(final DataSetMetaData metaData) {
public void storeMetaData(final DataSetMetaData<?> metaData) {
IDataSetMetaDataHandler handler = DataDeliveryHandlers
.getDataSetMetaDataHandler();
@ -132,7 +135,7 @@ public abstract class RegistryCollectorAddon<D extends SimpleDimension, L extend
*
* @param dataSetToStore
*/
protected void storeDataSetName(DataSet dataSetToStore) {
protected void storeDataSetName(DataSet<?, ?> dataSetToStore) {
DataSetName dsn = new DataSetName();
// Set the RegistryObject Id keys for this Object
@ -158,9 +161,9 @@ public abstract class RegistryCollectorAddon<D extends SimpleDimension, L extend
/**
* @param dataSet
*/
protected void storeDataSet(final DataSet dataSet) {
protected void storeDataSet(final DataSet<?, ?> dataSet) {
DataSet dataSetToStore = getDataSetToStore(dataSet);
DataSet<?, ?> dataSetToStore = getDataSetToStore(dataSet);
final String dataSetName = dataSetToStore.getDataSetName();
IDataSetHandler handler = DataDeliveryHandlers.getDataSetHandler();
@ -200,9 +203,11 @@ public abstract class RegistryCollectorAddon<D extends SimpleDimension, L extend
* the dataSet
* @return the dataSet instance that should be stored to the registry
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected DataSet getDataSetToStore(DataSet dataSet) {
try {
DataSet result = DataDeliveryHandlers.getDataSetHandler()
DataSet<Time, Coverage> result = DataDeliveryHandlers.getDataSetHandler()
.getByNameAndProvider(dataSet.getDataSetName(),
dataSet.getProviderName());
if (result != null) {
@ -244,7 +249,7 @@ public abstract class RegistryCollectorAddon<D extends SimpleDimension, L extend
protected abstract void setCoverage(L layer);
protected abstract Coverage getCoverage();
protected abstract Coverage getCoverage(String layerName);
public void setParameters(L layer) {
synchronized (layer) {
@ -266,11 +271,11 @@ public abstract class RegistryCollectorAddon<D extends SimpleDimension, L extend
protected abstract void setDataSet(L layer);
protected abstract DataSet getDataSet();
protected abstract DataSet<?, ?> getDataSet(String layerName);
protected abstract void setDataSetMetaData(L layer);
protected abstract DataSetMetaData getDataSetMetaData();
protected abstract DataSetMetaData<?> getDataSetMetaData(String layerName);
protected abstract DataType getDataType();
@ -283,5 +288,9 @@ public abstract class RegistryCollectorAddon<D extends SimpleDimension, L extend
public void setAgent(OGCAgent agent) {
this.agent = agent;
}
public abstract String isWithinLayer(R record);
public abstract ISpatialObject getSpatial(R record);
}

View file

@ -31,6 +31,7 @@ import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.edex.ogc.common.OgcGeoBoundingBox;
import com.raytheon.uf.edex.wfs.WfsFeatureType;
import com.raytheon.uf.edex.wfs.reg.AbstractWfsSource;
import com.raytheon.uf.edex.wfs.reg.IFeatureTypeModifier;
/**
@ -44,6 +45,7 @@ import com.raytheon.uf.edex.wfs.reg.IFeatureTypeModifier;
* ------------ ---------- ----------- --------------------------
* Jul 26, 2013 bclement Initial creation
* Aug 18, 2013 #2097 dhladky Adapted to AWIPS
* Jan 13, 2014 #2679 dhladky multiple layers mapping to single request window
*
* </pre>
*
@ -115,13 +117,10 @@ public class RegistryFeatureTypeModifier implements IFeatureTypeModifier {
OgcGeoBoundingBox bbox = null;
try {
ConfigLayer layer = getConfigLayer(name);
double upperLeftLon = layer.getMinx();
double lowerRightLon = layer.getMaxx();
double upperLeftLat = layer.getMaxy();
double lowerRightLat = layer.getMiny();
bbox = new OgcGeoBoundingBox(lowerRightLon, upperLeftLon,
upperLeftLat, lowerRightLat);
// we default to whole earth now.
// We don't really care about the DataSet specific areas for the feature
// They are added together and treated as a whole for requests from the DPA
bbox = AbstractWfsSource.fullBbox;
} catch (Exception e) {
statusHandler.handle(Priority.ERROR,
@ -142,8 +141,8 @@ public class RegistryFeatureTypeModifier implements IFeatureTypeModifier {
String crs = null;
try {
ConfigLayer layer = getConfigLayer(name);
crs = layer.getCrs();
// Default to WGS:84
crs = AbstractWfsSource.defaultCRS;
} catch (Exception e) {
statusHandler.handle(Priority.ERROR,
"Couldn't retrieve CRS for feature: " + name

View file

@ -28,6 +28,8 @@ import java.util.Set;
import com.raytheon.uf.common.datadelivery.registry.Coverage;
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
import com.raytheon.uf.common.datadelivery.registry.DataLevelType.LevelType;
import com.raytheon.uf.common.datadelivery.registry.DataSet;
import com.raytheon.uf.common.datadelivery.registry.DataSetMetaData;
import com.raytheon.uf.common.datadelivery.registry.DataType;
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSet;
import com.raytheon.uf.common.datadelivery.registry.GriddedDataSetMetaData;
@ -35,6 +37,7 @@ import com.raytheon.uf.common.datadelivery.registry.Levels;
import com.raytheon.uf.common.datadelivery.registry.Time;
import com.raytheon.uf.common.datadelivery.retrieval.util.LookupManager;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.edex.ogc.common.db.SimpleDimension;
@ -52,6 +55,7 @@ import com.raytheon.uf.edex.ogc.common.interfaces.IWCSMetaData;
* ------------ ---------- ----------- --------------------------
* Jul 25, 2013 bclement Initial creation
* Aug 18, 2013 #2097 dhladky Adapted to AWIPS
* Jan 13, 2014 #2679 dhladky Multiple layers
*
* </pre>
*
@ -69,18 +73,16 @@ public class WcsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
protected GriddedDataSetMetaData gdsmd = null;
protected Time time = null;
public WcsRegistryCollectorAddon() {
super();
}
@Override
protected void setCoverage(L layer) {
// TODO: NOt yet implemented
}
@Override
protected Coverage getCoverage() {
// TODO Auto-generated method stub
return null;
}
@Override
protected void setDataSet(L layer) {
// TODO Auto-generated method stub
@ -96,16 +98,6 @@ public class WcsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
return DataType.GRID;
}
@Override
public GriddedDataSet getDataSet() {
return gds;
}
@Override
public GriddedDataSetMetaData getDataSetMetaData() {
return gdsmd;
}
// TODO implement this when we do WCS
@Override
public Levels getLevels(DataLevelType type, String collectionName) {
@ -136,8 +128,7 @@ public class WcsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
levels.setDz(dz);
} catch (Exception e) {
statusHandler.error("Level info" + collectionName + " url: "
+ getDataSetMetaData().getUrl(), e);
statusHandler.error("Level info" + collectionName + ":", e);
}
return levels;
@ -205,4 +196,34 @@ public class WcsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
}
@Override
protected Coverage getCoverage(String layerName) {
// TODO Auto-generated method stub
return null;
}
@Override
protected DataSet<?, ?> getDataSet(String layerName) {
// TODO Auto-generated method stub
return null;
}
@Override
protected DataSetMetaData<?> getDataSetMetaData(String layerName) {
// TODO Auto-generated method stub
return null;
}
@Override
public String isWithinLayer(R record) {
// TODO Auto-generated method stub
return null;
}
@Override
public ISpatialObject getSpatial(R record) {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -23,8 +23,12 @@ import java.lang.reflect.Constructor;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TimeZone;
import java.util.TreeSet;
@ -42,6 +46,7 @@ import com.raytheon.uf.common.datadelivery.registry.PointDataSetMetaData;
import com.raytheon.uf.common.datadelivery.registry.PointTime;
import com.raytheon.uf.common.datadelivery.registry.WFSPointDataSet;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.geospatial.ISpatialObject;
import com.raytheon.uf.common.geospatial.MapUtil;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
@ -70,39 +75,39 @@ import com.vividsolutions.jts.geom.Envelope;
* Sept 30, 2013 1797 dhladky Generics
* Oct 10, 2013 1797 bgonzale Refactored registry Time objects.
* Nov 6, 2013 2525 dhladky Stop appending "/wfs"
* Jan 13, 2014 2679 dhladky Multiple ingest layer windows for a single request window.
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends SimpleLayer<D>, R extends PluginDataObject>
public abstract class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends SimpleLayer<D>, R extends PluginDataObject>
extends RegistryCollectorAddon<D, L, R> implements IWFSMetaData<L> {
protected final IUFStatusHandler statusHandler = UFStatus.getHandler(this
.getClass());
protected WFSPointDataSet wpds = new WFSPointDataSet();
protected final Map<String, WFSPointDataSet> wpds = new HashMap<String, WFSPointDataSet>(1);
protected PointDataSetMetaData pdsmd = new PointDataSetMetaData();
protected final Map<String, PointDataSetMetaData> pdsmds = new HashMap<String, PointDataSetMetaData>(1);
protected PointTime time = new PointTime();
protected final Map<String, PointTime> times = new HashMap<String, PointTime>(1);
protected Coverage coverage = new Coverage();
protected final Map<String, Coverage> coverages = new HashMap<String, Coverage>(1);
protected volatile L _layer = null;
protected int roundCutoff = 45;
protected final String layerName;
protected final Map<String, L> layers = new HashMap<String, L>(1);
protected final Map<String, Date> previousTimes = new HashMap<String, Date>(1);
protected Date previousTime = null;
protected int roundCutoff = 45;
/** Used to identify breaking character for URL and unique naming key **/
public static final String UNIQUE_ID_SEPARATOR = ",";
/**
* @param layerName
*/
public WfsRegistryCollectorAddon(String layerName) {
this.layerName = layerName;
public WfsRegistryCollectorAddon() {
super();
}
/*
@ -116,8 +121,12 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
@Override
public void onCollect(L layer, R record) {
ensureLayer(layer);
synchronized (_layer) {
Date time = record.getDataTime().getRefTime();
synchronized (layers) {
// find enclosing layer to assign to
String layerName = isWithinLayer(record);
L _layer = layers.get(layerName);
copy(_layer);
Date time = getTime(record);
_layer.getTimes().add(time);
}
}
@ -139,21 +148,24 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
* @param layer
*/
private void ensureLayer(L layer) {
if (_layer == null) {
synchronized (layerName) {
if (_layer != null) {
// another thread got here first
return;
/**
* this interfaces with the WfsSource, in registry collectors there
* exists a one to many relationship for featureType to layers. In this
* case we just re-init if they are null, not caring what got passed in;
*/
synchronized (layers) {
for (Entry<String, L> entry : layers.entrySet()) {
L _layer = entry.getValue();
if (_layer == null) {
synchronized (_layer) {
initializeLayer(_layer);
layers.put(layer.getName(), _layer);
}
}
L copy = copy(layer);
copy.getTimes().clear();
initializeLayer(copy);
_layer = copy;
}
} else {
if (!layer.getName().equals(layerName)) {
statusHandler
.warn("WFS Registry collector used with multiple layers, unexpected behavior may occur");
}
}
}
@ -188,11 +200,10 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
*/
protected void initializeLayer(L layer) {
synchronized (layer) {
// create the main point data set
layer.setName(layerName);
setDataSet(layer);
Coordinate lowerRight = getCoverage().getLowerRight();
Coordinate upperLeft = getCoverage().getUpperLeft();
Coverage coverage = getCoverage(layer.getName());
Coordinate lowerRight = coverage.getLowerRight();
Coordinate upperLeft = coverage.getUpperLeft();
ReferencedEnvelope env = new ReferencedEnvelope(upperLeft.x,
lowerRight.x, lowerRight.y, upperLeft.y,
MapUtil.LATLON_PROJECTION);
@ -204,9 +215,12 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
layer.setTargetMinx(configLayer.getMinx());
layer.setTargetMiny(configLayer.getMiny());
layer.setTimes(new TreeSet<Date>());
// install main dataset name on registry
storeDataSet(getDataSet());
// create the main point data set
setDataSet(layer);
// install main dataset name on registry
WFSPointDataSet pds = getDataSet(layer.getName());
storeDataSet(pds);
}
}
@ -221,8 +235,16 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
}
@Override
public WFSPointDataSet getDataSet() {
return wpds;
public WFSPointDataSet getDataSet(String layerName) {
WFSPointDataSet wpd = wpds.get(layerName);
if (wpd == null) {
wpd = new WFSPointDataSet();
wpds.put(layerName, wpd);
}
return wpd;
}
/**
@ -233,24 +255,28 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
protected void setTime(L layer) {
synchronized (layer) {
// always creating a new time object for transfer
List<Date> times = new ArrayList<Date>();
List<Date> timeList = new ArrayList<Date>();
// for dataset we just create a place holder object
// DataSetMetaData gets the actual times
if (layer.getTimes() != null) {
for (Date time : layer.getTimes()) {
times.add(time);
timeList.add(time);
}
time.setTimes(times);
time.setNumTimes(times.size());
PointTime time = getTime(layer.getName());
time.setTimes(timeList);
time.setNumTimes(timeList.size());
// apply date format
SimpleDateFormat dateFormat = new SimpleDateFormat(
getConfiguration().getAgent().getDateFormat());
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
time.setFormat(dateFormat.toPattern());
if (!times.isEmpty()) {
if (!timeList.isEmpty()) {
Date previousTime = previousTimes.get(layer.getName());
if (previousTime == null) {
time.setStart(times.get(0));
time.setStart(timeList.get(0));
} else {
try {
time.setStartDate(dateFormat.format(previousTime));
@ -259,20 +285,34 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
"Failed to parse date.", e);
}
}
Date lastTime = times.get(times.size() - 1);
Date lastTime = timeList.get(timeList.size() - 1);
try {
time.setEndDate(dateFormat.format(lastTime));
} catch (ParseException e) {
statusHandler.handle(Priority.PROBLEM,
"Failed to parse date.", e);
}
setPreviousTime(lastTime);
setPreviousTime(layer.getName(), lastTime);
}
}
}
}
protected PointTime getTime() {
/**
* Get a point time
*
* @param layerName
* @return PointTime
*/
protected PointTime getTime(String layerName) {
PointTime time = times.get(layerName);
if (time == null) {
time = new PointTime();
times.put(layerName, time);
}
return time;
}
@ -282,21 +322,31 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
synchronized (layer) {
// set coverage if not set
setCoverage(layer);
wpds.setCoverage(getCoverage());
wpds.setDataSetName(layer.getName());
wpds.setProviderName(getConfiguration().getProvider().getName());
wpds.setCollectionName(layer.getName());
WFSPointDataSet wpd = getDataSet(layer.getName());
Coverage coverage = getCoverage(layer.getName());
wpd.setCoverage(coverage);
wpd.setDataSetName(layer.getName());
wpd.setProviderName(getConfiguration().getProvider().getName());
wpd.setCollectionName(layer.getName());
// set parameters if not already
setParameters(layer);
wpds.setParameters(getParameters());
wpd.setParameters(getParameters());
// set time if not already
setTime(layer);
wpds.setTime(getTime());
wpd.setTime(getTime(layer.getName()));
}
}
@Override
public PointDataSetMetaData getDataSetMetaData() {
public PointDataSetMetaData getDataSetMetaData(String layerName) {
PointDataSetMetaData pdsmd = pdsmds.get(layerName);
if (pdsmd == null) {
pdsmd = new PointDataSetMetaData();
pdsmds.put(layerName, pdsmd);
}
return pdsmd;
}
@ -311,12 +361,22 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
sb.append(layer.getTargetMiny()).append(" : ");
sb.append(layer.getTargetMinx()).append(", ");
sb.append(layer.getTargetMaxy());
PointDataSetMetaData pdsmd = getDataSetMetaData(layer.getName());
pdsmd.setDataSetDescription(sb.toString());
pdsmd.setDataSetName(layer.getName());
pdsmd.setProviderName(getConfiguration().getProvider().getName());
StringBuilder sb2 = new StringBuilder();
sb2.append(getConfiguration().getProvider().getConnection()
.getUrl());
/**
* this is added to the URL because the URL is what the registry
* uses as it's unique identifier. All WFS/WCS requests use the same
* URL, we have to add the dataset name to ensure uniqueness of the
* key in the registry. This is stripped off and discarded in retrieval.
**/
sb2.append(UNIQUE_ID_SEPARATOR);
sb2.append(layer.getName());
pdsmd.setUrl(sb2.toString());
}
}
@ -327,14 +387,19 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
@Override
protected void setCoverage(L layer) {
synchronized (layer) {
setCoverage(layer.getName());
getCoverage(layer.getName());
}
}
/**
* Make me a new coverage
*
* @param layerName
* @return Coverage
*/
private void setCoverage(String layerName) {
private Coverage getNewCoverage(String layerName) {
Coverage coverage = new Coverage();
ConfigLayer configLayer = getAgent().getLayer(layerName);
Coordinate lowerRight = new Coordinate(configLayer.getMaxx(),
configLayer.getMiny());
@ -343,16 +408,28 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
ReferencedEnvelope re = EnvelopeUtils.createLatLonEnvelope(lowerRight,
upperLeft);
coverage.setEnvelope(re);
return coverage;
}
/**
* Gets the coverage
*
* @param layer
* @param layername
* @return
*/
@Override
protected Coverage getCoverage() {
protected Coverage getCoverage(String layerName) {
Coverage coverage = coverages.get(layerName);
if (coverage == null) {
coverage = getNewCoverage(layerName);
coverages.put(layerName, coverage);
}
return coverage;
}
@ -374,40 +451,43 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
// place into a WFS metadata object.
synchronized (layer) {
// creates a new PointTime object
time = new PointTime();
times.put(layer.getName(), new PointTime());
// harvests the times from the layer
setTime(layer);
// make sure you populate the metadata
setDataSetMetaData(layer);
getDataSetMetaData().setTime(getTime());
getDataSetMetaData(layer.getName()).setTime(getTime(layer.getName()));
ImmutableDate date = null;
date = new ImmutableDate(getTime().getEnd());
getDataSetMetaData().setDate(date);
storeMetaData(getDataSetMetaData());
date = new ImmutableDate(getTime(layer.getName()).getEnd());
getDataSetMetaData(layer.getName()).setDate(date);
storeMetaData(getDataSetMetaData(layer.getName()));
}
}
/**
* Adds the new times to the layer, transmit meta data
* Adds the new times to the layers, transmit meta data objects
*/
public void buildLayerUpdate() {
if (_layer == null) {
return;
}
synchronized (_layer) {
try {
if (!_layer.getTimes().isEmpty()) {
sendMetaData(_layer);
statusHandler.info("MetaData update " + _layer.getName()
+ ": times: " + _layer.getTimes().size());
_layer.getTimes().clear();
} else {
statusHandler.info("No new metadata to update "
+ _layer.getName());
synchronized (layers) {
for (String name : layers.keySet()) {
// grab each layer to evaluate
L layer = layers.get(name);
try {
if (!layer.getTimes().isEmpty()) {
sendMetaData(layer);
statusHandler.info("MetaData update " + layer.getName()
+ ": times: " + layer.getTimes().size());
layer.getTimes().clear();
} else {
statusHandler.info("No new metadata to update "
+ layer.getName());
}
} catch (Exception e) {
statusHandler.error("problem updating " + layer.getName()
+ " layer. " + e);
}
} catch (Exception e) {
statusHandler.error("problem updating " + _layer.getName()
+ " layer. " + e);
}
}
}
@ -445,16 +525,105 @@ public class WfsRegistryCollectorAddon<D extends SimpleDimension, L extends Simp
* From this date to last will be the next query
* @return
*/
public Date getPreviousTime() {
return previousTime;
public Date getPreviousTime(String layerName) {
Date previous = previousTimes.get(layerName);
return previous;
}
/**
* Sets the marker time for previousDate
* @param layername
* @param previousTime
*/
public void setPreviousTime(Date previousTime) {
this.previousTime = previousTime;
public void setPreviousTime(String layerName, Date previousTime) {
previousTimes.put(layerName, previousTime);
}
/**
* Filter geographically
* @param pdos
*/
public PluginDataObject[] filter(PluginDataObject[] pdos) {
Collection<PluginDataObject> withInGeoConstraint = new ArrayList<PluginDataObject>();
PluginDataObject[] pdor = null;
for (PluginDataObject record : pdos) {
if (record != null) {
@SuppressWarnings("unchecked")
ISpatialObject spatial = getSpatial((R) record);
Coordinate c = spatial.getGeometry().getCoordinate();
// Have to loop over the layers in order to separate them.
for (String name : layers.keySet()) {
Coverage coverage = getCoverage(name);
if (coverage != null) {
Envelope e = coverage.getEnvelope();
if (c != null) {
if (e.contains(c)) {
withInGeoConstraint.add(record);
// once it is found to be within one, you are done.
break;
} else {
statusHandler.handle(
Priority.DEBUG,
"Record discarded: outside of range: "
+ c.x + " "
+ c.y);
}
}
}
}
}
}
if (!withInGeoConstraint.isEmpty()) {
int size = withInGeoConstraint.size();
pdor = withInGeoConstraint.toArray(new PluginDataObject[size]);
}
return pdor;
}
@Override
public String isWithinLayer(R record) {
String layerName = null;
if (record != null) {
ISpatialObject spatial = getSpatial(record);
Coordinate c = spatial.getGeometry().getCoordinate();
// Figure out which layer to tally this record too.
for (String name : layers.keySet()) {
Coverage coverage = getCoverage(name);
if (coverage != null) {
Envelope e = coverage.getEnvelope();
if (c != null) {
if (e.contains(c)) {
layerName = name;
break;
}
}
}
}
}
return layerName;
}
}

View file

@ -49,16 +49,18 @@
<bean id="madisRegistryAddon"
class="com.raytheon.uf.edex.plugin.madis.registry.MadisRegistryCollectorAddon"
depends-on="registerDataDeliveryHandlers, registerRequestRegistryRouter, registerMadisPlugin">
<constructor-arg value="madis" />
</bean>
<bean id="madisRegistryAddonProvider" class="com.raytheon.uf.edex.ogc.registry.RegistryCollectorAddonProvider">
<constructor-arg ref="madisRegistryAddon"/>
<bean id="madisRegistryAddonProvider"
class="com.raytheon.uf.edex.ogc.registry.RegistryCollectorAddonProvider"
depends-on="madisRegistryAddon">
<constructor-arg ref="madisRegistryAddon" />
</bean>
<bean id="madisWfsTypeModifier"
class="com.raytheon.uf.edex.ogc.registry.RegistryFeatureTypeModifier" />
<bean id="madisWfsTypeModifier" class="com.raytheon.uf.edex.ogc.registry.RegistryFeatureTypeModifier" />
<bean class="com.raytheon.uf.edex.ogc.common.util.AddonPropsPostProcessor">
<bean class="com.raytheon.uf.edex.ogc.common.util.AddonPropsPostProcessor" depends-on="madisRegistryAddonProvider, madisRegistryAddon">
<constructor-arg>
<map>
<entry key="madisIngestFilter">

View file

@ -19,19 +19,16 @@
**/
package com.raytheon.uf.edex.plugin.madis.registry;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.datadelivery.harvester.ConfigLayer;
import com.raytheon.uf.common.datadelivery.harvester.OGCAgent;
import com.raytheon.uf.common.dataplugin.madis.MadisRecord;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.edex.ogc.common.util.PluginIngestFilter;
import com.raytheon.uf.edex.ogc.registry.WfsRegistryCollectorAddon;
import com.raytheon.uf.edex.plugin.madis.ogc.MadisDimension;
import com.raytheon.uf.edex.plugin.madis.ogc.MadisLayer;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
/**
*
@ -46,6 +43,7 @@ import com.vividsolutions.jts.geom.Envelope;
* Aug 30, 2013 #2098 dhladky Incorrect time returned
* Sept 2, 2013 #2098 dhladky Improved time management.
* Sept 9, 2013 #2351 dhladky Speed improvements
* Jan 13, 2014 #2679 dhladky multiple ingest layers for a single request window.
*
* </pre>
*
@ -57,12 +55,19 @@ public class MadisRegistryCollectorAddon extends
implements PluginIngestFilter {
/**
* @param layerName
* @param layerNames
*/
public MadisRegistryCollectorAddon(String layerName) {
super(layerName);
this._layer = new MadisLayer();
initializeLayer(_layer);
public MadisRegistryCollectorAddon() {
super();
OGCAgent agent = getAgent();
for (ConfigLayer clayer: agent.getLayers()) {
MadisLayer layer = new MadisLayer();
layer.setName(clayer.getName());
layers.put(clayer.getName(), layer);
initializeLayer(layer);
}
}
/*
@ -90,50 +95,15 @@ public class MadisRegistryCollectorAddon extends
return new MadisLayer(layer);
}
/**
* Filter geographically
*/
public PluginDataObject[] filter(PluginDataObject[] pdos) {
Collection<MadisRecord> withInGeoConstraint = new ArrayList<MadisRecord>();
PluginDataObject[] pdor = null;
Envelope e = null;
if (getCoverage() != null) {
e = getCoverage().getEnvelope();
for (PluginDataObject record : pdos) {
MadisRecord rec = (MadisRecord) record;
if (rec != null && rec.getLocation() != null) {
Coordinate c = rec.getLocation().getLocation()
.getCoordinate();
if (c != null) {
if (e.contains(c)) {
withInGeoConstraint.add(rec);
} else {
statusHandler.handle(
Priority.DEBUG,
"Madis record discarded: outside of range: "
+ rec.getLatitude() + " "
+ rec.getLongitude());
}
}
}
}
@Override
public SurfaceObsLocation getSpatial(MadisRecord record) {
if (record.getLocation() != null) {
return record.getLocation();
}
return null;
}
if (!withInGeoConstraint.isEmpty()) {
int size = withInGeoConstraint.size();
pdor = withInGeoConstraint.toArray(new PluginDataObject[size]);
}
return pdor;
}
}

View file

@ -4,7 +4,6 @@
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="obsRegistryAddon" class="com.raytheon.uf.edex.plugin.obs.registry.ObsRegirstyCollectorAddon">
<constructor-arg value="metar"/>
</bean>
<bean id="obsRegistryAddonProvider" class="com.raytheon.uf.edex.ogc.registry.RegistryCollectorAddonProvider">

View file

@ -9,21 +9,18 @@
*/
package com.raytheon.uf.edex.plugin.obs.registry;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.datadelivery.harvester.ConfigLayer;
import com.raytheon.uf.common.datadelivery.harvester.OGCAgent;
import com.raytheon.uf.common.dataplugin.obs.metar.MetarRecord;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation;
import com.raytheon.uf.edex.ogc.common.db.DefaultPointDataDimension;
import com.raytheon.uf.edex.ogc.common.db.LayerCollector;
import com.raytheon.uf.edex.ogc.common.util.PluginIngestFilter;
import com.raytheon.uf.edex.ogc.registry.WfsRegistryCollectorAddon;
import com.raytheon.uf.edex.plugin.obs.ogc.metar.MetarLayer;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
/**
* Registry Collector for Observations
@ -35,6 +32,7 @@ import com.vividsolutions.jts.geom.Envelope;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 26, 2013 bclement Initial creation
* Jan 13, 2014 #2679 dhladky multiple layers
*
* </pre>
*
@ -46,11 +44,16 @@ public class ObsRegistryCollectorAddon
WfsRegistryCollectorAddon<DefaultPointDataDimension, MetarLayer, MetarRecord>
implements PluginIngestFilter {
/**
* @param layerName
*/
public ObsRegistryCollectorAddon(String layerName) {
super(layerName);
public ObsRegistryCollectorAddon() {
super();
OGCAgent agent = getAgent();
for (ConfigLayer clayer: agent.getLayers()) {
MetarLayer layer = new MetarLayer();
layers.put(clayer.getName(), layer);
initializeLayer(layer);
}
}
/*
@ -78,49 +81,13 @@ public class ObsRegistryCollectorAddon
return new MetarLayer(layer);
}
/**
* Filter geographically
*/
public PluginDataObject[] filter(PluginDataObject[] pdos) {
Collection<MetarRecord> withInGeoConstraint = new ArrayList<MetarRecord>();
PluginDataObject[] pdor = null;
for (PluginDataObject record : pdos) {
MetarRecord rec = (MetarRecord) record;
if (rec != null) {
Envelope e = getCoverage().getEnvelope();
if (rec.getLocation() != null) {
Coordinate c = rec.getLocation().getLocation()
.getCoordinate();
if (c != null) {
if (e.contains(c)) {
withInGeoConstraint.add(rec);
} else {
statusHandler.handle(
Priority.DEBUG,
"Obs record discarded: outside of range: "
+ rec.getLatitude() + " "
+ rec.getLongitude());
}
}
}
}
@Override
public SurfaceObsLocation getSpatial(MetarRecord record) {
if (record.getLocation() != null) {
return record.getLocation();
}
if (!withInGeoConstraint.isEmpty()) {
int size = withInGeoConstraint.size();
pdor = withInGeoConstraint.toArray(new PluginDataObject[size]);
}
return pdor;
return null;
}
}