Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement geo upload #47

Open
wants to merge 247 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
247 commits
Select commit Hold shift + click to select a range
c0aa459
include basic volumesEditRight mixin in geo
mtiessen1175 Nov 22, 2023
a71b958
add basic geoOverlay model and controller
mtiessen1175 Nov 22, 2023
0746ebe
Use old geo-overlay structure
mtiessen1175 Nov 23, 2023
444cbd1
fill geoOverlay model with functions
mtiessen1175 Nov 23, 2023
d676299
configure storage-disk for geo-overlays
mtiessen1175 Nov 23, 2023
d4bcc71
fix uiv Tab(s) import
mtiessen1175 Nov 23, 2023
a073726
rename geoOverlay to GeoOverlay
mtiessen1175 Nov 29, 2023
34c92bf
Add routes and controller structure for volume-geo-overlay
mtiessen1175 Nov 29, 2023
2b4ebcd
added some missing imports
mtiessen1175 Nov 29, 2023
947f673
add simple tabs for file upload
mtiessen1175 Nov 29, 2023
2638389
Merge branch 'browsing_vis' into geo_edit
mtiessen1175 Nov 29, 2023
95706ba
commit production ready files
mtiessen1175 Nov 29, 2023
d686aa2
create new geoTIFF component
mtiessen1175 Nov 30, 2023
ee70bfa
include production files
mtiessen1175 Nov 30, 2023
6a73c5e
edit text and names of overlay upload-tabs
mtiessen1175 Nov 30, 2023
fb78c78
Modified upload function.
mtiessen1175 Dec 4, 2023
89af5cf
Include geotiff.js for testing
mtiessen1175 Dec 4, 2023
df0ad5c
added transform-coordinates package to transform any CRS to WGS 84 fo…
mtiessen1175 Dec 4, 2023
0e772f3
Merge branch 'browsing_vis' into geo_upload
mtiessen1175 Dec 5, 2023
5761319
add production files
mtiessen1175 Dec 5, 2023
eb718c8
remove JS geotiff packages and code
mtiessen1175 Dec 11, 2023
dda9101
pass "raw" geotiff-data to backend
mtiessen1175 Dec 12, 2023
9df6bec
Add existing code for geo-overlay retrieval and deletion + test
mtiessen1175 Dec 12, 2023
351c681
delete the removal of geo-overlays-table
mtiessen1175 Dec 12, 2023
fdc0e79
add test for VolumeGeoOverlayController
mtiessen1175 Dec 12, 2023
7004442
Linting and fixing files
mtiessen1175 Dec 12, 2023
c2d9cfd
Test native php exif function
mtiessen1175 Dec 13, 2023
38f1aaf
test native php function for identifying geotiff-tagnames
mtiessen1175 Dec 14, 2023
52823b0
include php exif dependency
mtiessen1175 Dec 14, 2023
f777192
add php-exif code to controller
mtiessen1175 Dec 14, 2023
f077427
change php-exif dependency
mtiessen1175 Dec 18, 2023
6a6276b
remove custom-adapter code
mtiessen1175 Dec 18, 2023
55ef050
add error/success handlers to geoOverlay
mtiessen1175 Dec 18, 2023
6c52399
add validation rule to geoOverlayController
mtiessen1175 Dec 18, 2023
93b8902
Add logic for detecting the PCS (not finished)
mtiessen1175 Dec 19, 2023
127756b
Add coordinate raster- to model-space transformation (via pixelScale …
mtiessen1175 Dec 20, 2023
48b9440
add exception-handler for pixelScale logic
mtiessen1175 Dec 21, 2023
c7a260f
add code to transform model-space coordinates to WGS84
mtiessen1175 Dec 21, 2023
7b9aeab
add production files
mtiessen1175 Dec 21, 2023
50d18d5
fix code and add switch-case for projection-code handling
mtiessen1175 Dec 22, 2023
5986053
add code for user-defined CRS case in geotiff files
mtiessen1175 Dec 22, 2023
6f2dd3f
Add user-defined variables for the different cases
mtiessen1175 Dec 29, 2023
6f548fd
add variables to function header
mtiessen1175 Jan 4, 2024
c18e2a4
Add user-defined case 3
mtiessen1175 Jan 4, 2024
0df5bb9
Add validation exception for missing geoKey in user-defined case
mtiessen1175 Jan 5, 2024
0071506
add new error to list of errors and rename a geokey-variable
mtiessen1175 Jan 5, 2024
c874fbf
add route to delete geo-overlay
mtiessen1175 Jan 8, 2024
b2b75af
Change function documentation and add output for debugging
mtiessen1175 Jan 8, 2024
8f1f048
add production files
mtiessen1175 Jan 8, 2024
632905e
remove debugging output
mtiessen1175 Jan 8, 2024
14da1d4
include file variable in geotiff save function
mtiessen1175 Jan 9, 2024
00a4b54
Add function for tiling GeoOverlays upon upload (not finished)
mtiessen1175 Jan 9, 2024
9339404
add missing variable to function-call
mtiessen1175 Jan 9, 2024
d455679
small changes on code comments
mtiessen1175 Jan 9, 2024
23984da
change user-defined logic in ProjectedCSType geokey
mtiessen1175 Jan 9, 2024
ea24a0c
Drop user-defined PCS handling entirely and only allow upload when Pr…
mtiessen1175 Jan 10, 2024
33f97a2
Add two validationError cases (transform error, missing ProjectedCSTy…
mtiessen1175 Jan 12, 2024
6af3262
Added check for duplicate file upload
mtiessen1175 Jan 12, 2024
102ad90
Add css to prevent long file-names from overflowing
mtiessen1175 Jan 12, 2024
f701f84
cosmetic changes to some files
mtiessen1175 Jan 12, 2024
25c79a7
add production files
mtiessen1175 Jan 12, 2024
acfe531
Merge branch 'master' into geo_upload
mtiessen1175 Jan 12, 2024
1de793d
add production files
mtiessen1175 Jan 12, 2024
af0ddb3
Adapt tileSingleImage code for geoOverlays
mtiessen1175 Jan 16, 2024
2f884a4
add call to TileSingleOverlay handle() function
mtiessen1175 Jan 17, 2024
4d0f1ec
add upload size-constraint for geotiffs
mtiessen1175 Jan 17, 2024
fadf9e7
add script to publish config file of geo-module
mtiessen1175 Jan 17, 2024
7f327f3
try to retrieve tiff-file from geo-overlays storage and cast to gener…
mtiessen1175 Jan 17, 2024
98fd3bb
add artisan command geo:config to GeoServiceProvider.php
mtiessen1175 Jan 17, 2024
936a320
adapt handle() function (not working yet)
mtiessen1175 Jan 17, 2024
1cc7794
fix tempPath and comment out code for testing uploadStorage function
mtiessen1175 Jan 18, 2024
447ec05
call TileSingleOverlay with dispatch event
mtiessen1175 Jan 19, 2024
83c8eb8
add missing public variable
mtiessen1175 Jan 19, 2024
1005b17
add proj4php package dependency to geo-module
mtiessen1175 Jan 19, 2024
5eaf4e4
add GeoOverlayController test
mtiessen1175 Jan 19, 2024
edddd13
add route for showing geotiff
mtiessen1175 Jan 19, 2024
30984f6
temporarily comment testcase
mtiessen1175 Jan 19, 2024
31359c9
add test .tif files and write tests for VolumeGeoOverlayController
mtiessen1175 Jan 19, 2024
ca6e1a6
add authorize method and move validation logic to new form request file
mtiessen1175 Jan 22, 2024
410059d
rename and add some errors
mtiessen1175 Jan 22, 2024
bed71f9
add a bunch of new tests for VolumeGeoOverlayController
mtiessen1175 Jan 22, 2024
d70e241
comment out debug-console prints
mtiessen1175 Jan 22, 2024
65cd08c
restrict the nr. of decimal places in geotiff lat/long values
mtiessen1175 Jan 22, 2024
644e904
include tests with provided example geotiffs
mtiessen1175 Jan 22, 2024
0c921d5
include production files
mtiessen1175 Jan 22, 2024
103c79c
include temporary storage path for geo-overlays (therefore changed ex…
mtiessen1175 Jan 24, 2024
da07e1b
create test for TileSingleOverlay
mtiessen1175 Jan 24, 2024
5688e65
create new Test in TileSingleOverlayTest
mtiessen1175 Jan 24, 2024
4658616
fix tempPath variable in TileSingleOverlay
mtiessen1175 Jan 26, 2024
5fad5c2
add test for upload mechanism of TileSingleOverlay
mtiessen1175 Jan 26, 2024
384dfb3
Made TileSingleOverlay an extension of class TileSingleImage
mtiessen1175 Jan 26, 2024
08e60fb
small correction of fragment-variable in test
mtiessen1175 Jan 29, 2024
8725832
Created new GeoManager class to process geotiff metadata
mtiessen1175 Jan 29, 2024
26b28f4
small fix on type-casting a variable
mtiessen1175 Jan 29, 2024
13e1912
fix variable
mtiessen1175 Jan 30, 2024
2104455
add merge statement for geo-config file
mtiessen1175 Jan 30, 2024
9c1dac6
change path for storing geotiff original and tiled files.
mtiessen1175 Jan 30, 2024
39e9e3b
use camelCase for some variables to stick with convention
mtiessen1175 Jan 30, 2024
4b66d00
change function documentation of storeGeoTiff
mtiessen1175 Jan 30, 2024
ebdae3e
deleted unwanted files from public scripts directory.
mtiessen1175 Jan 31, 2024
fb302d6
fix file deletion when geo-overlay has been removed
mtiessen1175 Jan 31, 2024
561f9e6
change testcase to check for directory instead of file
mtiessen1175 Jan 31, 2024
714514d
add previously deleted main.js files
mtiessen1175 Jan 31, 2024
c7cb2b0
Change exception handler in GeoOverlayController and add a correspond…
mtiessen1175 Feb 1, 2024
5f5b729
Adapt the TileSingleOverlay class-constructor and tests
mtiessen1175 Feb 1, 2024
d345083
add basic table-layout for uploaded overlays to geoOverlay tab
mtiessen1175 Jul 18, 2024
5e8f57c
create overlayItem component for table rows and adjust style of layer…
mtiessen1175 Jul 19, 2024
8bf6c4e
add vuedraggable dependency
mtiessen1175 Jul 19, 2024
23eab2d
created new table component and added draggable functions to sort tab…
mtiessen1175 Jul 19, 2024
86e86ed
add production files
mtiessen1175 Jul 19, 2024
7a4820b
add browsing and context-layer variables to geo_overlays table
mtiessen1175 Jul 22, 2024
f4039ac
Added update method for geoTIFF-overlay. Changes of browsing/context …
mtiessen1175 Jul 22, 2024
9d916d5
Add test for update controller-method
mtiessen1175 Jul 22, 2024
1591460
update production files
mtiessen1175 Jul 22, 2024
5497cbc
Fix test-method in GeoOverlayTest
mtiessen1175 Jul 22, 2024
e99e9d7
modified the index-method in VolumeGeoOverlayController + test to que…
mtiessen1175 Jul 23, 2024
2441478
removed comments
mtiessen1175 Jul 23, 2024
22188bd
Add API-call to fetch browsing_layers. Added new grid layout on geoMa…
mtiessen1175 Jul 23, 2024
159dc83
Added mechanism to add overlays as layers to ol-map. Moved overlay-va…
mtiessen1175 Jul 24, 2024
af534ab
add production files
mtiessen1175 Jul 24, 2024
231ee92
Add attr column to geo_overlays table
mtiessen1175 Jul 25, 2024
0eeb3e1
Fixed small bug in transformModelSpace method. Added width and height…
mtiessen1175 Jul 25, 2024
099f452
Changed ol layer-source from static to tile-layer in overlays. Change…
mtiessen1175 Jul 25, 2024
51a8240
added production files
mtiessen1175 Jul 25, 2024
5caedea
Created new route to get a template-url for the geo-overlay tile-dire…
mtiessen1175 Jul 26, 2024
cf5ef8f
Fix the ZoomifySource url with new template-url pointing at overlay-t…
mtiessen1175 Jul 26, 2024
8158697
Hide overlay upload table when no overlays present
mtiessen1175 Jul 26, 2024
40df7da
add production files
mtiessen1175 Jul 26, 2024
84fa33e
added an id to each overlay-tile name
mtiessen1175 Jul 29, 2024
97922b0
add css and functions to stop overlay-table from overflow outside par…
mtiessen1175 Jul 29, 2024
caf589c
added watcher to overlay-table that updates the currently displayed o…
mtiessen1175 Jul 29, 2024
d85eb38
removed unnecessary css code
mtiessen1175 Jul 29, 2024
7c7ad9c
Added localStorage variable to save the ordering of overlays in the o…
mtiessen1175 Jul 29, 2024
2e3c89d
changed table-grid css to not cut off table at page bottom
mtiessen1175 Jul 29, 2024
0059a1b
remove debugging-code
mtiessen1175 Jul 29, 2024
777c053
handle browsingOverlays in map-modal (show in correct order when spe…
mtiessen1175 Jul 29, 2024
4a886ea
add production files
mtiessen1175 Jul 29, 2024
b54b44c
make small adjustment to adding (ordered) layers to ol-map
mtiessen1175 Jul 29, 2024
1c00d56
Added blueprint Migration-, Model-, Controller-files for WebMapOverlays
mtiessen1175 Jul 30, 2024
6c9b3fe
Created the web_map_overlays table structure and added basic implemen…
mtiessen1175 Jul 30, 2024
7b39c2c
Add basic web-map-service upload structure to volumeEdit view
mtiessen1175 Jul 30, 2024
d013f98
add layer-column to web_map_overlays table
mtiessen1175 Jul 31, 2024
ef4afd7
Restructured the geo-overlay upload panel to prepare for second table…
mtiessen1175 Jul 31, 2024
6e00ef4
Added the form-submit functionality and filled the webmap-controller …
mtiessen1175 Jul 31, 2024
96d4dbc
Adapt webmap overlay table (account for multiple layers, remove name …
mtiessen1175 Aug 1, 2024
05e87b4
Finished the webmap store method and added tests
mtiessen1175 Aug 1, 2024
1bdf0a2
Adapted the webmap upload view and container (removed input 'name')
mtiessen1175 Aug 1, 2024
ffdfc99
simplified the layer-type update method for overlays
mtiessen1175 Aug 2, 2024
3624eeb
hide help-block for wms url upload
mtiessen1175 Aug 2, 2024
8c843ca
rename component geotiffOverlayTable -> overlayTable
mtiessen1175 Aug 2, 2024
92af2d8
added webmapoverlays to Container. Renamed overlays variable, adapted…
mtiessen1175 Aug 2, 2024
0ded10b
Fixed unique url validation error (needed another check on the stripp…
mtiessen1175 Aug 2, 2024
5145edd
Change formRequest name from UpdateGeotiffOverlay -> UpdateOverlay
mtiessen1175 Aug 3, 2024
5fdecee
Added update method to WebMapOverlay
mtiessen1175 Aug 3, 2024
add1927
Generalized the overlay table, update and remove methods to be usable…
mtiessen1175 Aug 3, 2024
0a28356
add production files
mtiessen1175 Aug 3, 2024
a36873c
css highlight table row while dragging to make the action more visible.
mtiessen1175 Aug 5, 2024
eefcce4
Append overlay 'type' variable in the overlay-models and methods.
mtiessen1175 Aug 5, 2024
c4a23fd
Simplify the geo-upload methods to use overlay.type variable to disti…
mtiessen1175 Aug 5, 2024
91313ab
Included missing method trigger in webmap-overlay-form.
mtiessen1175 Aug 5, 2024
5c2089a
Added view of both overlay-tables when Geo-overlay-upload panel is cl…
mtiessen1175 Aug 5, 2024
deefdc5
small change on truncateString method
mtiessen1175 Aug 5, 2024
11bb80a
Added tests for update and destroy of webmap-overlays + adapted the u…
mtiessen1175 Aug 5, 2024
70c79ab
added production files
mtiessen1175 Aug 5, 2024
6ce459f
Generalize the geoMapModal to work with both types of overlays. Add w…
mtiessen1175 Aug 5, 2024
b2c3196
added production files
mtiessen1175 Aug 5, 2024
fdcbeae
Open geoMapModal initially with overlays in active-selection state.
mtiessen1175 Aug 5, 2024
aacf41c
Add Geotiff table header
mtiessen1175 Aug 5, 2024
ff3a658
Add sidebar-style layer display to map modal (hiding extra informatio…
mtiessen1175 Aug 8, 2024
6b98f40
Restructure the store method in WebMap Controller, making own class o…
mtiessen1175 Aug 8, 2024
3d0782d
add production files
mtiessen1175 Aug 8, 2024
8e54bc7
add title to table items (showing full name)
mtiessen1175 Aug 9, 2024
b69e73f
Fixed bug (provide geotiffOverlayUrl before it is used in createOverl…
mtiessen1175 Aug 9, 2024
a821f79
add production files
mtiessen1175 Aug 9, 2024
4df78e9
Change GeoManager code to account for ModelTransformationTag case sa …
mtiessen1175 Aug 20, 2024
cafb808
Added geotiff test-file using ModelTransform-Tag
mtiessen1175 Aug 21, 2024
bb6b2c6
Added another geotiff test and test-file (for testing missing transfo…
mtiessen1175 Aug 21, 2024
a8a92d0
fix bug (prevent overwriting of sorted-webmapOverlays array by defaul…
mtiessen1175 Aug 21, 2024
51b42e1
Made created()-hook asynchronous (which allows to wait for api-call t…
mtiessen1175 Aug 21, 2024
68c4dc9
add production files
mtiessen1175 Aug 21, 2024
df7350c
Bugfix (overlay-type needs to be hardcoded to account for case when a…
mtiessen1175 Aug 23, 2024
2fab705
Fix issue of rendering imageMap (child) before data was fetched in ge…
mtiessen1175 Aug 23, 2024
250a316
Add webmap-layers in reverse order so layers are stacked according to…
mtiessen1175 Aug 23, 2024
2923e88
Added variable to v-if clause of image-map to prevent errors. Simplif…
mtiessen1175 Aug 23, 2024
59e0ee7
add production files
mtiessen1175 Aug 23, 2024
5de268c
Added a manual description for the geo overlays panel.
mtiessen1175 Aug 27, 2024
fe0e159
Merged several geo_overlays migration files into one. Created additio…
mtiessen1175 Aug 27, 2024
cf49142
adapt GeoOverlay Model to account for new columns.
mtiessen1175 Aug 27, 2024
1559b18
Changed Controller methods and routes such that geoOverlay specific m…
mtiessen1175 Aug 27, 2024
bd69687
Adapted geoOverlay specific Api-calls in Frontend
mtiessen1175 Aug 27, 2024
7d67cb6
Further adapted GeoOverlay Model to account for new columns. Changed …
mtiessen1175 Aug 28, 2024
f31d13f
Adapted WebMapOverlayController methods.
mtiessen1175 Aug 28, 2024
493f72f
Adapted VolumeGeoOverlayController methods.
mtiessen1175 Aug 28, 2024
b5d46a6
Moved tests to correct testfiles and changed them to use the correct …
mtiessen1175 Aug 28, 2024
eb44da7
Renamed VolumeGeoOverlayController & Test
mtiessen1175 Aug 28, 2024
d7f003f
Add .tiff to supported types in geoTiff-form
mtiessen1175 Aug 28, 2024
6a80981
Fixed API route
mtiessen1175 Aug 28, 2024
44ce5eb
Merged the (formerly) two tables into one unified geoOverlay-table. L…
mtiessen1175 Aug 28, 2024
c7b1a34
fixed column type in datatable
mtiessen1175 Aug 28, 2024
214925c
Adapted code in geo-selection filter to work with merged geoOverlays.
mtiessen1175 Aug 28, 2024
417c716
add production files
mtiessen1175 Aug 28, 2024
e076b16
Added mutator to geoOverlays model
mtiessen1175 Aug 28, 2024
81b5982
Change geoOverlays to be shown in correct order on geoMapModal.
mtiessen1175 Aug 29, 2024
df1ee15
Added functionality to enable/disable overlays on geoMapModal.
mtiessen1175 Aug 30, 2024
33ab77a
added production files
mtiessen1175 Aug 30, 2024
c0c7414
Remove WMS-layer queryable check, as it seems not to be standardized …
mtiessen1175 Sep 11, 2024
40bafbe
Revert "delete the removal of geo-overlays-table"
mtiessen1175 Sep 11, 2024
52e7c69
duplicated the create_geo_overlays_table and merged the later changes…
mtiessen1175 Sep 11, 2024
1a7e774
Changed migration file name to fix "name is already in use" error
mtiessen1175 Sep 13, 2024
7481bfc
added annotations.js to public scripts
mtiessen1175 Sep 13, 2024
2fc5850
Revert "added annotations.js to public scripts"
mtiessen1175 Sep 13, 2024
ab7bc5e
Attempt to fix the GeoTIFF overlay display
mzur Sep 19, 2024
2ac3612
Adapted TileSingleOverlay to use the abstract TileSingleObject class.…
mtiessen1175 Sep 20, 2024
8b96214
Change toggle buttons from radio- to power-buttons (UI consistency)
mtiessen1175 Sep 20, 2024
beda6c2
Removed inline styles and pass overlayUrlTemplate variable as static …
mtiessen1175 Sep 23, 2024
98c3780
add production files.
mtiessen1175 Sep 23, 2024
b716637
Apply suggestions from code review
mtiessen1175 Sep 23, 2024
1a96bea
Save geoTIFF coordinates as float. Changed tests to use assertSame in…
mtiessen1175 Sep 23, 2024
47962e6
Merge branch 'master' into geo_upload
mtiessen1175 Sep 23, 2024
8aa75e4
added production files after updating npm packages
mtiessen1175 Sep 23, 2024
9d23357
Simplified tables and changed upload loading state to be handled in p…
mtiessen1175 Sep 23, 2024
0f7d1bb
Added MIME-type to geotiff when original file is saved.
mtiessen1175 Sep 23, 2024
f96aa3e
Rewrite the overlayUrlTemplate data resource.
mtiessen1175 Sep 24, 2024
bd8b47d
Remove API method/route and load overlayUrlTemplate as static data in…
mtiessen1175 Sep 25, 2024
9781856
Change projection of ZoomifySource to EPSG:4326 (shows up on map).
mtiessen1175 Oct 1, 2024
ac181bf
Tried to add custom tileGrid for tile-projection (not solving issue o…
mtiessen1175 Oct 3, 2024
a641fcf
Added working coordin
mtiessen1175 Oct 4, 2024
66f67e6
add vips functions for testing colour-space conversion
mtiessen1175 Oct 7, 2024
644d70d
Added color-band normalization for geoTIFF's
mtiessen1175 Oct 12, 2024
0c4efb7
Fixed image selection description.
mtiessen1175 Oct 15, 2024
952cd78
fix $emit and remove unnecessary mixin.
mtiessen1175 Oct 23, 2024
99181d2
Fix table appearance.
mtiessen1175 Oct 23, 2024
ddf61fe
remove unnecessary success-messages and api route.
mtiessen1175 Oct 23, 2024
b7a13ea
Fix not existing "loading" variable
mtiessen1175 Oct 27, 2024
6bd7301
re-write normalization formula
mtiessen1175 Oct 28, 2024
b1b0de9
Commented color-band-normalization for testing
mtiessen1175 Nov 4, 2024
296f2a9
reapply color-band normalization
mtiessen1175 Nov 4, 2024
bd3ee4e
Exclude NoData values from geoTIFF's for calculating correct min
mtiessen1175 Nov 12, 2024
23c2ae1
Improve color-normalization by using vips_linear() instead of concate…
mtiessen1175 Nov 12, 2024
7a48b90
Fixed "this.map is undefined" error on sidebar-toggle
mtiessen1175 Nov 12, 2024
8693f2d
Remove unnecessary variable
mtiessen1175 Nov 12, 2024
19d2251
Add color-band normalization note to user-manual.
mtiessen1175 Nov 13, 2024
64ec0a0
Fix issue with Vue warning
mzur Dec 3, 2024
56d76f9
add test for tile-directory
mtiessen1175 Dec 3, 2024
c745a5f
fixed new testcase
mtiessen1175 Dec 3, 2024
3b5c206
remove tests (creation of tiles-dir is not covered in tests)
mtiessen1175 Dec 4, 2024
b40a81f
fixed image normalisation.
mtiessen1175 Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Jobs/TileSingleOverlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ public function handle()
public function generateTiles($file, $path)
{
$vipsImage = $this->getVipsImage($path);
$min = $vipsImage->min();
// exclude the NoData values (-99999) of the geoTIFF file when searching the min
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe elaborate here why this step is required (explain the "why" not the "what").

$min = $vipsImage->equal(-99999)->ifthenelse(0, $vipsImage)->min();
$max = $vipsImage->max();

if($min < 0 || $max > 255) {
if($min < 0 || $min > 255 || $max < 0 || $max > 255) {
$this->imageNormalization($vipsImage, $min, $max)->dzsave($this->tempPath, [
'layout' => 'zoomify',
'container' => 'fs',
Expand All @@ -78,7 +79,6 @@ public function generateTiles($file, $path)
} else {
parent::generateTiles($file, $path);
}

}

/**
Expand All @@ -104,7 +104,7 @@ protected function getVipsImage($path)
*/
protected function imageNormalization($vipsImage, $min, $max)
{
// band intensity normalization x' = (x - $min * (255 / ($max - $min))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still get only black&white tiles.

BIIGLE:
image

QGIS:
image

Is this because of the "incorrect" preprocessing of the TIFF we talked about?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the position is also not 100% correct but I guess this is the error we talked about and which can't be fixed.

// band intensity normalization x' = (x - $min) / ($max - $min) * 255
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain why this is needed.

return $vipsImage->subtract($min)->multiply(255 / ($max - $min));
}
}
2 changes: 1 addition & 1 deletion src/public/assets/scripts/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/public/assets/scripts/volumes.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions src/public/assets/scripts/volumes.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/*!
* Vue.js v2.6.14
* (c) 2014-2021 Evan You
* Released under the MIT License.
*/

/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
Expand Down
2 changes: 1 addition & 1 deletion src/public/assets/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/assets/scripts/main.js": "/assets/scripts/main.js?id=96753d36cf46d8eacaa6796d9ee4f4a9",
"/assets/scripts/volumes.js": "/assets/scripts/volumes.js?id=571511be8d04bfaea0258ae4ca1a8555",
"/assets/styles/main.css": "/assets/styles/main.css?id=bf09d95dc04208c3ee738dafbf8e123c"
"/assets/scripts/main.js": "/assets/scripts/main.js?id=5d75e90309015b8aad9b612f52a6979f",
"/assets/scripts/volumes.js": "/assets/scripts/volumes.js?id=e3f2145a883f32b9f12c33a39538a345",
"/assets/styles/main.css": "/assets/styles/main.css?id=b692ef8518741236ded072068dddeb05"
}
4 changes: 3 additions & 1 deletion src/resources/assets/js/geo/components/imageMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ export default {
}

Events.$on('sidebar.toggle', function () {
this.map.updateSize();
if(this.map) {
this.map.updateSize();
}
});

// Update once to get the correct map size in case the map is used in combination
Expand Down
4 changes: 0 additions & 4 deletions src/resources/assets/js/volumes/api/geoOverlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ export default Vue.resource('api/v1/geo-overlays{/id}', {}, {
method: 'POST',
url: 'api/v1/volumes{/id}/geo-overlays/geotiff',
},
getGeoTiffOverlayUrlTemplate: {
method: 'GET',
url: 'api/v1/volumes{/id}/geo-overlays/geotiff/url',
},
// WebMap
saveWebMap: {
method: 'POST',
Expand Down
mzur marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<script>
import Api from '../api/geoOverlays';
import {LoaderMixin} from '../import';


export default {
mixins: [
LoaderMixin,
],
props: {
volumeId: {
type: Number,
Expand All @@ -16,13 +11,11 @@ export default {
data() {
return {
error: false,
success: false,
};
},
methods: {
handleSuccess(response) {
this.error = false;
this.success = true;
this.$emit('success', response.data);
},
handleError(response) {
Expand Down Expand Up @@ -59,7 +52,7 @@ export default {
data.append('volumeId', this.volumeId);
this.upload(data)
.then(this.handleSuccess, this.handleError)
.finally(this.$emit('upload', false));
.finally(() => this.$emit('upload', false));
},
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/resources/assets/js/volumes/components/overlayItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@ td:nth-child(6) {
td:not(.start) {
text-align: center;
}

/* center the delete button */
.close {
float: none;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div class="table-responsive">
<table v-if="overlays.length !== 0" class="table table-sm" v-cloak>
<caption><b><slot name="title"></slot></b></caption>
<thead>
<tr>
<slot name="header">
Expand Down Expand Up @@ -114,6 +113,7 @@ export default {

table {
table-layout: auto;
margin-bottom: 0px;
}

th {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script>
import geoApi from '../api/geoOverlays';
import {LoaderMixin} from '../import';

export default {
data() {
Expand All @@ -9,9 +8,6 @@ export default {
success: false,
};
},
mixins: [
LoaderMixin,
],
props: {
volumeId: {
type: Number,
Expand Down Expand Up @@ -46,7 +42,7 @@ export default {
data.append('volumeId', this.volumeId);
geoApi.saveWebMap({id: this.volumeId}, data)
.then(this.handleSuccess, this.handleError)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I currently get a 500 server error if the WMS URL is invalid.

  1. The 500 error should not occur. instead it should return a 422 validation error.
  2. Even if a 500 occurs, an error message should be shown in the UI.

.finally(this.$emit('upload', false))
.finally(() => this.$emit('upload', false))
},
},
};
Expand Down
4 changes: 1 addition & 3 deletions src/resources/assets/js/volumes/geoOverlayUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import Api from './api/geoOverlays';
import GeotiffOverlayForm from './components/geotiffOverlayForm';
import WebmapOverlayForm from './components/webmapOverlayForm';
import OverlayTable from './components/overlayTable';
import {handleErrorResponse, LoaderMixin, EditorMixin} from './import';
import Tabs from 'uiv/dist/Tabs';
import Tab from 'uiv/dist/Tab';
import {handleErrorResponse, LoaderMixin, EditorMixin, Tab, Tabs} from './import';

export default {
mixins: [
Expand Down
10 changes: 6 additions & 4 deletions src/resources/assets/js/volumes/import.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export let VolumeFilters = biigle.$require('volumes.stores.filters');
export let LoaderMixin = biigle.$require('core.mixins.loader');
export let FilterList = biigle.$require('volumes.components.filterListComponent');
export let EditorMixin = biigle.$require('core.mixins.editor');
export let handleErrorResponse = biigle.$require('messages').handleErrorResponse;
export let FilterList = biigle.$require('volumes.components.filterListComponent');
export let handleErrorResponse = biigle.$require('messages').handleErrorResponse;
export let LoaderMixin = biigle.$require('core.mixins.loader');
export let Tab = biigle.$require('uiv.tab');
export let Tabs = biigle.$require('uiv.tabs');
export let VolumeFilters = biigle.$require('volumes.stores.filters');
5 changes: 0 additions & 5 deletions src/resources/assets/sass/_volumesEditRight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
flex: 0;
}


#volume-geo-overlay-upload.panel {
margin-bottom: 80px;
}

.toggle-btn {
background-color: grey;
text-decoration: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@
</p>
<h3>GeoTIFF</h3>
<p>
The first option to upload an overlay is to provide a geoTIFF-file (in .tif format). The upload allows only GeoTIFF's that have projected coordinate reference systems (CRS) and use the common <a href="https://epsg.org/home.html" target="_blank">EPSG Geodetic Parameter Dataset</a> codes (e.g. EPSG:4326 for WGS84 CRS). It does, however, not support user-defined projected CRS.
The first option to upload an overlay is to provide a geoTIFF-file (in .tif(f) format). The upload allows only GeoTIFF's that have projected coordinate reference systems (CRS) and use the common <a href="https://epsg.org/home.html" target="_blank">EPSG Geodetic Parameter Dataset</a> codes (e.g. EPSG:4326 for WGS84 CRS). It does, however, not support user-defined projected CRS. <br>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The first option to upload an overlay is to provide a geoTIFF-file (in .tif(f) format). The upload allows only GeoTIFF's that have projected coordinate reference systems (CRS) and use the common <a href="https://epsg.org/home.html" target="_blank">EPSG Geodetic Parameter Dataset</a> codes (e.g. EPSG:4326 for WGS84 CRS). It does, however, not support user-defined projected CRS. <br>
The first option to upload an overlay is to provide a geoTIFF-file (in .tif(f) format). The upload allows only GeoTIFF's that have projected coordinate reference systems (CRS) and use the common <a href="https://epsg.org/home.html" target="_blank">EPSG Geodetic Parameter Dataset</a> codes (e.g. EPSG:4326 for WGS84 CRS). It does not support user-defined projected CRS. <br>

Note: When uploaded, the geoTIFF will be tiled into JPGEG files for web-opimization. Therefore, some information that is contained in the original .tiff will be lost. You should take one of the precautionary steps below to ensure the uploaded .tiff is displayed as expected in BIIGLE:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note: When uploaded, the geoTIFF will be tiled into JPGEG files for web-opimization. Therefore, some information that is contained in the original .tiff will be lost. You should take one of the precautionary steps below to ensure the uploaded .tiff is displayed as expected in BIIGLE:
When uploaded, the geoTIFF will be tiled into JPGEG files for web-opimization. Therefore, some information that is contained in the original .tiff will be lost. You should take one of the precautionary steps below to ensure the uploaded .tiff is displayed as expected in BIIGLE:

</p>
<ol>
<li>
Make sure that the color-band of the geoTIFF is normalized to the range of 0 to 255.
</li>
<li>
If the color-band differs (e.g. negative range), the normalization can also be handled by BIIGLE if the NoData values of the geoTIFF are set to -99999.
</li>
</ol>
<h3>Web Map Service (WMS)</h3>
<p>
The second option to embed an overlay is by providing the URL to a WMS source. If only the base URL of the WMS is provided (e.g. <code>https://maps.org/geoserver/namespace/wms</code>), the first layer of the WMS will be chosen as the overlay. By providing a URL with query parameters (e.g. <code>https://maps.org/geoserver/namespace/wms?service=WMS&version=1.1.0&request=GetMap&layers=LAYER1,LAYER5</code>), it is also possible to specify WHICH layer(s) of the WMS shall be used. The uploaded overlay will contain ALL the layers specified in the layers-parameter of the URL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The second option to embed an overlay is by providing the URL to a WMS source. If only the base URL of the WMS is provided (e.g. <code>https://maps.org/geoserver/namespace/wms</code>), the first layer of the WMS will be chosen as the overlay. By providing a URL with query parameters (e.g. <code>https://maps.org/geoserver/namespace/wms?service=WMS&version=1.1.0&request=GetMap&layers=LAYER1,LAYER5</code>), it is also possible to specify WHICH layer(s) of the WMS shall be used. The uploaded overlay will contain ALL the layers specified in the layers-parameter of the URL.
The second option to embed an overlay is by providing the URL to a WMS source. If only the base URL of the WMS is provided (e.g. <code>https://example.com/geoserver/namespace/wms</code>), the first layer of the WMS will be chosen as the overlay. By providing a URL with query parameters (e.g. <code>https://example.com/geoserver/namespace/wms?service=WMS&version=1.1.0&request=GetMap&layers=LAYER1,LAYER5</code>), it is also possible to specify WHICH layer(s) of the WMS shall be used. The uploaded overlay will contain ALL the layers specified in the layers-parameter of the URL.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
<form class="form" v-on:submit.prevent="submitGeoTiff">
<div class="form-group">
<input class="hidden" ref="geoTiffInput" type="file" name="file" v-on:change="uploadGeoTiff" accept=".tif,.tiff">
<button class="btn btn-default" type="submit" :disabled="loading">Upload geoTIFF</button>
<button class="btn btn-default" type="submit">Upload geoTIFF</button>
</div>
</form>
<div class="alert alert-danger" v-if="error" v-text="error" v-cloak></div>
<div class="alert alert-success" v-if="success" v-cloak>
The geoTIFF-file was successfully uploaded.
</div>
</div>
3 changes: 0 additions & 3 deletions src/resources/views/volumes/edit/webmapOverlayForm.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@ class="form-control"
</div>
</form>
<div class="alert alert-danger" v-if="error" v-text="error" v-cloak></div>
<div class="alert alert-success" v-if="success" v-cloak>
The web-map-service was successfully embedded.
</div>
</div>
1 change: 0 additions & 1 deletion src/resources/views/volumesEditRight.blade.php
mzur marked this conversation as resolved.
Show resolved Hide resolved
mzur marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
</div>
<div v-if="hasOverlays('geoOverlays')">
<overlay-table :overlays="geoOverlays" v-on:remove="handleRemove" :volume-id="{{ $volume->id }}" :project-id="{{ $volume->projects->pluck('id')->first() }}" >
<template v-slot:title>Geo Overlays</template>
<template v-slot:header>
<th></th>
<th>#</th>
Expand Down
2 changes: 2 additions & 0 deletions tests/Http/Controllers/Api/GeoTiffOverlayControllerTest.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are quite slow because they process actual files. Maybe this can also be mocked (e.g. implement a method "read exif" that returns static data in the test without opening an actual file)?

Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function testStoreGeotiff()
$response->assertJson($overlay->toArray(), $exact=false);
$this->assertTrue(Storage::disk('geo-overlays')->exists($overlay->path));


// 2. testing upload of geoTIFF using the ModelTransform-Tag
$response = $this->postJson("/api/v1/volumes/{$id}/geo-overlays/geotiff", [
'geotiff' => $model_transform_gtiff,
Expand All @@ -123,6 +124,7 @@ public function testStoreGeotiff()
$response->assertJson($overlay2->toArray(), $exact=false);
$this->assertTrue(Storage::disk('geo-overlays')->exists($overlay2->path));


// 3. testing upload of geoTIFF with missing PixelScale / ModelTiePoint as well as missing ModelTransform-Tags.
// Which means there is no way to transform the geotiff from raster- to model-space
$response = $this->postJson("/api/v1/volumes/{$id}/geo-overlays/geotiff", [
Expand Down
11 changes: 7 additions & 4 deletions tests/Jobs/TileSingleOverlayTest.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This produces undesired console output from processing actual files. Maybe this can be mocked?

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Biigle\Modules\Geo\Jobs\TileSingleOverlay;
use Biigle\Tests\Modules\Geo\GeoOverlayTest;
use Biigle\Modules\Geo\GeoOverlay;
use Biigle\FileCache\GenericFile;
use File;
use FileCache;
Expand All @@ -29,17 +30,19 @@ public function testGenerateOverlayTiles()
null,
true
);

$disk = config('geo.tiles.overlay_storage_disk');
$overlay->storeFile($overlayFile);
$this->assertTrue(Storage::disk('geo-overlays')->exists($overlay->path));
// $testCorrectFile = Storage::disk('geo-overlays')->path($overlay->path);
// dd("{$disk}://{$overlay->path}", $testCorrectFile);

// retreive fake UploadedFile from geo-overlay storage and cast to GenericFile
$disk = config('geo.tiles.overlay_storage_disk');
$file = new GenericFile("{$disk}://{$overlay->path}");

// retreive UploadedFile from geo-overlay storage and cast to GenericFile
$file = new GenericFile("{$disk}://{$overlay->path}");
$targetPath = "{$overlay->id}/{$overlay->id}_tiles";
$job = new TileSingleOverlay($overlay, $disk, $targetPath);

$tempPath = config('geo.tiles.tmp_dir')."/{$overlay->id}";
FileCache::getOnce($file, [$job, 'generateTiles']);
}

Expand Down
Loading