Skip to main content
This gem runs in .

Overview

Use the CreatePoint gem to convert longitude and latitude coordinates into geographic points.
The gem has a corresponding interactive gem example. See Interactive gem examples to learn how to run sample pipelines for this and other gems.

Prerequisites

  • Add ProphecyDatabricksSqlSpatial version 0.0.1 or higher to your project.

Input and Output

The CreatePoint gem accepts the following input and output.

Parameters

The CreatePoint gem accepts longitude and latitude columns as parameters. In the Create Spatial Points section, you need to Click to Add a Point. For each point you add, fill in the following information.

Example

Assume you have the following airline route table.
Scroll horizontally to view the full table.
To convert the start and destination coordinates into geographic points:
  1. Create the first column pairing:
    1. Click Add a Point.
    2. For Longitude Column Name, select the start_long column.
    3. For Latitude Column Name, select the start_lat column.
    4. For the Target Column Name, type source_point.
  2. Create another column pairing:
    1. Click Add a Point.
    2. For Longitude Column Name, select the destination_long column.
    3. For Latitude Column Name, select the destination_lat column.
    4. For the Target Column Name, type dest_point.

Result

The CreatePoint gem will produce the following output with two new columns: source_point and dest_point.
Scroll horizontally to view the full table.