# How to perform geometry analysis

## 1. Select an operation

The first step to performing a geometry analysis is to select an operation. Operations are categorized into the following groups based on the functionality they provide:

## 2. Create geometries

After you have selected the operation, the next step is to create one or more geometries with the same spatial reference. Geometry data is typically created through user interaction or by accessing features in a hosted feature layer.

In general, There are two different ways to create geometry data for analysis:

Below is an example of creating geometries programmatically using coordinates:

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for Python
Use dark colors for code blocksCopy
``````
// create a point
const point = Geometry.fromJSON({
type: "point",
x: -3.83565819758263,
y: 40.408142411681396,
spatialReference: SpatialReference.WGS84,
})
// create a polyline
const line = Geometry.fromJSON({
type: "polyline",
paths: [
[
[-3.7611339616121, 40.39446064625446],
[-3.6992634462656, 40.42167509407656],
[-3.65292023890635, 40.39553309352415],
],
],
spatialReference: SpatialReference.WGS84,
``````

## 3. Perform the analysis

After you have created geometries, you can use them as parameters to one or more geometric operations.

The example below demonstrates how to pass the created geometries to client API operations:

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for Python
Use dark colors for code blocksCopy
``````// buffer the input point
const buffer = geometryEngine.geodesicBuffer(point, 1000, "meters")

// Return the geodesic area of the new buffer
const area = geometryEngine.geodesicArea(buffer)
console.log("The area is:" + area)

// Determine if the buffer area and polyline intersect
const intersects = geometryEngine.intersects(buffer, line)
console.log("The geometries intersect: " + intersects)``````