calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Young <sy6...@gmail.com>
Subject Geo-Spatial Functions
Date Sun, 23 Apr 2017 19:46:09 GMT
Dear Devs,

I'm trying to implement the following functions from PostGIS in Calcite
using JTS. Two of the functions convert binary data from the column and
would usually be in the list of projections. The others are topological
boolean functions that would usually be in the list of selections. What is
the most straightforward and easy way to do this?




*Projections:| <ST_ASBINARY>,| <ST_ASTEXT>*

*Selections:*











*| <ST_DISTANCE>,| <ST_EQUALS>,| <ST_DISJOINT>,| <ST_INTERSECTS>,|
<ST_TOUCHES>,| <ST_CROSSES>,| <ST_OVERLAPS>,| <ST_CONTAINS>,| <ST_LENGTH>,|
<ST_AREA>,| <ST_CENTROID>*

*example query:*
*--DISTRICT table contains:*
*-- an ID primary key*
*-- a POLY **varbinary(4*1024*1024) field*
*--VOTER_HOME table contains:*
*-- an ID primary key*
*-- a VID foreign key for joining to a VOTER table*
*-- a POINT binary(21) field*
*SELECT D.ID <http://D.ID>, V.VID, ST_ASTEXT(D.POLY), ST_ASTEXT(V.POINT)*
*FROM DISTRICT D*
*INNER JOIN VOTER_HOME V ON ST_CONTAINS(D.POLY,V.POINT);--*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message