Class ElementsRequestExecutor


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

      All Methods Static Methods Concrete Methods Deprecated Methods 
      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.
    • Method Detail

      • 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
      • 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