Geometries represent real-world objects by defining a shape at a specific geographic location. They are used throughout the API to represent the shapes of features and graphics, layer extents, viewpoints, and GPS locations. They are also used as inputs and outputs of spatial analysis and geoprocessing operations, and to measure distances and areas, among other uses.

A spatial reference is a characteristic of a geometry that identifies how its coordinates relate to real-world space. It is important for ensuring that spatial data in different layers, graphic overlays, and feature sets can be used together for accurate viewing or analysis.

Geometry

The API includes a Geometry base class. The following table summarizes the classes that inherit from this class. See the Geometry overview for details.

Geometry typeDescriptionExample of use
Point (MapPoint)A single point locationLocation of survey monument
Multipoint (Multipoint)An ordered collection of zero or more point locations in one geometryLocations of multiple bore holes at a drilling site
Segment (Segment)A single two-point lineThe shortest path from one point to another
Polyline (Polyline)One or more lines, each with two or more verticesA road centerline
Polygon (Polygon)An area, possibly multipart, whose parts may have interior holesA group of islands
Envelope (Envelope)A 4-sided polygon with sides aligned to the x and y axesAn area of interest

This API provides a variety of ways to work with geometries, including:

  • topological operations such as intersect, union, and buffer
  • evaluation of spatial relationships such as contains, touches, and overlaps
  • measurement of length, area, and distance
  • projecting geometries to a new spatial reference

See the Work with geometry topic for details.

Spatial reference

The positions of objects on the earth’s spherical surface are measured in degrees of latitude and longitude, also known as geographic coordinates. Because the earth is round and maps are flat, getting information from the curved surface to a flat one involves a mathematical formula called a map projection Projection refers to a projected coordinate system based on a map projection such as transverse Mercator, Albers equal area, or Robinson, all of which project maps of the earth's spherical surface onto a 2D Cartesian coordinate plane. Learn more . A map projection transforms geographic (latitude and longitude) coordinates to Cartesian (x, y) coordinates A coordinate is a value that denotes the location of a vertex. Coordinates can represent 2D (x,y) or 3D (x,y,z) space. The meaning of the x,y,z coordinates are determined by a coordinate system. Learn more in a projected coordinate system.

The term coordinate system A coordinate system is a reference framework consisting of a set of points, lines, or surfaces, and a set of rules, used to define the positions of points in space in two or three dimensions. Learn more , which includes both geographic and projected coordinate systems, is used to describe the information about the projection, as well as other specifics such as datum, units, and meridians. Datum transformations are available for projecting spatial data from one geographic coordinate system to another.

A spatial reference A spatial reference is a set of parameters, typically defined by a WKID, that define the coordinate system and spatial properties for geographic data. Applications use a spatial reference to correctly display the position of geographic data in a map or scene. Learn more defines the coordinate system and underlying mathematical model of the earth that is used to interpret the coordinates of a geometry.

This API can work with data in different spatial references. When necessary, geometries are automatically projected on the fly to ensure that data is displayed and analyzed together correctly. However, you can also explicitly project geometries from one spatial reference to another.

See the Spatial reference topic for more information.

Tutorials

Samples