├── CHANGELOG.txt ├── LICENSE ├── README.txt ├── deploy ├── linux │ ├── debian │ │ ├── changelog │ │ ├── compat │ │ ├── control │ │ ├── copyright │ │ └── rules │ ├── fpm │ │ ├── build_deb.sh │ │ └── install_fpm.sh │ ├── makedeb │ └── mapslicer.desktop ├── macosx │ ├── setup.py │ ├── setup.semi-standalone.py │ └── strip-dist.sh └── win32 │ ├── mapslicer.iss │ └── setup.py ├── mapslicer.py ├── mapslicer ├── __init__.py ├── config.py ├── gdal2tiles.py ├── gdalpreprocess.py ├── icons.py ├── main.py ├── pp │ ├── __init__.py │ ├── ppauto.py │ ├── ppserver.py │ ├── pptransport.py │ └── ppworker.py ├── preprocess.py ├── widgets.py ├── wizard.py └── wxgdal2tiles.py ├── resources ├── ajax-loader-small.gif ├── ajax-loader.gif ├── cs │ └── LC_MESSAGES │ │ └── mapslicer.mo ├── de │ └── LC_MESSAGES │ │ └── mapslicer.mo ├── icon.png ├── icon140.png ├── license │ ├── GDAL_LICENSE.TXT │ ├── LICENSE.txt │ └── PP_COPYING.txt ├── locale │ ├── cs_CZ.po │ ├── de.po │ └── mapslicer.pot ├── mapslicer.icns └── mapslicer.ico └── setup.py /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | MapSlicer ChangeLog 2 | =================== 3 | 4 | 1.0 Beta 3: 14 Feb 2015 5 | ----------------------- 6 | 7 | - Forked project and renamed to MapSlicer 8 | - Replaced directory selection control for output 9 | - Removed menu bar, web links and requests for donations 10 | 11 | 1.0 Beta 2: 26 Aug 2009 12 | ----------------------- 13 | 14 | - Code included in OSGeoLive 15 | 16 | 1.0 Alpha 3: 26 Jan 2009 17 | ----------------------- 18 | 19 | - Spatial Reference step rewritten - custom SRS supported from WKT, EPSG, online-search by name... 20 | - Polygon preview of the map reference with Google Maps 21 | - Georeference by NSEW: North South East West (idea - Pamela Fox) 22 | - ECW SDK distributed in Microsoft Windows 23 | - Automation of the packaging and installers (setup.py - also for Mac) 24 | - Bugfixing - Moving between steps, troubles with custom SRS, binary distribution 25 | - Text of the steps rewritten for skipping (in the future versions) 26 | - English language corrections - thanks to Chris Fleet 27 | 28 | 1.0 Alpha 2: 16 Jan 2009 29 | ------------------------ 30 | - Bugfixing 31 | - Initial installer for Windows and Mac 32 | - Version ready for testing 33 | 34 | 1.0 Alpha 1: 15 Jan 2009 35 | ------------------------ 36 | - Initial public version 37 | 38 | FUTURE: 39 | ======= 40 | 1.0 target 41 | ---------- 42 | - Merging of several files should be possible (problem: files with GCP georeference) 43 | - Choosing of the NODATA color is possible (dependency: GDAL 1.6.1) 44 | - Warping corrections applied: problems with warping of the whole earth solved 45 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | ===================== 2 | MapSlicer Application 3 | ===================== 4 | https://wiki.osgeo.org/wiki/MapSlicer 5 | 6 | MapSlicer is a graphical application for online map publishing. Your map can create overlay of standard maps like OpenStreetMap, Google Maps, Yahoo Maps or Bing Maps and can be also visualized in 3D by Google Earth. The only thing you have to do for publishing the map is to upload the automatically generated directory with tiles into your webserver. 7 | 8 | MapSlicer is an open-source application, distributed under the New BSD License. 9 | It can run on several platforms, including Linux, Microsoft Windows and Apple Mac OS X. 10 | 11 | You can download the source code from the repository at https://github.com/kalxas/mapslicer 12 | 13 | Requirements 14 | ------------ 15 | In case you would like to run the application from the code you need: 16 | - Python 2.5 17 | - wxPython 2.8+ 18 | - GDAL 1.6+ 19 | 20 | The application can be started by running: 21 | 22 | $ python mapslicer.py 23 | 24 | Or depending on the installation method there should be a program icon in the programs menu. 25 | 26 | Packaging 27 | --------- 28 | The packaging scripts and instructions are in the directory /deploy/. 29 | 30 | 31 | Development 32 | ----------- 33 | Development of the project happens on GitHub. Pull Requests are welcome :) 34 | 35 | We would like to thank Petr Pridal - Klokan for his contribution of the original MapTiler project. 36 | 37 | Sponsors of MapTiler/GDAL2Tiles: 38 | 39 | * http://www.davidrumsey.com - supported improvement of Google Earth SuperOverlay rendering 40 | * http://www.nic.cz/ and http://www.nic.cz/vip/ - Vyvíjej, Inovuj, Programuj 41 | * http://www.brgm.fr/ (Bureau des Recherches Geologiques et Minières - French Geological Survey Office 42 | * http://www.oldmapsonline.org/ - Moravian Library Brno, Czech Ministry of Culture 43 | * http://code.google.com/soc/ - Google Summer of Code 2007, 2008 (GDAL2Tiles utility) - OSGeo and Google Inc. 44 | 45 | Huge thanks to the team of http://www.gdal.org/ and also people from http://www.osgeo.org/ . 46 | 47 | 48 | -------------------------------------------------------------------------------- /deploy/linux/debian/changelog: -------------------------------------------------------------------------------- 1 | mapslicer ($VERSION) unstable; urgency=low 2 | 3 | * Release. 4 | 5 | This is a debianized version of MapSlicer from git. 6 | 7 | -- Angelos Tzotsos $DATE 8 | -------------------------------------------------------------------------------- /deploy/linux/debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /deploy/linux/debian/control: -------------------------------------------------------------------------------- 1 | Source: mapslicer 2 | Section: graphics 3 | Priority: optional 4 | Maintainer: Angelos Tzotsos 5 | Build-Depends: debhelper (>=7.0.0) 6 | Standards-Version: 3.8.1 7 | 8 | Package: mapslicer 9 | Architecture: all 10 | Homepage: https://github.com/kalxas/mapslicer 11 | Depends: python (>=2.5), python-wxgtk2.8 (>=2.8), python-gdal (>=1.6) 12 | Description: Tile Generator for Mashups. 13 | MapSlicer is a powerful tool for online map publishing and generation of map 14 | overlay mashups. Your geodata are transformed to the tiles compatible with 15 | Google Maps and Earth - ready for uploading to your webserver. 16 | -------------------------------------------------------------------------------- /deploy/linux/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | configure: configure-stamp 5 | configure-stamp: 6 | dh_testdir 7 | touch configure-stamp 8 | 9 | 10 | build: build-stamp 11 | 12 | build-stamp: configure-stamp 13 | dh_testdir 14 | touch build-stamp 15 | 16 | clean: 17 | dh_testdir 18 | dh_testroot 19 | rm -f build-stamp configure-stamp 20 | dh_clean 21 | 22 | install: build 23 | dh_testdir 24 | dh_testroot 25 | dh_clean -k 26 | dh_installdirs 27 | 28 | mkdir -p $(CURDIR)/debian/mapslicer 29 | 30 | mkdir -p $(CURDIR)/debian/mapslicer/usr/lib/mapslicer 31 | cp mapslicer.py $(CURDIR)/debian/mapslicer/usr/lib/mapslicer 32 | cp -r mapslicer $(CURDIR)/debian/mapslicer/usr/lib/mapslicer 33 | 34 | mkdir -p $(CURDIR)/debian/mapslicer/usr/bin 35 | ln -s /usr/lib/mapslicer/mapslicer.py $(CURDIR)/debian/mapslicer/usr/bin/mapslicer 36 | #chmod a+x $(CURDIR)/debian/mapslicer/usr/bin/mapslicer 37 | 38 | mkdir -p $(CURDIR)/debian/mapslicer/usr/share/mapslicer 39 | cp -r resources/* $(CURDIR)/debian/mapslicer/usr/share/mapslicer 40 | 41 | mkdir -p $(CURDIR)/debian/mapslicer/usr/share/applications 42 | cp deploy/linux/mapslicer.desktop $(CURDIR)/debian/mapslicer/usr/share/applications 43 | 44 | mkdir -p $(CURDIR)/debian/mapslicer/usr/share/doc/mapslicer 45 | cp README.txt $(CURDIR)/debian/mapslicer/usr/share/doc/mapslicer 46 | 47 | 48 | binary-indep: build install 49 | 50 | binary-arch: build install 51 | dh_testroot 52 | dh_installchangelogs 53 | dh_installdocs 54 | dh_link 55 | dh_strip 56 | dh_compress 57 | dh_fixperms 58 | dh_installdeb 59 | dh_shlibdeps 60 | dh_gencontrol 61 | dh_md5sums 62 | dh_builddeb 63 | 64 | binary: binary-indep binary-arch 65 | .PHONY: build clean binary-indep binary-arch binary install configure 66 | -------------------------------------------------------------------------------- /deploy/linux/fpm/build_deb.sh: -------------------------------------------------------------------------------- 1 | cd ../../.. 2 | rm -rf /usr/lib/mapslicer 3 | rm /usr/share/applications/mapslicer.desktop 4 | rm -rf /usr/share/mapslicer 5 | rm -rf /usr/share/doc/mapslicer 6 | 7 | mkdir -p /usr/lib/mapslicer 8 | cp mapslicer.py /usr/lib/mapslicer/ 9 | cp -r mapslicer /usr/lib/mapslicer/ 10 | 11 | mkdir -p /usr/share/doc/mapslicer 12 | cp README.txt /usr/share/doc/mapslicer/ 13 | cp deploy/linux/debian/copyright /usr/share/doc/mapslicer/ 14 | cp deploy/linux/mapslicer.desktop /usr/share/applications/ 15 | mkdir -p /usr/share/mapslicer 16 | cp resources/icon.png /usr/share/mapslicer/ 17 | 18 | fpm -s dir -t deb -a all -n mapslicer -v 1.0.rc2 --description='Map Tile Generator for Mashups' -d python-gdal -d python-wxgtk3.0 -d python /usr/share/doc/mapslicer/ /usr/lib/mapslicer/ /usr/share/mapslicer/icon.png /usr/share/applications/mapslicer.desktop 19 | 20 | -------------------------------------------------------------------------------- /deploy/linux/fpm/install_fpm.sh: -------------------------------------------------------------------------------- 1 | sudo apt-get install ruby-dev 2 | sudo gem install fpm 3 | -------------------------------------------------------------------------------- /deploy/linux/makedeb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f mapslicer.py -o ! -d mapslicer ]; 4 | then 5 | echo "The script must be invoked from the mapslicer root directory." 6 | exit 1 7 | fi 8 | 9 | PYTHON=`which python` 10 | SANDBOX=`mktemp -d` 11 | FILES="mapslicer.py mapslicer README.txt deploy/linux/mapslicer.desktop \ 12 | resources/icon.png" 13 | 14 | # get mapslicer version 15 | VERSION=`$PYTHON -c 'import mapslicer; print mapslicer.version.replace(" ",".")'` 16 | 17 | # name the archive and directory according to debian policy 18 | ARCHNAME="MapSlicer-$VERSION" 19 | 20 | # create sandbox 21 | mkdir "$SANDBOX/$ARCHNAME" 22 | 23 | # copy project files and archive in there 24 | tar cvzf "$SANDBOX/$ARCHNAME/$ARCHNAME.tar.gz" --exclude='.svn' --exclude='*.pyc' $FILES 25 | tar xzf "$SANDBOX/$ARCHNAME/$ARCHNAME.tar.gz" -C "$SANDBOX/$ARCHNAME" 26 | 27 | # copy our debian files as well 28 | cp -r deploy/linux/debian "$SANDBOX/$ARCHNAME" 29 | 30 | # update version and date 31 | CURDATE=`date -R` 32 | sed -i -e "s/\\\$VERSION/$VERSION/g" -e "s/\\\$DATE/$CURDATE/g" \ 33 | "$SANDBOX/$ARCHNAME/debian/changelog" 34 | 35 | # build the .deb 36 | (cd "$SANDBOX/$ARCHNAME"; dpkg-buildpackage -d) 37 | 38 | # copy it 39 | cp "$SANDBOX"/*.deb . 40 | 41 | # clean up 42 | rm -rf "$SANDBOX" 43 | -------------------------------------------------------------------------------- /deploy/linux/mapslicer.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Icon=/usr/share/mapslicer/icon.png 4 | Name=MapSlicer 5 | Comment=Tile Generator for Mashups 6 | Exec=/usr/bin/mapslicer 7 | Terminal=false 8 | Type=Application 9 | Categories=Geography; 10 | StartupNotify=false 11 | -------------------------------------------------------------------------------- /deploy/macosx/setup.py: -------------------------------------------------------------------------------- 1 | import py2app 2 | from setuptools import setup 3 | 4 | # Build the .app file 5 | setup( 6 | options=dict( 7 | py2app=dict( 8 | iconfile='resources/mapslicer.icns', 9 | packages='wx', 10 | excludes='osgeo,PIL,numpy', 11 | #site_packages=True, 12 | #semi_standalone=True, 13 | resources=['resources/license/LICENSE.txt','mapslicer'], 14 | plist=dict( 15 | CFBundleName = "MapSlicer", 16 | CFBundleShortVersionString = "1.0.alpha2", # must be in X.X.X format 17 | CFBundleGetInfoString = "MapSlicer 1.0 alpha2", 18 | CFBundleExecutable = "MapSlicer", 19 | CFBundleIdentifier = "cz.klokan.mapslicer", 20 | ), 21 | frameworks=['PROJ.framework','GEOS.framework','SQLite3.framework','UnixImageIO.framework','GDAL.framework'], 22 | ), 23 | ), 24 | app=[ 'mapslicer.py' ] 25 | ) 26 | -------------------------------------------------------------------------------- /deploy/macosx/setup.semi-standalone.py: -------------------------------------------------------------------------------- 1 | import py2app 2 | from setuptools import setup 3 | 4 | # Build the .app file 5 | setup( 6 | options=dict( 7 | py2app=dict( 8 | iconfile='resources/mapslicer.icns', 9 | excludes='wx,osgeo,PIL,numpy', 10 | semi_standalone='yes', 11 | use_pythonpath='yes', 12 | resources=['resources/license/LICENSE.txt','mapslicer'], 13 | plist=dict( 14 | CFBundleName = "MapSlicer", 15 | CFBundleShortVersionString = "1.0.alpha2", # must be in X.X.X format 16 | CFBundleGetInfoString = "MapSlicer 1.0 alpha2", 17 | CFBundleExecutable = "MapSlicer", 18 | CFBundleIdentifier = "cz.klokan.mapslicer", 19 | ), 20 | ), 21 | ), 22 | app=[ 'mapslicer.py' ] 23 | ) 24 | -------------------------------------------------------------------------------- /deploy/macosx/strip-dist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -Rf dist/MapSlicer.app/Contents/Frameworks/GDAL.framework/Versions/Current/libgdal.a 3 | rm -Rf dist/MapSlicer.app/Contents/Frameworks/GDAL.framework/Versions/Current/Resources/doc 4 | rm -Rf dist/MapSlicer.app/Contents/Frameworks/GDAL.framework/Versions/Current/Programs 5 | rm -Rf dist/MapSlicer.app/Contents/Frameworks/PROJ.framework/Versions/Current/Programs 6 | rm -Rf dist/MapSlicer.app/Contents/Frameworks/SQLite3.framework/Versions/Current/Programs 7 | rm -Rf dist/MapSlicer.app/Contents/Frameworks/UnixImageIO.framework/Versions/Current/Programs 8 | 9 | rm -Rf dist/MapSlicer.app/Contents/Resources/lib/python2.5/wx/tools 10 | 11 | # Create versions for different architectures: 12 | mkdir dist/i386 13 | #ditto --rsrc --arch ppc dist/MapSlicer.app dist/MapSlicer-ppc.app 14 | ditto --rsrc --arch i386 dist/MapSlicer.app dist/i386/MapSlicer.app 15 | #lipo -thin i386 -output dist/i386/MapSlicer.app/binary... dist/MapSlicer.app/binary... 16 | -------------------------------------------------------------------------------- /deploy/win32/mapslicer.iss: -------------------------------------------------------------------------------- 1 | ; -- MapSlicer.iss -- 2 | ; 3 | 4 | [Setup] 5 | ; NOTE: The value of AppId uniquely identifies this application. 6 | ; Do not use the same AppId value in installers for other applications. 7 | ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) 8 | AppId={{51E692DF-521D-4F83-B021-B0D2C4BFA25C} 9 | AppName=MapSlicer 10 | AppVerName=MapSlicer version 1.0 alpha3 11 | AppPublisher=Petr Pridal - Klokan 12 | AppPublisherURL=http://www.mapslicer.com/ 13 | AppSupportURL=http://help.mapslicer.org/ 14 | AppUpdatesURL=http://www.mapslicer.org/ 15 | DefaultDirName={pf}\MapSlicer 16 | DefaultGroupName=MapSlicer 17 | LicenseFile=resources\license\LICENSE.txt 18 | OutputBaseFilename=mapslicer-1.0-alpha3-setup 19 | Compression=lzma 20 | SolidCompression=yes 21 | UninstallDisplayIcon={app}\mapslicer.exe 22 | 23 | [Files] 24 | Source: "dist\*"; DestDir: "{app}" 25 | Source: "dist\proj\*"; DestDir: "{app}\proj\" 26 | Source: "dist\gdal\*"; DestDir: "{app}\gdal\" 27 | Source: "dist\gdalplugins\*"; DestDir: "{app}\gdalplugins\" 28 | 29 | [Tasks] 30 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 31 | 32 | [Icons] 33 | Name: "{group}\MapSlicer 1.0 alpha3"; Filename: "{app}\mapslicer.exe"; WorkingDir: "{app}" 34 | Name: "{group}\{cm:ProgramOnTheWeb,MapSlicer}"; Filename: "http://www.mapslicer.org/" 35 | Name: "{group}\Uninstall MapSlicer"; Filename: "{uninstallexe}" 36 | Name: "{commondesktop}\MapSlicer"; Filename: "{app}\mapslicer.exe"; Tasks: desktopicon 37 | 38 | [Run] 39 | Filename: "{app}\mapslicer.exe"; Description: "{cm:LaunchProgram,MapSlicer}"; Flags: nowait postinstall skipifsilent 40 | -------------------------------------------------------------------------------- /deploy/win32/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | import os, sys 3 | import glob 4 | 5 | if sys.platform in ['win32','win64']: 6 | import py2exe 7 | if sys.platform == 'darwin': 8 | import py2app 9 | 10 | from mapslicer import version 11 | 12 | setup(name='MapSlicer', 13 | version=version, 14 | description = "MapSlicer - Map Tile Generator for Mashups", 15 | long_description= "MapSlicer is a powerful tool for online map publishing and generation of map overlay mashups. Your geodata are transformed to the tiles compatible with Google Maps and Earth - ready for uploading to your webserver.", 16 | url='http://www.mapslicer.org/', 17 | author='Klokan Petr Pridal', 18 | author_email='klokan@klokan.cz', 19 | packages=['mapslicer'], 20 | scripts=['mapslicer.py'], 21 | windows=[ {'script':'mapslicer.py', "icon_resources": [(1, os.path.join('resources', 'mapslicer.ico'))] } ], 22 | app=['mapslicer.py'], 23 | data_files=[ 24 | ('gdaldata', glob.glob('gdaldata/*.*')), 25 | ('gdalplugins', glob.glob('gdalplugins/*.*')), 26 | ('', glob.glob('*.dll')) 27 | ], 28 | options={'py2exe':{'packages':['mapslicer'], 29 | 'includes':['encodings','osgeo','osgeo.gdal','osgeo.osr'], 30 | }, 31 | 'py2app':{'argv_emulation':True, 32 | 'iconfile':os.path.join('resources', 'mapslicer.icns'), 33 | 'packages':['mapslicer'], 34 | 'includes':['encodings'], 35 | #'site_packages':True, 36 | }, 37 | }, 38 | 39 | ) 40 | -------------------------------------------------------------------------------- /mapslicer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import os, sys 5 | #import gettext 6 | 7 | #gettext.install("mapslicer", "./resources/") 8 | #csText = gettext.translation("mapslicer", "./resources/", languages=['cs']) 9 | #deText = gettext.translation("mapslicer", "./resources/", languages=['de']) 10 | ##deText.install() 11 | 12 | # Where is the executable file on the disk? 13 | exepath = os.getcwd() 14 | if hasattr(sys, "frozen") or sys.executable.find('MapSlicer.app') != -1: 15 | exepath = os.path.dirname(sys.executable) 16 | 17 | # Windows: set the GDAL and PROJ variables .. 18 | if sys.platform in ['win32','win64']: 19 | # .. to the local directory in the py2exe distribution 20 | if os.path.exists(os.path.join( exepath, "gdal" )): 21 | os.environ['PROJ_LIB'] = os.path.join( exepath, "proj" ) 22 | os.environ['GDAL_DATA'] = os.path.join( exepath, "gdal" ) 23 | os.environ['GDAL_DRIVER_PATH'] = os.path.join( exepath, "gdalplugins" ) 24 | # .. to the OSGeo4W default directories 25 | elif os.path.exists('C:\\OSGeo4W\\apps\\gdal-16'): 26 | sys.path.insert(0, 'C:\\OSGeo4W\\apps\\gdal-16\\pymod' ) 27 | os.environ['PATH'] += ';C:\\OSGeo4W\\bin' 28 | os.environ['PROJ_LIB'] = 'C:\\OSGeo4W\\share\\proj' 29 | os.environ['GDAL_DATA'] = 'C:\\OSGeo4W\\apps\\gdal-16\\share\\gdal' 30 | os.environ['GDAL_DRIVER_PATH'] = 'C:\\OSGeo4W\\apps\\gdal-16\\bin\\gdalplugins' 31 | # otherwise we need to use existing system setup 32 | 33 | # Mac: GDAL.framework is in the application bundle or in the /Library/Frameworks 34 | if sys.platform == 'darwin' and not os.environ.has_key('GDAL_DATA'): 35 | frameworkpath = exepath[:(exepath.find('MapSlicer.app')+12)]+'/Contents/Frameworks' 36 | if not os.path.exists( os.path.join(frameworkpath, "GDAL.framework" )): 37 | frameworkpath = "/Library/Frameworks" 38 | os.environ['PROJ_LIB'] = os.path.join( frameworkpath, "PROJ.framework/Resources/proj/" ) 39 | os.environ['GDAL_DATA'] = os.path.join( frameworkpath, "GDAL.framework/Resources/gdal/" ) 40 | os.environ['GDAL_DRIVER_PATH'] = os.path.join( frameworkpath, "GDAL.framework/PlugIns/" ) 41 | sys.path.insert(0, os.path.join( frameworkpath, "GDAL.framework/Versions/Current/Python/site-packages/" )) 42 | 43 | # Other systems need correctly installed GDAL libraries 44 | 45 | import traceback 46 | import wx 47 | import mapslicer 48 | 49 | 50 | __version__ = mapslicer.version 51 | 52 | class MapSlicerApp(wx.App): 53 | 54 | def OnInit(self): 55 | wx.InitAllImageHandlers() 56 | self.main_frame = mapslicer.MainFrame(None, -1, "") 57 | self.SetTopWindow(self.main_frame) 58 | self.SetAppName("MapSlicer") 59 | return True 60 | 61 | def MacOpenFile(self, filename): 62 | self.main_frame._add(filename) 63 | 64 | def Show(self): 65 | self.main_frame.Show() 66 | 67 | def ExceptHook(self, type, value, tb): 68 | back_trace = "".join(traceback.format_exception(type, value, tb)) 69 | 70 | print 71 | print "==============================================================" 72 | print back_trace 73 | print 74 | 75 | caption = _("Exception occured") 76 | message = _("An unexpected error occured:\n\n") + str(value) 77 | wx.MessageBox(message, caption, wx.ICON_ERROR) 78 | 79 | 80 | if __name__ == "__main__": 81 | 82 | #_ = gettext.gettext 83 | _ = lambda s: s 84 | 85 | # TODO: Parse command line arguments: 86 | # for both batch processing and initialization of the GUI 87 | 88 | #wx.SystemOptions.SetOptionInt("mac.listctrl.always_use_generic",0) 89 | app = MapSlicerApp(False) 90 | 91 | try: 92 | from osgeo import gdal 93 | except ImportError: 94 | # TODO: Platform specific error messages - are part of the GUI... 95 | if sys.platform == 'darwin': 96 | wx.MessageBox(_("""GDAL 1.6 framework is not found in your system!\n 97 | Please install GDAL framework from the website: 98 | http://www.kyngchaos.com/software:frameworks"""), _("Error: GDAL Framework not found!"), wx.ICON_ERROR) 99 | import webbrowser 100 | webbrowser.open_new("http://gdal.org") 101 | sys.exit(1) 102 | elif sys.platform in ['win32','win64']: 103 | wx.MessageBox(_("""GDAL 1.6 library is not found in your system!"""), 104 | _("Error: GDAL library not found!"), wx.ICON_ERROR) 105 | sys.exit(1) 106 | elif sys.platform.startswith('linux'): 107 | wx.MessageBox(_("""GDAL 1.6 library is not found in your system!\n 108 | Please install it as a package in your distribution or from the source code: 109 | http://trac.osgeo.org/gdal/wiki/BuildHints"""), _("Error: GDAL library not found!"), wx.ICON_ERROR) 110 | sys.exit(1) 111 | print _("GDAL library not available - please install GDAL and its python module!") 112 | 113 | sys.excepthook = app.ExceptHook 114 | app.Show() 115 | app.MainLoop() 116 | 117 | -------------------------------------------------------------------------------- /mapslicer/__init__.py: -------------------------------------------------------------------------------- 1 | # Just a placeholder 2 | 3 | from main import MainFrame 4 | from config import version 5 | -------------------------------------------------------------------------------- /mapslicer/config.py: -------------------------------------------------------------------------------- 1 | #import gettext 2 | 3 | version = "1.0 rc2" 4 | 5 | profile = 'mercator' 6 | files = [] 7 | nodata = None 8 | srs = "" 9 | customsrs = "" 10 | srsformat = 0 11 | tminz = 0 12 | tmaxz = 0 13 | format = False 14 | resume = False 15 | kml = False 16 | outputdir = None 17 | url = "http://" # TODO: Do not submit this to the command-line 18 | viewer_google = False 19 | viewer_openlayers = False 20 | title = "" 21 | copyright = "©" 22 | googlekey = "" 23 | yahookey = "" 24 | 25 | documentsdir = "" 26 | 27 | bboxgeoref = False 28 | 29 | # GetText 30 | #_ = gettext.gettext 31 | _ = lambda s: s 32 | 33 | # WellKnownGeogCS 34 | wellknowngeogcs = ['WGS84','WGS72','NAD27','NAD83'] 35 | 36 | # Subset of the GDAL supported file formats... 37 | supportedfiles = _("Supported raster files")+"|*.tif;*.tiff;*.kap;*.img;*.sid;*.ecw;*.jp2;*.j2k;*.nitf;*.h1;*.h2;*.hd;*.hdr;*.cit;*.rgb;*.raw;*.blx;*.jpg;*.jpeg;*.png;*.gif;*.bmp;*.wms;*.vrt|" + \ 38 | _("TIFF / BigTIFF / GeoTIFF (.tif)")+"|*.tif;*.tiff|" + \ 39 | _("BSB Nautical Chart Format (.kap)")+"|*.kap|" + \ 40 | _("JPEG2000 - JPEG 2000 (.jp2, .j2k)")+"|*.jp2;*.j2k|" + \ 41 | _("MrSID - Multi-resolution Seamless Image Database (.sid)")+"|*.sid|" + \ 42 | _("ECW - ERMapper Compressed Wavelets (.ecw)")+"|*.ecw|" + \ 43 | _("HFA - Erdas Imagine Images (.img)")+"|*.img|" + \ 44 | _("NITF - National Imagery Transmission Format (.nitf)")+"|*.nitf|" + \ 45 | _("NDF - NLAPS Data Format (.h1,.h2,.hd)")+"|*.h1;*.h2;*.hd|" + \ 46 | _("MFF - Vexcel MFF Raster (.hdr)")+"|*.hdr|" + \ 47 | _("INGR - Intergraph Raster Format (.cit,.rgb,..)")+"|*.cit;*.rgb|" + \ 48 | _("EIR - Erdas Imagine Raw (.raw)")+"|*.raw|" + \ 49 | _("BLX - Magellan BLX Topo File Format (.blx)")+"|*.blx|" + \ 50 | _("JPEG - Joint Photographic Experts Group JFIF (.jpg)")+"|*.jpg;*.jpeg|" + \ 51 | _("PNG - Portable Network Graphics (.png)")+"|*.png|" + \ 52 | _("GIF - Graphics Interchange Format (.gif)")+"|*.gif|" + \ 53 | _("BMP - Microsoft Windows Device Independent Bitmap (.bmp)")+"|*.bmp|" + \ 54 | _("WMS - GDAL driver for OGC Web Map Server (.wms)")+"|*.wms|" + \ 55 | _("VRT - GDAL Virtual Raster (.vrt)")+"|*.vrt|" + \ 56 | _("All files (*.*)")+"|*.*" 57 | 58 | s = """ 59 | srsFormatList = ['format automatically detected', 60 | 'WKT - Well Known Text definition', 61 | 'ESRI WKT - Well Known Text definition', 62 | 'EPSG number', 63 | 'EPSGA number', 64 | 'Proj.4 definition' 65 | ] 66 | """ 67 | 68 | srsFormatList = [ 69 | _('Custom definition of the system (WKT, Proj.4,..)'), 70 | _('WGS84 - Latitude and longitude (geodetic)'), 71 | _('Universal Transverse Mercator - UTM (projected)'), 72 | _('Specify the id-number from the EPSG/ESRI database'), 73 | _('Search the coordinate system by name'), 74 | ] 75 | 76 | srsFormatListLocal = [ 77 | _('SRSCustom0'),_("SRSDefinition0"), 78 | _('SRSCustom1'),_("SRSDefinition1"), 79 | _('SRSCustom2'),_("SRSDefinition2"), 80 | _('SRSCustom3'),_("SRSDefinition3"), 81 | _('SRSCustom4'),_("SRSDefinition4"), 82 | _('SRSCustom5'),_("SRSDefinition5"), 83 | _('SRSCustom6'),_("SRSDefinition6"), 84 | _('SRSCustom7'),_("SRSDefinition7"), 85 | _('SRSCustom8'),_("SRSDefinition8"), 86 | _('SRSCustom9'),_("SRSDefinition9") 87 | ] 88 | 89 | #English-speaking coordinate systems defaults: 90 | # 'OSGB 1936 / British National Grid (projected)' 91 | # 'NZMG - New Zealand Map Grid' 92 | # '' 93 | 94 | #French-speaking coordinate systems defaults: 95 | # Lambert 96 | 97 | #German-speaking coordinate systems defaults: 98 | # ... 99 | 100 | s = """ 101 | datadir = wx.StandardPaths.Get().GetUserLocalDataDir() 102 | if not os.path.isdir(datadir): 103 | os.mkdir(datadir) 104 | f = wx.FileConfig(localFilename=os.path.join(datadir,'MapSlicer.cfg')) 105 | 106 | f.SetPath("APath") 107 | print f.Read("Key") 108 | f.Write("Key", "Value") 109 | f.Flush() 110 | """ 111 | 112 | epsg4326 = """GEOGCS["WGS 84", 113 | DATUM["WGS_1984", 114 | SPHEROID["WGS 84",6378137,298.257223563, 115 | AUTHORITY["EPSG","7030"]], 116 | AUTHORITY["EPSG","6326"]], 117 | PRIMEM["Greenwich",0, 118 | AUTHORITY["EPSG","8901"]], 119 | UNIT["degree",0.01745329251994328, 120 | AUTHORITY["EPSG","9122"]], 121 | AUTHORITY["EPSG","4326"]]""" 122 | 123 | -------------------------------------------------------------------------------- /mapslicer/gdalpreprocess.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from osgeo import gdal 4 | from osgeo import osr 5 | import tempfile 6 | import os 7 | import preprocess 8 | 9 | #TODO: GetText 10 | from config import _ 11 | 12 | gdal.AllRegister() 13 | vrt_drv = gdal.GetDriverByName( 'VRT' ) 14 | 15 | palettecolors = ['Red','Green','Blue','Alpha'] 16 | reference = osr.SpatialReference() 17 | 18 | 19 | class PreprocessError(Exception): 20 | 21 | """To distinguish errors from exceptions in this module.""" 22 | 23 | 24 | def singlefile(filename, bbox = None): 25 | "Returns [visible-filename, visible-georeference, realfilename, geotransform, xsize, ysize, srs]" 26 | 27 | osr.DontUseExceptions() 28 | realfilename = filename 29 | georeference = "" 30 | geotransform = None 31 | srs = "" 32 | 33 | in_ds = gdal.Open( filename, gdal.GA_ReadOnly) 34 | if not in_ds: 35 | # Note: GDAL prints the ERROR message too 36 | raise PreprocessError(_("It is not possible to open the input file '%s'.") % filename) 37 | 38 | xsize = in_ds.RasterXSize 39 | ysize = in_ds.RasterYSize 40 | bands = in_ds.RasterCount 41 | geotransform = in_ds.GetGeoTransform() 42 | srs = in_ds.GetProjection() 43 | 44 | if bbox: 45 | # nsew = uly lry lrx ulx 46 | # TODO: set geotransform from [ulx, uly, lrx, lry] + xsize, ysize 47 | geotransform = [0.0,0.0,0.0,0.0,0.0,0.0] 48 | 49 | if len(bbox) > 4: # world file - affine transformation 50 | geotransform[1] = bbox[0] # width of pixel 51 | geotransform[4] = bbox[1] # rotational coefficient, zero for north up images. 52 | geotransform[2] = bbox[2] # rotational coefficient, zero for north up images. 53 | geotransform[5] = bbox[3] # height of pixel (but negative) 54 | geotransform[0] = bbox[4] - 0.5*bbox[0] - 0.5*bbox[2] # x offset to center of top left pixel. 55 | geotransform[3] = bbox[5] - 0.5*bbox[1] - 0.5*bbox[3] # y offset to center of top left pixel. 56 | 57 | else: # bounding box 58 | geotransform[0] = bbox[3] 59 | geotransform[1] = (bbox[2] - bbox[3]) / float(xsize) 60 | geotransform[2] = 0.0 61 | geotransform[3] = bbox[0] 62 | geotransform[4] = 0.0 63 | geotransform[5] = (bbox[1] - bbox[0]) / float(ysize) 64 | 65 | in_ds.SetGeoTransform(geotransform) 66 | 67 | elif in_ds.GetGCPCount() != 0: 68 | georeference = "GCPs" 69 | srs = in_ds.GetGCPProjection() 70 | geotransform = gdal.GCPsToGeoTransform(in_ds.GetGCPs()) 71 | # Maybe warping before merging ? But warping before merging should use correct pixel size based on max zoom level! 72 | # Or merging only with affine tranformation calculated from GCPs? 73 | # self.out_ds = gdal.AutoCreateWarpedVRT( self.in_ds, self.in_srs_wkt, self.out_srs.ExportToWkt() ) 74 | if geotransform != (0.0, 1.0, 0.0, 0.0, 0.0, 1.0) and in_ds.GetGCPCount()==0: 75 | georeference = " ".join(map(str, geotransform)) 76 | 77 | vrtfilename = str(tempfile.mktemp(os.path.basename(filename)+'.vrt')) 78 | 79 | # Is it a paletted raster? 80 | if in_ds.GetRasterBand(1).GetRasterColorTable() and bands==1: 81 | # Expand rasters with palette into RGBA 82 | if bbox: 83 | preprocess.Preprocess(['','-o',vrtfilename,realfilename+'::'+":".join(map(str,bbox))]) 84 | else: 85 | preprocess.Preprocess(['','-o',vrtfilename,realfilename]) 86 | realfilename = vrtfilename 87 | # Did we added an new geotransform? 88 | elif bbox: 89 | # Save to an GDAL VRT (XML) file to save new geotransform 90 | vrt_drv.CreateCopy(vrtfilename, in_ds) 91 | realfilename = vrtfilename 92 | 93 | reference.ImportFromWkt(srs) 94 | srs = reference.ExportToPrettyWkt() 95 | return filename, georeference, realfilename, geotransform, xsize, ysize, srs 96 | 97 | def SRSInput(srs): 98 | osr.UseExceptions() 99 | reference.SetFromUserInput(srs) 100 | return reference.ExportToPrettyWkt() 101 | 102 | if __name__=='__main__': 103 | import sys 104 | if len(sys.argv) > 1: 105 | print singlefile(sys.argv[1]) 106 | else: 107 | print "Specify a single file to preprocess" 108 | -------------------------------------------------------------------------------- /mapslicer/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import os, sys 5 | import webbrowser 6 | import wx 7 | import wx.lib.delayedresult as delayedresult # threading in wx 8 | 9 | import config 10 | import icons 11 | import wizard 12 | import widgets 13 | import gdalpreprocess 14 | 15 | import wxgdal2tiles as wxgdal 16 | 17 | # TODO: GetText 18 | _ = lambda s: s 19 | 20 | GENERIC_GUI_EVENT = wx.NewEventType() 21 | EVT_GENERIC_GUI = wx.PyEventBinder(GENERIC_GUI_EVENT, 0) 22 | 23 | class GenericGuiEvent(wx.PyEvent): 24 | def __init__(self, data=None): 25 | wx.PyEvent.__init__(self) 26 | self.SetEventType(GENERIC_GUI_EVENT) 27 | self.data = data 28 | 29 | class MainFrame(wx.Frame): 30 | 31 | def __init__(self, *args, **kwds): 32 | #spath = wx.StandardPaths.Get() 33 | config.documentsdir = os.path.expanduser('~') 34 | 35 | self.abortEvent = delayedresult.AbortEvent() 36 | self.jobID = 0 37 | self.rendering = False 38 | self.resume = False 39 | 40 | kwds["style"] = wx.DEFAULT_FRAME_STYLE 41 | wx.Frame.__init__(self, *args, **kwds) 42 | 43 | self.panel_1 = wx.Panel(self, -1) 44 | self.panel_2 = wx.Panel(self.panel_1, -1) 45 | 46 | # Events 47 | self.Bind(EVT_GENERIC_GUI, self.updateRenderText) 48 | self.Bind(wxgdal.EVT_UPDATE_PROGRESS, self.updateProgress) 49 | self.Bind(wx.EVT_CLOSE, self.OnQuit) 50 | 51 | # List of steps on left side 52 | self.bitmap_1 = wx.StaticBitmap(self, -1, icons.getIcon140Bitmap()) 53 | self.steplabel = [] 54 | self.steplabel.append(wx.StaticText(self, -1, _("Tile Profile"))) 55 | self.steplabel.append(wx.StaticText(self, -1, _("Source Data Files"))) 56 | self.steplabel.append(wx.StaticText(self, -1, _("Spatial Reference"))) 57 | self.steplabel.append(wx.StaticText(self, -1, _("Tile Details"))) # Zoom levels, PNG/JPEG, Tile addressing, Postprocessing? 58 | self.steplabel.append(wx.StaticText(self, -1, _("Destination"))) # Directory / database 59 | self.steplabel.append(wx.StaticText(self, -1, _("Viewers"))) 60 | self.steplabel.append(wx.StaticText(self, -1, _("Viewer Details"))) 61 | self.steplabel.append(wx.StaticText(self, -1, _("Rendering"))) 62 | 63 | self.label_10 = wx.StaticText(self, -1, _("MapSlicer - Tile Generator for Map Mashups")) 64 | 65 | self.label_8 = wx.StaticText(self, -1, _("Version %s") % config.version ) 66 | self.label_9 = wx.StaticText(self, -1, _("https://wiki.osgeo.org/wiki/MapSlicer")) 67 | 68 | self.button_back = wx.Button(self, -1, _("Go &Back")) 69 | self.Bind(wx.EVT_BUTTON, self.OnBack, self.button_back) 70 | self.button_continue = wx.Button(self, -1, _("&Continue")) 71 | self.Bind(wx.EVT_BUTTON, self.OnContinue, self.button_continue) 72 | 73 | self.html = wizard.WizardHtmlWindow(self.panel_2, -1) 74 | self.html.SetBorders(0) 75 | self.html.SetMinSize((500, 385)) 76 | 77 | # Set the first step of the wizard 78 | self.SetStep(1) 79 | 80 | self.__set_properties() 81 | self.__do_layout() 82 | 83 | def __set_properties(self): 84 | self.SetTitle(_("MapSlicer - Tile Generator for Map Mashups")) 85 | if sys.platform in ['win32','win64']: 86 | icon = wx.Icon( sys.executable, wx.BITMAP_TYPE_ICO ) 87 | self.SetIcon( icon ) 88 | if sys.platform.startswith('linux'): 89 | self.SetIcon( icons.getIconIcon() ) 90 | self.SetBackgroundColour(wx.Colour(253, 253, 253)) 91 | for label in self.steplabel[1:]: 92 | label.Enable(False) 93 | self.label_10.SetForegroundColour(wx.Colour(220, 83, 9)) 94 | self.label_10.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, "")) 95 | self.panel_2.SetBackgroundColour(wx.Colour(255, 255, 255)) 96 | self.panel_1.SetBackgroundColour(wx.Colour(192, 192, 192)) 97 | self.label_8.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "")) 98 | self.label_9.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "")) 99 | self.button_back.Enable(False) 100 | self.button_continue.SetDefault() 101 | 102 | def __do_layout(self): 103 | sizer_1 = wx.BoxSizer(wx.VERTICAL) 104 | sizer_3 = wx.BoxSizer(wx.HORIZONTAL) 105 | sizer_5 = wx.BoxSizer(wx.VERTICAL) 106 | sizer_2 = wx.BoxSizer(wx.HORIZONTAL) 107 | sizer_6 = wx.BoxSizer(wx.VERTICAL) 108 | sizer_9 = wx.BoxSizer(wx.HORIZONTAL) 109 | sizer_10 = wx.BoxSizer(wx.HORIZONTAL) 110 | sizer_4 = wx.BoxSizer(wx.VERTICAL) 111 | sizer_8 = wx.BoxSizer(wx.VERTICAL) 112 | sizer_4.Add(self.bitmap_1, 0, wx.BOTTOM, 25) 113 | for label in self.steplabel: 114 | sizer_8.Add(label, 0, wx.ALL, 5) 115 | sizer_4.Add(sizer_8, 1, wx.LEFT|wx.EXPAND, 15) 116 | sizer_2.Add(sizer_4, 0, wx.RIGHT|wx.EXPAND, 5) 117 | sizer_6.Add(self.label_10, 0, wx.TOP|wx.BOTTOM, 15) 118 | sizer_10.Add(self.html, 1, wx.ALL|wx.EXPAND, 30) 119 | self.panel_2.SetSizer(sizer_10) 120 | sizer_9.Add(self.panel_2, 1, wx.ALL|wx.EXPAND, 2) 121 | self.panel_1.SetSizer(sizer_9) 122 | sizer_6.Add(self.panel_1, 1, wx.ALL|wx.EXPAND, 2) 123 | sizer_2.Add(sizer_6, 1, wx.LEFT|wx.RIGHT|wx.EXPAND, 10) 124 | sizer_1.Add(sizer_2, 1, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 15) 125 | sizer_5.Add(self.label_8, 0, 0, 0) 126 | sizer_5.Add(self.label_9, 0, 0, 0) 127 | sizer_3.Add(sizer_5, 1, wx.EXPAND, 0) 128 | sizer_3.Add(self.button_back, 0, wx.RIGHT, 10) 129 | sizer_3.Add(self.button_continue, 0, wx.RIGHT, 10) 130 | sizer_1.Add(sizer_3, 0, wx.ALL|wx.EXPAND, 15) 131 | self.SetSizer(sizer_1) 132 | sizer_1.SetSizeHints(self) 133 | #sizer_1.Fit(self) 134 | self.Layout() 135 | self.Centre(wx.BOTH) 136 | #self.SetMinSize((700, 500)) 137 | 138 | def OnQuit(self,Event): 139 | self.Destroy() 140 | 141 | def SetLabelUpTo(self, step): 142 | if step > len(self.steplabel): 143 | step = len(self.steplabel) 144 | for i in range(0,step): 145 | self.steplabel[i].Enable() 146 | for i in range(step, len(self.steplabel)): 147 | self.steplabel[i].Enable(False) 148 | 149 | def SetStep(self, step): 150 | # 1 - 7 normal, step 8 - before render + rendering + resume, step 9 - final 151 | self.SetLabelUpTo(step) 152 | 153 | # Label of the buttons 154 | if step < 8: 155 | self.button_continue.SetLabel(_("&Continue")) 156 | self.button_back.SetLabel(_("Go &Back")) 157 | if step == 8: 158 | if self.rendering: 159 | self.button_continue.SetLabel(_("&Render")) 160 | self.button_back.SetLabel(_("&Stop")) 161 | elif self.resume: 162 | self.button_continue.SetLabel(_("&Resume")) 163 | self.button_back.SetLabel(_("Go &Back")) 164 | else: 165 | self.button_continue.SetLabel(_("&Render")) 166 | self.button_back.SetLabel(_("Go &Back")) 167 | if step == 9: 168 | self.button_back.SetLabel(_("Go &Back")) 169 | self.button_continue.SetLabel(_("Exit")) 170 | self.button_continue.Enable() 171 | 172 | # Enable / Disable 173 | self.button_back.Enable(step > 1) 174 | 175 | if step == 8 and self.rendering: 176 | self.button_continue.Enable(False) 177 | else: 178 | self.button_continue.Enable() 179 | 180 | oldstep = self.html.GetActiveStep() 181 | if oldstep != step: 182 | self.html.SaveStep(oldstep) 183 | self.html.SetStep(step) 184 | 185 | def OnBack(self, event): 186 | step = self.html.GetActiveStep() 187 | if step > 0 and not self.rendering: 188 | self.SetStep( step-1 ) 189 | elif self.rendering: 190 | self._renderstop() 191 | self.SetStep( step ) 192 | 193 | def OnContinue(self, event): 194 | step = self.html.GetActiveStep() 195 | if step == 2: 196 | if len(config.files) == 0: 197 | wx.MessageBox(_("""You have to add some files for rendering"""), _("No files specified"), wx.ICON_ERROR) 198 | return 199 | if config.files[0][1] == '' and config.profile != 'raster': 200 | wx.MessageBox(_("""The file you have specified does not have any georeference.\n\nClick on the 'Georeference' button and give a bounding box or \ncreate a world file (.wld) for the specified file."""), _("Missing georeference"), wx.ICON_ERROR) 201 | return 202 | if step == 3: 203 | self.html.SaveStep(3) 204 | #print config.srs 205 | if config.files[0][1] != '': 206 | srs = gdalpreprocess.SRSInput(config.srs) 207 | if not srs: 208 | wx.MessageBox(_("""You have to specify reference system of your coordinates.\n\nTIP: for latitude/longitude in WGS84 you should type 'EPSG:4326'"""), _("Not valid spatial reference system"), wx.ICON_ERROR) 209 | return 210 | else: 211 | config.srs = srs 212 | if step == 5: 213 | self.html.SaveStep(5) 214 | 215 | # If the user selected the output directory himself. 216 | if os.path.exists(config.outputdir): 217 | if not os.access(config.outputdir, os.W_OK): 218 | wx.MessageBox(_("The selected output directory '%s' is not writeable.") % config.outputdir, 219 | _("Bad permissions"), wx.ICON_ERROR) 220 | return 221 | # Default output directory on Windows and Mac. 222 | else: 223 | dirname = os.path.split(config.outputdir)[0] 224 | if not os.access(dirname, os.W_OK): 225 | wx.MessageBox(_("""The selected output directory '%s' can't be created, \ 226 | because its superdirectory '%s' is not writeable.""") % (config.outputdir, dirname), 227 | _("Bad permissions"), wx.ICON_ERROR) 228 | return 229 | 230 | if step == 5 and config.profile == 'gearth': 231 | self.html.SaveStep(5) 232 | if config.format.startswith('garmin'): 233 | step = 6 # Skip settings of the viewers 234 | 235 | if step == 8: 236 | self._renderstart() 237 | self.SetStep( 8 ) 238 | if step < 8: # maximum is 7 239 | self.SetStep( step + 1 ) 240 | if step > 8: 241 | self.Destroy() 242 | 243 | def _add(self, filename): 244 | filename = filename.encode('utf8') 245 | 246 | if len(config.files) > 0: 247 | wx.MessageBox(_("""Unfortunately the merging of files is not yet implemented in the MapSlicer GUI. Only the first file in the list is going to be rendered."""), _("Not yet implemented :-("), wx.ICON_ERROR) 248 | 249 | filerecord = gdalpreprocess.singlefile(filename) 250 | if filerecord: 251 | config.files = [] 252 | config.files.append(filerecord) 253 | 254 | def _renderstop(self): 255 | self.g2t.stop() 256 | self.abortEvent.set() 257 | self.rendering = False 258 | self.resume = True 259 | self.html.UpdateRenderText(_("Rendering stopped !!!!")) 260 | self.html.StopThrobber() 261 | 262 | def _renderstart(self): 263 | self.abortEvent.clear() 264 | self.rendering = True 265 | self.html.UpdateRenderText(_("Started...")) 266 | self.html.StartThrobber() 267 | self.jobID += 1 268 | 269 | params = self.createParams() 270 | #print "-"*20 271 | #for p in params: 272 | # print type(p), p 273 | 274 | delayedresult.startWorker(self._resultConsumer, self._resultProducer, 275 | wargs=(self.jobID,self.abortEvent, params), jobID=self.jobID) 276 | 277 | 278 | def createParams(self): 279 | params = ['--profile',config.profile if not config.format.startswith('garmin') else 'garmin', 280 | '--s_srs',config.srs, 281 | '--zoom',"%i-%i" % (config.tminz, config.tmaxz), 282 | '--title',config.title, 283 | '--copyright',config.copyright, 284 | '--tile-format', config.format if not config.format.startswith('garmin') else 'jpeg' 285 | ] 286 | viewer = 'none' 287 | if config.google: 288 | viewer = 'google' 289 | if config.openlayers: 290 | viewer = 'openlayers' 291 | if config.google and config.openlayers: 292 | viewer = 'all' 293 | params.extend(['--webviewer',viewer]) 294 | if config.kml: 295 | params.append('--force-kml') 296 | 297 | if config.nodata: 298 | params.extend(['--srcnodata','%f,%f,%f' % config.nodata]) 299 | 300 | if config.format.startswith('garmin'): 301 | params.extend(['--tilesize',config.format[6:]]) 302 | 303 | if config.url: 304 | params.extend(['--url',config.url]) 305 | if config.googlekey: 306 | params.extend(['--googlekey',config.googlekey]) 307 | if config.yahookey: 308 | params.extend(['--yahookey',config.googlekey]) 309 | 310 | # And finally the files 311 | params.append( config.files[0][2].encode('utf-8') ) 312 | 313 | # and output directory 314 | params.append( config.outputdir ) 315 | 316 | return params 317 | 318 | def updateRenderText(self, event): 319 | # do all of this stuff on the GUI thread 320 | self.html.UpdateRenderText(event.data) 321 | 322 | def updateProgress(self, event): 323 | # do all of this stuff on the GUI thread 324 | self.html.UpdateRenderProgress(event.progress) 325 | 326 | def _resultProducer(self, jobID, abortEvent, params): 327 | try: 328 | if self.resume and params[0] != '--resume': 329 | params.insert(0, '--resume') 330 | 331 | self.g2t = wxgdal.wxPPGDAL2Tiles(params) 332 | self.g2t.set_event_handler(self) 333 | 334 | wx.PostEvent(self, GenericGuiEvent(_("Opening the input files"))) 335 | self.g2t.open_input() 336 | # Opening and preprocessing of the input file 337 | 338 | if not self.g2t.stopped and not abortEvent(): 339 | wx.PostEvent(self, GenericGuiEvent(_("Generating viewers and metadata"))) 340 | # Generation of main metadata files and HTML viewers 341 | self.g2t.generate_metadata() 342 | 343 | if not self.g2t.stopped and not abortEvent(): 344 | wx.PostEvent(self, GenericGuiEvent(_("Rendering the base tiles"))) 345 | # Generation of the lowest tiles 346 | self.g2t.generate_base_tiles() 347 | 348 | if not self.g2t.stopped and not abortEvent(): 349 | wx.PostEvent(self, GenericGuiEvent(_("Rendering the overview tiles in the pyramid"))) 350 | # Generation of the overview tiles (higher in the pyramid) 351 | self.g2t.generate_overview_tiles() 352 | 353 | if not self.g2t.stopped and not abortEvent(): 354 | wx.PostEvent(self, GenericGuiEvent(_("Generating KML"))) 355 | # Generation of KML 356 | self.g2t.generate_kml() 357 | 358 | except Exception, e: 359 | self.g2t = e 360 | 361 | def _resultConsumer(self, delayedResult): 362 | jobID = delayedResult.getJobID() 363 | assert jobID == self.jobID 364 | result = delayedResult.get() 365 | 366 | if isinstance(self.g2t, Exception): 367 | self.rendering = False 368 | self.resume = False 369 | self.SetStep(8) 370 | wx.PostEvent(self, GenericGuiEvent(_("Rendering error!"))) 371 | self.html.StopThrobber() 372 | raise self.g2t 373 | 374 | elif not self.g2t.stopped: 375 | self.rendering = False 376 | self.resume = False 377 | self.SetStep(9) 378 | 379 | 380 | # end of class MainFrame 381 | -------------------------------------------------------------------------------- /mapslicer/pp/ppauto.py: -------------------------------------------------------------------------------- 1 | # Parallel Python Software: http://www.parallelpython.com 2 | # Copyright (c) 2005-2009, Vitalii Vanovschi 3 | # All rights reserved. 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | # * Redistributions of source code must retain the above copyright notice, 7 | # this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above copyright 9 | # notice, this list of conditions and the following disclaimer in the 10 | # documentation and/or other materials provided with the distribution. 11 | # * Neither the name of the author nor the names of its contributors 12 | # may be used to endorse or promote products derived from this software 13 | # without specific prior written permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 25 | # THE POSSIBILITY OF SUCH DAMAGE. 26 | """Parallel Python Software, Auto-Discovery Service 27 | 28 | http://www.parallelpython.com - updates, documentation, examples and support 29 | forums 30 | """ 31 | 32 | import socket 33 | import sys 34 | import time 35 | import logging 36 | import thread 37 | 38 | copyright = "Copyright (c) 2005-2009 Vitalii Vanovschi. All rights reserved" 39 | version = "1.5.7" 40 | 41 | # broadcast every 10 sec 42 | BROADCAST_INTERVAL = 10 43 | 44 | 45 | class Discover(object): 46 | """Auto-discovery service class""" 47 | 48 | def __init__(self, base, isclient=False): 49 | self.base = base 50 | self.hosts = [] 51 | self.isclient = isclient 52 | 53 | def run(self, interface_addr, broadcast_addr): 54 | """Starts auto-discovery""" 55 | self.interface_addr = interface_addr 56 | self.broadcast_addr = broadcast_addr 57 | self.bsocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 58 | self.bsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 59 | self.bsocket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) 60 | 61 | try: 62 | self.listen() 63 | except: 64 | sys.excepthook(*sys.exc_info()) 65 | 66 | def broadcast(self): 67 | """Sends a broadcast""" 68 | if self.isclient: 69 | logging.debug("Client sends initial broadcast to (%s, %i)" 70 | % self.broadcast_addr) 71 | self.bsocket.sendto("C", self.broadcast_addr) 72 | else: 73 | while True: 74 | logging.debug("Server sends broadcast to (%s, %i)" 75 | % self.broadcast_addr) 76 | self.bsocket.sendto("S", self.broadcast_addr) 77 | time.sleep(BROADCAST_INTERVAL) 78 | 79 | def listen(self): 80 | """Listens for broadcasts from other clients/servers""" 81 | logging.debug("Listening (%s, %i)" % self.interface_addr) 82 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 83 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 84 | s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) 85 | s.bind(self.interface_addr) 86 | 87 | thread.start_new_thread(self.broadcast, ()) 88 | 89 | while True: 90 | try: 91 | message, (host, port) = s.recvfrom(1024) 92 | remote_address = (host, self.broadcast_addr[1]) 93 | hostid = host + ":" + str(self.broadcast_addr[1]) 94 | logging.debug("Discovered host (%s, %i) message=%c" 95 | % (remote_address + (message[0], ))) 96 | if not self.base.autopp_list.get(hostid, 0) and self.isclient \ 97 | and message[0] == 'S': 98 | logging.debug("Connecting to host %s" % (hostid, )) 99 | thread.start_new_thread(self.base.connect1, 100 | remote_address+(False, )) 101 | if not self.isclient and message[0] == 'C': 102 | logging.debug("Replying to host %s" % (hostid, )) 103 | self.bsocket.sendto("S", self.broadcast_addr) 104 | except: 105 | logging.error("An error has occured during execution of " 106 | "Discover.listen") 107 | sys.excepthook(*sys.exc_info()) 108 | -------------------------------------------------------------------------------- /mapslicer/pp/ppserver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Parallel Python Software: http://www.parallelpython.com 3 | # Copyright (c) 2005-2009, Vitalii Vanovschi 4 | # All rights reserved. 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright notice, 8 | # this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of the author nor the names of its contributors 13 | # may be used to endorse or promote products derived from this software 14 | # without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26 | # THE POSSIBILITY OF SUCH DAMAGE. 27 | """ 28 | Parallel Python Software, Network Server 29 | 30 | http://www.parallelpython.com - updates, documentation, examples and support 31 | forums 32 | """ 33 | 34 | import logging 35 | import getopt 36 | import sys 37 | import socket 38 | import thread 39 | import random 40 | import string 41 | import time 42 | import os 43 | 44 | import pptransport 45 | import ppauto 46 | from pp import Server 47 | 48 | 49 | copyright = "Copyright (c) 2005-2009 Vitalii Vanovschi. All rights reserved" 50 | version = "1.5.7" 51 | 52 | # compartibility with Python 2.6 53 | try: 54 | import hashlib 55 | sha_new = hashlib.sha1 56 | except ImportError: 57 | import sha 58 | sha_new = sha.new 59 | 60 | 61 | class _NetworkServer(Server): 62 | """Network Server Class 63 | """ 64 | 65 | def __init__(self, ncpus="autodetect", interface="0.0.0.0", 66 | broadcast="255.255.255.255", port=None, secret=None, 67 | timeout=None, loglevel=logging.WARNING, restart=False, 68 | proto=0): 69 | Server.__init__(self, ncpus, secret=secret, loglevel=loglevel, 70 | restart=restart, proto=proto) 71 | self.host = interface 72 | self.bcast = broadcast 73 | if port is not None: 74 | self.port = port 75 | else: 76 | self.port = self.default_port 77 | self.timeout = timeout 78 | self.ncon = 0 79 | self.last_con_time = time.time() 80 | self.ncon_lock = thread.allocate_lock() 81 | 82 | logging.debug("Strarting network server interface=%s port=%i" 83 | % (self.host, self.port)) 84 | if self.timeout is not None: 85 | logging.debug("ppserver will exit in %i seconds if no "\ 86 | "connections with clients exist" % (self.timeout)) 87 | thread.start_new_thread(self.check_timeout, ()) 88 | 89 | def ncon_add(self, val): 90 | """Keeps track of the number of connections and time of the last one""" 91 | self.ncon_lock.acquire() 92 | self.ncon += val 93 | self.last_con_time = time.time() 94 | self.ncon_lock.release() 95 | 96 | def check_timeout(self): 97 | """Checks if timeout happened and shutdowns server if it did""" 98 | while True: 99 | if self.ncon == 0: 100 | idle_time = time.time() - self.last_con_time 101 | if idle_time < self.timeout: 102 | time.sleep(self.timeout - idle_time) 103 | else: 104 | logging.debug("exiting ppserver due to timeout (no client"\ 105 | " connections in last %i sec)", self.timeout) 106 | os._exit(0) 107 | else: 108 | time.sleep(self.timeout) 109 | 110 | def listen(self): 111 | """Initiates listenting to incoming connections""" 112 | try: 113 | ssocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 114 | # following allows ppserver to restart faster on the same port 115 | ssocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 116 | ssocket.bind((self.host, self.port)) 117 | ssocket.listen(5) 118 | except socket.error: 119 | logging.error("Cannot create socket with port " + str(self.port) 120 | + " (port is already in use)") 121 | 122 | try: 123 | while 1: 124 | #accept connections from outside 125 | (csocket, address) = ssocket.accept() 126 | #now do something with the clientsocket 127 | #in this case, we'll pretend this is a threaded server 128 | thread.start_new_thread(self.crun, (csocket, )) 129 | except: 130 | logging.debug("Closing server socket") 131 | ssocket.close() 132 | 133 | def crun(self, csocket): 134 | """Authenticates client and handles its jobs""" 135 | mysocket = pptransport.CSocketTransport(csocket) 136 | #send PP version 137 | mysocket.send(version) 138 | #generate a random string 139 | srandom = "".join([random.choice(string.ascii_letters) 140 | for i in xrange(16)]) 141 | mysocket.send(srandom) 142 | answer = sha_new(srandom+self.secret).hexdigest() 143 | cleintanswer = mysocket.receive() 144 | if answer != cleintanswer: 145 | logging.warning("Authentification failed, client host=%s, port=%i" 146 | % csocket.getpeername()) 147 | mysocket.send("FAILED") 148 | csocket.close() 149 | return 150 | else: 151 | mysocket.send("OK") 152 | 153 | ctype = mysocket.receive() 154 | logging.debug("Control message received: " + ctype) 155 | self.ncon_add(1) 156 | try: 157 | if ctype == "STAT": 158 | #reset time at each new connection 159 | self.get_stats()["local"].time = 0.0 160 | mysocket.send(str(self.get_ncpus())) 161 | while 1: 162 | mysocket.receive() 163 | mysocket.send(str(self.get_stats()["local"].time)) 164 | elif ctype=="EXEC": 165 | while 1: 166 | sfunc = mysocket.creceive() 167 | sargs = mysocket.receive() 168 | fun = self.insert(sfunc, sargs) 169 | sresult = fun(True) 170 | mysocket.send(sresult) 171 | except: 172 | #print sys.excepthook(*sys.exc_info()) 173 | logging.debug("Closing client socket") 174 | csocket.close() 175 | self.ncon_add(-1) 176 | 177 | def broadcast(self): 178 | """Initiaates auto-discovery mechanism""" 179 | discover = ppauto.Discover(self) 180 | thread.start_new_thread(discover.run, 181 | ((self.host, self.port), 182 | (self.bcast, self.port)), 183 | ) 184 | 185 | 186 | def parse_config(file_loc): 187 | """ 188 | Parses a config file in a very forgiving way. 189 | """ 190 | # If we don't have configobj installed then let the user know and exit 191 | try: 192 | from configobj import ConfigObj 193 | except ImportError, ie: 194 | print >> sys.stderr, "ERROR: You must have configobj installed to use \ 195 | configuration files. You can still use command line switches." 196 | sys.exit(1) 197 | 198 | if not os.access(file_loc, os.F_OK): 199 | print >> sys.stderr, "ERROR: Can not access %s." % arg 200 | sys.exit(1) 201 | 202 | # Load the configuration file 203 | config = ConfigObj(file_loc) 204 | # try each config item and use the result if it exists. If it doesn't 205 | # then simply pass and move along 206 | try: 207 | args['secret'] = config['general'].get('secret') 208 | except: 209 | pass 210 | 211 | try: 212 | autodiscovery = config['network'].as_bool('autodiscovery') 213 | except: 214 | pass 215 | 216 | try: 217 | args['interface'] = config['network'].get('interface', 218 | default="0.0.0.0") 219 | except: 220 | pass 221 | 222 | try: 223 | args['broadcast'] = config['network'].get('broadcast') 224 | except: 225 | pass 226 | 227 | try: 228 | args['port'] = config['network'].as_int('port') 229 | except: 230 | pass 231 | 232 | try: 233 | args['loglevel'] = config['general'].as_bool('debug') 234 | except: 235 | pass 236 | 237 | try: 238 | args['ncpus'] = config['general'].as_int('workers') 239 | except: 240 | pass 241 | 242 | try: 243 | args['proto'] = config['general'].as_int('proto') 244 | except: 245 | pass 246 | 247 | try: 248 | args['restart'] = config['general'].as_bool('restart') 249 | except: 250 | pass 251 | 252 | try: 253 | args['timeout'] = config['network'].as_int('timeout') 254 | except: 255 | pass 256 | # Return a tuple of the args dict and autodiscovery variable 257 | return args, autodiscovery 258 | 259 | 260 | def print_usage(): 261 | """Prints help""" 262 | print "Parallel Python Network Server (pp-" + version + ")" 263 | print "Usage: ppserver.py [-hdar] [-n proto] [-c config_path]"\ 264 | " [-i interface] [-b broadcast] [-p port] [-w nworkers]"\ 265 | " [-s secret] [-t seconds]" 266 | print 267 | print "Options: " 268 | print "-h : this help message" 269 | print "-d : debug" 270 | print "-a : enable auto-discovery service" 271 | print "-r : restart worker process after each"\ 272 | " task completion" 273 | print "-n proto : protocol number for pickle module" 274 | print "-c path : path to config file" 275 | print "-i interface : interface to listen" 276 | print "-b broadcast : broadcast address for auto-discovery service" 277 | print "-p port : port to listen" 278 | print "-w nworkers : number of workers to start" 279 | print "-s secret : secret for authentication" 280 | print "-t seconds : timeout to exit if no connections with "\ 281 | "clients exist" 282 | print 283 | print "Due to the security concerns always use a non-trivial secret key." 284 | print "Secret key set by -s switch will override secret key assigned by" 285 | print "pp_secret variable in .pythonrc.py" 286 | print 287 | print "Please visit http://www.parallelpython.com for extended up-to-date" 288 | print "documentation, examples and support forums" 289 | 290 | 291 | if __name__ == "__main__": 292 | try: 293 | opts, args = getopt.getopt(sys.argv[1:], 294 | "hdarn:c:b:i:p:w:s:t:", ["help"]) 295 | except getopt.GetoptError: 296 | print_usage() 297 | sys.exit(1) 298 | 299 | args = {} 300 | autodiscovery = False 301 | 302 | for opt, arg in opts: 303 | if opt in ("-h", "--help"): 304 | print_usage() 305 | sys.exit() 306 | elif opt == "-c": 307 | args, autodiscovery = parse_config(arg) 308 | elif opt == "-d": 309 | args["loglevel"] = logging.DEBUG 310 | elif opt == "-i": 311 | args["interface"] = arg 312 | elif opt == "-s": 313 | args["secret"] = arg 314 | elif opt == "-p": 315 | args["port"] = int(arg) 316 | elif opt == "-w": 317 | args["ncpus"] = int(arg) 318 | elif opt == "-a": 319 | autodiscovery = True 320 | elif opt == "-r": 321 | args["restart"] = True 322 | elif opt == "-b": 323 | args["broadcast"] = arg 324 | elif opt == "-n": 325 | args["proto"] = int(arg) 326 | elif opt == "-t": 327 | args["timeout"] = int(arg) 328 | 329 | server = _NetworkServer(**args) 330 | if autodiscovery: 331 | server.broadcast() 332 | server.listen() 333 | #have to destroy it here explicitelly otherwise an exception 334 | #comes out in Python 2.4 335 | del server 336 | 337 | # Parallel Python Software: http://www.parallelpython.com 338 | -------------------------------------------------------------------------------- /mapslicer/pp/pptransport.py: -------------------------------------------------------------------------------- 1 | # Parallel Python Software: http://www.parallelpython.com 2 | # Copyright (c) 2005-2009, Vitalii Vanovschi 3 | # All rights reserved. 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | # * Redistributions of source code must retain the above copyright notice, 7 | # this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above copyright 9 | # notice, this list of conditions and the following disclaimer in the 10 | # documentation and/or other materials provided with the distribution. 11 | # * Neither the name of the author nor the names of its contributors 12 | # may be used to endorse or promote products derived from this software 13 | # without specific prior written permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 25 | # THE POSSIBILITY OF SUCH DAMAGE. 26 | """ 27 | Parallel Python Software, PP Transport 28 | 29 | http://www.parallelpython.com - updates, documentation, examples and support 30 | forums 31 | """ 32 | import os 33 | import struct 34 | import socket 35 | import logging 36 | 37 | copyright = "Copyright (c) 2005-2009 Vitalii Vanovschi. All rights reserved" 38 | version = "1.5.7" 39 | 40 | # compartibility with Python 2.6 41 | try: 42 | import hashlib 43 | sha_new = hashlib.sha1 44 | md5_new = hashlib.md5 45 | except ImportError: 46 | import sha 47 | import md5 48 | sha_new = sha.new 49 | md5_new = md5.new 50 | 51 | 52 | class Transport(object): 53 | 54 | def send(self, msg): 55 | raise NotImplemented("abstact function 'send' must be implemented "\ 56 | "in a subclass") 57 | 58 | def receive(self, preprocess=None): 59 | raise NotImplemented("abstact function 'receive' must be implemented "\ 60 | "in a subclass") 61 | 62 | def authenticate(self, secret): 63 | remote_version = self.receive() 64 | if version != remote_version: 65 | logging.error("PP version mismatch (local: pp-%s, remote: pp-%s)" 66 | % (version, remote_version)) 67 | logging.error("Please install the same version of PP on all nodes") 68 | return False 69 | srandom = self.receive() 70 | answer = sha_new(srandom+secret).hexdigest() 71 | self.send(answer) 72 | response = self.receive() 73 | if response == "OK": 74 | return True 75 | else: 76 | return False 77 | 78 | def close(self): 79 | pass 80 | 81 | def _connect(self, host, port): 82 | pass 83 | 84 | 85 | class CTransport(Transport): 86 | """Cached transport 87 | """ 88 | rcache = {} 89 | 90 | def hash(self, msg): 91 | return md5_new(msg).hexdigest() 92 | 93 | def csend(self, msg): 94 | hash1 = self.hash(msg) 95 | if hash1 in self.scache: 96 | self.send("H" + hash1) 97 | else: 98 | self.send("N" + msg) 99 | self.scache[hash1] = True 100 | 101 | def creceive(self, preprocess=None): 102 | msg = self.receive() 103 | if msg[0] == 'H': 104 | hash1 = msg[1:] 105 | else: 106 | msg = msg[1:] 107 | hash1 = self.hash(msg) 108 | self.rcache[hash1] = map(preprocess, (msg, ))[0] 109 | return self.rcache[hash1] 110 | 111 | 112 | class PipeTransport(Transport): 113 | 114 | def __init__(self, r, w): 115 | self.scache = {} 116 | self.exiting = False 117 | if isinstance(r, file) and isinstance(w, file): 118 | self.r = r 119 | self.w = w 120 | else: 121 | raise TypeError("Both arguments of PipeTransport constructor " \ 122 | "must be file objects") 123 | 124 | def send(self, msg): 125 | self.w.write(struct.pack("!Q", len(msg))) 126 | self.w.flush() 127 | self.w.write(msg) 128 | self.w.flush() 129 | 130 | def receive(self, preprocess=None): 131 | size_packed = self.r.read(struct.calcsize("!Q")) 132 | msg_len = struct.unpack("!Q", size_packed)[0] 133 | msg = self.r.read(msg_len) 134 | return map(preprocess, (msg, ))[0] 135 | 136 | def close(self): 137 | self.w.close() 138 | self.r.close() 139 | 140 | 141 | class SocketTransport(Transport): 142 | 143 | def __init__(self, socket1=None): 144 | if socket1: 145 | self.socket = socket1 146 | else: 147 | self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 148 | self.scache = {} 149 | 150 | def send(self, data): 151 | size = struct.pack("!Q", len(data)) 152 | t_size = struct.calcsize("!Q") 153 | s_size = 0L 154 | while s_size < t_size: 155 | p_size = self.socket.send(size[s_size:]) 156 | if p_size == 0: 157 | raise RuntimeError("Socket connection is broken") 158 | s_size += p_size 159 | 160 | t_size = len(data) 161 | s_size = 0L 162 | while s_size < t_size: 163 | p_size = self.socket.send(data[s_size:]) 164 | if p_size == 0: 165 | raise RuntimeError("Socket connection is broken") 166 | s_size += p_size 167 | 168 | def receive(self, preprocess=None): 169 | e_size = struct.calcsize("!Q") 170 | r_size = 0 171 | data = "" 172 | while r_size < e_size: 173 | msg = self.socket.recv(e_size-r_size) 174 | if msg == "": 175 | raise RuntimeError("Socket connection is broken") 176 | r_size += len(msg) 177 | data += msg 178 | e_size = struct.unpack("!Q", data)[0] 179 | 180 | r_size = 0 181 | data = "" 182 | while r_size < e_size: 183 | msg = self.socket.recv(e_size-r_size) 184 | if msg == "": 185 | raise RuntimeError("Socket connection is broken") 186 | r_size += len(msg) 187 | data += msg 188 | return data 189 | 190 | def close(self): 191 | self.socket.close() 192 | 193 | def _connect(self, host, port): 194 | self.socket.connect((host, port)) 195 | 196 | 197 | class CPipeTransport(PipeTransport, CTransport): 198 | pass 199 | 200 | 201 | class CSocketTransport(SocketTransport, CTransport): 202 | pass 203 | 204 | # Parallel Python Software: http://www.parallelpython.com 205 | -------------------------------------------------------------------------------- /mapslicer/pp/ppworker.py: -------------------------------------------------------------------------------- 1 | # Parallel Python Software: http://www.parallelpython.com 2 | # Copyright (c) 2005-2009, Vitalii Vanovschi 3 | # All rights reserved. 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | # * Redistributions of source code must retain the above copyright notice, 7 | # this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above copyright 9 | # notice, this list of conditions and the following disclaimer in the 10 | # documentation and/or other materials provided with the distribution. 11 | # * Neither the name of the author nor the names of its contributors 12 | # may be used to endorse or promote products derived from this software 13 | # without specific prior written permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 25 | # THE POSSIBILITY OF SUCH DAMAGE. 26 | """ 27 | Parallel Python Software, PP Worker 28 | 29 | http://www.parallelpython.com - updates, documentation, examples and support 30 | forums 31 | """ 32 | import sys 33 | import os 34 | import StringIO 35 | import cPickle as pickle 36 | import pptransport 37 | 38 | copyright = "Copyright (c) 2005-2009 Vitalii Vanovschi. All rights reserved" 39 | version = "1.5.7" 40 | 41 | 42 | def import_module(name): 43 | mod = __import__(name) 44 | components = name.split('.') 45 | for comp in components[1:]: 46 | mod = getattr(mod, comp) 47 | return mod 48 | 49 | 50 | def preprocess(msg): 51 | fname, fsources, imports = pickle.loads(msg) 52 | fobjs = [compile(fsource, '', 'exec') for fsource in fsources] 53 | for module in imports: 54 | try: 55 | globals()[module.split('.')[0]] = __import__(module) 56 | except: 57 | print "An error has occured during the module import" 58 | sys.excepthook(*sys.exc_info()) 59 | return fname, fobjs 60 | 61 | 62 | class _WorkerProcess(object): 63 | 64 | def __init__(self): 65 | self.hashmap = {} 66 | self.e = sys.__stderr__ 67 | self.sout = StringIO.StringIO() 68 | # self.sout = open("/tmp/pp.debug","a+") 69 | sys.stdout = self.sout 70 | #sys.stderr = self.sout 71 | self.t = pptransport.CPipeTransport(sys.stdin, sys.__stdout__) 72 | self.t.send(str(os.getpid())) 73 | self.pickle_proto = int(self.t.receive()) 74 | 75 | def run(self): 76 | try: 77 | #execution cycle 78 | while 1: 79 | 80 | __fname, __fobjs = self.t.creceive(preprocess) 81 | 82 | __sargs = self.t.receive() 83 | 84 | for __fobj in __fobjs: 85 | try: 86 | eval(__fobj) 87 | globals().update(locals()) 88 | except: 89 | print "An error has occured during the " + \ 90 | "function import" 91 | sys.excepthook(*sys.exc_info()) 92 | 93 | __args = pickle.loads(__sargs) 94 | 95 | __f = locals()[__fname] 96 | try: 97 | __result = __f(*__args) 98 | except: 99 | print "An error has occured during the function execution" 100 | sys.excepthook(*sys.exc_info()) 101 | sys.stderr.write("EXIT\n") 102 | sys.stderr.flush() 103 | __result = None 104 | 105 | __sresult = pickle.dumps((__result, self.sout.getvalue()), 106 | self.pickle_proto) 107 | 108 | self.t.send(__sresult) 109 | self.sout.truncate(0) 110 | except: 111 | print "Fatal error has occured during the function execution" 112 | sys.excepthook(*sys.exc_info()) 113 | __result = None 114 | __sresult = pickle.dumps((__result, self.sout.getvalue()), 115 | self.pickle_proto) 116 | sys.stderr.write("EXIT\n") 117 | sys.stderr.flush() 118 | self.t.send(__sresult) 119 | 120 | 121 | if __name__ == "__main__": 122 | # add the directory with ppworker.py to the path 123 | sys.path.append(os.path.dirname(__file__)) 124 | wp = _WorkerProcess() 125 | wp.run() 126 | 127 | # Parallel Python Software: http://www.parallelpython.com 128 | -------------------------------------------------------------------------------- /mapslicer/preprocess.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # MapSlicer/GDAL2Tiles Preprocess module 4 | # ------------------------------------- 5 | # Copyright (C) 2008, Klokan Petr Pridal 6 | # 7 | # Based on gdal_vrtmerge.py from GDAL package: 8 | # 9 | # Copyright (C) 2000, Atlantis Scientific Inc. 10 | # Copyright (C) 2000, Frank Warmerdam, warmerdam@pobox.com 11 | # Copyright (C) 2005, Gabriel Ebner 12 | # Copyright (C) 2005, Norman Vine 13 | # 14 | # This library is free software; you can redistribute it and/or 15 | # modify it under the terms of the GNU Library General Public 16 | # License as published by the Free Software Foundation; either 17 | # version 2 of the License, or (at your option) any later version. 18 | # 19 | # This library is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | # Library General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU Library General Public 25 | # License along with this library; if not, write to the 26 | # Free Software Foundation, Inc., 59 Temple Place - Suite 330, 27 | # Boston, MA 02111-1307, USA. 28 | 29 | try: 30 | from osgeo import gdal, osr 31 | except ImportError: 32 | import gdal, osr 33 | 34 | import sys 35 | 36 | # ============================================================================= 37 | def names_to_fileinfos( names ): 38 | """ 39 | Translate a list of GDAL filenames, into file_info objects. 40 | 41 | names -- list of valid GDAL dataset names. 42 | 43 | Returns a list of file_info objects. There may be less file_info objects 44 | than names if some of the names could not be opened as GDAL files. 45 | """ 46 | 47 | file_infos = [] 48 | for name in names: 49 | fi = file_info() 50 | if fi.init_from_name(name): 51 | file_infos.append(fi) 52 | 53 | return file_infos 54 | 55 | # ***************************************************************************** 56 | class file_info: 57 | """A class holding information about a GDAL file.""" 58 | 59 | def init_from_name(self, filename): 60 | """ 61 | Initialize file_info from filename 62 | 63 | filename -- Name of file to read. 64 | 65 | Returns 1 on success or 0 if the file can't be opened. 66 | """ 67 | namebbox = filename.split('::') 68 | bbox = None 69 | filename = namebbox[0] 70 | if len(namebbox) > 1: 71 | bbox = map(float, namebbox[1].split(':')) 72 | fh = gdal.Open( filename, gdal.GA_ReadOnly ) 73 | if fh is None: 74 | return False 75 | 76 | self.filename = filename 77 | self.bands = fh.RasterCount 78 | self.xsize = fh.RasterXSize 79 | self.ysize = fh.RasterYSize 80 | self.projection = fh.GetProjection() 81 | self.gcpprojection = fh.GetGCPProjection() 82 | self.gcps = fh.GetGCPs() 83 | 84 | self.geotransform = fh.GetGeoTransform() 85 | if bbox: 86 | self.geotransform = [0.0,0.0,0.0,0.0,0.0,0.0] 87 | self.geotransform[0] = bbox[0] 88 | self.geotransform[1] = (bbox[2] - bbox[0]) / float(self.xsize) 89 | self.geotransform[2] = 0.0 90 | self.geotransform[3] = bbox[1] 91 | self.geotransform[4] = 0.0 92 | self.geotransform[5] = (bbox[3] - bbox[1]) / float(self.ysize) 93 | self.ulx = self.geotransform[0] 94 | self.uly = self.geotransform[3] 95 | self.lrx = self.ulx + self.geotransform[1] * self.xsize 96 | self.lry = self.uly + self.geotransform[5] * self.ysize 97 | 98 | self.band_types = [None] 99 | self.nodata = [None] 100 | self.cts = [None] 101 | self.color_interps = [None] 102 | for i in range(1, fh.RasterCount+1): 103 | band = fh.GetRasterBand(i) 104 | self.band_types.append(band.DataType) 105 | if band.GetNoDataValue() != None: 106 | self.nodata.append(band.GetNoDataValue()) 107 | self.color_interps.append(band.GetRasterColorInterpretation()) 108 | self.datatypename = gdal.GetDataTypeName(band.DataType) 109 | self.blocksizex, self.blocksizey = band.GetBlockSize() 110 | ct = band.GetRasterColorTable() 111 | if ct is not None: 112 | self.cts.append(ct.Clone()) 113 | self.palette = True 114 | else: 115 | self.palette = False 116 | self.cts.append(None) 117 | 118 | return True 119 | 120 | def write_source(self, t_fh, t_geotransform, xsize, ysize, s_band, nodata = None): 121 | t_ulx = t_geotransform[0] 122 | t_uly = t_geotransform[3] 123 | t_lrx = t_geotransform[0] + xsize * t_geotransform[1] 124 | t_lry = t_geotransform[3] + ysize * t_geotransform[5] 125 | 126 | # figure out intersection region 127 | tgw_ulx = max(t_ulx,self.ulx) 128 | tgw_lrx = min(t_lrx,self.lrx) 129 | if t_geotransform[5] < 0: 130 | tgw_uly = min(t_uly,self.uly) 131 | tgw_lry = max(t_lry,self.lry) 132 | else: 133 | tgw_uly = max(t_uly,self.uly) 134 | tgw_lry = min(t_lry,self.lry) 135 | 136 | # do they even intersect? 137 | if tgw_ulx >= tgw_lrx: 138 | return 1 139 | if t_geotransform[5] < 0 and tgw_uly <= tgw_lry: 140 | return 1 141 | if t_geotransform[5] > 0 and tgw_uly >= tgw_lry: 142 | return 1 143 | 144 | # compute target window in pixel coordinates. 145 | tw_xoff = int((tgw_ulx - t_geotransform[0]) / t_geotransform[1] + 0.1) 146 | tw_yoff = int((tgw_uly - t_geotransform[3]) / t_geotransform[5] + 0.1) 147 | tw_xsize = int((tgw_lrx - t_geotransform[0])/t_geotransform[1] + 0.5) \ 148 | - tw_xoff 149 | tw_ysize = int((tgw_lry - t_geotransform[3])/t_geotransform[5] + 0.5) \ 150 | - tw_yoff 151 | 152 | if tw_xsize < 1 or tw_ysize < 1: 153 | return 1 154 | 155 | # Compute source window in pixel coordinates. 156 | sw_xoff = int((tgw_ulx - self.geotransform[0]) / self.geotransform[1]) 157 | sw_yoff = int((tgw_uly - self.geotransform[3]) / self.geotransform[5]) 158 | sw_xsize = int((tgw_lrx - self.geotransform[0]) \ 159 | / self.geotransform[1] + 0.5) - sw_xoff 160 | sw_ysize = int((tgw_lry - self.geotransform[3]) \ 161 | / self.geotransform[5] + 0.5) - sw_yoff 162 | 163 | if sw_xsize < 1 or sw_ysize < 1: 164 | return 1 165 | 166 | if self.palette or nodata: 167 | t_fh.write('\t\t\n') 168 | else: 169 | t_fh.write('\t\t\n') 170 | 171 | t_fh.write(('\t\t\t%s' + 172 | '\n') % self.filename) 173 | 174 | if self.palette: 175 | t_fh.write('\t\t\t1\n') 176 | else: 177 | t_fh.write('\t\t\t%i\n' % s_band) 178 | if nodata: 179 | t_fh.write('\t\t\t%f\n' % nodata[s_band]) 180 | t_fh.write('\t\t\t\n' \ 181 | % (self.xsize, self.ysize, self.datatypename, self.blocksizex, self.blocksizey)) 182 | t_fh.write('\t\t\t\n' \ 183 | % (sw_xoff, sw_yoff, sw_xsize, sw_ysize)) 184 | t_fh.write('\t\t\t\n' \ 185 | % (tw_xoff, tw_yoff, tw_xsize, tw_ysize)) 186 | 187 | if self.palette: 188 | t_fh.write('\t\t\t%i\n' % s_band) 189 | if self.palette or nodata: 190 | t_fh.write('\t\t\n') 191 | else: 192 | t_fh.write('\t\t\n') 193 | 194 | # ============================================================================= 195 | def Usage(): 196 | print 'Usage: preprocess.py [-o out_filename] [-a_srs srs] [-a_nodata nodata]' 197 | print ' [-ul_lr ulx uly lrx lry] input_files' 198 | 199 | # ============================================================================= 200 | 201 | def Preprocess(argv): 202 | names = [] 203 | out_file = 'out.vrt' 204 | 205 | ulx = None 206 | psize_x = None 207 | separate = False 208 | pre_init = None 209 | a_srs = None 210 | a_nodata = None 211 | 212 | if argv is None: 213 | sys.exit( 0 ) 214 | 215 | # Parse command line arguments. 216 | i = 1 217 | while i < len(argv): 218 | arg = argv[i] 219 | 220 | if arg == '-o': 221 | i = i + 1 222 | out_file = argv[i] 223 | 224 | elif arg == '-a_srs': 225 | i = i + 1 226 | a_srs = argv[i] 227 | 228 | elif arg == '-a_nodata': 229 | i = i + 1 230 | a_nodata = argv[i] 231 | 232 | elif arg == '-ul_lr': 233 | ulx = float(argv[i+1]) 234 | uly = float(argv[i+2]) 235 | lrx = float(argv[i+3]) 236 | lry = float(argv[i+4]) 237 | i = i + 4 238 | 239 | elif arg[:1] == '-': 240 | print 'Unrecognised command option: ', arg 241 | Usage() 242 | sys.exit( 1 ) 243 | 244 | else: 245 | names.append( arg ) 246 | 247 | i = i + 1 248 | 249 | if len(names) == 0: 250 | print 'No input files selected.' 251 | Usage() 252 | sys.exit( 1 ) 253 | 254 | # Collect information on all the source files. 255 | file_infos = names_to_fileinfos( names ) 256 | 257 | if ulx is None: 258 | ulx = file_infos[0].ulx 259 | uly = file_infos[0].uly 260 | lrx = file_infos[0].lrx 261 | lry = file_infos[0].lry 262 | 263 | for fi in file_infos: 264 | ulx = min(ulx, fi.ulx) 265 | uly = max(uly, fi.uly) 266 | lrx = max(lrx, fi.lrx) 267 | lry = min(lry, fi.lry) 268 | 269 | if psize_x is None: 270 | psize_x = file_infos[0].geotransform[1] 271 | psize_y = file_infos[0].geotransform[5] 272 | 273 | projection = file_infos[0].projection 274 | 275 | for fi in file_infos: 276 | pass 277 | # MAPTILER COMMENT 278 | #if fi.geotransform[1] != psize_x or fi.geotransform[5] != psize_y: 279 | # print "All files must have the same scale; %s does not" \ 280 | # % fi.filename 281 | # sys.exit(1) 282 | 283 | # MAPTILER COMMENT 284 | #if fi.geotransform[2] != 0 or fi.geotransform[4] != 0: 285 | # print "No file must be rotated/skewed; %s is.\nTODO: gdalwarp -of vrt %s %s.vrt" % (fi.filename, fi.filename, fi.filename) 286 | # sys.exit(1) 287 | 288 | #TODO: During initialization create temporary files by AutoCreateWarpedVRT for those 289 | 290 | #if fi.projection != projection: 291 | # print "All files must be in the same projection; %s is not" \ 292 | # % fi.filename 293 | # sys.exit(1) 294 | 295 | # MAPTILER COMMENT 296 | #geotransform = (ulx, psize_x, 0.0, uly, 0.0, psize_y) 297 | geotransform = file_infos[0].geotransform 298 | 299 | gcpprojection = file_infos[0].gcpprojection 300 | gcps = file_infos[0].gcps 301 | 302 | xsize = int(((lrx - ulx) / geotransform[1]) + 0.5) 303 | ysize = int(((lry - uly) / geotransform[5]) + 0.5) 304 | 305 | nodata = None 306 | if a_nodata: 307 | if a_nodata.find(',') != -1: 308 | nodata = a_nodata.split(',') 309 | elif a_nodata.find(' ') != -1: 310 | nodata = a_nodata.split(' ') 311 | else: 312 | nodata = [a_nodata] * 5 # bands + 1 313 | nodata = map(int, nodata) 314 | 315 | palette = False 316 | bands = file_infos[0].bands 317 | if file_infos[0].palette: 318 | palette = True 319 | if not (nodata or file_infos[0].nodata != [None]): 320 | # Palette without NODATA is expanded also to an extra alpha channel 321 | bands = 4 322 | else: 323 | # Palette with NODATA 324 | bands = 3 325 | palettecolors = ['Red','Green','Blue','Alpha'] 326 | 327 | if a_srs: 328 | srs = osr.SpatialReference() 329 | srs.SetFromUserInput(a_srs) 330 | projection = srs.ExportToWkt() 331 | 332 | t_fh = open(out_file, 'w') 333 | 334 | t_fh.write('\n' 335 | % (xsize, ysize)) 336 | 337 | # Datasets with GCPs can't be merged without warping in advance!!! 338 | if len(gcps): 339 | t_fh.write('\t\n' % gdal.EscapeString( gcpprojection, gdal.CPLES_XML )) 340 | for gcp in gcps: 341 | t_fh.write('\t\t\n' % 342 | (gcp.Id, gcp.GCPPixel, gcp.GCPLine, gcp.GCPX, gcp.GCPY)) 343 | t_fh.write('\t\n') 344 | else: 345 | t_fh.write('\t%24.13f, %24.13f, %24.13f, %24.13f, %24.13f, %24.13f\n' 346 | % geotransform) 347 | 348 | if len(projection) > 0: 349 | t_fh.write('\t%s\n' % gdal.EscapeString( projection, gdal.CPLES_XML )) 350 | 351 | if nodata: 352 | nd = nodata 353 | t_fh.write('\t\n\t\t%i %i %i\n\t\n' % (nd[0],nd[1],nd[2])) 354 | if file_infos[0].nodata != [None]: 355 | nd = file_infos[0].nodata 356 | t_fh.write('\t\n\t\t%i %i %i\n\t\n' % (nd[0],nd[1],nd[2])) 357 | 358 | for band in range(1, bands+1): 359 | dataType = "Byte" 360 | # gdal.GetDataTypeName(file_infos[0].band_types[band]) 361 | 362 | t_fh.write('\t\n' 363 | % (dataType, band)) 364 | 365 | if nodata: 366 | t_fh.write('\t\t%f\n' % 367 | nodata[band]) 368 | elif file_infos[0].nodata != [None]: 369 | t_fh.write('\t\t%f\n' % 370 | file_infos[0].nodata[band]) 371 | if palette: 372 | t_fh.write('\t\t%s\n' % 373 | palettecolors[band-1]) 374 | else: 375 | t_fh.write('\t\t%s\n' % 376 | gdal.GetColorInterpretationName( 377 | file_infos[0].color_interps[band])) 378 | 379 | for fi in file_infos: 380 | fi.write_source(t_fh, geotransform, xsize, ysize, band, nodata) 381 | 382 | t_fh.write('\t\n') 383 | 384 | t_fh.write('\n') 385 | 386 | # ============================================================================= 387 | # 388 | # Program mainline. 389 | # 390 | 391 | if __name__ == '__main__': 392 | argv = gdal.GeneralCmdLineProcessor( sys.argv ) 393 | Preprocess(argv) 394 | -------------------------------------------------------------------------------- /mapslicer/widgets.py: -------------------------------------------------------------------------------- 1 | """Basic file selector page; published ItemSelected events.""" 2 | # http://wxpython.org/docs/api/wx.ListCtrl-class.html 3 | 4 | import os 5 | 6 | import wx 7 | import wx.combo 8 | import wx.lib.hyperlink 9 | import wx.lib.intctrl 10 | import wx.lib.buttons 11 | import wx.lib.throbber 12 | import config 13 | import webbrowser 14 | import icons 15 | 16 | import gdalpreprocess 17 | 18 | # TODO: GetText 19 | _ = lambda s: s 20 | 21 | class FileDrop(wx.FileDropTarget): 22 | 23 | def __init__(self, target): 24 | wx.FileDropTarget.__init__(self) 25 | self.target = target 26 | 27 | def OnDropFiles(self, x, y, filenames): 28 | 29 | for name in filenames: 30 | try: 31 | file = open(name, 'r') 32 | file.close() 33 | self.target._add(name) 34 | except IOError, error: 35 | dlg = wx.MessageDialog(None, _('Error opening file\n') + str(error)) 36 | dlg.ShowModal() 37 | except UnicodeDecodeError, error: 38 | dlg = wx.MessageDialog(None, _('Cannot open non ascii files\n') + str(error)) 39 | dlg.ShowModal() 40 | 41 | 42 | class FileListCtrl(wx.ListCtrl): 43 | def __init__(self, parent, id=-1, size=wx.DefaultSize): 44 | wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VRULES|wx.LC_SINGLE_SEL|wx.SUNKEN_BORDER) 45 | 46 | self.InsertColumn(0, _("Filename"), width=350 ) 47 | self.InsertColumn(1, _("Georeference"), width=115) 48 | 49 | self.SetItemCount(len(config.files)) 50 | 51 | self.Bind(wx.EVT_SIZE, self.OnResize, self) 52 | 53 | def OnGetItemText(self, item, col): 54 | return config.files[item][col] 55 | 56 | def OnResize(self, event): 57 | """Resize the filename column as the window is resized.""" 58 | self.SetColumnWidth(0, self.GetClientSizeTuple()[0] - self.GetColumnWidth(1)) 59 | event.Skip() 60 | 61 | 62 | class FilePanel(wx.Panel): 63 | def __init__(self, parent, id=-1, size=wx.DefaultSize, name = ''): 64 | wx.Panel.__init__(self, parent, id, size=size, name=name) 65 | self.SetBackgroundColour('#ffffff') 66 | 67 | self.__items = [] 68 | 69 | mainsizer = wx.BoxSizer(wx.VERTICAL) 70 | 71 | self.lc = FileListCtrl(self) 72 | dt = FileDrop(self) 73 | self.lc.SetDropTarget(dt) 74 | 75 | self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected, self.lc) 76 | self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnItemDeselected, self.lc) 77 | 78 | mainsizer.Add(self.lc, 1, wx.ALL|wx.EXPAND, 2) 79 | 80 | sizer = wx.FlexGridSizer(cols=5, hgap=5) 81 | badd = wx.Button(self, wx.ID_ADD) 82 | sizer.Add(badd) 83 | 84 | self.bdel = wx.Button(self, wx.ID_DELETE) 85 | sizer.Add(self.bdel) 86 | self.bdel.Disable() 87 | 88 | bup = wx.Button(self, wx.ID_UP) 89 | sizer.Add(bup) 90 | bup.Disable() 91 | bdown = wx.Button(self, wx.ID_DOWN) 92 | sizer.Add(bdown) 93 | bdown.Disable() 94 | 95 | bgeo = wx.Button(self, -1, _("Georeference")) 96 | sizer.Add(bgeo) 97 | mainsizer.Add(sizer, 0, wx.EXPAND|wx.ALL, 3) 98 | 99 | self.SetSizer(mainsizer) 100 | self.Bind(wx.EVT_BUTTON, self.onAdd, badd) 101 | self.Bind(wx.EVT_BUTTON, self.onDelete, self.bdel) 102 | self.Bind(wx.EVT_BUTTON, self.onGeoreference, bgeo) 103 | 104 | def OnItemSelected(self, event): 105 | self.bdel.Enable() 106 | 107 | def OnItemDeselected(self, event): 108 | self.bdel.Disable() 109 | 110 | def _add(self, filename): 111 | 112 | if len(config.files) > 0: 113 | wx.MessageBox(_("""Unfortunately the merging of files is not yet implemented in the MapSlicer GUI. Only the first file in the list is going to be rendered."""), _("Not yet implemented"), wx.ICON_ERROR) 114 | 115 | filename = filename.encode('utf8') 116 | 117 | try: 118 | filerecord = gdalpreprocess.singlefile(filename) 119 | if filename: 120 | config.files = [] 121 | config.files.append(filerecord) 122 | 123 | self.lc.SetItemCount(len(config.files)) 124 | self.lc.Refresh(False) 125 | if len(config.files): 126 | self.bdel.Enable() 127 | self.resume = False 128 | except gdalpreprocess.PreprocessError, e: 129 | wx.MessageBox(str(e), _("Can't add a file"), wx.ICON_ERROR) 130 | 131 | def onAdd(self, evt): 132 | dlg = wx.FileDialog( 133 | self, message=_("Choose a file"), 134 | defaultDir=config.documentsdir, 135 | defaultFile="", 136 | wildcard=config.supportedfiles, 137 | style=wx.FD_OPEN 138 | ) 139 | 140 | # Show the dialog and retrieve the user response. If it is the OK response, 141 | # process the data. 142 | if dlg.ShowModal() == wx.ID_OK: 143 | 144 | path = dlg.GetPath() 145 | print path, os.path.exists(path) 146 | 147 | if not os.path.exists(path): 148 | wx.MessageBox(_("MapSlicer can't find the following file:\n\n") + path, 149 | _("File not found"), wx.ICON_ERROR) 150 | return 151 | if not os.access(path, os.R_OK): 152 | wx.MessageBox(_("MapSlicer doesn't have permission to read the following file:\n\n") + path, 153 | _("Bad permissions"), wx.ICON_ERROR) 154 | return 155 | 156 | try: 157 | self._add(path) 158 | except gdalpreprocess.PreprocessError, e: 159 | wx.MessageBox(str(e), _("Can't add a file"), wx.ICON_ERROR) 160 | return 161 | 162 | def onDelete(self, evt): 163 | del config.files[ self.lc.GetFirstSelected() ] 164 | self.lc.SetItemCount(len(config.files)) 165 | self.lc.Refresh() 166 | if not len(config.files): 167 | self.bdel.Disable() 168 | 169 | 170 | def onGeoreference(self, evt): 171 | bbox = None 172 | dlg = wx.TextEntryDialog( 173 | self, _("Please specify bounding box as 4 numbers or a world file as 6 numbers\nFormat: 'north south east west'\n\nAlternatively you can create a world file (.wld) or (.tab) by an external GIS software"), 174 | _('Georeference with bounding box'), '90 -90 180 -180') 175 | 176 | if dlg.ShowModal() == wx.ID_OK: 177 | str = dlg.GetValue() 178 | if str.find('.') == -1: 179 | str = str.replace(',','.') 180 | if str.find(',') != -1: 181 | str = str.replace(',',' ') 182 | print str 183 | try: 184 | bbox = map(float, str.split()) 185 | except: 186 | return 187 | 188 | # Delete the old temporary files 189 | if config.files[ self.lc.GetFirstSelected() ][2] != config.files[ self.lc.GetFirstSelected() ][0]: 190 | os.unlink(config.files[ self.lc.GetFirstSelected() ][2]) 191 | 192 | filename = config.files[ self.lc.GetFirstSelected() ][0] 193 | from gdalpreprocess import singlefile 194 | filerecord = singlefile(filename, bbox) 195 | if filerecord: 196 | config.files[self.lc.GetFirstSelected() ] = filerecord 197 | self.lc.Refresh(False) 198 | config.bboxgeoref = True 199 | 200 | dlg.Destroy() 201 | 202 | def onUp(self, evt): 203 | pass 204 | 205 | def onDown(self, evt): 206 | pass 207 | 208 | 209 | class NodataPanel(wx.Panel): 210 | def __init__(self, parent, id=-1, size=wx.DefaultSize, name = '' ): 211 | wx.Panel.__init__(self, parent, id, size=size, name=name) 212 | self.SetBackgroundColour('#ffffff') 213 | 214 | sizer = wx.FlexGridSizer(cols=2, hgap=5) 215 | self.ch1 = wx.CheckBox(self, -1, _("Set transparency for a color (NODATA):")) 216 | sizer.Add(self.ch1) 217 | 218 | if config.nodata: 219 | self.color = config.nodata 220 | self.ch1.SetValue(True) 221 | else: 222 | self.ch1.SetValue(False) 223 | self.color = (0,0,0) 224 | 225 | bmp = wx.EmptyBitmap(16, 16) 226 | dc = wx.MemoryDC(bmp) 227 | dc.SetBackground(wx.Brush(self.color)) 228 | dc.Clear() 229 | del dc 230 | 231 | self.bcolor = wx.BitmapButton(self, -1, bmp) 232 | sizer.Add(self.bcolor) 233 | 234 | self.SetSizer(sizer) 235 | self.Bind(wx.EVT_BUTTON, self.onColor, self.bcolor) 236 | 237 | 238 | def onColor(self, evt): 239 | color = wx.ColourData() 240 | color.SetColour(self.color) 241 | dlg = wx.ColourDialog(self, data=color) 242 | 243 | # Ensure the full colour dialog is displayed, 244 | # not the abbreviated version. 245 | dlg.GetColourData().SetChooseFull(True) 246 | 247 | if dlg.ShowModal() == wx.ID_OK: 248 | 249 | # If the user selected OK, then the dialog's wx.ColourData will 250 | # contain valid information. Fetch the data. 251 | data = dlg.GetColourData() 252 | 253 | # ... then do something with it. The actual colour data will be 254 | # returned as a three-tuple (r, g, b) 255 | self.color = data.GetColour().Get() 256 | #print 'You selected: %s\n' % str(self.color) 257 | 258 | bmp = wx.EmptyBitmap(16, 16) 259 | dc = wx.MemoryDC(bmp) 260 | dc.SetBackground(wx.Brush(data.GetColour().Get())) 261 | dc.Clear() 262 | 263 | self.bcolor.SetBitmapLabel(bmp) 264 | self.ch1.SetValue(True) 265 | config.nodata = self.color 266 | 267 | # Once the dialog is destroyed, Mr. wx.ColourData is no longer your 268 | # friend. Don't use it again! 269 | dlg.Destroy() 270 | 271 | def GetColor(self): 272 | if self.ch1.GetValue(): 273 | return self.color 274 | else: 275 | return None 276 | 277 | class SpatialReferencePanel(wx.Panel): 278 | def __init__(self, parent, id=-1, size=wx.DefaultSize, name = ''): 279 | wx.Panel.__init__(self, parent, id, size=size, name=name) 280 | #self.SetBackgroundColour(wx.Colour(255, 30, 50)) 281 | self.SetBackgroundColour('#ffffff') 282 | 283 | self.sizer = wx.BoxSizer(wx.VERTICAL) 284 | self.ch1 = wx.Choice(self, -1, choices = config.srsFormatList) 285 | self.ch1.SetSelection(0) 286 | self.sizer.Add(self.ch1, 0, wx.EXPAND|wx.ALL, 3) 287 | 288 | # EPSG/ESRI codes 289 | epsgsizer = wx.BoxSizer(wx.HORIZONTAL) 290 | self.epsgesri = wx.Choice(self, -1, choices = ['EPSG','ESRI']) 291 | self.epsgesri.SetSelection(0) 292 | epsgsizer.Add(self.epsgesri, 0, wx.EXPAND|wx.RIGHT|wx.LEFT, 3) 293 | self.epsgcode = wx.lib.intctrl.IntCtrl(self, value=4326, allow_none=True) 294 | epsgsizer.Add(self.epsgcode, 0, wx.EXPAND|wx.RIGHT|wx.LEFT, 3) 295 | self.epsgbutton = wx.Button(self, -1, "Set") 296 | epsgsizer.Add(self.epsgbutton, 0, wx.EXPAND|wx.RIGHT|wx.LEFT, 3) 297 | link = wx.lib.hyperlink.HyperLinkCtrl(self, -1, _("EPSG Registry"), URL="http://www.epsg-registry.org/") 298 | link.SetBackgroundColour('#ffffff') 299 | epsgsizer.Add(link, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 3) 300 | self.sizer.Add(epsgsizer, 0, wx.EXPAND) 301 | 302 | # Search SpatialReference.org 303 | searchsizer = wx.BoxSizer(wx.VERTICAL) 304 | self.search = wx.SearchCtrl(self, style=wx.TE_PROCESS_ENTER) 305 | searchsizer.Add(self.search, 1, wx.EXPAND|wx.BOTTOM, 4) 306 | text = wx.StaticText(self, -1, _('Paste here the "OGC WKT" or "Proj4" definition or the URL:')) 307 | searchsizer.Add(text, 0, wx.ALIGN_CENTER|wx.TOP, 3) 308 | # 'Paste here WKT definition or URL of the spatial reference system, like:\n' 309 | self.sizer.Add(searchsizer, 0, wx.EXPAND|wx.ALL, 3) 310 | 311 | # UTM - Universal Transverse Mercator 312 | utmsizer = wx.BoxSizer(wx.HORIZONTAL) 313 | text = wx.StaticText(self, -1, _('UTM Zone:')) 314 | utmsizer.Add(text, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 3) 315 | self.utmzone = wx.lib.intctrl.IntCtrl(self, value=30, allow_none=True) 316 | utmsizer.Add(self.utmzone, 1, wx.EXPAND|wx.RIGHT|wx.LEFT, 3) 317 | self.north = wx.Choice(self, -1, choices = ['north','south']) 318 | self.north.SetSelection(0) 319 | utmsizer.Add(self.north, 0, wx.EXPAND|wx.RIGHT|wx.LEFT, 3) 320 | self.geogcs = wx.Choice(self, -1, choices = config.wellknowngeogcs) 321 | self.geogcs.SetSelection(0) 322 | utmsizer.Add(self.geogcs, 0, wx.EXPAND|wx.RIGHT, 3) 323 | self.utmbutton = wx.Button(self, -1, _("Set")) 324 | utmsizer.Add(self.utmbutton, 0, wx.EXPAND|wx.RIGHT|wx.LEFT, 3) 325 | self.sizer.Add(utmsizer, 0, wx.EXPAND|wx.ALL, 3) 326 | 327 | self.tc1 = wx.TextCtrl(self, -1, config.srs, style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER) 328 | self.sizer.Add(self.tc1, 1, wx.EXPAND|wx.ALL, 3) 329 | self.bpreview = wx.Button(self, -1, _("Preview the map reference with this SRS")) 330 | self.sizer.Add(self.bpreview, 0, wx.ALL, 3) 331 | 332 | if config.srsformat != 3: 333 | self.sizer.Hide(1, recursive=True) # EPSG 334 | if config.srsformat != 4: 335 | self.sizer.Hide(2, recursive=True) # Search 336 | if config.srsformat != 2: 337 | self.sizer.Hide(3, recursive=True) # UTM 338 | self.sizer.Layout() 339 | 340 | self.SetSizer(self.sizer) 341 | 342 | self.Bind(wx.EVT_BUTTON, self.Set, self.utmbutton) 343 | self.Bind(wx.EVT_BUTTON, self.Set, self.epsgbutton) 344 | self.Bind(wx.EVT_BUTTON, self.Preview, self.bpreview) 345 | self.Bind(wx.EVT_CHOICE, self.Choice, self.ch1) 346 | self.Bind(wx.EVT_TEXT_ENTER, self.Search, self.search) 347 | self.Bind(wx.EVT_SEARCHCTRL_SEARCH_BTN, self.Search, self.search) 348 | 349 | def Search(self, evt): 350 | what = self.search.GetValue() 351 | what += " PROJCS" 352 | webbrowser.open_new("http://www.spatialreference.org/ref/?search=%s" % what) 353 | 354 | def Choice(self, evt): 355 | ch = self.ch1.GetSelection() 356 | if ch==0: # Custom 357 | self.SetValue(config.customsrs) 358 | self.sizer.Hide(1, recursive=True) # EPSG 359 | self.sizer.Hide(2, recursive=True) # Search 360 | self.sizer.Hide(3, recursive=True) # UTM 361 | self.sizer.Layout() 362 | elif ch==1: # WGS84 363 | self.SetValue(config.epsg4326) 364 | self.sizer.Hide(1, recursive=True) # EPSG 365 | self.sizer.Hide(2, recursive=True) # Search 366 | self.sizer.Hide(3, recursive=True) # UTM 367 | self.sizer.Layout() 368 | elif ch==2: # UTM 369 | self.SetValue('') 370 | self.sizer.Hide(1, recursive=True) # EPSG 371 | self.sizer.Hide(2, recursive=True) # Search 372 | self.sizer.Show(3, recursive=True) # UTM 373 | self.sizer.Layout() 374 | elif ch==3: # EPSG 375 | self.SetValue('') 376 | self.sizer.Show(1, recursive=True) # EPSG 377 | self.sizer.Hide(2, recursive=True) # Search 378 | self.sizer.Hide(3, recursive=True) # UTM 379 | self.sizer.Layout() 380 | elif ch==4: # Search 381 | self.SetValue('') 382 | self.sizer.Hide(1, recursive=True) # EPSG 383 | self.sizer.Show(2, recursive=True) # Search 384 | self.sizer.Hide(3, recursive=True) # UTM 385 | self.sizer.Layout() 386 | 387 | def Set(self, evt): 388 | try: 389 | from osgeo import osr 390 | osr.UseExceptions() 391 | source = osr.SpatialReference() 392 | # 0 = Custom 393 | if self.GetSelection() == 1: # WGS84 394 | self.SetValue(config.epsg4326) 395 | elif self.GetSelection() == 2: # UTM 396 | source.SetProjCS( _("%s / UTM Zone %s%s") % (config.wellknowngeogcs[self.geogcs.GetSelection()], self.utmzone.GetValue(), ['N','S'][self.north.GetSelection()] )); 397 | source.SetWellKnownGeogCS( config.wellknowngeogcs[self.geogcs.GetSelection()] ); 398 | source.SetUTM( self.utmzone.GetValue(), (self.north.GetSelection()==0) ); 399 | self.SetValue(source.ExportToPrettyWkt()) 400 | elif self.GetSelection() == 3: # EPSG 401 | if self.epsgesri.GetSelection() == 0: 402 | source.ImportFromEPSG( self.epsgcode.GetValue() ) 403 | else: 404 | source.ImportFromESRI( self.epsgcode.GetValue() ) 405 | self.SetValue(source.ExportToPrettyWkt()) 406 | except Exception, error: 407 | wx.MessageBox("%s" % error , _("The SRS definition is not correct"), wx.ICON_ERROR) 408 | 409 | 410 | def Preview(self, evt): 411 | try: 412 | from gdalpreprocess import SRSInput 413 | srs = SRSInput(self.GetValue()) 414 | filerecord = config.files[0] 415 | T = filerecord[3] 416 | xsize, ysize = filerecord[4:6] 417 | from osgeo import osr 418 | source = osr.SpatialReference() 419 | source.SetFromUserInput( srs ) 420 | wgs84 = osr.SpatialReference() 421 | wgs84.ImportFromEPSG( 4326 ) 422 | trans = osr.CoordinateTransformation(source, wgs84) 423 | ulx, uly = trans.TransformPoint(T[0], T[3])[:2] 424 | urx, ury = trans.TransformPoint(T[0] + T[1]*xsize, T[3] + T[4]*xsize)[:2] 425 | llx, lly = trans.TransformPoint(T[0] + T[2]*ysize, T[3] + T[5]*ysize)[:2] 426 | lrx, lry = trans.TransformPoint(T[0] + T[1]*xsize + T[2]*ysize, T[3] + T[4]*xsize + T[5]*ysize )[:2] 427 | webbrowser.open_new("http://www.mapslicer.org/preview/?points=%.10f,%.10f,%.10f,%.10f,%.10f,%.10f,%.10f,%.10f" % 428 | (uly, ulx, ury, urx, lry, lrx, lly, llx)) 429 | except Exception, error: 430 | wx.MessageBox("%s" % error , _("The SRS definition is not correct"), wx.ICON_ERROR) 431 | 432 | def SetValue(self, value): 433 | self.tc1.SetValue(value) 434 | 435 | def GetValue(self): 436 | return self.tc1.GetValue().encode('ascii','ignore') 437 | 438 | def SetSelection(self, value): 439 | return self.ch1.SetSelection(value) 440 | 441 | def GetSelection(self): 442 | return self.ch1.GetSelection() 443 | 444 | class Throbber(wx.lib.throbber.Throbber): 445 | 446 | def __init__(self, parent, id=-1, icon="", pos=wx.DefaultPosition, size=wx.DefaultSize, name=""): 447 | wx.lib.throbber.Throbber.__init__(self, parent, id, icons.getThrobberBitmap(), pos, size, frames=12, frameWidth=16, overlay=icons.getWhite16Bitmap(), name=name) 448 | 449 | -------------------------------------------------------------------------------- /mapslicer/wizard.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import sys 6 | import wx 7 | import wx.html 8 | import wx.lib.wxpTag 9 | import webbrowser 10 | import config 11 | import icons 12 | 13 | from wxgdal2tiles import wxGDAL2Tiles 14 | 15 | # TODO: GetText 16 | _ = lambda s: s 17 | 18 | class WizardHtmlWindow(wx.html.HtmlWindow): 19 | def __init__(self, parent, id, pos=wx.DefaultPosition, size = wx.DefaultSize ): 20 | wx.html.HtmlWindow.__init__(self, parent, id, pos=pos, size=size, style=(wx.html.HW_NO_SELECTION | wx.FULL_REPAINT_ON_RESIZE) ) 21 | if "gtk2" in wx.PlatformInfo: 22 | self.SetStandardFonts() 23 | self.parent = parent 24 | self.step = 0 25 | 26 | # add the donate image to the MemoryFileSystem: 27 | mfs = wx.MemoryFSHandler() 28 | wx.FileSystem_AddHandler(mfs) 29 | 30 | def OnLinkClicked(self, linkinfo): 31 | webbrowser.open_new(linkinfo.GetHref()) 32 | 33 | def GetActiveStep(self): 34 | return self.step 35 | 36 | def SetStep(self, step): 37 | self.step = step 38 | if step >= len(steps): 39 | config.rendering = False 40 | config.resume = False 41 | self.SetPage(stepfinal % (config.outputdir, config.outputdir) ) 42 | return 43 | self.SetPage(steps[step]) 44 | if step == 1: 45 | self.FindWindowByName(config.profile).SetValue(1) 46 | elif step == 2: 47 | pass 48 | #self.FindWindowByName('nodatapanel').SetColor(config.nodata) 49 | elif step == 3: 50 | if not config.srs: 51 | config.customsrs = config.files[0][6] 52 | config.srs = config.customsrs 53 | if not config.srs and config.bboxgeoref: 54 | config.srsformat = 1 55 | config.srs = config.epsg4326 56 | self.FindWindowByName('srs').SetSelection(config.srsformat) 57 | self.FindWindowByName('srs').SetValue(config.srs) 58 | elif step == 4: 59 | g2t = wxGDAL2Tiles(['--profile',config.profile,'--s_srs', config.srs, str(config.files[0][2]) ]) 60 | g2t.open_input() 61 | config.tminz = g2t.tminz 62 | config.tmaxz = g2t.tmaxz 63 | config.kml = g2t.kml 64 | del g2t 65 | 66 | self.FindWindowByName('tminz').SetValue(config.tminz) 67 | self.FindWindowByName('tmaxz').SetValue(config.tmaxz) 68 | 69 | if config.profile == 'gearth': 70 | self.FindWindowByName('format').SetItems( [ 71 | _("PNG - with transparency"), 72 | _("JPEG - smaller but without transparency"), 73 | _("Hybrid JPEG+PNG - only for Google Earth"), 74 | _("Garmin Custom maps KMZ - 256 pixels"), 75 | _("Garmin Custom maps KMZ - 512 pixels"), 76 | _("Garmin Custom maps KMZ - 1024 pixels") ] ) 77 | else: 78 | self.FindWindowByName('format').SetItems( [ 79 | _("PNG - with transparency"), 80 | _("JPEG - smaller but without transparency"), 81 | _("Hybrid JPEG+PNG - only for Google Earth") ] ) 82 | 83 | if not config.format and config.profile == 'gearth': 84 | self.FindWindowByName('format').SetSelection(2) # hybrid 85 | elif not config.format: 86 | self.FindWindowByName('format').SetSelection(0) # png 87 | else: 88 | self.FindWindowByName('format').SetSelection({'png':0,'jpeg':1,'hybrid':2,'garmin256':3,'garmin512':4,'garmin1024':5}[config.format]) 89 | 90 | self.Refresh() 91 | self.Update() 92 | elif step == 5: 93 | filename = config.files[0][0] 94 | 95 | # If this is the first time the user has gone this far, 96 | # we try to come up with sensible default output directory. 97 | if config.outputdir is None: 98 | input_dir = os.path.dirname(filename) 99 | 100 | # Implicitly we try to place it in the same directory in 101 | # which the input file is located. But if this is not possible, 102 | # we try to use the current directory. 103 | if os.access(input_dir, os.W_OK): 104 | base_dir = input_dir 105 | else: 106 | base_dir = os.getcwd() 107 | 108 | # Default name is the same as the input file without extensions. 109 | config.outputdir = os.path.join(base_dir, os.path.splitext(os.path.basename( filename ))[0] ) 110 | 111 | browseButton = self.FindWindowByName('browsebutton') 112 | if browseButton: 113 | browseButton.Bind(wx.EVT_BUTTON, self.OnBrowseButtonPressed) 114 | self.FindWindowByName('outputdir').SetValue(config.outputdir) 115 | 116 | elif step == 6: 117 | not_hybrid = config.format != 'hybrid' 118 | if config.profile=='mercator': 119 | self.FindWindowByName('google').Enable(not_hybrid) 120 | self.FindWindowByName('openlayers').Enable(not_hybrid) 121 | self.FindWindowByName('kml').Enable(True) 122 | elif config.profile=='geodetic': 123 | self.FindWindowByName('google').Enable(False) 124 | self.FindWindowByName('openlayers').Enable(not_hybrid) 125 | self.FindWindowByName('kml').Enable(True) 126 | elif config.profile=='raster': 127 | self.FindWindowByName('google').Enable(False) 128 | self.FindWindowByName('openlayers').Enable(not_hybrid) 129 | if not config.kml: 130 | self.FindWindowByName('kml').Enable(False) 131 | elif config.profile=='gearth': 132 | self.FindWindowByName('google').Enable(False) 133 | self.FindWindowByName('openlayers').Enable(not_hybrid) 134 | self.FindWindowByName('kml').Enable(True) 135 | 136 | self.FindWindowByName('google').SetValue(config.google) 137 | self.FindWindowByName('openlayers').SetValue(config.openlayers) 138 | self.FindWindowByName('kml').SetValue(config.kml) 139 | 140 | elif step == 7: 141 | config.title = os.path.basename( config.files[0][0] ) 142 | self.FindWindowByName('title').SetValue(config.title) 143 | self.FindWindowByName('copyright').SetValue(config.copyright) 144 | self.FindWindowByName('googlekey').SetValue(config.googlekey) 145 | self.FindWindowByName('yahookey').SetValue(config.yahookey) 146 | 147 | def SaveStep(self, step): 148 | if step == 1: 149 | # Profile 150 | if self.FindWindowByName('mercator').GetValue(): 151 | config.profile = 'mercator' 152 | elif self.FindWindowByName('geodetic').GetValue(): 153 | config.profile = 'geodetic' 154 | elif self.FindWindowByName('raster').GetValue(): 155 | config.profile = 'raster' 156 | elif self.FindWindowByName('gearth').GetValue(): 157 | config.profile = 'gearth' 158 | print config.profile 159 | elif step == 2: 160 | # Files + Nodata 161 | print config.files 162 | config.nodata = self.FindWindowByName('nodatapanel').GetColor() 163 | print config.nodata 164 | elif step == 3: 165 | config.srs = self.FindWindowByName('srs').GetValue().encode('ascii','ignore').strip() 166 | config.srsformat = self.FindWindowByName('srs').GetSelection() 167 | print config.srs 168 | elif step == 4: 169 | config.tminz = int(self.FindWindowByName('tminz').GetValue()) 170 | config.tmaxz = int(self.FindWindowByName('tmaxz').GetValue()) 171 | 172 | format = self.FindWindowByName('format').GetCurrentSelection() 173 | config.format = ('png','jpeg','hybrid','garmin256','garmin512','garmin1024')[format] 174 | 175 | if config.format != 'hybrid': 176 | config.google = config.profile == 'mercator' 177 | config.openlayers = True 178 | else: 179 | config.google = False 180 | config.openlayers = False 181 | config.kml = config.profile in ('gearth', 'geodetic') 182 | 183 | print config.tminz 184 | print config.tmaxz 185 | print config.format 186 | elif step == 5: 187 | config.outputdir = self.FindWindowByName('outputdir').GetValue() 188 | config.url = self.FindWindowByName('url').GetValue() 189 | if config.url == 'http://': 190 | config.url = '' 191 | elif step == 6: 192 | config.google = self.FindWindowByName('google').GetValue() 193 | config.openlayers = self.FindWindowByName('openlayers').GetValue() 194 | config.kml = self.FindWindowByName('kml').GetValue() 195 | elif step == 7: 196 | config.title = self.FindWindowByName('title').GetValue().encode('utf8') 197 | if not config.title: 198 | config.title = os.path.basename( config.files[0][0] ).encode('utf8') 199 | config.copyright = self.FindWindowByName('copyright').GetValue().encode('utf8') 200 | config.googlekey = self.FindWindowByName('googlekey').GetValue().encode('utf8') 201 | config.yahookey = self.FindWindowByName('yahookey').GetValue().encode('utf8') 202 | print config.title 203 | print config.copyright 204 | print config.googlekey 205 | print config.yahookey 206 | 207 | def OnBrowseButtonPressed(self, evt): 208 | # browse button has been pressed to select output directory 209 | outputbox = self.FindWindowByName('outputdir') 210 | currentdir = outputbox.GetValue() 211 | dlg = wx.DirDialog(self, _("Choose output directory"), currentdir) 212 | if dlg.ShowModal() == wx.ID_OK: 213 | outputbox.SetValue(dlg.GetPath()) 214 | 215 | def UpdateRenderProgress(self, complete): 216 | if self.step != len(steps) - 1: 217 | print _("Nothing to update - progressbar not displayed") 218 | else: 219 | progressbar = self.FindWindowByName('progressbar') 220 | progressbar.SetValue(complete) 221 | 222 | def UpdateRenderText(self, text): 223 | if self.step != len(steps) - 1: 224 | print _("Nothing to update - progresstext not displayed") 225 | else: 226 | progresstext = self.FindWindowByName('progresstext') 227 | progresstext.SetLabel(text) 228 | self.Layout() 229 | self.Refresh() 230 | 231 | def StartThrobber(self): 232 | self.FindWindowByName('throbber').Start() 233 | self.FindWindowByName('throbber').ToggleOverlay(False) 234 | 235 | def StopThrobber(self): 236 | self.FindWindowByName('throbber').Stop() 237 | self.FindWindowByName('throbber').ToggleOverlay(True) 238 | 239 | step1 = "

