GeoSensorWebLab / data-transloader

Download and convert weather data for SensorThings API
GNU General Public License v3.0
3 stars 1 forks source link

wind direction not downloaded from Data Garrison #10

Open cmdln156 opened 3 years ago

cmdln156 commented 3 years ago

I'm using the transloader to download weather data from Data Garrison. It's downloading everything fine except for wind direction. It's not present in the JSON files that are generated in the datastore directory, although wind speed and wind gust are in the files.

EHJ-52n commented 2 years ago

Hi @cmdln156 @openfirmware ,

I took a deeper look into this and the issue might be caused by the value of sens_details in the base_path: https://github.com/GeoSensorWebLab/data-transloader/blob/f329bd6fa623d3c03a08b363be85804d7bb51bde/lib/transloader/data_garrison/station.rb#L43

For the stations, I am working with, sens_details=127 results in a html page having the last two entries under the sensors node collapsed. Hence, they are not parsed in this loop: https://github.com/GeoSensorWebLab/data-transloader/blob/f329bd6fa623d3c03a08b363be85804d7bb51bde/lib/transloader/data_garrison/station.rb#L107-L128

One solution would be to adjust this value to something higher, or develop some logic to identify the number of sensors and unfold all available sensors.

As workaround, you might update the station metadata json manually and add the missing entries under metadata: datastreams: by hand.