How to handle , Error parsing WKT: Invalid coordinate value '180' found at position

swapnilmd
New Contributor II

DBR Version- 16.2
spark.databricks.geo.st.enabled true

SQL Query I am running:

 

 

%sql
WITH points (
    SELECT st_astext(st_point(30D, 10D)) AS point_geom
    UNION SELECT st_astext(st_point(10D, 90D)) AS point_geom
    UNION SELECT st_astext(st_point(40D, 40D)) AS point_geom)
SELECT st_geoglength(st_astext(st_makeline(collect_list(st_geomfromtext(point_geom)))))
FROM points

 

 


Full Error :
[WKT_PARSE_ERROR] Error parsing WKT: Invalid coordinate value '90' found at position 21 SQLSTATE: 22023


How to handle this error, how can I make this geometry compatible with databricks' st_* functions?
Note: st_isvalid is true for above geometry