"+_("Selection of the tile profile")+'''

240 |

241 | '''+_("What kind of tiles would you like to generate?")+''' 242 |

243 | 244 | 245 | 246 | 247 | 248 |

249 | '''+_("Mercator tiles compatible with Google, Yahoo or Bing maps and OpenStreetMap. Suitable for mashups and overlay with these popular interactive maps.")+''' 250 |
251 | 252 | 253 | 254 | 255 |
256 | '''+_('Tiles and KML metadata for 3D visualization in Google Earth desktop application or in the web browser plugin.')+''' 257 |
258 | 259 | 260 | 261 | 262 |
263 | '''+_('Compatible with most existing WMS servers, with the OpenLayers base map, Google Earth and other applications using WGS84 coordinates (EPSG:4326).')+''' 264 |
265 | 266 | 267 | 268 | 269 |
270 | '''+_("Tiles based on the dimensions of the picture in pixels (width and height). Stand-alone presentation even for images without georeference.")+''' 271 |
272 |
''' 273 | 274 | step2 = '''

'''+_("Source data files")+'''

275 | '''+_("Please choose the raster files of the maps you would like to publish.")+''' 276 |

277 | '''+_("Input raster map files:")+''' 278 |

279 | 284 | 285 | 286 |

287 | 288 | ''' 289 | 290 | step3 = '''

'''+_("Spatial reference system (SRS)")+'''

291 | '''+_('It is necessary to know which coordinate system (Spatial Reference System) is used for georeferencing of the input files.')+''' 292 |

293 | '''+_("What is the Spatial Reference System used in your files?")+''' 294 |

295 | 296 | 297 | ''' 298 | 299 | step4 = '''

'''+_("Details about the tile pyramid")+'''

300 | '''+_("In this step you should specify the details related to rendered tile pyramid.")+''' 301 |

302 | '''+_("Zoom levels to generate:")+''' 303 |

304 | '''+_("Minimum zoom:")+'''   305 | '''+_("Maximum zoom:")+''' 306 |
307 | 308 | '''+_("Note: The selected zoom levels are calculated from your input data and should be OK in most cases.")+''' 309 | 310 |

311 | '''+_('Please choose a file format')+''' 312 | 313 |

314 | 315 | 316 | 317 | 318 |

319 | 320 | '''+_('Note: For PNG tiles, it may be advisable to use some kind of PNG compression tool on the produced tiles to optimise file sizes.')+''' 321 | 322 | 349 | ''' 350 | 351 | step5 = '''

'''+_("Destination folder and address")+'''

352 | '''+_("Please select a directory where the generated tiles should be saved. Similarly you can specify the Internet address where will you publish the map.")+''' 353 |

