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 45
    • Issues 45
    • 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
  • #409

Closed
Open
Opened Jan 28, 2019 by Matija Obreza@mobrezaOwner
  • Report abuse
  • New issue
Report abuse New issue

ClimateDataController v1

Add a new ClimateDataController in API v1 namespace at /api/v1/climate as base URL, with the following methods:

@GetMapping("/current/{latitude},{longitude}")
public TileClimate getCurrentClimate(@PathVariable("latitude") double latitude, double longitude) {
  Long tileIndex = WorldClimUtil.getWorldclim25Tile(longitude, latitude);
  if (tileIndex == null) {
    throw new NotFoundElement("No current climate data for specified (lat, lon)");
  }
  return climateDataService.climateForTile(tileIndex);
}

@GetMapping("/past/{latitude},{longitude}")
public TileClimate getPastClimate(@PathVariable("latitude") double latitude, double longitude) {
  throw new NotFoundElement("Past climate data not available");
}


@GetMapping("/future/{latitude},{longitude}")
public TileClimate getPastClimate(@PathVariable("latitude") double latitude, double longitude) {
  throw new NotFoundElement("Future climate data not available");
}
Assignee
Assign to
2.4
Milestone
2.4 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: genesys-pgr/genesys-server#409