Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Tile38 – Realtime geofencing and geospatial index (github.com/tidwall)
130 points by tidwall on March 4, 2019 | hide | past | favorite | 24 comments



One thing I've found hard to find in Go is a library equivalent to GEOS/JTS; looks like there are some nice geometric operations bundled under https://github.com/tidwall/geojson


This is definitely a cool product. I've been thinking of building something like this for use in a game server backend.

Do you plan on adding height-support? I'm sure some clients in the professional space would like to know "what room/floor in this building are you in?"


I'm glad you like the product. Today it's possible to assign a Z coordinate to an object, which allows for querying on Lat/Lon and filtering on Z.


That's really cool! The only other optimization that I wanted to try and do was to use GPU acceleration to support huge numbers of shapes and entities. Something similar to what's described here [0]. I think it would really help for very very large numbers of entities or large complex geometry.

[0] - https://devblogs.nvidia.com/thinking-parallel-part-i-collisi...


I think JB originally added Z for zoom level for map tile zoom level, but (having done exactly this for some internal demos) you can totally abuse it for what you want and it works well. Tile38 is a really excellent geospatial database and a lovely codebase.

As for integrating GPU - look at Gorgonia's CU package by Xuanyi Chew that will give you ahead start from using CUDA from Go. Good luck.


The Z coord is a flexible field that can handle any numerical range. Zoom level, elevation, timestamp, etc.


I'm curious to know where one gets such "heigh-support" data from?


GPS gives you a 3D fix (lat/lon/height). A common use case in aviation, particularly drones, is avoiding controlled airspace. The height of controlled airspace varies with location - for example a rural area might be 7500ft while near an airport traffic zone it might be only 1000ft or lower.


GPS isn't too great in skyscrapers. In most current gen smartphones GPS can only really pin you to a 16ft resolution on a current gen smartphone in ideal conditions [0]. This gets worse indoors and if the target is moving.

[0] - https://www.gps.gov/systems/gps/performance/accuracy/


It wouldn’t necessarily need to come from GPS. You could use beacons (ble) or similar to augment the raw dataset.

https://estimote.com (etc)


For airspace it doesn't matter too much. Allowable Mode-C accuracy is something more than 100 feet (I think) to allow for poor sensors, and controllers simply add a buffer.


If I worked in the advertisement space I'd probably install WiFi networks that could broadcast SSIDs at known mac addresses that are coded to a height. I could install apps on user phones that could read that and pull out height & building name data.


I am just now digging a bit into IFTTT like event driven api pipelines (OS of course) and so the "Automated Events" section on tile38.com hit my attention - niiice!

I just today found this interesting project:

http://www.flogo.io/

and this seems to be a great fit! Very nice toolset!

NO, I am not affiliated, I just liked it. I tried several different things, Flogo seems to have hit a nice spot between "general, but not too generic tool" with easy extensibility but still good usability for gui experiences.

Adding an event capable mapping server to the toolbox triggers exciting ideas!

Thank you very much for making this fantastic project a present to the world! Great!


This is an amazing piece of software and thanks for creating this. We heavily use Tile38 for all our Geospatial needs in production.


You're welcome and thanks so much for kind words!


Hi ! Thanks for creating this project. This looks extremely usefu l for the current project I am working on.

Question : is it possible to do a Nearby query on a geohash ?


Hi! I recommend converting the target geohash to a lat lon first and then using the NEARBY command.

  NEARBY fleet HASH POINT lat lon
This will return back all points as geohashes.


Tile38 is a great product, we've been using it in production to track, and manage geofences for a large amount of asphalt and cement trucks :)


Sweet! I'd love to hear more about your implementation.


It's nothing too special, we collect positional information from several devices and feed it into Tile38 which then processes the geofences and delivers the enter/exit/inside notifications trough webhooks.

It's been rock-solid and easy to work with.


@tidwall: the link to maptiler.org in the readme is broken (it has bad certificate + asks for login & password)


Oh thanks! I just fixed it.


I wonder how much work it would be to integrate with Owntracks. It looks like Tile38 supports MQTT.


What does this give you beyond what nearest neighbor libraries like flannel already do?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: