Implement geo upload#47
Conversation
|
@mzur, in the tests running on the test_module on GitHub, I have the problem that the "Given path () to the exiftool binary is invalid". I guess this has to do with the docker container of biigle/app and biigle/worker, which are not updated yet as to include the exiftool binary (i.e. this pull-request in biigle/core) ? |
|
Yes, that sounds about right. You can't do anything about that. You should verify that all tests pass for you locally and then I have to check this again when I review the PRs. |
| this.overlay = this.browsingOverlays.find(x => x.id === id); | ||
| } | ||
| }, | ||
| browsingOverlays(browsingOverlays) { |
There was a problem hiding this comment.
Hey @mzur,
I've been working on the OpenLayers-implementation of the geoTIFF overlays. I've changed the layer-source from static to tile-layer (Zoomify) as discussed and provided the width/height attributes in pixels for the overlays. I then uploaded a very small (684x425 pixel) geoTIFF file for testing. But when opening the map in the modal and zooming out, I've experienced very strong performance issues: stuttering map when trying to move up to freezing the whole webpage.
That should definitely not be the case considering the small example geoTIFF. Am I missing something in the way I've implemented the layers? What could have caused such a behaviour?
There was a problem hiding this comment.
I think it has to do with the provided url, since it currently points at the original overlay file and that seems to be wrong (see here). From what I read in the Zoomify documentation, it should be possible to provide a base-url pointing to the directory that contains the TileGroup-folder, which contains the individual tile-images of the overlay.
There was a problem hiding this comment.
I've changed the url, now pointing at the correct directory where the overlay-tiles reside. Unfortunately, that didn't solve any of the performance issues.
There was a problem hiding this comment.
I've also noticed an "out of memory"-error when interacting with the map.
There was a problem hiding this comment.
Another possible reason for this behaviour, which I had in mind, are the geoTIFF input parameters to the Openlayers function.
I had a look again at how the coordinates of the geoTIFF are transformed upon upload... and found some bugs in the GeoManager script (usage of wrong signs). However, they didn't affect the transformation as such, since they occurred in terms that result in zero most of the time (at least for the test files I used so far).
I also double checked the correctness of transformation values by comparing them to transformation values of the same example geoTIFF, but done with QGIS (which uses GDAL for transformation). The numbers turn out to be correct (with small deviations starting from the third decimal place). So the geoTIFF input parameters should be fine and can be ruled out from causing any trouble in the OpenLayers function.
There was a problem hiding this comment.
Another process I suspect of causing the trouble is the tiling of the geoTIFF files with TileSingleOverlay.
At least there would be an alternative way to implement the tiling of geoTIFF files. I saw that OpenLayers supports a format called Cloud-Optimized-Geotiff (COG), which is essentially what we want to achieve by tiling the geoTIFF, i.e. getting a web-optimized format of it. There are several ways to convert a geoTIFF into a COG, e.g. using GDAL (gdal_translate).
mzur
left a comment
There was a problem hiding this comment.
This is no full review. It just got me stuck trying to test your code.
There was a problem hiding this comment.
Migration files must not be deleted. This also means that you have to duplicate the create_geo_overlays_table migration and update the timestamp to something after remove_geo_overlays. Otherwise the migrations will not be applied correctly to existing instances.
There was a problem hiding this comment.
Thank you for explaining!
resolved 40bafbe
There was a problem hiding this comment.
Since this is still a work in progress you can also do everything in a single migration (the create_geo_overlays_table mentioned above). You don't have to assume that there is a separate WMS table.
Sorry for the late reply, somehow I don't receive notifications on comments any more since I changed my primary email address on GitHub (need to check how to enable notifications for my new email in the settings). I hope the migration issues are resolved with the recent changes! |
|
You should still get the notifications at GitHub (or you can enable them). I also asked you something here: biigle/core#761 (comment) |
mzur
left a comment
There was a problem hiding this comment.
This is a high-level review mostly from the UI perspective. A more detailed review follows in the next iteration.
mzur
left a comment
There was a problem hiding this comment.
When I upload a GeoTIFF, I get JS errors (see below). The upload seems to succeed, though.
When I upload the DEM_Rest_2014 file (you sent me?), I can't find it at the same location than QGIS tells me. Also, the tile files produced by Vips are binary (i.e. only #000 and #FFF colors).
Do you have a WMS for me to test?
14:31:59.876 [Vue warn]: $listeners is readonly.
found in
---> <Portal>
<Tab>
<Tabs>
<Root> volumes.js:3924:15
14:32:01.063 [Vue warn]: $attrs is readonly.
found in
---> <Portal>
<Tab>
<Tabs>
<Root> 2 volumes.js:3924:15
14:32:01.094 Uncaught (in promise) TypeError: callback.call is not a function
finally http://localhost:8000/assets/scripts/main.js?1729685278:133407
promise callback*./node_modules/vue-resource/dist/vue-resource.esm.js/p$1.then http://localhost:8000/assets/scripts/main.js?1729685278:133394
finally http://localhost:8000/assets/scripts/main.js?1729685278:133406
uploadGeoTiff http://localhost:8000/vendor/geo/scripts/volumes.js?1729686705:15985
invokeWithErrorHandling http://localhost:8000/assets/scripts/main.js?1729685278:136516
invoker http://localhost:8000/assets/scripts/main.js?1729685278:136841
_wrapper http://localhost:8000/assets/scripts/main.js?1729685278:142244
add$1 http://localhost:8000/assets/scripts/main.js?1729685278:142248
updateListeners http://localhost:8000/assets/scripts/main.js?1729685278:136873
updateDOMListeners http://localhost:8000/assets/scripts/main.js?1729685278:142278
invokeCreateHooks http://localhost:8000/assets/scripts/main.js?1729685278:140759
createElm http://localhost:8000/assets/scripts/main.js?1729685278:140646
createChildren http://localhost:8000/assets/scripts/main.js?1729685278:140743
createElm http://localhost:8000/assets/scripts/main.js?1729685278:140644
createChildren http://localhost:8000/assets/scripts/main.js?1729685278:140743
createElm http://localhost:8000/assets/scripts/main.js?1729685278:140644
createChildren http://localhost:8000/assets/scripts/main.js?1729685278:140743
createElm http://localhost:8000/assets/scripts/main.js?1729685278:140644
patch http://localhost:8000/assets/scripts/main.js?1729685278:141167
_update http://localhost:8000/assets/scripts/main.js?1729685278:138608
updateComponent http://localhost:8000/assets/scripts/main.js?1729685278:138729
get http://localhost:8000/assets/scripts/main.js?1729685278:139143
Watcher http://localhost:8000/assets/scripts/main.js?1729685278:139132
mountComponent http://localhost:8000/assets/scripts/main.js?1729685278:138736
$mount http://localhost:8000/assets/scripts/main.js?1729685278:143742
$mount http://localhost:8000/assets/scripts/main.js?1729685278:146656
init http://localhost:8000/assets/scripts/main.js?1729685278:137788
createComponent http://localhost:8000/assets/scripts/main.js?1729685278:140668
createElm http://localhost:8000/assets/scripts/main.js?1729685278:140615
createChildren http://localhost:8000/assets/scripts/main.js?1729685278:140743
createElm http://localhost:8000/assets/scripts/main.js?1729685278:140644
patch http://localhost:8000/assets/scripts/main.js?1729685278:141167
_update http://localhost:8000/assets/scripts/main.js?1729685278:138608
updateComponent http://localhost:8000/assets/scripts/main.js?1729685278:138729
get http://localhost:8000/assets/scripts/main.js?1729685278:139143
Watcher http://localhost:8000/assets/scripts/main.js?1729685278:139132
mountComponent http://localhost:8000/assets/scripts/main.js?1729685278:138736
main.js:133407:14
I get it as well, I'll have a look where it comes from.
This is most certainly due to the transformation error in the proj4php package, as discussed here.
Yes, I created a normalization of the color-band (as geoTIFF's often contain more color-information that can be set/adjusted manually by the user). So the discussed solution for now was to normalize the color-band to 0 - 255 in case it differs from that range (see code). |
Did you find the overlay? Where do I have to look? 😃
I saw that but I expected this to produce something else than the black/white image. There is no 0-255 range in the tiled image, just 0 and 255. |
Ahh, yeah it is a fairly small example-TIFF! The coordinates in EPSG:3857 are: -325165.2, 7779955.1 (Loch Davan close to Dinnet, Scotland)
I see, so I should check what goes wrong in the normalization. |
The formula used for image normalization should be working. It seems that the derived min- and max-values from libvips are not providing the correct min/max colour-band values as I expected them to be (i.e. they are different to what I see in the QGIS colour settings). Moreover, I tested with two different geoTIFF's and surprisingly the min/max of the two geoTIFF's were identical (min: |
|
You should try it with the Vips CLI too. If this does not show the expected values you can ask in the Vips repo. The maintainer is extremely responsive and helpful if you provide a good description of the problem and an example file. |
I tried with the CLI and get the correct |
|
(please use @mzur, otherwise I don't get notified of activity here) If this can be fixed by creating the geoTIFF in any other way then we could add an explanation to the manual and just expect geoTIFFs with the correct format. Then there is no need for special handling of edge cases (for now). |
If PixelScale is ill-defined and the ModelTransform Tag is present, use the ModelTransform data instead.
Use layer name since layer title could be an empty string.
references #44
Implement the structure for the upload mechanism in the volume-edit view. Allow the upload of both - browsing layers and context layers - i.e. upload of geoTIFF and (iFDO) metadata, linkage of WMS.
associated PR's: