apache / apache/sedona-db

epic: st function coverage

Open
#174 14 comments 5 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
Rust
Stars
503
Forks
61
Avg merge
2d 5h
Merged PRs (30d)
91

Description

This document outlines the ST functions implemented in the latest version of SedonaDB. Feel free to create PRs to add support for more ST functions!

The full list is from SedonaSpark: https://sedona.apache.org/latest/api/sql/Function/

Note that this list might not be up-to-date! Check https://sedona.apache.org/sedonadb/latest/reference/sql/ before implementing a function to make sure it hasn't been implemented yet (and let us know if it isn't up to date!)

## Constructor Functions

- [x] ST_GeogPoint (v0.2)
- [x] ST_GeogFromWKB (v0.2)
- [x] ST_GeogFromWKT (v0.2)
- [x] ST_GeomCollFromText (#205)
- [x] ST_GeomFromEWKB
- [x] ST_GeomFromEWKT
- [ ] ST_GeomFromGML
- [ ] ST_GeomFromGeoHash
- [ ] ST_GeomFromGeoJSON
- [ ] ST_GeomFromKML
- [x] ST_GeomFromText (alias for ST_GeomFromWKT) (v0.1)
- [x] ST_GeomFromWKB (v0.1)
- [x] ST_GeomFromWKT (v0.1)
- [x] ST_GeometryFromText (#200)
- [x] ST_LineFromText (#205)
- [ ] ST_LineFromWKB (#206)
- [x] ST_LineStringFromText (#205)
- [ ] ST_LinestringFromWKB (#206)
- [ ] ST_MakeEnvelope
- [x] ST_MLineFromText (#205)
- [x] ST_MPointFromText (#205)
- [x] ST_MPolyFromText (#205)
- [ ] ST_MakePoint
- [ ] ST_MakePointM
- [x] ST_Point (v0.1)
- [ ] ST_PointFromGeoHash
- [x] ST_PointFromText (#205)
- [x] ST_PointZ (v0.1)
- [x] ST_PointM (v0.1)
- [x] ST_PointZM (v0.1)
- [ ] ST_PointFromWKB (#206)
- [ ] ST_PolygonFromEnvelope
- [x] ST_PolygonFromText (#205)

## Geometry Functions

- [ ] GeometryType
- [ ] ST_3DDistance
- [ ] ST_AddMeasure
- [ ] ST_AddPoint
- [x] ST_Affine
- [ ] ST_Angle
- [x] ST_Area (v0.1)
- [ ] ST_AreaSpheroid
- [x] ST_AsBinary (v0.1)
- [x] ST_AsEWKB
- [x] ST_AsEWKT
- [x] ST_AsGeoJSON
- [ ] ST_AsGML
- [ ] ST_AsHEXEWKB
- [ ] ST_AsKML
- [x] ST_AsText (v0.1)
- [x] ST_Azimuth (v0.2)
- [ ] ST_BestSRID
- [ ] ST_BinaryDistanceBandColumn
- [x] ST_Boundary (v0.2)
- [ ] ST_BoundingDiagonal
- [x] ST_Buffer (v0.1)
- [ ] ST_BuildArea
- [x] ST_Centroid (v0.1)
- [x] ST_ClosestPoint (v0.2)
- [x] ST_Collect (v0.1)
- [ ] ST_CollectionExtract
- [ ] ST_ConcaveHull
- [x] ST_ConvexHull (v0.2)
- [ ] ST_CoordDim
- [ ] ST_CrossesDateLine
- [x] ST_CRS (v0.2)
- [ ] ST_DBSCAN
- [ ] ST_Degrees
- [ ] ST_DelaunayTriangles
- [x] ST_Difference (v0.1)
- [x] ST_Dimension (v0.1)
- [x] ST_Distance (v0.1)
- [ ] ST_DistanceSphere
- [ ] ST_DistanceSpheroid
- [x] ST_Dump (v0.2)
- [ ] ST_DumpPoints
- [x] ST_EndPoint (v0.2)
- [x] ST_Envelope (v0.1)
- [ ] ST_Expand
- [ ] ST_ExteriorRing
- [x] ST_FlipCoordinates (v0.1)
- [ ] ST_Force_2D
- [x] ST_Force2D
- [x] ST_Force3D
- [x] ST_Force3DM
- [x] ST_Force3DZ
- [x] ST_Force4D
- [ ] ST_ForceCollection
- [ ] ST_ForcePolygonCCW
- [ ] ST_ForcePolygonCW
- [ ] ST_ForceRHR
- [ ] ST_FrechetDistance (v0.1)
- [ ] ST_GeneratePoints
- [ ] ST_GeoHash
- [ ] ST_GeometricMedian
- [x] ST_GeometryN (v0.2)
- [x] ST_GeometryType (v0.1)
- [ ] ST_GLocal
- [ ] ST_H3CellDistance
- [ ] ST_H3CellIDs
- [ ] ST_H3KRing
- [ ] ST_H3ToGeom
- [x] ST_HasM (v0.1)
- [x] ST_HasZ (v0.1)
- [x] ST_HausdorffDistance
- [x] ST_InteriorRingN
- [ ] ST_InterpolatePoint
- [x] ST_Intersection (v0.1)
- [x] ST_IsClosed (v0.2)
- [x] ST_IsCollection
- [x] ST_IsEmpty (v0.1)
- [ ] ST_IsPolygonCCW
- [ ] ST_IsPolygonCW
- [x] ST_IsRing (v0.2)
- [x] ST_IsSimple (v0.2)
- [x] ST_IsValid (v0.2)
- [ ] ST_IsValidDetail
- [x] ST_IsValidReason (v0.2)
- [ ] ST_IsValidTrajectory
- [ ] ST_LabelPoint
- [x] ST_Length (v0.1)
- [ ] ST_Length2D
- [ ] ST_LengthSpheroid
- [ ] ST_LineFromMultiPoint
- [x] ST_LineInterpolatePoint (v0.2)
- [x] ST_LineLocatePoint (v0.2)
- [ ] ST_LineMerge
- [ ] ST_LineSegments
- [ ] ST_LineSubstring
- [ ] ST_LocalOutlierFactor
- [ ] ST_LocateAlong
- [ ] ST_LongestLine
- [x] ST_M (v0.1)
- [x] ST_MMax (v0.1)
- [x] ST_MMin (v0.1)
- [x] ST_MakeLine (v0.1)
- [ ] ST_MakePolygon
- [x] ST_MakeValid (v0.2)
- [ ] ST_MaximumInscribedCircle
- [x] ST_MaxDistance (v0.1)
- [x] ST_MinimumClearance (v0.2)
- [x] ST_MinimumClearanceLine (v0.2)
- [ ] ST_MinimumBoundingCircle
- [ ] ST_MinimumBoundingRadius
- [ ] ST_Multi
- [ ] ST_NDims
- [x] ST_Normalize
- [x] ST_NPoints (v0.2)
- [x] ST_NRings
- [x] ST_NumGeometries (v0.2)
- [ ] ST_NumInteriorRing
- [x] ST_NumInteriorRings
- [ ] ST_NumPoints
- [x] ST_Perimeter (v0.1)
- [ ] ST_Perimeter2D
- [x] ST_PointN (v0.2)
- [ ] ST_PointOnSurface
- [x] ST_Point (v0.1)
- [x] ST_Points (v0.2)
- [ ] ST_Polygon
- [x] ST_Polygonize (v0.2)
- [ ] ST_Project
- [ ] ST_ReducePrecision
- [ ] ST_RemovePoint
- [ ] ST_RemoveRepeatedPoints
- [x] ST_Reverse (v0.2)
- [ ] ST_Rotate
- [ ] ST_RotateX
- [ ] ST_RotateY
- [x] ST_SetCRS (v0.2)
- [ ] ST_S2CellIDs
- [ ] ST_S2ToGeom
- [x] ST_Scale
- [ ] ST_ScaleGeom
- [ ] ST_SetPoint
- [x] ST_SetSRID (v0.1)
- [ ] ST_ShiftLongitude
- [x] ST_Simplify (v0.2)
- [ ] ST_SimplifyPolygonHull
- [x] ST_SimplifyPreserveTopology (v0.2)
- [ ] ST_SimplifyVW
- [x] ST_Snap (v0.2)
- [ ] ST_Split
- [x] ST_SRID (v0.1)
- [x] ST_StartPoint (v0.2)
- [ ] ST_SubDivide
- [ ] ST_SubDivideExplode
- [x] ST_SymDifference (v0.1)
- [x] ST_Transform (v0.1)
- [x] ST_Translate (v0.2)
- [ ] ST_TriangulatePolygon
- [x] ST_UnaryUnion (v0.2)
- [x] ST_Union (v0.1)
- [ ] ST_VoronoiPolygons
- [ ] ST_WeightedDistanceBandColumn
- [x] ST_X (v0.1)
- [x] ST_XMax (v0.1)
- [x] ST_XMin (v0.1)
- [x] ST_Y (v0.1)
- [x] ST_YMax (v0.1)
- [x] ST_YMin (v0.1)
- [x] ST_Z (v0.1)
- [x] ST_ZMax (v0.1)
- [x] ST_ZMin (v0.1)
- [x] ST_Zmflag (v0.2)

## Predicate Functions

- [x] ST_Contains (v0.1)
- [x] ST_Covers (v0.1)
- [x] ST_CoveredBy (v0.1)
- [x] ST_Crosses (v0.2)
- [x] ST_Disjoint (v0.1)
- [x] ST_DWithin (v0.1)
- [x] ST_Equals (v0.1)
- [x] ST_Intersects (v0.1)
- [ ] ST_OrderingEquals
- [x] ST_Overlaps (v0.2)
- [x] ST_Relate
- [ ] ST_RelateMatch
- [x] ST_Touches (v0.1)
- [x] ST_Within (v0.1)

## Aggregate Functions

- [x] ST_Analyze_Agg (v0.1)
- [x] ST_Collect_Agg (v0.2)
- [x] ST_Envelope_Agg (v0.1)
- [x] ST_Intersection_Agg (v0.1)
- [x] ST_Polygonize_Agg (v0.2)
- [x] ST_Union_Agg (v0.1)

## Advanced Functions

- [x] ST_KNN (v0.1)

Contributor guide

Open the contributing guide

Research direction

Compare the unchecked functions in this issue with the SedonaDB SQL reference, using the SedonaSpark function list as a broader checklist. Choose one function whose support is not already implemented, then inspect the existing Rust implementation patterns and related coverage before starting. Done means the selected ST function is supported, covered by appropriate tests, and marked complete here.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.