gets the start and end points for a latitude line

@param north
@param south
@param zoom
@return
357712
protected double[] getStartEndPointsNS(double north, double south, int zoom) {
        //brute force when zoom is less than 10
        if (zoom < 10) {
            double sn_start_point = Math.floor(south);
            double incrementor = getIncrementor(zoom);


            double x = -90;
            while (x < sn_start_point)
                x = x + incrementor;
            sn_start_point = x;

            double sn_stop_point = Math.ceil(north);
            x = 90;
            while (x > sn_stop_point)
                x = x - incrementor;
            sn_stop_point = x;

            if (sn_stop_point > 90) {
                sn_stop_point = 90;
            }
            if (sn_start_point < -90) {
                sn_start_point = -90;
            }
            return new double[]{sn_start_point, sn_stop_point};
        } else {
            //hmm start at origin, add inc until we go too far, then back off, go to the next zoom level
            double sn_start_point = -90;
            if (south > 0) {
                sn_start_point = 0;
            }
            double sn_stop_point = 90;
            if (north < 0) {
                sn_stop_point = 0;
            }

            for (int xx = 2; xx <= zoom; xx++) {
                double inc = getIncrementor(xx);
                while (sn_start_point < south - inc) {
                    sn_start_point += inc;
                }

                while (sn_stop_point > north + inc) {
                    sn_stop_point -= inc;
                }
            }

            return new double[]{sn_start_point, sn_stop_point};
        }
    }
419205
def _get_bottom_line_coordinates(self):
        """"""

        rect_x, rect_y, rect_width, rect_height = self.rect

        start_point = rect_x, rect_y + rect_height
        end_point = rect_x + rect_width, rect_y + rect_height

        return start_point, end_point
893163
public JTSPointExpression<Point> endPoint() {
        if (endPoint == null) {
            endPoint = JTSGeometryExpressions.pointOperation(SpatialOps.END_POINT, mixin);
        }
        return endPoint;
    }
838936
public int[] GoogleTile( double lat, double lon, int zoom ) {
        double[] meters = LatLonToMeters(lat, lon);
        int[] tile = MetersToTile(meters[0], meters[1], zoom);
        return this.GoogleTile(tile[0], tile[1], zoom);
    }
1079575
public static final Direction getQuadrant(final double cx, final double cy, final double x0, final double y0)
    {
        if ((x0 > cx) && (y0 < cy))
        {
            return Direction.NORTH_EAST;
        }
        if ((x0 > cx) && (y0 >= cy))
        {
            return Direction.SOUTH_EAST;
        }
        if ((x0 <= cx) && (y0 >= cy))
        {
            return Direction.SOUTH_WEST;
        }
        // if( x0 <= c.getX() && y0 < c.getY() )
        return Direction.NORTH_WEST;
    }
557213
public long tileFeatureCount(LatLng latLng, int zoom) {
        Point point = new Point(latLng.longitude, latLng.latitude);
        long tileFeaturesCount = tileFeatureCount(point, zoom);
        return tileFeaturesCount;
    }
367921
public static BoundingBox getBoundingBox(int x, int y, int zoom) {

		int tilesPerSide = tilesPerSide(zoom);
		double tileWidthDegrees = tileWidthDegrees(tilesPerSide);
		double tileHeightDegrees = tileHeightDegrees(tilesPerSide);

		double minLon = -180.0 + (x * tileWidthDegrees);
		double maxLon = minLon + tileWidthDegrees;

		double maxLat = 90.0 - (y * tileHeightDegrees);
		double minLat = maxLat - tileHeightDegrees;

		BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat);

		return box;
	}
256817
function getMarkerLines(
  loc: NodeLocation,
  source: Array<string>,
  opts: Object,
): { start: number, end: number, markerLines: Object }
250868
public static ArrayList<Point2> getPoints(int startX, int startY, int endX, int endY) {
    final ArrayList<Point2> result = new ArrayList<Point2>();
    for (int y = startY; y < endY; y++) {
      for (int x = startX; x < endX; x++) {
        result.add(new Point2(x, y));
      }
    }
    return result;
  }
226777
function getPointOnBezier(startX, startY, cpX, cpY, endX, endY, distance){
    var bestT = 0;
    var bestAccuracy = 1000;
    var stepSize = 0.001;
    for(var t = 0; t<1; t+=stepSize){
      var currentPoint = getQuadraticCurvePoint(startX, startY, cpX, cpY,
          endX, endY, t);
      var currentDistance = getDistanceBetweenPoints(startX, startY,
          currentPoint.x, currentPoint.y);
      if(Math.abs(currentDistance-distance) < bestAccuracy){
        bestAccuracy = Math.abs(currentDistance-distance);
        bestT = t;
      }
    }
    return getQuadraticCurvePoint(startX, startY, cpX, cpY, endX, endY, bestT);
  }
