You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Paweł Kordek <pa...@outlook.com> on 2017/08/23 08:31:13 UTC

Spatial search with arbitrary rectangle?

Hi All


I've been skimming through the spatial search docs and came across this section:


https://lucene.apache.org/solr/guide/6_6/spatial-search.html#SpatialSearch-Filteringbyanarbitraryrectangle


"Sometimes the spatial search requirement calls for finding everything in a rectangular area, such as the area covered by a map the user is looking at. For this case, geofilt and bbox won’t cut it. "


I can't understand what is meant here by the "rectangular area". What is the coordinate system of this rectangle? If we talk about the map, don't we have to consider what is the projection? Any help will be much appreciated.


Best regards

Paweł


Re: Spatial search with arbitrary rectangle?

Posted by David Smiley <da...@gmail.com>.
Hi,

The "rectangular area" refers to a hypothetical map UI.  In this scenario,
the UI ought to communicate the lat-lon of each corner.  The geofilt and
bbox query parsers don't handle that; they only take a point and distance.

RE projections: You may or may not need to care depending on exactly what
you're doing.  Most people by far don't need to care, I've found.
Basically:  If geo="true" on the spatial field (the default), then you work
in decimal degrees latitude,longitude.  Point-distance queries (i.e.
circles) use spherical geometry.  When geo="false", the units are whatever
you want them to be (there is no transformation; it's up to you to
transform them if needed), and a point-distance (circle) query is on the 2D
plane.  Other shapes (rectangles, line strings, polygons) use 2D Euclidean
geometry no matter if geo=true or false.

BTW sorry for my delayed response; I was on vacation.

~ David

On Wed, Aug 23, 2017 at 11:21 AM Paweł Kordek <pa...@outlook.com>
wrote:

> Hi All
>
>
> I've been skimming through the spatial search docs and came across this
> section:
>
>
>
> https://lucene.apache.org/solr/guide/6_6/spatial-search.html#SpatialSearch-Filteringbyanarbitraryrectangle
>
>
> "Sometimes the spatial search requirement calls for finding everything in
> a rectangular area, such as the area covered by a map the user is looking
> at. For this case, geofilt and bbox won’t cut it. "
>
>
> I can't understand what is meant here by the "rectangular area". What is
> the coordinate system of this rectangle? If we talk about the map, don't we
> have to consider what is the projection? Any help will be much appreciated.
>
>
> Best regards
>
> Paweł
>
> --
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com