java.lang.Object
org.heigit.ohsome.ohsomeapi.controller.dataextraction.elements.ElementsController

@RestController @RequestMapping("/elements") public class ElementsController extends Object
REST controller containing the methods, which are mapped to "/elements" and used to return OSM data.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    elementsBbox(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Gives the OSM objects as GeoJSON features, which have the bounding box of the respective objects in the geometry field.
    void
    elementsCentroid(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Gives the OSM objects as GeoJSON features, which have the centroid of the respective objects in the geometry field.
    void
    elementsGeometry(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Gives the OSM objects as GeoJSON features, which have the geometry of the respective objects in the geometry field.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ElementsController

      public ElementsController()
  • Method Details

    • elementsGeometry

      @RequestMapping(value="/geometry", method={GET,POST}, produces="application/json") public void elementsGeometry(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Gives the OSM objects as GeoJSON features, which have the geometry of the respective objects in the geometry field.
      Parameters:
      servletRequest - HttpServletRequest of the incoming request
      servletResponse - HttpServletResponse of the outgoing response
      Throws:
      Exception - thrown by #extract(RequestResource, ElementsGeometry, HttpServletRequest, HttpServletResponse) extract
    • elementsBbox

      @RequestMapping(value="/bbox", method={GET,POST}, produces="application/json") public void elementsBbox(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Gives the OSM objects as GeoJSON features, which have the bounding box of the respective objects in the geometry field.
      Parameters:
      servletRequest - HttpServletRequest of the incoming request
      servletResponse - HttpServletResponse of the outgoing response
      Throws:
      Exception - thrown by #extract(RequestResource, ElementsGeometry, HttpServletRequest, HttpServletResponse) extract
    • elementsCentroid

      @RequestMapping(value="/centroid", method={GET,POST}, produces="application/json") public void elementsCentroid(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Gives the OSM objects as GeoJSON features, which have the centroid of the respective objects in the geometry field.
      Parameters:
      servletRequest - HttpServletRequest of the incoming request
      servletResponse - HttpServletResponse of the outgoing response
      Throws:
      Exception - thrown by #extract(RequestResource, ElementsGeometry, HttpServletRequest, HttpServletResponse) extract