Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Genesys Backend Genesys Backend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Genesys PGRGenesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #328
Closed
Open
Issue created Sep 14, 2018 by Matija Obreza@mobrezaOwner

Accession API v1: Geo info

Add endpoint to AccessionController v1 API /acn/geo as geoInfo(String filterCode, AccessionFilter filter) that returns

{
  "bounds": [
    [-4.8587000, 39.8772333],
    [-6.4917667, 39.0945000]
  ],
  "accessionCount": 123123,
  "tileServers": [ "cdn1.sandbox.genesys-pgr.org", "cdn2.sandbox.genesys-pgr.org" ]
}

Bounds

Add getBounds(AccessionFilter filter) to AccessionServiceImpl.

See https://leafletjs.com/reference-1.3.4.html#latlngbounds

It should select min(latitude), max(longitude), max(latitude), min(longitude) from accession.accessionId.geo and return:

[
 [ min(latitude), max(longitude) ],
 [ max(latitude), min(longitude) ]
]

Accession count

Add public long count(AccessionFilter filter) to AccessionServiceImpl:

@Override
public Page<Accession> list(AccessionFilter filter) {
	long total = elasticsearchService.count(Accession.class, filter);
	if (total < 10000) {
		// If total is below 10K, use actual count
		total = accessionRepository.count(filter.buildQuery());
	}
	return total;
}

Tile servers

Tileservers info is the cdn.servers setting from application.properties and it's accessible at:

@Value("${cdn.servers}")
private String[] cdnServers;
Edited Sep 14, 2018 by Matija Obreza
Assignee
Assign to
Time tracking