Annotation of /trunk/map_reader/srtm3/index.php
Parent Directory
|
Revision Log
Revision 2 - (view) (download)
| 1 : | tuis | 2 | <?php |
| 2 : | |||
| 3 : | require_once './config.php'; | ||
| 4 : | require_once '../func.php'; | ||
| 5 : | |||
| 6 : | |||
| 7 : | $size = 256; | ||
| 8 : | $name = ""; | ||
| 9 : | $mgnf = 1.0; | ||
| 10 : | $seal = GEO_SEA_LEVEL; | ||
| 11 : | $rate = GEO_MAP_XYRATE; | ||
| 12 : | |||
| 13 : | |||
| 14 : | if (isset($_GET["size"])) { | ||
| 15 : | $size = $_GET["size"]; | ||
| 16 : | } | ||
| 17 : | if (isset($_GET["name"])) { | ||
| 18 : | $name = $_GET["name"]; | ||
| 19 : | } | ||
| 20 : | if (isset($_GET["mag"])) { | ||
| 21 : | $mgnf = $_GET["mag"]; | ||
| 22 : | } | ||
| 23 : | if (isset($_GET["sea"])) { | ||
| 24 : | $seal = $_GET["sea"]; | ||
| 25 : | } | ||
| 26 : | if (isset($_GET["rate"])) { | ||
| 27 : | $rate = $_GET["rate"]; | ||
| 28 : | } | ||
| 29 : | |||
| 30 : | $deg = split("x", $name); | ||
| 31 : | $lat = $deg[0]; | ||
| 32 : | $lng = $deg[1]; | ||
| 33 : | |||
| 34 : | |||
| 35 : | if (!ctype_digit($size)) error_proc("size."); | ||
| 36 : | if (!ctype_digit($seal)) error_proc("sea level."); | ||
| 37 : | if (!is_numeric ($mgnf)) error_proc("magnification."); | ||
| 38 : | if (!is_numeric ($rate)) error_proc("X Y rate."); | ||
| 39 : | //if (!ctype_digit($name)) error_proc("file name. no alnum."); | ||
| 40 : | if (!is_numeric ($lat)) error_proc("latitude."); | ||
| 41 : | if (!is_numeric ($lng)) error_proc("longitude."); | ||
| 42 : | if ($size<=0) $size = 256; | ||
| 43 : | if ($mgnf<=0.0) $mgnf = 1.0; | ||
| 44 : | if ($rate<=0.0) $rate = GEO_MAP_XYRATE; | ||
| 45 : | |||
| 46 : | //$len = strlen($name); | ||
| 47 : | //$name = substr($name, $len-6, 6); | ||
| 48 : | //if (!preg_match('/^[1-9][0-9][1-9][0-9][0-7][0-7]$/', $name)) error_proc("file name. incorrect name."); | ||
| 49 : | |||
| 50 : | //$m = make_mapname_50m($name); | ||
| 51 : | //if (!isset($m)) error_proc("make_mapname."); | ||
| 52 : | //$d = read_geo_data($m, $size, $rate); | ||
| 53 : | |||
| 54 : | exec("./read_srtm -n ".$lat." -e ".$lng." -r ".$rate." -o ".GEO_SEA_DEEP, $m); | ||
| 55 : | |||
| 56 : | $d = data_to_array2($m, $size, $rate); | ||
| 57 : | |||
| 58 : | print_geo_data($d, $size, $seal, $mgnf, $rate); | ||
| 59 : | |||
| 60 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

