Class ElementsRequestExecutor

java.lang.Object
org.heigit.ohsome.ohsomeapi.executor.ElementsRequestExecutor

public class ElementsRequestExecutor extends Object
Includes all execute methods for requests mapped to /elements.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DecimalFormat
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Response
    aggregateBasicFiltersRatio(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Will be removed in next major version update.
    static <P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal>
    Response
    aggregateBasicFiltersRatioGroupByBoundary(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Will be removed in next major version update.
    static <P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal>
    Response
    aggregateGroupByBoundaryGroupByTag(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity)
    Performs a count|length|perimeter|area calculation grouped by the boundary and the tag.
    static Response
    aggregateGroupByKey(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity)
    Performs a count|length|perimeter|area calculation grouped by the key.
    static Response
    aggregateGroupByTag(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity)
    Performs a count|length|perimeter|area calculation grouped by the tag.
    static Response
    aggregateGroupByType(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity)
    Performs a count|length|perimeter|area calculation grouped by the OSM type.
    static Response
    aggregateRatio(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Performs a count|length|perimeter|area|ratio calculation using the filter and filter2 parameters.
    static <P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal>
    Response
    aggregateRatioGroupByBoundary(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Performs a count|length|perimeter|area-ratio calculation grouped by the boundary using the filter and filter2 parameters.
    static void
    extract(RequestResource requestResource, ElementsGeometry elemGeom, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
    Performs an OSM data extraction.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • extract

      public static void extract(RequestResource requestResource, ElementsGeometry elemGeom, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Performs an OSM data extraction.
      Parameters:
      elemGeom - ElementsGeometry defining the geometry of the OSM elements
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      Throws:
      Exception - thrown by #processParameters() processParameters, stream, or #streamResponse(HttpServletResponse, ExtractionResponse, Stream) streamElementsResponse
    • aggregateGroupByBoundaryGroupByTag

      public static <P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal> Response aggregateGroupByBoundaryGroupByTag(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity) throws Exception
      Performs a count|length|perimeter|area calculation grouped by the boundary and the tag.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      isSnapshot - whether this request uses the snapshot-view (true), or contribution-view (false)
      isDensity - whether this request is accessed via the /density resource
      Returns:
      Response
      Throws:
      BadRequestException - if groupByKey parameter is not given
      Exception - thrown by #processParameters() processParameters
    • aggregateGroupByTag

      public static Response aggregateGroupByTag(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity) throws Exception
      Performs a count|length|perimeter|area calculation grouped by the tag.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      isSnapshot - whether this request uses the snapshot-view (true), or contribution-view (false)
      isDensity - whether this request is accessed via the /density resource
      Returns:
      Response
      Throws:
      BadRequestException - if groupByKey parameter is not given
      Exception - thrown by #processParameters() processParameters and #computeResult(RequestResource, MapAggregator) computeResult
    • aggregateGroupByType

      public static Response aggregateGroupByType(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity) throws Exception
      Performs a count|length|perimeter|area calculation grouped by the OSM type.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      isSnapshot - whether this request uses the snapshot-view (true), or contribution-view (false)
      isDensity - whether this request is accessed via the /density resource
      Returns:
      Response
      Throws:
      Exception - thrown by #processParameters() processParameters and #computeResult(RequestResource, MapAggregator) computeResult
    • aggregateGroupByKey

      public static Response aggregateGroupByKey(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, boolean isSnapshot, boolean isDensity) throws Exception
      Performs a count|length|perimeter|area calculation grouped by the key.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      isSnapshot - whether this request uses the snapshot-view (true), or contribution-view (false)
      isDensity - whether this request is accessed via the /density resource
      Returns:
      Response
      Throws:
      BadRequestException - if groupByKeys parameter is not given
      Exception - thrown by #processParameters() processParameters and #computeResult(RequestResource, MapAggregator) computeResult
    • aggregateBasicFiltersRatio

      @Deprecated(forRemoval=true) public static Response aggregateBasicFiltersRatio(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Will be removed in next major version update.
      Performs a count|length|perimeter|area|ratio calculation.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      Returns:
      Response
      Throws:
      Exception - thrown by #processParameters() processParameters and #computeResult(RequestResource, MapAggregator) computeResult
    • aggregateRatio

      public static Response aggregateRatio(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Performs a count|length|perimeter|area|ratio calculation using the filter and filter2 parameters.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      Returns:
      Response
      Throws:
      Exception - thrown by #processParameters() processParameters and #computeResult(RequestResource, MapAggregator) computeResult
    • aggregateBasicFiltersRatioGroupByBoundary

      @Deprecated(forRemoval=true) public static <P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal> Response aggregateBasicFiltersRatioGroupByBoundary(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Will be removed in next major version update.
      Performs a count|length|perimeter|area-ratio calculation grouped by the boundary.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      Returns:
      Response
      Throws:
      BadRequestException - if a boundary parameter (bboxes, bcircles, bpolys) is not defined
      Exception - thrown by #processParameters() processParameters, count, or sum
    • aggregateRatioGroupByBoundary

      public static <P extends org.locationtech.jts.geom.Geometry & org.locationtech.jts.geom.Polygonal> Response aggregateRatioGroupByBoundary(RequestResource requestResource, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
      Performs a count|length|perimeter|area-ratio calculation grouped by the boundary using the filter and filter2 parameters.
      Parameters:
      requestResource - RequestResource definition of the request resource
      servletRequest - HttpServletRequest incoming request object
      servletResponse - HttpServletResponse] outgoing response object
      Returns:
      Response
      Throws:
      BadRequestException - if a boundary parameter (bboxes, bcircles, bpolys) is not defined
      Exception - thrown by #processParameters() processParameters, count, or sum