FRAMES | NO FRAMES Description | Parameters | Examples | Response
Project Geometries (Operation)

This is an archive of a previous version of the ArcGIS REST API. The current version can be found at http://resources.arcgis.com/en/help/arcgis-rest-api/

URL http://<geometryservice-url>/project
Parent Resource Geometry Service

Description

The project operation is performed on a geometry service resource. The result of this operation is an array of projected geometries. This resource projects an array of input geometries from an input spatial reference to an output spatial reference.

You can provide arguments to the project operation as query parameters defined in the parameters table below.

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
geometries Description: The array of geometries to be projected. The structure of each geometry in the array is same as the structure of the json geometry objects returned by the ArcGIS REST API.

Syntax and Examples:

JSON Structures:

Syntax:
{
  "geometryType" : "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryEnvelope>",
  "geometries" : [ <geometry1>, <geometry2> ]
}

Note: Support for the esriGeometryEnvelope geometry type was added at 9.3 SP1.

The "geometries" property is an array of input geometries. All geometries in this array should be of the type defined by "geometryType".

Example:
{
"geometryType" : "esriGeometryPoint",
"geometries" : [
{"x" : -104.53, "y" : 34.74},
{"x" : -63.53, "y" : 10.23}
]
}

Simple Syntax for point geometries:

When using points, in addition to the JSON structures, you can specify the geometries with a simpler comma-separated syntax.

Syntax: geometries=x1, y1, x2, y2, ..., xn, yn
Example: geometries=-104.53, 34.74, -63.53, 10.23

URL based:

For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server.

Syntax: geometries={ "url" : "<URL to file>" }
Example: geometries={ "url" : "http://myserver/mygeometries/afile.txt" }

inSR Description: The well-known ID of the spatial reference or a spatial reference json object for the input geometries. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems.
outSR Description: The well-known ID of the spatial reference or a spatial reference json object for the returned geometries. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems.

Example Usage

Example 1: Project the point [-117, 34] from WGS 84 (4326) to Web Mercator (102113).

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project?
inSR=4326&
outSR=102113&
geometries={"geometryType":"esriGeometryPoint","geometries":[{"x":-117,"y":34}]}

JSON Response Syntax

{
"geometries" : [ <geometry1>, <geometry2> ]
}

JSON Response Example

{
"geometries" : [
{ "x" : -1.16362263726209E7, "y" : 4104255.01132978 },
{ "x" : -7072127.25009667, "y" : 1137314.06593893 }
]
}