CreatePoint

 

Published: March 22, 2017

Updated: February 1, 2017

Returns a GeoJSON Point record. The result of a CreatePoint can be used as input to other Geospatial functions.

Syntax

CreatePoint (latitude, longitude)  

Latitude

Is the latitude of a geographic point, value must be float.

Longitude

Is the longitude of a geographic point, value must be float.

Returns a GeoJSON point record with Point as type and an array with latitude and longitude as coordinates.

 SELECT  
     CreatePoint(input.latitude, input.longitude)  
FROM input  
  

Input Example

latitudelongitude
3.0-10.2
-87.3320.2321

Output Example

{"type" : "Point", "coordinates" : [-10.2, 3.0]}

{"type" : "Point", "coordinates" : [20.2321, -87.33]}

Show: