« zpět na výpis měsíce |

[Talk-cz] batch wms download tiles

Vlákno 22.9. - 25.9.2008, počet zpráv: 4


22.9.2008 11:21:45 (#1)
gravatar

hanoj

<ehanoj at gmail.com>
714
Ahoj nemate nekdo napsany skript (treba bash, python, perl) pro stahovani vetsich oblasti pomoci WMS? Napr ten co byl u UHUL lesu. diky hanoj

22.9.2008 01:46:07 (#2)
gravatar

Jachym Cepicky

<jachym.cepicky at gmail.com>
407 93
http://tilecache.org by nepomohlo? j 2008/9/22 hanoj <ehanoj at gmail.com>: zobrazit citaci
> Ahoj > nemate nekdo napsany skript (treba bash, python, perl) pro stahovani > vetsich oblasti pomoci WMS? Napr ten co byl u UHUL lesu. > > diky > > hanoj > > _______________________________________________ > Talk-cz mailing list > Talk-cz at openstreetmap.org > http://lists.openstreetmap.org/listinfo/talk-cz >
-- Jachym Cepicky e-mail: jachym.cepicky gmail com URL: http://les-ejk.cz GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

22.9.2008 11:12:46 (#3)
gravatar

Tomas Kolda

<kolda at web2net.cz>
133
Tady je skript se kterym jsem downloadnul UHUL lesy. T Jachym Cepicky writes: zobrazit citaci
> http://tilecache.org by nepomohlo? > > j > > 2008/9/22 hanoj <ehanoj at gmail.com>: >> Ahoj >> nemate nekdo napsany skript (treba bash, python, perl) pro stahovani >> vetsich oblasti pomoci WMS? Napr ten co byl u UHUL lesu. >> >> diky >> >> hanoj >> >> _______________________________________________ >> Talk-cz mailing list >> Talk-cz at openstreetmap.org >> http://lists.openstreetmap.org/listinfo/talk-cz >> > > > > -- > Jachym Cepicky > e-mail: jachym.cepicky gmail com > URL: http://les-ejk.cz > GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub > > _______________________________________________ > Talk-cz mailing list > Talk-cz at openstreetmap.org > http://lists.openstreetmap.org/listinfo/talk-cz
-------------- next part -------------- import urllib, os.path from PIL import Image crRect = (12, 51.1, 19, 48.5) def getMapSize(): return (1 + int((crRect[2] - crRect[0]) / 0.1), 1 + int((crRect[1] - crRect[3]) / 0.1)) def tile2wgs(x, y): return (crRect[0] + x * 0.1, crRect[1] - y * 0.1, crRect[0] + (x + 1) * 0.1, crRect[1] - (y + 1) * 0.1) def getFilename(x, y): return os.path.join("cache", "%03dx%03d.png" % (x, y)) def cacheImage(x, y): filename = getFilename(x, y) if os.path.isfile(filename): return rect = tile2wgs(x, y) print "Downloading ", x, y url = "http://geoportal2.uhul.cz/cgi-bin/oprl.asp?SERVICE=WMS&VERSION=1.1.1&" + \ "REQUEST=GetMap&SRS=EPSG:4326&LAYERS=Les_OPRL&STYLES=default&FORMAT=image/png&" + \ "TRANSPARENT=TRUE&BBOX=%.1f,%.1f,%.1f,%.1f&WIDTH=2000&HEIGHT=2000" % \ (rect[0], rect[3], rect[2], rect[1]) data = urllib.urlopen(url).read() f = open(filename, "wb") f.write(data) f.close() def main(): (w, h) = getMapSize() for x in range(w): for y in range(8, h): cacheImage(x, y) if __name__ == '__main__': main()

25.9.2008 09:48:49 (#4)
gravatar

hanoj

<ehanoj at gmail.com>
714
O, dekuji, * o tilecache jsem vedel, ale nemohl prijit na jmeno * ten pythonovsky skript se mi zda pekne jednoduchy, tak bych si ho s dovolenim naklonoval k potrebe vlastni. ha hanoj 2008/9/22 Tomas Kolda <kolda at web2net.cz>: zobrazit citaci
> Tady je skript se kterym jsem downloadnul UHUL lesy. > T > > Jachym Cepicky writes: >> >> http://tilecache.org by nepomohlo? >> j >> 2008/9/22 hanoj <ehanoj at gmail.com>: >>> >>> Ahoj >>> nemate nekdo napsany skript (treba bash, python, perl) pro stahovani >>> vetsich oblasti pomoci WMS? Napr ten co byl u UHUL lesu. >>> diky >>> hanoj

« zpět na výpis měsíce