azist / azos

A to Z Sky Operating System / Microservice Chassis Framework
MIT License
214 stars 29 forks source link

GIS::Spatial Extensions Support #905

Open itadapter opened 9 months ago

itadapter commented 9 months ago

We need to add spatial/GIS support in the following areas:

g8sun commented 8 months ago

Meeting notes from today:


string: "567 Dur Fart Hiram Drive Woodlich NY 10210"

The strategy is matched on (forst,tree) tuple which handle the GIS APis:

API ByAddress(Forest, Tree,  {Address Line 1+2, City, State, Postal, Country}, radius: intkm, asOf, Caching) -> [] TreeNodes
API ByLatLng(Forest,Tree  LatLng, radius: intkm, asOf, Caching) -> [] TreeNodes

========================================================================================

TABLE IDX_GEO_POSTALINDEX
(
   PCODE1 CHAR(5),
   PCODE2 VARCHAR(7)
   G_NLOG BINARY(12) FK REF tbl_nodelog
   PK(PCODE1, PCODE2, G_NLOG)
)

TABLE IDX_GEO_HASH_MORONISTIC
(
   ID INT PK AUTOINCREMENT,--  
   GHASH  CHAR(6),
   G_NLOG BINARY(12), -------- FK REF tbl_nodelog,
//   PK(GHASH, G_NLOG)
)

index(IDX_GEO_HASH.GHASH  )

=================================
TABLE IDX_GEO_HASH
(
   G_NLOG BINARY(12) NOT NULL PK,   //   0:5:3749378  0 1 2 3 4
   ln SMALLINT UNSIGNED,            //   0:6:4678321  0 1 2      64K
   GHASH  CHAR(16),
   PK(G_NLOG, ln)
)

index(IDX_GEO_HASH.GHASH)