
Originally Posted by
eurocarpc
Hi! I'm trying to make it work by setting the variables by hand in the perl file. Besides, I (being a bit stupid) would appreciate if you could explain what exactly means:
-lon (Northwest in decimal degrees) ex: -72.983889 ?
-range (Range in meters) ex: 600 ?
-sleep (Int number of seconds to sleep before moving), default 3 ?
-hres (Int horiztonal block to resume at) ?
-vres (Int horiztonal block to resume at) ?
-lon is the longitude, The -lat/-lon pair you specify is the northwest corner of where scanning starts.
-range is the distance from the ground in meters of the viewpoint (what it's called in GE), the higher up you are, the more you should be able to fit into the cache.
-sleep is just how long to pause between scanning. If it's too fast for your internet connection, it may move from an area before you've downloaded the map data.
(-hres,-vres) are for if you get interrupted and want to resume where you left off. As the program is scanning along, it spits out the current lat/lon and (hres,vres) parameters. If you need to stop the program for any reason (it can take a long time to scan larger areas), just jot these two numbers down. Then when you start it up again, specify them on the command line via -hres and -vres and it will pick up from where it left off. Do not specify them at all unless you are resuming.
Maybe a more detailed explanation of how it works would be helpful.
The lat/lon specified on the command line indicate the Northwest corner of the area we would like to scan. How large an area to scan is determined by hkm (how far horizontally/East), vkm (how far vertically/South). The reason I set it up so that you only specified the NW coordinate and the area as offsets, was it just easier to handle them that way and I didn't have to worry about people entering them backwards, etc.
An example run from the command line
Code:
ge_cachbuild.pl -lat 42.832778 -lon -72.983889 -range 600 -hkm 15 -vkm 10 -sleep 2
This is going to start at 42.832778,-72.983889 (Just North of the NW border of Massachusetts) and scan East 15 kilometers and south 10 kilometers, at a range of 600 meters.
When the program starts, it calculates the Southeast corner by adding hkm and vkm to the Northwest coordinate.
It then divides that area into a grid of MxN blocks (horizontal distance/range)x(vertical distance/range),
When scanning starts, it starts off the viewpoint in the KML file in the NE corner, moves horizontal -range meters, then sleeps for -sleep seconds, and keeps repeating this until it has reached the East side.
Once it does, it resets back to the West side and moves South -range meters and repeats so on and so forth until the entire area is scanned.
Also, instead of hard-coding the values in the script, you would probably be better off making a batch file that runs the script with the appropriate values.
Is this helpful?
Bookmarks