This service performs spatial binning over a spatial dataset.
post
/spatialviewer/api/v1/binningJob
Request
Supported Media Types
- application/json
Query Parameters
- asynchronous
-
Type:
booleanif true the operation is runned asynchronously.false
Body Parameter
Job details
Root Schema : BinningJobInfo
Type:
object- cellHeight
-
Type:
number(double)If the shape is a rectangle then specify the rectangle's height.Example:2.5 - cellWidth
-
Type:
number(double)Width of the hexagon or rectangle.Example:5 - dataPath
-
Type:
stringPath of the file or files in HDFS. Specify this property if useIndex is false.Example:/user/oracle/spatialviewer/tweetsJune.json - gridMaxX
-
Type:
number(double)Maximum X value of the binning grid minimum bounding rectangle (MBR).Example:175 - gridMaxY
-
Type:
number(double)Maximum Y value of the binning grid minimum bounding rectangle (MBR).Example:75 - gridMinX
-
Type:
number(double)Minium X value of the binning grid minimum bounding rectangle (MBR).Example:-175 - gridMinY
-
Type:
number(double)Minium Y value of the binning grid minimum bounding rectangle (MBR).Example:-75 - indexName
-
Type:
stringThe index name. Specify this property if useIndex is true.Example:TweetsJune - inputFormatClass
-
Type:
stringThe input format class. Specify this property if useIndex is false.Example:oracle.spatial.hadoop.vector.geojson.mapred.GeoJsonInputFormat - jarWithNeededClasses
-
Type:
stringjar name with the user-defined classes like custom RecordInfoProvider or InputFormat. If the InputFormat class or the RecordInfoProvider class is not in the API, or in the hadoop API classes, then a jar with the user-defined classes must be provided. To be able to use this jar the user must add it in the /opt/oracle/oracle-spatial-graph/spatial/web-server/spatialviewer/WEB-INF/lib directory and restart the server. Optional property that can be set if if useIndex is false.Example:myjar.jar - outputPath
-
Type:
stringThe Hadoop job output path.Example:/user/oracle/spatialviewer/binResult - recordInfoProviderClass
-
Type:
stringThe class that provides the spatial information. Specify this property if useIndex is false.Example:oracle.spatial.hadoop.vector.geojson.GeoJsonRecordInfoProvider - resultName
-
Type:
stringThe result name.Example:Binning Count TweetsJune - shape
-
Type:
stringDefault Value:hexagonAllowed Values:[ "hexagon", "rectangle" ]Shape of the binning grid cells. The possible values are hexagon or rectangle.Example:hexagon - srid
-
Type:
integer(int32)SRID of the geometries. Specify this property if useIndex is false.Example:8307 - thematicAttribute
-
Type:
stringThe thematic field can be one of the fields returned by the function getExtraFields of the specified RecordInfoProvider class or the count attribute that specifies the number of records in the bin.Example:count - tolerance
-
Type:
number(double)Double value that represents the tolerance used when performing spatial operations. Specify this property if useIndex is false.Example:0.05 - useIndex
-
Type:
booleantrue if an index is used as input, false otherwiseExample:true
Response
Supported Media Types
- application/json
200 Response
Successful request.
The response contains the location of the results in HDFS.
Additionally When the job finishes the results will be saved in the folder binning_results contained in the SpatialViewer local working directory (see SpatialViewer configuration). The result can be used as data source of the Map API VectorLayer (OM.layer.VectorLayer) for display.
The response contains the location of the results in HDFS.
Additionally When the job finishes the results will be saved in the folder binning_results contained in the SpatialViewer local working directory (see SpatialViewer configuration). The result can be used as data source of the Map API VectorLayer (OM.layer.VectorLayer) for display.
Body
Root Schema : BinningJobResponse
Type:
object- o:successCode
-
Type:
stringThe success code.Example:SV-05004 - response
-
Type:
stringThe response contains the location of the results in HDFS.Example:hdfs://<namenode>:8020/user/oracle/spatialviewer/binResult - status
-
Type:
stringsuccess or errorExample:success - title
-
Type:
stringService title.Example:Create binning job.
202 Response
accepted asynchronous request.
The response contains the resource manager web application URL to track the job.
Additionally When the job finishes the results will be saved in the folder binning_results contained in the SpatialViewer local working directory (see SpatialViewer configuration). The result can be used as data source of the Map API VectorLayer (OM.layer.VectorLayer) for display.
The response contains the resource manager web application URL to track the job.
Additionally When the job finishes the results will be saved in the folder binning_results contained in the SpatialViewer local working directory (see SpatialViewer configuration). The result can be used as data source of the Map API VectorLayer (OM.layer.VectorLayer) for display.
Body
Root Schema : AsyncBinningJobResponse
Type:
object- o:successCode
-
Type:
stringThe success code.Example:SV-05004 - response
-
Type:
stringThe response contains the resource manager web application URL to track the job. See this value in the SpatialViewer Hadoop configuration (refer to user's guide chapter 1.8.4 Configuring the Oracle SpatialViewer on Oracle Big Data Appliance). The parameter is yarn.resourcemanager.webapp.address.Example:http://resource.mananger.webapp:8088 - status
-
Type:
stringsuccess or errorExample:success - title
-
Type:
stringService title.Example:Create binning job.