2010/4/1 Grant Ingersoll

On Apr 1, 2010, at 8:22 AM, Helleringer, Nicolas w= rote:

I did put a comment on the jira issue pointin= g to the code I wrote inside Chris Male perspective.
He answered on the= JIRA topic as well.

Yep, saw t= hat. =A0If you wish for that code to be in Lucene, you need to post it as a= patch to Lucene and grant provenance to the ASF.
That is what we want to happen. We are workin= g on it, both of us.=A0
=A0
=
Here's another question:
Given the same latitude and same dista= nce, shouldn't there be the same number of box ids no matter the longit= ude? =A0Yet the following code says otherwise:
public void testCartesianP= olyFilterBuilder() throws Exception {
=A0=A0 =A0CartesianPolyFilt= erBuilder cpfb =3D new CartesianPolyFilterBuilder(CartesianTierPlotter.DEFA= LT_FIELD_PREFIX, 2, 15);
=A0=A0 =A0//try out some shapes
=A0=A0 =A0final double miles= =3D 20.0;
=A0=A0 =A0 =A0 =A0// Hawaii
=A0=A0 =A0 =A0 = =A0// 2300 miles to Marshall Island Airfield
=A0=A0 =A0//Hawaii t= o Midway is 911 miles
=A0=A0 =A0lat =3D 0;
=A0=A0 =A0lng =3D -179.9;
=A0=A0 =A0Shape shape;
= =A0=A0 =A0shape =3D cpfb.getBoxShape(lat, lng, miles);
=A0=A0 =A0= System.out.println("Tier: " + shape.getTierLevel());
= =A0=A0 =A0System.out.println("area: " + shape.getArea().size());<= /div>
=A0=A0 =A0lat =3D 30;
=A0=A0 =A0lng =3D -100;
=A0= =A0 =A0shape =3D cpfb.getBoxShape(lat, lng, miles);
=A0=A0 =A0Sys= tem.out.println("Tier: " + shape.getTierLevel());
=A0= =A0 =A0System.out.println("area: " + shape.getArea().size());

=A0=A0 =A0lat =3D 30;
=A0=A0 =A0lng =3D 100;<= /div>
=A0=A0 =A0shape =3D cpfb.getBoxShape(lat, lng, miles);
= =A0=A0 =A0System.out.println("Tier: " + shape.getTierLevel());
=A0=A0 =A0System.out.println("area: " + shape.getArea().s= ize());
=A0=A0}
=
-Grant

No.
The longitude has an effect because of the projection used to go from = a spherical world to a flat coordinates system.

You can clearly see that all longitude are not equals i= n terms of number of boxes.

You could ask why usin= g Sinusoidal projection ? Because it is does not have to =A0much distance d= istortion in populated places and it is very simple to calculate.

Hope it helps.

Nicolas
--000e0cd1b778baa8ee04832c931d--