# How to perform geometry analysis

The most common approach to perform a geometry analysis is to use a client-side API to create a geometry (point, multipoint, polyline, polygon and others) and then execute one or more geometry operations to solve a problem. When you use two or more operations for geometry analysis, this is known as chaining. For example, you can buffer a point, then calculate the area of the result, and then determine if a line intersects the buffer.

Geometry data is typically created through user interaction or by accessing features in a hosted feature layer. When the operations are complete, the results are typically displayed in a map or used as input for other analyses.

## Steps

The general steps to perform a geometry analysis are:

1. Determine the geometry operation(s) required to solve the problem.
2. Create one or more geometries with the same spatial reference.
3. Execute the geometry operations.
4. Display the results in a map or use as input for another analysis.

## Example

### Buffer, calculate area, and intersect

This example shows how to chain together a number of geometry operations to perform a geometry analysis. It creates a point and then buffers the point, calculates the area, and then determines if the area (polygon) intersects a line.

A real-world example of this might be to determine the potential flood area (buffer) that will affect a road and if the road will intersect the flood area.

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for Python
Use dark colors for code blocksCopy

``````const point = Geometry.fromJSON({
type: "point",
x: -3.83565819758263,
y: 40.408142411681396,
spatialReference: SpatialReference.WGS84,
});

const buffer = geometryEngine.geodesicBuffer(point, 1000, "meters");

const area = geometryEngine.geodesicArea(buffer);

console.log("The area is:" + area);

const line = Geometry.fromJSON({
type: "polyline",
paths: [
[
[-3.7611339616121, 40.39446064625446],
[-3.6992634462656, 40.42167509407656],
[-3.65292023890635, 40.39553309352415],
],
],
spatialReference: SpatialReference.WGS84,
});

const intersects = geometryEngine.intersects(buffer, line);

console.log("The geometries intersect: " + intersects);``````

## Services

### Spatial analysis service

Process spatial datasets to discover relationships and patterns.