SRTMDownloader¶
-
class
pylayers.gis.srtm.
SRTMDownloader
(server='dds.cr.usgs.gov', directory='srtm/version2_1/SRTM3', cachedir='cache', protocol='http')[source]¶ Bases:
object
Automatically download SRTM tiles.
Methods Summary
SRTM data is split into different directories, get a list of all of them and create a dictionary for easy lookup.
Create a list of the available SRTM files on the server using HTTP file transfer protocol (rather than ftp).
downloadTile
(continent, filename)Download a tile from NASA’s server and store it in the cache.
ftpCallback
(data)Called by ftplib when some bytes have been received.
getTile
(lat, lon)Get a SRTM tile object.
Load a previously created file list or create a new one if none is available.
parseFilename
(filename)Get lat/lon values from filename.
Methods Documentation
-
createFileList
()[source]¶ SRTM data is split into different directories, get a list of all of them and create a dictionary for easy lookup.
-
createFileListHTTP
()[source]¶ Create a list of the available SRTM files on the server using HTTP file transfer protocol (rather than ftp). 30may2010 GJ ORIGINAL VERSION
-
downloadTile
(continent, filename)[source]¶ Download a tile from NASA’s server and store it in the cache.
-
getTile
(lat, lon)[source]¶ Get a SRTM tile object. This function can return either an SRTM1 or SRTM3 object depending on what is available, however currently it only returns SRTM3 objects.
-