lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: Where did earthDiameter go?
Date Tue, 17 Jan 2017 18:43:58 GMT
I think the reason why there was no deprecation notice is that this code
was considered as internal code rather than something that we explicitly
expose to users as an API.

Le jeu. 12 janv. 2017 à 22:30, Chris Hostetter <hossman_lucene@fucit.org> a
écrit :

>
> I don't konw the rhyme/reason but it looks like it was removed (w/o
> any deprecation first i guess) as part of LUCENE-7123 in commit:
> ce3114233bdc45e71a315cb6ece64475d2d6b1d4
>
> in that commit, existing callers in the lucene code base were changed to
> use "2 * GeoProjectionUtils.SEMIMAJOR_AXIS"
>
> (once the jira outage is over you might find more info in the comments of
> that issue)
>
>
> : Date: Thu, 12 Jan 2017 12:00:31 +1100
> : From: Trejkaz <trejkaz@trypticon.org>
> : Reply-To: java-user@lucene.apache.org
> : To: Lucene Users Mailing List <java-user@lucene.apache.org>
> : Subject: Where did earthDiameter go?
> :
> : Hi.
> :
> : I don't know why, but we have some kind of esoteric logic in our own
> : code to simplify a circle on the Earth to a bounding box, clearly
> : something to do with computing geo queries.
> :
> :     double lonMin = -180.0, lonMax = 180.0;
> :     if (!closeToPole(latMin, latMax)) {
> :        double D = SloppyMath.earthDiameter(lat);
> :         double d = D * Math.sin((90.0 - lat) * Math.PI / 180.0); //
> : diameter of a disk formed by parallel at latitude = lat
> :        double kmPerLonDeg = Math.PI * d / 360.0;
> :         double distanceInLonDeg = distanceKm / kmPerLonDeg;
> :        lonMin = lon - distanceInLonDeg;
> :         lonMax = lon + distanceInLonDeg;
> :     }
> :
> : This SloppyMath.earthDiameter(latitude) method appears to be gone in
> : v6.3.0 but I don't see any mention of a replacement in the changelog.
> : Is there a replacement? Do I just slot in a constant and hope that
> : nobody notices? I mean, if the maths are supposed to be "sloppy"... :D
> :
> : TX
> :
> : ---------------------------------------------------------------------
> : To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> : For additional commands, e-mail: java-user-help@lucene.apache.org
> :
> :
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message