354 | '''+_("Where to save the generated tiles?")+''' 355 |

356 | '''+_("Result directory:")+'''
357 | 358 | 359 |

360 | '''+_("The Internet address (URL) for publishing the map:")+''' 361 |

362 | '''+_("Destination URL:")+'''
363 | 364 |

365 | 366 | '''+_("Note: You should specify the URL if you need to generate the correct KML for Google Earth.")+''' 367 | ''' 368 | 369 | step6 = '''

'''+_("Selection of the viewers")+'''

370 | '''+_("MapSlicer can also generate simple web viewers for presenting the tiles as a map overlay. You can use these viewers as a base for your mashups. Similarly it is possible to generate KML files for Google Earth.")+''' 371 |

372 | '''+_("What viewers should be generated?")+''' 373 |

374 | 375 | 376 |

377 | '''+_("Overlay presentation of your maps on top of standard Google Maps layers. If KML is generated then the Google Earth Plugin is used as well.")+''' 378 |
379 | 380 |
381 | '''+_('Overlay of Google Maps, Bing Maps, Yahoo Maps, OpenStreetMap and OpenAerialMap, WMS and WFS layers and another sources available in the open-source project OpenLayers.')+''' 382 |
383 | 384 |
385 | '''+_("If this option is selected then metadata for Google Earth is generated for the tile tree. It means you can display the tiles as an overlay of the virtual 3D world of the Google Earth desktop application or browser plug-in.")+''' 386 |
387 |
''' 388 | 389 | step7 = '''

