Skip to content

Support for geospatial functions #796

@lvca

Description

@lvca

New functions to create shapes:

  • point(<x>,<y>). Example: select point(10,10,20,20) as point
  • circle(<center-x>,<center-y>,<distance>). Example: select circle(10,10,10) as circle
  • rectangle(<top-x>,<top-y>,<bottom-x>,<bottom-y>). Example: select rectangle(10,10,20,20) as rectangle
  • lineString([ <point>* ]). Example: linestring( [ [10,10], [20,10], [20,20], [10,20], [10,10] ] )
  • polygon([ <point>* ]). Example: select polygon( [ point(10,10), point(20,10), point(20,20), point(10,20), point(10,10) ] ) as polygon and select polygon( [ [10,10], [20,10], [20,20], [10,20], [10,10] ] ) as polygon

New methods that work with shapes:

  • isWithin(). Example: select point(11,11).isWithin( circle(10,10,10) ) as isWithin
  • intersectsWith(). Example: select linestring( [ [10,10], [20,10], [20,20], [10,20], [10,10] ] ).intersectsWith( rectangle(10,10,20,20) ) as intersectsWith

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions