Does reality flicker?

Just as reality begins flickering a thin diagonal line from left-middle to top-middle in southwestern art’s kaleidoscoping peacock-colored pastels, a man in a beanie bangs my door harder than last…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




GeoQueries with elasticsearch

Elasticsearch is a powerful search engine and supports geo queries, but not everyone is used to work with spatial data. If you don’t know much about geoprocessing or wants to know about it with elasticsearch, this article is for you.

Not familiarized with elasticsearch? Check out my previous articles:

A geo distance query returns all documents that are up to a distance from a point, example:

Dolores wants to know everyone around 300 meters from her.

The red circle has a radius of 300 meters, we can see that only William is inside the circle.

Now, let’s create the documents with the location of William, Robert and Bernard.

The query should return just William’s document, just like we saw on Map 1.

If we expand the radius to 600 meters, we might be able to find Robert too.

A geo polygon query fetches the documents within a polygon.

It’s represented by a list of points. The closest path between two points is a straight line. A polygon starts and ends with the same point. Check the Botanical Garden polygon below on map 3.

Dolores wants to know everyone that’s inside Botanical Garden.

The query result should be something like this:

Add a comment

Related posts:

The Most Critical Detail A Freelancer Should Not Miss

I started freelancing as a Ghost Producer and Mix/Mastering Engineer on Fiver and was having fun until I received a 3 star which levelled me below the threshold for sending bids to buyers. 6 weeks…

The Alternate World.

How far we have come and how far we can go.. When my friend Jazzy shockingly asked me " are you alive ? We thought you are dead lisa" I asked "and how could you even think so ?" She said " coz you…

Women are not monolithic.

I am a 40-year-old single woman, with no children and I have never been married. I am neither a spinster or a victim of circumstance. I just have no desire for the pomp and circumstance of marriage…