pacificclimate / pdp

The PCIC Data Portal - Server software to run the entire web application
GNU General Public License v3.0
1 stars 2 forks source link

Compensate for changed GetFeatureInfo response #200

Closed rod-glover closed 3 years ago

rod-glover commented 3 years ago

Resolves #198

This PR also updates the local-dev Docker infrastructure to allow a fully functional PDP application to be run locally.

corviday commented 3 years ago

I have been unable to get the local dev test setup working. (Error message 502 Bad Gateway from nginx). I'm going to see if I can get it running on one of our docker-servers, but I may need to get help from @rod-glover or @matthewbenstead for testing.

corviday commented 3 years ago

Okay, finally, several days later, I have gotten tests running! Sorry for the delay.

Everything seems to work well on the bc_prism, hydro_model_archive, and pcds, hydro_stn_archive. and hydro_stn_cmip5 portals.

When I load the gridded_observations, downscaled_gcms, downscaled_gcms_archive, hydro_model_out, portals, I get a popup that says: There was an unhandleable problem fetching some metadata for the current layer. Unfortunately, this prevents some of the controls from functioning properly. Please try a page reload and if the problem persists, please file a bug report. The console shows a CORS error. Perhaps I still don't have the docker test setup configured correctly, do you see this error on your end?

Drawing a selection area on these portals results in an error (Uncaught TypeError: bbox is undefined) and does not update the download link.


Weirdly, the hydro_model_archive has this issue on the live portal.

rod-glover commented 3 years ago

@corviday , I don't get the CORS error, nor the error message you quote for daily_gridded. Instead, I get correct-looking successful requests to the backend, and this error: "Cannot resolve selection to data grid. Please zoom in and select only within the data region."

I think the error you see is possibly due to setup. Can you send me a copy of the relevant error messages from the Network and/or Console tabs?

I think the error I see is a real bug, and I am investigating. It would be worthwhile getting your setup to the point where you can see this "better" error.

rod-glover commented 3 years ago

I think I have found the root of the real error. The latitude array is, for the daily_gridded datasets, in descending order. For most other datasets, it is in ascending order.

rod-glover commented 3 years ago

@corviday , a demo version is up at https://services.pacificclimate.org/dev/portal/bc_prism/map/ etc. I believe everything is working correctly. Would you mind casting your eye over it again?

The code has been modified slightly to handle ascending and descending spatial (lat, lon) dimension arrays. You can look at if you like or skip it.