Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 00:15
    tidwall closed #524
  • 00:15
    tidwall commented #524
  • Jan 21 22:05
    KBassford opened #527
  • Jan 21 21:25
    KBassford edited #525
  • Jan 21 21:23
    KBassford edited #526
  • Jan 21 21:21
    KBassford edited #525
  • Jan 21 21:21
    KBassford opened #526
  • Jan 21 21:03
    KBassford opened #525
  • Jan 21 20:49
    KBassford opened #524
  • Jan 17 19:45
    tidwall commented #523
  • Jan 16 22:21
    brendanashworth opened #523
  • Jan 15 19:43
    tidwall commented #520
  • Jan 13 15:43
    mudit3774 commented #520
  • Jan 12 23:33
    maomaoaichiyu commented #522
  • Jan 10 23:53
    tidwall commented #522
  • Jan 10 12:58
    maomaoaichiyu edited #522
  • Jan 10 12:57
    maomaoaichiyu edited #522
  • Jan 10 12:55
    maomaoaichiyu edited #522
  • Jan 10 12:54
    maomaoaichiyu opened #522
  • Jan 03 08:02
    mudit3774 commented #520
Josh Baker
@/all Tile38 v1.9.1 is now available!
Justin Lowery

@tidwall Would you happen to know if there is a faster way to check if a point is within an inserted multipolygon than running (*collection).Intersects and passing in the point?

The question is probably wishful thinking, though I’m trying to find the quickest way to group some points by country/state to sort with.

I am currently using https://github.com/busrapidohq/world-countries-boundaries/tree/master/geojson/10m and am getting back under 150 points per second when running the intersect queries in parallel (using the collection package)

I probably just need to lower the resolution, though this seemed slow to the point that I’m doing something inefficiently given how the intersects method works and I figured that I would ask.

Josh Baker
@umpc It's possible that the slowness is due to the complexity of the multipolygon. Testing a single point on a mutlipolygon will perform a point in polygon operation over each polygon until it gets a hit. For a few simple rectangles this will be fast, but for country boundaries, not so much.
Justin Lowery
okay. thank you
Josh Baker
Perhaps a better way is to group the points in a reverse lookup like https://gist.github.com/tidwall/b99f633bb567c0fb679f1009347691b0
Justin Lowery
that is true, thanks. i am going to reduce memory to just what i am proccessing and will try something like that
Josh Baker

@/all I just pushed some big changes to the master branch that affect concurrency and performance, in a good way.


PING: 106945.43 requests per second
SET (point): 36893.82 requests per second
SET (rect): 32290.12 requests per second
SET (string): 40745.98 requests per second
GET (point): 61959.93 requests per second
GET (rect): 49814.28 requests per second
GET (string): 70695.00 requests per second
SEARCH (nearby 1km): 28368.35 requests per second
SEARCH (nearby 10km): 19525.70 requests per second
SEARCH (nearby 100km): 2870.19 requests per second


PING: 109488.29 requests per second
SET (point): 39637.93 requests per second
SET (rect): 35838.09 requests per second
SET (string): 44281.98 requests per second
GET (point): 86496.45 requests per second
GET (rect): 80139.81 requests per second
GET (string): 91467.89 requests per second
SEARCH (nearby 1km): 71347.51 requests per second
SEARCH (nearby 10km): 56508.02 requests per second
SEARCH (nearby 100km): 9779.66 requests per second

Testing and feedback is appreciated. Thanks!

Catalin Tudorache
Hey guys! I have a geofencing related question. I have multiple active static geofences, created with NEARBY and I want to get some info about the triggered geofence when any of them get triggered. All I get when a geofence is triggered is info about the point which triggers the geofence. Has anyone faced the same situation? Thanks
Josh Baker

@charlietango592 Hi Catalin and welcome! Only geofences created with a SETHOOK can provide additional information with each event such as the name of the hook. A geofence that is created without a SETHOOK, just a plain static NEARBY ... FENCE events do not provide any extra information about the origin of the geofence.

Perhaps as a workaround, since you can only have one static geofence per client connection perhaps you can create a unique name for that client/geofence at the application level prior to issuing the NEARBY ... FENCE command to the Tile38 server. Then when consuming the geofence events, modify the each event's JSON payload and add the client/geofence identifier before passing it on.

Though I can see how having an optional tag/identifier for static geofence would be very helpful.
Catalin Tudorache
Hi Josh!
Thanks for your reply! Actually I'm using the node API and I create multiple geofences
Yup, a tag (or adding custom fields like one can add for points) would be very helpful
Hello guys, i got a question about the match option, can we exclude some pattern or ids ?
SET toto 123abc POINT 1.2 1.2
SET toto 456dce POINT 1.2 1.2
NEARBY toto POINT 1.2 1.2 123
a command to do a query that don't match the id 123abc ?
I try this but it does not work
NEARBY toto match !(123abc) POINT 1.2 1.2 123
can you anyone share me the geofence notify nodejs example for multiple region
Josh Baker
Heads up 1.11.1 was recently released and includes some optimizations for large multipolygon support.
thanks Josh Baker
Pavel Makarenko
@tidwall hello. There were a long time I wasn't be able to run along with a project, any help needed, man? :)
Josh Baker
@m1ome Hey. It's been a while. I could always use a little help. :)
Josh Baker

@/all New Tile38 Slack channel


@tidwall slack invitation is expired !
@tidwall hello. You’re tile38 is incredible! I use package collection from tile38 for storing geoindex in memory of my app. I need to find the nearest polygon but the method nearby can’t put in on the first place in the list. Could you please tell me the work around?)
Ankush Mitra
Hi I have set a truck point and add speed=6..Now I created a webhook to see if the truck passed by fance or not but i am getting no reaponce
FSET fleet truck1 speed 16 wheels 8
SETHOOK warehouse http://localhost:9851/endpoint NEARBY fleet FENCE POINT 33.5123 -112.2693 50