FRAMES | NO FRAMES Description | Parameters | Examples | Response
Densify (Operation)
URL http://<geometryservice-url>/densify
Parent Resource Geometry Service

Description

The densify operation is performed on a geometry service resource. This operation densifies geometries by plotting points between existing vertices.

You can provide arguments to the densify 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 densified. 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" : "<esriGeometryPolyline | esriGeometryPolygon>"
"geometries" : [ <geometry1>, <geometry2> ]
}

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

Example:
{
"geometryType" : "esriGeometryPolyline",
"geometries" : [
 {
   "paths" : [
    [[-117,34],[-116,34],[-117,33]],
    [[-115,44],[-114,43],[-115,43]]
   ]
 },
{
  "paths" : [
  [[32.49,17.83],[31.96,17.59],[30.87,17.01],[30.11,16.86]]
 ]
}
]
}
    
sr Description: The well-known ID or a spatial reference json object for the input polylines. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems.
maxSegmentLength Description: All segments longer than maxSegmentLength are replaced with sequences of lines no longer than maxSegmentLength.
geodesic Description: A flag that can be set to true if GCS spatial references are used or densify geodesic is to be performed.
lengthUnit (optional) Description: The length unit of maxSegmentLength, can be any esriUnits constant. In case not specified, if the SR is PCS, the unit is determined by unit of the SR, otherwise, it is meter. For a list of valid units, see esriSRUnitType Constants and esriSRUnit2TypeConstants.

Example Usage

Example 1: In this example, a polyline is densified.

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/densify?
sr=3395
&geometries={ "geometryType" : "esriGeometryPolyline","geometries" : [{"paths" : [[[-17313284.793,2209625.866],[-17312808.186926104, 2210504.3164105085],[-17308518.732261017,2218410.3701050845],[-17260185.82890302,2310809.9320710143], [-17307752.671522036,2223194.8742101695],[-14501308.957,7392483.288],[-13773503.446,6003036.405 ]]]}]}
&maxSegmentLength=10000&useDeviationDensification=false&densificationParameter=0&geodesic=false&lengthUnit=&f=html

JSON Response Syntax

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

JSON Response Example

{
"geometryType" : "esriGeometryPolyline",
"geometries" : [
 {
   "paths" : [
    [[-117,34],[-116,34],[-117,33]],
    [[-115,44],[-114,43],[-115,43]]
   ]
 },
{
  "paths" : [
  [[32.49,17.83],[31.96,17.59],[30.87,17.01],[30.11,16.86]]
 ]
}
]
}