896408
function(startPoint) {
            var orient = this.Tree().CONFIG.rootOrientation, point = {};

            if ( this.stackParentId ) { // return different end point if node is a stacked child
                if ( orient === 'NORTH' || orient === 'SOUTH' ) {
                    orient = 'WEST';
                }
                else if ( orient === 'EAST' || orient === 'WEST' ) {
                    orient = 'NORTH';
                }
            }

            // if pseudo, a virtual center is used
            if ( orient === 'NORTH' ) {
                point.x = (this.pseudo) ? this.X - this.Tree().CONFIG.subTeeSeparation/2 : this.X + this.width/2;
                point.y = (startPoint) ? this.Y + this.height : this.Y;
            }
            else if (orient === 'SOUTH') {
                point.x = (this.pseudo) ? this.X - this.Tree().CONFIG.subTeeSeparation/2 : this.X + this.width/2;
                point.y = (startPoint) ? this.Y : this.Y + this.height;
            }
            else if (orient === 'EAST') {
                point.x = (startPoint) ? this.X : this.X + this.width;
                point.y = (this.pseudo) ? this.Y - this.Tree().CONFIG.subTeeSeparation/2 : this.Y + this.height/2;
            }
            else if (orient === 'WEST') {
                point.x = (startPoint) ? this.X + this.width : this.X;
                point.y =  (this.pseudo) ? this.Y - this.Tree().CONFIG.subTeeSeparation/2 : this.Y + this.height/2;
            }
            return point;
        }
1006996
def for_latitude_longitude(cls, latitude, longitude, zoom):
        """"""
        point = Point.from_latitude_longitude(latitude=latitude, longitude=longitude)
        pixel_x, pixel_y = point.pixels(zoom=zoom)
        return cls.for_pixels(pixel_x=pixel_x, pixel_y=pixel_y, zoom=zoom)
201317
public List<InetAddress> getEndpoint(Range<Token> range)
    {
        return (List<InetAddress>) rangeMap.get(range);
    }
467755
@Pure
	public Point1d getNearestPosition(Point2D<?, ?> pos) {
		Point2d pp = null;
		final Vector2d v = new Vector2d();
		double currentPosition = 0.;
		double bestPosition = Double.NaN;
		double bestDistance = Double.POSITIVE_INFINITY;
		for (final Point2d p : points()) {
			if (pp != null) {
				double position = Segment2afp.findsProjectedPointPointLine(
						pos.getX(), pos.getY(),
						pp.getX(), pp.getY(),
						p.getX(), p.getY());
				if (position < 0.) {
					position = 0.;
				}
				if (position > 1.) {
					position = 1.;
				}
				v.sub(p, pp);
				final double t = v.getLength();
				v.scale(position);
				final double dist = Point2D.getDistanceSquaredPointPoint(
						pos.getX(),
						pos.getY(),
						pp.getX() + v.getX(),
						pp.getY() + v.getY());
				if (dist < bestDistance) {
					bestDistance = dist;
					bestPosition = currentPosition + v.getLength();
				}
				currentPosition += t;
			}
			pp = p;
		}
		if (Double.isNaN(bestPosition)) {
			return null;
		}
		return new Point1d(toSegment1D(), bestPosition, 0.);
	}
572769
def getAltitudeAtPoint(self, latty, longy):
        ''''''
        #check the bounds
        if self.startlongitude > 0 and (longy < self.startlongitude or longy > self.endlongitude):
            return -1
        if self.startlongitude < 0 and (longy > self.startlongitude or longy < self.endlongitude):
            return -1
        if self.startlatitude > 0 and (latty < self.startlatitude or longy > self.endlatitude):
            return -1
        if self.startlatitude < 0 and (latty > self.startlatitude or longy < self.endlatitude):
            return -1

        x = numpy.abs((latty - self.startlatitude)/self.deltalatitude)
        y = numpy.abs((longy - self.startlongitude)/self.deltalongitude)

        #do some interpolation
        # print("x,y", x, y)
        x_int = int(x)
        x_frac = x - int(x)
        y_int = int(y)
        y_frac = y - int(y)
        #print("frac", x_int, x_frac, y_int, y_frac)
        value00 = self.data[x_int, y_int]
        value10 = self.data[x_int+1, y_int]
        value01 = self.data[x_int, y_int+1]
        value11 = self.data[x_int+1, y_int+1]
        #print("values ", value00, value10, value01, value11)

        #check for null values
        if value00 == -99999:
            value00 = 0
        if value10 == -99999:
            value10 = 0
        if value01 == -99999:
            value01 = 0
        if value11 == -99999:
            value11 = 0

        value1 = self._avg(value00, value10, x_frac)
        value2 = self._avg(value01, value11, x_frac)
        value  = self._avg(value1,  value2, y_frac)

        return value
1295158
public double getLatitudeSpan() {
        if (this.mapView.getWidth() > 0 && this.mapView.getHeight() > 0) {
            LatLong top = fromPixels(0, 0);
            LatLong bottom = fromPixels(0, this.mapView.getHeight());
            return Math.abs(top.latitude - bottom.latitude);
        }
        throw new IllegalStateException(INVALID_MAP_VIEW_DIMENSIONS);
    }
1340608
function zoomCondition(zoom) {
    var zooms = [];
    for (var i = 0; i <= _carto2['default'].tree.Zoom.maxZoom; i++) {
        if (zoom & 1 << i) {
            zooms.push(i);
        }
    }

    var zoomRanges = detectZoomRanges(zooms),
        value,
        operator;
    if (zoomRanges.length > 1) {
        operator = 'IN';
        value = zooms;
    } else {
        var range = zoomRanges[0];
        if (range[0] === 0) {
            operator = '<=';
            value = range[1];
        } else if (range[1] === _carto2['default'].tree.Zoom.maxZoom) {
            operator = '>=';
            value = range[0];
        } else {
            // We're only handling >=, <= and IN right now
            operator = 'IN';
            value = zooms;
        }
    }

    if (value.length === 0) {
        return null;
    }
    return [{
        operator: operator,
        type: 'zoom',
        value: value
    }];
}