Class ElementsRequestExecutor
java.lang.Object
org.heigit.ohsome.ohsomeapi.executor.ElementsRequestExecutor
Includes all execute methods for requests mapped to /elements.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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>
ResponseaggregateBasicFiltersRatioGroupByBoundary
(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>
ResponseaggregateGroupByBoundaryGroupByTag
(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>
ResponseaggregateRatioGroupByBoundary
(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.
-
Field Details
-
URL
-
TEXT
-
df
-
-
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 elementsservletRequest
-HttpServletRequest
incoming request objectservletResponse
-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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-HttpServletResponse]
outgoing response objectisSnapshot
- 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 givenException
- 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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-HttpServletResponse]
outgoing response objectisSnapshot
- 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 givenException
- 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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-HttpServletResponse]
outgoing response objectisSnapshot
- 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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-HttpServletResponse]
outgoing response objectisSnapshot
- 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 givenException
- 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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-HttpServletResponse]
outgoing response object- Returns:
Response
- Throws:
BadRequestException
- if a boundary parameter (bboxes, bcircles, bpolys) is not definedException
- thrown by#processParameters() processParameters
,count
, orsum
-
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 resourceservletRequest
-HttpServletRequest
incoming request objectservletResponse
-HttpServletResponse]
outgoing response object- Returns:
Response
- Throws:
BadRequestException
- if a boundary parameter (bboxes, bcircles, bpolys) is not definedException
- thrown by#processParameters() processParameters
,count
, orsum
-