u/jaakl

Country and land check tool using DGGS (triangles)

Country and land check tool using DGGS (triangles)

For many years I've thought of trying to solve some common geographical problems with a simple data-included library, so it does not require GIS knowledge, code or good data (which "normal developers" often dont have). Now I got finally some time (and proper coding tech) to implement and show something, it answers to primitive (but not that trivial to answer) questions: is a point on land, and which country it is? There are also polyline variants (as in given picture - gives % of given route in different countries). To optimize the data compression and calculation a special triangular grid T3grid DGGS is used.

For sure everyone here can do same easily with any GIS or GIS libraries, but this one is easier to use (just include one lib), no need to worry about data sourcing and it also works order of magnitude faster than some common GIS alternatives I tried. Benchmarks and interactive demos are included.

It is MIT license open source: trifold

Questions: maybe something like that already exists? Would you need it? Any adjacent use cases: maybe fast polyline matching, "find nearby", location anonymization? Frankly many of them are probably somewhat better with different grids, triangle is interesting but has its problems too.

u/jaakl — 13 days ago
▲ 1 r/gis

easy land/country point lookup

As the only "GIS person" in the office I get often "simple" questions like how to check easily if a lon/lat point is on land (e.g. if a route crosses sea/ocean, is interconttinental), or which country it falls in. Considering different accuracy classes of such polygons and nyances like country areas around sea it is not that trivial even with GIS tooks and knowledge.

Now my idea is to use a compact hierarchical grid to compress the needed dataset and make lookup fast without requiring special library stack, polygon downloads, maybe topological simplifications etc. And then package it as a self-contained simple library with methods like (lat,lng) -> isLand or (lat,lng) -> country

Now the technical questions: - any existing tools/projects like that - which grid approach seems reasonable - edge cases, maybe around coasts/borders - what benchmark comparisons would be fair (postgis, duckdb spatial, bigquery) - use cases outside app-developer convenience

Happy to share my working state repo (if allowed).

reddit.com
u/jaakl — 13 days ago