If a point is inside the image true is returned if its value is not zero, otherwise false is returned.
169542
public static boolean getF(GrayU8 image, int x, int y) {
		if (image.isInBounds(x, y)) {
			return image.get(x, y) != 0;
		} else {
			return false;
		}
	}
856259
function inside(point, vs) {
  // ray-casting algorithm based on
  // http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html

  var x = point.x,
    y = point.y;

  var inside = false;
  for (var i = 0, j = vs.length - 1; i < vs.length; j = i++) {
    var xi = vs[i].x,
      yi = vs[i].y;
    var xj = vs[j].x,
      yj = vs[j].y;

    var intersect =
      yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi;
    if (intersect) inside = !inside;
  }

  return inside;
}
1305226
protected static boolean checkMax(ImageBorder_F32 inten, float bestScore, int c_x, int c_y) {
		for( int y = c_y -1; y <= c_y+1; y++ ) {
			for( int x = c_x-1; x <= c_x+1; x++ ) {
				if( inten.get(x,y) >= bestScore ) {
					return false;
				}
			}
		}
		return true;
	}
1002328
public static boolean isBlack(BufferedImage image, int x, int y) {
        if (image.getType() == BufferedImage.TYPE_BYTE_BINARY) {
            WritableRaster raster = image.getRaster();
            int pixelRGBValue = raster.getSample(x, y, 0);
            return pixelRGBValue == 0;
        }

        int luminanceValue = 140;
        return isBlack(image, x, y, luminanceValue);
    }
611473
function(point) {
        var result = false;

        if (point) {
            result =
                this.x === point.x &&
                this.y === point.y;
        }

        return result;
    }
1110298
@Pure
	boolean containsControlPoint(Point3D p) {
		double x, y, z;
		for(int i=0; i<this.numCoordsProperty.get();) {
			x = this.coordsProperty[i++].get();
			y = this.coordsProperty[i++].get();
			z = this.coordsProperty[i++].get();
			if (x==p.getX() && y==p.getY() && z==p.getZ()) {
				return true;
			}
		}
		return false;
	}
574072
def isInside(self, point, tol=0.0001):
        
        poly = self.polydata(True)
        points = vtk.vtkPoints()
        points.InsertNextPoint(point)
        pointsPolydata = vtk.vtkPolyData()
        pointsPolydata.SetPoints(points)
        sep = vtk.vtkSelectEnclosedPoints()
        sep.SetTolerance(tol)
        sep.CheckSurfaceOff()
        sep.SetInputData(pointsPolydata)
        sep.SetSurfaceData(poly)
        sep.Update()
        return sep.IsInside(0)
611118
function(x, y) {
        var imageData = this._context.getImageData(x, y, 1, 1);
        var data = imageData.data;
        return data[3] === 0;
    }
1345850
function(points, bbox) {
        for (var i = 0; i < points.length; i++) {
            if (this.bboxContainsPoint(points[i], bbox))
                return true;
        }
        return false;
    }
451137
def contains(self, pt):
        ""
        if isinstance(pt, Point):
            ptx, pty = pt.x, pt.y
            assert (self.spatialReference is None or \
                    self.spatialReference.wkid is None) or \
                    (pt.spatialReference is None or \
                     pt.spatialReference.wkid is None) or \
                   self.spatialReference == pt.spatialReference, \
                   "Spatial references do not match."
        else:
            ptx, pty = pt
        in_shape = False
        # Ported nearly line-for-line from the Javascript API
        for ring in self._json_rings:
            for idx in range(len(ring)):
                idxp1 = idx + 1
                if idxp1 >= len(ring):
                    idxp1 -= len(ring)
                pi, pj = ring[idx], ring[idxp1]
                # Divide-by-zero checks
                if (pi[1] == pj[1]) and pty >= min((pi[1], pj[1])):
                    if ptx >= max((pi[0], pj[0])):
                        in_shape = not in_shape
                elif (pi[0] == pj[0]) and pty >= min((pi[0], pj[0])):
                    if ptx >= max((pi[1], pj[1])):
                        in_shape = not in_shape
                elif (((pi[1] < pty and pj[1] >= pty) or 
                     (pj[1] < pty and pi[1] >= pty)) and 
                    (pi[0] + (pty - pi[1]) / 
                     (pj[1] - pi[1]) * (pj[0] - pi[0]) < ptx)):
                    in_shape = not in_shape
        return in_shape
956234
public static boolean isPointInsideView(float x, float y, View view) {
        int location[] = new int[2];
        view.getLocationOnScreen(location);
        int viewX = location[0];
        int viewY = location[1];

        //point is inside view bounds
        if ((viewX < x && x < (viewX + view.getWidth())) &&
                (viewY < y && y < (viewY + view.getHeight()))) {
            return true;
        } else {
            return false;
        }
    }
1291191
def get(self, point):
        
        if not (isinstance(point, GeoVector) and point.type == 'Point'):
            raise TypeError('expect GeoVector(Point), got %s' % (point,))

        target = self.to_raster(point)
        return self.image[:, int(target.y), int(target.x)]
36947
def inside(self, x, y):
        
        return 0 <= x < self.width and 0 <= y < self.height
229514
def is_point(nc, variable):
    '''
    
    '''
    # x(o), y(o), z(o), t(o)
    # X(o)

    dims = nc.variables[variable].dimensions

    cmatrix = coordinate_dimension_matrix(nc)
    first_coord = None
    if 't' in cmatrix:
        first_coord = cmatrix['t']
        if len(cmatrix['t']) > 1:
            return False
    if 'x' in cmatrix:
        if first_coord is None:
            first_coord = cmatrix['x']
        if first_coord != cmatrix['x']:
            return False
        if len(cmatrix['x']) > 1:
            return False
    if 'y' in cmatrix:
        if first_coord is None:
            first_coord = cmatrix['y']
        if first_coord != cmatrix['y']:
            return False
        if len(cmatrix['y']) > 1:
            return False
    if 'z' in cmatrix:
        if first_coord is None:
            first_coord = cmatrix['z']
        if first_coord != cmatrix['z']:
            return False
        if len(cmatrix['z']) > 1:
            return False
    if first_coord and dims != first_coord:
        return False
    # Point is indistinguishable from trajectories where the instance dimension
    # is implied (scalar)
    traj_ids = nc.get_variables_by_attributes(cf_role="trajectory_id")
    if traj_ids:
        return False

    return True
974426
function(x,y) {
      var ctxt = this.getContext();
	   var imgData = ctxt.getImageData(x,y,1,1);
	   var pixel = imgData.data;
	   return !( pixel[0] === 0 && pixel[1] === 0 && pixel[2] === 0 && pixel[3] === 0 );
   }
548858
def image_corner(self, corner):
        """"""
        if corner not in self.corner_types():
            raise GeoRaster2Error('corner %s invalid, expected: %s' % (corner, self.corner_types()))

        x = 0 if corner[1] == 'l' else self.width
        y = 0 if corner[0] == 'u' else self.height
        return Point(x, y)
46822
def compare_pointer(self, data):
        '''
        
        '''
        if self.old_pointed != data:
            self.old_pointed = data
            return True
        return False