/** * Given a point in x,y coordinate space, find the x,y index in the coordinate system. * * @deprecated use findXYindexFromCoord */ public int[] findXYCoordElement(double x_coord, double y_coord, int[] result) { return findXYindexFromCoord(x_coord, y_coord, result); }
/** * Given a point in x,y coordinate space, find the x,y index in the coordinate system. * * @deprecated use findXYindexFromCoord */ public int[] findXYCoordElement(double x_coord, double y_coord, int[] result) { return findXYindexFromCoord(x_coord, y_coord, result); }
/** * Given a point in x,y coordinate space, find the x,y index in the coordinate system. * * @deprecated use findXYindexFromCoord */ public int[] findXYCoordElement(double x_coord, double y_coord, int[] result) { return findXYindexFromCoord(x_coord, y_coord, result); }
/** * Given a lat,lon point, find the x,y index in the coordinate system. * * @param lat latitude position. * @param lon longitude position. * @param result put result in here, may be null * @return int[2], 0=x,1=y indices in the coordinate system of the point. These will be -1 if out of range. */ @Override public int[] findXYindexFromLatLon(double lat, double lon, int[] result) { Projection dataProjection = getProjection(); ProjectionPoint pp = dataProjection.latLonToProj(new LatLonPointImpl(lat, lon), new ProjectionPointImpl()); return findXYindexFromCoord(pp.getX(), pp.getY(), result); }
/** * Given a lat,lon point, find the x,y index in the coordinate system. * * @param lat latitude position. * @param lon longitude position. * @param result put result in here, may be null * @return int[2], 0=x,1=y indices in the coordinate system of the point. These will be -1 if out of range. */ @Override public int[] findXYindexFromLatLon(double lat, double lon, int[] result) { Projection dataProjection = getProjection(); ProjectionPoint pp = dataProjection.latLonToProj(new LatLonPointImpl(lat, lon), new ProjectionPointImpl()); return findXYindexFromCoord(pp.getX(), pp.getY(), result); }
/** * Given a lat,lon point, find the x,y index in the coordinate system. * * @param lat latitude position. * @param lon longitude position. * @param result put result in here, may be null * @return int[2], 0=x,1=y indices in the coordinate system of the point. These will be -1 if out of range. */ @Override public int[] findXYindexFromLatLon(double lat, double lon, int[] result) { Projection dataProjection = getProjection(); ProjectionPoint pp = dataProjection.latLonToProj(new LatLonPointImpl(lat, lon), new ProjectionPointImpl()); return findXYindexFromCoord(pp.getX(), pp.getY(), result); }