JSON syntaxĪt 10.3, a circular arc, an elliptical arc, and a Bézier curve can be represented as a JSON curve object. The even-odd fill rule will guarantee that the polygon will draw correctly even if the ring orientation is not as described above. When drawing a polygon, use the even-odd fill rule. Polygons returned by services are topologically simple.
Rings can touch at a vertex or self-touch at a vertex, but there should be no other intersections. Exterior rings are oriented clockwise, while holes are oriented counter-clockwise. Nulls and/or NaNs embedded in an otherwise defined coordinate stream for polylines/polygons is a syntax error. See the description of multipoints for details on how the point arrays are interpreted.Īn empty polygon is represented with an empty array for the rings field. A polygon can also have Boolean-valued hasM and hasZ fields. Each point in the ring is represented as an array of numbers. The first point of each ring is always the same as the last point. Each ring is represented as an array of points. For polygons with curveRings, see the sections on
JSON syntaxĪ polygon (specified as esriGeometryPolygon)Ĭontains an array of rings or curveRings and a spatialReference. For 3D points with Ms, the Z coordinate is at index 2, and the M coordinate, if present, is at index 3.Īn empty multipoint has a points field with no elements. For 3D points, the Z coordinate is required and is at index 2. For 2D points with Ms, the m coordinate, if present, is at index 2. In all cases, the x coordinate is at index 0 of a point's array, and the y coordinate is at index 1. It will have two elements for 2D points, two or three elements for 2D points with Ms, three elements for 3D points, and three or four elements for 3D points with Ms. Omitting an hasZ or hasM field is equivalent to setting it to false.Įach element of the points array is itself an array of two, three, or four numbers. These fields control the interpretation of elements of the points array. A multipoint can also have Boolean-valued hasZ and hasM fields. JSON syntaxĪ multipoint (specified as esriGeometryMultipoint)Ĭontains an array of points, along with a spatialReference field. WKID-based syntaxįor a list of valid WKID values, see Coordinate systems and transformations. See Image Coordinate System for more information. Starting at 10.3, Image Service supports image coordinate systems. If either part of an SR is custom, the entire SR will be serialized with only the wkt property. In other words, the WKT syntax can be used to define an SR with both horizontal and vertical components in one string. A VCS WKT can also be embedded in the string value of the wkt property. There are two VCS WKID properties: vcsWkid and latestVcsWkid. When a vertical coordinate system is specified with a WKID, the same caveat as mentioned above applies. A VCS defines units of measure, the location of z = 0, and whether the positive vertical direction is up or down.
To ensure backward compatibility with older spatial data servers, the JSON wkid property will always be the value that was originally assigned to an SR when it was created.Īn additional property, latestWkid, identifies the current WKID value (as of a given software release) associated with the same spatial reference.Ī spatial reference can optionally include a definition for a vertical coordinate system (VCS), which is used to interpret the z-values of a geometry. For example, the WGS 1984 Web Mercator (Auxiliary Sphere) projection was originally assigned WKID 102100 but was later changed to 3857. The well-known ID (WKID) for a given spatial reference can occasionally change. For geographic coordinate systems using degrees, the equivalent of a mm at the equator is used. The resolution values are 10x smaller or 1/10 the tolerance values. If the coordinate system uses feet, the tolerance is 0.00328083333 ft. The xy and z tolerance values are 1 mm or the equivalent in the unit of the coordinate system. The default tolerance and resolution values for the associated coordinate system are used. Spatial referenceĪ spatial reference can be defined using a well-known ID ( wkid) or well-known text ( wkt). Polyline with curve, and Polygon with curve for more information. Starting at 10.3, polylines and polygons with curves are supported. Starting at 10.1, geometries containing m- and z-values are supported. These geometry types (associated with the geometryType parameter and response property) can act as accepted values for operations, such as the Difference operation for geometry service resources or the feature layer-level Query operation for feature service layers, or in the properties of a layer resource. ArcGIS REST API supports the following geometry types: This topic defines the JSON formats of the geometry and spatial reference objects as returned by ArcGIS REST API.