Skip To Content

Query (GPS)

  • URL:https://<imageservice-url>/queryGPSInfo
  • Required Capability:Image, Catalog
  • Version Introduced:11.2

Description

License:

You must license your ArcGIS Server as an ArcGIS Image Server to use this resource.

The queryGPSInfo operation queries generic camera information, camera GPS locations when taking an image, image center coordinates, and exterior orientation information of each source image inside the image collection.

Request parameters

ParameterDetails
where

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

Example

OBJECTID=4
objectIds

The object IDs of the raster catalog to be queried.

Syntax

objectIds=<objectId1>, <objectId2>

Example

objectIds=37, 462
time

The time instant or the time extent to query.

Time instant
Syntax: time=<timeInstant>
Example: time=1199145600000 (1 Jan 2008 00:00:00 GMT)
Time extent (For time extents, one of <startTime> or <endTime> could be 'null').
Syntax: time=<startTime>, <endTime>
Example: time=1199145600000, 1230768000000 (1 Jan 2008 00:00:00 GMT to 1 Jan 2009 00:00:00 GMT)
A null value specified for startTime or endTime will represent infinity for start or end time, respectively.

geometry

The geometry to apply as the spatial filter. The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. In addition to the JSON structures, for envelopes and points, you can specify the geometry with a comma-separated syntax.

Syntax


//JSON structure
geometryType=<geometryType>&geometry={geometry}

//Envelope simple syntax
geometryType=esriGeometryEnvelope&geometry=<xmin>,<ymin>,<xmax>,<ymax>

//Point simple syntax
geometryType=esriGeometryPoint&geometry=<x>,<y>

Examples


geometryType=esriGeometryEnvelope&geometry={xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}

geometryType=esriGeometryEnvelope&geometry=-104,35.6,-94.32,41

geometryType=esriGeometryPoint&geometry=-104,35.6
geometryType

The type of geometry specified by the geometry parameter. The geometry type can be envelope, point, line, or polygon. The default geometry type is envelope.

Values: esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryEnvelope

inSR

The spatial reference of the input geometry. 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.

spatialRel

The spatial relationship to be applied to the input geometry while performing the query. The supported spatial relationships include intersects, contains, envelope intersects, within, and so on. The default spatial relationship is intersects (esriSpatialRelIntersects).

Values: esriSpatialRelIntersects | esriSpatialRelContains | esriSpatialRelCrosses | esriSpatialRelEnvelopeIntersects | esriSpatialRelIndexIntersects | esriSpatialRelOverlaps | esriSpatialRelTouches | esriSpatialRelWithin

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 queryGPSInfo operation that queries GPS info of images within an envelope geometry and intersect spatial relationship:

https://machine.domain.com/webadaptor/rest/services/<myImageService>/ImageServer/queryGPSInfo?where=&objectIds=&time=&geometry=556126,5797274.90245,556136.2815,5797277.53225&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&f=html

JSON Response syntax


{
  "images": [
    {
      "id": <objectId>,
      "name": <value>,
      "acquisitionDate": <time>, //epoch time in millisecond
      "cameraID": <value>,
      "center": <centerPoint>
    },
    "gps": {
      "longitude": <long>, //number
      "latitude": <long>, //number
      "altitude": <long>, //number
    },
    "orientation": {
      "omega": <long>, //number
      "phi": <long>, //number
      "kappa": <long>, //number
      "clockwise": <Boolean>
    }
  ],
  "cameras": [
    {
      "id": <value>,
      "make": <value>,
      "model": <value>,
      "focalLength": <long>, //number
      "pixelSize": <long>, //number
      "rows": <Int>, //number
      "cols": <Int> //number
    }
  ]
}

JSON Response example:


{
  "images": [
    {
      "id": 1,
      "name": "YUN_0040.JPG",
      "acquisitionDate": 1523734269000,
      "cameraID": "",
      "center": {
        "x": 491434.5802625127,
        "y": 3762935.5282063205,
        "z": 632.6398,
        "spatialReference": {
          "wkid": 32611,
          "latestWkid": 32611,
          "vcsWkid": 115700,
          "latestVcsWkid": 115700
        }
      },
      "gps": {
        "longitude": -117.09277149140543,
        "latitude": 34.006982330586474,
        "altitude": 723.6317
      },
      "orientation": {
        "omega": -0.6266054665331874,
        "phi": 0.893056022089954,
        "kappa": 84.03969395638119,
        "clockwise": true
      }
    }
  ],
  "cameras": [
    {
      "id": "",
      "make": "Yuneec",
      "model": "E90",
      "focalLength": 7.995892,
      "pixelSize": 0.0024,
      "rows": 3648,
      "cols": 5472
    }
  ]
}