Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Genesys Backend
Genesys Backend
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #328

Closed
Open
Opened Sep 14, 2018 by Matija Obreza@mobrezaOwner
  • Report abuse
  • New issue
Report abuse New issue

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
2.4
Milestone
2.4 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: genesys-pgr/genesys-server#328