lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helleringer, Nicolas" <nicolas.hellerin...@novacodex.net>
Subject Re: [SPATIAL] CartesianPolyFilterBuilder ?
Date Wed, 31 Mar 2010 22:08:05 GMT
I do.

It is clearly related to prime meridian handling but it is unreadable and
buggy.

I did a complete rewrite of this sector of code commited to Chris Male
repository (working together to rework the whole thing).

Commit of this work should be done by Chris very soon.

Hope it will help.

Nicolas

2010/3/31 Grant Ingersoll <gsingers@apache.org>

> Anyone know what the point of this code is from the
> CartesianPolyFilterBuilder:
>
> <code>
>    shape = getShapeLoop(shape, ctp, latX, longX, latY, longY);
>    if (longX2 != 0.0) {
>      if (longX2 != 0.0) {
>        if (longX == 0.0) {
>          longX = longX2;
>          longY = 0.0;
>          shape = getShapeLoop(shape, ctp, latX, longX, latY, longY);
>        } else {
>          longX = longX2;
>          longY = -180.0;
>          shape = getShapeLoop(shape, ctp, latY, longY, latX, longX);
>        }
>      }
>
> </code>
>
> Why the double check on longX2?  I think it's trying to get at edge cases
> (based on earlier statements to do with prime meridian and the 180
> longitude.
>
> Also, I see the following comment:
> double startY = beginAt - startX ; //should give a whole number
>
> Yet, in debugging, I don't see how it is ever a whole number, b/c, AIUI,
> the left side of the decimal of a box number is the X value (latitude) and
> the right side of the decimal is the Y value.
>
> FWIW, I'm testing how all this tile stuff behaves across the 180th degree
> longitude (and it doesn't seem to be behaving well)
>
> -Grant
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

Mime
View raw message