Get LatLong from Pixels.
480124
public static LatLong fromPixelsWithScaleFactor(double pixelX, double pixelY, double scaleFactor, int tileSize) {
        return new LatLong(pixelYToLatitudeWithScaleFactor(pixelY, scaleFactor, tileSize),
                pixelXToLongitudeWithScaleFactor(pixelX, scaleFactor, tileSize));
    }
525624
def get_full_lonlats(self):
        
        if self.lons is not None and self.lats is not None:
            return self.lons, self.lats

        self.lons, self.lats = self._get_full_lonlats()
        self.lons = da.from_delayed(self.lons, dtype=self["EARTH_LOCATIONS"].dtype,
                                    shape=(self.scanlines, self.pixels))
        self.lats = da.from_delayed(self.lats, dtype=self["EARTH_LOCATIONS"].dtype,
                                    shape=(self.scanlines, self.pixels))
        return self.lons, self.lats
430895
function(moLonLat) {
        var lon = this.getLongitudeFromMapObjectLonLat(moLonLat);
        var lat = this.getLatitudeFromMapObjectLonLat(moLonLat);
        var res = this.map.getResolution();
        var extent = this.map.getExtent();
        return this.getMapObjectPixelFromXY((1/res * (lon - extent.left)),
                                            (1/res * (extent.top - lat)));
    }
1119480
def _load_GeoTransform(self):
        """"""
        def load_lon():
            return arange(ds.RasterXSize)*b[1]+b[0]

        def load_lat():
            return arange(ds.RasterYSize)*b[5]+b[3]
        ds = self.ds
        b = self.ds.GetGeoTransform()  # bbox, interval
        if with_dask:
            lat = Array(
                {('lat', 0): (load_lat,)}, 'lat', (self.ds.RasterYSize,),
                shape=(self.ds.RasterYSize,), dtype=float)
            lon = Array(
                {('lon', 0): (load_lon,)}, 'lon', (self.ds.RasterXSize,),
                shape=(self.ds.RasterXSize,), dtype=float)
        else:
            lat = load_lat()
            lon = load_lon()
        return Variable(('lat',), lat), Variable(('lon',), lon)
77844
def pixelToMap(pX, pY, geoTransform):
    
    pX = np.asarray(pX, dtype=float)
    pY = np.asarray(pY, dtype=float)
    pX += 0.5
    pY += 0.5
    mX, mY = applyGeoTransform(pX, pY, geoTransform)
    return mX, mY
1117219
def get_pixel(self, x, y):
        

        if x > 7 or x < 0:
            raise ValueError('X position must be between 0 and 7')

        if y > 7 or y < 0:
            raise ValueError('Y position must be between 0 and 7')

        pix = None

        with open(self._fb_device, 'rb') as f:
            map = self._pix_map[self._rotation]
            # Two bytes per pixel in fb memory, 16 bit RGB565
            f.seek(map[y][x] * 2)  # row, column
            pix = self._unpack_bin(f.read(2))

        return pix
692898
def pixel(self, coord_x, coord_y):
        # type: (int, int) -> Pixel
        

        try:
            return self.pixels[coord_y][coord_x]  # type: ignore
        except IndexError:
            raise ScreenShotError(
                "Pixel location ({}, {}) is out of range.".format(coord_x, coord_y)
            )
1216669
function pixelToLatitude (y, zoom) {
  var latRad = Math.atan(Math.sinh(Math.PI * (1 - 2 * y / zScale(zoom))))
  return toDegrees(latRad)
}
599799
public Point toPixels(LatLong in) {
        if (in == null || this.mapView.getWidth() <= 0 || this.mapView.getHeight() <= 0) {
            return null;
        }

        MapPosition mapPosition = this.mapView.getModel().mapViewPosition.getMapPosition();

        // this means somehow the mapview is not yet properly set up, see issue #308.
        if (mapPosition == null) {
            return null;
        }

        // calculate the pixel coordinates of the top left corner
        LatLong latLong = mapPosition.latLong;
        long mapSize = MercatorProjection.getMapSize(mapPosition.zoomLevel, this.mapView.getModel().displayModel.getTileSize());
        double pixelX = MercatorProjection.longitudeToPixelX(latLong.longitude, mapSize);
        double pixelY = MercatorProjection.latitudeToPixelY(latLong.latitude, mapSize);
        pixelX -= this.mapView.getWidth() >> 1;
        pixelY -= this.mapView.getHeight() >> 1;

        // create a new point and return it
        return new Point(
                (int) (MercatorProjection.longitudeToPixelX(in.longitude, mapSize) - pixelX),
                (int) (MercatorProjection.latitudeToPixelY(in.latitude, mapSize) - pixelY));
    }
773420
private static double deltaLat(double deltaPixel, double lat, byte zoom, int tileSize) {
        long mapSize = MercatorProjection.getMapSize(zoom, tileSize);
        double pixelY = MercatorProjection.latitudeToPixelY(lat, mapSize);
        double lat2 = MercatorProjection.pixelYToLatitude(pixelY + deltaPixel, mapSize);

        return Math.abs(lat2 - lat);
    }
1173908
def get_dpi():
    """"""

    def pxmm_2_dpi((pixels, length_mm)):
        return pixels * 25.6 / length_mm

    return map(pxmm_2_dpi, zip(wx.GetDisplaySize(), wx.GetDisplaySizeMM()))
269713
def get_coordinates(self, i, end=False):
        """"""
        if end:
            endpoint = self.endpoints[i][1]
        else:
            endpoint = self.endpoints[i][0]
        return (endpoint.real, endpoint.imag)
315236
def latlong(text):
    '''
    
    '''
    nlat, nlon = text.split(',')
    return (float(nlat), float(nlon))
14167
def _convert_latitude(self, latitude):
        """"""
        return int((180 - (180 / pi * log(tan(
            pi / 4 + latitude * pi / 360)))) * (2 ** self._zoom) * self._size / 360)
652576
def pixel_coord(self):
        
        return self.get_pixel_coordinates(self.reading.pix_coord, self.reading.get_ccd_num())
168845
def from_scene_coords(self, x=0, y=0):
        """"""
        matrix = self.get_matrix()
        matrix.invert()
        return matrix.transform_point(x, y)
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)