'''+_("Details for generating the viewers")+'''

390 | '''+_("Please add information related to the selected viewers.")+''' 391 |

392 | '''+_("Info about the map")+''' 393 |

394 | '''+_("Title of the map:")+'''
395 | 396 |

397 | '''+_("Copyright notice (optional):")+'''
398 | 399 |

400 | '''+_("The API keys for online maps API viewers")+''' 401 |

402 | '''+_("Google Maps API key (optional):")+'''
403 | 404 | 405 | '''+_('Note: You can get it online at this address.')+''' 406 | 407 |

408 | '''+_("Yahoo Application ID key (optional):")+'''
409 | 410 | 411 | '''+_('Note: You can get it at this webpage.')+''' 412 | ''' 413 | 414 | step8 = '''

'''+_("Tile rendering")+'''

415 | '''+_("Now you can start the rendering of the map tiles. It can be a time consuming process especially for large datasets... so be patient please.")+''' 416 |

417 | '''+_("Rendering progress:")+''' 418 |

419 | 420 | 421 | 422 |

423 | 424 | 425 | 426 | 427 | 428 |

429 | 430 | 431 | 432 |

433 | 434 |

  435 |
'''+_("Thank you for using MapSlicer application.")+"
"+_('This is an open-source project - you can help us to make it better.') 436 | 437 | # step9 - step8 with Resume button 438 | 439 | # step10: 440 | stepfinal = '''

'''+_("Your rendering task is finished!")+'''

441 | '''+_("Thank you for using this software. Now you can see the results. If you upload the directory with tiles to the Internet your map is published!")+''' 442 |

443 | '''+_("Available results:")+''' 444 |

445 | '''+_("The generated tiles and also the viewers are available in the output directory:")+''' 446 |

447 |

