Skip To Content

Find (Image Service)

Description

The find operation locates all images that contain toGeometry and sort them accordingly. For example, in the image inspection workflow, in most cases, fromGeometry is the viewing camera position, and toGeometry is the target point (where user clicked on the map). The images found are sorted in ascending order based on the angle between the vector from viewing camera position to target point, and that from the image camera GPS location to the target point, plus distance between the image center and the target point.

Request parameters

ParameterDetails
fromGeometry

A point geometry that defines the from location. The structure of the geometry is the same as the structure of the JSON geometry objects. The image inspection workflow, the from location is usually the viewing camera location.

Example

fromGeometry={"x":495428.9389,"y":3768341.5466,"z":851.3407}
toGeometry

A point geometry that defines the to location. The structure of the geometry is the same as the structure of the JSON geometry objects. The image inspection workflow, the to location is usually the viewing camera location.

Example

toGeometry={"x":495393.0991,"y":3768363.7228,"z":825.8077}
inSR

(optional)

The spatial reference of the toGeometry. The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object. If inSR is not specified, the geometry is assumed to be in the spatial reference of the service.

objectIds

(optional)

The object IDs of the raster catalog to be queried.

Syntax

objectIds=<objectId1>,<objectId2>

Example

objectIds=37, 462
where

(optional)

A where clause for the query filter. Any legal SQL where clause operating on the fields in the raster catalog is allowed.

Example

where=POP2000 > 350000
maxCount

(optional)

Specifies the maximum count of the returned images.

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample request URL for the find operation that will find the closet image that can view the specified toGeometry:

https://machine.domain.com/webadaptor/rest/services/BrewertonTank_cloud/ImageServer/find?fromGeometry={"x":495428.9389,"y":3768341.5466,"z":851.3407}&toGeometry={"x":495393.0991,"y":3768363.7228,"z":825.8077}&inSR=&objectIds=&where=&maxCount=1&f=html

JSON Response syntax


{
  "images": [
    {
      "id": <objectId>,
      "uri": uri,
      "acquisitionDate": <time>, //epoch time in millisecond
      "cameraID": <value>,
      "center": <centerPoint>
    },
    "perspectiveCenter": {
      "x": <long>, //number
      "y": <long>, //number
      "z": <long>, //number
    },
    "orientation": {
      "omega": <long>, //number
      "phi": <long>, //number
      "kappa": <long>, //number
      "clockwise": <Boolean>
    },
    "make": <value>,
    "model": <value>,
    "focalLength": <long>, //number
    "pixelSize": <long>, //number
    "rows": <Int>, //number
    "cols": <Int> //number
  ]
}

JSON Response example


{
  "images": [
    {
      "id": 2,
      "uri": "/vsis3/ortho-maker/BrewertonTank/BrewertonTank/DJI_0707.JPG",
      "acquisitionDate": 1498639972000,
      "cameraID": "ae79b3d7b6066db1cb57a9240cad530c_Unknown",
      "center": {
        "x": 407346.69986255,
        "y": 4787426.66231584,
        "z": 88.08833,
        "spatialReference": {
          "wkid": 32618,
          "latestWkid": 32618,
          "vcsWkid": 115700,
          "latestVcsWkid": 115700
        }
      },
      "perspectiveCenter": {
        "x": 407306.5742,
        "y": 4787327.8029,
        "z": 146.1573
      },
      "orientation": {
        "omega": 61.77050665236553,
        "phi": -20.728491367643706,
        "kappa": -11.411313741503262,
        "clockwise": true
      },
      "make": "DJI",
      "model": "FC6310",
      "focalLength": 8.8493596,
      "pixelSize": 0.0024000000000000002,
      "rows": 3078,
      "cols": 5472
    }
  ]
}