14 #ifndef DORTHOQUAD_H_UOFARIZONAVISION
15 #define DORTHOQUAD_H_UOFARIZONAVISION
20 #include <topo/master.h>
24 #include <boost/scoped_ptr.hpp>
83 boost::scoped_ptr< Temporary_Recursively_Removing_Directory > td;
86 static bool m_instantiated;
138 return m_instantiated;
180 enum { UNUSED = -1 };
191 Loc(
long l,
long t,
char z )
198 bool is_unused()
const
200 return UNUSED ==
left;
206 return left == that.left &&
top == that.top &&
zone == that.zone;
210 static Loc tile_nw_from_utm_center(
217 static_cast< long >( center.
x / tilesize_m - numtiles ),
218 static_cast< long >( center.
y / tilesize_m + numtiles ),
230 int num_tile_buf()
const;
233 int fillDoq(
const Loc&,
int );
236 void clearCache(
const Loc&,
int );
292 return m_current.zone;
297 size_t width()
const;
305 return ! m_current.is_unused();
310 kjb_c::Pixel
read_color(
unsigned,
unsigned )
const;
double x
easting of a location, meters
Definition: layer.h:36
int num_tiles_to_cover(int) const
Compute how many tiles are needed to cover X number of meters.
Definition: dorthoquad.cpp:574
Definition for the Int_matrix class, a thin wrapper on the KJB Int_matrix struct and its related func...
Contains definitions of basic TopoFusion data structures.
char zone
utm zone number of a location
Definition: layer.h:38
int refill(const pt &)
Like fill(), but force a download from the internet.
Definition: dorthoquad.cpp:628
const char * IVILAB_DOQ_TILE_CACHE_DIRECTORY
intentionally-long pathname to where we cache DOQ tiles at the lab.
Definition: dorthoquad.cpp:293
This class implements matrices, in the linear-algebra sense, restricted to integer-valued elements...
Definition: l_int_matrix.h:71
Int_matrix get_aerial_image(const pt &nw_corner, size_t width, size_t height)
return a matrix (like a monochrome image) of aerial imagery
Definition: dorthoquad.cpp:783
double y
northing of a location, meters
Definition: layer.h:37
long left() const
Return the "easting" coordinate of the left edge of the DOQ.
Definition: dorthoquad.cpp:639
size_t width() const
Return the east-west size of the image, in meters.
Definition: dorthoquad.cpp:657
pt make_pt(double eee, double nnn, char zzz, double elev=NO_ELEV)
construct a point from its parameters but not as a ctor.
Definition: layer.h:44
long top() const
Return the "northing" coordinate of the top edge of the DOQ.
Definition: dorthoquad.cpp:648
bool isReady() const
Returns true iff the array has been filled with image data.
Definition: dorthoquad.h:303
kjb_c::Pixel read_abs_color(long, long) const
Return color pixel at given UTM coordinates (zone assumed)
Definition: dorthoquad.cpp:736
static bool is_already_instantiated_elsewhere()
return whether the (singleton) object already exists
Definition: dorthoquad.h:136
bool is_using_a_temporary_cache() const
returns whether the cache is stored in a temporary directory.
Definition: dorthoquad.h:130
kjb_c::Pixel read_color(unsigned, unsigned) const
Read pixel RELATIVE TO current left,top settings (meters offset)
Definition: dorthoquad.cpp:699
unsigned char Pixel
a single pixel is a gray level 0-255
Definition: dorthoquad.h:173
Image get_topographic_map_detail(const pt &nw_corner, size_t width, size_t height)
return an image of a chunk of topographic map
Definition: dorthoquad.cpp:822
pt center() const
Return UTM coordinates of the center of the DOQ.
Definition: dorthoquad.h:321
DOrthoQuad(unsigned edge_length_pix=0)
Construct a digital orthoquad image buffer; must be square.
Definition: dorthoquad.cpp:354
~Tile_manager()
dtor closes the tile cache index, maybe deleting the index.
Definition: dorthoquad.cpp:337
bool operator==(const Int_matrix &op1, const Int_matrix::Impl_type &op2)
Test for exact equality between two matrices.
Definition: l_int_matrix.cpp:218
RAII wrappers on FILE* objects from stdio.h and other stdio helpers.
Pixel read(unsigned, unsigned) const
Read pixel RELATIVE TO current left,top settings (meters offset)
Definition: dorthoquad.cpp:692
const kjb::Image & debug_access_internal_image_buffer() const
access internal buffer, but with clunky name to discourage you
Definition: dorthoquad.h:327
size_t height() const
Return the north-south size of the image, in meters.
Definition: dorthoquad.cpp:663
Digital orthoquad buffer.
Definition: dorthoquad.h:169
Code for a wrapper class around the C struct KJB_Image.
Wrapped version of the C struct KJB_image.
Definition: i_image.h:76
char zone() const
return UTM zone for the DOQ (which must lie entirely in a zone).
Definition: dorthoquad.h:290
int as_matrix(Int_matrix *) const
represent DOQ as a matrix of integers: row 0, col 0 is northwest
Definition: dorthoquad.cpp:675
char select_tileset(char)
change the tileset "theme" – see themes in lib/topo/master.h
Definition: dorthoquad.cpp:361
float meters_per_pixel() const
retrieve the number of meters per pixel for chosen imagery theme
Definition: dorthoquad.cpp:750
Pixel read_abs(long, long) const
Return pixel at given UTM coordinates (zone assumed)
Definition: dorthoquad.cpp:718
definition for a TopoFusion pt
Definition: layer.h:34
RAII tool for opening and closing the DOQ master index.
Definition: dorthoquad.h:81
int fill(const pt &)
Fill the array with image data roughly around a given point.
Definition: dorthoquad.cpp:599