TG

Languages and libraries

geometry library

SHOW HN2023

201points
32comments
#277of 3,109 in 2023
Top 9%of 2023 by points

How HN took it

LovedMost comments that take a side are positive

7 positive, 12 neutral or asking, 1 mixed, 0 critical, out of 20 comments about the project. Thread score +0.20.

Idea: 4 for, 0 againstDocs: 3 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Excellent README and visualizations

    From 2 comments
    • This is a really great README - clearly explained the benefits of the library and anticipated all of my questions about it.
      simonw on HN
    • Nice library. +1 for the excellent visualizations [1]. Will you keep it focused on intersections or might you dabble with triangulation? [1]…
      hgs3 on HN
  • Useful for SQLite extension and WASM use

    From 2 comments
    • This looks really interesting. It implements pretty much the exact subset of geospatial stuff that I care about, in a single C file (an amalgamation that includes its…
      simonw on HN
    • Very nice! I wonder if I can compile this to wasm. I’ve been badly needing spatial predicates in a web environment that are faster and less clunky than JSTS. Does it assume a…
      Waterluvian on HN

Objections

  • Floating point robustness lacks exact predicates

    From 2 comments
    • Howdy, I work on S2 [1] so I have questions! How do you deal with polygons that cross the antimeridian? The indexing structure you've come up with seems very interesting. In…
      s2mcallis on HN
    • You might consider Shewchuk’s methods for robust geometric computations: https://www.cs.cmu.edu/~quake/robust.html There are more modern implementations available on GitHub, but…
      fastneutron on HN

Requests

  • Use Shewchuk robust predicates

    From 2 comments
    • You might consider Shewchuk’s methods for robust geometric computations: https://www.cs.cmu.edu/~quake/robust.html There are more modern implementations available on GitHub, but…
      fastneutron on HN
    • Howdy, I work on S2 [1] so I have questions! How do you deal with polygons that cross the antimeridian? The indexing structure you've come up with seems very interesting. In…
      s2mcallis on HN
  • Add comments and algorithm references to code

    From 1 comment
    • Also, "length" may have better be implemented using: https://en.cppreference.com/w/c/numeric/math/hypot It will be helpful, if you add comments discussing why certain functions…
      aquarin on HN

Questions

  • How are antimeridian-crossing polygons handled

    From 1 comment
    • Howdy, I work on S2 [1] so I have questions! How do you deal with polygons that cross the antimeridian? The indexing structure you've come up with seems very interesting. In…
      s2mcallis on HN
  • Is the library flat Cartesian or does it handle projections

    From 2 comments
    • Very nice! I wonder if I can compile this to wasm. I’ve been badly needing spatial predicates in a web environment that are faster and less clunky than JSTS. Does it assume a…
      Waterluvian on HN
    • TG isn't spherical and wasn't designed to be. It's 2D and projection agnostic. Crossing the antimeridian is a user problem to solve. I recommend following the GeoJSON rule of…
      tidwall on HN

Alternatives named

  • S2 geometry

    From 1 comment
    • Howdy, I work on S2 [1] so I have questions! How do you deal with polygons that cross the antimeridian? The indexing structure you've come up with seems very interesting. In…
      s2mcallis on HN
  • SpatiaLite

    From 1 comment
    • This looks really interesting. It implements pretty much the exact subset of geospatial stuff that I care about, in a single C file (an amalgamation that includes its…
      simonw on HN
  • JSTS

    From 1 comment
    • Very nice! I wonder if I can compile this to wasm. I’ve been badly needing spatial predicates in a web environment that are faster and less clunky than JSTS. Does it assume a…
      Waterluvian on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/37619100)