Buffer
A buffer in Geographic Information Systems (GIS) is a zone created at a specified distance around a geographic feature, such as a point, line, or polygon. Buffers are essential for spatial analysis, as they help users analyze the proximity and interaction between objects or events within a certain range.
Buffers can take on different shapes depending on the geometry of the original feature:
-
Point Buffers create circular zones around a central location, useful for defining areas of influence around a point, such as a water well or cellular tower.
-
Line Buffers generate a band around a linear feature, like a road or river, ideal for analyzing access corridors, pollution spread, or road setbacks.
-
Polygon Buffers create a border around a defined area, useful for establishing boundaries, impact zones, or regulatory zones around places like parks or industrial sites.

How Buffer Distances are Applied
Buffer distances can be applied using various units—such as meters, kilometers, miles, or feet—depending on the scale of analysis. Users often choose these distances based on the extent of influence they want to measure or the spatial resolution of their data. A buffer can also be configured to expand outward from the feature or to include only the area inside the specified distance (often called a "negative buffer").
GeoFlip can perform a buffer transformation on most commonly used GIS-related format including GeoJSON, Shapefile (SHP), DXF, and GeoPackage (GPKG). The following section explains the structure for using this transformation and provides example code.
Using the Buffer transformation in GeoFlip
The GeoFlip API allows user to add a transformation parameter to the request payload. For buffer transformation, it enables users to specify various parameters like distance and units to customize the buffer zone.
Example Request
Below is an example parameters for the buffer transformation.
Sample Parameters
{
"transformations": [
{
"type": "buffer",
"distance": 100,
"units": "meters"
}
]
}
Sample Payload with GeoJSON as Input
{
"input_geojson": {
"type": "FeatureCollection",
"features": {
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[114.99613129776213, -33.859519225850065],
[114.99949686696743, -33.86220916993638],
[115.00559680322726, -33.86004343997021],
[115.0048817441612, -33.85595593539954],
[114.99756134180785, -33.85448784508991],
[114.99613129776213, -33.859519225850065]
]
],
"type": "Polygon"
}
},
"output_format": "geojson",
"transformations": [
{
"type": "buffer",
"distance": 100,
"units": "meters"
}
]
}
}
Parameters
type
: Specifies the type of transformation. For a buffer, this is always set to "buffer".distance
: Defines the radius or width of the buffer zone in the specified units. This value should be a positive integer.units
: Indicates the units for the buffer distance, such as "meters", "kilometers", "miles", or "feet".
Error Handling
If there are issues with the request (e.g., invalid parameters), the API will return an error message detailing the problem. Here's a common error response:
Invalid unit
{
"code": 422,
"errors": {
"json": {
"transformations": {
"0": {
"_schema": [
"Invalid unit. Supported units are: meters, kilometers, miles, feet."
]
}
}
}
},
"status": "Unprocessable Entity"
}
Invalid distance
{
"code": 422,
"errors": {
"json": {
"transformations": { "0": { "distance": ["Not a valid number."] } }
}
},
"status": "Unprocessable Entity"
}