regionator.cc
// Creates a NeworkLink object containing a region for the given pixel
// ranges.
Creates a NeworkLink object containing a region for the given pixel
ranges.
Creates a NeworkLink object containing a region for the given pixel ranges .
KmlNetworkLink Regionator::MakeNetworkLink(int x1, int y1,
                                           int x2, int y2) const {
  double north;
  double south;
  double east;
  double west;
  ComputeBoundingBox(x1, y1, x2, y2, &north, &south, &east, &west);
  string href = MakeFilenamePrefix(x1, y1, x2, y2) + ".kml";
  KmlLatLonAltBox lat_lon_alt_box;
  lat_lon_alt_box.north.set(north);
  lat_lon_alt_box.south.set(south);
  lat_lon_alt_box.east.set(east);
  lat_lon_alt_box.west.set(west);
  KmlLod lod;
  lod.min_lod_pixels.set(min_lod_pixels_);
  lod.max_lod_pixels.set(max_lod_pixels_);
  KmlRegion region;
  region.lat_lon_alt_box.set(lat_lon_alt_box);
  region.lod.set(lod);
  KmlLink link;
  link.href.set(href);
  KmlNetworkLink network_link;
  network_link.region.set(region);
  network_link.link.set(link);
  return network_link;
}
KmlNetworkLink Regionator :: MakeNetworkLink ( int x1 , int y1 , int x2 , int y2 ) const { double north ; double south ; double east ; double west ; ComputeBoundingBox ( x1 , y1 , x2 , y2 , & north , & south , & east , & west ) ; string href = MakeFilenamePrefix ( x1 , y1 , x2 , y2 ) + " " ; KmlLatLonAltBox lat_lon_alt_box ; lat_lon_alt_box . north . set ( north ) ; lat_lon_alt_box . south . set ( south ) ; lat_lon_alt_box . east . set ( east ) ; lat_lon_alt_box . west . set ( west ) ; KmlLod lod ; lod . min_lod_pixels . set ( min_lod_pixels_ ) ; lod . max_lod_pixels . set ( max_lod_pixels_ ) ; KmlRegion region ; region . lat_lon_alt_box . set ( lat_lon_alt_box ) ; region . lod . set ( lod ) ; KmlLink link ; link . href . set ( href ) ; KmlNetworkLink network_link ; network_link . region . set ( region ) ; network_link . link . set ( link ) ; return network_link ; }
Creates a NeworkLink object containing a region for the given pixel
ranges.
Creates a NeworkLink object containing a region for the given pixel ranges .
// NB: It is important to use max_lod_pixels = -1 so that the user won't // "fly under" the feature shown.  The value of max_lod_pixels was left as // an option for generality but should almost always be -1 for Super Overlays.