Genesys Backend issueshttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues2022-06-21T11:41:52+02:00https://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/639Subset owner optimistic lock2022-06-21T11:41:52+02:00Matija ObrezaSubset owner optimistic lockThere's an issue with adding a new `Subset` on Sandbox:
> Object of class [org.genesys.catalog.model.Partner] with identifier [45]: optimistic locking failed
This is a brand new Partner registration and the API should reload the `Partn...There's an issue with adding a new `Subset` on Sandbox:
> Object of class [org.genesys.catalog.model.Partner] with identifier [45]: optimistic locking failed
This is a brand new Partner registration and the API should reload the `Partner` by `id` only when adding a Subset **or Dataset**.2022.4Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/638Amphibian update2023-05-26T11:01:48+02:00Matija ObrezaAmphibian updateAmphibian `3.1-SNAPSHOT` has updated APIs for Previews and Trait observations.Amphibian `3.1-SNAPSHOT` has updated APIs for Previews and Trait observations.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/637Update to java.time2022-07-18T22:07:54+02:00Matija ObrezaUpdate to java.timeSwitch to app-blocks and file-repo `4.0-SNAPSHOT`. Dates in Genesys models need switching from `java.util.Date` to `java.time.Instant` or `LocalDate` when only a date is recorded.
This will be followed by a ticked for the UI to update t...Switch to app-blocks and file-repo `4.0-SNAPSHOT`. Dates in Genesys models need switching from `java.util.Date` to `java.time.Instant` or `LocalDate` when only a date is recorded.
This will be followed by a ticked for the UI to update the display and handling of timezones.2022.4Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/636Download MCPD2022-03-31T13:53:03+02:00Matija ObrezaDownload MCPDGenerating MCPD can take quite a while with the current implementation. The main performance bottleneck in generating MCPD Excel rows are the subqueries to fetch properties with `@ElementCollection`.
For each `Accession` this requires a...Generating MCPD can take quite a while with the current implementation. The main performance bottleneck in generating MCPD Excel rows are the subqueries to fetch properties with `@ElementCollection`.
For each `Accession` this requires a separate query to the database and this number of queries is the main bottleneck. You can inspect the number of queries by enabling hibernate SQL logging.
In this ticket we develop and implement a more efficient way of generating Excel rows for MCPD.2022.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/635Networks with accession filter2022-03-24T15:01:22+01:00Matija ObrezaNetworks with accession filterThe MusaNet PGRFA network (https://sandbox.genesys-pgr.org/partners/65a7b4e1-14c4-42a5-99e5-4be6cbe854da) has several members that have accessions that are not `banana` and are not if interest to the MusaNet.
I need to be able to define...The MusaNet PGRFA network (https://sandbox.genesys-pgr.org/partners/65a7b4e1-14c4-42a5-99e5-4be6cbe854da) has several members that have accessions that are not `banana` and are not if interest to the MusaNet.
I need to be able to define an `accessionFilter` on the `Network`, in this case the filter will be `{ "crop": [ "banana" ] }` or `{ "genus": { "eq": [ "Musa" ] } }`.
The Network overviews data must be properly filtered.2022.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/634Drop KPI MVC2022-03-23T14:16:34+01:00Matija ObrezaDrop KPI MVCPlease remove jsps and MVC controllers related to KPI.Please remove jsps and MVC controllers related to KPI.2022.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/633Pageable default page size2022-03-18T16:22:43+01:00Matija ObrezaPageable default page sizeIn 7f3aa83ef I limited the max page size for Subset and Dataset lists, but that was not really my intention: I wanted to set the default page size if `l` parameter is not specified by the user.
This piece of code `Integer.min(l == null ...In 7f3aa83ef I limited the max page size for Subset and Dataset lists, but that was not really my intention: I wanted to set the default page size if `l` parameter is not specified by the user.
This piece of code `Integer.min(l == null ? maxPageSize : l, maxPageSize)` in `Pagination` needs to be updated to support a new `defaultPageSize` parameter:
```java
Integer.min(l == null ? defaultPageSize : l, maxPageSize)
```
In Subset and Dataset API controllers, the `defaultPageSize` should be 20 and `maxPageSize` set at `50`.2022.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/632Filtered Similarity Search2022-03-30T21:08:47+02:00Matija ObrezaFiltered Similarity SearchThe Similarity Search function considers the entire database when searching for potential matches.
Please add support to specify a `filter` that will allow us to say "find similar accessions to this XYZ accession, but search only within...The Similarity Search function considers the entire database when searching for potential matches.
Please add support to specify a `filter` that will allow us to say "find similar accessions to this XYZ accession, but search only within `{ institute: { code: [ "NGA039" ] }, crop: [ "cassava" ] }`"
This feature will be useful for **Embedded Genesys** where we need to limit this search to only the records of one institute.
The implementation needs to be generic.2022.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/631Images and Thumbnails2022-03-18T19:24:01+01:00Matija ObrezaImages and ThumbnailsThe browser sends `Accept: image/avif,image/webp,*/*` HTTP header when requesting for images.
The Server handles thumbnail paths in `RepositoryDownloadController`. It currently tests if the path starts with `THUMB_PATH = "/_thumbs"` and...The browser sends `Accept: image/avif,image/webp,*/*` HTTP header when requesting for images.
The Server handles thumbnail paths in `RepositoryDownloadController`. It currently tests if the path starts with `THUMB_PATH = "/_thumbs"` and ends with `THUMB_EXT = ".jpg"` and then tries to fetch the pre-generated thumbnail directly from storage. It does not try to generate a thumbnail.
# Updated for `webp` support
In this ticket we extend our `RepositoryDownloadController` to check if requested extension is `.webp` **or** `.jpg`.
We also need to check if the requested `width` and `height` are on the list of supported thumb sizes.
If bytes do not exist in storage we trigger the generation of the requested thumbnail (in requested format (`webp|jpg` and size), put the bytes in storage (async?) for future use and return the bytes in the HTTP response.
# Thumbnail generation aspect
We have an aspect that generates the thumbnails when `RepositoryImage` is uploaded. We need an updated `ThumbsGenerator` that will generate both `webp` and `jpg` versions -- and store both copies in bytes storage.2022.3Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/629Bug: Saving institute settings2022-03-02T16:26:14+01:00Matija ObrezaBug: Saving institute settingsWhile working on genesys-pgr/genesys-ui#887 I realized that a POST to http://localhost:8080/api/v2/wiews does not update institute settings. ~~They get cleared~~ The UI needs a refresh to show the same old settings.While working on genesys-pgr/genesys-ui#887 I realized that a POST to http://localhost:8080/api/v2/wiews does not update institute settings. ~~They get cleared~~ The UI needs a refresh to show the same old settings.2022.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/628Geo bounds with ES2022-03-01T18:03:07+01:00Matija ObrezaGeo bounds with ESWe need server updates for genesys-pgr/genesys-ui!866. `AccessionService.getGeoBounds` returns default bounds for this case:
```
if (filter.isFulltextQuery()) {
return AccessionService.DEFAULT_GEOBOUNDS;
}
```
It should be possible to...We need server updates for genesys-pgr/genesys-ui!866. `AccessionService.getGeoBounds` returns default bounds for this case:
```
if (filter.isFulltextQuery()) {
return AccessionService.DEFAULT_GEOBOUNDS;
}
```
It should be possible to get the bounds with "ElasticSearch".2022.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/627firstPublishedDate2022-03-01T13:42:45+01:00Matija ObrezafirstPublishedDatePlease add `Date firstPublishedDate` to `Datasets`, `Subsets`, `DescriptorLists` and `Descriptors`.
liquibase should use `lastModifiedDate` to populate the value.
`firstPublishedDate` should be set in `publish()` method and only change...Please add `Date firstPublishedDate` to `Datasets`, `Subsets`, `DescriptorLists` and `Descriptors`.
liquibase should use `lastModifiedDate` to populate the value.
`firstPublishedDate` should be set in `publish()` method and only changed if `== null`. Existing value should not be changed.
When creating a new version of a dataset/subset, `firstPublishedDate = null`.2022.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/626Sitemaps2022-02-14T10:53:15+01:00Matija ObrezaSitemapsUpdate `sitemap-partners.xml` that includes links to:
- Partner list */partners*
- Individual partner page */partners/uuid*
- Genebank page */wiews/NGA039*
Adjust priorities.
```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmln...Update `sitemap-partners.xml` that includes links to:
- Partner list */partners*
- Individual partner page */partners/uuid*
- Genebank page */wiews/NGA039*
Adjust priorities.
```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.genesys-pgr.org/partners</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.genesys-pgr.org/partners/....</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.genesys-pgr.org/wiews/....</loc>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
```2022.2Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/625Sandbox cluster2023-05-26T11:01:58+02:00Matija ObrezaSandbox clusterWe need to run Sandbox in a cluster to test HZ functionality and Firehose.We need to run Sandbox in a cluster to test HZ functionality and Firehose.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/624Subsetting: Provide tileIds by cropName2022-01-28T19:09:00+01:00Matija ObrezaSubsetting: Provide tileIds by cropNameJuan Camilo requires `tileIds` grouped by `cropName`.Juan Camilo requires `tileIds` grouped by `cropName`.2022.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/623AccessionUploader: crop2021-12-11T20:20:44+01:00Matija ObrezaAccessionUploader: cropGenesys currently uses `accession.cropName` to determine and set `accession.crop`. During uploading there is now no possibility to provide the `crop` and prevent automatic assignment.
This issue is to add support for `crop` string to `A...Genesys currently uses `accession.cropName` to determine and set `accession.crop`. During uploading there is now no possibility to provide the `crop` and prevent automatic assignment.
This issue is to add support for `crop` string to `AccessionUploader`. Acceptable values is any of the `Crop#shortName`s.
If `"crop"` exists in incoming JSON then `accession.crop` should be set to the `Crop` by `shortName` (if exact match is found). If match is not found or `"crop"` is not provided in JSON then the current logic is used.2022.1Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/622AccessionList2022-03-14T10:30:28+01:00Matija ObrezaAccessionListThe `AccessionList` is a very old implementation that allowed Genesys users to store their lists of accessions in the database. There are still some records in `accession_list` and `accession_listitem` tables :smile: With the new UI we s...The `AccessionList` is a very old implementation that allowed Genesys users to store their lists of accessions in the database. There are still some records in `accession_list` and `accession_listitem` tables :smile: With the new UI we started saving selected accession on the client (`localStorage`) and with that the API support for `AccessionList` was no longer required.
This ticket is to create new APIs to support `AccessionList`.
## Changes to data model
- Drop `AccessionList#shared` column: this must be handled by ACL. If the list is readable by `ROLE_EVERYONE`, then it is `public`. We can add an `isPublic()` getter.
- We need to be able to "tag" entries in the list, the `accession_listitem` needs a new column `grp VARCHAR(10) NULL` that allows the user to "classify" each entry in the list of accessions.
## API
We need the usual CRUD methods, but their implementation must only work on lists that I have created.
The `get/load` method needs to check for `READ` permission on the list: not by ownership!
# UI
The first change to the UI will be the ability to save/browse/load any of the lists the user created.
We now have "My List (X)" menu item, but we probably need to change that to "Selection (X)" and add a menu item (for logged in users) to the logged-in user menu that says "My lists". This loads and displays all lists the user has saved in Genesys.
When a user loads a saved list, the "Selection" list items (title and description) are replaced.
Basically: there is a *currently selected `AccessionList`* with: `title`, `description` and `uuid[]` that can be "Save as...", "Save"-d, "Reload"-ed and "Delete"-d. If I load a list, then "Selection" page should indicate if the list is different from what I have saved on the server.
![image](/uploads/b631899f01676f301c49d1de4b665ac8/image.png)
I think the best thing to do is to change the "Clear list" into a dropdown called "List" that has "Save", "Delete, "Clear", "Save as.."... options.Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/621Concurrent generation of shortFilter code2021-11-29T10:59:46+01:00Matija ObrezaConcurrent generation of shortFilter codeWe have an issue with concurrent generation of new `filterCode`s. The issue was spotted during development of genesys-pgr/genesys-ui!834 where multiple calls to `/mapInfo` are made at the same time.We have an issue with concurrent generation of new `filterCode`s. The issue was spotted during development of genesys-pgr/genesys-ui!834 where multiple calls to `/mapInfo` are made at the same time.2022.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/620Endless downloads download-selected2022-05-16T16:44:25+02:00Matija ObrezaEndless downloads download-selectedA user reported that the download from *www.genesys-pgr.org/sel* for some 400 accessions never completes.
Update your `localStorage` for `myList` with:
```json
{"count":384,"accessions":["1096fd06-4c01-4e20-a789-9b04d83d1743","2837e98f...A user reported that the download from *www.genesys-pgr.org/sel* for some 400 accessions never completes.
Update your `localStorage` for `myList` with:
```json
{"count":384,"accessions":["1096fd06-4c01-4e20-a789-9b04d83d1743","2837e98f-821b-4570-9325-b9707afcf356","0de18b0b-5498-4d47-a6b1-2b7383db6170","e1345e80-3552-4d84-98a2-db98519248d0","d0b96dee-433e-4859-ba31-012c95aa595b","d22c41f8-ce27-4452-9118-6a50a435ec04","feebf07d-07cb-40b4-b815-bb3353e47cd9","156a281d-9104-4903-8f85-201ee1ae7047","6ff73337-7084-4c93-8d55-1bcc60897873","5bbbb2a9-cbb5-4206-bb1d-d7c5c6eea5a1","252cd768-8f93-4b6a-afbe-8d89fb99c248","1d695b15-8e04-4945-bb04-be8b330fffc1","a056c31b-9abf-4fff-982e-a8c42d1d88a9","1d56931f-39f8-4238-a2e2-2a9bb16d3517","af3d8654-6d96-4254-8eb0-6e2576c1e753","7e7b44a8-a540-4cfb-815f-e86036a04f4c","b882fecc-5095-42b0-8360-51f4348755dc","daf50ca0-2c03-4059-b604-6172acd642d3","2133fd47-460d-4bea-be49-78d2e34f5a6b","d43fd6d0-c4b1-4dfa-a93e-74733e9003b3","f288d3a3-139c-4123-b7c9-e70f8979b670","fe0eb307-8c7d-40a7-ba2f-34935649bf63","814040ed-4056-4c1d-9cc4-642cfdf4701c","b001414f-37c5-4a55-959c-1ca16449a5f3","3f54aff7-0db6-4d88-a9a6-f9effa0506bd","59d43125-849b-472c-888c-427358e561eb","339b212e-99b8-4908-8a07-41f2b3ce033a","6b297b92-7bee-4aa2-b995-b8315af75db5","a3e99a92-fd29-4446-a72f-f9cd2d3fe5c5","4e74c295-181e-4190-8109-755c454a7ef0","e9055ed2-e530-4a18-92ad-27e5c3ed540f","075877f3-19d5-4814-a33e-64dbf5ae72f4","9ba80ce9-296b-4151-9453-d201c8b0031e","043c7326-29a2-46c1-8a9d-29d9e48e7e40","8e5b4f19-1856-4b8b-b159-8452199cf79a","52c7ab0e-02cf-461e-9b13-5ee8d7eedd45","6a243160-949a-415d-87d6-6ad5badf3426","9364bb94-460a-4674-bcb9-83b3e6fb198d","bca65ebf-b397-4ca8-80d0-73f1fa1956fb","88a93227-7256-4480-a474-85da1744cc91","7226055b-957f-458b-b6a7-f43ffd876478","1f96eab5-6319-48e2-b2f5-906fc1b30893","c578e02c-1c1d-42ad-b724-134c3708f0d7","a8e7bc57-ddb5-4524-9d72-c194292f8b5f","15d7024d-9bab-4413-865d-964765f25eb4","944013ca-2241-43bb-adbe-5cc3ec675451","27a00912-8812-4987-adf0-1e9b00788051","56745ca1-1b42-4811-9347-abd78764629f","1d4e857a-38f7-4eba-ab62-d39b58a85614","4f41be84-38df-46c3-915b-bd95bbadc75a","69307f3b-91a1-459a-af23-33ba698345cd","f2ef1280-8e77-41a4-8497-741dd724cbbb","94d1bc85-0cbf-44e1-b8f5-a045e07e23c0","88a28706-97b9-4c86-b12d-61c8bf504042","4d4af7ef-5ff4-4751-a55c-070ef4d2b1a3","53f224e7-f354-4664-be3a-f1a8d80c66c1","6d6fec8d-b6d0-484c-81ce-b03f2862fe3e","d05817fc-f86e-4c06-88e0-94fa9241a372","fbd95ac7-e115-49aa-ae9d-27bec263cd25","1260e187-c47c-4864-a300-0d09b02022b2","f52bce22-b1a3-4241-b779-1d8e634b5cb7","2db1769a-b677-475f-b35b-b4df7426f71f","ef350680-5fed-4a30-940c-b9024c3ed986","c6d850d4-c3ea-4fd0-9049-17f58e0e6eeb","682a2df8-7e56-4f11-a25f-a475f32c567f","56129672-df74-4b77-9571-133b9d610115","df817e4c-0d38-4a67-92f0-8d794d63edf1","bd3a0588-52e3-43ea-8661-753ec57cc9fa","d34c25d4-c8b8-4d66-bb25-bb6af2667a87","fecf8bde-3720-4baf-a60e-61905e3f5c34","fd1ed965-3dde-4be5-bb10-b559f5b4a460","a0b4400e-6d9e-4602-9306-815b99f7f519","66d9c1f1-44d9-4074-9a55-3cb0a8a4a5a7","5fcb8e7b-333d-4b0e-8a11-0bde4726763f","82f13da4-e960-406a-8fc9-3c2e41620998","1e78e5c6-57b6-4395-9ed4-7d95abbadb50","a47b5fea-b8ab-464e-a007-03e0c19d3c7a","e97f9b17-a634-43de-aeb9-317c959e4252","2f55c43c-d393-4c6c-a361-b3d240481e02","6d7d4d71-c952-47be-89ff-2250227bd6b9","e98542fa-67af-496c-b761-c86fd4a08098","8c6c87ee-6786-4851-9765-978356b801ad","688b85cd-a268-47e8-a6f4-87320fcc0335","17e95746-217e-49d1-a73d-71fe15db0a7a","89107fc3-47dd-4c2b-831e-0342ad8d08f5","53ae5ea8-467f-4845-a075-4efce0ef2cea","ef0f6cce-d1fb-43a7-ac10-f22672e17853","bd599024-01a6-4cd9-9f37-fc7846b45697","f2237b42-5fef-4439-b60b-8313e96e34a2","c62d19a0-e120-4f32-8bdf-44b3c53fdcb5","81260ab9-82b3-4f62-b7fd-9443e224c653","259ae8a2-c46b-4455-885f-1cfe8ee94492","9fdcaae6-db01-4a8b-95e8-a16bd48fa089","73abd4f9-c239-4f0e-a762-7be04ea166b2","3c9315c7-a5d1-4243-aa8a-d4675992512b","ab410ada-1a58-4c22-9d87-fc607682ad1d","0101d2d0-a027-423a-b082-e5507ebbb7fb","5419e1cd-5af1-4be1-ab8c-7be3f76e05a6","a4e7753d-3fde-4d0f-be85-10f7dbe3c2ff","26491e1b-3260-413a-ae1a-5852dc8b4bea","c3719757-aa50-43fd-a2e0-9890fb8bf86f","c0e34935-b048-43a2-a8a4-e63ab77f243c","7b040b1f-f66f-48e7-92b9-e974bafc4179","507e3d97-5105-4cb7-8281-d28c1efc37fc","ef6b79f7-4823-438a-a6e1-4ff70dd842e1","7842b0f4-695f-4cd0-8be1-97bc180cc8c9","7745b08b-40f7-4675-81e4-48d63b7b95d5","82044bbc-ec0c-415f-a6c5-d5407feae47a","891f9e7a-410b-4b95-a7ad-c2eebb1d593d","0ec91897-093c-4aff-978a-37bb680e2a1c","916afeb1-5bdf-4923-b876-b31da7e09e76","42a462b9-0341-4aca-87bc-0b26372ec33e","56541a26-f6a6-4799-8a84-6115113b710f","c8f80cc3-32b7-4aa6-b4c8-d9b10596a740","5abc08af-60b2-4fa8-83e1-d83b276d6275","44598a8f-3c31-4699-b1c0-fd57198773af","4583d0fa-4df7-4195-97b9-ab3b37f29f59","1730f748-17ff-48ed-90a7-446ce668e28a","509957e8-2e05-4606-b34a-2f7c5434858f","51a9c1a7-10ad-49ed-9e59-2973f3afb35e","3ec8e318-c19f-4f21-b74a-3f6637f9cb33","62fc2434-3dfe-41db-9c5d-03d29d42d794","d5f9cbd8-2e11-4a55-b865-54ee15207193","68013462-7521-49b4-96d9-76c597d23311","f96e68dc-6a39-469e-9761-ca3cf1e26da0","881c36fa-67c6-42ff-b81f-5626cb854411","eb186358-0353-4e3b-bdbc-dd8b846cdee6","059c9196-e9b2-4c96-9b11-1f30a1d68906","1f9cdeb2-faa9-4c30-a92a-5dbe21521514","f8292692-71a0-4423-89c9-c57c93d9ad5a","dc0ec40a-e3e2-448a-9707-af9d8987443e","64f3a016-7346-433e-a386-d0523cdb89e4","7a93df55-5245-4285-84ae-0959218c734c","8b8d2d7a-859e-4247-9d0d-3627d44ec438","244c969e-008a-42de-a7eb-b6aae672ba8e","54268b0e-cc73-4593-a111-fe51e81f5198","f1201be0-3819-482e-9d0d-ac883d0e762b","3a7b823b-f02f-45e8-833d-b68ac70fca93","74b7bbbf-4485-4f9a-827c-e73900e1e173","4b6ce51a-921c-46ec-bb08-41ff5ae1e899","63b05bb7-3241-469e-b09a-622482d4a684","a590b5bd-190c-4bb1-b432-939d64ccf7e8","4316748e-5ebe-493b-8409-ab56af6eac9d","5cef9836-5b2d-40ca-b0d2-760e0f99f1ae","d02c7eb4-6148-49c3-a619-eb573b65a177","7ea0d6db-77ca-4135-b7fc-5991d3efb116","6bcaf842-1dd2-43bb-9ce9-c523bfa2eab5","d9078876-57b0-477f-a0e8-9cfb61a94a75","8110ef49-7255-421b-897f-f57ffe8c151e","c7f8b373-3950-418f-acfe-1f2842a81049","eb934a58-7aa8-4e11-bfb3-20c713b12c48","7c965c34-d2ad-47cc-9708-11afb84763d3","aa22402a-9196-487c-9e57-c145ab3e6c48","e2286056-1f2f-457b-a37e-bdf018007cf5","57fac14b-1d09-4e23-bf24-ded563e0f800","900ec747-18d0-4443-b45c-4e49e3d1068f","ace84a92-90a9-40f6-a854-ebac483eb249","536dc40f-1bea-476d-bc89-3cc7087e345c","b6822048-3c02-4ca5-8d61-c4b7f219e3e4","20e6247e-aa2b-4101-8569-b6b9b2822cef","dc8425fe-0ee2-4c78-a0f8-c564ecf34075","cb973495-697a-4fea-bd9d-245a90d0e546","afcf801b-403e-40b9-a71a-351e9e12ff7a","b640143a-cbdf-4674-b05b-fdb907c2a880","7b282c0f-b9a7-44b8-a666-3c83c8575921","8898e42c-974f-49d4-abfa-9b05c5255bcd","04c4fe05-2b61-42d6-9382-c389f759589d","8ea6bc31-dd74-4938-b964-0d649e0b28a8","bd707143-eacb-47d4-9fe1-f8be85885425","0ac3795f-d421-4a8d-8a6a-bfefffd06c63","7c0e41b8-6182-4203-9eb3-b0a94f5256ef","57bd6c76-83f2-4cea-9a08-a8ece62a7e86","271c926d-95eb-4a6a-9df9-44b61e7513c3","2ecb89a4-fa28-41ab-9da7-c0b8d0a510cf","71bf4a69-5316-492b-ae99-442304b3b7d3","40cf1abb-329f-4bf5-9772-67a0bde4b14a","70a6b330-1a41-4347-b1c5-cc0eb2a1b2b8","65602f68-91b6-4f42-8204-8b6bfa251f4c","f4d13d7d-f05d-44eb-912e-7f6fb37c3a91","34f5747b-0399-4dc5-95d8-9a45951d6f88","af0628ec-f02e-4dda-86ce-b613d5f46902","60d157a0-03c2-4c68-b844-55b0545a538b","4a7d00d3-cd49-4cff-8a29-105cd850a72f","9fbbe9cb-4851-4fbc-b843-dfcda90e15c7","13c4d0ed-2a58-4307-aca2-aa041e8c7c89","69e8b783-5f74-4cba-b544-d37c5b105c6b","b82d92dc-c03d-42b0-bc32-5871612dae0c","ef96fdfc-571e-42d1-8f1f-1b7275d455a5","a9a79bab-9483-4473-b730-9e021221df00","c4277a5d-8979-4e4b-87b2-35a8f83390df","64c8d1c9-34bf-475a-aa11-dbdf55459f3c","e1e3dd9c-d086-4e87-a443-375cd9da32e5","e7626530-c311-4daf-823f-b8d0cfc280e7","79379b0c-857f-4b9a-8011-23c3530714e2","4d2a6804-aab7-4925-8ce1-8932c2a1eed1","04401b9e-fe53-497b-9385-3239e42f178e","aa083675-f48a-4782-9bd5-3fd1e39a422b","ad66ab08-861f-4f68-b824-d65a22203267","e7771bf9-a491-43f5-8e70-9f738892e0ca","297c044e-c63d-46de-bfba-3e926346a48d","b634a4a7-fa49-4c8c-82f7-d8a2b5178820","0dece2a4-b620-4dc1-a4e3-4702e24b3581","1662820b-961f-4128-a77f-10f037b71d88","4c89fc5f-caca-497a-a935-c34c6ed3fb35","bbe65778-2dc0-4ebd-9ebe-385ea98561d6","4fad2435-cbd6-4732-91b5-7dfad2e17066","17a06bf7-9e4c-4d6e-a957-4dd98a864c32","893dfd31-daa8-4036-9292-7e584c4e67df","3f0af02f-fa38-4df1-b767-3c0f1911223c","c6afe881-fbca-4aba-abb0-ca29df0c1278","1b019254-3668-486a-a15f-fee84ec8b352","b2a71f06-672d-4f8b-bd35-7878466d00bf","7bbd9ad7-3a83-4573-9500-9dc3e421c471","7b323071-3188-42a3-a032-ea9565b1aa45","66b04f42-4bc4-4bcc-9ee9-c788a116ab88","5dd90726-7788-4b01-8d50-0fe129b53aab","89fa17bc-51b7-4900-8985-30d185caf8e5","ca5e6bf4-3086-4ef0-9ed2-789ce0890088","ca90bd71-3b6e-451e-acd2-8349405344a0","b034053c-7c81-44a2-b776-9f0d3759177c","9addc058-2c7b-42c9-8233-8a2e9bffc338","7f92f4fd-a3fc-4bd3-b1fc-605aee89303a","c6e8e192-88a2-48a3-93b9-6dece646ecae","0793f327-30a0-429b-85fc-693c5fe22db3","32f472c3-da43-41d7-8813-428b9dd8be28","70ed8fd8-6271-46d7-aed3-d6abdf29860c","8ce89812-e24a-4b9b-b62f-6b3abc9c5912","f0fc0577-661b-49ed-a784-2046136294a6","dbec24ed-1e1e-4219-b553-9dad6aa3b78b","873e3c0d-a280-4bfe-b3c1-33f5af6e7540","7aca2391-fc80-4072-9092-862f949ec14f","5d8f4930-dcaa-4446-987b-ccd36c85f7f2","9fb585c8-2156-4524-b07f-01a80348bda1","dadc7c68-4e66-4813-a746-37e18bc7808a","8a66bdf5-87b5-44d1-834b-f19780b47c90","e9312763-5a29-4c06-bbdb-c7768572680a","2f367e5a-1a94-4aea-978e-c961d007a8ef","2ded0c9f-5754-470f-9daa-f7d1f00731d6","6b5f2f8c-f873-4640-b58f-1655bb71a974","e4d1594a-e967-4dce-8b0f-772f7f6a76f9","9fd8ec23-0236-43be-9622-19ce63c617b8","31f71d28-4a5e-4ee3-bed9-fe6f8e1cf99e","fbabc74e-bce0-4a7b-afd7-2edf856dd76e","e84b6e80-78fc-41b8-98fb-357eefceb5f7","e7d11cc6-eb27-407e-8b2a-2d0c10affe8a","e33cb553-9116-49f7-a9ab-a92a2272e8f7","3550968f-1ab3-4834-8b71-fdcaa89f08f6","49bd27f0-1065-4499-8294-83f4a782987a","7c235582-4e00-4679-8056-4438d360bac3","6a4f98d5-b34d-4207-a44f-d928946868c6","713302b9-f12a-4d12-9405-b5c5c0c71ce5","39ae74d4-cb6c-410a-8bc6-f212145907ff","e98d4f2c-e3a8-49e4-a68d-616bd7a90ccc","a60b387b-1803-4369-a4b1-e7c9bd57e1c2","84624561-f0d0-40de-a93e-07b52e080607","ab090801-d7a4-4e5c-9027-7206157bcf34","d0538d75-d4e4-46cb-90ae-1d10f8c6ff3f","fa056112-d6cf-4d5a-a6a2-c4fea3388013","c6495a60-5a85-4c67-96b2-808ad9c46532","96b05801-1331-4034-94aa-056aee4a4d59","c6794226-9145-4105-ad03-5b8832d0076b","e960cbe9-2353-4ff6-b96c-04e92083642a","f5c2b212-0689-4c38-9f9c-590d7508a946","d8021959-705b-4a54-b1b4-b2368c01d11e","65265573-129e-4865-8ec4-a728be72400c","099e185d-f875-4d6b-ba18-34f9471849c8","45a904cc-4443-474f-bb57-f3fd8cf5fc66","5f912c51-251c-49c2-a084-0aa9835d1906","20dc2dec-ed8a-4949-afa7-dfa87ce8b89e","dd3d174a-6b78-46dc-b7fe-51fbfc47ce26","bd35b43e-4bf8-4c53-b0ec-621056d07c7c","b09fb7e2-dbc4-48f1-8e33-ef1ec1b6beac","bd5822c6-3172-4459-84ec-e41fe21626ac","f9303e6c-0920-49be-b302-b3aa4f9d7c0a","fa51ff07-e660-4626-84c7-9c360f05630e","817c1a01-e406-4482-92d8-697e5661ce19","6d1ac566-8bce-48c9-b304-00addc4590f5","f1f4e3a7-36f4-49c6-8169-751d90df2366","bc55c8da-05e1-4bc1-971f-5a9c87a81208","31b1ae92-dee9-4c56-9aa3-a2c3165a3bf7","caa97d9a-7e18-4587-b510-04bbd4070dd1","8e0f3a06-ce4d-4c59-b1b7-8a13d01c2802","8d58abb5-14f6-4444-97c0-333e1bfae122","083898fc-dcd4-466e-b55e-19e3208881e9","53bcb4b6-beb9-4063-8833-9e82e4d9bac4","4740f1d0-3c2b-4e36-a5bf-a2e073ac110d","18f2f790-1c4a-4105-9f07-42a7cef2195f","af23544a-5218-47a9-8ed8-8cfe59536692","6307099e-6ae2-4d08-9c90-e8e1334935f3","2376dd34-a6d2-4195-986f-faedbd748daa","3fdd494c-278a-427c-a9d8-fd19e305cdb3","1115c3af-bd53-4dcf-ab87-72dcdd78fa59","6e6006c5-b2f3-4ddd-96dd-de76f715caec","17d7e26f-2055-48ec-8790-cefba7ff37d0","f2e9af9f-43f3-43d9-955c-57f1d11c4bef","0100a70e-8aa8-4836-8483-edfe0f6e1c59","c8d643ac-1c8e-43b1-ae52-bcb2b0fc3a44","50077ff7-54e8-47ec-b594-b5ebfcd28638","0caeab8a-bc4c-478e-acdf-17e16a514198","43073c85-de95-407f-9042-76f3f3354f19","6ba48848-f505-47ff-84b7-b4eccd38fa54","d5269a62-23a7-4dbf-bea0-976f878d8a4f","9987a9b8-3d61-4c22-87a1-54e8a588d9a5","8068ba2a-9e28-4e89-be22-58be6699543c","6dac0c36-740f-45c4-b2d8-c3d8c28694a9","c1594965-7291-48da-be09-f80c161af6c7","4f9abc5c-5136-43a1-83e0-8af41421ad84","ca933b67-6a11-4411-8690-35409df050c8","1a5a4f7b-f529-41fe-a879-4efa042eec24","7c96237e-9be5-4c05-bd06-8b84b6a6d2bc","cad06063-42e9-47b3-93fa-a9ed11427767","7e1a5add-1398-4baf-bcd0-94b7281758dc","02be7225-1e0c-4a2f-afeb-618a2829d272","b0afc418-7dc9-464e-a1e1-26126df080ee","b72c8331-3506-409d-8982-b949cf4fd490","d6f45d75-ce77-4208-b581-62e9512b356a","894a6ef5-7bc3-48d8-b417-1f50c368fde2","466f1f7c-5129-4c49-9f63-11cfb02ce4d1","d10036ea-91ae-489b-aea3-6227c0b4ab1f","ce3e6131-b4ab-438c-9261-9c0af2696d2e","4c933363-ea33-4fbf-9044-a6ffcd9db348","ad6dcfbd-9c09-443a-94b1-05519e10472c","4ff77a77-9938-44f1-82ec-1e6b0fcbd9db","b6463803-c7cd-4cc3-8b34-e19ab9072858","fdea7528-40b1-4c41-a1b2-d84fa39c8ea2","8124a28a-535c-4cb7-aa07-4630035e03e3","9d35337e-9b69-4ab4-ac74-1ab4e311d622","e0ab70f8-22a5-438a-b0c4-0a59f437eb4e","e4012515-03fe-4aca-8868-3c8dd5965011","f756a3a2-029d-49fa-b126-2be1a318f99c","f9546ff6-1714-444d-a302-8fa0bbaae04e","c3bf2dd9-a295-4f5c-beb5-a0b619f9c613","dcbf7065-9fdd-42dd-a0c6-6590d58b2188","1091c1df-3bb5-417f-81e3-3841448d2b58","659639ae-9a17-4b49-bfdd-a8c2d865a72f","e710d842-e1b5-4857-9da0-0f36da0aff6d","4c3375af-1121-4752-91dd-55404bcc5f06","48d0f927-8721-4225-b54c-5826eeea9460","fe05297e-aae5-4649-9e79-1567fb07641c","f3d41446-3508-447f-bdd8-ed38c0a999e8","ceecc8af-63ff-41de-b89f-dc58b35686be","81f13f26-3755-4209-9144-75390ba31bc1","2ee9643d-b8b8-4ced-8072-eb3ec5bd0bd5","d081935b-beaf-4d00-98f8-59d203ef7127","7f032fa9-150e-4b8f-9159-16ff2beaf069","bf307e43-775a-4332-8d62-cf57707f1f50","e6ce20f1-202c-4ade-bc40-33e448870040","67bfea14-4ea5-48ef-9d9d-f204e453fb48","f109ae7a-85c1-464f-a9b2-f49d35dda8b7","c92c27c7-8818-407e-95c4-2453cdfbbb13","ef8863cb-f6f9-4986-ad13-78b89188e1f5","2fdc0f88-bff8-45ee-8b43-6f9e572d31b0","4c62626e-b56f-43bd-9b66-f54a4582b308","b12fd6d7-e372-48f2-8021-2f1e7834670d","e88d754b-d774-4aee-99ab-8e3fab79c394","68a99c70-89b8-4481-8bab-71c2468917d8","15484b20-5dc8-40e6-9b9b-faadbfc92b7c","43c44b55-cff8-48b1-854e-bd00677b1081","e070f2a9-94db-4d31-9144-32e6aa654950","45b5e973-2ae3-472b-b304-32257b785295","a40d8fea-18d4-4fff-aac1-b4ca50b6973d","17dca846-7319-43cc-a7ad-0241080ea276","a35444a1-1391-4607-b3d8-27e100448e3c","16e56bb4-5a8b-4671-a10a-beee99b350e7","581f6f25-6f36-4812-915f-b36594afb705","4611d045-d39d-4d1c-b2d9-a1730e2777ed","1cdfab66-f963-4bd0-88a9-867a10ba384d","ac4872da-5a43-44eb-99a9-e8d5d2044b63","4c6ed8f1-3d0b-48a6-a01c-c20e62984929","a175fc78-d911-499e-b95e-403cdd8f54ab","7480fda4-65b5-4e40-90e7-d9862ded5a38","cd908040-92f6-41c2-a870-6bdd326815ca","0a1f5538-f4f4-447a-bc94-c0c8afa7926d","29a1d9cb-5edb-41cf-b6d8-cb4f1ff9a349","a63792a6-839a-41d2-be3b-b54444376c4e","0179c245-218f-47af-bacc-663b7e74dd77","ee0b4328-712c-43c8-9786-070b623bef0a","2c4c0378-92ce-4944-8959-8d1c82a4f4df","ba8f3835-73af-4a84-8291-75cc96719904","3b2b48e5-eae2-4db7-be70-77d288fd125e","96400f5f-a815-4991-be11-bafdb352df89","ac6a6198-5d9d-48e7-8a4e-71c89505f526","bee3e4f4-71f1-414e-bec2-cad8224fd5ab","8cb14a90-6a82-4755-bca4-b82ea2c72d80"]}
```
Then refresh the page and try to download ZIP or MCPD for selected accessions.
I cannot reproduce this on localhost (with MySQL), but sandbox and production run `MariaDB` and both downloads never finish.Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/genesys-server/-/issues/619Add tileIndex3Deg to accession2021-11-26T08:23:18+01:00Matija ObrezaAdd tileIndex3Deg to accessionGenesys assigns a `tileIndex` to accessions with latitude and longitude. The `tileIndex` currently in use is based on a 5min grid.
Add new `@Column("tileIndex3deg") int tileIndex3deg` to `AccessionId`. This new index is based on a **3mi...Genesys assigns a `tileIndex` to accessions with latitude and longitude. The `tileIndex` currently in use is based on a 5min grid.
Add new `@Column("tileIndex3deg") int tileIndex3deg` to `AccessionId`. This new index is based on a **3min grid** (0.05 degrees * 60 = 3min) and is incompatible with the 5min grid.
The new index `tileIndex3deg` must be updated in `@PrePersist/@PreUpdate` method, the same as `tileIndex`.
Grid details used by Subsetting rasters:
```
dimensions : 2600, 7200, 18720000 (nrow, ncol, ncell)
extent : -180, 180, -60, 70 (xmin, xmax, ymin, ymax)
resolution : 0.05, 0.05 (x, y)
```
The function to calculate this index should be somewhere in utils:
```java
/**
* Gets the 3x3 degree grid cell zero-based index starting in the NW corner (-180,90) with `tile=0` and ending in
* the SW corner (180,-60). A 3 degree grid has `ncol=7200` "columns" and `nrow=3600` "rows".
*
* @param latitude the latitude
* @param longitude the longitude
* @return the cell index for a 3 degree grid
*/
public static final Long get3DegreeCellId(Number longitude, Number latitude) {
if (longitude == null || latitude == null)
return null;
final int columns = 7200;
final int rows = 3600;
if (longitude.doubleValue() < -180 || longitude.doubleValue() > 180)
return null;
if (latitude.doubleValue() < -90 || latitude.doubleValue() > 90)
return null;
// longitude (-180:180) -> (0:columns-1)
long ncol = Math.round((columns - 1) * (longitude.doubleValue() + 180d) / 360d) % columns;
// latitude (-90:90) -> (0:rows-1)
long nrow = Math.round((rows - 1) * (latitude.doubleValue() + 90) / 180d) % rows;
// System.err.println(longitude + "," + latitude + ": ncol=" + ncol + ",nrow=" +
// nrow + " tile=" + (nrow * columns + ncol));
// System.err.flush();
return nrow * columns + ncol;
}
```
Liquibase adds the new column. We need an admin tool action to generate values for `accession.tileIndex3` for records where `latitude.between(-90, 90).and(longitude.between(-180, 180))`.
Please extend `AccessionGeoFilter` to support filtering by the new tile index: `public Set<Long> tileIndex3deg;`.2022.1Artem HrybeniukArtem Hrybeniuk