This gem runs in the SQL warehouse.
Overview
Build spatial shapes from coordinate data by grouping and ordering points into either polygons (closed shapes) or polylines (open lines). Use this gem to convert raw latitude/longitude values into structured spatial geometries for mapping, analysis, or downstream geospatial operations.Prerequisites
- Add
ProphecyDatabricksSqlSpatialversion 0.0.3 or higher to your project.
Input and Output
The PolyBuild gem accepts the following input and output.Parameters
Configure the PolyBuild gem using the following parameters.- Sequence Polygon: Uses the
POLYGON()format to create a closed shape. - Sequence Polyline: Uses the
LINESTRING()format to create an open path.
Example
Assume you have the followingroutes table for public transportation routes.
- Add the PolyBuild gem to your pipeline canvas.
- Connect the
routestable to the PolyBuild input port. - Open the PolyBuild gem configuration.
- For Build Method, select Sequence Polyline.
- For Longitude Column Name, select the
longitudecolumn. - For Latitude Column Name, select the
latitudecolumn. - For Group Field, select the
route_idcolumn. - For Sequence Field, select the
stop_schedulecolumn. - Save and run the gem.