448 | %s
'''+_("(click to open)")+''' 449 |
450 | 456 |

  457 | ''' 458 | 459 | steps = ['NULL',step1, step2, step3, step4, step5, step6, step7, step8 ] 460 | 461 | -------------------------------------------------------------------------------- /mapslicer/wxgdal2tiles.py: -------------------------------------------------------------------------------- 1 | import wx 2 | import pp 3 | 4 | from time import sleep 5 | from thread import allocate_lock 6 | from Queue import Empty 7 | 8 | from gdal2tiles import GDAL2Tiles 9 | 10 | # TODO: GetText 11 | from config import _ 12 | 13 | UPDATE_PROGRESS_EVENT = wx.NewEventType() 14 | EVT_UPDATE_PROGRESS = wx.PyEventBinder(UPDATE_PROGRESS_EVENT, 0) 15 | 16 | 17 | class UpdateProgressEvent(wx.PyEvent): 18 | def __init__(self, progress): 19 | wx.PyEvent.__init__(self) 20 | self.SetEventType(UPDATE_PROGRESS_EVENT) 21 | self.progress = progress 22 | 23 | 24 | def process_tiles(args, method): 25 | 26 | """Process base or overview tiles.""" 27 | 28 | try: 29 | g2t = mapslicer.gdal2tiles.GDAL2Tiles(args, is_subprocess=True) 30 | g2t.open_input() 31 | 32 | if method == "base": 33 | g2t.generate_base_tiles() 34 | elif method == "overview": 35 | g2t.generate_overview_tiles() 36 | except Exception, e: 37 | error = e 38 | else: 39 | error = None 40 | 41 | sys.stderr.write("EXIT\n") 42 | sys.stderr.flush() 43 | 44 | return error 45 | 46 | 47 | class PPGDAL2Tiles(GDAL2Tiles): 48 | 49 | def __init__(self, args, gdal_cache=None): 50 | GDAL2Tiles.__init__(self, args, gdalcache=gdal_cache) 51 | self.__pp_args = args 52 | self.__pp_job_server = pp.Server(ncpus=1) 53 | self.__pp_lock = allocate_lock() 54 | 55 | def generate_base_tiles(self): 56 | self.__pp_run("base") 57 | 58 | def generate_overview_tiles(self): 59 | self.__pp_run("overview") 60 | 61 | def stop(self): 62 | GDAL2Tiles.stop(self) 63 | self.__pp_lock.acquire() 64 | self.__pp_lock.release() 65 | 66 | def __pp_run(self, method): 67 | self.__pp_lock.acquire() 68 | 69 | job = self.__pp_job_server.submit(process_tiles, args=(self.__pp_args, method), 70 | modules=("mapslicer.gdal2tiles", "sys")) 71 | 72 | progress = 0.0 73 | 74 | while not job.wait(0): 75 | try: 76 | for i in xrange(self.__pp_job_server.msg_que.qsize()): 77 | msg = self.__pp_job_server.msg_que.get_nowait() 78 | try: 79 | progress = float(msg) 80 | except ValueError: 81 | pass 82 | except Empty: 83 | pass 84 | 85 | sleep(0.128) 86 | 87 | self.progressbar(progress) 88 | 89 | if self.stopped: 90 | self.__pp_job_server.destroy() 91 | self.__pp_lock.release() 92 | return 93 | 94 | error = job() 95 | 96 | if error is not None: 97 | self.__pp_job_server.destroy() 98 | self.__pp_lock.release() 99 | self.error(str(error)) 100 | return 101 | 102 | # Don't leave unprocessed messages in queue. 103 | try: 104 | while True: 105 | self.__pp_job_server.msg_que.get_nowait() 106 | except Empty: 107 | pass 108 | 109 | self.progressbar(1.0) 110 | 111 | self.__pp_lock.release() 112 | 113 | 114 | def wxGDAL2TilesFactory(super_klass): 115 | 116 | """Return subclass of GDAL2Tiles-like super_klass with code for GUI added. 117 | 118 | The reason behind this factory is that MapSlicer GUI uses GDAL2Tiles object 119 | to calculate some default values. Using parallel version for this is overkill 120 | and adding this code to both `GDAL2Tiles' and `PPGDAL2Tiles' is not DRY. 121 | """ 122 | 123 | class klass(super_klass): 124 | 125 | """GUI capabilities for GDAL2Tiles.""" 126 | 127 | def __init__(self, *args, **kwargs): 128 | super_klass.__init__(self, *args, **kwargs) 129 | self.__wx_event_handler = None 130 | 131 | def error(self, msg, details = "" ): 132 | self.stop() 133 | 134 | if self.__wx_event_handler is not None: 135 | wx.PostEvent(self.__wx_event_handler, UpdateProgressEvent(0)) 136 | 137 | raise Exception(msg) 138 | 139 | def set_event_handler(self, event_handler): 140 | self.__wx_event_handler = event_handler 141 | 142 | def progressbar(self, complete=0.0): 143 | if self.__wx_event_handler is not None: 144 | wx.PostEvent(self.__wx_event_handler, UpdateProgressEvent(int(complete*100))) 145 | 146 | return klass 147 | 148 | 149 | wxGDAL2Tiles = wxGDAL2TilesFactory(GDAL2Tiles) 150 | wxPPGDAL2Tiles = wxGDAL2TilesFactory(PPGDAL2Tiles) 151 | 152 | -------------------------------------------------------------------------------- /resources/ajax-loader-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/ajax-loader-small.gif -------------------------------------------------------------------------------- /resources/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/ajax-loader.gif -------------------------------------------------------------------------------- /resources/cs/LC_MESSAGES/mapslicer.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/cs/LC_MESSAGES/mapslicer.mo -------------------------------------------------------------------------------- /resources/de/LC_MESSAGES/mapslicer.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/de/LC_MESSAGES/mapslicer.mo -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/icon.png -------------------------------------------------------------------------------- /resources/icon140.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/icon140.png -------------------------------------------------------------------------------- /resources/license/GDAL_LICENSE.TXT: -------------------------------------------------------------------------------- 1 | 2 | GDAL/OGR Licensing 3 | ================== 4 | 5 | This file attempts to include all licenses that apply within the GDAL/OGR 6 | source tree, in particular any that are supposed to be exposed to the end user 7 | for credit requirements for instance. The contents of this file can be 8 | displayed from GDAL commandline utilities using the --license commandline 9 | switch. 10 | 11 | 12 | GDAL/OGR General 13 | ---------------- 14 | 15 | In general GDAL/OGR is licensed under an MIT/X style license with the 16 | following terms: 17 | 18 | Permission is hereby granted, free of charge, to any person obtaining a 19 | copy of this software and associated documentation files (the "Software"), 20 | to deal in the Software without restriction, including without limitation 21 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 22 | and/or sell copies of the Software, and to permit persons to whom the 23 | Software is furnished to do so, subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included 26 | in all copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 29 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 30 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 31 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 32 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 33 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 34 | DEALINGS IN THE SOFTWARE. 35 | 36 | 37 | gdal/frmts/gtiff/tif_float.c 38 | ---------------------------- 39 | 40 | Copyright (c) 2002, Industrial Light & Magic, a division of Lucas 41 | Digital Ltd. LLC 42 | 43 | All rights reserved. 44 | 45 | Redistribution and use in source and binary forms, with or without 46 | modification, are permitted provided that the following conditions are 47 | met: 48 | * Redistributions of source code must retain the above copyright 49 | notice, this list of conditions and the following disclaimer. 50 | * Redistributions in binary form must reproduce the above 51 | copyright notice, this list of conditions and the following disclaimer 52 | in the documentation and/or other materials provided with the 53 | distribution. 54 | * Neither the name of Industrial Light & Magic nor the names of 55 | its contributors may be used to endorse or promote products derived 56 | from this software without specific prior written permission. 57 | 58 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 59 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 60 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 61 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 62 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 63 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 64 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 65 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 66 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 67 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 68 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 69 | 70 | 71 | gdal/frmts/hdf4/hdf-eos/* 72 | ------------------------ 73 | 74 | Copyright (C) 1996 Hughes and Applied Research Corporation 75 | 76 | Permission to use, modify, and distribute this software and its documentation 77 | for any purpose without fee is hereby granted, provided that the above 78 | copyright notice appear in all copies and that both that copyright notice and 79 | this permission notice appear in supporting documentation. 80 | 81 | 82 | gdal/frmts/pcraster/libcsf 83 | -------------------------- 84 | 85 | Copyright (c) 1997-2003, Utrecht University 86 | All rights reserved. 87 | 88 | Redistribution and use in source and binary forms, with or without 89 | modification, are permitted provided that the following conditions 90 | are met: 91 | 92 | * Redistributions of source code must retain the above copyright 93 | notice, this list of conditions and the following disclaimer. 94 | 95 | * Redistributions in binary form must reproduce the above 96 | copyright notice, this list of conditions and the following 97 | disclaimer in the documentation and/or other materials provided 98 | with the distribution. 99 | 100 | * Neither the name of Utrecht University nor the names of its contributors 101 | may be used to endorse or promote products derived from this software 102 | without specific prior written permission. 103 | 104 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 105 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 106 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 107 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 108 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 109 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 110 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 111 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 112 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 113 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 114 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 115 | 116 | gdal/frmts/grib/degrib/* 117 | ------------------------ 118 | 119 | The degrib and g2clib source code are modified versions of code produced 120 | by NOAA NWS and are in the public domain subject to the following 121 | restrictions: 122 | 123 | http://www.weather.gov/im/softa.htm 124 | 125 | DISCLAIMER The United States Government makes no warranty, expressed or 126 | implied, as to the usefulness of the software and documentation for any 127 | purpose. The U.S. Government, its instrumentalities, officers, employees, 128 | and agents assumes no responsibility (1) for the use of the software and 129 | documentation listed below, or (2) to provide technical support to users. 130 | 131 | http://www.weather.gov/disclaimer.php 132 | 133 | The information on government servers are in the public domain, unless 134 | specifically annotated otherwise, and may be used freely by the public so 135 | long as you do not 1) claim it is your own (e.g. by claiming copyright for 136 | NWS information -- see below), 2) use it in a manner that implies an 137 | endorsement or affiliation with NOAA/NWS, or 3) modify it in content and 138 | then present it as official government material. You also cannot present 139 | information of your own in a way that makes it appear to be official 140 | government information.. 141 | 142 | The user assumes the entire risk related to its use of this data. NWS is 143 | providing this data "as is," and NWS disclaims any and all warranties, 144 | whether express or implied, including (without limitation) any implied 145 | warranties of merchantability or fitness for a particular purpose. In no 146 | event will NWS be liable to you or to any third party for any direct, 147 | indirect, incidental, consequential, special or exemplary damages or lost 148 | profit resulting from any use or misuse of this data. 149 | 150 | As required by 17 U.S.C. 403, third parties producing copyrighted works 151 | consisting predominantly of the material appearing in NWS Web pages must 152 | provide notice with such work(s) identifying the NWS material incorporated 153 | and stating that such material is not subject to copyright protection. 154 | 155 | port/cpl_minizip* 156 | ----------------- 157 | 158 | This is version 2005-Feb-10 of the Info-ZIP copyright and license. 159 | The definitive version of this document should be available at 160 | ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely. 161 | 162 | 163 | Copyright (c) 1990-2005 Info-ZIP. All rights reserved. 164 | 165 | For the purposes of this copyright and license, "Info-ZIP" is defined as 166 | the following set of individuals: 167 | 168 | Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, 169 | Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, 170 | Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, 171 | David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, 172 | Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, 173 | Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, 174 | Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, 175 | Rich Wales, Mike White 176 | 177 | This software is provided "as is," without warranty of any kind, express 178 | or implied. In no event shall Info-ZIP or its contributors be held liable 179 | for any direct, indirect, incidental, special or consequential damages 180 | arising out of the use of or inability to use this software. 181 | 182 | Permission is granted to anyone to use this software for any purpose, 183 | including commercial applications, and to alter it and redistribute it 184 | freely, subject to the following restrictions: 185 | 186 | 1. Redistributions of source code must retain the above copyright notice, 187 | definition, disclaimer, and this list of conditions. 188 | 189 | 2. Redistributions in binary form (compiled executables) must reproduce 190 | the above copyright notice, definition, disclaimer, and this list of 191 | conditions in documentation and/or other materials provided with the 192 | distribution. The sole exception to this condition is redistribution 193 | of a standard UnZipSFX binary (including SFXWiz) as part of a 194 | self-extracting archive; that is permitted without inclusion of this 195 | license, as long as the normal SFX banner has not been removed from 196 | the binary or disabled. 197 | 198 | 3. Altered versions--including, but not limited to, ports to new operating 199 | systems, existing ports with new graphical interfaces, and dynamic, 200 | shared, or static library versions--must be plainly marked as such 201 | and must not be misrepresented as being the original source. Such 202 | altered versions also must not be misrepresented as being Info-ZIP 203 | releases--including, but not limited to, labeling of the altered 204 | versions with the names "Info-ZIP" (or any variation thereof, including, 205 | but not limited to, different capitalizations), "Pocket UnZip," "WiZ" 206 | or "MacZip" without the explicit permission of Info-ZIP. Such altered 207 | versions are further prohibited from misrepresentative use of the 208 | Zip-Bugs or Info-ZIP e-mail addresses or of the Info-ZIP URL(s). 209 | 210 | 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," 211 | "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its 212 | own source and binary releases. 213 | 214 | -------------------------------------------------------------------------------- /resources/license/PP_COPYING.txt: -------------------------------------------------------------------------------- 1 | Parallel Python Software: http://www.parallelpython.com 2 | Copyright (c) 2005-2008, Vitalii Vanovschi 3 | All rights reserved. 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, 9 | this list of conditions and the following disclaimer in the documentation 10 | and/or other materials provided with the distribution. 11 | * Neither the name of the author nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 25 | THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /resources/locale/cs_CZ.po: -------------------------------------------------------------------------------- 1 | # Translations template for MapSlicer. 2 | # Copyright (C) 2009-2015 OsGeo 3 | # This file is distributed under the same license as the MapSlicer project. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: MapSlicer\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2015-02-14 12:08+0100\n" 10 | "PO-Revision-Date: 2009-07-23 06:39-0800\n" 11 | "Last-Translator: Klokan Petr Pridal \n" 12 | "Language: cs\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=utf-8\n" 15 | 16 | #: mapslicer/config.py:34 17 | msgid "Supported raster files" 18 | msgstr "Podporované rastrové soubory" 19 | 20 | #: mapslicer/config.py:35 21 | msgid "TIFF / BigTIFF / GeoTIFF (.tif)" 22 | msgstr "" 23 | 24 | #: mapslicer/config.py:36 25 | msgid "BSB Nautical Chart Format (.kap)" 26 | msgstr "" 27 | 28 | #: mapslicer/config.py:37 29 | msgid "JPEG2000 - JPEG 2000 (.jp2, .j2k)" 30 | msgstr "" 31 | 32 | #: mapslicer/config.py:38 33 | msgid "MrSID - Multi-resolution Seamless Image Database (.sid)" 34 | msgstr "" 35 | 36 | #: mapslicer/config.py:39 37 | msgid "ECW - ERMapper Compressed Wavelets (.ecw)" 38 | msgstr "" 39 | 40 | #: mapslicer/config.py:40 41 | msgid "HFA - Erdas Imagine Images (.img)" 42 | msgstr "" 43 | 44 | #: mapslicer/config.py:41 45 | msgid "NITF - National Imagery Transmission Format (.nitf)" 46 | msgstr "" 47 | 48 | #: mapslicer/config.py:42 49 | msgid "NDF - NLAPS Data Format (.h1,.h2,.hd)" 50 | msgstr "" 51 | 52 | #: mapslicer/config.py:43 53 | msgid "MFF - Vexcel MFF Raster (.hdr)" 54 | msgstr "" 55 | 56 | #: mapslicer/config.py:44 57 | msgid "INGR - Intergraph Raster Format (.cit,.rgb,..)" 58 | msgstr "" 59 | 60 | #: mapslicer/config.py:45 61 | msgid "EIR - Erdas Imagine Raw (.raw)" 62 | msgstr "" 63 | 64 | #: mapslicer/config.py:46 65 | msgid "BLX - Magellan BLX Topo File Format (.blx)" 66 | msgstr "" 67 | 68 | #: mapslicer/config.py:47 69 | msgid "JPEG - Joint Photographic Experts Group JFIF (.jpg)" 70 | msgstr "" 71 | 72 | #: mapslicer/config.py:48 73 | msgid "PNG - Portable Network Graphics (.png)" 74 | msgstr "" 75 | 76 | #: mapslicer/config.py:49 77 | msgid "GIF - Graphics Interchange Format (.gif)" 78 | msgstr "" 79 | 80 | #: mapslicer/config.py:50 81 | msgid "BMP - Microsoft Windows Device Independent Bitmap (.bmp)" 82 | msgstr "" 83 | 84 | #: mapslicer/config.py:51 85 | msgid "WMS - GDAL driver for OGC Web Map Server (.wms)" 86 | msgstr "" 87 | 88 | #: mapslicer/config.py:52 89 | msgid "VRT - GDAL Virtual Raster (.vrt)" 90 | msgstr "" 91 | 92 | #: mapslicer/config.py:53 93 | msgid "All files (*.*)" 94 | msgstr "Všechny soubory (*.*)" 95 | 96 | #: mapslicer/config.py:66 97 | msgid "Custom definition of the system (WKT, Proj.4,..)" 98 | msgstr "Vlastní definice systému souřadnic (WKT, Proj.4,...)" 99 | 100 | #: mapslicer/config.py:67 101 | msgid "WGS84 - Latitude and longitude (geodetic)" 102 | msgstr "WGS84 - Rovnoběžky a poledníky (zeměpisné souřadnice)" 103 | 104 | #: mapslicer/config.py:68 105 | msgid "Universal Transverse Mercator - UTM (projected)" 106 | msgstr "Univerzální Mercatorovo zobrazení - UTM (rovinné souřadnice)" 107 | 108 | #: mapslicer/config.py:69 109 | msgid "Specify the id-number from the EPSG/ESRI database" 110 | msgstr "Zadejte identifikační číslo z databáze EPSG/ESRI" 111 | 112 | #: mapslicer/config.py:70 113 | msgid "Search the coordinate system by name" 114 | msgstr "Hledat systém souřadnic dle názvu" 115 | 116 | #: mapslicer/config.py:74 117 | msgid "SRSCustom0" 118 | msgstr "" 119 | 120 | #: mapslicer/config.py:74 121 | msgid "SRSDefinition0" 122 | msgstr "" 123 | 124 | #: mapslicer/config.py:75 125 | msgid "SRSCustom1" 126 | msgstr "" 127 | 128 | #: mapslicer/config.py:75 129 | msgid "SRSDefinition1" 130 | msgstr "" 131 | 132 | #: mapslicer/config.py:76 133 | msgid "SRSCustom2" 134 | msgstr "" 135 | 136 | #: mapslicer/config.py:76 137 | msgid "SRSDefinition2" 138 | msgstr "" 139 | 140 | #: mapslicer/config.py:77 141 | msgid "SRSCustom3" 142 | msgstr "" 143 | 144 | #: mapslicer/config.py:77 145 | msgid "SRSDefinition3" 146 | msgstr "" 147 | 148 | #: mapslicer/config.py:78 149 | msgid "SRSCustom4" 150 | msgstr "" 151 | 152 | #: mapslicer/config.py:78 153 | msgid "SRSDefinition4" 154 | msgstr "" 155 | 156 | #: mapslicer/config.py:79 157 | msgid "SRSCustom5" 158 | msgstr "" 159 | 160 | #: mapslicer/config.py:79 161 | msgid "SRSDefinition5" 162 | msgstr "" 163 | 164 | #: mapslicer/config.py:80 165 | msgid "SRSCustom6" 166 | msgstr "" 167 | 168 | #: mapslicer/config.py:80 169 | msgid "SRSDefinition6" 170 | msgstr "" 171 | 172 | #: mapslicer/config.py:81 173 | msgid "SRSCustom7" 174 | msgstr "" 175 | 176 | #: mapslicer/config.py:81 177 | msgid "SRSDefinition7" 178 | msgstr "" 179 | 180 | #: mapslicer/config.py:82 181 | msgid "SRSCustom8" 182 | msgstr "" 183 | 184 | #: mapslicer/config.py:82 185 | msgid "SRSDefinition8" 186 | msgstr "" 187 | 188 | #: mapslicer/config.py:83 189 | msgid "SRSCustom9" 190 | msgstr "" 191 | 192 | #: mapslicer/config.py:83 193 | msgid "SRSDefinition9" 194 | msgstr "" 195 | 196 | #: mapslicer/main.py:52 197 | msgid "Tile Profile" 198 | msgstr "" 199 | 200 | #: mapslicer/main.py:53 201 | msgid "Source Data Files" 202 | msgstr "Vstupní datové soubory" 203 | 204 | #: mapslicer/main.py:54 205 | msgid "Spatial Reference" 206 | msgstr "Prostorové umístění" 207 | 208 | #: mapslicer/main.py:55 209 | msgid "Tile Details" 210 | msgstr "Detaily k dlaždicím" 211 | 212 | #: mapslicer/main.py:56 213 | msgid "Destination" 214 | msgstr "" 215 | 216 | #: mapslicer/main.py:57 217 | msgid "Viewers" 218 | msgstr "" 219 | 220 | #: mapslicer/main.py:58 221 | msgid "Viewer Details" 222 | msgstr "Detaily k prohlížečkám" 223 | 224 | #: mapslicer/main.py:59 225 | msgid "Rendering" 226 | msgstr "" 227 | 228 | #: mapslicer/main.py:61 mapslicer/main.py:82 229 | msgid "MapSlicer - Tile Generator for Map Mashups" 230 | msgstr "" 231 | 232 | #: mapslicer/main.py:63 233 | #, python-format 234 | msgid "Version %s" 235 | msgstr "" 236 | 237 | #: mapslicer/main.py:64 238 | msgid "https://wiki.osgeo.org/wiki/MapSlicer" 239 | msgstr "" 240 | 241 | #: mapslicer/main.py:66 mapslicer/main.py:154 mapslicer/main.py:161 242 | #: mapslicer/main.py:164 mapslicer/main.py:166 243 | msgid "Go &Back" 244 | msgstr "&Zpět" 245 | 246 | #: mapslicer/main.py:68 mapslicer/main.py:153 247 | msgid "&Continue" 248 | msgstr "&Pokračovat" 249 | 250 | #: mapslicer/main.py:157 mapslicer/main.py:163 251 | msgid "&Render" 252 | msgstr "" 253 | 254 | #: mapslicer/main.py:158 255 | msgid "&Stop" 256 | msgstr "" 257 | 258 | #: mapslicer/main.py:160 259 | msgid "&Resume" 260 | msgstr "" 261 | 262 | #: mapslicer/main.py:167 263 | msgid "Exit" 264 | msgstr "" 265 | 266 | #: mapslicer/main.py:195 267 | msgid "You have to add some files for rendering" 268 | msgstr "" 269 | 270 | #: mapslicer/main.py:195 271 | msgid "No files specified" 272 | msgstr "Nebyl vybrán žádný soubor" 273 | 274 | #: mapslicer/main.py:198 275 | msgid "" 276 | "The file you have specified does not have any georeference.\n" 277 | "\n" 278 | "Click on the 'Georeference' button and give a bounding box or \n" 279 | "create a world file (.wld) for the specified file." 280 | msgstr "" 281 | 282 | #: mapslicer/main.py:198 283 | msgid "Missing georeference" 284 | msgstr "Chybí georeference" 285 | 286 | #: mapslicer/main.py:206 287 | msgid "" 288 | "You have to specify reference system of your coordinates.\n" 289 | "\n" 290 | "TIP: for latitude/longitude in WGS84 you should type 'EPSG:4326'" 291 | msgstr "" 292 | 293 | #: mapslicer/main.py:206 294 | msgid "Not valid spatial reference system" 295 | msgstr "" 296 | 297 | #: mapslicer/main.py:216 298 | #, python-format 299 | msgid "The selected output directory '%s' is not writeable." 300 | msgstr "" 301 | 302 | #: mapslicer/main.py:217 mapslicer/main.py:225 mapslicer/widgets.py:153 303 | msgid "Bad permissions" 304 | msgstr "" 305 | 306 | #: mapslicer/main.py:223 307 | #, python-format 308 | msgid "" 309 | "The selected output directory '%s' can't be created, because its " 310 | "superdirectory '%s' is not writeable." 311 | msgstr "" 312 | 313 | #: mapslicer/main.py:246 mapslicer/widgets.py:113 314 | msgid "" 315 | "Unfortunately the merging of files is not yet implemented in the MapSlicer " 316 | "GUI. Only the first file in the list is going to be rendered." 317 | msgstr "" 318 | 319 | #: mapslicer/main.py:246 320 | msgid "Not yet implemented :-(" 321 | msgstr "Není zatím naprogramováno :-( " 322 | 323 | #: mapslicer/main.py:258 324 | msgid "Rendering stopped !!!!" 325 | msgstr "" 326 | 327 | #: mapslicer/main.py:264 328 | msgid "Started..." 329 | msgstr "" 330 | 331 | #: mapslicer/main.py:333 332 | msgid "Opening the input files" 333 | msgstr "Výběr vstupních souborů" 334 | 335 | #: mapslicer/main.py:338 336 | msgid "Generating viewers and metadata" 337 | msgstr "" 338 | 339 | #: mapslicer/main.py:343 340 | msgid "Rendering the base tiles" 341 | msgstr "" 342 | 343 | #: mapslicer/main.py:348 344 | msgid "Rendering the overview tiles in the pyramid" 345 | msgstr "" 346 | 347 | #: mapslicer/main.py:353 348 | msgid "Generating KML" 349 | msgstr "" 350 | 351 | #: mapslicer/main.py:369 352 | #, fuzzy 353 | msgid "Rendering error!" 354 | msgstr "Chyba při vykreslování" 355 | 356 | #: mapslicer/widgets.py:35 357 | msgid "Error opening file\n" 358 | msgstr "Chyba při otevírání souboru\n" 359 | 360 | #: mapslicer/widgets.py:38 361 | msgid "Cannot open non ascii files\n" 362 | msgstr "" 363 | 364 | #: mapslicer/widgets.py:46 365 | msgid "Filename" 366 | msgstr "Název souboru" 367 | 368 | #: mapslicer/widgets.py:47 mapslicer/widgets.py:95 369 | msgid "Georeference" 370 | msgstr "" 371 | 372 | #: mapslicer/widgets.py:113 373 | #, fuzzy 374 | msgid "Not yet implemented" 375 | msgstr "Není zatím naprogramováno :-( " 376 | 377 | #: mapslicer/widgets.py:129 mapslicer/widgets.py:159 378 | msgid "Can't add a file" 379 | msgstr "" 380 | 381 | #: mapslicer/widgets.py:133 382 | msgid "Choose a file" 383 | msgstr "Zvolte soubor" 384 | 385 | #: mapslicer/widgets.py:148 386 | msgid "" 387 | "MapSlicer can't find the following file:\n" 388 | "\n" 389 | msgstr "" 390 | 391 | #: mapslicer/widgets.py:149 392 | msgid "File not found" 393 | msgstr "" 394 | 395 | #: mapslicer/widgets.py:152 396 | msgid "" 397 | "MapSlicer doesn't have permission to read the following file:\n" 398 | "\n" 399 | msgstr "" 400 | 401 | #: mapslicer/widgets.py:173 402 | msgid "" 403 | "Please specify bounding box as 4 numbers or a world file as 6 numbers\n" 404 | "Format: 'north south east west'\n" 405 | "\n" 406 | "Alternatively you can create a world file (.wld) or (.tab) by an external " 407 | "GIS software" 408 | msgstr "" 409 | 410 | #: mapslicer/widgets.py:174 411 | msgid "Georeference with bounding box" 412 | msgstr "" 413 | 414 | #: mapslicer/widgets.py:215 415 | msgid "Set transparency for a color (NODATA):" 416 | msgstr "" 417 | 418 | #: mapslicer/widgets.py:297 419 | msgid "EPSG Registry" 420 | msgstr "" 421 | 422 | #: mapslicer/widgets.py:306 423 | msgid "Paste here the \"OGC WKT\" or \"Proj4\" definition or the URL:" 424 | msgstr "" 425 | 426 | #: mapslicer/widgets.py:313 427 | msgid "UTM Zone:" 428 | msgstr "UTM zóna:" 429 | 430 | #: mapslicer/widgets.py:323 431 | msgid "Set" 432 | msgstr "Nastav" 433 | 434 | #: mapslicer/widgets.py:329 435 | msgid "Preview the map reference with this SRS" 436 | msgstr "" 437 | 438 | #: mapslicer/widgets.py:396 439 | #, python-format 440 | msgid "%s / UTM Zone %s%s" 441 | msgstr "%s / UTM zóna %s%s" 442 | 443 | #: mapslicer/widgets.py:407 mapslicer/widgets.py:430 444 | msgid "The SRS definition is not correct" 445 | msgstr "" 446 | 447 | #: mapslicer/wizard.py:71 mapslicer/wizard.py:79 mapslicer/wizard.py:316 448 | msgid "PNG - with transparency" 449 | msgstr "" 450 | 451 | #: mapslicer/wizard.py:72 mapslicer/wizard.py:80 mapslicer/wizard.py:316 452 | msgid "JPEG - smaller but without transparency" 453 | msgstr "" 454 | 455 | #: mapslicer/wizard.py:73 mapslicer/wizard.py:81 mapslicer/wizard.py:316 456 | msgid "Hybrid JPEG+PNG - only for Google Earth" 457 | msgstr "" 458 | 459 | #: mapslicer/wizard.py:74 460 | msgid "Garmin Custom maps KMZ - 256 pixels" 461 | msgstr "" 462 | 463 | #: mapslicer/wizard.py:75 464 | msgid "Garmin Custom maps KMZ - 512 pixels" 465 | msgstr "" 466 | 467 | #: mapslicer/wizard.py:76 468 | msgid "Garmin Custom maps KMZ - 1024 pixels" 469 | msgstr "" 470 | 471 | #: mapslicer/wizard.py:211 472 | msgid "Choose output directory" 473 | msgstr "" 474 | 475 | #: mapslicer/wizard.py:217 476 | msgid "Nothing to update - progressbar not displayed" 477 | msgstr "" 478 | 479 | #: mapslicer/wizard.py:224 480 | msgid "Nothing to update - progresstext not displayed" 481 | msgstr "" 482 | 483 | #: mapslicer/wizard.py:239 484 | msgid "Selection of the tile profile" 485 | msgstr "Výběr typu dlaždic" 486 | 487 | #: mapslicer/wizard.py:241 488 | msgid "What kind of tiles would you like to generate?" 489 | msgstr "Jaký druh dlaždic chcete generovat?" 490 | 491 | #: mapslicer/wizard.py:245 492 | msgid "Google Maps compatible (Spherical Mercator)" 493 | msgstr "" 494 | 495 | #: mapslicer/wizard.py:249 496 | msgid "" 497 | "Mercator tiles compatible with Google, Yahoo or Bing maps and OpenStreetMap. " 498 | "Suitable for mashups and overlay with these popular interactive maps." 499 | msgstr "" 500 | 501 | #: mapslicer/wizard.py:252 502 | msgid "Google Earth (KML SuperOverlay)" 503 | msgstr "" 504 | 505 | #: mapslicer/wizard.py:256 506 | msgid "" 507 | "Tiles and KML metadata for 3D visualization in Google Earth desktop " 508 | "application or in the web browser plugin." 509 | msgstr "" 510 | 511 | #: mapslicer/wizard.py:259 512 | #, fuzzy 513 | msgid "WGS84 Plate Carree (Geodetic)" 514 | msgstr "WGS84 - Rovnoběžky a poledníky (zeměpisné souřadnice)" 515 | 516 | #: mapslicer/wizard.py:263 517 | msgid "" 518 | "Compatible with most existing WMS servers, with the OpenLayers base map, " 519 | "Google Earth and other applications using WGS84 coordinates (EPSG:4326)." 521 | msgstr "" 522 | 523 | #: mapslicer/wizard.py:266 524 | msgid "Image Based Tiles (Raster)" 525 | msgstr "" 526 | 527 | #: mapslicer/wizard.py:270 528 | msgid "" 529 | "Tiles based on the dimensions of the picture in pixels (width and height). " 530 | "Stand-alone presentation even for images without georeference." 531 | msgstr "" 532 | 533 | #: mapslicer/wizard.py:274 534 | #, fuzzy 535 | msgid "Source data files" 536 | msgstr "Vstupní datové soubory" 537 | 538 | #: mapslicer/wizard.py:275 539 | msgid "Please choose the raster files of the maps you would like to publish." 540 | msgstr "" 541 | 542 | #: mapslicer/wizard.py:277 543 | #, fuzzy 544 | msgid "Input raster map files:" 545 | msgstr "Podporované rastrové soubory" 546 | 547 | #: mapslicer/wizard.py:290 548 | #, fuzzy 549 | msgid "Spatial reference system (SRS)" 550 | msgstr "Prostorové umístění" 551 | 552 | #: mapslicer/wizard.py:291 553 | msgid "" 554 | "It is necessary to know which coordinate system (Spatial Reference System) " 555 | "is used for georeferencing of the input files." 556 | msgstr "" 557 | 558 | #: mapslicer/wizard.py:293 559 | msgid "What is the Spatial Reference System used in your files?" 560 | msgstr "" 561 | 562 | #: mapslicer/wizard.py:299 563 | #, fuzzy 564 | msgid "Details about the tile pyramid" 565 | msgstr "Výběr typu dlaždic" 566 | 567 | #: mapslicer/wizard.py:300 568 | msgid "" 569 | "In this step you should specify the details related to rendered tile pyramid." 570 | msgstr "" 571 | 572 | #: mapslicer/wizard.py:302 573 | msgid "Zoom levels to generate:" 574 | msgstr "" 575 | 576 | #: mapslicer/wizard.py:304 577 | msgid "Minimum zoom:" 578 | msgstr "" 579 | 580 | #: mapslicer/wizard.py:305 581 | msgid "Maximum zoom:" 582 | msgstr "" 583 | 584 | #: mapslicer/wizard.py:308 585 | msgid "" 586 | "Note: The selected zoom levels are calculated from your input data and " 587 | "should be OK in most cases." 588 | msgstr "" 589 | 590 | #: mapslicer/wizard.py:311 591 | #, fuzzy 592 | msgid "Please choose a file format" 593 | msgstr "Zvolte soubor" 594 | 595 | #: mapslicer/wizard.py:320 596 | msgid "" 597 | "Note: For PNG tiles, it may be advisable to use some kind of PNG compression " 598 | "tool on the produced tiles to optimise file sizes." 599 | msgstr "" 600 | 601 | #: mapslicer/wizard.py:351 602 | msgid "Destination folder and address" 603 | msgstr "" 604 | 605 | #: mapslicer/wizard.py:352 606 | msgid "" 607 | "Please select a directory where the generated tiles should be saved. " 608 | "Similarly you can specify the Internet address where will you publish the " 609 | "map." 610 | msgstr "" 611 | 612 | #: mapslicer/wizard.py:354 613 | msgid "Where to save the generated tiles?" 614 | msgstr "" 615 | 616 | #: mapslicer/wizard.py:356 617 | msgid "Result directory:" 618 | msgstr "" 619 | 620 | #: mapslicer/wizard.py:358 621 | msgid "Browse..." 622 | msgstr "" 623 | 624 | #: mapslicer/wizard.py:360 625 | msgid "The Internet address (URL) for publishing the map:" 626 | msgstr "" 627 | 628 | #: mapslicer/wizard.py:362 629 | msgid "Destination URL:" 630 | msgstr "" 631 | 632 | #: mapslicer/wizard.py:366 633 | msgid "" 634 | "Note: You should specify the URL if you need to generate the correct KML for " 635 | "Google Earth." 636 | msgstr "" 637 | 638 | #: mapslicer/wizard.py:369 639 | #, fuzzy 640 | msgid "Selection of the viewers" 641 | msgstr "Výběr typu dlaždic" 642 | 643 | #: mapslicer/wizard.py:370 644 | msgid "" 645 | "MapSlicer can also generate simple web viewers for presenting the tiles as a " 646 | "map overlay. You can use these viewers as a base for your mashups. Similarly " 647 | "it is possible to generate KML files for Google Earth." 648 | msgstr "" 649 | 650 | #: mapslicer/wizard.py:372 651 | #, fuzzy 652 | msgid "What viewers should be generated?" 653 | msgstr "Jaký druh dlaždic chcete generovat?" 654 | 655 | #: mapslicer/wizard.py:375 656 | msgid "Google Maps" 657 | msgstr "" 658 | 659 | #: mapslicer/wizard.py:377 660 | msgid "" 661 | "Overlay presentation of your maps on top of standard Google Maps layers. If " 662 | "KML is generated then the Google Earth Plugin is used as well." 663 | msgstr "" 664 | 665 | #: mapslicer/wizard.py:379 666 | msgid "OpenLayers" 667 | msgstr "" 668 | 669 | #: mapslicer/wizard.py:381 670 | msgid "" 671 | "Overlay of Google Maps, Bing Maps, Yahoo Maps, OpenStreetMap and " 672 | "OpenAerialMap, WMS and WFS layers and another sources available in the open-" 673 | "source project OpenLayers." 674 | msgstr "" 675 | 676 | #: mapslicer/wizard.py:385 677 | msgid "" 678 | "If this option is selected then metadata for Google Earth is generated for " 679 | "the tile tree. It means you can display the tiles as an overlay of the " 680 | "virtual 3D world of the Google Earth desktop application or browser plug-in." 681 | msgstr "" 682 | 683 | #: mapslicer/wizard.py:389 684 | msgid "Details for generating the viewers" 685 | msgstr "" 686 | 687 | #: mapslicer/wizard.py:390 688 | msgid "Please add information related to the selected viewers." 689 | msgstr "" 690 | 691 | #: mapslicer/wizard.py:392 692 | msgid "Info about the map" 693 | msgstr "" 694 | 695 | #: mapslicer/wizard.py:394 696 | msgid "Title of the map:" 697 | msgstr "" 698 | 699 | #: mapslicer/wizard.py:397 700 | msgid "Copyright notice (optional):" 701 | msgstr "" 702 | 703 | #: mapslicer/wizard.py:400 704 | msgid "The API keys for online maps API viewers" 705 | msgstr "" 706 | 707 | #: mapslicer/wizard.py:402 708 | msgid "Google Maps API key (optional):" 709 | msgstr "" 710 | 711 | #: mapslicer/wizard.py:405 712 | msgid "" 713 | "Note: You can get it online at this address." 715 | msgstr "" 716 | 717 | #: mapslicer/wizard.py:408 718 | msgid "Yahoo Application ID key (optional):" 719 | msgstr "" 720 | 721 | #: mapslicer/wizard.py:411 722 | msgid "" 723 | "Note: You can get it at " 724 | "this webpage." 725 | msgstr "" 726 | 727 | #: mapslicer/wizard.py:414 728 | msgid "Tile rendering" 729 | msgstr "" 730 | 731 | #: mapslicer/wizard.py:415 732 | msgid "" 733 | "Now you can start the rendering of the map tiles. It can be a time consuming " 734 | "process especially for large datasets... so be patient please." 735 | msgstr "" 736 | 737 | #: mapslicer/wizard.py:417 738 | #, fuzzy 739 | msgid "Rendering progress:" 740 | msgstr "Chyba při vykreslování" 741 | 742 | #: mapslicer/wizard.py:426 743 | msgid "Click on the 'Render' button to start the rendering..." 744 | msgstr "" 745 | 746 | #: mapslicer/wizard.py:435 747 | msgid "Thank you for using MapSlicer application." 748 | msgstr "" 749 | 750 | #: mapslicer/wizard.py:435 751 | msgid "This is an open-source project - you can help us to make it better." 752 | msgstr "" 753 | 754 | #: mapslicer/wizard.py:440 755 | #, fuzzy 756 | msgid "Your rendering task is finished!" 757 | msgstr "Úloha je dokončena!" 758 | 759 | #: mapslicer/wizard.py:441 760 | msgid "" 761 | "Thank you for using this software. Now you can see the results. If you " 762 | "upload the directory with tiles to the Internet your map is published!" 763 | msgstr "" 764 | 765 | #: mapslicer/wizard.py:443 766 | msgid "Available results:" 767 | msgstr "" 768 | 769 | #: mapslicer/wizard.py:445 770 | msgid "" 771 | "The generated tiles and also the viewers are available in the output " 772 | "directory:" 773 | msgstr "" 774 | 775 | #: mapslicer/wizard.py:448 776 | msgid "(click to open)" 777 | msgstr "" 778 | 779 | -------------------------------------------------------------------------------- /resources/locale/de.po: -------------------------------------------------------------------------------- 1 | # Translations template for MapSlicer 2 | # Copyright (C) 2009-2015 3 | # This file is distributed under the same license as the MapSlicer package. 4 | # 5 | msgid "" 6 | msgstr "" 7 | "POT-Creation-Date: 2015-02-14 12:08+0100\n" 8 | "PO-Revision-Date: 2015-02-14 18:39+0100\n" 9 | "Last-Translator: activityworkshop\n" 10 | "Language: de\n" 11 | "MIME-Version: 1.0\n" 12 | "Content-Type: text/plain; charset=UTF-8\n" 13 | 14 | 15 | #: mapslicer/config.py:34 16 | msgid "Supported raster files" 17 | msgstr "Unterstütze RasterDateien" 18 | 19 | #: mapslicer/config.py:35 20 | msgid "TIFF / BigTIFF / GeoTIFF (.tif)" 21 | msgstr "TIFF / BigTIFF / GeoTIFF (.tif)" 22 | 23 | #: mapslicer/config.py:36 24 | msgid "BSB Nautical Chart Format (.kap)" 25 | msgstr "BSB Nautical Chart Format (.kap)" 26 | 27 | #: mapslicer/config.py:37 28 | msgid "JPEG2000 - JPEG 2000 (.jp2, .j2k)" 29 | msgstr "JPEG2000 - JPEG 2000 (.jp2, .j2k)" 30 | 31 | #: mapslicer/config.py:38 32 | msgid "MrSID - Multi-resolution Seamless Image Database (.sid)" 33 | msgstr "MrSID - Multi-resolution Seamless Image Database (.sid)" 34 | 35 | #: mapslicer/config.py:39 36 | msgid "ECW - ERMapper Compressed Wavelets (.ecw)" 37 | msgstr "ECW - ERMapper Compressed Wavelets (.ecw)" 38 | 39 | #: mapslicer/config.py:40 40 | msgid "HFA - Erdas Imagine Images (.img)" 41 | msgstr "HFA - Erdas Imagine Images (.img)" 42 | 43 | #: mapslicer/config.py:41 44 | msgid "NITF - National Imagery Transmission Format (.nitf)" 45 | msgstr "NITF - National Imagery Transmission Format (.nitf)" 46 | 47 | #: mapslicer/config.py:42 48 | msgid "NDF - NLAPS Data Format (.h1,.h2,.hd)" 49 | msgstr "NDF - NLAPS Data Format (.h1,.h2,.hd)" 50 | 51 | #: mapslicer/config.py:43 52 | msgid "MFF - Vexcel MFF Raster (.hdr)" 53 | msgstr "MFF - Vexcel MFF Raster (.hdr)" 54 | 55 | #: mapslicer/config.py:44 56 | msgid "INGR - Intergraph Raster Format (.cit,.rgb,..)" 57 | msgstr "INGR - Intergraph Raster Format (.cit,.rgb,..)" 58 | 59 | #: mapslicer/config.py:45 60 | msgid "EIR - Erdas Imagine Raw (.raw)" 61 | msgstr "EIR - Erdas Imagine Raw (.raw)" 62 | 63 | #: mapslicer/config.py:46 64 | msgid "BLX - Magellan BLX Topo File Format (.blx)" 65 | msgstr "BLX - Magellan BLX Topo File Format (.blx)" 66 | 67 | #: mapslicer/config.py:47 68 | msgid "JPEG - Joint Photographic Experts Group JFIF (.jpg)" 69 | msgstr "JPEG - Joint Photographic Experts Group JFIF (.jpg)" 70 | 71 | #: mapslicer/config.py:48 72 | msgid "PNG - Portable Network Graphics (.png)" 73 | msgstr "PNG - Portable Network Graphics (.png)" 74 | 75 | #: mapslicer/config.py:49 76 | msgid "GIF - Graphics Interchange Format (.gif)" 77 | msgstr "GIF - Graphics Interchange Format (.gif)" 78 | 79 | #: mapslicer/config.py:50 80 | msgid "BMP - Microsoft Windows Device Independent Bitmap (.bmp)" 81 | msgstr "BMP - Microsoft Windows Device Independent Bitmap (.bmp)" 82 | 83 | #: mapslicer/config.py:51 84 | msgid "WMS - GDAL driver for OGC Web Map Server (.wms)" 85 | msgstr "WMS - GDAL driver for OGC Web Map Server (.wms)" 86 | 87 | #: mapslicer/config.py:52 88 | msgid "VRT - GDAL Virtual Raster (.vrt)" 89 | msgstr "VRT - GDAL Virtual Raster (.vrt)" 90 | 91 | #: mapslicer/config.py:53 92 | msgid "All files (*.*)" 93 | msgstr "Alle Dateien (*.*)" 94 | 95 | #: mapslicer/config.py:66 96 | msgid "Custom definition of the system (WKT, Proj.4,..)" 97 | msgstr "Eigene Definition des Systems (WKT, Proj.4,..)" 98 | 99 | #: mapslicer/config.py:67 100 | msgid "WGS84 - Latitude and longitude (geodetic)" 101 | msgstr "WGS84 - Latitud und Longitud (Geodätisch)" 102 | 103 | #: mapslicer/config.py:68 104 | msgid "Universal Transverse Mercator - UTM (projected)" 105 | msgstr "Universal Transverse Mercator - UTM (projiziert)" 106 | 107 | #: mapslicer/config.py:69 108 | msgid "Specify the id-number from the EPSG/ESRI database" 109 | msgstr "Id-Nummer aus der EPSG/ESRI Datenbank eingeben" 110 | 111 | #: mapslicer/config.py:70 112 | msgid "Search the coordinate system by name" 113 | msgstr "Koordinatensystem suchen" 114 | 115 | #: mapslicer/config.py:74 116 | msgid "SRSCustom0" 117 | msgstr "SRSCustom0" 118 | 119 | #: mapslicer/config.py:74 120 | msgid "SRSDefinition0" 121 | msgstr "SRSDefinition0" 122 | 123 | #: mapslicer/config.py:75 124 | msgid "SRSCustom1" 125 | msgstr "SRSCustom1" 126 | 127 | #: mapslicer/config.py:75 128 | msgid "SRSDefinition1" 129 | msgstr "SRSDefinition1" 130 | 131 | #: mapslicer/config.py:76 132 | msgid "SRSCustom2" 133 | msgstr "SRSCustom2" 134 | 135 | #: mapslicer/config.py:76 136 | msgid "SRSDefinition2" 137 | msgstr "SRSDefinition2" 138 | 139 | #: mapslicer/config.py:77 140 | msgid "SRSCustom3" 141 | msgstr "SRSCustom3" 142 | 143 | #: mapslicer/config.py:77 144 | msgid "SRSDefinition3" 145 | msgstr "SRSDefinition3" 146 | 147 | #: mapslicer/config.py:78 148 | msgid "SRSCustom4" 149 | msgstr "SRSCustom4" 150 | 151 | #: mapslicer/config.py:78 152 | msgid "SRSDefinition4" 153 | msgstr "SRSDefinition4" 154 | 155 | #: mapslicer/config.py:79 156 | msgid "SRSCustom5" 157 | msgstr "SRSCustom5" 158 | 159 | #: mapslicer/config.py:79 160 | msgid "SRSDefinition5" 161 | msgstr "SRSDefinition5" 162 | 163 | #: mapslicer/config.py:80 164 | msgid "SRSCustom6" 165 | msgstr "SRSCustom6" 166 | 167 | #: mapslicer/config.py:80 168 | msgid "SRSDefinition6" 169 | msgstr "SRSDefinition6" 170 | 171 | #: mapslicer/config.py:81 172 | msgid "SRSCustom7" 173 | msgstr "SRSCustom7" 174 | 175 | #: mapslicer/config.py:81 176 | msgid "SRSDefinition7" 177 | msgstr "SRSDefinition7" 178 | 179 | #: mapslicer/config.py:82 180 | msgid "SRSCustom8" 181 | msgstr "SRSCustom8" 182 | 183 | #: mapslicer/config.py:82 184 | msgid "SRSDefinition8" 185 | msgstr "SRSDefinition8" 186 | 187 | #: mapslicer/config.py:83 188 | msgid "SRSCustom9" 189 | msgstr "SRSCustom9" 190 | 191 | #: mapslicer/config.py:83 192 | msgid "SRSDefinition9" 193 | msgstr "SRSDefinition9" 194 | 195 | #: mapslicer/main.py:52 196 | msgid "Tile Profile" 197 | msgstr "Kachel Profil" 198 | 199 | #: mapslicer/main.py:53 200 | msgid "Source Data Files" 201 | msgstr "Quelldateien" 202 | 203 | #: mapslicer/main.py:54 204 | msgid "Spatial Reference" 205 | msgstr "Räumliches Referenz" 206 | 207 | #: mapslicer/main.py:55 208 | msgid "Tile Details" 209 | msgstr "Kacheln Bestimmung" 210 | 211 | #: mapslicer/main.py:56 212 | msgid "Destination" 213 | msgstr "Ausgabe" 214 | 215 | #: mapslicer/main.py:57 216 | msgid "Viewers" 217 | msgstr "Viewers" 218 | 219 | #: mapslicer/main.py:58 220 | msgid "Viewer Details" 221 | msgstr "Viewer Details" 222 | 223 | #: mapslicer/main.py:59 224 | msgid "Rendering" 225 | msgstr "Rendern" 226 | 227 | #: mapslicer/main.py:61 mapslicer/main.py:82 228 | msgid "MapSlicer - Tile Generator for Map Mashups" 229 | msgstr "MapSlicer - Kacheln-Generator" 230 | 231 | #: mapslicer/main.py:63 232 | #, python-format 233 | msgid "Version %s" 234 | msgstr "Version %s" 235 | 236 | #: mapslicer/main.py:64 237 | msgid "https://wiki.osgeo.org/wiki/MapSlicer" 238 | msgstr "https://wiki.osgeo.org/wiki/MapSlicer" 239 | 240 | #: mapslicer/main.py:66 mapslicer/main.py:154 mapslicer/main.py:161 241 | #: mapslicer/main.py:164 mapslicer/main.py:166 242 | msgid "Go &Back" 243 | msgstr "&Zurück" 244 | 245 | #: mapslicer/main.py:68 mapslicer/main.py:153 246 | msgid "&Continue" 247 | msgstr "&Vorwärts" 248 | 249 | #: mapslicer/main.py:157 mapslicer/main.py:163 250 | msgid "&Render" 251 | msgstr "&Render" 252 | 253 | #: mapslicer/main.py:158 254 | msgid "&Stop" 255 | msgstr "&Stopp" 256 | 257 | #: mapslicer/main.py:160 258 | msgid "&Resume" 259 | msgstr "&Fortsetzen" 260 | 261 | #: mapslicer/main.py:167 262 | msgid "Exit" 263 | msgstr "&Beenden" 264 | 265 | #: mapslicer/main.py:195 266 | msgid "You have to add some files for rendering" 267 | msgstr "Eine Bild-Datei muss hier eingefügt werden" 268 | 269 | #: mapslicer/main.py:195 270 | msgid "No files specified" 271 | msgstr "Keine Dateien eingegeben" 272 | 273 | #: mapslicer/main.py:198 274 | msgid "" 275 | "The file you have specified does not have any georeference.\n" 276 | "\n" 277 | "Click on the 'Georeference' button and give a bounding box or \n" 278 | "create a world file (.wld) for the specified file." 279 | msgstr "" 280 | "Diese Datei hat kein Georeferenz.\n" 281 | "\n" 282 | "Auf 'Georeferenz' klicken und einen Box eingeben oder \n" 283 | "eine Weltdatei (.wld) kreieren für dieses Bild." 284 | 285 | #: mapslicer/main.py:198 286 | msgid "Missing georeference" 287 | msgstr "Fehlendes Georeferenz" 288 | 289 | #: mapslicer/main.py:206 290 | msgid "" 291 | "You have to specify reference system of your coordinates.\n" 292 | "\n" 293 | "TIP: for latitude/longitude in WGS84 you should type 'EPSG:4326'" 294 | msgstr "" 295 | "Ein Referenzsystem für die Koordinaten ist nötig.\n" 296 | "\n" 297 | "Tipp: für Latitud/Longitud in WGS84 wäre 'EPSG:4326' geeignet." 298 | 299 | #: mapslicer/main.py:206 300 | msgid "Not valid spatial reference system" 301 | msgstr "Kein gültiges Referenzsystem" 302 | 303 | #: mapslicer/main.py:216 304 | #, python-format 305 | msgid "The selected output directory '%s' is not writeable." 306 | msgstr "Das Ausgabeordner '%s' ist schreib-geschützt." 307 | 308 | #: mapslicer/main.py:217 mapslicer/main.py:225 mapslicer/widgets.py:153 309 | msgid "Bad permissions" 310 | msgstr "Schreibschutz" 311 | 312 | #: mapslicer/main.py:223 313 | #, python-format 314 | msgid "" 315 | "The selected output directory '%s' can't be created, because its " 316 | "superdirectory '%s' is not writeable." 317 | msgstr "" 318 | "Das Ausgabeordner '%s' kann nicht kreiert werden weil das " 319 | "Ordner '%s' nicht schreibbar ist." 320 | 321 | #: mapslicer/main.py:246 mapslicer/widgets.py:113 322 | msgid "" 323 | "Unfortunately the merging of files is not yet implemented in the MapSlicer " 324 | "GUI. Only the first file in the list is going to be rendered." 325 | msgstr "" 326 | "Das mergen von mehreren Dateien ist noch nicht in MapSlicer implementiert worden." 327 | " Nur eine Bilddatei kann verarbeitet werden." 328 | 329 | #: mapslicer/main.py:246 330 | msgid "Not yet implemented :-(" 331 | msgstr "Nicht implementiert" 332 | 333 | #: mapslicer/main.py:258 334 | msgid "Rendering stopped !!!!" 335 | msgstr "Rendern unterbrochen" 336 | 337 | #: mapslicer/main.py:264 338 | msgid "Started..." 339 | msgstr "Am Laufen..." 340 | 341 | #: mapslicer/main.py:333 342 | msgid "Opening the input files" 343 | msgstr "Am Öffnen der Eingabedateien" 344 | 345 | #: mapslicer/main.py:338 346 | msgid "Generating viewers and metadata" 347 | msgstr "Am Generieren von Viewers und Metadata" 348 | 349 | #: mapslicer/main.py:343 350 | msgid "Rendering the base tiles" 351 | msgstr "Am Rendern der Basiskacheln" 352 | 353 | #: mapslicer/main.py:348 354 | msgid "Rendering the overview tiles in the pyramid" 355 | msgstr "Am Rendern der Kacheln in der Pyramide" 356 | 357 | #: mapslicer/main.py:353 358 | msgid "Generating KML" 359 | msgstr "Am Generieren der KML" 360 | 361 | #: mapslicer/main.py:369 362 | msgid "Rendering error!" 363 | msgstr "Fehler beim Rendern!" 364 | 365 | #: mapslicer/widgets.py:35 366 | msgid "Error opening file\n" 367 | msgstr "Fehler beim Öffnen der Datei\n" 368 | 369 | #: mapslicer/widgets.py:38 370 | msgid "Cannot open non ascii files\n" 371 | msgstr "Nicht-ascii Dateien können nicht geöffnet werden\n" 372 | 373 | #: mapslicer/widgets.py:46 374 | msgid "Filename" 375 | msgstr "Dateiname" 376 | 377 | #: mapslicer/widgets.py:47 mapslicer/widgets.py:95 378 | msgid "Georeferenz" 379 | msgstr "Georeference" 380 | 381 | #: mapslicer/widgets.py:113 382 | msgid "Not yet implemented" 383 | msgstr "Nicht implementiert" 384 | 385 | #: mapslicer/widgets.py:129 mapslicer/widgets.py:159 386 | msgid "Can't add a file" 387 | msgstr "Datei kann nicht eingefügt werden" 388 | 389 | #: mapslicer/widgets.py:133 390 | msgid "Choose a file" 391 | msgstr "Datei auswählen" 392 | 393 | #: mapslicer/widgets.py:148 394 | msgid "" 395 | "MapSlicer can't find the following file:\n" 396 | "\n" 397 | msgstr "" 398 | "MapSlicer kann die Datei nicht finden:\n" 399 | "\n" 400 | 401 | #: mapslicer/widgets.py:149 402 | msgid "File not found" 403 | msgstr "Datei nicht gefunden" 404 | 405 | #: mapslicer/widgets.py:152 406 | msgid "" 407 | "MapSlicer doesn't have permission to read the following file:\n" 408 | "\n" 409 | msgstr "" 410 | "MapSlicer hat nicht die Berechtigung, diese Datei zu lesen:\n" 411 | "\n" 412 | 413 | #: mapslicer/widgets.py:173 414 | msgid "" 415 | "Please specify bounding box as 4 numbers or a world file as 6 numbers\n" 416 | "Format: 'north south east west'\n" 417 | "\n" 418 | "Alternatively you can create a world file (.wld) or (.tab) by an external " 419 | "GIS software" 420 | msgstr "" 421 | "Umfangsviereck mit 4 Nummern oder Weltdatei mit 6 Nummern spezifizieren\n" 422 | "Format: 'Nord Süd Ost West'\n" 423 | "\n" 424 | "Andernfalls kann eine Weltdatei (.wld or .tab) aus einer GIS Software verwendet " 425 | "werden" 426 | 427 | #: mapslicer/widgets.py:174 428 | msgid "Georeference with bounding box" 429 | msgstr "Georeferenz mit Umfangsviereck" 430 | 431 | #: mapslicer/widgets.py:215 432 | msgid "Set transparency for a color (NODATA):" 433 | msgstr "Transparenz für eine Farbe setzen (NODATA):" 434 | 435 | #: mapslicer/widgets.py:297 436 | msgid "EPSG Registry" 437 | msgstr "EPSG Registry" 438 | 439 | #: mapslicer/widgets.py:306 440 | msgid "Paste here the \"OGC WKT\" or \"Proj4\" definition or the URL:" 441 | msgstr "\"OGC WKT\" oder \"Proj4\" Definition oder URL hier einfügen:" 442 | 443 | #: mapslicer/widgets.py:313 444 | msgid "UTM Zone:" 445 | msgstr "UTM Zone:" 446 | 447 | #: mapslicer/widgets.py:323 448 | msgid "Set" 449 | msgstr "Setzen" 450 | 451 | #: mapslicer/widgets.py:329 452 | msgid "Preview the map reference with this SRS" 453 | msgstr "Karte Referenz mit diesem SRS previewen" 454 | 455 | #: mapslicer/widgets.py:396 456 | #, python-format 457 | msgid "%s / UTM Zone %s%s" 458 | msgstr "%s / UTM Zone %s%s" 459 | 460 | #: mapslicer/widgets.py:407 mapslicer/widgets.py:430 461 | msgid "The SRS definition is not correct" 462 | msgstr "Die SRS Definition ist nicht korrekt" 463 | 464 | #: mapslicer/wizard.py:71 mapslicer/wizard.py:79 mapslicer/wizard.py:316 465 | msgid "PNG - with transparency" 466 | msgstr "PNG - mit Transparenz" 467 | 468 | #: mapslicer/wizard.py:72 mapslicer/wizard.py:80 mapslicer/wizard.py:316 469 | msgid "JPEG - smaller but without transparency" 470 | msgstr "JPEG - kleiner aber ohne Transparenz" 471 | 472 | #: mapslicer/wizard.py:73 mapslicer/wizard.py:81 mapslicer/wizard.py:316 473 | msgid "Hybrid JPEG+PNG - only for Google Earth" 474 | msgstr "Hybrid JPEG+PNG - nur für Google Earth" 475 | 476 | #: mapslicer/wizard.py:74 477 | msgid "Garmin Custom maps KMZ - 256 pixels" 478 | msgstr "Garmin Custom maps KMZ - 256 Pixel" 479 | 480 | #: mapslicer/wizard.py:75 481 | msgid "Garmin Custom maps KMZ - 512 pixels" 482 | msgstr "Garmin Custom maps KMZ - 512 Pixel" 483 | 484 | #: mapslicer/wizard.py:76 485 | msgid "Garmin Custom maps KMZ - 1024 pixels" 486 | msgstr "Garmin Custom maps KMZ - 1024 Pixel" 487 | 488 | #: mapslicer/wizard.py:211 489 | msgid "Choose output directory" 490 | msgstr "Ausgabeverzeichnis auswählen" 491 | 492 | #: mapslicer/wizard.py:217 493 | msgid "Nothing to update - progressbar not displayed" 494 | msgstr "Nichts zu updaten" 495 | 496 | #: mapslicer/wizard.py:224 497 | msgid "Nothing to update - progresstext not displayed" 498 | msgstr "Nichts zu updaten" 499 | 500 | #: mapslicer/wizard.py:239 501 | msgid "Selection of the tile profile" 502 | msgstr "Auswahl des Kachel-Profil" 503 | 504 | #: mapslicer/wizard.py:241 505 | msgid "What kind of tiles would you like to generate?" 506 | msgstr "Welche Art von Kacheln sind zu generieren?" 507 | 508 | #: mapslicer/wizard.py:245 509 | msgid "Google Maps compatible (Spherical Mercator)" 510 | msgstr "Google Maps kompatibel (Spherical Mercator)" 511 | 512 | #: mapslicer/wizard.py:249 513 | msgid "" 514 | "Mercator tiles compatible with Google, Yahoo or Bing maps and OpenStreetMap. " 515 | "Suitable for mashups and overlay with these popular interactive maps." 516 | msgstr "" 517 | "Mercator tiles kompatibel mit Google, Yahoo oder Bing maps und OpenStreetMap. " 518 | "Geeignet für Mashups und Überlagen mit diesen populären Karten." 519 | 520 | #: mapslicer/wizard.py:252 521 | msgid "Google Earth (KML SuperOverlay)" 522 | msgstr "Google Earth (KML SuperOverlay)" 523 | 524 | #: mapslicer/wizard.py:256 525 | msgid "" 526 | "Tiles and KML metadata for 3D visualization in Google Earth desktop " 527 | "application or in the web browser plugin." 528 | msgstr "" 529 | "Kacheln und KML Metadata für 3D-Darstellung in Google Earth Desktop " 530 | "Application oder im Browser Plugin." 531 | 532 | #: mapslicer/wizard.py:259 533 | msgid "WGS84 Plate Carree (Geodetic)" 534 | msgstr "WGS84 Plate Carree (Geodätisch)" 535 | 536 | #: mapslicer/wizard.py:263 537 | msgid "" 538 | "Compatible with most existing WMS servers, with the OpenLayers base map, " 539 | "Google Earth and other applications using WGS84 coordinates (EPSG:4326)." 541 | msgstr "" 542 | "Kompatibel mit den meisten WMS Servern, mit der OpenLayers Basiskarte, " 543 | "Google Earth und anderen Applikationen mit WGS84 Koordinaten (EPSG:4326)." 545 | 546 | #: mapslicer/wizard.py:266 547 | msgid "Image Based Tiles (Raster)" 548 | msgstr "Bild-basierten Kacheln (Raster)" 549 | 550 | #: mapslicer/wizard.py:270 551 | msgid "" 552 | "Tiles based on the dimensions of the picture in pixels (width and height). " 553 | "Stand-alone presentation even for images without georeference." 554 | msgstr "" 555 | "Kacheln spezifiziert anhand von den Bilddimensionen in Pixeln. " 556 | "Geeignet für selbstständige Präsentationen, auch für Bilder ohne Georeferenz." 557 | 558 | #: mapslicer/wizard.py:274 559 | msgid "Source data files" 560 | msgstr "Quelldateien" 561 | 562 | #: mapslicer/wizard.py:275 563 | msgid "Please choose the raster files of the maps you would like to publish." 564 | msgstr "Bitte die Bilddatei auswählen für die Karte zu bearbeiten." 565 | 566 | #: mapslicer/wizard.py:277 567 | msgid "Input raster map files:" 568 | msgstr "Eingabedatei:" 569 | 570 | #: mapslicer/wizard.py:290 571 | msgid "Spatial reference system (SRS)" 572 | msgstr "Räumliches Referenzsystem (SRS)" 573 | 574 | #: mapslicer/wizard.py:291 575 | msgid "" 576 | "It is necessary to know which coordinate system (Spatial Reference System) " 577 | "is used for georeferencing of the input files." 578 | msgstr "" 579 | "Das Koordinatensystem (Spatial Reference System) ist auch nötig " 580 | "für die Georeferenzierung der Bilddatei." 581 | 582 | #: mapslicer/wizard.py:293 583 | msgid "What is the Spatial Reference System used in your files?" 584 | msgstr "Welches Referenzsystem wird für diese Datei verwendet?" 585 | 586 | #: mapslicer/wizard.py:299 587 | msgid "Details about the tile pyramid" 588 | msgstr "Details der Kachelnpyramide" 589 | 590 | #: mapslicer/wizard.py:300 591 | msgid "" 592 | "In this step you should specify the details related to rendered tile pyramid." 593 | msgstr "" 594 | "Hier werden die Tiefe und Format der Kachelnpyramide bestimmt." 595 | 596 | #: mapslicer/wizard.py:302 597 | msgid "Zoom levels to generate:" 598 | msgstr "Zoomlevels zu generieren:" 599 | 600 | #: mapslicer/wizard.py:304 601 | msgid "Minimum zoom:" 602 | msgstr "Minimum Zoom:" 603 | 604 | #: mapslicer/wizard.py:305 605 | msgid "Maximum zoom:" 606 | msgstr "Maximum Zoom:" 607 | 608 | #: mapslicer/wizard.py:308 609 | msgid "" 610 | "Note: The selected zoom levels are calculated from your input data and " 611 | "should be OK in most cases." 612 | msgstr "" 613 | "Note: Die ausgewählten Defaultwerte wurden anhand von den Daten berechnet und " 614 | "sollten in Normalfall geeignet sein." 615 | 616 | #: mapslicer/wizard.py:311 617 | msgid "Please choose a file format" 618 | msgstr "Dateiformat bitte auswählen" 619 | 620 | #: mapslicer/wizard.py:320 621 | msgid "" 622 | "Note: For PNG tiles, it may be advisable to use some kind of PNG compression " 623 | "tool on the produced tiles to optimise file sizes." 624 | msgstr "" 625 | "Note: Für PNG Kachlen kann es empfehlenswert sein, nachher ein Komprimierungs-werkzeug " 626 | "über die generierten Kacheln laufen zu lassen um die Dateien zu optimieren." 627 | 628 | #: mapslicer/wizard.py:351 629 | msgid "Destination folder and address" 630 | msgstr "Ausgabeverzeichnis und Adresse" 631 | 632 | #: mapslicer/wizard.py:352 633 | msgid "" 634 | "Please select a directory where the generated tiles should be saved. " 635 | "Similarly you can specify the Internet address where will you publish the " 636 | "map." 637 | msgstr "" 638 | "Bitte das Verzeichnis auswählen, in das die generierten Kacheln gespeichert werden sollen. " 639 | "Die Internetadresse für das Publizieren der Kacheln kann auch eingegeben werden." 640 | 641 | #: mapslicer/wizard.py:354 642 | msgid "Where to save the generated tiles?" 643 | msgstr "Wohin sollen die Kacheln gespeichert werden?" 644 | 645 | #: mapslicer/wizard.py:356 646 | msgid "Result directory:" 647 | msgstr "Ausgabeverzeichnis:" 648 | 649 | #: mapslicer/wizard.py:358 650 | msgid "Browse..." 651 | msgstr "Durchsuchen..." 652 | 653 | #: mapslicer/wizard.py:360 654 | msgid "The Internet address (URL) for publishing the map:" 655 | msgstr "Die Internetadresse (URL) für Publizieren:" 656 | 657 | #: mapslicer/wizard.py:362 658 | msgid "Destination URL:" 659 | msgstr "Ziel URL:" 660 | 661 | #: mapslicer/wizard.py:366 662 | msgid "" 663 | "Note: You should specify the URL if you need to generate the correct KML for " 664 | "Google Earth." 665 | msgstr "" 666 | "Note: Die URL sollte definiert werden falls korrektes KML für Google Earth erwünscht wird." 667 | 668 | #: mapslicer/wizard.py:369 669 | msgid "Selection of the viewers" 670 | msgstr "Auswahl der Viewers" 671 | 672 | #: mapslicer/wizard.py:370 673 | msgid "" 674 | "MapSlicer can also generate simple web viewers for presenting the tiles as a " 675 | "map overlay. You can use these viewers as a base for your mashups. Similarly " 676 | "it is possible to generate KML files for Google Earth." 677 | msgstr "" 678 | "MapSlicer kann auch einfache Webviewers für das Präsentieren der Kacheln " 679 | "als Kartenüberlagerung. Diese Viewers können als Basis dienen für Mashups. Auch " 680 | "KML Dateien für Google Earth können erzeugt werden." 681 | 682 | #: mapslicer/wizard.py:372 683 | msgid "What viewers should be generated?" 684 | msgstr "Welche Viewers sollten generiert werden?" 685 | 686 | #: mapslicer/wizard.py:375 687 | msgid "Google Maps" 688 | msgstr "Google Maps" 689 | 690 | #: mapslicer/wizard.py:377 691 | msgid "" 692 | "Overlay presentation of your maps on top of standard Google Maps layers. If " 693 | "KML is generated then the Google Earth Plugin is used as well." 694 | msgstr "" 695 | "Überlagerung eigener Karten auf die Google Maps Layers. Falls " 696 | "KML generiert wird, wird das Google Earth Plugin auch verwendet." 697 | 698 | #: mapslicer/wizard.py:379 699 | msgid "OpenLayers" 700 | msgstr "OpenLayers" 701 | 702 | #: mapslicer/wizard.py:381 703 | msgid "" 704 | "Overlay of Google Maps, Bing Maps, Yahoo Maps, OpenStreetMap and " 705 | "OpenAerialMap, WMS and WFS layers and another sources available in the open-" 706 | "source project OpenLayers." 707 | msgstr "" 708 | "Überlagerung von Google Maps, Bing Maps, Yahoo Maps, OpenStreetMap und " 709 | "OpenAerialMap, WMS und WFS Layers und andere Quellen dank dem " 710 | "OpenLayers Projekt." 711 | 712 | #: mapslicer/wizard.py:385 713 | msgid "" 714 | "If this option is selected then metadata for Google Earth is generated for " 715 | "the tile tree. It means you can display the tiles as an overlay of the " 716 | "virtual 3D world of the Google Earth desktop application or browser plug-in." 717 | msgstr "" 718 | "Mit dieser Option wird Metadata für Google Earth generiert für die Kachelnpyramide. " 719 | "So kann man die Kacheln als Overlay anschauen in der Google Earth Desktop Application " 720 | "oder im Browser Plugin." 721 | 722 | #: mapslicer/wizard.py:389 723 | msgid "Details for generating the viewers" 724 | msgstr "Details für Generieren der Viewers" 725 | 726 | #: mapslicer/wizard.py:390 727 | msgid "Please add information related to the selected viewers." 728 | msgstr "Bitte zusätzlich Information der ausgewählten Viewers eingeben." 729 | 730 | #: mapslicer/wizard.py:392 731 | msgid "Info about the map" 732 | msgstr "Karteninformation" 733 | 734 | #: mapslicer/wizard.py:394 735 | msgid "Title of the map:" 736 | msgstr "Title der Karte:" 737 | 738 | #: mapslicer/wizard.py:397 739 | msgid "Copyright notice (optional):" 740 | msgstr "Copyright Notiz (optional):" 741 | 742 | #: mapslicer/wizard.py:400 743 | msgid "The API keys for online maps API viewers" 744 | msgstr "API Schlüssel für die online Kartendienste" 745 | 746 | #: mapslicer/wizard.py:402 747 | msgid "Google Maps API key (optional):" 748 | msgstr "Google Maps API Schlüssel (optional):" 749 | 750 | #: mapslicer/wizard.py:405 751 | msgid "" 752 | "Note: You can get it online at this address." 754 | msgstr "" 755 | "Note: Erhältlich online hier." 757 | 758 | #: mapslicer/wizard.py:408 759 | msgid "Yahoo Application ID key (optional):" 760 | msgstr "Yahoo Application ID Schlüssel (optional):" 761 | 762 | #: mapslicer/wizard.py:411 763 | msgid "" 764 | "Note: You can get it at " 765 | "this webpage." 766 | msgstr "" 767 | "Note: Erhältlich online hier." 768 | 769 | #: mapslicer/wizard.py:414 770 | msgid "Tile rendering" 771 | msgstr "Kacheln Rendern" 772 | 773 | #: mapslicer/wizard.py:415 774 | msgid "" 775 | "Now you can start the rendering of the map tiles. It can be a time consuming " 776 | "process especially for large datasets... so be patient please." 777 | msgstr "" 778 | "Jetzt kann das Rendern der Kacheln beginnen. Es kann ein Weilchen dauern, " 779 | "besonders für riesige Datenmengen... bitte geduldig sein." 780 | 781 | #: mapslicer/wizard.py:417 782 | msgid "Rendering progress:" 783 | msgstr "Rendern-Fortschritt:" 784 | 785 | #: mapslicer/wizard.py:426 786 | msgid "Click on the 'Render' button to start the rendering..." 787 | msgstr "Auf 'Render' klicken um das Rendern zu starten..." 788 | 789 | #: mapslicer/wizard.py:435 790 | msgid "Thank you for using MapSlicer application." 791 | msgstr "Vielen Dank für das Nutzen dieser MapSlicer Applikation." 792 | 793 | #: mapslicer/wizard.py:435 794 | msgid "This is an open-source project - you can help us to make it better." 795 | msgstr "Das hier ist ein open-source Projekt - alle sind willkommen um es zu verbessern." 796 | 797 | #: mapslicer/wizard.py:440 798 | msgid "Your rendering task is finished!" 799 | msgstr "Das Rendern ist jetzt fertig!" 800 | 801 | #: mapslicer/wizard.py:441 802 | msgid "" 803 | "Thank you for using this software. Now you can see the results. If you " 804 | "upload the directory with tiles to the Internet your map is published!" 805 | msgstr "" 806 | "Vielen Dank für das Nutzen dieser Software. Jetzt sind die Kacheln fertig. Um die " 807 | "Karte zu publizieren, einfach das Kachelnverzeichnis auf einem Server hochladen!" 808 | 809 | #: mapslicer/wizard.py:443 810 | msgid "Available results:" 811 | msgstr "Resultaten:" 812 | 813 | #: mapslicer/wizard.py:445 814 | msgid "" 815 | "The generated tiles and also the viewers are available in the output " 816 | "directory:" 817 | msgstr "" 818 | "Die generierten Kacheln und auch die Viewers sind in diesem Verzeichnis " 819 | "sichtbar:" 820 | 821 | #: mapslicer/wizard.py:448 822 | msgid "(click to open)" 823 | msgstr "(klicken um zu öffnen)" 824 | 825 | -------------------------------------------------------------------------------- /resources/locale/mapslicer.pot: -------------------------------------------------------------------------------- 1 | # Translations template for MapSlicer 2 | # Copyright (C) 2009-2015 3 | # This file is distributed under the same license as the MapSlicer package. 4 | # 5 | #, fuzzy 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: PACKAGE VERSION\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-02-14 12:08+0100\n" 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME \n" 13 | "Language-Team: LANGUAGE \n" 14 | "Language: \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=CHARSET\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: mapslicer/config.py:34 20 | msgid "Supported raster files" 21 | msgstr "" 22 | 23 | #: mapslicer/config.py:35 24 | msgid "TIFF / BigTIFF / GeoTIFF (.tif)" 25 | msgstr "" 26 | 27 | #: mapslicer/config.py:36 28 | msgid "BSB Nautical Chart Format (.kap)" 29 | msgstr "" 30 | 31 | #: mapslicer/config.py:37 32 | msgid "JPEG2000 - JPEG 2000 (.jp2, .j2k)" 33 | msgstr "" 34 | 35 | #: mapslicer/config.py:38 36 | msgid "MrSID - Multi-resolution Seamless Image Database (.sid)" 37 | msgstr "" 38 | 39 | #: mapslicer/config.py:39 40 | msgid "ECW - ERMapper Compressed Wavelets (.ecw)" 41 | msgstr "" 42 | 43 | #: mapslicer/config.py:40 44 | msgid "HFA - Erdas Imagine Images (.img)" 45 | msgstr "" 46 | 47 | #: mapslicer/config.py:41 48 | msgid "NITF - National Imagery Transmission Format (.nitf)" 49 | msgstr "" 50 | 51 | #: mapslicer/config.py:42 52 | msgid "NDF - NLAPS Data Format (.h1,.h2,.hd)" 53 | msgstr "" 54 | 55 | #: mapslicer/config.py:43 56 | msgid "MFF - Vexcel MFF Raster (.hdr)" 57 | msgstr "" 58 | 59 | #: mapslicer/config.py:44 60 | msgid "INGR - Intergraph Raster Format (.cit,.rgb,..)" 61 | msgstr "" 62 | 63 | #: mapslicer/config.py:45 64 | msgid "EIR - Erdas Imagine Raw (.raw)" 65 | msgstr "" 66 | 67 | #: mapslicer/config.py:46 68 | msgid "BLX - Magellan BLX Topo File Format (.blx)" 69 | msgstr "" 70 | 71 | #: mapslicer/config.py:47 72 | msgid "JPEG - Joint Photographic Experts Group JFIF (.jpg)" 73 | msgstr "" 74 | 75 | #: mapslicer/config.py:48 76 | msgid "PNG - Portable Network Graphics (.png)" 77 | msgstr "" 78 | 79 | #: mapslicer/config.py:49 80 | msgid "GIF - Graphics Interchange Format (.gif)" 81 | msgstr "" 82 | 83 | #: mapslicer/config.py:50 84 | msgid "BMP - Microsoft Windows Device Independent Bitmap (.bmp)" 85 | msgstr "" 86 | 87 | #: mapslicer/config.py:51 88 | msgid "WMS - GDAL driver for OGC Web Map Server (.wms)" 89 | msgstr "" 90 | 91 | #: mapslicer/config.py:52 92 | msgid "VRT - GDAL Virtual Raster (.vrt)" 93 | msgstr "" 94 | 95 | #: mapslicer/config.py:53 96 | msgid "All files (*.*)" 97 | msgstr "" 98 | 99 | #: mapslicer/config.py:66 100 | msgid "Custom definition of the system (WKT, Proj.4,..)" 101 | msgstr "" 102 | 103 | #: mapslicer/config.py:67 104 | msgid "WGS84 - Latitude and longitude (geodetic)" 105 | msgstr "" 106 | 107 | #: mapslicer/config.py:68 108 | msgid "Universal Transverse Mercator - UTM (projected)" 109 | msgstr "" 110 | 111 | #: mapslicer/config.py:69 112 | msgid "Specify the id-number from the EPSG/ESRI database" 113 | msgstr "" 114 | 115 | #: mapslicer/config.py:70 116 | msgid "Search the coordinate system by name" 117 | msgstr "" 118 | 119 | #: mapslicer/config.py:74 120 | msgid "SRSCustom0" 121 | msgstr "" 122 | 123 | #: mapslicer/config.py:74 124 | msgid "SRSDefinition0" 125 | msgstr "" 126 | 127 | #: mapslicer/config.py:75 128 | msgid "SRSCustom1" 129 | msgstr "" 130 | 131 | #: mapslicer/config.py:75 132 | msgid "SRSDefinition1" 133 | msgstr "" 134 | 135 | #: mapslicer/config.py:76 136 | msgid "SRSCustom2" 137 | msgstr "" 138 | 139 | #: mapslicer/config.py:76 140 | msgid "SRSDefinition2" 141 | msgstr "" 142 | 143 | #: mapslicer/config.py:77 144 | msgid "SRSCustom3" 145 | msgstr "" 146 | 147 | #: mapslicer/config.py:77 148 | msgid "SRSDefinition3" 149 | msgstr "" 150 | 151 | #: mapslicer/config.py:78 152 | msgid "SRSCustom4" 153 | msgstr "" 154 | 155 | #: mapslicer/config.py:78 156 | msgid "SRSDefinition4" 157 | msgstr "" 158 | 159 | #: mapslicer/config.py:79 160 | msgid "SRSCustom5" 161 | msgstr "" 162 | 163 | #: mapslicer/config.py:79 164 | msgid "SRSDefinition5" 165 | msgstr "" 166 | 167 | #: mapslicer/config.py:80 168 | msgid "SRSCustom6" 169 | msgstr "" 170 | 171 | #: mapslicer/config.py:80 172 | msgid "SRSDefinition6" 173 | msgstr "" 174 | 175 | #: mapslicer/config.py:81 176 | msgid "SRSCustom7" 177 | msgstr "" 178 | 179 | #: mapslicer/config.py:81 180 | msgid "SRSDefinition7" 181 | msgstr "" 182 | 183 | #: mapslicer/config.py:82 184 | msgid "SRSCustom8" 185 | msgstr "" 186 | 187 | #: mapslicer/config.py:82 188 | msgid "SRSDefinition8" 189 | msgstr "" 190 | 191 | #: mapslicer/config.py:83 192 | msgid "SRSCustom9" 193 | msgstr "" 194 | 195 | #: mapslicer/config.py:83 196 | msgid "SRSDefinition9" 197 | msgstr "" 198 | 199 | #: mapslicer/main.py:52 200 | msgid "Tile Profile" 201 | msgstr "" 202 | 203 | #: mapslicer/main.py:53 204 | msgid "Source Data Files" 205 | msgstr "" 206 | 207 | #: mapslicer/main.py:54 208 | msgid "Spatial Reference" 209 | msgstr "" 210 | 211 | #: mapslicer/main.py:55 212 | msgid "Tile Details" 213 | msgstr "" 214 | 215 | #: mapslicer/main.py:56 216 | msgid "Destination" 217 | msgstr "" 218 | 219 | #: mapslicer/main.py:57 220 | msgid "Viewers" 221 | msgstr "" 222 | 223 | #: mapslicer/main.py:58 224 | msgid "Viewer Details" 225 | msgstr "" 226 | 227 | #: mapslicer/main.py:59 228 | msgid "Rendering" 229 | msgstr "" 230 | 231 | #: mapslicer/main.py:61 mapslicer/main.py:82 232 | msgid "MapSlicer - Tile Generator for Map Mashups" 233 | msgstr "" 234 | 235 | #: mapslicer/main.py:63 236 | #, python-format 237 | msgid "Version %s" 238 | msgstr "" 239 | 240 | #: mapslicer/main.py:64 241 | msgid "https://wiki.osgeo.org/wiki/MapSlicer" 242 | msgstr "" 243 | 244 | #: mapslicer/main.py:66 mapslicer/main.py:154 mapslicer/main.py:161 245 | #: mapslicer/main.py:164 mapslicer/main.py:166 246 | msgid "Go &Back" 247 | msgstr "" 248 | 249 | #: mapslicer/main.py:68 mapslicer/main.py:153 250 | msgid "&Continue" 251 | msgstr "" 252 | 253 | #: mapslicer/main.py:157 mapslicer/main.py:163 254 | msgid "&Render" 255 | msgstr "" 256 | 257 | #: mapslicer/main.py:158 258 | msgid "&Stop" 259 | msgstr "" 260 | 261 | #: mapslicer/main.py:160 262 | msgid "&Resume" 263 | msgstr "" 264 | 265 | #: mapslicer/main.py:167 266 | msgid "Exit" 267 | msgstr "" 268 | 269 | #: mapslicer/main.py:195 270 | msgid "You have to add some files for rendering" 271 | msgstr "" 272 | 273 | #: mapslicer/main.py:195 274 | msgid "No files specified" 275 | msgstr "" 276 | 277 | #: mapslicer/main.py:198 278 | msgid "" 279 | "The file you have specified does not have any georeference.\n" 280 | "\n" 281 | "Click on the 'Georeference' button and give a bounding box or \n" 282 | "create a world file (.wld) for the specified file." 283 | msgstr "" 284 | 285 | #: mapslicer/main.py:198 286 | msgid "Missing georeference" 287 | msgstr "" 288 | 289 | #: mapslicer/main.py:206 290 | msgid "" 291 | "You have to specify reference system of your coordinates.\n" 292 | "\n" 293 | "TIP: for latitude/longitude in WGS84 you should type 'EPSG:4326'" 294 | msgstr "" 295 | 296 | #: mapslicer/main.py:206 297 | msgid "Not valid spatial reference system" 298 | msgstr "" 299 | 300 | #: mapslicer/main.py:216 301 | #, python-format 302 | msgid "The selected output directory '%s' is not writeable." 303 | msgstr "" 304 | 305 | #: mapslicer/main.py:217 mapslicer/main.py:225 mapslicer/widgets.py:153 306 | msgid "Bad permissions" 307 | msgstr "" 308 | 309 | #: mapslicer/main.py:223 310 | #, python-format 311 | msgid "" 312 | "The selected output directory '%s' can't be created, because its " 313 | "superdirectory '%s' is not writeable." 314 | msgstr "" 315 | 316 | #: mapslicer/main.py:246 mapslicer/widgets.py:113 317 | msgid "" 318 | "Unfortunately the merging of files is not yet implemented in the MapSlicer " 319 | "GUI. Only the first file in the list is going to be rendered." 320 | msgstr "" 321 | 322 | #: mapslicer/main.py:246 323 | msgid "Not yet implemented :-(" 324 | msgstr "" 325 | 326 | #: mapslicer/main.py:258 327 | msgid "Rendering stopped !!!!" 328 | msgstr "" 329 | 330 | #: mapslicer/main.py:264 331 | msgid "Started..." 332 | msgstr "" 333 | 334 | #: mapslicer/main.py:333 335 | msgid "Opening the input files" 336 | msgstr "" 337 | 338 | #: mapslicer/main.py:338 339 | msgid "Generating viewers and metadata" 340 | msgstr "" 341 | 342 | #: mapslicer/main.py:343 343 | msgid "Rendering the base tiles" 344 | msgstr "" 345 | 346 | #: mapslicer/main.py:348 347 | msgid "Rendering the overview tiles in the pyramid" 348 | msgstr "" 349 | 350 | #: mapslicer/main.py:353 351 | msgid "Generating KML" 352 | msgstr "" 353 | 354 | #: mapslicer/main.py:369 355 | msgid "Rendering error!" 356 | msgstr "" 357 | 358 | #: mapslicer/widgets.py:35 359 | msgid "Error opening file\n" 360 | msgstr "" 361 | 362 | #: mapslicer/widgets.py:38 363 | msgid "Cannot open non ascii files\n" 364 | msgstr "" 365 | 366 | #: mapslicer/widgets.py:46 367 | msgid "Filename" 368 | msgstr "" 369 | 370 | #: mapslicer/widgets.py:47 mapslicer/widgets.py:95 371 | msgid "Georeference" 372 | msgstr "" 373 | 374 | #: mapslicer/widgets.py:113 375 | msgid "Not yet implemented" 376 | msgstr "" 377 | 378 | #: mapslicer/widgets.py:129 mapslicer/widgets.py:159 379 | msgid "Can't add a file" 380 | msgstr "" 381 | 382 | #: mapslicer/widgets.py:133 383 | msgid "Choose a file" 384 | msgstr "" 385 | 386 | #: mapslicer/widgets.py:148 387 | msgid "" 388 | "MapSlicer can't find the following file:\n" 389 | "\n" 390 | msgstr "" 391 | 392 | #: mapslicer/widgets.py:149 393 | msgid "File not found" 394 | msgstr "" 395 | 396 | #: mapslicer/widgets.py:152 397 | msgid "" 398 | "MapSlicer doesn't have permission to read the following file:\n" 399 | "\n" 400 | msgstr "" 401 | 402 | #: mapslicer/widgets.py:173 403 | msgid "" 404 | "Please specify bounding box as 4 numbers or a world file as 6 numbers\n" 405 | "Format: 'north south east west'\n" 406 | "\n" 407 | "Alternatively you can create a world file (.wld) or (.tab) by an external " 408 | "GIS software" 409 | msgstr "" 410 | 411 | #: mapslicer/widgets.py:174 412 | msgid "Georeference with bounding box" 413 | msgstr "" 414 | 415 | #: mapslicer/widgets.py:215 416 | msgid "Set transparency for a color (NODATA):" 417 | msgstr "" 418 | 419 | #: mapslicer/widgets.py:297 420 | msgid "EPSG Registry" 421 | msgstr "" 422 | 423 | #: mapslicer/widgets.py:306 424 | msgid "Paste here the \"OGC WKT\" or \"Proj4\" definition or the URL:" 425 | msgstr "" 426 | 427 | #: mapslicer/widgets.py:313 428 | msgid "UTM Zone:" 429 | msgstr "" 430 | 431 | #: mapslicer/widgets.py:323 432 | msgid "Set" 433 | msgstr "" 434 | 435 | #: mapslicer/widgets.py:329 436 | msgid "Preview the map reference with this SRS" 437 | msgstr "" 438 | 439 | #: mapslicer/widgets.py:396 440 | #, python-format 441 | msgid "%s / UTM Zone %s%s" 442 | msgstr "" 443 | 444 | #: mapslicer/widgets.py:407 mapslicer/widgets.py:430 445 | msgid "The SRS definition is not correct" 446 | msgstr "" 447 | 448 | #: mapslicer/wizard.py:71 mapslicer/wizard.py:79 mapslicer/wizard.py:316 449 | msgid "PNG - with transparency" 450 | msgstr "" 451 | 452 | #: mapslicer/wizard.py:72 mapslicer/wizard.py:80 mapslicer/wizard.py:316 453 | msgid "JPEG - smaller but without transparency" 454 | msgstr "" 455 | 456 | #: mapslicer/wizard.py:73 mapslicer/wizard.py:81 mapslicer/wizard.py:316 457 | msgid "Hybrid JPEG+PNG - only for Google Earth" 458 | msgstr "" 459 | 460 | #: mapslicer/wizard.py:74 461 | msgid "Garmin Custom maps KMZ - 256 pixels" 462 | msgstr "" 463 | 464 | #: mapslicer/wizard.py:75 465 | msgid "Garmin Custom maps KMZ - 512 pixels" 466 | msgstr "" 467 | 468 | #: mapslicer/wizard.py:76 469 | msgid "Garmin Custom maps KMZ - 1024 pixels" 470 | msgstr "" 471 | 472 | #: mapslicer/wizard.py:211 473 | msgid "Choose output directory" 474 | msgstr "" 475 | 476 | #: mapslicer/wizard.py:217 477 | msgid "Nothing to update - progressbar not displayed" 478 | msgstr "" 479 | 480 | #: mapslicer/wizard.py:224 481 | msgid "Nothing to update - progresstext not displayed" 482 | msgstr "" 483 | 484 | #: mapslicer/wizard.py:239 485 | msgid "Selection of the tile profile" 486 | msgstr "" 487 | 488 | #: mapslicer/wizard.py:241 489 | msgid "What kind of tiles would you like to generate?" 490 | msgstr "" 491 | 492 | #: mapslicer/wizard.py:245 493 | msgid "Google Maps compatible (Spherical Mercator)" 494 | msgstr "" 495 | 496 | #: mapslicer/wizard.py:249 497 | msgid "" 498 | "Mercator tiles compatible with Google, Yahoo or Bing maps and OpenStreetMap. " 499 | "Suitable for mashups and overlay with these popular interactive maps." 500 | msgstr "" 501 | 502 | #: mapslicer/wizard.py:252 503 | msgid "Google Earth (KML SuperOverlay)" 504 | msgstr "" 505 | 506 | #: mapslicer/wizard.py:256 507 | msgid "" 508 | "Tiles and KML metadata for 3D visualization in Google Earth desktop " 509 | "application or in the web browser plugin." 510 | msgstr "" 511 | 512 | #: mapslicer/wizard.py:259 513 | msgid "WGS84 Plate Carree (Geodetic)" 514 | msgstr "" 515 | 516 | #: mapslicer/wizard.py:263 517 | msgid "" 518 | "Compatible with most existing WMS servers, with the OpenLayers base map, " 519 | "Google Earth and other applications using WGS84 coordinates (EPSG:4326)." 521 | msgstr "" 522 | 523 | #: mapslicer/wizard.py:266 524 | msgid "Image Based Tiles (Raster)" 525 | msgstr "" 526 | 527 | #: mapslicer/wizard.py:270 528 | msgid "" 529 | "Tiles based on the dimensions of the picture in pixels (width and height). " 530 | "Stand-alone presentation even for images without georeference." 531 | msgstr "" 532 | 533 | #: mapslicer/wizard.py:274 534 | msgid "Source data files" 535 | msgstr "" 536 | 537 | #: mapslicer/wizard.py:275 538 | msgid "Please choose the raster files of the maps you would like to publish." 539 | msgstr "" 540 | 541 | #: mapslicer/wizard.py:277 542 | msgid "Input raster map files:" 543 | msgstr "" 544 | 545 | #: mapslicer/wizard.py:290 546 | msgid "Spatial reference system (SRS)" 547 | msgstr "" 548 | 549 | #: mapslicer/wizard.py:291 550 | msgid "" 551 | "It is necessary to know which coordinate system (Spatial Reference System) " 552 | "is used for georeferencing of the input files." 553 | msgstr "" 554 | 555 | #: mapslicer/wizard.py:293 556 | msgid "What is the Spatial Reference System used in your files?" 557 | msgstr "" 558 | 559 | #: mapslicer/wizard.py:299 560 | msgid "Details about the tile pyramid" 561 | msgstr "" 562 | 563 | #: mapslicer/wizard.py:300 564 | msgid "" 565 | "In this step you should specify the details related to rendered tile pyramid." 566 | msgstr "" 567 | 568 | #: mapslicer/wizard.py:302 569 | msgid "Zoom levels to generate:" 570 | msgstr "" 571 | 572 | #: mapslicer/wizard.py:304 573 | msgid "Minimum zoom:" 574 | msgstr "" 575 | 576 | #: mapslicer/wizard.py:305 577 | msgid "Maximum zoom:" 578 | msgstr "" 579 | 580 | #: mapslicer/wizard.py:308 581 | msgid "" 582 | "Note: The selected zoom levels are calculated from your input data and " 583 | "should be OK in most cases." 584 | msgstr "" 585 | 586 | #: mapslicer/wizard.py:311 587 | msgid "Please choose a file format" 588 | msgstr "" 589 | 590 | #: mapslicer/wizard.py:320 591 | msgid "" 592 | "Note: For PNG tiles, it may be advisable to use some kind of PNG compression " 593 | "tool on the produced tiles to optimise file sizes." 594 | msgstr "" 595 | 596 | #: mapslicer/wizard.py:351 597 | msgid "Destination folder and address" 598 | msgstr "" 599 | 600 | #: mapslicer/wizard.py:352 601 | msgid "" 602 | "Please select a directory where the generated tiles should be saved. " 603 | "Similarly you can specify the Internet address where will you publish the " 604 | "map." 605 | msgstr "" 606 | 607 | #: mapslicer/wizard.py:354 608 | msgid "Where to save the generated tiles?" 609 | msgstr "" 610 | 611 | #: mapslicer/wizard.py:356 612 | msgid "Result directory:" 613 | msgstr "" 614 | 615 | #: mapslicer/wizard.py:358 616 | msgid "Browse..." 617 | msgstr "" 618 | 619 | #: mapslicer/wizard.py:360 620 | msgid "The Internet address (URL) for publishing the map:" 621 | msgstr "" 622 | 623 | #: mapslicer/wizard.py:362 624 | msgid "Destination URL:" 625 | msgstr "" 626 | 627 | #: mapslicer/wizard.py:366 628 | msgid "" 629 | "Note: You should specify the URL if you need to generate the correct KML for " 630 | "Google Earth." 631 | msgstr "" 632 | 633 | #: mapslicer/wizard.py:369 634 | msgid "Selection of the viewers" 635 | msgstr "" 636 | 637 | #: mapslicer/wizard.py:370 638 | msgid "" 639 | "MapSlicer can also generate simple web viewers for presenting the tiles as a " 640 | "map overlay. You can use these viewers as a base for your mashups. Similarly " 641 | "it is possible to generate KML files for Google Earth." 642 | msgstr "" 643 | 644 | #: mapslicer/wizard.py:372 645 | msgid "What viewers should be generated?" 646 | msgstr "" 647 | 648 | #: mapslicer/wizard.py:375 649 | msgid "Google Maps" 650 | msgstr "" 651 | 652 | #: mapslicer/wizard.py:377 653 | msgid "" 654 | "Overlay presentation of your maps on top of standard Google Maps layers. If " 655 | "KML is generated then the Google Earth Plugin is used as well." 656 | msgstr "" 657 | 658 | #: mapslicer/wizard.py:379 659 | msgid "OpenLayers" 660 | msgstr "" 661 | 662 | #: mapslicer/wizard.py:381 663 | msgid "" 664 | "Overlay of Google Maps, Bing Maps, Yahoo Maps, OpenStreetMap and " 665 | "OpenAerialMap, WMS and WFS layers and another sources available in the open-" 666 | "source project OpenLayers." 667 | msgstr "" 668 | 669 | #: mapslicer/wizard.py:385 670 | msgid "" 671 | "If this option is selected then metadata for Google Earth is generated for " 672 | "the tile tree. It means you can display the tiles as an overlay of the " 673 | "virtual 3D world of the Google Earth desktop application or browser plug-in." 674 | msgstr "" 675 | 676 | #: mapslicer/wizard.py:389 677 | msgid "Details for generating the viewers" 678 | msgstr "" 679 | 680 | #: mapslicer/wizard.py:390 681 | msgid "Please add information related to the selected viewers." 682 | msgstr "" 683 | 684 | #: mapslicer/wizard.py:392 685 | msgid "Info about the map" 686 | msgstr "" 687 | 688 | #: mapslicer/wizard.py:394 689 | msgid "Title of the map:" 690 | msgstr "" 691 | 692 | #: mapslicer/wizard.py:397 693 | msgid "Copyright notice (optional):" 694 | msgstr "" 695 | 696 | #: mapslicer/wizard.py:400 697 | msgid "The API keys for online maps API viewers" 698 | msgstr "" 699 | 700 | #: mapslicer/wizard.py:402 701 | msgid "Google Maps API key (optional):" 702 | msgstr "" 703 | 704 | #: mapslicer/wizard.py:405 705 | msgid "" 706 | "Note: You can get it online at this address." 708 | msgstr "" 709 | 710 | #: mapslicer/wizard.py:408 711 | msgid "Yahoo Application ID key (optional):" 712 | msgstr "" 713 | 714 | #: mapslicer/wizard.py:411 715 | msgid "" 716 | "Note: You can get it at " 717 | "this webpage." 718 | msgstr "" 719 | 720 | #: mapslicer/wizard.py:414 721 | msgid "Tile rendering" 722 | msgstr "" 723 | 724 | #: mapslicer/wizard.py:415 725 | msgid "" 726 | "Now you can start the rendering of the map tiles. It can be a time consuming " 727 | "process especially for large datasets... so be patient please." 728 | msgstr "" 729 | 730 | #: mapslicer/wizard.py:417 731 | msgid "Rendering progress:" 732 | msgstr "" 733 | 734 | #: mapslicer/wizard.py:426 735 | msgid "Click on the 'Render' button to start the rendering..." 736 | msgstr "" 737 | 738 | #: mapslicer/wizard.py:435 739 | msgid "Thank you for using MapSlicer application." 740 | msgstr "" 741 | 742 | #: mapslicer/wizard.py:435 743 | msgid "This is an open-source project - you can help us to make it better." 744 | msgstr "" 745 | 746 | #: mapslicer/wizard.py:440 747 | msgid "Your rendering task is finished!" 748 | msgstr "" 749 | 750 | #: mapslicer/wizard.py:441 751 | msgid "" 752 | "Thank you for using this software. Now you can see the results. If you " 753 | "upload the directory with tiles to the Internet your map is published!" 754 | msgstr "" 755 | 756 | #: mapslicer/wizard.py:443 757 | msgid "Available results:" 758 | msgstr "" 759 | 760 | #: mapslicer/wizard.py:445 761 | msgid "" 762 | "The generated tiles and also the viewers are available in the output " 763 | "directory:" 764 | msgstr "" 765 | 766 | #: mapslicer/wizard.py:448 767 | msgid "(click to open)" 768 | msgstr "" 769 | -------------------------------------------------------------------------------- /resources/mapslicer.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/mapslicer.icns -------------------------------------------------------------------------------- /resources/mapslicer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/geopython/mapslicer/1c60a2d4d3c0296424b2421e09001fcf32075c6e/resources/mapslicer.ico -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import os, sys 2 | from mapslicer import version 3 | 4 | # py2exe - needs OSGeo4W with GDAL 1.6 5 | if sys.platform in ['win32','win64']: 6 | from distutils.core import setup 7 | import glob 8 | import py2exe 9 | 10 | sys.path.insert(0, 'C:\\OSGeo4W\\apps\\gdal-16\\pymod' ) 11 | os.environ['PATH'] += ';C:\\OSGeo4W\\bin' 12 | 13 | setup(name='MapSlicer', 14 | version=version.replace(' ','.'), 15 | description = "MapSlicer - Map Tile Generator for Mashups", 16 | long_description= "MapSlicer is a powerful tool for online map publishing and generation of map overlay mashups. Your geodata are transformed to the tiles compatible with Google Maps and Earth - ready for uploading to your webserver.", 17 | url='https://github.com/kalxas/mapslicer', 18 | author='Klokan Petr Pridal', 19 | author_email='klokan@klokan.cz', 20 | packages=['mapslicer'], 21 | scripts=['mapslicer.py'], 22 | windows=[ {'script':'mapslicer.py', "icon_resources": [(1, os.path.join('resources', 'mapslicer.ico'))] } ], 23 | data_files=[ 24 | ('proj', glob.glob('C:\\OSGeo4W\\share\\proj\\*')), 25 | ('gdal', glob.glob('C:\\OSGeo4W\\apps\\gdal-16\\share\\gdal\\*')), 26 | ('gdalplugins', glob.glob('C:\\OSGeo4W\\apps\\gdal-16\\bin\\gdalplugins\\*.*')), 27 | ('', glob.glob('C:\\OSGeo4W\\bin\\*.dll')+glob.glob('C:\\OSGeo4W\\bin\\*.manifest')), 28 | ], 29 | options={'py2exe':{'packages':['mapslicer'], 30 | 'includes':['encodings','osgeo'], 31 | 'excludes':['PIL','numpy','wx.BitmapFromImage','wx.EmptyIcon'] 32 | }, 33 | }, 34 | 35 | ) 36 | 37 | # py2app - creates 'fat' standalone Universal binary - with size around 160MB :-( 38 | # Use 'Build Applet.app' for small Leopard-only bundle with dependency on the Kyngchaos GDAL 1.6 Framework 39 | if sys.platform == 'darwin': 40 | from setuptools import setup 41 | import py2app 42 | 43 | # Build the .app file 44 | setup( 45 | options=dict( 46 | py2app=dict( 47 | iconfile='resources/mapslicer.icns', 48 | packages='wx', 49 | excludes='osgeo,PIL,numpy', 50 | resources=['resources/license/LICENSE.txt','mapslicer'], 51 | plist=dict( 52 | CFBundleName = "MapSlicer", 53 | CFBundleShortVersionString = version.replace(' ','.'), 54 | CFBundleGetInfoString = "MapSlicer %s" % version, 55 | CFBundleExecutable = "MapSlicer", 56 | CFBundleIdentifier = "cz.klokan.mapslicer", 57 | ), 58 | frameworks=['PROJ.framework','GEOS.framework','SQLite3.framework','UnixImageIO.framework','GDAL.framework'], 59 | ), 60 | ), 61 | app=[ 'mapslicer.py' ] 62 | ) 63 | --------------------------------------------------------------------------------