# Point location library

**URL:** <https://discourse.julialang.org/t/point-location-library/55606>\
**Category:** General Usage\
**Tags:** package, geometry, libgeos\
**Created:** [February 19, 2021, 7:29am UTC](https://discourse.julialang.org/t/point-location-library/55606 "2021-02-19T07:29:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [February 19, 2021, 7:29am UTC](https://discourse.julialang.org/t/point-location-library/55606/1 "2021-02-19T07:29:48Z")

</div>

Does anyone know, is there any Julia library for the [Point Location](https://en.wikipedia.org/wiki/Point_location) problem? My search gave nothing, only this [GEOS](http://geos.refractions.net/ro/doxygen_docs/html/classgeos_1_1algorithm_1_1PointLocator.html) functions, but it looks like they are not exposed in [LibGEOS.jl](https://github.com/JuliaGeo/LibGEOS.jl) package.

If there is no Julia package, maybe someone can direct me to good implementation in other languages (other than GEOS)? Because in such a case I want to try to implement it on my own and would like to compare it with the current “golden standard”.

---

<div class="post-metadata">

**Author:** ![bjdaig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjdaig/32/30781_2.png) [@bjdaig](https://discourse.julialang.org/u/bjdaig)\
**Post date:** [December 3, 2021, 1:36am UTC](https://discourse.julialang.org/t/point-location-library/55606/2 "2021-12-03T01:36:24Z")

</div>

This is a few months late, as I just joined. I don’t know of any existing packages in Julia, but I comment because I had to solve this myself as well. Depending on your exact needs, you may or may not need a “gold standard”. It also depends on what data structure you are using. Maybe my experience is of some help.

I wrote a Delaunay Triangulation routine back in 1995 in Fortran (believe it or not). I needed to build a triangular mesh from 3 meter DEM data over a large area, circle of radius 40 km. Back then, that much data wouldn’t even fit in memory, so I also had to devise some sort of thinning algorithm (decimation, I called it) to reduce the density of points as you go further out from the centre.

If you are at all serious about writing your own code for this, I highly recommend Donald Knuth’s text called “The Standard Graphbase - A Platform for Combinatorial Computing”, 1994. The code is probably still available. I don’t know if anyone has build wrappers for it. His code is in C, but he used his CWEB system of literate programming, so you have to get a bit familiar with the CWeave and Tangle programs to compile the code. Yet another interesting system with which Knuth was way ahead of his time.

---

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [December 3, 2021, 11:31am UTC](https://discourse.julialang.org/t/point-location-library/55606/3 "2021-12-03T11:31:28Z")

</div>

Oh, I wrote my own implementation long time ago [https://github.com/Arkoniak/TimeZoneLookup.jl](https://github.com/Arkoniak/TimeZoneLookup.jl) I havn’t registered it yet, since it requires proper documentation and I was too lazy to do it. It is based on trapezoidal search and super fast, if I remember correctly, it was like 100ns per request.
