\n";
echo "\n";
echo "\n";
echo " Raster\n";
echo " 1\n";
}
function WriteFooter() {
echo "\n";
echo "";
}
function DeltaLon($current_range_lon) {
global $earth_radius;
global $lat;
$delta_lon = rad2deg(asin($current_range_lon/(2*$earth_radius*(cos(deg2rad($lat))))));
return $delta_lon;
}
function DeltaLat($current_range_lat) {
global $earth_radius;
$delta_lat = rad2deg(asin($current_range_lat/(2*$earth_radius)));
return $delta_lat;
}
function WritePoint($x, $y) {
global $google_croppixel;
global $google_overrange;
global $count;
global $lon;
global $lat;
global $ran;
global $vep;
global $hop;
global $ovl;
$range_lon = $ran; // The width of field is given by the user. The height of field
// ... has to be calculated from the user's monitor parameters.
$range_lat = (( $vep - $google_croppixel ) / $hop ) * $range_lon;
$current_centerpoint_lon = round($lon + DeltaLon($x * 2 * $range_lon),5);
$current_centerpoint_lat = round($lat + DeltaLat($y * 2 * $range_lat),5);
$true_range_lon = ( $range_lon / $google_overrange ) * (1 + ( $ovl / 100 ));
// Let the image overlapp and the specific displaying
// ... behaviour of Google Earth flow into the "true" ranges.
echo "\t\n"; // Create a placemark
echo "\t\tP".$count." (".$x.",".$y.")\n";
echo "\t\t\n";
echo "\t\t\t".$current_centerpoint_lon."\n";
echo "\t\t\t".$current_centerpoint_lat."\n";
echo "\t\t\t0\n";
echo "\t\t\t".$true_range_lon."\n";
echo "\t\t\t0\n";
echo "\t\t\t0\n";
echo "\t\t\n";
echo "\t\t\n";
echo "\t\n";
$count++;
}
function WriteRow($y) {
global $hor;
echo "\n";
echo "\tRow ".$y."\n";
echo "\t1\n";
// ##### SUB LOOP (columns) ##### The columns are: x-1, x0, x1 ... and so on
for ($x = -1*(($hor-1)/2) ; $x <= ($hor-1)/2 ; $x++) {
WritePoint($x, $y);
}
echo "\n";
}
if (isset($_POST['lat'])) {
// Data from the filled out form:
$lon = $_POST['lon']; // Centerpoint longitude
$lat = $_POST['lat']; // Centerpoint latitude
$ran = $_POST['ran']; // Horizontal range of view (in meters)
$hor = $_POST['hor']; // Amount of horizontal pictures
$ver = $_POST['ver']; // Amount of vertical pictures
$hop = $_POST['hop']; // Monitor horizontal resolution
$vep = $_POST['vep']; // Monitor vertical resolution
$ovl = $_POST['ovl']; // Image overlapping in %
WriteHeader();
// ##### MAIN LOOP (rows) ##### The rows are: y-0.5, y0.5 ... and so on
for ($y = ($ver-1)/2 ; $y >= -1*(($ver-1)/2) ; $y--) {
WriteRow($y);
}
WriteFooter();
// ####################################################################################################
} else {
?>
rasterkml - loh's Google Earth Panorama Helper
rasterkml
Creating high resolution images with Google Earth™
The sketch above shows an example of rasterkml where 16 overlapping views are being generated (the green surface).
You will get a .kml file that contains a rectangular grid of these 16 viewpoints. You can now take a
screenshot of every view (with Google Earth in fullscreen mode). Because of the overlap of neighbouring views
your panorama software can regognize the repeating structure and stitch together the partial views to create
a large panorama.
|
Enter your raster data:
A little converting tool: deg, min, sec -> decimal values