This gem runs in .
Overview
Use the Buffer gem to take any polygon or line and expand or contract its boundaries. This can be useful for spatial analysis tasks like creating safety zones around hazardous areas, expanding service coverage areas, and analyzing proximity impacts.Prerequisites
-
Add
ProphecyDatabricksSqlSpatialversion 0.0.3 or higher to your project. - Run Databricks Runtime 17.1 or higher. (This requirement is due to the use of Databricks’ ST geospatial functions.) Other SQL warehouse providers are not supported for this gem.
Input and Output
The Buffer gem accepts the following inputs and output.| Port | Description |
|---|---|
| in0 | Input dataset containing the source points in WKT format for which you want to find the nearest points. |
| out | Output dataset that contains two columns: input with the original geometry, and output with the transformed geometry. |
Parameters
Configure the Buffer gem using the following parameters.| Parameter | Description |
|---|---|
| Geometry column | Column containing the polygon or line you want to expand or contract. |
| Distance | Amount of distance to expand or contract each geometry. Use negative distances to create inward buffers (shrinking geometries). |
| Units | Unit of measurement for the distance you defined. |
Example
Let’s say you’re working with a transportation dataset and need to create safety corridors around major highways. You have highway routes as polylines and want to create 3 mile buffer zones on both sides of each road for noise impact analysis.- Add a Buffer gem to your pipeline canvas.
- Attach an input that includes the highway routes as polylines in a
routescolumn. - Open the gem configuration interface.
- For Geometry column, select the
routescolumn from the input table. - For Distance, input
3. - For Units, select Miles.
- Save and run the gem.

