lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject [SPATIAL] CartesianPolyFilterBuilder ?
Date Wed, 31 Mar 2010 19:28:50 GMT
Anyone know what the point of this code is from the CartesianPolyFilterBuilder:

    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);


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)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message