예제 #1
0
  gcc_pure RasterLocation
  ProjectFine(const GeoPoint &location) const {
    const unsigned x = AngleToWidth(location.longitude) - left;
    const unsigned y = top - AngleToHeight(location.latitude);

    return RasterLocation(x, y);
  }
예제 #2
0
void
RasterProjection::Set(const GeoBounds &bounds,
                      unsigned width, unsigned height)
{
  x_scale = double(width) / bounds.GetWidth().Native();
  left = AngleToWidth(bounds.GetWest());

  y_scale = double(height) / bounds.GetHeight().Native();
  top = AngleToHeight(bounds.GetNorth());
}