lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Bell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-2125) Spatial filter is not accurate
Date Wed, 22 Sep 2010 14:32:36 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913572#action_12913572
] 

Bill Bell commented on SOLR-2125:
---------------------------------

Another reference:

I like the pointInPolygon() idea from Microsoft. I do not like that they don't have a short-cut
to reduce the shapes like what we have implemented. But their looping to make sure the distance
is being satisfied is good.... See below.

http://msdn.microsoft.com/en-us/library/cc451895.aspx

As follow-up, I would take my patch apply it, and then loop through the results to limit by
hsin() distance to make sure the results are not on the 45 degree.... I also would make this
2nd step optional, since it slows things down, and for most applications they don't need to
be that precise. (SInce you order by hsin() desc - the large distances if there are any will
be at the bottom and inconsequential).

> Spatial filter is not accurate
> ------------------------------
>
>                 Key: SOLR-2125
>                 URL: https://issues.apache.org/jira/browse/SOLR-2125
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.5
>            Reporter: Bill Bell
>            Assignee: Grant Ingersoll
>         Attachments: Distance.diff, SOLR-2125.patch, solrspatial.xlsx
>
>
> The calculations of distance appears to be off.
> Note: "The radius of the sphere to be used when calculating distances on a sphere (i.e.
haversine). Default is the Earth's mean radius in kilometers (see org.apache.solr.search.function.distance.Constants.EARTH_MEAN_RADIUS_KM)
which is set to 3,958.761458084784856. Most applications will not need to set this."
> The radius of the earth in KM is  6371.009 km (≈3958.761 mi).
> Also filtering distance appears to be off - example data:
> 45.17614,-93.87341 to 44.9369054,-91.3929348 Approx 137 miles Google. 169 miles = 220
kilometers
> http://....../solr/select?fl=*,score&start=0&rows=10&q={!sfilt%20fl=store_lat_lon}&qt=standard&pt=44.9369054,-91.3929348&d=280&sort=dist(2,store,vector(44.9369054,-91.3929348))
asc 
> Nothing shows. d=285 shows results. This is off by a lot.
> Bill

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message