pacificclimate / station-data-portal

Data portal for station data (e.g., BC Station Data, a.k.a. PCDS; Yukon-NWT Station Data); React app
0 stars 0 forks source link

Use Geoserver to download station metadata? #128

Open rod-glover opened 2 years ago

rod-glover commented 2 years ago

@jameshiebert said:

I do still lament the loss of functionality of being able to download from geoserver directly in a geospatial format that can be directly imported into a GIS (Shapefile, GPX, Google Earth

rod-glover commented 2 years ago

A bit of research shows that Geoserver filtering can cover the more general SDP filters (arbitrary selections of networks, variables, frequencies).

Geoserver standardly offers a hilariously verbose (of course) XML encoding of filter expressions. The PDP uses this encoding. It would not be a good choice for SDP because arbitrary sets of networks etc. would soon create a URL longer than the de facto limit of 2048 characters.

Geoserver also offers a more compact encoding called ECQL that may serve. This too may also exceed URL length limits, but less often. We already have the URL length problem for requesting data downloads, whose syntax is similarly compact.

We may have to modify the view crmp_network_geoserver (or create a similar one) that is suitable for these extended queries; in particular the coding of variables.

jameshiebert commented 2 years ago

Another idea to add this functionality back in would be to directly use PostGIS from the sdpb. I think all of these formats are able to be output from PostGIS, so we could have the sdpb issue the appropriate SQL query.

rod-glover commented 2 years ago

That definitely sounds worth looking into.