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); }
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()); }