summaryrefslogtreecommitdiffstats
path: root/gis
diff options
context:
space:
mode:
Diffstat (limited to 'gis')
-rw-r--r--gis/CreateCloudMap/CreateCloudMap.info10
-rw-r--r--gis/CreateCloudMap/README5
-rw-r--r--gis/CreateCloudMap/doinst.sh3
-rw-r--r--gis/Fiona/Fiona.SlackBuild27
-rw-r--r--gis/Fiona/Fiona.info8
-rw-r--r--gis/Fiona/README18
-rw-r--r--gis/GMT/GMT.SlackBuild35
-rw-r--r--gis/GMT/GMT.info16
-rw-r--r--gis/GMT/README30
-rw-r--r--gis/GMT/slack-desc14
-rw-r--r--gis/Geohash/Geohash.SlackBuild17
-rw-r--r--gis/Geohash/Geohash.info2
-rw-r--r--gis/Geohash/README4
-rw-r--r--gis/OTB-legacy/OTB-legacy.SlackBuild201
-rw-r--r--gis/OTB-legacy/OTB-legacy.info10
-rw-r--r--gis/OTB-legacy/README18
-rw-r--r--gis/OTB-legacy/doinst.sh (renamed from gis/OTB/doinst.sh)0
-rw-r--r--gis/OTB-legacy/otbSpatialReference.cxx.patch8
-rw-r--r--gis/OTB-legacy/slack-desc19
-rw-r--r--gis/OTB/OTB.SlackBuild114
-rw-r--r--gis/OTB/OTB.info12
-rw-r--r--gis/OTB/README47
-rw-r--r--gis/OTB/otbSpatialReference.cxx.patch8
-rw-r--r--gis/OWSLib/OWSLib.SlackBuild31
-rw-r--r--gis/OWSLib/OWSLib.info12
-rw-r--r--gis/OWSLib/pytz-not-required.patch13
-rw-r--r--gis/SFCGAL-legacy/README16
-rw-r--r--gis/SFCGAL-legacy/SFCGAL-legacy.SlackBuild134
-rw-r--r--gis/SFCGAL-legacy/SFCGAL-legacy.info10
-rw-r--r--gis/SFCGAL-legacy/slack-desc (renamed from gis/geoserver-wps/slack-desc)22
-rw-r--r--gis/SFCGAL/README23
-rw-r--r--gis/SFCGAL/SFCGAL.SlackBuild33
-rw-r--r--gis/SFCGAL/SFCGAL.info14
-rw-r--r--gis/SFCGAL/slack-desc2
-rw-r--r--gis/Shapely/Shapely.info10
-rw-r--r--gis/Shapely/slack-desc19
-rw-r--r--gis/TauDEM/README34
-rw-r--r--gis/TauDEM/TauDEM.SlackBuild22
-rw-r--r--gis/TauDEM/TauDEM.info2
-rw-r--r--gis/basemap/README2
-rw-r--r--gis/basemap/basemap.info10
-rw-r--r--gis/basemap/slack-desc19
-rw-r--r--gis/cartopy/cartopy.info10
-rw-r--r--gis/cligj/cligj.SlackBuild25
-rw-r--r--gis/cligj/cligj.info6
-rw-r--r--gis/eccodes/README21
-rw-r--r--gis/eccodes/eccodes.SlackBuild113
-rw-r--r--gis/eccodes/eccodes.info10
-rw-r--r--gis/eccodes/slack-desc19
-rw-r--r--gis/foxtrotgps/foxtrotgps-1.2.2-fix-some-receivers.patch.gzbin0 -> 762 bytes
-rw-r--r--gis/foxtrotgps/foxtrotgps-1.2.2-gcc10.patch.gzbin0 -> 319 bytes
-rw-r--r--gis/foxtrotgps/foxtrotgps-1.2.2-gpsd-api9.patch.gzbin0 -> 476 bytes
-rw-r--r--gis/foxtrotgps/foxtrotgps-gpsd-3.18.patch11
-rw-r--r--gis/foxtrotgps/foxtrotgps.SlackBuild25
-rw-r--r--gis/foxtrotgps/foxtrotgps.info6
-rw-r--r--gis/gdal/README15
-rw-r--r--gis/gdal/gdal.SlackBuild185
-rw-r--r--gis/gdal/gdal.info12
-rw-r--r--gis/geogig-py/README3
-rw-r--r--gis/geogig-py/geogig-py.SlackBuild85
-rw-r--r--gis/geogig-py/geogig-py.info10
-rw-r--r--gis/geogig/README7
-rw-r--r--gis/geogig/geogig.SlackBuild63
-rw-r--r--gis/geogig/geogig.info10
-rw-r--r--gis/geogig/slack-desc19
-rw-r--r--gis/geographiclib-python/README8
-rw-r--r--gis/geographiclib-python/geographiclib-python.SlackBuild26
-rw-r--r--gis/geographiclib-python/geographiclib-python.info2
-rw-r--r--gis/geojson/geojson.SlackBuild26
-rw-r--r--gis/geojson/geojson.info8
-rw-r--r--gis/geopandas/README5
-rw-r--r--gis/geopandas/geopandas.SlackBuild (renamed from gis/pyshp/pyshp.SlackBuild)30
-rw-r--r--gis/geopandas/geopandas.info10
-rw-r--r--gis/geopandas/slack-desc (renamed from gis/geoserver/slack-desc)22
-rw-r--r--gis/geopy/README13
-rw-r--r--gis/geopy/geopy.SlackBuild21
-rw-r--r--gis/geopy/geopy.info8
-rw-r--r--gis/geopy/slack-desc4
-rw-r--r--gis/geos/README4
-rw-r--r--gis/geos/geos.SlackBuild68
-rw-r--r--gis/geos/geos.info12
-rw-r--r--gis/geoserver-control-flow/README4
-rw-r--r--gis/geoserver-control-flow/geoserver-control-flow.SlackBuild57
-rw-r--r--gis/geoserver-control-flow/geoserver-control-flow.info10
-rw-r--r--gis/geoserver-control-flow/slack-desc19
-rw-r--r--gis/geoserver-css/README3
-rw-r--r--gis/geoserver-css/geoserver-css.SlackBuild58
-rw-r--r--gis/geoserver-css/geoserver-css.info10
-rw-r--r--gis/geoserver-javascript/README3
-rw-r--r--gis/geoserver-javascript/geoserver-javascript.SlackBuild64
-rw-r--r--gis/geoserver-javascript/geoserver-javascript.info10
-rw-r--r--gis/geoserver-javascript/slack-desc19
-rw-r--r--gis/geoserver-oracle/README3
-rw-r--r--gis/geoserver-oracle/geoserver-oracle.SlackBuild58
-rw-r--r--gis/geoserver-oracle/geoserver-oracle.info10
-rw-r--r--gis/geoserver-pyramid/README3
-rw-r--r--gis/geoserver-pyramid/geoserver-pyramid.SlackBuild57
-rw-r--r--gis/geoserver-pyramid/geoserver-pyramid.info10
-rw-r--r--gis/geoserver-pyramid/slack-desc19
-rw-r--r--gis/geoserver-python/README3
-rw-r--r--gis/geoserver-python/geoserver-python.info10
-rw-r--r--gis/geoserver-python/slack-desc19
-rw-r--r--gis/geoserver-wps/README3
-rw-r--r--gis/geoserver-wps/geoserver-wps.SlackBuild57
-rw-r--r--gis/geoserver-wps/geoserver-wps.info10
-rw-r--r--gis/geoserver/README23
-rw-r--r--gis/geoserver/data_dir.patch17
-rw-r--r--gis/geoserver/doinst.sh14
-rw-r--r--gis/geoserver/geoserver.SlackBuild73
-rw-r--r--gis/geoserver/geoserver.info10
-rw-r--r--gis/geoserver/geoserver.xml1
-rw-r--r--gis/gj2ascii/gj2ascii.SlackBuild22
-rw-r--r--gis/gj2ascii/gj2ascii.info2
-rw-r--r--gis/gmapcatcher/gmapcatcher.SlackBuild22
-rw-r--r--gis/google-earth-legacy/README47
-rw-r--r--gis/google-earth-legacy/doinst.sh14
-rw-r--r--gis/google-earth-legacy/google-earth-legacy.SlackBuild140
-rw-r--r--gis/google-earth-legacy/google-earth-legacy.info10
-rw-r--r--gis/google-earth-legacy/google-earth-mimetypes.xml20
-rw-r--r--gis/google-earth-legacy/slack-desc19
-rw-r--r--gis/google-earth/README51
-rw-r--r--gis/google-earth/doinst.sh1
-rw-r--r--gis/google-earth/google-earth.SlackBuild40
-rw-r--r--gis/google-earth/google-earth.info14
-rw-r--r--gis/gpsbabel/README25
-rw-r--r--gis/gpsbabel/gpsbabel.SlackBuild60
-rw-r--r--gis/gpsbabel/gpsbabel.info8
-rw-r--r--gis/gpsd/gpsd.SlackBuild33
-rw-r--r--gis/gpxsee/fix_font_narrow_space.diff4
-rw-r--r--gis/gpxsee/gpxsee.SlackBuild23
-rw-r--r--gis/gpxsee/gpxsee.info12
-rw-r--r--gis/grass/README22
-rw-r--r--gis/grass/gdal-3.3.patch84
-rw-r--r--gis/grass/grass.SlackBuild51
-rw-r--r--gis/grass/grass.info8
-rw-r--r--gis/josm/README12
-rw-r--r--gis/josm/josm.SlackBuild16
-rw-r--r--gis/josm/josm.info2
-rw-r--r--gis/laszip/README13
-rw-r--r--gis/laszip/laszip.SlackBuild25
-rw-r--r--gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch40
-rw-r--r--gis/libLAS/boost-1.73.patch36
-rw-r--r--gis/libLAS/libLAS.SlackBuild21
-rw-r--r--gis/libLAS/libLAS.info2
-rw-r--r--gis/libecwj2/README33
-rw-r--r--gis/libecwj2/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch16
-rw-r--r--gis/libecwj2/libecwj2-3.3-msvc90-fixes.patch239
-rw-r--r--gis/libecwj2/libecwj2-3.3-wcharfix.patch15
-rw-r--r--gis/libecwj2/libecwj2.SlackBuild126
-rw-r--r--gis/libecwj2/libecwj2.info10
-rw-r--r--gis/libecwj2/slack-desc19
-rw-r--r--gis/libgeotiff/libgeotiff.SlackBuild35
-rw-r--r--gis/libgeotiff/libgeotiff.info10
-rw-r--r--gis/librasterlite/0001-fix-autotools.patch.gzbin0 -> 612 bytes
-rw-r--r--gis/librasterlite/librasterlite.SlackBuild29
-rw-r--r--gis/librttopo/README11
-rw-r--r--gis/librttopo/librttopo.SlackBuild (renamed from gis/spatialite_gui/spatialite_gui.SlackBuild)50
-rw-r--r--gis/librttopo/librttopo.info10
-rw-r--r--gis/librttopo/slack-desc19
-rw-r--r--gis/libspatialindex/README12
-rw-r--r--gis/libspatialindex/libspatialindex.SlackBuild59
-rw-r--r--gis/libspatialindex/libspatialindex.info12
-rw-r--r--gis/libspatialindex/slack-desc2
-rw-r--r--gis/libspatialite/README15
-rw-r--r--gis/libspatialite/libspatialite.SlackBuild58
-rw-r--r--gis/libspatialite/libspatialite.info12
-rw-r--r--gis/mapnik/README7
-rw-r--r--gis/mapnik/mapnik.SlackBuild34
-rw-r--r--gis/mapnik/mapnik.info11
-rw-r--r--gis/merkaartor/README8
-rw-r--r--gis/merkaartor/merkaartor.SlackBuild83
-rw-r--r--gis/merkaartor/merkaartor.info10
-rw-r--r--gis/mobac/README10
-rw-r--r--gis/mobac/directories.ini42
-rw-r--r--gis/mobac/mobac.SlackBuild64
-rw-r--r--gis/mobac/mobac.info10
-rw-r--r--gis/mobac/slack-desc19
-rw-r--r--gis/navit/navit.SlackBuild25
-rw-r--r--gis/navit/navit.info6
-rw-r--r--gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild20
-rw-r--r--gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info6
-rw-r--r--gis/opencpn/README15
-rw-r--r--gis/opencpn/opencpn.SlackBuild58
-rw-r--r--gis/opencpn/opencpn.info8
-rw-r--r--gis/opencpn/patches/cmake_build_fix.patch79
-rw-r--r--gis/opencpn/patches/honor_mandir.patch20
-rw-r--r--gis/opencpn/patches/opencpn-4.4.0-multilib-strict.patch14
-rw-r--r--gis/opengrads/README9
-rw-r--r--gis/opengrads/opengrads.SlackBuild16
-rw-r--r--gis/openorienteering-mapper/69977dfd4cbb8608aafa8ca8b5388d4983f5430a.patch35
-rw-r--r--gis/openorienteering-mapper/README5
-rw-r--r--gis/openorienteering-mapper/fix_doc_path.diff11
-rw-r--r--gis/openorienteering-mapper/openorienteering-mapper.SlackBuild24
-rw-r--r--gis/openorienteering-mapper/openorienteering-mapper.info8
-rw-r--r--gis/osgEarth/README27
-rw-r--r--gis/osgEarth/geos-3_6_1-support.patch60
-rw-r--r--gis/osgEarth/osgEarth.SlackBuild40
-rw-r--r--gis/osgEarth/osgEarth.info8
-rw-r--r--gis/osm-gps-map/README8
-rw-r--r--gis/osm-gps-map/osm-gps-map.SlackBuild26
-rw-r--r--gis/osm-gps-map/osm-gps-map.info2
-rw-r--r--gis/osm2pgrouting/osm2pgrouting.SlackBuild22
-rw-r--r--gis/osm2pgrouting/osm2pgrouting.info6
-rw-r--r--gis/osm2pgsql-legacy/README8
-rw-r--r--gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild119
-rw-r--r--gis/osm2pgsql-legacy/osm2pgsql-legacy.info10
-rw-r--r--gis/osm2pgsql-legacy/slack-desc (renamed from gis/geoserver-oracle/slack-desc)22
-rw-r--r--gis/osm2pgsql/README3
-rw-r--r--gis/osm2pgsql/osm2pgsql.SlackBuild41
-rw-r--r--gis/osm2pgsql/osm2pgsql.info18
-rw-r--r--gis/osm2pgsql/slack-desc2
-rw-r--r--gis/ossim/README10
-rw-r--r--gis/ossim/ossim.SlackBuild37
-rw-r--r--gis/ossim/ossim.info6
-rw-r--r--gis/ossim/slack-desc6
-rw-r--r--gis/pdal/README45
-rw-r--r--gis/pdal/README.SBo7
-rw-r--r--gis/pdal/pdal.SlackBuild63
-rw-r--r--gis/pdal/pdal.info14
-rw-r--r--gis/pdal/slack-desc2
-rw-r--r--gis/pgrouting/README4
-rw-r--r--gis/pgrouting/pgrouting.SlackBuild29
-rw-r--r--gis/pgrouting/pgrouting.info12
-rw-r--r--gis/pgsql-ogr-fdw/README4
-rw-r--r--gis/pgsql-ogr-fdw/pgsql-ogr-fdw.SlackBuild20
-rw-r--r--gis/pgsql-ogr-fdw/pgsql-ogr-fdw.info6
-rw-r--r--gis/pktools/README11
-rw-r--r--gis/pktools/pktools.SlackBuild22
-rw-r--r--gis/pointcloud/README8
-rw-r--r--gis/pointcloud/pointcloud.SlackBuild20
-rw-r--r--gis/pointcloud/pointcloud.info8
-rw-r--r--gis/polyline/README4
-rw-r--r--gis/polyline/polyline.SlackBuild21
-rw-r--r--gis/polyline/polyline.info8
-rw-r--r--gis/postgis/README10
-rw-r--r--gis/postgis/doinst.sh9
-rw-r--r--gis/postgis/postgis.SlackBuild32
-rw-r--r--gis/postgis/postgis.info10
-rw-r--r--gis/proj-data/README2
-rw-r--r--gis/proj-data/proj-data.SlackBuild (renamed from gis/geoserver-python/geoserver-python.SlackBuild)48
-rw-r--r--gis/proj-data/proj-data.info10
-rw-r--r--gis/proj-data/slack-desc (renamed from gis/geogig-py/slack-desc)22
-rw-r--r--gis/proj/README10
-rw-r--r--gis/proj/proj.SlackBuild73
-rw-r--r--gis/proj/proj.info14
-rw-r--r--gis/pyproj/README16
-rw-r--r--gis/pyproj/pyproj.info10
-rw-r--r--gis/pyshp/README4
-rw-r--r--gis/pyshp/pyshp.info10
-rw-r--r--gis/pyshp/slack-desc19
-rw-r--r--gis/pyspatialite/README5
-rw-r--r--gis/pyspatialite/pyspatialite.info10
-rw-r--r--gis/pyspatialite/slack-desc19
-rw-r--r--gis/python-mapnik/python-mapnik.SlackBuild38
-rw-r--r--gis/python-mapnik/python-mapnik.info6
-rw-r--r--gis/python-pygeos/README4
-rw-r--r--gis/python-pygeos/python-pygeos.SlackBuild (renamed from gis/Shapely/Shapely.SlackBuild)41
-rw-r--r--gis/python-pygeos/python-pygeos.info10
-rw-r--r--gis/python-pygeos/slack-desc (renamed from gis/geoserver-css/slack-desc)22
-rw-r--r--gis/python3-basemap/python3-basemap.SlackBuild39
-rw-r--r--gis/python3-basemap/python3-basemap.info8
-rw-r--r--gis/python3-cartopy/README (renamed from gis/cartopy/README)12
-rw-r--r--gis/python3-cartopy/python3-cartopy.SlackBuild (renamed from gis/cartopy/cartopy.SlackBuild)53
-rw-r--r--gis/python3-cartopy/python3-cartopy.info10
-rw-r--r--gis/python3-cartopy/slack-desc19
-rw-r--r--gis/python3-cftime/README4
-rw-r--r--gis/python3-cftime/python3-cftime.SlackBuild (renamed from gis/basemap/basemap.SlackBuild)60
-rw-r--r--gis/python3-cftime/python3-cftime.info10
-rw-r--r--gis/python3-cftime/slack-desc (renamed from gis/spatialite_gui/slack-desc)22
-rw-r--r--gis/python3-netcdf4-python/README17
-rw-r--r--gis/python3-netcdf4-python/python3-netcdf4-python.SlackBuild98
-rw-r--r--gis/python3-netcdf4-python/python3-netcdf4-python.info10
-rw-r--r--gis/python3-netcdf4-python/slack-desc19
-rw-r--r--gis/python3-pyproj/README17
-rw-r--r--gis/python3-pyproj/python3-pyproj.SlackBuild (renamed from gis/pyspatialite/pyspatialite.SlackBuild)44
-rw-r--r--gis/python3-pyproj/python3-pyproj.info10
-rw-r--r--gis/python3-pyproj/slack-desc19
-rw-r--r--gis/python3-pyshp/README18
-rw-r--r--gis/python3-pyshp/python3-pyshp.SlackBuild (renamed from gis/pyproj/pyproj.SlackBuild)38
-rw-r--r--gis/python3-pyshp/python3-pyshp.info10
-rw-r--r--gis/python3-pyshp/slack-desc19
-rw-r--r--gis/python3-shapely/README (renamed from gis/Shapely/README)0
-rw-r--r--gis/python3-shapely/python3-shapely.SlackBuild96
-rw-r--r--gis/python3-shapely/python3-shapely.info10
-rw-r--r--gis/python3-shapely/slack-desc19
-rw-r--r--gis/python3-xarray/README10
-rw-r--r--gis/python3-xarray/python3-xarray.SlackBuild88
-rw-r--r--gis/python3-xarray/python3-xarray.info10
-rw-r--r--gis/python3-xarray/slack-desc (renamed from gis/CreateCloudMap/slack-desc)22
-rw-r--r--gis/pytrainer/pytrainer.SlackBuild21
-rw-r--r--gis/pytrainer/pytrainer.info8
-rw-r--r--gis/qgis/README27
-rw-r--r--gis/qgis/README.Slackware87
-rw-r--r--gis/qgis/README.server23
-rw-r--r--gis/qgis/qgis.SlackBuild109
-rw-r--r--gis/qgis/qgis.info14
-rw-r--r--gis/qgis/qjson.cmake.diff10
-rw-r--r--gis/qlandkartegt/README19
-rw-r--r--gis/qlandkartegt/doinst.sh3
-rw-r--r--gis/qlandkartegt/qlandkartegt.SlackBuild89
-rw-r--r--gis/qlandkartegt/qlandkartegt.info10
-rw-r--r--gis/qlandkartegt/slack-desc19
-rw-r--r--gis/qmapshack/addqmaptool.patch25494
-rw-r--r--gis/qmapshack/line_3px_horizontal.pngbin188 -> 0 bytes
-rw-r--r--gis/qmapshack/line_3px_vertical.pngbin189 -> 0 bytes
-rw-r--r--gis/qmapshack/qmapshack.SlackBuild36
-rw-r--r--gis/qmapshack/qmapshack.info10
-rw-r--r--gis/qmapshack/qmt_map2jnx.patch1199
-rw-r--r--gis/qmapshack/rgb2pct.patch971
-rw-r--r--gis/qmapshack/splash.pngbin156794 -> 0 bytes
-rw-r--r--gis/rasterio/README12
-rw-r--r--gis/rasterio/rasterio.SlackBuild25
-rw-r--r--gis/rasterio/rasterio.info8
-rw-r--r--gis/readosm/readosm.SlackBuild26
-rw-r--r--gis/routino/README5
-rw-r--r--gis/routino/routino.SlackBuild16
-rw-r--r--gis/saga-gis/README39
-rw-r--r--gis/saga-gis/doinst.sh13
-rw-r--r--gis/saga-gis/saga-gis.SlackBuild127
-rw-r--r--gis/saga-gis/saga-gis.info12
-rw-r--r--gis/spatialite-tools/0001-fix-autotools.patch.gzbin0 -> 377 bytes
-rw-r--r--gis/spatialite-tools/README8
-rw-r--r--gis/spatialite-tools/spatialite-tools.SlackBuild27
-rw-r--r--gis/spatialite-tools/spatialite-tools.info6
-rw-r--r--gis/spatialite_gui/README2
-rw-r--r--gis/spatialite_gui/spatialite_gui.info10
-rw-r--r--gis/survex/README11
-rw-r--r--gis/survex/doinst.sh13
-rw-r--r--gis/survex/slack-desc (renamed from gis/pyproj/slack-desc)22
-rw-r--r--gis/survex/survex.SlackBuild (renamed from gis/CreateCloudMap/CreateCloudMap.SlackBuild)59
-rw-r--r--gis/survex/survex.info12
-rw-r--r--gis/tangogps/README18
-rw-r--r--gis/tangogps/tangogps.SlackBuild20
-rw-r--r--gis/therion/README68
-rw-r--r--gis/therion/doinst.sh29
-rw-r--r--gis/therion/slack-desc (renamed from gis/cartopy/slack-desc)22
-rw-r--r--gis/therion/therion.SlackBuild163
-rw-r--r--gis/therion/therion.info10
-rw-r--r--gis/udig/README11
-rw-r--r--gis/udig/doinst.sh3
-rw-r--r--gis/udig/slack-desc19
-rw-r--r--gis/udig/udig.SlackBuild101
-rw-r--r--gis/udig/udig.desktop9
-rw-r--r--gis/udig/udig.info10
-rw-r--r--gis/viking/viking.SlackBuild18
-rw-r--r--gis/viking/viking.info2
-rw-r--r--gis/whitebox-tools/README21
-rw-r--r--gis/whitebox-tools/slack-desc19
-rw-r--r--gis/whitebox-tools/whitebox-tools.SlackBuild166
-rw-r--r--gis/whitebox-tools/whitebox-tools.info204
-rw-r--r--gis/xplanet/README12
-rw-r--r--gis/xplanet/xplanet.SlackBuild13
352 files changed, 5582 insertions, 30993 deletions
diff --git a/gis/CreateCloudMap/CreateCloudMap.info b/gis/CreateCloudMap/CreateCloudMap.info
deleted file mode 100644
index 9ecbd102a4..0000000000
--- a/gis/CreateCloudMap/CreateCloudMap.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="CreateCloudMap"
-VERSION="0.9.13"
-HOMEPAGE="https://github.com/jmozmoz/cloudmap"
-DOWNLOAD="https://files.pythonhosted.org/packages/1f/5c/75ce03f468e0765120a307da2ccefafe10f7d1cce122de21ae653cbb49af/CreateCloudMap-0.9.13.tar.gz"
-MD5SUM="c7108d2b0fe3413da9c953b9dd99502a"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="pyresample scipy python-requests ConfigParser pillowfight"
-MAINTAINER="Dimitris Zlatanidis"
-EMAIL="d.zlatanidis@gmail.com"
diff --git a/gis/CreateCloudMap/README b/gis/CreateCloudMap/README
deleted file mode 100644
index f38ad22afa..0000000000
--- a/gis/CreateCloudMap/README
+++ /dev/null
@@ -1,5 +0,0 @@
-Python script to create a cloud map for xplanet using satellite images from the
-Dundee Satellite Receiving Station, Dundee University, UK.
-
-Optional :
-xplanet can use a cloud map to make the earth look more pretty.
diff --git a/gis/CreateCloudMap/doinst.sh b/gis/CreateCloudMap/doinst.sh
deleted file mode 100644
index 5fb28930db..0000000000
--- a/gis/CreateCloudMap/doinst.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
-fi
diff --git a/gis/Fiona/Fiona.SlackBuild b/gis/Fiona/Fiona.SlackBuild
index 5fa0ea09e3..b1cfbb9b20 100644
--- a/gis/Fiona/Fiona.SlackBuild
+++ b/gis/Fiona/Fiona.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Fiona
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=Fiona
-VERSION=${VERSION:-1.8.7}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.8.20}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,10 +79,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
-fi
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -87,4 +94,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/Fiona/Fiona.info b/gis/Fiona/Fiona.info
index 933c9868d4..e0f3d74acb 100644
--- a/gis/Fiona/Fiona.info
+++ b/gis/Fiona/Fiona.info
@@ -1,10 +1,10 @@
PRGNAM="Fiona"
-VERSION="1.8.7"
+VERSION="1.8.20"
HOMEPAGE="https://github.com/Toblerity/Fiona"
-DOWNLOAD="https://github.com/Toblerity/Fiona/archive/1.8.7/Fiona-1.8.7.tar.gz"
-MD5SUM="8f3fada8f1aa9cbc3b5844dfde716bb5"
+DOWNLOAD="https://github.com/Toblerity/Fiona/archive/1.8.20/Fiona-1.8.20.tar.gz"
+MD5SUM="186f39b90b8191c37745ceafacceda94"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="attrs gdal munch six"
+REQUIRES="gdal munch python3-attrs click-plugins cligj"
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/Fiona/README b/gis/Fiona/README
index d079aa2700..ad7dc450bd 100644
--- a/gis/Fiona/README
+++ b/gis/Fiona/README
@@ -1,9 +1,11 @@
-Fiona provides uncomplicated Python interfaces to functions in OGR, the best
-open source C/C++ library for reading and writing geographic vector data.
+Fiona provides uncomplicated Python interfaces to functions in OGR,
+the best open source C/C++ library for reading and writing geographic
+vector data.
-Fiona is designed to be simple and dependable. It focuses on reading and
-writing data in standard Python IO style, and relies upon familiar Python types
-and protocols such as files, dictionaries, mappings, and iterators instead of
-classes specific to OGR. Fiona can read and write real-world data using
-multi-layered GIS formats and zipped virtual file systems and integrates
-readily with other Python GIS packages such as pyproj, Rtree and Shapely.
+Fiona is designed to be simple and dependable. It focuses on reading
+and writing data in standard Python IO style, and relies upon familiar
+Python types and protocols such as files, dictionaries, mappings, and
+iterators instead of classes specific to OGR. Fiona can read and write
+real-world data using multi-layered GIS formats and zipped virtual
+file systems and integrates readily with other Python GIS packages
+such as pyproj, Rtree and Shapely.
diff --git a/gis/GMT/GMT.SlackBuild b/gis/GMT/GMT.SlackBuild
index a91b1f713f..b6b7a68a77 100644
--- a/gis/GMT/GMT.SlackBuild
+++ b/gis/GMT/GMT.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for GMT (Generic Mapping Tools)
@@ -22,17 +22,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=GMT
SRCNAM=gmt
-VERSION=${VERSION:-5.4.5}
+VERSION=${VERSION:-6.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
GSHHG=gshhg
GSHHG_VERSION=${GSHHG_VERSION:-2.3.7}
DCW=dcw
-DCW_VERSION=${DCW_VERSION:-1.1.4}
+DCW_VERSION=${DCW_VERSION:-2.1.2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -42,7 +45,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -97,16 +107,23 @@ cd build
-DGMT_DATADIR=share/$SRCNAM \
-DGMT_DOCDIR=doc/$PRGNAM-$VERSION \
-DGMT_MANDIR=man \
- -DDCW_ROOT=$PKG/usr/share/$SRCNAM/dcw \
-DGSHHG_ROOT=$PKG/usr/share/$SRCNAM/gshhg \
+ -DDCW_ROOT=$PKG/usr/share/$SRCNAM/dcw \
+ -DCOPY_GSHHG=true \
+ -DCOPY_DCW=true \
+ -DGMT_INSTALL_MODULE_LINKS=true \
-DLICENSE_RESTRICTED=$LICFLAG \
-DCMAKE_BUILD_TYPE=Release ..
make all
- make docs_man
- make docs_html
make install DESTDIR=$PKG
cd ..
+# Remove unwanted empty dirs
+#rmdir $PKG/usr/doc/GMT-$VERSION/html/_video_thumbnail
+#rmdir $PKG/usr/man/man1/_video_thumbnail
+find $PKG/usr/doc/GMT-$VERSION/html -type d -empty -print0 | xargs -0 -I {} /usr/bin/rmdir "{}"
+find $PKG/usr/man/man1/ -type d -empty -print0 | xargs -0 -I {} /usr/bin/rmdir "{}"
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -114,11 +131,11 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE.TXT README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a BUILDING.md LICENSE.TXT README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/GMT/GMT.info b/gis/GMT/GMT.info
index 55d5d8a86f..e79c42595d 100644
--- a/gis/GMT/GMT.info
+++ b/gis/GMT/GMT.info
@@ -1,14 +1,14 @@
PRGNAM="GMT"
-VERSION="5.4.5"
-HOMEPAGE="http://gmt.soest.hawaii.edu/"
-DOWNLOAD="ftp://ftp.soest.hawaii.edu/gmt/gmt-5.4.5-src.tar.gz \
- ftp://ftp.soest.hawaii.edu/gmt/gshhg-gmt-2.3.7.tar.gz \
- ftp://ftp.soest.hawaii.edu/gmt/dcw-gmt-1.1.4.tar.gz"
-MD5SUM="a2e097410f37155d59b030275361ce60 \
+VERSION="6.5.0"
+HOMEPAGE="https://www.generic-mapping-tools.org/"
+DOWNLOAD="https://github.com/GenericMappingTools/gmt/releases/download/6.5.0/gmt-6.5.0-src.tar.gz \
+ https://github.com/GenericMappingTools/gshhg-gmt/releases/download/2.3.7/gshhg-gmt-2.3.7.tar.gz \
+ https://github.com/GenericMappingTools/dcw-gmt/releases/download/2.1.2/dcw-gmt-2.1.2.tar.gz"
+MD5SUM="a03e8d73f73c3804d78a42a3d5fc3dc7 \
8ee2653f9daf84d49fefbf990bbfa1e7 \
- 4f30857a8b12af0f910222fceb591538"
+ b9375db7042963c7649e4f62a81df796"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gdal netcdf Sphinx"
+REQUIRES="gdal"
MAINTAINER="Cristiano Urban"
EMAIL="cristiano.urban.slack@gmail.com"
diff --git a/gis/GMT/README b/gis/GMT/README
index 9a505f283e..9146b35d9d 100644
--- a/gis/GMT/README
+++ b/gis/GMT/README
@@ -1,10 +1,11 @@
-GMT is an open source collection of about 80 command-line tools for
-manipulating geographic and Cartesian data sets (including filtering,
-trend fitting, gridding, projecting, etc.) and producing PostScript
-illustrations ranging from simple x-y plots via contour maps to
-artificially illuminated surfaces and 3D perspective views; the GMT
-supplements add another 40 more specialized and discipline-specific
-tools.
+GMT is an open-source collection of command-line tools for manipulating
+geographic and Cartesian data sets (including filtering, trend fitting,
+gridding, projecting, etc.) and producing PostScript illustrations
+ranging from simple x-y plots via contour maps to artificially
+illuminated surfaces and 3D perspective views. It supports many map
+projections and transformations and includes supporting data such as
+coastlines, rivers, and political boundaries and optionally country
+polygons.
By default, GMT will use Dave Watson's Delaunay triangulation routine.
However, a much faster alternative is available from Jonathan Shewchuk,
@@ -14,5 +15,18 @@ by passing the SHEWCHUK parameter:
SHEWCHUK=yes ./GMT.SlackBuild
-For more details refer to the README and LICENSE.TXT files contained
+For movie-making capabilities the following dependencies are needed:
+
+ GraphicsMagick
+ ffmpeg
+
+Other optional dependencies are:
+
+ blas
+ lapack
+
+Modules documentation can be accessed via the "gmt docs <module_name>"
+command (e.g. gmt docs psxy).
+
+For more details refer to the README.md and LICENSE.TXT files contained
into the GMT sources.
diff --git a/gis/GMT/slack-desc b/gis/GMT/slack-desc
index 2c2f87e8b5..13233d91e1 100644
--- a/gis/GMT/slack-desc
+++ b/gis/GMT/slack-desc
@@ -8,12 +8,12 @@
|-----handy-ruler------------------------------------------------------|
GMT: GMT (Generic Mapping Tools)
GMT:
-GMT: GMT is an open source collection of about 80 command-line tools for
-GMT: manipulating geographic and Cartesian data sets (including filtering,
-GMT: trend fitting, gridding, projecting, etc.) and producing PostScript
-GMT: illustrations ranging from simple x-y plots via contour maps to
-GMT: artificially illuminated surfaces and 3D perspective views.
-GMT:
-GMT: Homepage: http://gmt.soest.hawaii.edu
+GMT: GMT is an open source collection of command-line tools for
+GMT: manipulaing geographic and Cartesian data sets (including
+GMT: filtering, trend fitting, gridding, projecting, etc.) and
+GMT: producing PostScript illustrations ranging from simple x-y
+GMT: plots via contour maps to artificially illuminated surfaces
+GMT: and 3D perspective views.
GMT:
+GMT: Homepage: https://www.generic-mapping-tools.org/
GMT:
diff --git a/gis/Geohash/Geohash.SlackBuild b/gis/Geohash/Geohash.SlackBuild
index 6100ab1625..fb4765cc12 100644
--- a/gis/Geohash/Geohash.SlackBuild
+++ b/gis/Geohash/Geohash.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Geohash
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=Geohash
VERSION=${VERSION:-1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,7 +79,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -85,4 +94,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/Geohash/Geohash.info b/gis/Geohash/Geohash.info
index 660744a032..89ba46621f 100644
--- a/gis/Geohash/Geohash.info
+++ b/gis/Geohash/Geohash.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://pypi.python.org/packages/source/G/Geohash/Geohash-1.0.tar.gz"
MD5SUM="a7c4e57874061fae1e30dd8aa8b9b390"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3"
+REQUIRES=""
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/Geohash/README b/gis/Geohash/README
index f0438606d7..090e9200e8 100644
--- a/gis/Geohash/README
+++ b/gis/Geohash/README
@@ -1,2 +1,2 @@
-Geohash is a Python module that provides functions for decoding and encoding
-geohashes to and from latitude and longitude coordinates.
+Geohash is a Python module that provides functions for decoding and
+encoding geohashes to and from latitude and longitude coordinates.
diff --git a/gis/OTB-legacy/OTB-legacy.SlackBuild b/gis/OTB-legacy/OTB-legacy.SlackBuild
new file mode 100644
index 0000000000..c502a33de8
--- /dev/null
+++ b/gis/OTB-legacy/OTB-legacy.SlackBuild
@@ -0,0 +1,201 @@
+#!/bin/bash
+
+# SlackBuild script for OTB-legacy
+
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2014-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=OTB-legacy
+SRCNAM=OTB
+VERSION=${VERSION:-8.1.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+#Look for other installed versions of Orfeo ToolBox version 8
+#Versions earlier than OTB 8 are not detected
+if [ -d /usr/doc/OTB-8* ]; then
+ echo "*****************************************************************"
+ echo "WARNING: another installation of OTB is found in your system!"
+ echo "If you are trying to update or rebuild your OTB with this script"
+ echo "you must remove previous OTB package installed because OTB-legacy"
+ echo "will conflict with the current installed:"
+ echo "# removepkg OTB"
+ echo "This script will be stopped"
+ echo "*****************************************************************"
+ exit 1
+fi
+#Look for other installed versions of Orfeo ToolBox later than 8.1.2
+if [ -d /usr/doc/OTB-9* ]; then
+ echo "*****************************************************************"
+ echo "WARNING: a later version of OTB is found in your system!"
+ echo "If you are trying to downgrade your OTB with this script"
+ echo "you must remove previous OTB package installed because OTB-legacy"
+ echo "will conflict with the current installed:"
+ echo "# removepkg OTB"
+ echo "This script will be stopped"
+ echo "*****************************************************************"
+ exit 1
+fi
+
+if [ -d /usr/share/cmake-3.28 ]; then
+ # This prevents some cmake warnings in current
+ CMAKE_POLICY="-DCMAKE_POLICY_DEFAULT_CMP0106=OLD "
+else
+ CMAKE_POLICY=""
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+# Search for optional dependencies
+if pkg-config --exists ompi; then
+ BUILD_MPI="" ; [ "${MPI:-ON}" = "ON" ] && BUILD_MPI="-DOTB_USE_MPI=ON "
+else
+ BUILD_MPI=""
+fi
+
+if pkg-config --exists glfw3; then
+ WITH_GLFW="" ; [ "${GLFW:-ON}" = "ON" ] && WITH_GLFW="-DOTB_USE_GLFW=ON "
+else
+ WITH_GLFW=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+patch -p1 < $CWD/otbSpatialReference.cxx.patch
+
+sed -i CMakeLists.txt -e "s/message(WARNING/message(STATUS/g"
+
+sed -i "s/lib\b/lib${LIBDIRSUFFIX}/" \
+ CMakeLists.txt \
+ CMake/OTBModuleExternal.cmake \
+ CMake/OTBStandaloneModuleMacros.cmake \
+ CMake/OTBApplicationMacros.cmake
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_EXAMPLES=OFF \
+ -DBUILD_TESTING=OFF \
+ -DOTB_USE_CURL=ON \
+ -DOTB_USE_QWT=ON \
+ -DOTB_USE_GLEW=ON \
+ -DOTB_USE_OPENGL=ON \
+ -DOTB_USE_QT=ON \
+ -DOTB_USE_GLUT=ON \
+ -DOTB_USE_GSL=ON \
+ -DOTB_USE_LIBKML=ON \
+ -DOTB_USE_MUPARSER=ON \
+ -DOTB_USE_OPENCV=ON \
+ -DOTB_USE_OPENMP=ON \
+ -DOTB_USE_SHARK=ON \
+ -DOTB_INSTALL_PYTHON_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
+ -DOTB_WRAP_PYTHON=ON \
+ -DOTB_INSTALL_DOC_DIR=doc/$PRGNAM-$VERSION \
+ -DGDAL_CONFIG_CHECKING=ON \
+ $BUILD_MPI \
+ $WITH_GLFW \
+ $CMAKE_POLICY \
+ ..
+ make -j 10
+ make install DESTDIR=$PKG
+cd ..
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/etc/profile.d
+cat > $PKG/etc/profile.d/otb.csh << EOF
+#!/bin/csh
+# Orfeo ToolBox applications path
+setenv OTB_APPLICATION_PATH /usr/lib${LIBDIRSUFFIX}/otb/applications
+EOF
+cat > $PKG/etc/profile.d/otb.sh << EOF
+#!/bin/sh
+# Orfeo ToolBox applications path
+export OTB_APPLICATION_PATH=/usr/lib${LIBDIRSUFFIX}/otb/applications
+EOF
+
+chmod 0755 $PKG/etc/profile.d/otb.csh
+chmod 0755 $PKG/etc/profile.d/otb.sh
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ README.md RELEASE_NOTES.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/OTB-legacy/OTB-legacy.info b/gis/OTB-legacy/OTB-legacy.info
new file mode 100644
index 0000000000..4cf9d37c32
--- /dev/null
+++ b/gis/OTB-legacy/OTB-legacy.info
@@ -0,0 +1,10 @@
+PRGNAM="OTB-legacy"
+VERSION="8.1.2"
+HOMEPAGE="http://orfeo-toolbox.org/otb/"
+DOWNLOAD="https://github.com/orfeotoolbox/OTB/archive/8.1.2/OTB-8.1.2.tar.gz"
+MD5SUM="b9657e08b5a985e46a8442bcdcfd8038"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="gdal ITK libkml OpenSceneGraph muParser ossim Shark tinyxml qwt"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/OTB-legacy/README b/gis/OTB-legacy/README
new file mode 100644
index 0000000000..c9423e6105
--- /dev/null
+++ b/gis/OTB-legacy/README
@@ -0,0 +1,18 @@
+ORFEO Toolbox (OTB) is an open source library of image processing
+algorithms.
+OTB is based on the medical image processing library ITK and offers
+particular functionalities for remote sensing image processing in
+general and for high spatial resolution images in particular. Targeted
+algorithms for high resolution optical images (Pleiades, SPOT,
+QuickBird, WorldView, Landsat, Ikonos), hyperspectral sensors
+(Hyperion) or SAR (TerraSarX, ERS, Palsar) are available.
+
+This slackbuild is based on a legacy version of OTB and includes by
+default the satellite image viewer Monteverdi, with access to OTB
+processing, in a single build.
+
+OTB-legacy will be built with support for the following packages if
+they are available at compile time: numpy3, openmpi, glfw3.
+
+Warning: the build fails if Shark is not built against the optional
+dependency cblas that gives the support to ATLAS.
diff --git a/gis/OTB/doinst.sh b/gis/OTB-legacy/doinst.sh
index 19ad22754d..19ad22754d 100644
--- a/gis/OTB/doinst.sh
+++ b/gis/OTB-legacy/doinst.sh
diff --git a/gis/OTB-legacy/otbSpatialReference.cxx.patch b/gis/OTB-legacy/otbSpatialReference.cxx.patch
new file mode 100644
index 0000000000..dbfe4514cb
--- /dev/null
+++ b/gis/OTB-legacy/otbSpatialReference.cxx.patch
@@ -0,0 +1,8 @@
+--- ./Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx
++++ ./Modules/Adapters/GdalAdapters/src/otbSpatialReference.cxx
+@@ -31,4 +31,5 @@
+ #include <sstream>
+ #include <stdexcept>
++#include <cassert>
+
+ namespace otb
diff --git a/gis/OTB-legacy/slack-desc b/gis/OTB-legacy/slack-desc
new file mode 100644
index 0000000000..17fac3a0ea
--- /dev/null
+++ b/gis/OTB-legacy/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+OTB-legacy: OTB-legacy (image processing library)
+OTB-legacy:
+OTB-legacy: OTB, the ORFEO Toolbox, is a library of image processing algorithms
+OTB-legacy: that offers particular functionalities for remote sensing
+OTB-legacy: in general and for high spatial resolution images in particular.
+OTB-legacy: This package is based on the legacy version that includes the
+OTB-legacy: Graphic User Interface Monteverdi
+OTB-legacy:
+OTB-legacy: Home page: http://orfeo-toolbox.org/otb/
+OTB-legacy:
+OTB-legacy:
diff --git a/gis/OTB/OTB.SlackBuild b/gis/OTB/OTB.SlackBuild
index 848838672d..c71a583df5 100644
--- a/gis/OTB/OTB.SlackBuild
+++ b/gis/OTB/OTB.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for OTB
-# Copyright 2014-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2014-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,10 +25,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=OTB
-VERSION=${VERSION:-6.6.1}
+VERSION=${VERSION:-9.0.0}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +41,24 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+#Look for installed package OTB-legacy
+if [ -d /usr/doc/OTB-legacy* ]; then
+ echo "*****************************************************************"
+ echo "WARNING: package OTB-legacy is found installed in your system!"
+ echo "OTB and OTB-legacy cannot exist in the same system, please remove"
+ echo "OTB-legacy before running this script if you want to upgrade to a"
+ echo "later version of OTB:"
+ echo "# removepkg OTB-legacy"
+ echo "This script will be stopped"
+ echo "*****************************************************************"
+ exit 1
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,78 +92,71 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/otbSpatialReference.cxx.patch
+
+sed -i CMakeLists.txt -e "s/message(WARNING/message(STATUS/g"
+
sed -i "s/lib\b/lib${LIBDIRSUFFIX}/" \
CMakeLists.txt \
CMake/OTBModuleExternal.cmake \
CMake/OTBStandaloneModuleMacros.cmake \
- CMake/OTBApplicationMacros.cmake \
- CMake/CPackFunctions.cmake
-
-MONTEVERDI=${MONTEVERDI:-OFF}
-BUILD_MONTEVERDI="-DOTB_USE_QWT=$MONTEVERDI -DOTB_USE_GLEW=$MONTEVERDI -DOTB_USE_OPENGL=$MONTEVERDI"
-BUILD_QT="-DOTB_USE_QT=${QTGUI:-ON}"
+ CMake/OTBApplicationMacros.cmake
mkdir -p build
cd build
cmake \
- -DCMAKE_BUILD_TYPE:STRING=Release \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_POLICY_DEFAULT_CMP0106=OLD \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_EXAMPLES=OFF \
- -DBUILD_TESTING=OFF \
-DOTB_USE_CURL=ON \
- -DOTB_USE_LIBKML=OFF \
- -DOTB_USE_MUPARSER=ON \
- -DOTB_USE_OPENCV=${OPENCV:-OFF} \
+ -DOTB_USE_GSL=ON \
+ -DOTB_USE_LIBKML=ON \
+ -DOTBGroup_Learning=ON \
+ -DOTBGroup_FeaturesExtraction=ON \
+ -DOTB_USE_MUPARSERX=ON \
-DOTB_USE_OPENMP=ON \
-DOTB_USE_SHARK=ON \
+ -DOTB_INSTALL_PYTHON_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
-DOTB_WRAP_PYTHON=ON \
- -DOTB_INSTALL_PYTHON_DIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
- -DOTB_WRAP_PYTHON3=ON \
- -DOTB_INSTALL_PYTHON3_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
- -DOTB_INSTALL_DOC_DIR=doc/$PRGNAM-$VERSION \
- $BUILD_MONTEVERDI \
- $BUILD_QT \
+ -DGDAL_CONFIG_CHECKING=OFF \
+ -DBUILD_DOCUMENTATION=OFF \
..
-
+ make
make install DESTDIR=$PKG
cd ..
-if [ "$QTGUI" = "OFF" ] ; then
- # otbgui scripts are added but are unusable
- rm $PKG/usr/bin/otbgui_*
-fi
-
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-mkdir -p $PKG/etc/profile.d
-cat > $PKG/etc/profile.d/otb.csh << EOF
-#!/bin/csh
-# Orfeo ToolBox applications path
-setenv OTB_APPLICATION_PATH /usr/lib${LIBDIRSUFFIX}/otb/applications
-EOF
-cat > $PKG/etc/profile.d/otb.sh << EOF
-#!/bin/sh
-# Orfeo ToolBox applications path
-export OTB_APPLICATION_PATH=/usr/lib${LIBDIRSUFFIX}/otb/applications
-EOF
-
-chmod 0755 $PKG/etc/profile.d/otb.csh
-chmod 0755 $PKG/etc/profile.d/otb.sh
+
+# Experimental: remove post-install scripts from a no-standard path
+# These scripts should be used to reconfigure the environment if various versions of OTB
+# are installed and/or set the correct Python path in some Linux distributions
+# They do not seem essential and their launch might cause unexpected issues with
+# pkgtool. I think we do not need this
+cp -a $PKG/usr/LICENSE .
+rm -f $PKG/usr/README \
+ $PKG/usr/otbenv.profile \
+ $PKG/usr/recompile_bindings.sh \
+ $PKG/usr/LICENSE
+
+# This no standard directory includes three post-install scripts. We do need them?
+# At the moment we move this directory in /usr/share/otb: users would require these
+# tools for singular contexts
+mv $PKG/usr/tools $PKG/usr/share/otb
+
+# Remove no standard directory /usr/share/doc with superfluous content
+rm -rf $PKG/usr/share/doc
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- README.md RELEASE_NOTES.txt \
+ README.md RELEASE_NOTES.txt LICENSE \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-if [ "$MONTEVERDI" = "ON" ] ; then
- cat $CWD/doinst.sh > $PKG/install/doinst.sh
-fi
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/OTB/OTB.info b/gis/OTB/OTB.info
index cdd2fb5c32..7322b947bd 100644
--- a/gis/OTB/OTB.info
+++ b/gis/OTB/OTB.info
@@ -1,10 +1,10 @@
PRGNAM="OTB"
-VERSION="6.6.1"
+VERSION="9.0.0"
HOMEPAGE="http://orfeo-toolbox.org/otb/"
-DOWNLOAD="https://github.com/orfeotoolbox/OTB/archive/6.6.1/OTB-6.6.1.tar.gz"
-MD5SUM="caea3ee13ba1252045fd7be002defe18"
+DOWNLOAD="https://github.com/orfeotoolbox/OTB/archive/9.0.0/OTB-9.0.0.tar.gz"
+MD5SUM="b710e6eee6f49d6bae75541fc242cbbb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="blas gdal ITK OpenSceneGraph muParser python3 ossim Shark tinyxml"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="gdal ITK libkml libsvm muParser muparserx Shark tinyxml"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/OTB/README b/gis/OTB/README
index 456ea30da3..1f72146696 100644
--- a/gis/OTB/README
+++ b/gis/OTB/README
@@ -1,20 +1,33 @@
-ORFEO Toolbox (OTB) is an open source library of image processing algorithms.
-OTB is based on the medical image processing library ITK and offers particular
-functionalities for remote sensing image processing in general and for high
-spatial resolution images in particular. Targeted algorithms for high
-resolution optical images (Pleiades, SPOT, QuickBird, WorldView, Landsat,
-Ikonos), hyperspectral sensors (Hyperion) or SAR (TerraSarX, ERS, Palsar) are
-available.
+ORFEO Toolbox (OTB) is an open source library of image processing
+algorithms.
+OTB is based on the medical image processing library ITK and offers
+particular functionalities for remote sensing image processing in
+general and for high spatial resolution images in particular. Targeted
+algorithms for high resolution optical images (Pleiades, SPOT,
+QuickBird, WorldView, Landsat, Ikonos), hyperspectral sensors
+(Hyperion) or SAR (TerraSarX, ERS, Palsar) are available.
-Monteverdi, a satellite image viewer with access to OTB processing, will also
-be built if MONTEVERDI=ON is passed to the script. This will require the qwt
-package to be installed.
-
-A QT application launcher will be built by default. Set QTGUI=OFF to disable
-it (note that disabling Qt support will also disable Monteverdi even if
-MONTEVERDI is set to ON).
-
-OTB may use the following optional dependencies: opencv (use OPENCV=ON).
+All of OTB's algorithms are accessible from other platforms like
+QGIS, Python, command line, C++, and Monteverdi. Monteverdi is a
+satellite image viewer with access to OTB processing. Until version
+8.1.2, Monteverdi could be included in a single build, but since 9.0.0
+version the image viewer is available only a standalone application.
+If you are interested to the integrated graphic interface, you must
+refer to OTB-legacy package (available in this repository) otherwise
+you have to build and install separately the package Monteverdi.
OTB will be built with support for the following packages if they are
-available at compile time: numpy and numpy3.
+available at compile time: numpy3.
+
+Warnings
+1. The build fails if Shark is not built against the optional
+ dependency cblas that gives the support to ATLAS.
+2. OTB sources in lastest version has changed in several areas and the
+ build could require - at least in some Linux distributions - the
+ launch of post-install scripts to patch the default settings and
+ adapt them to the system environment. This could not be needed in
+ Slackware, but the upgrade is not sufficiently tested in runtime, so
+ please report any issues to the maintainer.
+ You might also consider the installation of the legacy version that
+ is provided by the slackbuild OTB-legacy (v. 8.1.2) that replaces
+ the old OTB package.
diff --git a/gis/OTB/otbSpatialReference.cxx.patch b/gis/OTB/otbSpatialReference.cxx.patch
new file mode 100644
index 0000000000..ee18d7ec78
--- /dev/null
+++ b/gis/OTB/otbSpatialReference.cxx.patch
@@ -0,0 +1,8 @@
+--- ./Modules/Core/Adapters/GdalAdapters/src/otbSpatialReference.cxx
++++ ./Modules/Core/Adapters/GdalAdapters/src/otbSpatialReference.cxx
+@@ -31,4 +31,5 @@
+ #include <sstream>
+ #include <stdexcept>
++#include <cassert>
+
+ namespace otb
diff --git a/gis/OWSLib/OWSLib.SlackBuild b/gis/OWSLib/OWSLib.SlackBuild
index dd7a78bfde..afdb8084e9 100644
--- a/gis/OWSLib/OWSLib.SlackBuild
+++ b/gis/OWSLib/OWSLib.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for OWSLib
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=OWSLib
-VERSION=${VERSION:-0.18.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.30.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -68,21 +76,22 @@ find -L . \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-python setup.py install --root=$PKG
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
+
+if [ -x /usr/bin/python3.11 ]; then
+ patch -p1 < $CWD/pytz-not-required.patch
fi
+python3 setup.py install --root=$PKG
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGES.rst LICENSE README.rst $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS.rst LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/OWSLib/OWSLib.info b/gis/OWSLib/OWSLib.info
index 4f43a56e09..09f5fb5be7 100644
--- a/gis/OWSLib/OWSLib.info
+++ b/gis/OWSLib/OWSLib.info
@@ -1,10 +1,10 @@
PRGNAM="OWSLib"
-VERSION="0.18.0"
+VERSION="0.30.0"
HOMEPAGE="https://pypi.python.org/pypi/OWSLib/"
-DOWNLOAD="https://github.com/geopython/OWSLib/archive/0.18.0/OWSLib-0.18.0.tar.gz"
-MD5SUM="56f0d70d6e599d7356f03d898d6b8d59"
+DOWNLOAD="https://github.com/geopython/OWSLib/archive/0.30.0/OWSLib-0.30.0.tar.gz"
+MD5SUM="c2ba9d5fd13b4c8795153e89c0c65322"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python-dateutil pytz lxml six"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="python3-dateutil pytz python3-lxml"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/OWSLib/pytz-not-required.patch b/gis/OWSLib/pytz-not-required.patch
new file mode 100644
index 0000000000..03471b2d4d
--- /dev/null
+++ b/gis/OWSLib/pytz-not-required.patch
@@ -0,0 +1,13 @@
+python-pytz has been removed from Slackware -current because
+not needed with Python 3.11
+This patch prevents pip check from indicating the lack of
+pytz as dependency required by OWSLib in -current
+--- ./requirements.txt 2024-04-05 23:42:52.864498274 +0200
++++ ./requirements.txt 2024-04-05 23:43:13.322499915 +0200
+@@ -1,6 +1,5 @@
+ dataclasses; python_version < '3.7'
+ lxml
+ python-dateutil>=1.5
+-pytz
+ pyyaml
+ requests>=1.0
diff --git a/gis/SFCGAL-legacy/README b/gis/SFCGAL-legacy/README
new file mode 100644
index 0000000000..b2f3738c10
--- /dev/null
+++ b/gis/SFCGAL-legacy/README
@@ -0,0 +1,16 @@
+SFCGAL is a C++ wrapper library around CGAL, written with the aim of
+supporting ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D
+operations.
+
+OpenSceneGraph is an optional dependency enabled by default if found
+in your system. If you do not need this, pass the environment variable
+to the script:
+ OSG=no ./SFCGAL.SlackBuild
+
+SFCGAL-legacy builds version 1.3.9, the lastest compatible with the
+package CGAL available in this repository. If you keep this version
+of the dependency, you have to install this package.
+
+If you have CGAL5 installed in your system, this package is not
+compatible and you must refer to the slackbuild SFCGAL based on
+greater versions and also available in this repository.
diff --git a/gis/SFCGAL-legacy/SFCGAL-legacy.SlackBuild b/gis/SFCGAL-legacy/SFCGAL-legacy.SlackBuild
new file mode 100644
index 0000000000..565484f417
--- /dev/null
+++ b/gis/SFCGAL-legacy/SFCGAL-legacy.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/bash
+
+# SlackBuild script for SFCGAL-legacy
+
+# Copyright 2023 Giancarlo Dessi, Cagliari, IT
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=SFCGAL-legacy
+VERSION=${VERSION:-1.3.9}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+SRCNAM=SFCGAL
+
+WITHOSG="";
+if [[ -f /usr/bin/osgviewer ]] ; then
+ WITHOSG="-DSFCGAL_WITH_OSG=ON" ; [ "${OSG:-yes}" = "no" ] && WITHOSG="";
+fi
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+# This package depends on versions of GCAL earlier than 5.2
+# The build with greater versions starts fine but it will fail during the
+# compilation so we need to detect if there are any incompatible
+# installations in the system
+if [[ -d /usr/lib${LIBDIRSUFFIX}/cmake/CGAL ]] ; then
+ echo "************************* WARNING **************************";
+ echo " CGAL5 found in your system!";
+ echo " SFCGAL-legacy depends on earlier versions of CGAL.";
+ echo "";
+ echo " Please build this package by using the slackbuild SFCGAL";
+ echo " instead of SFCGAL-legacy ad also available in SBo.";
+ echo " This script will be stopped.";
+ echo "************************************************************";
+ exit 1;
+fi
+
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+rm -rf $TMP/$SRCNAM-v$VERSION
+cd $TMP
+tar xvf $CWD/$SRCNAM-v$VERSION.tar.gz
+cd $SRCNAM-v$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT=1" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+ -DSFCGAL_BUILD_EXAMPLES=OFF \
+ -DSFCGAL_BUILD_TESTS=OFF \
+ $WITHOSG \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS LICENSE NEWS README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/SFCGAL-legacy/SFCGAL-legacy.info b/gis/SFCGAL-legacy/SFCGAL-legacy.info
new file mode 100644
index 0000000000..e94d01e0b6
--- /dev/null
+++ b/gis/SFCGAL-legacy/SFCGAL-legacy.info
@@ -0,0 +1,10 @@
+PRGNAM="SFCGAL-legacy"
+VERSION="1.3.9"
+HOMEPAGE="https://oslandia.gitlab.io/SFCGAL/"
+DOWNLOAD="https://gitlab.com/Oslandia/SFCGAL/-/archive/v1.3.9/SFCGAL-v1.3.9.tar.gz"
+MD5SUM="99c08d524aff93be0d30a48d821783ae"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="CGAL"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/geoserver-wps/slack-desc b/gis/SFCGAL-legacy/slack-desc
index f9125cc6cb..30ee9d1baa 100644
--- a/gis/geoserver-wps/slack-desc
+++ b/gis/SFCGAL-legacy/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-geoserver-wps: geoserver-wps (WPS support for GeoServer)
-geoserver-wps:
-geoserver-wps: The WPS plugin adds Web Processing Service support to GeoServer.
-geoserver-wps:
-geoserver-wps:
-geoserver-wps:
-geoserver-wps:
-geoserver-wps:
-geoserver-wps:
-geoserver-wps:
-geoserver-wps:
+SFCGAL-legacy: SFCGAL-legacy (C++ wrapper around CGAL)
+SFCGAL-legacy:
+SFCGAL-legacy: SFCGAL is a C++ wrapper library around CGAL, written with the aim of
+SFCGAL-legacy: supporting ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D
+SFCGAL-legacy: operations.
+SFCGAL-legacy:
+SFCGAL-legacy: This package contains the version 1.3.9, the lastest depending on
+SFCGAL-legacy: old versions of CGAL (earlier than 5)
+SFCGAL-legacy:
+SFCGAL-legacy: homepage: http://www.sfcgal.org
+SFCGAL-legacy:
diff --git a/gis/SFCGAL/README b/gis/SFCGAL/README
index 8826780db4..15c15457ce 100644
--- a/gis/SFCGAL/README
+++ b/gis/SFCGAL/README
@@ -1,4 +1,21 @@
-SFCGAL is a C++ wrapper library around CGAL, written with the aim of supporting
-ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D operations.
+SFCGAL is a C++ wrapper library around CGAL, written with the aim of
+supporting ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D
+operations.
-OpenSceneGraph is an optional dependency.
+This package contains a version of SFCGAL greater than 1.4.0.
+
+OpenSceneGraph is an optional dependency enabled by default if found
+in your system. If you do not need this, pass the environment variable
+to the script:
+ OSG=no ./SFCGAL.SlackBuild
+
+Warning.
+Since version 1.4.1, SFCGAL depends on CGAL version 5.3 or greater.
+To install or upgrade SFCGAL you must uninstall the package CGAL
+(based on version 4.x) then install CGAL5.
+
+CGAL5 conflicts with CGAL, hence they cannot be installed at the same
+time. Since other packages depends on CGAL versions earlier than 5.0
+you may want to keep a version supported by these. In this case, you
+have to install SFCGAL-legacy, also available in this repository and
+depending on CGAL version 4.x.
diff --git a/gis/SFCGAL/SFCGAL.SlackBuild b/gis/SFCGAL/SFCGAL.SlackBuild
index fb8e0f06bf..034f6838bc 100644
--- a/gis/SFCGAL/SFCGAL.SlackBuild
+++ b/gis/SFCGAL/SFCGAL.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for SFCGAL
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2023 Giancarlo Dessi, Cagliari, IT
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,10 +25,18 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=SFCGAL
-VERSION=${VERSION:-1.3.7}
+VERSION=${VERSION:-1.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+WITHOSG="";
+if [[ -f /usr/bin/osgviewer ]] ; then
+ WITHOSG="-DSFCGAL_WITH_OSG=ON" ; [ "${OSG:-yes}" = "no" ] && WITHOSG="";
+fi
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +46,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -60,10 +73,10 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
+rm -rf $TMP/$PRGNAM-v$VERSION
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-v$VERSION.tar.gz
+cd $PRGNAM-v$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -79,10 +92,12 @@ cd build
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+ -DCGAL_USE_AUTOLINK=ON \
-DSFCGAL_BUILD_EXAMPLES=OFF \
-DSFCGAL_BUILD_TESTS=OFF \
+ $WITHOSG \
..
-
+ make
make install DESTDIR=$PKG
cd ..
@@ -99,4 +114,4 @@ mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/SFCGAL/SFCGAL.info b/gis/SFCGAL/SFCGAL.info
index bf539dd8d3..fe4b2399a9 100644
--- a/gis/SFCGAL/SFCGAL.info
+++ b/gis/SFCGAL/SFCGAL.info
@@ -1,10 +1,10 @@
PRGNAM="SFCGAL"
-VERSION="1.3.7"
-HOMEPAGE="http://www.sfcgal.org"
-DOWNLOAD="https://github.com/Oslandia/SFCGAL/archive/v1.3.7/SFCGAL-1.3.7.tar.gz"
-MD5SUM="5b0c2645ce4282a1b73012e9a89e84b6"
+VERSION="1.5.0"
+HOMEPAGE="https://sfcgal.gitlab.io/SFCGAL/"
+DOWNLOAD="https://gitlab.com/sfcgal/SFCGAL/-/archive/v1.5.0/SFCGAL-v1.5.0.tar.gz"
+MD5SUM="65ce9df8c6168b8498c39b35487b5f66"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="CGAL"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="CGAL5"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/SFCGAL/slack-desc b/gis/SFCGAL/slack-desc
index 6d285edd38..2499033d78 100644
--- a/gis/SFCGAL/slack-desc
+++ b/gis/SFCGAL/slack-desc
@@ -12,7 +12,7 @@ SFCGAL: SFCGAL is a C++ wrapper library around CGAL, written with the aim of
SFCGAL: supporting ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D
SFCGAL: operations.
SFCGAL:
-SFCGAL:
+SFCGAL: This package contains a version of SFCGAL greater than 1.4.0
SFCGAL:
SFCGAL: homepage: http://www.sfcgal.org
SFCGAL:
diff --git a/gis/Shapely/Shapely.info b/gis/Shapely/Shapely.info
deleted file mode 100644
index d663c65c09..0000000000
--- a/gis/Shapely/Shapely.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="Shapely"
-VERSION="1.6.4"
-HOMEPAGE="https://github.com/Toblerity/Shapely"
-DOWNLOAD="https://github.com/Toblerity/Shapely/archive/1.6.4/Shapely-1.6.4.tar.gz"
-MD5SUM="cf6f7abde575bb75ce0b39aaf061930f"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geos python3"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/Shapely/slack-desc b/gis/Shapely/slack-desc
deleted file mode 100644
index 04c91b0fa0..0000000000
--- a/gis/Shapely/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-Shapely: Shapely (geometric objects, predicates, and operations in Python)
-Shapely:
-Shapely: Shapely is a BSD-licensed Python package for manipulation and analysis
-Shapely: of planar geometric objects. It is based on the widely deployed GEOS
-Shapely: (the engine of PostGIS) and JTS (from which GEOS is ported) libraries.
-Shapely: Shapely is not concerned with data formats or coordinate systems, but
-Shapely: can be readily integrated with packages that are.
-Shapely:
-Shapely: Homepage: https://pypi.python.org/pypi/Shapely/
-Shapely:
-Shapely:
diff --git a/gis/TauDEM/README b/gis/TauDEM/README
index a8a4ed9998..b17a7d25bf 100644
--- a/gis/TauDEM/README
+++ b/gis/TauDEM/README
@@ -1,20 +1,22 @@
-TauDEM (Terrain Analysis Using Digital Elevation Models) is a suite of Digital
-Elevation Model (DEM) tools for the extraction and analysis of hydrologic
-information from topography as represented by a DEM. TauDEM provides the
-following capability:
+TauDEM (Terrain Analysis Using Digital Elevation Models) is a suite of
+Digital Elevation Model (DEM) tools for the extraction and analysis of
+hydrologic information from topography as represented by a DEM. TauDEM
+provides the following capability:
-* Development of hydrologically correct (pit removed) DEMs using the flooding
- approach
+* Development of hydrologically correct (pit removed) DEMs using the
+ flooding approach
* Calculates flow paths (directions) and slopes
-* Calculates contributing area using single and multiple flow direction methods
-* Multiple methods for the delineation of stream networks including topographic
- form-based methods sensitive to spatially variable drainage density
-* Objective methods for determination of the channel network delineation
- threshold based on stream drops
-* Delineation of watersheds and subwatersheds draining to each stream segment
- and association between watershed and segment attributes for setting up
- hydrologic models
+* Calculates contributing area using single and multiple flow direction
+ methods
+* Multiple methods for the delineation of stream networks including
+ topographic form-based methods sensitive to spatially variable
+ drainage density
+* Objective methods for determination of the channel network
+ delineation threshold based on stream drops
+* Delineation of watersheds and subwatersheds draining to each stream
+ segment and association between watershed and segment attributes for
+ setting up hydrologic models
* Specialized functions for terrain analysis
-Note TauDEM also works fine with MPICH, so if you have it installed it is not
-necessary to install OpenMPI.
+Note TauDEM also works fine with MPICH, so if you have it installed it
+is not necessary to install OpenMPI.
diff --git a/gis/TauDEM/TauDEM.SlackBuild b/gis/TauDEM/TauDEM.SlackBuild
index fd7637f8a9..f685b8e3fb 100644
--- a/gis/TauDEM/TauDEM.SlackBuild
+++ b/gis/TauDEM/TauDEM.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for TauDEM
@@ -22,27 +22,37 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=TauDEM
PACKAGENAME=TauDEM-5MF.0.0
VERSION=${VERSION:-5.2.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -92,4 +102,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/TauDEM/TauDEM.info b/gis/TauDEM/TauDEM.info
index 13517010cb..104b0a275c 100644
--- a/gis/TauDEM/TauDEM.info
+++ b/gis/TauDEM/TauDEM.info
@@ -1,7 +1,7 @@
PRGNAM="TauDEM"
VERSION="5.2.0"
HOMEPAGE="http://hydrology.usu.edu/taudem/taudem5/index.html"
-DOWNLOAD="https://github.com/dtarb/TauDEM/archive/5MF.0.0.tar.gz"
+DOWNLOAD="https://github.com/dtarb/TauDEM/archive/5MF.0.0/TauDEM-5MF.0.0.tar.gz"
MD5SUM="a2147f6bf880251892aa4ae54886c30d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
diff --git a/gis/basemap/README b/gis/basemap/README
deleted file mode 100644
index 1f96d1c8ac..0000000000
--- a/gis/basemap/README
+++ /dev/null
@@ -1,2 +0,0 @@
-Plot on map projections (with coastlines and political boundaries)
-using matplotlib.
diff --git a/gis/basemap/basemap.info b/gis/basemap/basemap.info
deleted file mode 100644
index f0db4505a0..0000000000
--- a/gis/basemap/basemap.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="basemap"
-VERSION="1.2.1"
-HOMEPAGE="https://github.com/matplotlib/basemap/"
-DOWNLOAD="https://github.com/matplotlib/basemap/archive/v1.2.1rel/basemap-1.2.1rel.tar.gz"
-MD5SUM="b3c4c1292b36abac27050eb67ada914e"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geos matplotlib pyproj pyshp"
-MAINTAINER="Cristiano Urban"
-EMAIL="cristiano.urban.slack@gmail.com"
diff --git a/gis/basemap/slack-desc b/gis/basemap/slack-desc
deleted file mode 100644
index ef632ef9de..0000000000
--- a/gis/basemap/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-basemap: basemap (matplotlib library)
-basemap:
-basemap: Plot on map projections (with coastlines and political boundaries)
-basemap: using matplotlib.
-basemap:
-basemap: Homepage: https://github.com/matplotlib/basemap/
-basemap:
-basemap:
-basemap:
-basemap:
-basemap:
diff --git a/gis/cartopy/cartopy.info b/gis/cartopy/cartopy.info
deleted file mode 100644
index aa20ea5dba..0000000000
--- a/gis/cartopy/cartopy.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="cartopy"
-VERSION="0.17.0"
-HOMEPAGE="https://scitools.org.uk/cartopy/"
-DOWNLOAD="https://github.com/SciTools/cartopy/archive/v0.17.0/cartopy-0.17.0.tar.gz"
-MD5SUM="9fe063295a9fd854803d3c01a60720d0"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geos matplotlib proj pyshp scipy Shapely"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/cligj/cligj.SlackBuild b/gis/cligj/cligj.SlackBuild
index a839decb66..95113af96f 100644
--- a/gis/cligj/cligj.SlackBuild
+++ b/gis/cligj/cligj.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for cligj
-# Copyright 2015-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2015-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=cligj
-VERSION=${VERSION:-0.5.0}
+VERSION=${VERSION:-0.7.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,10 +81,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python setup.py install --root=$PKG
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
-fi
+python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
@@ -86,4 +93,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/cligj/cligj.info b/gis/cligj/cligj.info
index e0b926dbb9..4287ba4f05 100644
--- a/gis/cligj/cligj.info
+++ b/gis/cligj/cligj.info
@@ -1,8 +1,8 @@
PRGNAM="cligj"
-VERSION="0.5.0"
+VERSION="0.7.1"
HOMEPAGE="https://github.com/mapbox/cligj"
-DOWNLOAD="https://github.com/mapbox/cligj/archive/0.5.0/cligj-0.5.0.tar.gz"
-MD5SUM="975f62cec147f68c74be8bc4b70faa14"
+DOWNLOAD="https://github.com/mapbox/cligj/archive/0.7.1/cligj-0.7.1.tar.gz"
+MD5SUM="fe4b6452e96e42254c0e3d4416e19851"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="click"
diff --git a/gis/eccodes/README b/gis/eccodes/README
new file mode 100644
index 0000000000..b592d858eb
--- /dev/null
+++ b/gis/eccodes/README
@@ -0,0 +1,21 @@
+ecCodes is a package developed by ECMWF which provides an application
+programming interface and a set of tools for decoding and encoding
+messages in the following formats:
+
+ WMO FM-92 GRIB edition 1 and edition 2
+ WMO FM-94 BUFR edition 3 and edition 4
+ WMO GTS abbreviated header (only decoding).
+
+A useful set of command line tools provide quick access to the messages.
+C, Fortran 90 and Python interfaces provide access to the main ecCodes
+functionality.
+
+ecCodes is an evolution of GRIB-API. It is designed to provide the
+user with a simple set of functions to access data from several
+formats with a key/value approach.
+
+netcdf is an optional dependency and support will be compiled in if it
+is installed.
+
+NOTE: for 32bit platforms, the version is locked to 2.29.0 as 32 bit
+support was dropped in version 2.30.0 and above.
diff --git a/gis/eccodes/eccodes.SlackBuild b/gis/eccodes/eccodes.SlackBuild
new file mode 100644
index 0000000000..a1b6a4602c
--- /dev/null
+++ b/gis/eccodes/eccodes.SlackBuild
@@ -0,0 +1,113 @@
+#!/bin/bash
+
+# Slackware build script for eccodes
+
+# Copyright 2023-2024 Gregory J. L. Tourte <artourter@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=eccodes
+VERSION=${VERSION:-2.35.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+if [[ ${TESTBUILD:='NO'} == 'NO' ]]; then
+ TESTBUILDFLAGS='-DENABLE_TESTS=OFF'
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION-Source
+tar xvf $CWD/$PRGNAM-$VERSION-Source.tar.gz
+cd $PRGNAM-$VERSION-Source
+chown -R root:root .
+find -L . \
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -Deccodes_FULL_INSTALL_LIB_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DENABLE_AEC=ON \
+ -DENABLE_PNG=ON \
+ -DENABLE_ECCODES_OMP_THREADS=ON \
+ $TESTBUILDFLAGS \
+ -DCMAKE_BUILD_TYPE=Release \
+ ..
+
+ make
+ [[ $TESTBUILD == "YES" ]] && make test
+ make install/strip DESTDIR=$PKG
+cd ..
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+install -m 644 \
+ AUTHORS ChangeLog LICENSE NEWS NOTICE README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/eccodes/eccodes.info b/gis/eccodes/eccodes.info
new file mode 100644
index 0000000000..b3ad7fd648
--- /dev/null
+++ b/gis/eccodes/eccodes.info
@@ -0,0 +1,10 @@
+PRGNAM="eccodes"
+VERSION="2.35.0"
+HOMEPAGE="https://confluence.ecmwf.int/display/ECC"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://confluence.ecmwf.int/download/attachments/45757960/eccodes-2.35.0-Source.tar.gz"
+MD5SUM_x86_64="39babf438f2e36641e78322ece62137a"
+REQUIRES="libaec"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/eccodes/slack-desc b/gis/eccodes/slack-desc
new file mode 100644
index 0000000000..b176003cbe
--- /dev/null
+++ b/gis/eccodes/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+eccodes: eccodes (ECMWF encoding/decoding library for GRIB, BUFR and GTS)
+eccodes:
+eccodes: ecCodes is a package developed by ECMWF which provides an application
+eccodes: programming interface and a set of tools for decoding and encoding
+eccodes: messages WMO FM-92 GRIB edition 1 and edition 2, WMO FM-94 BUFR
+eccodes: edition 3 and edition 4, and WMO GTS abbreviated header (only
+eccodes: decoding).
+eccodes:
+eccodes: ecCodes is an evolution of GRIB-API. It is designed to provide the
+eccodes: user with a simple set of functions to access data from several
+eccodes: formats with a key/value approach.
diff --git a/gis/foxtrotgps/foxtrotgps-1.2.2-fix-some-receivers.patch.gz b/gis/foxtrotgps/foxtrotgps-1.2.2-fix-some-receivers.patch.gz
new file mode 100644
index 0000000000..e67180d1ed
--- /dev/null
+++ b/gis/foxtrotgps/foxtrotgps-1.2.2-fix-some-receivers.patch.gz
Binary files differ
diff --git a/gis/foxtrotgps/foxtrotgps-1.2.2-gcc10.patch.gz b/gis/foxtrotgps/foxtrotgps-1.2.2-gcc10.patch.gz
new file mode 100644
index 0000000000..da38c23f78
--- /dev/null
+++ b/gis/foxtrotgps/foxtrotgps-1.2.2-gcc10.patch.gz
Binary files differ
diff --git a/gis/foxtrotgps/foxtrotgps-1.2.2-gpsd-api9.patch.gz b/gis/foxtrotgps/foxtrotgps-1.2.2-gpsd-api9.patch.gz
new file mode 100644
index 0000000000..6e8471a93d
--- /dev/null
+++ b/gis/foxtrotgps/foxtrotgps-1.2.2-gpsd-api9.patch.gz
Binary files differ
diff --git a/gis/foxtrotgps/foxtrotgps-gpsd-3.18.patch b/gis/foxtrotgps/foxtrotgps-gpsd-3.18.patch
deleted file mode 100644
index db19d19a28..0000000000
--- a/gis/foxtrotgps/foxtrotgps-gpsd-3.18.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- foxtrotgps-1.2.1/src/gps_functions.c.orig 2018-10-09 17:00:10.297646701 +0000
-+++ foxtrotgps-1.2.1/src/gps_functions.c 2018-10-09 17:00:43.751114273 +0000
-@@ -738,7 +738,7 @@
- if (!libgps_initialized)
- return FALSE;
-
-- ret = gps_read(&libgps_gpsdata);
-+ ret = gps_read(&libgps_gpsdata, NULL, 0);
- /* Note that gps_read() will never actually return 0
- (zero-length reads are converted internally to a -1 return,
- since they mean that the connection to the daemon has closed),
diff --git a/gis/foxtrotgps/foxtrotgps.SlackBuild b/gis/foxtrotgps/foxtrotgps.SlackBuild
index f40d7d5127..02d2a1c653 100644
--- a/gis/foxtrotgps/foxtrotgps.SlackBuild
+++ b/gis/foxtrotgps/foxtrotgps.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for foxtrotgps
@@ -24,10 +24,13 @@
# Modified by Mario Preksavec <mario at slackware dot hr>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=foxtrotgps
-VERSION=${VERSION:-1.2.1}
+VERSION=${VERSION:-1.2.2}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -64,6 +74,10 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
+# thanks gentoo maintainers
+zcat $CWD/$PRGNAM-$VERSION-gpsd-api9.patch.gz | patch -p1
+zcat $CWD/$PRGNAM-$VERSION-gcc10.patch.gz | patch -p1
+zcat $CWD/$PRGNAM-$VERSION-fix-some-receivers.patch.gz | patch -p1
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -71,9 +85,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Patch ripped off from Arch (thanks!)
-patch -p1 < $CWD/foxtrotgps-gpsd-3.18.patch
-
# "--with-gconf-source" requires this, it will put all files in the package
mkdir -p $PKG/etc/gconf/gconf.xml.defaults
@@ -113,4 +124,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/foxtrotgps/foxtrotgps.info b/gis/foxtrotgps/foxtrotgps.info
index e3b03d6e4b..cd673a3b38 100644
--- a/gis/foxtrotgps/foxtrotgps.info
+++ b/gis/foxtrotgps/foxtrotgps.info
@@ -1,8 +1,8 @@
PRGNAM="foxtrotgps"
-VERSION="1.2.1"
+VERSION="1.2.2"
HOMEPAGE="https://www.foxtrotgps.org/"
-DOWNLOAD="https://www.foxtrotgps.org/releases/foxtrotgps-1.2.1.tar.xz"
-MD5SUM="b4042572edbbad13db6bc90eb9a7f11b"
+DOWNLOAD="https://www.foxtrotgps.org/releases/foxtrotgps-1.2.2.tar.xz"
+MD5SUM="3a7e7b94202134b51b11dcb80734eb7f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="gpsd"
diff --git a/gis/gdal/README b/gis/gdal/README
index c959862f44..ba3dc22097 100644
--- a/gis/gdal/README
+++ b/gis/gdal/README
@@ -10,9 +10,16 @@ provides a similar capability for simple features vector data.
The following optional requirements are detected automatically:
- cfitsio, freexl, hdf, hdf5, libkml, libwebp, netcdf,
- postgresql, python3, xerces-c
+ hdf, postgresql, SFCGAL, libheif
To enable OpenCL GPU-accelerated performance, specify the option
-OPENCL=yes (requires opencl-headers to build, and either nvidia-driver
-or amd-app-sdk with suitable GPU hardware to run).
+OPENCL=yes (requires either nvidia-driver or amd-app-sdk with
+suitable GPU hardware to run).
+
+To build JAVA bindings, specify JAVA=yes (it requires a java JDK and
+ant).
+
+By default, the script does not build nor run the tests. You can use the
+option TESTBUILD=YES to build and run the tests before the make install
+part. Tests are only present for the java bindings to this options does
+nothing is the java bindings are not build.
diff --git a/gis/gdal/gdal.SlackBuild b/gis/gdal/gdal.SlackBuild
index 2973ebf43c..b772003aad 100644
--- a/gis/gdal/gdal.SlackBuild
+++ b/gis/gdal/gdal.SlackBuild
@@ -1,8 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for GDAL
# Copyright 2009 Marco Cecchetti <mrc.ild@gmail.com>
+# Copyright 2010-2018 David Spencer <baildon.research@googlemail.com>
+# Copyright 2019-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2024 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +25,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Maintained by David Spencer <baildon.research@googlemail.com>
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gdal
-VERSION=${VERSION:-2.2.4}
+VERSION=${VERSION:-3.8.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +42,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -58,6 +67,10 @@ fi
set -e
+if [[ ${TESTBUILD:='NO'} == 'NO' ]]; then
+ TESTBUILDFLAGS='-DBUILD_TESTING=OFF'
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -66,104 +79,104 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-# OpenCL, webp, Spatialite and Grass support need special arrangements.
-# Everything else is handled automatically by configure.
WITHLIST=""
# Request OpenCL support:
if [ ${OPENCL:-no} = "yes" ]; then
- WITHLIST+=" --with-opencl"
-fi
-
-# Request webp support if it's installed:
-if pkg-config --exists libwebp; then
- WITHLIST+=" --with-webp"
-fi
-
-# Spatialite support in gdal optionally has a circular dependency
-# via the postgis 'liblwgeom' library (postgis depends on gdal).
-# Here is an undocumented option to request Spatialite support,
-# if you promise to be careful :-)
-if pkg-config --exists spatialite; then
- if [ ${SPATIALITE:-no} = "yes" ]; then
- WITHLIST+=" --with-spatialite"
- fi
-fi
-
-# Also, enabling Grass support in gdal introduces a circular dependency,
-# so here is another undocumented option.
-if pkg-config --exists grass; then
- if [ ${GRASS:-no} = "yes" ]; then
- WITHLIST+=" --with-grass=$(pkg-config --variable=prefix grass)"
- fi
-fi
-
-# 12 bit JPEG support is handled by internal modified versions of libjpeg
-# and libtiff, but this can cause segfaults in other software linked against
-# the real libjpeg (eg. qgis calling qt). Enable JPEG12 only if you need it:
-if [ ${JPEG12:-no} = "yes" ]; then
- WITHLIST+=" --with-jpeg=internal"
+ WITHLIST+=" -DGDAL_USE_OPENCL=ON"
else
- WITHLIST+=" --with-jpeg=/usr/lib${LIBDIRSUFFIX}"
+ WITHLIST+=" -DGDAL_USE_OPENCL=OFF"
fi
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-static=no \
- --with-threads \
- --with-geos=yes \
- --with-libz=/usr/lib${LIBDIRSUFFIX} \
- --with-liblzma \
- --with-curl=/usr/bin/curl-config \
- --without-grib \
- --with-static-proj4 \
- --with-mysql \
- --with-python \
- --with-poppler \
- --with-libtiff=internal \
- --with-rename-internal-libtiff-symbols=yes \
- --with-geotiff=internal \
- --with-rename-internal-libgeotiff-symbols=yes \
- --with-jasper=no \
- $WITHLIST \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
-
-if $(python3 -c 'import sys' 2>/dev/null); then
- cd swig/python
- rm -rf build
- python3 setup.py build
- python3 setup.py install --root=$PKG --prefix=/usr
- cd - >/dev/null
+# Build JAVA bindings:
+if [ ${JAVA:-no} = "no" ]; then
+ WITHLIST+=" -DBUILD_JAVA_BINDINGS:BOOL=OFF"
fi
+mkdir build
+
+( cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_DATAROOTDIR=share \
+ -DCMAKE_INSTALL_MANDIR=man \
+ -DCMAKE_INSTALL_DOCDIR=doc/$PRGNAM-$VERSION \
+ -DBUILD_CSHARP_BINDINGS:BOOL=OFF \
+ -DBUILD_PYTHON_BINDINGS:BOOL=ON \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DGDAL_USE_ARCHIVE:BOOL=ON \
+ -DGDAL_USE_CFITSIO:BOOL=ON \
+ -DGDAL_USE_CRYPTOPP:BOOL=ON \
+ -DGDAL_USE_CURL:BOOL=ON \
+ -DGDAL_USE_EXPAT:BOOL=ON \
+ -DGDAL_USE_EXTERNAL_LIBS:BOOL=ON \
+ -DGDAL_USE_FREEXL:BOOL=ON \
+ -DGDAL_USE_GEOS:BOOL=ON \
+ -DGDAL_USE_GEOTIFF:BOOL=ON \
+ -DGDAL_USE_GEOTIFF_INTERNAL:BOOL=OFF \
+ -DGDAL_USE_GIF:BOOL=ON \
+ -DGDAL_USE_GIF_INTERNAL:BOOL=OFF \
+ -DGDAL_USE_HDF5:BOOL=ON \
+ -DGDAL_USE_ICONV:BOOL=ON \
+ -DGDAL_USE_JPEG:BOOL=ON \
+ -DGDAL_USE_JPEG12_INTERNAL:BOOL=ON \
+ -DGDAL_USE_JPEG_INTERNAL:BOOL=OFF \
+ -DGDAL_USE_JSONC:BOOL=ON \
+ -DGDAL_USE_JSONC_INTERNAL:BOOL=OFF \
+ -DGDAL_USE_LERC_INTERNAL:BOOL=ON \
+ -DGDAL_USE_LIBAEC:BOOL=ON \
+ -DGDAL_USE_LIBLZMA:BOOL=ON \
+ -DGDAL_USE_LIBXML2:BOOL=ON \
+ -DGDAL_USE_LZ4:BOOL=ON \
+ -DGDAL_USE_MYSQL:BOOL=ON \
+ -DGDAL_USE_NETCDF:BOOL=ON \
+ -DGDAL_USE_OPENCAD_INTERNAL:BOOL=ON \
+ -DGDAL_USE_OPENEXR:BOOL=ON \
+ -DGDAL_USE_OPENJPEG:BOOL=ON \
+ -DGDAL_USE_OPENSSL:BOOL=ON \
+ -DGDAL_USE_PCRE2:BOOL=ON \
+ -DGDAL_USE_PNG:BOOL=ON \
+ -DGDAL_USE_PNG_INTERNAL:BOOL=OFF \
+ -DGDAL_USE_PODOFO:BOOL=ON \
+ -DGDAL_USE_POPPLER:BOOL=ON \
+ -DGDAL_USE_PUBLICDECOMPWT:BOOL=OFF \
+ -DGDAL_USE_QHULL_INTERNAL:BOOL=ON \
+ -DGDAL_USE_SHAPELIB_INTERNAL:BOOL=ON \
+ -DGDAL_USE_SPATIALITE:BOOL=ON \
+ -DGDAL_USE_SQLITE3:BOOL=ON \
+ -DGDAL_USE_TIFF:BOOL=ON \
+ -DGDAL_USE_TIFF_INTERNAL:BOOL=OFF \
+ -DGDAL_USE_WEBP:BOOL=ON \
+ -DGDAL_USE_XERCESC:BOOL=ON \
+ -DGDAL_USE_ZLIB:BOOL=ON \
+ -DGDAL_USE_ZLIB_INTERNAL:BOOL=OFF \
+ -DGDAL_USE_ZSTD:BOOL=ON \
+ $WITHLIST \
+ $TESTBUILDFLAGS \
+ -DCMAKE_BUILD_TYPE=Release \
+ ..
+ make
+ [[ $TESTBUILD == "YES" ]] && make test
+ make install/strip DESTDIR=$PKG
+)
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-make -f GNUmakefile -B man
-make install-man DESTDIR=$PKG
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-make -f GNUmakefile -B docs
-# --docdir is ignored :-(
-make install-docs DESTDIR=$PKG INST_DOCS=/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- COMMITERS HOWTO-RELEASE LICENSE.TXT NEWS PROVENANCE.TXT VERSION \
+ CITATION COMMITTERS HOWTO-RELEASE LICENSE.TXT MIGRATION_GUIDE.TXT NEWS.md PROVENANCE.TXT SECURITY.md VERSION \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -171,4 +184,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/gdal/gdal.info b/gis/gdal/gdal.info
index 0acaf326ff..70e6cd04c3 100644
--- a/gis/gdal/gdal.info
+++ b/gis/gdal/gdal.info
@@ -1,10 +1,10 @@
PRGNAM="gdal"
-VERSION="2.2.4"
+VERSION="3.8.5"
HOMEPAGE="https://www.gdal.org/"
-DOWNLOAD="https://download.osgeo.org/gdal/2.2.4/gdal-2.2.4.tar.xz"
-MD5SUM="51b1df61dbdf81473689fab3075e7a5e"
+DOWNLOAD="https://github.com/OSGeo/gdal/releases/download/v3.8.5/gdal-3.8.5.tar.gz"
+MD5SUM="1e192b50698c11c8a3c5c223343cb86d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="geos proj"
-MAINTAINER="David Spencer"
-EMAIL="baildon.research@googlemail.com"
+REQUIRES="xerces-c libkml netcdf libspatialite podofo libgeotiff"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/geogig-py/README b/gis/geogig-py/README
deleted file mode 100644
index c434f2de9d..0000000000
--- a/gis/geogig-py/README
+++ /dev/null
@@ -1,3 +0,0 @@
-geogig-py is a Python library to use GeoGig designed to provide access to all
-GeoGig functionality, so it can be used to script tasks or as the base library
-for a GeoGig client.
diff --git a/gis/geogig-py/geogig-py.SlackBuild b/gis/geogig-py/geogig-py.SlackBuild
deleted file mode 100644
index 9929fc7605..0000000000
--- a/gis/geogig-py/geogig-py.SlackBuild
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for geogig-py
-
-# Copyright 2015 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geogig-py
-VERSION=${VERSION:-1.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-unzip $CWD/$PRGNAM-$VERSION.zip
-cd $PRGNAM-$VERSION
-chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-python setup.py install --root=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
- grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geogig-py/geogig-py.info b/gis/geogig-py/geogig-py.info
deleted file mode 100644
index 403c0d79e3..0000000000
--- a/gis/geogig-py/geogig-py.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geogig-py"
-VERSION="1.0"
-HOMEPAGE="https://github.com/boundlessgeo/geogig-py"
-DOWNLOAD="https://pypi.python.org/packages/source/g/geogig-py/geogig-py-1.0.zip"
-MD5SUM="e7fb0dae9cb98f8d57ef3812afedbe53"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geogig geojson py4j Shapely"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geogig/README b/gis/geogig/README
deleted file mode 100644
index ac16a3fe0c..0000000000
--- a/gis/geogig/README
+++ /dev/null
@@ -1,7 +0,0 @@
-GeoGig is a distributed version control system specially designed to handle
-geospatial data. GeoGig draws inspiration from Git, but adapts its
-core concepts to handle versioning of spatial data. Users are able to import
-raw geospatial data (such as Shapefiles, PostGIS or SpatiaLite) into a
-repository where every change to the data is tracked. These changes can be
-viewed in a history, reverted to older versions, branched into sandboxed
-areas, merged back in or pushed to remote repositories.
diff --git a/gis/geogig/geogig.SlackBuild b/gis/geogig/geogig.SlackBuild
deleted file mode 100644
index 2abc31cb81..0000000000
--- a/gis/geogig/geogig.SlackBuild
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for geogig
-# Benjamin Trigona-Harany
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geogig
-VERSION=${VERSION:-1.0_beta1}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-API_DOCS=${API_DOCS:-no}
-GEOGIG_HOME=usr/share/$PRGNAM
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG/$GEOGIG_HOME $PKG/usr/bin $OUTPUT
-cd $TMP
-rm -rf $PRGNAM
-unzip $CWD/$PRGNAM-cli-app-$(echo $VERSION | tr '_' '-').zip
-cd $PRGNAM
-chown -R root:root .
-
-rm bin/*.bat
-cp -a bin repo $PKG/$GEOGIG_HOME/
-
-# set the path to the jar wrapper in the startup script
-ln -s /$GEOGIG_HOME/bin/geogig $PKG/usr/bin/geogig
-ln -s /$GEOGIG_HOME/bin/geogig-console $PKG/usr/bin/geogig-console
-ln -s /$GEOGIG_HOME/bin/geogig-gateway $PKG/usr/bin/geogig-gateway
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geogig/geogig.info b/gis/geogig/geogig.info
deleted file mode 100644
index a45b71d2c6..0000000000
--- a/gis/geogig/geogig.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geogig"
-VERSION="1.0_beta1"
-HOMEPAGE="http://geogig.org/"
-DOWNLOAD="http://downloads.sourceforge.net/project/geogig/geogig-1.0-beta1/geogig-cli-app-1.0-beta1.zip"
-MD5SUM="ffa3b7d22ee4e4d75c7203fbb73c19c1"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="jdk"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geogig/slack-desc b/gis/geogig/slack-desc
deleted file mode 100644
index 3883f9c16f..0000000000
--- a/gis/geogig/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-geogig: geogig (Distributed version control for geospatial data)
-geogig:
-geogig: geogig is a distributed version control system specially designed to
-geogig: handle geospatial data. geogig draws inspiration from Git, but adapts
-geogig: its core concepts to handle versioning of spatial data. Users are able
-geogig: to import raw geospatial data (such as Shapefiles, PostGIS or
-geogig: SpatiaLite) into a repository where every change to the data is
-geogig: tracked. These changes can be viewed in a history, reverted, branched
-geogig: into sandboxed areas, merged back in or pushed to remote repositories.
-geogig:
-geogig: Homepage: http://geogig.org
diff --git a/gis/geographiclib-python/README b/gis/geographiclib-python/README
index 92ec5525af..d52bc0737d 100644
--- a/gis/geographiclib-python/README
+++ b/gis/geographiclib-python/README
@@ -1,5 +1,5 @@
-This is a Python implementation of the geodesic routines in GeographicLib
-(http://geographiclib.sourceforge.net/).
+This is a Python implementation of the geodesic routines in
+GeographicLib (http://geographiclib.sourceforge.net/).
-Although it is maintained in conjunction with the larger C++ library, this
-Python package can be used independently.
+Although it is maintained in conjunction with the larger C++ library,
+this Python package can be used independently.
diff --git a/gis/geographiclib-python/geographiclib-python.SlackBuild b/gis/geographiclib-python/geographiclib-python.SlackBuild
index 73fa00c267..1f725b3a76 100644
--- a/gis/geographiclib-python/geographiclib-python.SlackBuild
+++ b/gis/geographiclib-python/geographiclib-python.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# SlackBuild for geographiclib-python
#
-# Copyright 2016-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2016-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -21,11 +21,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-SRCNAM=geographiclib
-PRGNAM=$SRCNAM-python
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=geographiclib-python
VERSION=${VERSION:-1.50}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=geographiclib
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,7 +82,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -84,4 +94,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/geographiclib-python/geographiclib-python.info b/gis/geographiclib-python/geographiclib-python.info
index 3ea0bec6a6..0ad4f5aa5f 100644
--- a/gis/geographiclib-python/geographiclib-python.info
+++ b/gis/geographiclib-python/geographiclib-python.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://files.pythonhosted.org/packages/source/g/geographiclib/geograp
MD5SUM="06cb02d3e8d84383f7d040c2df13e8ea"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3"
+REQUIRES=""
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/geojson/geojson.SlackBuild b/gis/geojson/geojson.SlackBuild
index d7fa754e1e..49408b8cbc 100644
--- a/gis/geojson/geojson.SlackBuild
+++ b/gis/geojson/geojson.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for geojson
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=geojson
-SRCNAM=python-$PRGNAM
VERSION=${VERSION:-2.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -60,9 +69,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,7 +79,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
@@ -86,4 +94,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/geojson/geojson.info b/gis/geojson/geojson.info
index 909f4bed55..e15d3db961 100644
--- a/gis/geojson/geojson.info
+++ b/gis/geojson/geojson.info
@@ -1,10 +1,10 @@
PRGNAM="geojson"
VERSION="2.5.0"
-HOMEPAGE="https://github.com/frewsxcv/python-geojson"
-DOWNLOAD="https://github.com/frewsxcv/python-geojson/archive/2.5.0/python-geojson-2.5.0.tar.gz"
-MD5SUM="ed2037daf7ba17fbbac2e22e8a7e4620"
+HOMEPAGE="https://github.com/jazzband/geojson"
+DOWNLOAD="https://github.com/jazzband/geojson/archive/2.5.0/geojson-2.5.0.tar.gz"
+MD5SUM="e1b3f4ee17f86e361123c3ef4c6fab41"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3"
+REQUIRES=""
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/geopandas/README b/gis/geopandas/README
new file mode 100644
index 0000000000..89fa9b47f9
--- /dev/null
+++ b/gis/geopandas/README
@@ -0,0 +1,5 @@
+GeoPandas is a project to add support for geographic data to
+pandas objects. It currently implements GeoSeries and GeoDataFrame
+types which are subclasses of pandas.Series and pandas.DataFrame
+respectively. GeoPandas objects can act on shapely geometry objects
+and perform geometric operations.
diff --git a/gis/pyshp/pyshp.SlackBuild b/gis/geopandas/geopandas.SlackBuild
index fb292ebe3d..3a5365c81d 100644
--- a/gis/pyshp/pyshp.SlackBuild
+++ b/gis/geopandas/geopandas.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for pyshp
+# SlackBuild script for geopandas
-# Copyright 2014-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2020-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=pyshp
-VERSION=${VERSION:-2.1.0}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=geopandas
+VERSION=${VERSION:-0.9.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,15 +79,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- changelog.txt README.md LICENSE.TXT \
+ LICENSE.txt README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -85,4 +91,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/geopandas/geopandas.info b/gis/geopandas/geopandas.info
new file mode 100644
index 0000000000..37aa54c930
--- /dev/null
+++ b/gis/geopandas/geopandas.info
@@ -0,0 +1,10 @@
+PRGNAM="geopandas"
+VERSION="0.9.0"
+HOMEPAGE="https://github.com/geopandas/geopandas"
+DOWNLOAD="https://github.com/geopandas/geopandas/archive/v0.9.0/geopandas-0.9.0.tar.gz"
+MD5SUM="d4f8ca22c882d80f40a48f4ac0983c7c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="geopy Fiona python3-psycopg2 python3-pyproj python3-pandas python3-shapely"
+MAINTAINER="Benjamin Trigona-Harany"
+EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/geoserver/slack-desc b/gis/geopandas/slack-desc
index 7780bc7bd7..50ab2d22ee 100644
--- a/gis/geoserver/slack-desc
+++ b/gis/geopandas/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-geoserver: geoserver (geospatial server)
-geoserver:
-geoserver: GeoServer is a Java server for publishing geospatial data using the
-geoserver: Open Geospatial Consortium's Web Feature Service, Web Map Service and
-geoserver: Web Coverage Service standards.
-geoserver:
-geoserver: Homepage: http://geoserver.org
-geoserver:
-geoserver:
-geoserver:
-geoserver:
+geopandas: geopandas (Python tools for geographic data)
+geopandas:
+geopandas: GeoPandas is a project to add support for geographic data to pandas
+geopandas: objects. It currently implements GeoSeries and GeoDataFrame types
+geopandas: which are subclasses of pandas.Series and pandas.DataFrame
+geopandas: respectively. GeoPandas objects can act on shapely geometry objects
+geopandas: and perform geometric operations.
+geopandas:
+geopandas:
+geopandas:
+geopandas:
diff --git a/gis/geopy/README b/gis/geopy/README
index a235b18e15..3464f8c4a4 100644
--- a/gis/geopy/README
+++ b/gis/geopy/README
@@ -1,8 +1,9 @@
-geopy makes it easy for developers to locate the coordinates of addresses,
-cities, countries, and landmarks across the globe using third-party
-geocoders and other data sources.
+geopy makes it easy for developers to locate the coordinates of
+addresses, cities, countries, and landmarks across the globe using
+third-party geocoders and other data sources.
-geopy currently includes support for several geocoders, including OpenStreetMap
-Nominatim, ESRI ArcGIS, Google Geocoding API and more.
+geopy currently includes support for several geocoders, including
+OpenStreetMap Nominatim, ESRI ArcGIS, Google Geocoding API and more.
-python/pytz is an optional dependency that will be used if available.
+python/pytz and python/python3-aiohttp are optional dependencies that
+will be used if available.
diff --git a/gis/geopy/geopy.SlackBuild b/gis/geopy/geopy.SlackBuild
index 2a901b6a28..84a41be348 100644
--- a/gis/geopy/geopy.SlackBuild
+++ b/gis/geopy/geopy.SlackBuild
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for geopy
# Written by Dominik Drobek <dominik.drobek (at) o2.pl>
# Formerly maintained by Francisco Sokol <chico.sokol@gmail.com>
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,10 +24,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=geopy
-VERSION=${VERSION:-1.20.0}
+VERSION=${VERSION:-2.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,7 +81,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -84,4 +93,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/geopy/geopy.info b/gis/geopy/geopy.info
index ead4b20dc1..65f35687c3 100644
--- a/gis/geopy/geopy.info
+++ b/gis/geopy/geopy.info
@@ -1,10 +1,10 @@
PRGNAM="geopy"
-VERSION="1.20.0"
+VERSION="2.1.0"
HOMEPAGE="https://github.com/geopy/geopy"
-DOWNLOAD="https://github.com/geopy/geopy/archive/1.20.0/geopy-1.20.0.tar.gz"
-MD5SUM="3c9bdd7f811c8b502f0c595e28ce7043"
+DOWNLOAD="https://github.com/geopy/geopy/archive/2.1.0/geopy-2.1.0.tar.gz"
+MD5SUM="0573cc833b3566fd4c06f10f1646a252"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3"
+REQUIRES=""
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/geopy/slack-desc b/gis/geopy/slack-desc
index 9a383dff7d..62dc0f4cb2 100644
--- a/gis/geopy/slack-desc
+++ b/gis/geopy/slack-desc
@@ -14,6 +14,6 @@ geopy: third-party geocoders.
geopy:
geopy: geopy currently includes support for several geocoders, including
geopy: OpenStreetMap Nominatim, ESRI ArcGIS, Google Geocoding API and more.
-geopy:
-geopy:
+geopy:
+geopy:
geopy:
diff --git a/gis/geos/README b/gis/geos/README
index b6cf0b40fa..857f61a8f5 100644
--- a/gis/geos/README
+++ b/gis/geos/README
@@ -3,3 +3,7 @@ Suite (JTS). As such, it aims to contain the complete functionality
of JTS in C++. This includes all the OpenGIS "Simple Features for SQL"
spatial predicate functions and spatial operators, as well as specific
JTS enhanced topology functions.
+
+By default, the script does not build nor run the tests. You can use the
+option TESTBUILD=YES to build and run the tests before the make install
+part.
diff --git a/gis/geos/geos.SlackBuild b/gis/geos/geos.SlackBuild
index 08f3fa9e0d..1e679546fa 100644
--- a/gis/geos/geos.SlackBuild
+++ b/gis/geos/geos.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for geos
# Written by Kyle Guinn <elyk03@gmail.com>
-# Maintained 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Maintained 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2023 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=geos
-VERSION=${VERSION:-3.7.2}
+VERSION=${VERSION:-3.12.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -56,6 +67,10 @@ fi
set -e
+if [[ ${TESTBUILD:='NO'} == 'NO' ]]; then
+ TESTBUILDFLAGS='-DBUILD_TESTING=OFF'
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -64,33 +79,32 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=/usr/info \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-shared \
- --disable-static \
- --enable-python \
- --disable-ruby \
- --build=$ARCH-slackware-linux
+mkdir -p build
+(
+ cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ $TESTBUILDFLAGS \
+ -DCMAKE_BUILD_TYPE=Release \
+ ..
+ make
+ [[ $TESTBUILD == "YES" ]] && make test
+ make install DESTDIR=$PKG
+)
-make
-make install-strip DESTDIR=$PKG
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS COPYING NEWS README.md TODO \
+ AUTHORS CODE_OF_CONDUCT.md COPYING DEVELOPER-NOTES.md NEWS.md README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -98,4 +112,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/geos/geos.info b/gis/geos/geos.info
index 42681da963..40eaaee3ed 100644
--- a/gis/geos/geos.info
+++ b/gis/geos/geos.info
@@ -1,10 +1,10 @@
PRGNAM="geos"
-VERSION="3.7.2"
-HOMEPAGE="http://trac.osgeo.org/geos/"
-DOWNLOAD="http://download.osgeo.org/geos/geos-3.7.2.tar.bz2"
-MD5SUM="8caa4d19d311c1a78feb2f57505dc0e3"
+VERSION="3.12.1"
+HOMEPAGE="https://libgeos.org/"
+DOWNLOAD="https://download.osgeo.org/geos/geos-3.12.1.tar.bz2"
+MD5SUM="36d16fbea7e923c50b33ddb83516c36e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/geoserver-control-flow/README b/gis/geoserver-control-flow/README
deleted file mode 100644
index 2725121b6b..0000000000
--- a/gis/geoserver-control-flow/README
+++ /dev/null
@@ -1,4 +0,0 @@
-The Control Flow plugin allows the administrator to control the number of
-concurrent requests executing on the server at any one time.
-
-Tomcat must be restarted for the plugin to take effect.
diff --git a/gis/geoserver-control-flow/geoserver-control-flow.SlackBuild b/gis/geoserver-control-flow/geoserver-control-flow.SlackBuild
deleted file mode 100644
index 495e2b5a7a..0000000000
--- a/gis/geoserver-control-flow/geoserver-control-flow.SlackBuild
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# SlackBuild script for geoserver-control-flow
-
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geoserver-control-flow
-VERSION=${VERSION:-2.7.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/geoserver-$VERSION-control-flow-plugin.zip
-
-mkdir -p $PKG/usr/share/geoserver/WEB-INF/lib
-cp -a *.jar $PKG/usr/share/geoserver/WEB-INF/lib
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geoserver-control-flow/geoserver-control-flow.info b/gis/geoserver-control-flow/geoserver-control-flow.info
deleted file mode 100644
index 2c1308e0c3..0000000000
--- a/gis/geoserver-control-flow/geoserver-control-flow.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver-control-flow"
-VERSION="2.7.0"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="http://downloads.sourceforge.net/project/geoserver/GeoServer/2.7.0/extensions/geoserver-2.7.0-control-flow-plugin.zip"
-MD5SUM="06c242102c739f10439de2f4fd672313"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geoserver"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver-control-flow/slack-desc b/gis/geoserver-control-flow/slack-desc
deleted file mode 100644
index 1c7847cbf4..0000000000
--- a/gis/geoserver-control-flow/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-geoserver-control-flow: geoserver-control-flow (GeoServer request rate limitation)
-geoserver-control-flow:
-geoserver-control-flow: The Control Flow plugin allows the administrator to control the number
-geoserver-control-flow: of concurrent requests executing on the server at any one time.
-geoserver-control-flow:
-geoserver-control-flow:
-geoserver-control-flow:
-geoserver-control-flow:
-geoserver-control-flow:
-geoserver-control-flow:
-geoserver-control-flow:
diff --git a/gis/geoserver-css/README b/gis/geoserver-css/README
deleted file mode 100644
index f3e4dd94c8..0000000000
--- a/gis/geoserver-css/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The CSS plugin adds support for CSS styling to GeoServer.
-
-Tomcat must be restarted for the plugin to take effect.
diff --git a/gis/geoserver-css/geoserver-css.SlackBuild b/gis/geoserver-css/geoserver-css.SlackBuild
deleted file mode 100644
index 2d3498288d..0000000000
--- a/gis/geoserver-css/geoserver-css.SlackBuild
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# SlackBuild script for geoserver-css
-
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geoserver-css
-VERSION=${VERSION:-2.7.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/geoserver-$VERSION-css-plugin.zip
-
-mkdir -p $PKG/usr/share/geoserver/WEB-INF/lib
-cp -a *.jar $PKG/usr/share/geoserver/WEB-INF/lib
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a SCALA-LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geoserver-css/geoserver-css.info b/gis/geoserver-css/geoserver-css.info
deleted file mode 100644
index 5e1ac9fd6e..0000000000
--- a/gis/geoserver-css/geoserver-css.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver-css"
-VERSION="2.7.0"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="http://downloads.sourceforge.net/project/geoserver/GeoServer/2.7.0/extensions/geoserver-2.7.0-css-plugin.zip"
-MD5SUM="8f39d3267302ea33d963ce9a01ffb294"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geoserver"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver-javascript/README b/gis/geoserver-javascript/README
deleted file mode 100644
index 3240de9e17..0000000000
--- a/gis/geoserver-javascript/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The JavaScript plugin adds support for JavaScript GeoScript to GeoServer.
-
-Tomcat must be restarted for the plugin to take effect.
diff --git a/gis/geoserver-javascript/geoserver-javascript.SlackBuild b/gis/geoserver-javascript/geoserver-javascript.SlackBuild
deleted file mode 100644
index 2be6f6a44c..0000000000
--- a/gis/geoserver-javascript/geoserver-javascript.SlackBuild
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-# SlackBuild script for geoserver-javascript
-
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geoserver-javascript
-VERSION=${VERSION:-2.7}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/geoserver-$VERSION-SNAPSHOT-javascript-plugin.zip
-
-# remove SNAPSHOT versions of .jar files duplicated in dependencies
-rm gt-geojson-13-SNAPSHOT.jar
-rm gt-process-13-SNAPSHOT.jar
-rm gt-process-feature-13-SNAPSHOT.jar
-rm gt-process-geometry-13-SNAPSHOT.jar
-rm gt-process-raster-13-SNAPSHOT.jar
-
-mkdir -p $PKG/usr/share/geoserver/WEB-INF/lib
-cp -a *.jar $PKG/usr/share/geoserver/WEB-INF/lib
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geoserver-javascript/geoserver-javascript.info b/gis/geoserver-javascript/geoserver-javascript.info
deleted file mode 100644
index e688303980..0000000000
--- a/gis/geoserver-javascript/geoserver-javascript.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver-javascript"
-VERSION="2.7"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/geoserver-javascript/geoserver-2.7-SNAPSHOT-javascript-plugin.zip"
-MD5SUM="55b82b1511aa99084568bd3e8ee8df6c"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geoserver-wps"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver-javascript/slack-desc b/gis/geoserver-javascript/slack-desc
deleted file mode 100644
index 3a2133ec9c..0000000000
--- a/gis/geoserver-javascript/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-geoserver-javascript: geoserver-javascript (JavaScript scripting support for GeoServer)
-geoserver-javascript:
-geoserver-javascript: The JavaScript plugin adds support for JavaScript GeoScript to
-geoserver-javascript: GeoServer.
-geoserver-javascript:
-geoserver-javascript:
-geoserver-javascript:
-geoserver-javascript:
-geoserver-javascript:
-geoserver-javascript:
-geoserver-javascript:
diff --git a/gis/geoserver-oracle/README b/gis/geoserver-oracle/README
deleted file mode 100644
index 170277f85c..0000000000
--- a/gis/geoserver-oracle/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The Oracle plugin adds support for Oracle data stores to GeoServer.
-
-Tomcat must be restarted for the plugin to take effect.
diff --git a/gis/geoserver-oracle/geoserver-oracle.SlackBuild b/gis/geoserver-oracle/geoserver-oracle.SlackBuild
deleted file mode 100644
index a6234c4b3d..0000000000
--- a/gis/geoserver-oracle/geoserver-oracle.SlackBuild
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# SlackBuild script for geoserver-oracle
-
-# Copyright 2013-2014 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geoserver-oracle
-VERSION=${VERSION:-2.7.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/geoserver-$VERSION-oracle-plugin.zip
-
-mkdir -p $PKG/usr/share/geoserver/WEB-INF/lib
-cp -a *.jar $PKG/usr/share/geoserver/WEB-INF/lib
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a Oracle-LICENSE.txt oracle-readme.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geoserver-oracle/geoserver-oracle.info b/gis/geoserver-oracle/geoserver-oracle.info
deleted file mode 100644
index 2ce3b5d9ba..0000000000
--- a/gis/geoserver-oracle/geoserver-oracle.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver-oracle"
-VERSION="2.7.0"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="http://downloads.sourceforge.net/project/geoserver/GeoServer/2.7.0/extensions/geoserver-2.7.0-oracle-plugin.zip"
-MD5SUM="4953eeb411d6b087bb7792932412ca13"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geoserver"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver-pyramid/README b/gis/geoserver-pyramid/README
deleted file mode 100644
index 867d99c368..0000000000
--- a/gis/geoserver-pyramid/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The pyramid plugin adds support for image pyramid data stores to GeoServer.
-
-Tomcat must be restarted for the plugin to take effect.
diff --git a/gis/geoserver-pyramid/geoserver-pyramid.SlackBuild b/gis/geoserver-pyramid/geoserver-pyramid.SlackBuild
deleted file mode 100644
index 0b2dffbacf..0000000000
--- a/gis/geoserver-pyramid/geoserver-pyramid.SlackBuild
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# SlackBuild script for geoserver-pyramid
-
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geoserver-pyramid
-VERSION=${VERSION:-2.7.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/geoserver-$VERSION-pyramid-plugin.zip
-
-mkdir -p $PKG/usr/share/geoserver/WEB-INF/lib
-cp -a *.jar $PKG/usr/share/geoserver/WEB-INF/lib
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geoserver-pyramid/geoserver-pyramid.info b/gis/geoserver-pyramid/geoserver-pyramid.info
deleted file mode 100644
index 8afc4099a6..0000000000
--- a/gis/geoserver-pyramid/geoserver-pyramid.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver-pyramid"
-VERSION="2.7.0"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="http://downloads.sourceforge.net/project/geoserver/GeoServer/2.7.0/extensions/geoserver-2.7.0-pyramid-plugin.zip"
-MD5SUM="99c2d1f0e9add46e1361a2513a59ceac"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geoserver"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver-pyramid/slack-desc b/gis/geoserver-pyramid/slack-desc
deleted file mode 100644
index 071d83ce55..0000000000
--- a/gis/geoserver-pyramid/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-geoserver-pyramid: geoserver-pyramid (pyramid data store support for GeoServer)
-geoserver-pyramid:
-geoserver-pyramid: The pyramid plugin adds support for image pyramid data stores to
-geoserver-pyramid: GeoServer.
-geoserver-pyramid:
-geoserver-pyramid:
-geoserver-pyramid:
-geoserver-pyramid:
-geoserver-pyramid:
-geoserver-pyramid:
-geoserver-pyramid:
diff --git a/gis/geoserver-python/README b/gis/geoserver-python/README
deleted file mode 100644
index b45ddc75ae..0000000000
--- a/gis/geoserver-python/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The Python plugin adds support for Python GeoScript to GeoServer.
-
-Tomcat must be restarted for the plugin to take effect.
diff --git a/gis/geoserver-python/geoserver-python.info b/gis/geoserver-python/geoserver-python.info
deleted file mode 100644
index 1029bccb1b..0000000000
--- a/gis/geoserver-python/geoserver-python.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver-python"
-VERSION="2.7"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/geoserver-python/geoserver-2.7-SNAPSHOT-python-plugin.zip"
-MD5SUM="14f289d82867ce1f801e037b45a74cef"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geoserver-wps"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver-python/slack-desc b/gis/geoserver-python/slack-desc
deleted file mode 100644
index 0a49448434..0000000000
--- a/gis/geoserver-python/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-geoserver-python: geoserver-python (Python scripting support for GeoServer)
-geoserver-python:
-geoserver-python: The Python plugin adds support for Python GeoScript to GeoServer.
-geoserver-python:
-geoserver-python:
-geoserver-python:
-geoserver-python:
-geoserver-python:
-geoserver-python:
-geoserver-python:
-geoserver-python:
diff --git a/gis/geoserver-wps/README b/gis/geoserver-wps/README
deleted file mode 100644
index 5f1c2abed1..0000000000
--- a/gis/geoserver-wps/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The WPS plugin adds Web Processing Service (WPS) support to GeoServer.
-
-Tomcat must be restarted for the plugin to take effect.
diff --git a/gis/geoserver-wps/geoserver-wps.SlackBuild b/gis/geoserver-wps/geoserver-wps.SlackBuild
deleted file mode 100644
index c1dcc58ba0..0000000000
--- a/gis/geoserver-wps/geoserver-wps.SlackBuild
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# SlackBuild script for geoserver-wps
-
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geoserver-wps
-VERSION=${VERSION:-2.7.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/geoserver-$VERSION-wps-plugin.zip
-
-mkdir -p $PKG/usr/share/geoserver/WEB-INF/lib
-cp -r *.jar $PKG/usr/share/geoserver/WEB-INF/lib
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geoserver-wps/geoserver-wps.info b/gis/geoserver-wps/geoserver-wps.info
deleted file mode 100644
index c420d95b55..0000000000
--- a/gis/geoserver-wps/geoserver-wps.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver-wps"
-VERSION="2.7.0"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="http://downloads.sourceforge.net/project/geoserver/GeoServer/2.7.0/extensions/geoserver-2.7.0-wps-plugin.zip"
-MD5SUM="0b8021bd17c1785e2d5253b3b05d483e"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="geoserver"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver/README b/gis/geoserver/README
deleted file mode 100644
index 5fda3a0445..0000000000
--- a/gis/geoserver/README
+++ /dev/null
@@ -1,23 +0,0 @@
-GeoServer is a Java-base server that allows users to publish and edit
-geospatial data using open standards.
-
-GeoServer is the reference implementation of the Open Geospatial Consortium's
-Web Feature Service (WFS) and Web Coverage Service (WCS) standards, as well as
-a high-performance Web Map Service (WMS). Additional functionality is available
-through the use of plugins.
-
-This SlackBuild will install GeoServer as a web application for a Tomcat
-servlet container. The SlackBuild will not overwrite any geoserver.war file
-that has been deployed using /var/lib/tomcat/webapps, but by default they will
-both be using the same /geoserver web path. This path can be changed from its
-default by editing /etc/tomcat/Catalina/localhost/geoserver.xml.
-
-The SlackBuild will create a data directory for GeoServer at /var/lib/geoserver
-but will not add any content, meaning that uninstalls, reinstalls, and upgrades
-will not affect existing data directories. Nevertheless, the data directory
-should still always be backed up prior to an upgrade. An empty data directory
-will be populated by a minimal set of configuration files when GeoServer is
-started for the first time.
-
-The jai and jai-imageio packages are recommended for improved image rendering
-performance.
diff --git a/gis/geoserver/data_dir.patch b/gis/geoserver/data_dir.patch
deleted file mode 100644
index b1a74707e3..0000000000
--- a/gis/geoserver/data_dir.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -Nur WEB-INF.orig/web.xml WEB-INF/web.xml
---- WEB-INF.orig/web.xml 2013-11-06 23:08:11.384791737 -0800
-+++ WEB-INF/web.xml 2013-11-06 23:05:56.599793825 -0800
-@@ -47,12 +47,10 @@
- </context-param>
- -->
-
-- <!--
- <context-param>
- <param-name>GEOSERVER_DATA_DIR</param-name>
-- <param-value>C:\eclipse\workspace\geoserver_trunk\cite\confCiteWFSPostGIS</param-value>
-+ <param-value>/var/lib/geoserver</param-value>
- </context-param>
-- -->
-
- <!-- pick up all spring application contexts -->
- <context-param>
diff --git a/gis/geoserver/doinst.sh b/gis/geoserver/doinst.sh
deleted file mode 100644
index 8c44f6584b..0000000000
--- a/gis/geoserver/doinst.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-config() {
- NEW="$1"
- OLD="$(dirname $NEW)/$(basename $NEW .new)"
- # If there's no config file by that name, mv it over:
- if [ ! -r $OLD ]; then
- mv $NEW $OLD
- elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
- # toss the redundant copy
- rm $NEW
- fi
- # Otherwise, we leave the .new copy for the admin to consider...
-}
-
-config etc/tomcat/Catalina/localhost/geoserver.xml.new
diff --git a/gis/geoserver/geoserver.SlackBuild b/gis/geoserver/geoserver.SlackBuild
deleted file mode 100644
index bee0df4165..0000000000
--- a/gis/geoserver/geoserver.SlackBuild
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-
-# SlackBuild script for geoserver
-
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=geoserver
-VERSION=${VERSION:-2.7.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/$PRGNAM-$VERSION-war.zip
-jar xvf $TMP/$PRGNAM-$VERSION/geoserver.war
-
-# patch web.xml so that it points to our custom data directory in /var/lib/geoserver
-patch -p0 --verbose < $CWD/data_dir.patch
-
-# install the war components
-mkdir -p $PKG/usr/share/geoserver
-cp -r index.html META-INF WEB-INF $PKG/usr/share/geoserver
-
-# set up the deploy for tomcat
-mkdir -p $PKG/etc/tomcat/Catalina/localhost
-cp $CWD/geoserver.xml $PKG/etc/tomcat/Catalina/localhost/geoserver.xml.new
-
-# create an empty data directory owned by the tomcat user
-mkdir -p $PKG/var/lib/geoserver
-chown -R tomcat.tomcat $PKG/var/lib/geoserver
-chmod 700 $PKG/var/lib/geoserver
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a GPL.txt LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/geoserver/geoserver.info b/gis/geoserver/geoserver.info
deleted file mode 100644
index f36d30c569..0000000000
--- a/gis/geoserver/geoserver.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="geoserver"
-VERSION="2.7.0"
-HOMEPAGE="http://geoserver.org"
-DOWNLOAD="http://downloads.sourceforge.net/project/geoserver/GeoServer/2.7.0/geoserver-2.7.0-war.zip"
-MD5SUM="6dc863c282135acea6711071f7093351"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="apache-tomcat"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/geoserver/geoserver.xml b/gis/geoserver/geoserver.xml
deleted file mode 100644
index 74fa2ce495..0000000000
--- a/gis/geoserver/geoserver.xml
+++ /dev/null
@@ -1 +0,0 @@
-<Context displayName="geoserver" docBase="/usr/share/geoserver" path="/geoserver"/>
diff --git a/gis/gj2ascii/gj2ascii.SlackBuild b/gis/gj2ascii/gj2ascii.SlackBuild
index aa5b014afa..f6fbd421b3 100644
--- a/gis/gj2ascii/gj2ascii.SlackBuild
+++ b/gis/gj2ascii/gj2ascii.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gj2ascii
-# Copyright 2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2018-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gj2ascii
VERSION=${VERSION:-0.4.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,7 +79,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -84,4 +94,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/gj2ascii/gj2ascii.info b/gis/gj2ascii/gj2ascii.info
index 40f0e4161a..5c68cd0d5f 100644
--- a/gis/gj2ascii/gj2ascii.info
+++ b/gis/gj2ascii/gj2ascii.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/geowurster/gj2ascii/archive/0.4.1/gj2ascii-0.4.1.ta
MD5SUM="d2eb99fc027e83675fe4c2515fb781eb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="Shapely Fiona click numpy rasterio"
+REQUIRES="python3-shapely Fiona rasterio"
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/gmapcatcher/gmapcatcher.SlackBuild b/gis/gmapcatcher/gmapcatcher.SlackBuild
index 6f2c36ac36..d507a976b5 100644
--- a/gis/gmapcatcher/gmapcatcher.SlackBuild
+++ b/gis/gmapcatcher/gmapcatcher.SlackBuild
@@ -1,29 +1,39 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gmapcatcher
# Written by Pablo Santamaria (pablosantamaria)
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gmapcatcher
VERSION=${VERSION:-0.8.0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -72,4 +82,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/google-earth-legacy/README b/gis/google-earth-legacy/README
new file mode 100644
index 0000000000..d35d7ce524
--- /dev/null
+++ b/gis/google-earth-legacy/README
@@ -0,0 +1,47 @@
+google-earth-legacy (Google's famous virtual globe - legacy version)
+
+Google Earth is a virtual globe program. It maps a version of the
+Earth by the superimposition of images obtained from satellite
+imagery, aerial photography and GIS over a 3D globe. You point
+and zoom to any place on the planet that you want to explore.
+Satellite images and local facts zoom into view. Tap into Google
+search to show local points of interest and facts. Zoom to a
+specific address to check out an apartment or hotel. View driving
+directions and even fly along your route.
+
+The degree of resolution available is based somewhat on the points
+of interest, but most land (except for some islands) is covered in at
+least 15 meters of resolution.
+
+When running GoogleEarth for the first time, you will see an error
+message stating that it is unable to find the Bitstream Vera fonts.
+This should be safe to ignore - it will use other fonts (and the
+DejaVu fonts included with Slackware are based on the Bitstream fonts).
+
+NOTES:
+1) Google Earth 7 (legacy) is "LSB compliant" meaning it was built on
+ an LSB system. Slackware however does not have that symlink which
+ is part of the LSB 3.0 specification. Before, you had to add that
+ symlink manually; that is now handled in doinst.sh. For nostalgia
+ sake, the symlinks are:
+ in /lib: (32-bit)
+ ln -sv ld-linux.so.2 ld-lsb.so.3
+ in /lib64:
+ ln -sv ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+
+2) Google Earth sometimes crashes when the 65-fonts-persian.conf is
+ available on the system. If you experience crashes, try removing
+ /etc/fonts/conf.d/65-fonts-persian.conf prior to launching this
+ application. The easiest way to do this is:
+
+ mv /etc/fonts/conf.d/65-fonts-persian.conf \
+ /etc/fonts/conf.d/65-fonts-persian.conf.old
+
+3) GoogleEarth requires that you have OpenGL drivers installed on your
+ system (and Xorg configured to use them). Not doing so will cause X
+ to crash.
+
+4) This is the legacy version 7.3.0, which is the last version to be
+ released for 32-bit systems. On startup, a nag screen will pop up
+ advising you that a new version is availble, which you can safely
+ ignore.
diff --git a/gis/google-earth-legacy/doinst.sh b/gis/google-earth-legacy/doinst.sh
new file mode 100644
index 0000000000..76c4a738ca
--- /dev/null
+++ b/gis/google-earth-legacy/doinst.sh
@@ -0,0 +1,14 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime > /dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
diff --git a/gis/google-earth-legacy/google-earth-legacy.SlackBuild b/gis/google-earth-legacy/google-earth-legacy.SlackBuild
new file mode 100644
index 0000000000..f062abd99d
--- /dev/null
+++ b/gis/google-earth-legacy/google-earth-legacy.SlackBuild
@@ -0,0 +1,140 @@
+#!/bin/bash
+
+# Slackware build script for google-earth-legacy
+
+# Copyright 2007-2013 Michiel van Wessem, Manchester, United Kingdom
+# Copyright 2016-2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2021 Lenard Spencer, Orlando, Florida, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# 2013 - A lot of thanks to Willy Sudiarto Raharjo for his input and help
+# with converting the script to work with google's .deb packages.
+
+# Thanks to rworkman for the additional code and script cleanups
+# and to Daniel de Kok and Alan_Hicks for their comments.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=google-earth-legacy
+VERSION=${VERSION:-7.3.0.3832}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SRCARCH="i386"
+elif [ "$ARCH" = "x86_64" ]; then
+ SRCARCH="amd64"
+else
+ echo "This system is unsupported. Aborting."
+ exit 1
+fi
+
+# No flags/configure needed as it is just a binary repackaging.
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $PKG
+ar p $CWD/google-earth-pro-stable_${VERSION}-r0_${SRCARCH}.deb data.tar.xz | tar xJv
+cd $PKG
+chown -R root:root .
+
+# Fix Google braindeadness (and mine)
+find . -type d -exec chmod 0755 {} \;
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Sadly (by lack of a more polite word), Google has some inconsistent
+# permissions for normal files; this should deal with them rather nicely.
+find -L . \( -name "*.png" -o -name "*.kml" -o -name "*.xml" \) -exec chmod 0644 {} \;
+
+# Install a .desktop launcher:
+mv $PKG/opt/google/earth/pro/google-earth-pro.desktop $PKG/usr/share/applications/google-earth.desktop
+
+# Copy icons to /usr/share/icons
+for icon in 16 22 24 32 48 64 128 256; do
+ install -D $PKG/opt/google/earth/pro/product_logo_${icon}.png \
+ $PKG/usr/share/icons/hicolor/${icon}x${icon}/apps/${PRGNAM}-pro.png
+done
+
+# Install mimetypes
+mkdir -p $PKG/usr/share/mime/packages/
+cat $CWD/google-earth-mimetypes.xml > $PKG/usr/share/mime/packages/$PRGNAM-mimetypes.xml
+
+# Let's take care of documentation
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Clean up cruft/unneeded directories.The cron job in /etc is for Debian/Ubuntu only:
+rm -rf $PKG/etc
+rm -rf $PKG/usr/share/{man,menu,gnome-control-center}
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+# Add ld-lsb.so symlink creation to doinst.sh
+if [ "$ARCH" = "x86_64" ]; then
+cat >> $PKG/install/doinst.sh << "EOF"
+# Create ld-lsb symlink
+( cd lib64
+ if [ ! -e ld-lsb-x86-64.so.3 ]; then
+ ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ fi
+)
+
+EOF
+else
+cat >> $PKG/install/doinst.sh << "EOF"
+# Create ld-lsb symlink
+( cd lib
+ if [ ! -e ld-lsb.so.3 ]; then
+ ln -sf ld-linux.so.2 ld-lsb.so.3
+ fi
+)
+
+EOF
+fi
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/google-earth-legacy/google-earth-legacy.info b/gis/google-earth-legacy/google-earth-legacy.info
new file mode 100644
index 0000000000..8ac0fe3e9a
--- /dev/null
+++ b/gis/google-earth-legacy/google-earth-legacy.info
@@ -0,0 +1,10 @@
+PRGNAM="google-earth-legacy"
+VERSION="7.3.0.3832"
+HOMEPAGE="https://www.google.com/earth/index.html"
+DOWNLOAD="https://dl.google.com/dl/earth/client/GE7/release_7_3_0/google-earth-pro-stable_7.3.0.3832-r0_i386.deb"
+MD5SUM="5c298610ae4bd604fcfd54fdc32e53dd"
+DOWNLOAD_x86_64="https://dl.google.com/dl/earth/client/GE7/release_7_3_0/google-earth-pro-stable_7.3.0.3832-r0_amd64.deb"
+MD5SUM_x86_64="b9d8281257b7ebf0dfac1ab1d3578681"
+REQUIRES=""
+MAINTAINER="Lenard Spencer"
+EMAIL="lenardrspencer@gmail.com"
diff --git a/gis/google-earth-legacy/google-earth-mimetypes.xml b/gis/google-earth-legacy/google-earth-mimetypes.xml
new file mode 100644
index 0000000000..8850ee973e
--- /dev/null
+++ b/gis/google-earth-legacy/google-earth-mimetypes.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/vnd.google-earth.kml+xml">
+ <comment>Keyhole Markup Language data</comment>
+ <glob pattern="*.kml"/>
+ </mime-type>
+
+ <mime-type type="application/vnd.google-earth.kmz">
+ <comment>Keyhole Markup Language archive</comment>
+ <glob pattern="*.kmz"/>
+ </mime-type>
+
+ <mime-type type="application/keyhole">
+ <comment>Keyhole Markup Language data</comment>
+ </mime-type>
+
+ <mime-type type="application/earthviewer">
+ <comment>Keyhole Markup Language data</comment>
+ </mime-type>
+</mime-info>
diff --git a/gis/google-earth-legacy/slack-desc b/gis/google-earth-legacy/slack-desc
new file mode 100644
index 0000000000..e9c8c09862
--- /dev/null
+++ b/gis/google-earth-legacy/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+google-earth-legacy: google-earth-legacy (Google's famous virtual globe - legacy version)
+google-earth-legacy:
+google-earth-legacy: Google Earth is a virtual globe program. It maps a version of the
+google-earth-legacy: Earth by the superimposition of images obtained from satellite
+google-earth-legacy: imagery, aerial photography and GIS over a 3D globe. You point
+google-earth-legacy: and zoom to any place on the planet that you want to explore.
+google-earth-legacy: Satellite images and local facts zoom into view.
+google-earth-legacy:
+google-earth-legacy: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+google-earth-legacy: If google-earth fails to run, first consult the NOTES in the README.
+google-earth-legacy: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/gis/google-earth/README b/gis/google-earth/README
index 941e5bece5..f0d3ae93a4 100644
--- a/gis/google-earth/README
+++ b/gis/google-earth/README
@@ -1,6 +1,6 @@
google-earth (Google's famous virtual globe)
-Google Earth is a virtual globe program. It maps a version of the
+Google Earth Pro is a virtual globe program. It maps a version of the
Earth by the superimposition of images obtained from satellite
imagery, aerial photography and GIS over a 3D globe. You point
and zoom to any place on the planet that you want to explore.
@@ -10,41 +10,20 @@ specific address to check out an apartment or hotel. View driving
directions and even fly along your route.
The degree of resolution available is based somewhat on the points
-of interest, but most land (except for some islands) is covered in at
+of interest, but most land (except for some islands) is covered in at
least 15 meters of resolution.
-When running GoogleEarth for the first time, you will see an error
-message stating that it is unable to find the Bitstream Vera fonts.
-This should be safe to ignore - it will use other fonts (and the
-DejaVu fonts included with Slackware are based on the Bitstream fonts).
-
NOTES:
-1) Google updates the GoogleEarth bin-file without changing the download
- link location and they don't use version numbering in the filename
- (the version is more an internal numbering).
-
- Therefore, this script is subject to failing (and a different MD5SUM)
- at any time due to the fact that you might get a newer version
- of GoogleEarth than what the script is designed to use. Please notify
- the maintainer if this is the case.
-
-2) Google Earth 7 is "LSB compliant" meaning it was built on a LSB system.
- Slackware however does not have that symlink which is part of the LSB 3.0
- specification. You'll need to create the symlink manually after installing
- the package:
-
- 32-bit: ln -sf /lib/ld-linux.so.2 /lib/ld-lsb.so.3
- 64-bit: ln -sf /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
-
-3) Google Earth tends to crash when the 65-fonts-persian.conf is available on
- the system. Please remove /etc/fonts/conf.d/65-fonts-persian.conf prior to
- launching this application. The easiest way to do this is:
-
- mv /etc/fonts/conf.d/65-fonts-persian.conf \
- /etc/fonts/conf.d/65-fonts-persian.conf.old
-
-4) GoogleEarth now requires that you have OpenGL drivers installed on your
- system (and Xorg configured to use them). Not doing so will cause X
- to crash.
-
-5) On 32 bit, the VERSION is still at 7.3.0.3832.
+1) Google Earth Pro requires that you have OpenGL drivers installed on
+ your system (and Xorg configured to use them). Not doing so will
+ cause X to crash.
+
+2) This version of Google Earth Pro is only available for 64-bit
+ systems. If you are still running 32-bit, you will need the
+ google-earth-legacy SBo script.
+
+3) This version of Google Earth Pro is updated without bumping the
+ version number (only the embedded revision is bumped). For this
+ reason the md5sum may not match and the build will fail in sbopkg.
+ If this happens you will need to download the file and build the
+ package directly.
diff --git a/gis/google-earth/doinst.sh b/gis/google-earth/doinst.sh
index cd40c461ab..76c4a738ca 100644
--- a/gis/google-earth/doinst.sh
+++ b/gis/google-earth/doinst.sh
@@ -11,3 +11,4 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi
+
diff --git a/gis/google-earth/google-earth.SlackBuild b/gis/google-earth/google-earth.SlackBuild
index f5304c9ec3..65011400a6 100644
--- a/gis/google-earth/google-earth.SlackBuild
+++ b/gis/google-earth/google-earth.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for google-earth
# Copyright 2007-2013 Michiel van Wessem, Manchester, United Kingdom
-# Copyright 2016-2019 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2016-2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2021-2022 Lenard Spencer, Orlando, Florida, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,10 +30,14 @@
# Thanks to rworkman for the additional code and script cleanups
# and to Daniel de Kok and Alan_Hicks for their comments.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=google-earth
-VERSION=${VERSION:-7.3.2.5776}
+VERSION=${VERSION:-7.3.6.9796}
+SHORTVER=${SHORTVER:-7.3.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -41,17 +46,22 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SRCARCH="i386"
-elif [ "$ARCH" = "x86_64" ]; then
+if [ "$ARCH" = "x86_64" ]; then
SRCARCH="amd64"
else
- echo "This system is unsupported. Aborting."
+ echo "This architecture is unsupported. Aborting."
exit 1
fi
@@ -60,8 +70,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
+
cd $PKG
-ar p $CWD/google-earth-stable_current_${SRCARCH}.deb data.tar.xz | tar xJv
+ar p $CWD/google-earth-pro-stable_${SHORTVER}_${SRCARCH}.deb data.tar.xz | tar xJv
cd $PKG
chown -R root:root .
# Fix Google braindeadness (and mine)
@@ -72,16 +83,19 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Sadly (by lack of politer word), Google has some inconsistent permissions
-# for normal files; this should deal with them rather nicely.
+# Sadly (by lack of a more polite word), Google has some inconsistent
+# permissions for normal files; this should deal with them rather nicely.
find -L . \( -name "*.png" -o -name "*.kml" -o -name "*.xml" \) -exec chmod 0644 {} \;
# Install a .desktop launcher:
mv $PKG/opt/google/earth/pro/google-earth-pro.desktop $PKG/usr/share/applications/google-earth.desktop
+# Clean up .desktop to satisfy sbopkglint:
+sed -i '/MultipleArgs/d' $PKG/usr/share/applications/google-earth.desktop
+sed -i "s|Application;||" $PKG/usr/share/applications/google-earth.desktop
# Copy icons to /usr/share/icons
for icon in 16 22 24 32 48 64 128 256; do
- install -D $PKG/opt/google/earth/pro/product_logo_${icon}.png \
+ install -m 644 -D $PKG/opt/google/earth/pro/product_logo_${icon}.png \
$PKG/usr/share/icons/hicolor/${icon}x${icon}/apps/${PRGNAM}-pro.png
done
@@ -102,4 +116,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/google-earth/google-earth.info b/gis/google-earth/google-earth.info
index aa18283951..7223999e97 100644
--- a/gis/google-earth/google-earth.info
+++ b/gis/google-earth/google-earth.info
@@ -1,10 +1,10 @@
PRGNAM="google-earth"
-VERSION="7.3.2.5776"
+VERSION="7.3.6.9796"
HOMEPAGE="https://www.google.com/earth/index.html"
-DOWNLOAD="https://dl.google.com/dl/earth/client/current/google-earth-stable_current_i386.deb"
-MD5SUM="5c298610ae4bd604fcfd54fdc32e53dd"
-DOWNLOAD_x86_64="https://dl.google.com/dl/earth/client/current/google-earth-stable_current_amd64.deb"
-MD5SUM_x86_64="d11eb3e20e5df44cb92d43077537078d"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://dl.google.com/dl/linux/direct/google-earth-pro-stable_7.3.6_amd64.deb"
+MD5SUM_x86_64="3e8fb2549222e87d4cbfe92bec068900"
REQUIRES=""
-MAINTAINER="Willy Sudiarto Raharjo"
-EMAIL="willysr@slackbuilds.org"
+MAINTAINER="Lenard Spencer"
+EMAIL="lenardrspencer@gmail.com"
diff --git a/gis/gpsbabel/README b/gis/gpsbabel/README
index fe1adcae48..690a7e6bf1 100644
--- a/gis/gpsbabel/README
+++ b/gis/gpsbabel/README
@@ -1,13 +1,16 @@
-GPSBabel converts waypoints, tracks, and routes from one format to another,
-whether that format is a common mapping format like Delorme, Streets and
-Trips, or even a serial or USB upload or download to a GPS receiver such as
-those from Garmin and Magellan. By flattening the Tower of Babel that the
-authors of various programs for manipulating GPS data have imposed upon us, it
-returns to us the ability to freely move our own waypoint data between the
-programs and hardware we choose to use.
+GPSBabel converts waypoints, tracks, and routes from one format to
+another, whether that format is a common mapping format like Delorme,
+Streets and Trips, or even a serial or USB upload or download to a GPS
+receiver such as those from Garmin and Magellan. By flattening the
+Tower of Babel that the authors of various programs for manipulating
+GPS data have imposed upon us, it returns to us the ability to freely
+move our own waypoint data between the programs and hardware we choose
+to use.
-It contains extensive data manipulation abilities making it a convenient for
-server-side processing or as the backend for other tools.
+It contains extensive data manipulation abilities making it a
+convenient for server-side processing or as the backend for other
+tools.
-It does not convert, transfer, send, or manipulate maps. We process data that
-may (or may not be) placed on a map, such as waypoints, tracks, and routes.
+It does not convert, transfer, send, or manipulate maps. We process
+data that may (or may not be) placed on a map, such as waypoints,
+tracks, and routes.
diff --git a/gis/gpsbabel/gpsbabel.SlackBuild b/gis/gpsbabel/gpsbabel.SlackBuild
index 3caa41f120..1a31df9ad0 100644
--- a/gis/gpsbabel/gpsbabel.SlackBuild
+++ b/gis/gpsbabel/gpsbabel.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gpsbabel
-# Copyright 2017-2019 Kyle Guinn <elyk03@gmail.com>
+# Copyright 2017-2024 Kyle Guinn <elyk03@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gpsbabel
-VERSION=${VERSION:-1.6.0}
+VERSION=${VERSION:-1.9.0}
SRCVER=${PRGNAM}_$(echo ${VERSION} | tr . _)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
@@ -36,17 +39,18 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM-$VERSION
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS COPYING README*"
+DOCS="AUTHORS COPYING README* SECURITY.md"
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i586" ]; then
+if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
@@ -80,38 +84,22 @@ sed -i \
-e '/ignoreVersionMismatch_/s/false/true/' \
gui/babeldata.h
-# Make it more FHS-compliant by moving gmapbase.html and the translations
-# to /usr/share. Tell the GUI where to find them. Thanks to Arch.
-sed -i 's|langPath_ = QApplication::applicationDirPath();|langPath_ = "/usr/share/gpsbabel";|' gui/mainwindow.cc
-sed -i 's|baseFile = QApplication::applicationDirPath() + "/gmapbase.html";|baseFile = "/usr/share/gpsbabel/gmapbase.html";|' gui/map.cc
-
-# Fix the .desktop file and icon. Thanks to Arch.
-sed -i 's|gpsbabelfe-bin|gpsbabelfe|' gui/gpsbabel.desktop
+# Resize the icon from 500x476 to 512x512. Thanks to Arch.
convert gui/images/appicon.png +set date:create +set date:modify -background none -gravity center -extent 512x512 gui/images/appicon.png
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --with-zlib=system \
- --build=$ARCH-slackware-linux \
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
-
+cmake \
+ -DGPSBABEL_WITH_LIBUSB=pkgconfig \
+ -DGPSBABEL_WITH_ZLIB=pkgconfig \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ .
make
-make gui
install -D -m0755 -s gpsbabel $PKG/usr/bin/gpsbabel
-install -D -m0755 -s gui/objects/gpsbabelfe $PKG/usr/bin/gpsbabelfe
+install -D -m0755 -s gui/GPSBabelFE/gpsbabelfe $PKG/usr/bin/gpsbabelfe
install -D -m0644 gui/gpsbabel.desktop $PKG/usr/share/applications/gpsbabel.desktop
install -D -m0644 gui/images/appicon.png $PKG/usr/share/icons/hicolor/512x512/apps/gpsbabel.png
-install -D -m0644 gui/gmapbase.html $PKG/usr/share/gpsbabel/gmapbase.html
-install -d -m0755 $PKG/usr/share/gpsbabel/translations/
-install -D -m0644 gui/*.qm $PKG/usr/share/gpsbabel/translations/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
@@ -122,4 +110,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/gpsbabel/gpsbabel.info b/gis/gpsbabel/gpsbabel.info
index d8cec64019..dc5540f636 100644
--- a/gis/gpsbabel/gpsbabel.info
+++ b/gis/gpsbabel/gpsbabel.info
@@ -1,10 +1,10 @@
PRGNAM="gpsbabel"
-VERSION="1.6.0"
+VERSION="1.9.0"
HOMEPAGE="https://www.gpsbabel.org/"
-DOWNLOAD="https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_1_6_0/gpsbabel-gpsbabel_1_6_0.tar.gz"
-MD5SUM="accb9f923ebe1b2d2a00c67d0e1dc430"
+DOWNLOAD="https://github.com/gpsbabel/gpsbabel/archive/gpsbabel_1_9_0/gpsbabel-gpsbabel_1_9_0.tar.gz"
+MD5SUM="8555b7b4c89fbae832451ed0679e04f0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="libminizip qt5"
+REQUIRES=""
MAINTAINER="Kyle Guinn"
EMAIL="elyk03@gmail.com"
diff --git a/gis/gpsd/gpsd.SlackBuild b/gis/gpsd/gpsd.SlackBuild
index c4db4271b5..f2befd6211 100644
--- a/gis/gpsd/gpsd.SlackBuild
+++ b/gis/gpsd/gpsd.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gpsd
@@ -22,26 +22,37 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230629 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - /usr/sbin/gpsinit was missing +x permission.
+# - rm generic INSTALL from doc dir.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gpsd
VERSION=${VERSION:-3.18.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -87,9 +98,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} + -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + || true
# g++ may throw an 'internal compiler error' in the QT bindings.
# *Nothing* actually uses this, but you can enable it by deleting
@@ -114,7 +125,7 @@ scons \
# Fix daft permission from upstream
chmod 755 $PKG/usr/bin/gpsprof
# Add a missed file
-install -m 0644 gpsinit \
+install -m 0755 gpsinit \
$PKG/usr/sbin/gpsinit
find $PKG/usr/man -type f -exec gzip -9 {} \;
@@ -147,7 +158,7 @@ install -D -m 0644 $CWD/rc.gpsd.conf.new \
$PKG/etc/rc.d/rc.gpsd.conf.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING INSTALL README TODO build.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING README TODO build.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -155,4 +166,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/gpxsee/fix_font_narrow_space.diff b/gis/gpxsee/fix_font_narrow_space.diff
index 071a98aaed..0b04d37b4d 100644
--- a/gis/gpxsee/fix_font_narrow_space.diff
+++ b/gis/gpxsee/fix_font_narrow_space.diff
@@ -1,5 +1,5 @@
---- GPXSee-7.15/src/GUI/units.h.orig 2019-03-12 23:00:39.365129810 +0300
-+++ GPXSee-7.15/src/GUI/units.h 2019-03-12 23:00:47.151863062 +0300
+--- src/GUI/units.h.orig 2019-03-12 23:00:39.365129810 +0300
++++ src/GUI/units.h 2019-03-12 23:00:47.151863062 +0300
@@ -30,6 +30,6 @@
#define C2FS 1.8 // Celsius to Farenheit - scale
#define C2FO 32.0 // Celsius to Farenheit - offset
diff --git a/gis/gpxsee/gpxsee.SlackBuild b/gis/gpxsee/gpxsee.SlackBuild
index 7c84da7296..be7b61c536 100644
--- a/gis/gpxsee/gpxsee.SlackBuild
+++ b/gis/gpxsee/gpxsee.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for GPXSee
-# Copyright 2018-2019, Nikolay Korotkiy <sikmir@gmail.com>
+# Copyright 2018-2024, Nikolay Korotkiy <sikmir@gmail.com>
+# Copyright 2024 since version 13.18 titopoquito <titopoquito@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gpxsee
-VERSION=${VERSION:-7.15}
+VERSION=${VERSION:-13.18}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,7 +82,7 @@ find -L . \
# Fix display issue: square character instead of a white space
# See https://github.com/tumic0/GPXSee/issues/93
-patch -p1 < $CWD/fix_font_narrow_space.diff
+patch -p0 < $CWD/fix_font_narrow_space.diff
lrelease-qt5 gpxsee.pro
qmake-qt5 \
@@ -93,4 +104,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/gpxsee/gpxsee.info b/gis/gpxsee/gpxsee.info
index 804c3373ca..2fca84e828 100644
--- a/gis/gpxsee/gpxsee.info
+++ b/gis/gpxsee/gpxsee.info
@@ -1,10 +1,10 @@
PRGNAM="gpxsee"
-VERSION="7.15"
+VERSION="13.18"
HOMEPAGE="https://www.gpxsee.org/"
-DOWNLOAD="https://github.com/tumic0/GPXSee/archive/7.15/GPXSee-7.15.tar.gz"
-MD5SUM="31e5822203cf12f6687b939c2834ba96"
+DOWNLOAD="https://github.com/tumic0/GPXSee/archive/13.18/GPXSee-13.18.tar.gz"
+MD5SUM="edd35b435e1d1c1b6f89688927d56248"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="qt5"
-MAINTAINER="Nikolay Korotkiy"
-EMAIL="sikmir@gmail.com"
+REQUIRES=""
+MAINTAINER="titopoquito"
+EMAIL="titopoquito@gmail.com"
diff --git a/gis/grass/README b/gis/grass/README
index 6ae5d756b4..f50d60cb6f 100644
--- a/gis/grass/README
+++ b/gis/grass/README
@@ -1,8 +1,8 @@
-GRASS (Geographic Resources Analysis Support System) is a free Geographic
-Information System (GIS) used for geospatial data management and
-analysis, image processing, graphics/maps production, spatial modeling,
-and visualization. GRASS is an official project of the Open Source
-Geospatial Foundation.
+GRASS (Geographic Resources Analysis Support System) is a free
+Geographic Information System (GIS) used for geospatial data
+management and analysis, image processing, graphics/maps production,
+spatial modeling, and visualization. GRASS is an official project of
+the Open Source Geospatial Foundation.
The following options may be enabled:
@@ -26,18 +26,18 @@ The following options may be enabled:
(requires libLAS)
opencl for OpenCL GPU acceleration
- (requires opencl-headers, either nvidia-driver or amd-app-sdk,
- and suitable GPU hardware)
+ (requires nvidia-driver or amd-app-sdk and
+ suitable GPU)
-The options you require must be specified by setting the variable ENABLE
-before running grass.SlackBuild, for example
+The options you require must be specified by setting the variable
+ENABLE before running grass.SlackBuild, for example
ENABLE="sqlite,netcdf" ./grass.SlackBuild
ffmpeg is an optional runtime dependency for the Animation tool
(g.gui.module).
-If you need to make grass libraries available to other applications (e.g.
-qgis) do this:
+If you need to make grass libraries available to other applications
+(e.g. qgis) do this:
echo /opt/grass/lib >> /etc/ld.so.conf && ldconfig
diff --git a/gis/grass/gdal-3.3.patch b/gis/grass/gdal-3.3.patch
new file mode 100644
index 0000000000..c5e018aaaa
--- /dev/null
+++ b/gis/grass/gdal-3.3.patch
@@ -0,0 +1,84 @@
+From b86314c7f3b8aea961d380dbb836087b3990d7af Mon Sep 17 00:00:00 2001
+From: nilason <n_larsson@yahoo.com>
+Date: Thu, 6 May 2021 22:27:48 +0200
+Subject: [PATCH] v.hull: use standard C boolean type
+
+Fixes #1563
+---
+ vector/v.hull/chull.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
+index 1ad97396fa..41b627c50f 100644
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <stdbool.h>
+
+ #include <grass/gis.h>
+ #include <grass/vector.h>
+@@ -29,10 +30,6 @@
+
+ #include "globals.h"
+
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X 0
+ #define Y 1
+@@ -76,10 +73,10 @@ struct tFaceStructure
+ };
+
+ /* Define flags */
+-#define ONHULL BTRUE
+-#define REMOVED BTRUE
+-#define VISIBLE BTRUE
+-#define PROCESSED BTRUE
++#define ONHULL true
++#define REMOVED true
++#define VISIBLE true
++#define PROCESSED true
+
+ /* Global variable definitions */
+ tVertex vertices = NULL;
+@@ -436,7 +433,7 @@ bool AddOne(tVertex p)
+ tFace f;
+ tEdge e, temp;
+ long int vol;
+- bool vis = BFALSE;
++ bool vis = false;
+
+
+ /* Mark faces visible from p. */
+@@ -446,7 +443,7 @@ bool AddOne(tVertex p)
+
+ if (vol < 0) {
+ f->visible = VISIBLE;
+- vis = BTRUE;
++ vis = true;
+ }
+ f = f->next;
+ } while (f != faces);
+@@ -454,7 +451,7 @@ bool AddOne(tVertex p)
+ /* If no faces are visible from p, then p is inside the hull. */
+ if (!vis) {
+ p->onhull = !ONHULL;
+- return BFALSE;
++ return false;
+ }
+
+ /* Mark edges in interior of visible region for deletion.
+@@ -470,7 +467,7 @@ bool AddOne(tVertex p)
+ e->newface = MakeConeFace(e, p);
+ e = temp;
+ } while (e != edges);
+- return BTRUE;
++ return true;
+ }
+
+ /*---------------------------------------------------------------------
diff --git a/gis/grass/grass.SlackBuild b/gis/grass/grass.SlackBuild
index 8f1b6cc3ef..64706bdb1c 100644
--- a/gis/grass/grass.SlackBuild
+++ b/gis/grass/grass.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for grass
@@ -22,10 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=grass
-VERSION=${VERSION:-7.2.2}
+VERSION=${VERSION:-7.8.0}
+SHRTVER=`echo $VERSION | sed "s/\([0-9]*\).\([0-9]*\)..*/\1\2/"`
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -72,6 +83,8 @@ find -L . \
# Option handling:
set -- $(echo $ENABLE | sed 's/,/ /g')
+patch -p1 < $CWD/gdal-3.3.patch
+
while [ "$1" != "" ]; do
case "$1"
in
@@ -153,24 +166,24 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
install -D -m0644 grass.pc $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/grass.pc
# Create unversioned symlinks:
-( cd $PKG/opt ; ln -s $PRGNAM-$VERSION $PRGNAM )
-( cd $PKG/usr/bin ; ln -s grass72 $PRGNAM )
+( cd $PKG/opt ; ln -s $PRGNAM$SHRTVER $PRGNAM )
+( cd $PKG/usr/bin ; ln -s $PRGNAM$SHRTVER $PRGNAM )
# Remove hardcoded version strings:
sed -i -e "s/-${VERSION}//g" \
- $PKG/usr/bin/grass72 \
+ $PKG/usr/bin/$PRGNAM$SHRTVER \
$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/grass.pc
# Remove packaging directory pollution:
sed -i -e "s;$PKG;;" \
- $PKG/usr/bin/grass72 \
- $PKG/opt/$PRGNAM-$VERSION/demolocation/.grassrc72 \
- $PKG/opt/$PRGNAM-$VERSION/etc/fontcap \
- $PKG/opt/$PRGNAM-$VERSION/include/Make/Grass.make \
- $PKG/opt/$PRGNAM-$VERSION/include/Make/Platform.make
+ $PKG/usr/bin/$PRGNAM$SHRTVER \
+ $PKG/opt/$PRGNAM$SHRTVER/demolocation/.grassrc$SHRTVER \
+ $PKG/opt/$PRGNAM$SHRTVER/etc/fontcap \
+ $PKG/opt/$PRGNAM$SHRTVER/include/Make/Grass.make \
+ $PKG/opt/$PRGNAM$SHRTVER/include/Make/Platform.make
# Documentation:
-PKGOPTMAN=$PKG/opt/$PRGNAM-$VERSION/docs/man
+PKGOPTMAN=$PKG/opt/$PRGNAM$SHRTVER/docs/man
find $PKGOPTMAN -type f -exec gzip -9 {} \;
for i in $( find $PKGOPTMAN -type l ) ; do \
ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
@@ -180,12 +193,8 @@ cp -a \
$PKG/usr/man/man1/grass.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-mv \
- $PKG/opt/$PRGNAM-$VERSION/{AUTHORS,CHANGES,COPYING,GPL.TXT,REQUIREMENTS.html} \
- $PKG/opt/$PRGNAM-$VERSION/*.csv \
- $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- ChangeLog* INSTALL README SUBMITTING* TODO \
+ AUTHORS CHANGES COPYING GPL.TXT REQUIREMENTS.html INSTALL README.md SUBMITTING* TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -200,13 +209,13 @@ cp -a \
$PKG/usr/share/pixmaps/${PRGNAM}.png
# Cleanup:
-rm -rf $PKG/opt/$PRGNAM-$VERSION/demolocation/PERMANENT/.tmp
-rm $PKG/opt/$PRGNAM-$VERSION/config.status
-rm -rf $PKG/opt/$PRGNAM-$VERSION/share/
+rm -rf $PKG/opt/$PRGNAM/demolocation/PERMANENT/.tmp
+rm $PKG/opt/$PRGNAM/config.status
+rm -rf $PKG/opt/$PRGNAM/share/
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/grass/grass.info b/gis/grass/grass.info
index f136144201..c636164541 100644
--- a/gis/grass/grass.info
+++ b/gis/grass/grass.info
@@ -1,10 +1,10 @@
PRGNAM="grass"
-VERSION="7.2.2"
+VERSION="7.8.0"
HOMEPAGE="https://grass.osgeo.org/"
-DOWNLOAD="https://grass.osgeo.org/grass72/source/grass-7.2.2.tar.gz"
-MD5SUM="4a908a63bb9b7af34fee9569316c0fb6"
+DOWNLOAD="https://grass.osgeo.org/grass78/source/grass-7.8.0.tar.gz"
+MD5SUM="e9b9d3bbbfe3ef9055ea1398b2222de4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gdal numpy wxPython"
+REQUIRES="gdal python3-numpy wxPython4"
MAINTAINER="David Spencer"
EMAIL="baildon.research@googlemail.com"
diff --git a/gis/josm/README b/gis/josm/README
index c893f14abe..2fe1984ce5 100644
--- a/gis/josm/README
+++ b/gis/josm/README
@@ -1,11 +1,11 @@
JOSM is an extensible editor for OpenStreetMap (OSM) written in Java
-Currently it supports loading stand-alone GPX tracks and GPX track data from the
-OSM database as well as loading and editing existing nodes, ways, metadata tags
-and relations from the OSM database.
+Currently it supports loading stand-alone GPX tracks and GPX track
+data from the OSM database as well as loading and editing existing
+nodes, ways, metadata tags and relations from the OSM database.
-Josm is very active so it is highly recommended to install the latest version
-http://josm.openstreetmap.de/download/josm-tested.jar
-and execute the script with VERSION=tested
+Josm is very active so it is highly recommended to install the latest
+version http://josm.openstreetmap.de/download/josm-tested.jar and
+execute the script with VERSION=tested
The script will automagically find the version number in packaging.
diff --git a/gis/josm/josm.SlackBuild b/gis/josm/josm.SlackBuild
index 3beb3186d4..acc0fb1540 100644
--- a/gis/josm/josm.SlackBuild
+++ b/gis/josm/josm.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware java packaging script for josm
#
# Michales - clavisound - Michaloudes korgie@gmail.com <2012-2017>
@@ -7,10 +7,13 @@
# http://josm.openstreetmap.de/download/josm-tested.jar
# execute the script with VERSION=tested
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=josm
VERSION=${VERSION:-12450}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -20,7 +23,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -79,4 +89,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/josm/josm.info b/gis/josm/josm.info
index 9603d00a01..77461996d4 100644
--- a/gis/josm/josm.info
+++ b/gis/josm/josm.info
@@ -5,6 +5,6 @@ DOWNLOAD="http://ponce.cc/slackware/sources/repo/josm-snapshot-12450.jar"
MD5SUM="1bb587427acb4b87300093ae298a0f13"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="jdk"
+REQUIRES="zulu-openjdk8"
MAINTAINER="Michales Michaloudes"
EMAIL="korgie@gmail.com"
diff --git a/gis/laszip/README b/gis/laszip/README
index 61951f4705..63b526820d 100644
--- a/gis/laszip/README
+++ b/gis/laszip/README
@@ -1,6 +1,7 @@
-LASzip - a free product of rapidlasso GmbH - quickly turns bulky LAS files
-into compact LAZ files without information loss. Terabytes of LAZ data are
-now available for free download from various agencies making LASzip, winner
-of the 2012 Geospatial World Forum Technology Innovation Award in LiDAR
-Processing and 2nd place winner for innovative product at INTERGEO 2012,
-the de-facto standard for LiDAR compression.
+LASzip - a free product of rapidlasso GmbH - quickly turns bulky LAS
+files into compact LAZ files without information loss. Terabytes of
+LAZ data are now available for free download from various agencies
+making LASzip, winner of the 2012 Geospatial World Forum Technology
+Innovation Award in LiDAR Processing and 2nd place winner for
+innovative product at INTERGEO 2012, the de-facto standard for LiDAR
+compression.
diff --git a/gis/laszip/laszip.SlackBuild b/gis/laszip/laszip.SlackBuild
index 49adcb800e..49832cd3dc 100644
--- a/gis/laszip/laszip.SlackBuild
+++ b/gis/laszip/laszip.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for laszip
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=laszip
VERSION=${VERSION:-2.2.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -81,6 +91,9 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -90,8 +103,12 @@ cp -a \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/lib*/*.la
+
+rm -f $PKG/usr/lib*/*.la
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch b/gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch
new file mode 100644
index 0000000000..fc7dee623e
--- /dev/null
+++ b/gis/libLAS/Use_LIBLAS_BIG_ENDIAN.patch
@@ -0,0 +1,40 @@
+From af431abce95076b59f4eb7c6ef0930ca57c8a063 Mon Sep 17 00:00:00 2001
+From: Piotr Dobrowolski <dobrypd@gmail.com>
+Date: Thu, 25 Apr 2019 15:33:28 +0200
+Subject: [PATCH] Use LIBLAS_BIG_ENDIAN instead of BOOST_BIG_ENDIAN (#166)
+
+Fixes #165
+---
+ include/liblas/detail/binary.hpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/include/liblas/detail/binary.hpp b/include/liblas/detail/binary.hpp
+index 3dd8a6fc..8f0b3d47 100644
+--- a/include/liblas/detail/binary.hpp
++++ b/include/liblas/detail/binary.hpp
+@@ -17,6 +17,8 @@
+ #ifndef LIBLAS_DETAIL_BINARY_HPP_INCLUDED
+ #define LIBLAS_DETAIL_BINARY_HPP_INCLUDED
+
++#include <liblas/detail/endian.hpp>
++
+ #include <cassert>
+ #include <climits>
+ #include <cstring>
+@@ -25,7 +27,6 @@
+
+ #include <boost/config.hpp>
+ #include <boost/static_assert.hpp>
+-#include <boost/detail/endian.hpp>
+ #include <boost/type_traits/is_signed.hpp>
+
+ #if CHAR_BIT != 8
+@@ -43,7 +44,7 @@ namespace detail { namespace binary {
+ struct big_endian_tag {};
+ struct little_endian_tag {};
+
+-#ifdef BOOST_BIG_ENDIAN
++#ifdef LIBLAS_BIG_ENDIAN
+ typedef big_endian_tag native_endian_tag;
+ #else
+ typedef little_endian_tag native_endian_tag;
diff --git a/gis/libLAS/boost-1.73.patch b/gis/libLAS/boost-1.73.patch
new file mode 100644
index 0000000000..818c15ef3b
--- /dev/null
+++ b/gis/libLAS/boost-1.73.patch
@@ -0,0 +1,36 @@
+Qualify placeholders
+Matteo Bernardini <ponce@slackbuilds.org>
+
+diff -Naur libLAS-1.8.1.orig/src/c_api.cpp libLAS-1.8.1/src/c_api.cpp
+--- libLAS-1.8.1.orig/src/c_api.cpp 2016-08-22 15:06:34.000000000 +0200
++++ libLAS-1.8.1/src/c_api.cpp 2020-08-04 14:54:22.311996000 +0200
+@@ -498,7 +498,7 @@
+
+ transforms.erase( std::remove_if( transforms.begin(),
+ transforms.end(),
+- boost::bind( &IsReprojectionTransform, _1 ) ),
++ boost::bind( &IsReprojectionTransform, boost::placeholders::_1 ) ),
+ transforms.end());
+
+ liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h));
+@@ -1840,7 +1840,7 @@
+
+ transforms.erase( std::remove_if( transforms.begin(),
+ transforms.end(),
+- boost::bind( &IsReprojectionTransform, _1 ) ),
++ boost::bind( &IsReprojectionTransform, boost::placeholders::_1 ) ),
+ transforms.end());
+
+ liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h));
+diff -Naur libLAS-1.8.1.orig/src/header.cpp libLAS-1.8.1/src/header.cpp
+--- libLAS-1.8.1.orig/src/header.cpp 2016-08-22 15:06:34.000000000 +0200
++++ libLAS-1.8.1/src/header.cpp 2020-08-04 14:53:36.599996000 +0200
+@@ -610,7 +610,7 @@
+
+ m_vlrs.erase( std::remove_if( m_vlrs.begin(),
+ m_vlrs.end(),
+- boost::bind( &SameVLRs, name, id, _1 ) ),
++ boost::bind( &SameVLRs, name, id, boost::placeholders::_1 ) ),
+ m_vlrs.end());
+
+ m_recordsCount = static_cast<uint32_t>(m_vlrs.size());
diff --git a/gis/libLAS/libLAS.SlackBuild b/gis/libLAS/libLAS.SlackBuild
index 7d10706655..fa1336c7e5 100644
--- a/gis/libLAS/libLAS.SlackBuild
+++ b/gis/libLAS/libLAS.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libLAS
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libLAS
VERSION=${VERSION:-1.8.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,6 +79,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/Use_LIBLAS_BIG_ENDIAN.patch
+patch -p1 < $CWD/boost-1.73.patch
+
mkdir -p build
cd build
cmake \
@@ -78,7 +91,7 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIBLAS_LIB_SUBDIR:PATH=lib${LIBDIRSUFFIX} \
-DWITH_GEOTIFF:BOOL=TRUE \
- -DWITH_GDAL:BOOL=TRUE \
+ -DWITH_GDAL:BOOL=FALSE \
-DWITH_LASZIP:BOOL=TRUE \
-DWITH_UTILITIES:BOOL=TRUE \
-DCMAKE_BUILD_TYPE=Release ..
@@ -97,4 +110,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/libLAS/libLAS.info b/gis/libLAS/libLAS.info
index f2d39597c0..05b3a39afb 100644
--- a/gis/libLAS/libLAS.info
+++ b/gis/libLAS/libLAS.info
@@ -5,6 +5,6 @@ DOWNLOAD="http://download.osgeo.org/liblas/libLAS-1.8.1.tar.bz2"
MD5SUM="2e6a975dafdf57f59a385ccb87eb5919"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gdal libgeotiff laszip"
+REQUIRES="libgeotiff laszip"
MAINTAINER="David Spencer"
EMAIL="baildon.research@googlemail.com"
diff --git a/gis/libecwj2/README b/gis/libecwj2/README
new file mode 100644
index 0000000000..ad59becd5e
--- /dev/null
+++ b/gis/libecwj2/README
@@ -0,0 +1,33 @@
+libecwj2 is a library that gives support to GDAL for reading, import,
+and convert raster geospatial data in non-free ECW and JPEG 2000
+formats. This library was released as free and open source in 2006 by
+Earth Resource Mapping, formerly owner of ECW patents.
+
+ECW (Enhanced Compression Wavelet) is a full proprietary standard of
+compression image format.
+JPEG 2000 (or JP2) is a similar standard under free concession but
+protected by patents in some parts.
+
+Both the formats are more powerful than other formats in lossy
+compression of large image data without significant losses of quality,
+but are mainly accessible through proprietary software, specially to
+manage geospatial data.
+
+libecwj2 is the only one free and open source library that includes
+the support to these formats in GDAL and indirectly in platforms that
+require it as dependency (i.e. QGIS and Orfeo Toolbox). GDAL can be
+also used to convert ECW or JP2 files in other graphic formats.
+
+After the installation, to apply the support to ECW/JP2 formats, GDAL
+must be rebuilt without any other setting: libecwj2 is an optional
+dependency autodetected.
+
+To verify if the plugin is enabled, you can launch the following
+command:
+
+ $ gdalinfo --formats | grep ECW
+
+If the plugin is successfully enabled, this command returns
+
+ ECW -raster- (rw): ERDAS Compressed Wavelets (SDK 3.x)
+ JP2ECW -raster,vector- (rw+v): ERDAS JPEG2000 (SDK 3.x)
diff --git a/gis/libecwj2/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch b/gis/libecwj2/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch
new file mode 100644
index 0000000000..5489030839
--- /dev/null
+++ b/gis/libecwj2/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch
@@ -0,0 +1,16 @@
+--- Source/C/NCSUtil/malloc.c.ori 2010-02-02 00:09:24.000000000 +0100
++++ Source/C/NCSUtil/malloc.c 2010-02-02 00:17:13.000000000 +0100
+@@ -390,7 +390,12 @@
+ #else /* SOLARIS */
+
+ #ifdef LINUX
+- return(sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE));
++ long nPages = sysconf(_SC_PHYS_PAGES);
++ long nPageSize = sysconf(_SC_PAGESIZE);
++ if (nPages > INT_MAX / nPageSize)
++ return INT_MAX;
++ else
++ return (INT32)(nPages * nPageSize);
+ #elif defined MACOSX
+ return(128*1024*1024);
+
diff --git a/gis/libecwj2/libecwj2-3.3-msvc90-fixes.patch b/gis/libecwj2/libecwj2-3.3-msvc90-fixes.patch
new file mode 100644
index 0000000000..b58cab10d6
--- /dev/null
+++ b/gis/libecwj2/libecwj2-3.3-msvc90-fixes.patch
@@ -0,0 +1,239 @@
+diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJP2File.cpp
+--- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJP2File.cpp Wed Sep 30 11:55:26 2009 +0100
++++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJP2File.cpp Wed Sep 30 12:20:09 2009 +0100
+@@ -137,7 +137,7 @@
+ m_bCodestreamOnly = false;
+
+ m_eCompressionOrder = CNCSJPCProgressionOrderType::RPCL;
+- m_nDecompressionLayers = CNCSJPCBuffer::MAXUINT16;
++ m_nDecompressionLayers = CNCSJPCBuffer::NCS_MAXUINT16;
+
+ m_nNextLine = 0;
+ //Default geodata usage - was JP2_GEODATA_USE_WLD_GML_PCS
+diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCBuffer.cpp
+--- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCBuffer.cpp Wed Sep 30 11:55:26 2009 +0100
++++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCBuffer.cpp Wed Sep 30 12:20:09 2009 +0100
+@@ -26,19 +26,19 @@
+
+ //void * memcpy_amd(void *dest, const void *src, size_t n);
+
+-const UINT32 CNCSJPCBuffer::MAXUINT8 = (unsigned)0xff;
+-const UINT32 CNCSJPCBuffer::MAXUINT16 = (unsigned)0xffff;
+-const UINT32 CNCSJPCBuffer::MAXUINT32 = (unsigned)0xffffffff;
+-const UINT32 CNCSJPCBuffer::MINUINT8 = 0;
+-const UINT32 CNCSJPCBuffer::MINUINT16 = 0;
+-const UINT32 CNCSJPCBuffer::MINUINT32 = 0;
++const UINT32 CNCSJPCBuffer::NCS_MAXUINT8 = (unsigned)0xff;
++const UINT32 CNCSJPCBuffer::NCS_MAXUINT16 = (unsigned)0xffff;
++const UINT32 CNCSJPCBuffer::NCS_MAXUINT32 = (unsigned)0xffffffff;
++const UINT32 CNCSJPCBuffer::NCS_MINUINT8 = 0;
++const UINT32 CNCSJPCBuffer::NCS_MINUINT16 = 0;
++const UINT32 CNCSJPCBuffer::NCS_MINUINT32 = 0;
+
+-const UINT32 CNCSJPCBuffer::MAXINT8 = 0x7f;
+-const UINT32 CNCSJPCBuffer::MAXINT16 = 0x7fff;
+-const UINT32 CNCSJPCBuffer::MAXINT32 = 0x7fffffff;
+-const INT32 CNCSJPCBuffer::MININT8 = (-1 * (signed)CNCSJPCBuffer::MAXINT8 - 1);
+-const INT32 CNCSJPCBuffer::MININT16 = (-1 * (signed)CNCSJPCBuffer::MAXINT16 - 1);
+-const INT32 CNCSJPCBuffer::MININT32 = (-1 * (signed)CNCSJPCBuffer::MAXINT32 - 1);
++const UINT32 CNCSJPCBuffer::NCS_MAXINT8 = 0x7f;
++const UINT32 CNCSJPCBuffer::NCS_MAXINT16 = 0x7fff;
++const UINT32 CNCSJPCBuffer::NCS_MAXINT32 = 0x7fffffff;
++const INT32 CNCSJPCBuffer::NCS_MININT8 = (-1 * (signed)CNCSJPCBuffer::NCS_MAXINT8 - 1);
++const INT32 CNCSJPCBuffer::NCS_MININT16 = (-1 * (signed)CNCSJPCBuffer::NCS_MAXINT16 - 1);
++const INT32 CNCSJPCBuffer::NCS_MININT32 = (-1 * (signed)CNCSJPCBuffer::NCS_MAXINT32 - 1);
+
+ const UINT32 CNCSJPCBuffer::AT_OWNER = (1 << 0);
+ const UINT32 CNCSJPCBuffer::AT_CHILD = (1 << 1);
+@@ -308,27 +308,27 @@
+ switch(m_eType) {
+ case CNCSJPCBuffer::BT_INT16:
+ // Optimise some common cases
+- if(nMin == MINUINT8 && nMax == MAXUINT8) {
++ if(nMin == NCS_MINUINT8 && nMax == NCS_MAXUINT8) {
+ // UINT8 range
+ for(x = 0; x < nWidth; x++) {
+ INT16 v = ((INT16*)m_pBuffer)[x];
+ if(v & 0xff00) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
+- if(v > (INT16)MAXUINT8) {
+- ((INT16*)m_pBuffer)[x] = MAXUINT8;
+- } else if(v < (INT16)MINUINT8) {
+- ((INT16*)m_pBuffer)[x] = MINUINT8;
++ if(v > (INT16)NCS_MAXUINT8) {
++ ((INT16*)m_pBuffer)[x] = NCS_MAXUINT8;
++ } else if(v < (INT16)NCS_MINUINT8) {
++ ((INT16*)m_pBuffer)[x] = NCS_MINUINT8;
+ }
+ }
+ }
+- } else if(nMin == MININT8 && nMax == MAXINT8) {
++ } else if(nMin == NCS_MININT8 && nMax == NCS_MAXINT8) {
+ // INT8 range
+ for(x = 0; x < nWidth; x++) {
+ INT16 v = ((INT16*)m_pBuffer)[x];
+ if(v & 0xff80) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
+- if(v > (INT16)MAXINT8) {
+- ((INT16*)m_pBuffer)[x] = MAXINT8;
+- } else if(v < (INT16)MININT8) {
+- ((INT16*)m_pBuffer)[x] = MININT8;
++ if(v > (INT16)NCS_MAXINT8) {
++ ((INT16*)m_pBuffer)[x] = NCS_MAXINT8;
++ } else if(v < (INT16)NCS_MININT8) {
++ ((INT16*)m_pBuffer)[x] = NCS_MININT8;
+ }
+ }
+ }
+@@ -345,27 +345,27 @@
+ break;
+ case CNCSJPCBuffer::BT_INT32:
+ // Optimise some common cases
+- if(nMin == MINUINT16 && nMax == MAXUINT16) {
++ if(nMin == NCS_MINUINT16 && nMax == NCS_MAXUINT16) {
+ // UINT16 range
+ for(x = 0; x < nWidth; x++) {
+ INT32 v = ((INT32*)m_pBuffer)[x];
+ if(v & 0xffff0000) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
+- if(v > (INT32)MAXUINT16) {
+- ((INT32*)m_pBuffer)[x] = MAXUINT16;
+- } else if(v < (INT32)MINUINT16) {
+- ((INT32*)m_pBuffer)[x] = MINUINT16;
++ if(v > (INT32)NCS_MAXUINT16) {
++ ((INT32*)m_pBuffer)[x] = NCS_MAXUINT16;
++ } else if(v < (INT32)NCS_MINUINT16) {
++ ((INT32*)m_pBuffer)[x] = NCS_MINUINT16;
+ }
+ }
+ }
+- } else if(nMin == MININT16 && nMax == MAXINT16) {
++ } else if(nMin == NCS_MININT16 && nMax == NCS_MAXINT16) {
+ // INT16 range
+ for(x = 0; x < nWidth; x++) {
+ INT32 v = ((INT32*)m_pBuffer)[x];
+ if(v & 0xffff8000) { // Top bit is sign bit, so this tests for both >nMax & <nMin in one
+- if(v > (INT32)MAXINT16) {
+- ((INT32*)m_pBuffer)[x] = MAXINT16;
+- } else if(v < (INT32)MININT16) {
+- ((INT32*)m_pBuffer)[x] = MININT16;
++ if(v > (INT32)NCS_MAXINT16) {
++ ((INT32*)m_pBuffer)[x] = NCS_MAXINT16;
++ } else if(v < (INT32)NCS_MININT16) {
++ ((INT32*)m_pBuffer)[x] = NCS_MININT16;
+ }
+ }
+ }
+@@ -403,13 +403,13 @@
+ return(Clip(NCSCeil(fMin), NCSFloor(fMax)));
+ break;
+ case CNCSJPCBuffer::BT_IEEE4:
+- if(fMin == MINUINT8 && fMax == MAXUINT8) {
++ if(fMin == NCS_MINUINT8 && fMax == NCS_MAXUINT8) {
+ for(x = 0; x < nWidth; x++) {
+ IEEE4 v = ((IEEE4*)m_pBuffer)[x];
+- if(v > MAXUINT8) {
+- ((IEEE4*)m_pBuffer)[x] = MAXUINT8;
+- } else if(v < MINUINT8) {
+- ((IEEE4*)m_pBuffer)[x] = MINUINT8;
++ if(v > NCS_MAXUINT8) {
++ ((IEEE4*)m_pBuffer)[x] = NCS_MAXUINT8;
++ } else if(v < NCS_MINUINT8) {
++ ((IEEE4*)m_pBuffer)[x] = NCS_MINUINT8;
+ }
+ }
+ } else {
+diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCPLTMarker.cpp
+--- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCPLTMarker.cpp Wed Sep 30 11:55:26 2009 +0100
++++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCPLTMarker.cpp Wed Sep 30 12:20:09 2009 +0100
+@@ -173,7 +173,7 @@
+ nPrevHeaderLength = TMP.m_nHeaderLength;
+ TMP.m_nHeaderLength += (UINT32)nTotalHeaderLength;
+ }
+- if(nTotalHeaderLength > CNCSJPCBuffer::MAXUINT32) {
++ if(nTotalHeaderLength > CNCSJPCBuffer::NCS_MAXUINT32) {
+ // Too big to store cumulated length in the PacketLength struct, so
+ // set it back to false and reparse the entire PLT
+ m_bCumulativeLengths = false;
+@@ -202,7 +202,7 @@
+ nPrevHeaderLength = TMP.m_nHeaderLength;
+ TMP.m_nHeaderLength += nTotalHeaderLength;
+ }
+- if(nTotalHeaderLength > CNCSJPCBuffer::MAXUINT32) {
++ if(nTotalHeaderLength > CNCSJPCBuffer::NCS_MAXUINT32) {
+ // Too big to store cumulated length in the PacketLength struct, so
+ // set it back to false and reparse the entire PLT
+ m_bCumulativeLengths = false;
+diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCT1Coder.cpp
+--- libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCT1Coder.cpp Wed Sep 30 11:55:26 2009 +0100
++++ libecwj2-3.3/Source/C/NCSEcw/NCSJP2/NCSJPCT1Coder.cpp Wed Sep 30 12:20:09 2009 +0100
+@@ -917,7 +917,7 @@
+
+ int passno=0;
+ int passtype;
+- INT32 nMax = CNCSJPCBuffer::MININT32;
++ INT32 nMax = CNCSJPCBuffer::NCS_MININT32;
+
+ UINT32 nWidth = pDecBuf->GetWidth();
+ UINT32 nHeight = pDecBuf->GetHeight();
+@@ -956,7 +956,7 @@
+ UINT32 nSubWidth = nWidth / 8;
+
+ __m128 mm7 = _mm_set1_ps(fRatio);
+- __m128i mm4 = _mm_set1_epi16((short)CNCSJPCBuffer::MININT16);
++ __m128i mm4 = _mm_set1_epi16((short)CNCSJPCBuffer::NCS_MININT16);
+
+ for(UINT32 y = 0; y < nHeight; y++) {
+ INT16 *pSrc = (INT16*)pDecBuf->GetPtr() + y * nDecStep;
+@@ -1008,7 +1008,7 @@
+ UINT32 nSubWidth = nWidth / 4;
+
+ __m128 mm7 = _mm_set1_ps(fRatio);
+- __m64 mm4 = _mm_set1_pi16((short)CNCSJPCBuffer::MININT16);
++ __m64 mm4 = _mm_set1_pi16((short)CNCSJPCBuffer::NCS_MININT16);
+
+ for(UINT32 y = 0; y < nHeight; y++) {
+ INT16 *pSrc = (INT16*)pDecBuf->GetPtr() + y * nDecStep;
+diff -r 486075d14769 -r d53918598fbf libecwj2-3.3/Source/include/NCSJPCBuffer.h
+--- libecwj2-3.3/Source/include/NCSJPCBuffer.h Wed Sep 30 11:55:26 2009 +0100
++++ libecwj2-3.3/Source/include/NCSJPCBuffer.h Wed Sep 30 12:20:09 2009 +0100
+@@ -48,30 +48,30 @@
+ class NCSJPC_EXPORT_ALL CNCSJPCBuffer: public CNCSJPCRect {
+ public:
+ /** Maximum UINT8 value */
+- static const UINT32 MAXUINT8;
++ static const UINT32 NCS_MAXUINT8;
+ /** Maximum UINT16 value */
+- static const UINT32 MAXUINT16;
++ static const UINT32 NCS_MAXUINT16;
+ /** Maximum UINT32 value */
+- static const UINT32 MAXUINT32;
++ static const UINT32 NCS_MAXUINT32;
+ /** Minimum UINT8 value */
+- static const UINT32 MINUINT8;
++ static const UINT32 NCS_MINUINT8;
+ /** Minimum UINT16 value */
+- static const UINT32 MINUINT16;
++ static const UINT32 NCS_MINUINT16;
+ /** Minimum UINT32 value */
+- static const UINT32 MINUINT32;
++ static const UINT32 NCS_MINUINT32;
+
+ /** Maximum INT8 value */
+- static const UINT32 MAXINT8;
++ static const UINT32 NCS_MAXINT8;
+ /** Maximum INT16 value */
+- static const UINT32 MAXINT16;
++ static const UINT32 NCS_MAXINT16;
+ /** Maximum INT32 value */
+- static const UINT32 MAXINT32;
++ static const UINT32 NCS_MAXINT32;
+ /** Minimum INT8 value */
+- static const INT32 MININT8;
++ static const INT32 NCS_MININT8;
+ /** Minimum INT16 value */
+- static const INT32 MININT16;
++ static const INT32 NCS_MININT16;
+ /** Minimum INT32 value */
+- static const INT32 MININT32;
++ static const INT32 NCS_MININT32;
+
+ /**
+ * SystemInfo class - Some basic system capabilities we care about.
diff --git a/gis/libecwj2/libecwj2-3.3-wcharfix.patch b/gis/libecwj2/libecwj2-3.3-wcharfix.patch
new file mode 100644
index 0000000000..b00729c47c
--- /dev/null
+++ b/gis/libecwj2/libecwj2-3.3-wcharfix.patch
@@ -0,0 +1,15 @@
+diff -Nur libecwj2-3.3-orig/Source/C/NCSUtil/NCSPrefsXML.cpp libecwj2-3.3-wcharfix/Source/C/NCSUtil/NCSPrefsXML.cpp
+--- libecwj2-3.3-orig/Source/C/NCSUtil/NCSPrefsXML.cpp 2006-07-03 03:15:12.000000000 +0200
++++ libecwj2-3.3-wcharfix/Source/C/NCSUtil/NCSPrefsXML.cpp 2012-09-12 21:51:19.477487746 +0200
+@@ -32,7 +32,11 @@
+ } else {
+ char *pHomeDir = getenv("HOME");
+ if( pHomeDir ) {
++#ifdef NCS_BUILD_UNICODE
++ sUserPrefsFile.Format( NCS_T("%s%ls"), pHomeDir, NCS_T("/.erm/ncsuserprefs.xml") );
++#else
+ sUserPrefsFile.Format( NCS_T("%s%s"), pHomeDir, NCS_T("/.erm/ncsuserprefs.xml") );
++#endif
+ } else {
+ sUserPrefsFile = NCS_T("/etc/erm/ncsuserprefs.xml");
+ }
diff --git a/gis/libecwj2/libecwj2.SlackBuild b/gis/libecwj2/libecwj2.SlackBuild
new file mode 100644
index 0000000000..7a6cfd26c4
--- /dev/null
+++ b/gis/libecwj2/libecwj2.SlackBuild
@@ -0,0 +1,126 @@
+#!/bin/bash
+
+# Slackware build script for libecwj2
+
+# Copyright 2014-2022 Giancarlo Dessì, Cagliari IT
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=libecwj2
+VERSION=${VERSION:-3.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+SRCVER=2006-09-06
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+
+# Create $PKG/usr/include because make install does not do it
+mkdir $PKG/usr
+mkdir $PKG/usr/include
+
+unzip $CWD/$PRGNAM-$VERSION-$SRCVER.zip
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Apply some patches to the original source code
+# thanks to Authors
+# see http://osgeo-org.1560.x6.nabble.com/ECW-support-on-Fedora-Linux-error-td4991388.html
+# and http://wiki.openstreetmap.org/wiki/ECW#Howto_install_gdal_with_ECW_support
+
+# Patch downloaded from http://trac.osgeo.org/gdal/raw-attachment/ticket/3162/libecwj2-3.3-msvc90-fixes.patch
+patch -p1 <$CWD/libecwj2-3.3-msvc90-fixes.patch
+
+# Patch downloaded from http://osgeo-org.1560.x6.nabble.com/attachment/5001530/0/libecwj2-3.3-wcharfix.patch
+patch -p0 <$CWD/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch
+
+# Patch downloaded from http://trac.osgeo.org/gdal/raw-attachment/ticket/3366/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch
+patch -p1 <$CWD/libecwj2-3.3-wcharfix.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a License.txt Build.txt SDK.pdf $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/libecwj2/libecwj2.info b/gis/libecwj2/libecwj2.info
new file mode 100644
index 0000000000..259b0f701e
--- /dev/null
+++ b/gis/libecwj2/libecwj2.info
@@ -0,0 +1,10 @@
+PRGNAM="libecwj2"
+VERSION="3.3"
+HOMEPAGE="https://sourceforge.net/projects/libecw-legacy/"
+DOWNLOAD="https://sourceforge.net/projects/libecw-legacy/files/libecwj2-3.3-2006-09-06.zip/download"
+MD5SUM="acc04e07153c2a2a6595b3e2ebf34432"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Giancarlo Dessì"
+EMAIL="slack@giand.it"
diff --git a/gis/libecwj2/slack-desc b/gis/libecwj2/slack-desc
new file mode 100644
index 0000000000..eb8dd0fafa
--- /dev/null
+++ b/gis/libecwj2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libecwj2: libecwj2 (translator library for raster geospatial data)
+libecwj2:
+libecwj2: libecwj2 is an old library and the only one that extends the support
+libecwj2: of GDAL to non-free graphic formats ECW and JPEG 2000.
+libecwj2:
+libecwj2:
+libecwj2:
+libecwj2:
+libecwj2: Repository: https://sourceforge.net/projects/libecw-legacy/
+libecwj2:
+libecwj2:
diff --git a/gis/libgeotiff/libgeotiff.SlackBuild b/gis/libgeotiff/libgeotiff.SlackBuild
index 425706e1d2..e090ebf422 100644
--- a/gis/libgeotiff/libgeotiff.SlackBuild
+++ b/gis/libgeotiff/libgeotiff.SlackBuild
@@ -1,8 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libgeotiff
# Copyright 2009 Marco Cecchetti (mrc.ildp@gmail.com)
+# Previously maintained by David Spencer <baildon.research@googlemail.com>
+# Copyright 2024 Gregory J. L. Tourte <artourter@gmail.com>
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +25,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Maintained by David Spencer <baildon.research@googlemail.com>
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libgeotiff
-VERSION=${VERSION:-1.4.2}
+VERSION=${VERSION:-1.7.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +42,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -66,10 +78,8 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
# We'll stick with autotools because the new cmake build is a train wreck.
# This means you don't get inline EPSG CSV, which isn't supported in
@@ -85,15 +95,18 @@ LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
--localstatedir=/var \
--mandir=/usr/man \
--datadir=/usr/share \
- --infodir=/usr/info \
--with-zlib=yes \
--with-jpeg=yes \
+ --with-proj=yes \
--disable-static \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -102,7 +115,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- COPYING ChangeLog LICENSE README \
+ ChangeLog COPYING LICENSE NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -110,4 +123,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/libgeotiff/libgeotiff.info b/gis/libgeotiff/libgeotiff.info
index a43bb292f6..65f30498dd 100644
--- a/gis/libgeotiff/libgeotiff.info
+++ b/gis/libgeotiff/libgeotiff.info
@@ -1,10 +1,10 @@
PRGNAM="libgeotiff"
-VERSION="1.4.2"
+VERSION="1.7.1"
HOMEPAGE="http://trac.osgeo.org/geotiff/"
-DOWNLOAD="http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.4.2.tar.gz"
-MD5SUM="96ab80e0d4eff7820579957245d844f8"
+DOWNLOAD="http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.7.1.tar.gz"
+MD5SUM="22879ac6f83460605f9c39147a2ccc7a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="proj"
-MAINTAINER="David Spencer"
-EMAIL="baildon.research@googlemail.com"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/librasterlite/0001-fix-autotools.patch.gz b/gis/librasterlite/0001-fix-autotools.patch.gz
new file mode 100644
index 0000000000..3132200872
--- /dev/null
+++ b/gis/librasterlite/0001-fix-autotools.patch.gz
Binary files differ
diff --git a/gis/librasterlite/librasterlite.SlackBuild b/gis/librasterlite/librasterlite.SlackBuild
index 0052a009a6..4ac2da1bad 100644
--- a/gis/librasterlite/librasterlite.SlackBuild
+++ b/gis/librasterlite/librasterlite.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for librasterlite
@@ -22,26 +22,36 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=librasterlite
VERSION=${VERSION:-1.1g}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -62,6 +72,7 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
+zcat $CWD/0001-fix-autotools.patch.gz | patch -p1
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,6 +80,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+autoreconf -vif
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-ldl" \
@@ -89,8 +102,10 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/lib*/*.la
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/librttopo/README b/gis/librttopo/README
new file mode 100644
index 0000000000..87f86ced7a
--- /dev/null
+++ b/gis/librttopo/README
@@ -0,0 +1,11 @@
+The RT Topology Library exposes an API to create and manage standard
+(ISO 13249 aka SQL/MM) topologies using user-provided data stores and
+released under the GNU GPL license (version 2 or later).
+
+The code is derived from PostGIS liblwgeom library enhanced to provide
+thread-safety, have less dependencies and be independent from PostGIS
+release cycles.
+
+The RT Topology Library was funded by "Regione Toscana - SITA" (CIG:
+6445512CC1), which also funded many improvements in the originating
+liblwgeom.
diff --git a/gis/spatialite_gui/spatialite_gui.SlackBuild b/gis/librttopo/librttopo.SlackBuild
index 830f79b106..569c9ec8ab 100644
--- a/gis/spatialite_gui/spatialite_gui.SlackBuild
+++ b/gis/librttopo/librttopo.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for spatialite-gui
-# Copyright 2015 Alexander Bruy <alexander.bruy@gmail.com>
+# Slackware build script for librttopo
+
+# Copyright 2023 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,26 +22,33 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=spatialite_gui
-VERSION=${VERSION:-1.7.1}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=librttopo
+VERSION=${VERSION:-1.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -58,23 +66,23 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-LDFLAGS="-ldl" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
+ --localstatedir=/var \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-static \
--build=$ARCH-slackware-linux
@@ -82,15 +90,19 @@ LDFLAGS="-ldl" \
make
make install DESTDIR=$PKG
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING CREDITS NEWS.md README.md TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/librttopo/librttopo.info b/gis/librttopo/librttopo.info
new file mode 100644
index 0000000000..3f6a201e7e
--- /dev/null
+++ b/gis/librttopo/librttopo.info
@@ -0,0 +1,10 @@
+PRGNAM="librttopo"
+VERSION="1.1.0"
+HOMEPAGE="https://git.osgeo.org/gitea/rttopo/librttopo/"
+DOWNLOAD="https://git.osgeo.org/gitea/rttopo/librttopo/archive/librttopo-1.1.0.tar.gz"
+MD5SUM="0952b78943047ca69a9e6cbef6146869"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="geos"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/librttopo/slack-desc b/gis/librttopo/slack-desc
new file mode 100644
index 0000000000..2db6351e2b
--- /dev/null
+++ b/gis/librttopo/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+librttopo: librttopo (RT Topology Library)
+librttopo:
+librttopo: The RT Topology Library exposes an API to create and manage standard
+librttopo: (ISO 13249 aka SQL/MM) topologies using user-provided data stores.
+librttopo: The code is derived from PostGIS liblwgeom library enhanced to provide
+librttopo: thread-safety, have less dependencies and be independent from PostGIS
+librttopo: release cycles.
+librttopo: The RT Topology Library was funded by "Regione Toscana - SITA"
+librttopo: (CIG: 6445512CC1), which also funded many improvements in the
+librttopo: originating liblwgeom.
+librttopo:
diff --git a/gis/libspatialindex/README b/gis/libspatialindex/README
index f5c891e73a..d120164e2d 100644
--- a/gis/libspatialindex/README
+++ b/gis/libspatialindex/README
@@ -1,6 +1,6 @@
-libspatialindex provides an extensible framework that support robust spatial
-indexing methods and sophisticated spatial queries. Main features are:
-generic main memory and disk based storage managers, R*-tree index (also
-supports linear and quadratic splitting), MVR-tree index (a.k.a. PPR-tree),
-TPR-tree index, advanced query capabilities, using Strategy and Visitor
-patterns, STR packing / bulk loading etc.
+libspatialindex provides an extensible framework that support robust
+spatial indexing methods and sophisticated spatial queries. Main
+features are: generic main memory and disk based storage managers,
+R*-tree index (also supports linear and quadratic splitting), MVR-tree
+index (a.k.a. PPR-tree), TPR-tree index, advanced query capabilities,
+using Strategy and Visitor patterns, STR packing / bulk loading etc.
diff --git a/gis/libspatialindex/libspatialindex.SlackBuild b/gis/libspatialindex/libspatialindex.SlackBuild
index 57e7b4f4b7..c7471bbed3 100644
--- a/gis/libspatialindex/libspatialindex.SlackBuild
+++ b/gis/libspatialindex/libspatialindex.SlackBuild
@@ -1,7 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libspatialindex
+#
# Copyright 2012 Alexander Bruy <alexander.bruy@gmail.com>
+# Copyright 2023 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,27 +23,35 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libspatialindex
-TARBALLNAME=spatialindex
-VERSION=${VERSION:-1.7.1}
+VERSION=${VERSION:-1.9.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=spatialindex
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -59,9 +69,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xjvf $CWD/$TARBALLNAME-src-$VERSION.tar.bz2
-cd $TARBALLNAME-src-$VERSION
+rm -rf $SRCNAM-src-$VERSION
+tar xjvf $CWD/$SRCNAM-src-$VERSION.tar.bz2
+cd $SRCNAM-src-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -69,30 +79,27 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-static=no \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+mkdir build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog INSTALL INSTALL.WIN NEWS README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/libspatialindex/libspatialindex.info b/gis/libspatialindex/libspatialindex.info
index add4a3cdb9..7ec4edc0f2 100644
--- a/gis/libspatialindex/libspatialindex.info
+++ b/gis/libspatialindex/libspatialindex.info
@@ -1,10 +1,10 @@
PRGNAM="libspatialindex"
-VERSION="1.7.1"
-HOMEPAGE="http://libspatialindex.github.com/"
-DOWNLOAD="http://download.osgeo.org/libspatialindex/spatialindex-src-1.7.1.tar.bz2"
-MD5SUM="15e5fcff393a56ab9aa7553e4a9cd64a"
+VERSION="1.9.3"
+HOMEPAGE="https://libspatialindex.github.io/"
+DOWNLOAD="https://github.com/libspatialindex/libspatialindex/releases/download/1.9.3/spatialindex-src-1.9.3.tar.bz2"
+MD5SUM="db89182e1ac9cb12a88db958de2797df"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Alexander Bruy"
-EMAIL="alexander.bruy@gmail.com"
+MAINTAINER="Isaac Yu"
+EMAIL="isaacyu@protonmail.com"
diff --git a/gis/libspatialindex/slack-desc b/gis/libspatialindex/slack-desc
index 9056eb9703..361862a004 100644
--- a/gis/libspatialindex/slack-desc
+++ b/gis/libspatialindex/slack-desc
@@ -11,7 +11,7 @@ libspatialindex:
libspatialindex: This library provides and An extensible framework that will support
libspatialindex: robust spatial indexing methods and sophisticated spatial queries.
libspatialindex:
-libspatialindex: Homepage: http://libspatialindex.github.com/
+libspatialindex: Homepage: http://libspatialindex.github.io/
libspatialindex:
libspatialindex:
libspatialindex:
diff --git a/gis/libspatialite/README b/gis/libspatialite/README
index 52bbc54ffb..0a58e0d43e 100644
--- a/gis/libspatialite/README
+++ b/gis/libspatialite/README
@@ -1,9 +1,6 @@
-SpatiaLite is an open source library intended to extend the SQLite core
-to support fully fledged Spatial SQL capabilities. SpatiaLite is smoothly
-integrated into SQLite to provide a complete and powerful Spatial DBMS
-(mostly OGC-SFS compliant). Using SQLite + SpatiaLite you can effectively
-deploy an alternative open source Spatial DBMS roughly equivalent to
-PostgreSQL + PostGIS.
-
-liblwgeom (postgis) is optional but strongly recommended dependency. To build
-spatialite with liblwgeom support set LWGEOM=yes.
+SpatiaLite is an open source library intended to extend the SQLite
+core to support fully fledged Spatial SQL capabilities. SpatiaLite
+is smoothly integrated into SQLite to provide a complete and powerful
+Spatial DBMS (mostly OGC-SFS compliant). Using SQLite + SpatiaLite you
+can effectively deploy an alternative open source Spatial DBMS roughly
+equivalent to PostgreSQL + PostGIS.
diff --git a/gis/libspatialite/libspatialite.SlackBuild b/gis/libspatialite/libspatialite.SlackBuild
index 31f493a5eb..ad44b1f1ba 100644
--- a/gis/libspatialite/libspatialite.SlackBuild
+++ b/gis/libspatialite/libspatialite.SlackBuild
@@ -1,6 +1,8 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for SpatiaLite
+# Slackware build script for libspatialite
+#
+# Copyright 2023-2024 Gregory J. L. Tourte <artourter@gmail.com>
# Copyright 2012-2015 Alexander Bruy <alexander.bruy@gmail.com>
# All rights reserved.
#
@@ -21,30 +23,33 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libspatialite
-VERSION=${VERSION:-4.2.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-5.1.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$LWGEOM" = "yes" ] ; then
- LWGEOM_SUPPORT="--enable-lwgeom"
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -67,10 +72,8 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -82,7 +85,22 @@ LDFLAGS="-ldl" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-static \
--enable-freexl \
- $LWGEOM_SUPPORT \
+ --enable-rttopo \
+ --enable-mathsql \
+ --enable-proj \
+ --enable-iconv \
+ --enable-epsg \
+ --enable-geos \
+ --enable-gcp \
+ --enable-geosadvanced \
+ --enable-geosreentrant \
+ --enable-geos370 \
+ --enable-geos3100 \
+ --enable-geos3100 \
+ --enable-libxml2 \
+ --enable-minizip \
+ --enable-geopackage \
+ --enable-examples \
--build=$ARCH-slackware-linux
make
@@ -92,12 +110,14 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING INSTALL README README.coverage spatialite-sql-latest.html \
+cp -a AUTHORS COPYING README README.coverage spatialite-sql-latest.html \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/lib*/*.la
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/libspatialite/libspatialite.info b/gis/libspatialite/libspatialite.info
index 359559f802..f5d8039608 100644
--- a/gis/libspatialite/libspatialite.info
+++ b/gis/libspatialite/libspatialite.info
@@ -1,10 +1,10 @@
PRGNAM="libspatialite"
-VERSION="4.2.0"
+VERSION="5.1.0"
HOMEPAGE="https://www.gaia-gis.it/fossil/libspatialite/index"
-DOWNLOAD="http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.2.0.tar.gz"
-MD5SUM="83305ed694a77152120d1f74c5151779"
+DOWNLOAD="http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-5.1.0.tar.gz"
+MD5SUM="2db597114bd6ee20db93de3984fd116c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="proj geos freexl postgis"
-MAINTAINER="Alexander Bruy"
-EMAIL="alexander.bruy@gmail.com"
+REQUIRES="proj librttopo freexl"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/mapnik/README b/gis/mapnik/README
index cf54387091..831ea83dcd 100644
--- a/gis/mapnik/README
+++ b/gis/mapnik/README
@@ -1,8 +1,7 @@
-Mapnik is a free toolkit for developing mapping applications. Mapnik can be
-used for both desktop map design and web development.
+Mapnik is a free toolkit for developing mapping applications. Mapnik
+can be used for both desktop map design and web development.
Optional dependencies:
- gdal: GDAL and OGR plugin support
-- libwebp: WebP image support
-- postgis: PostGIS plugin support
+- postgresql: PostGIS plugin support
- proj: reprojection support
diff --git a/gis/mapnik/mapnik.SlackBuild b/gis/mapnik/mapnik.SlackBuild
index 0aa8c87140..ce36a0ea4e 100644
--- a/gis/mapnik/mapnik.SlackBuild
+++ b/gis/mapnik/mapnik.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# SlackBuild for Mapnik
#
-# Copyright 2012-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2012-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=mapnik
-VERSION=${VERSION:-3.0.22}
-VARIANT=1.1.5
+VERSION=${VERSION:-3.1.0}
+VARIANT=1.2.0
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -83,19 +93,17 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-./configure \
- CC=clang \
- CXX=clang++ \
- JOBS=$JOBS \
+python3 scons/scons.py configure \
+ FAST=True \
CUSTOM_CFLAGS="$SLKCFLAGS" \
CUSTOM_CXXFLAGS="$SLKCFLAGS" \
PREFIX=/usr \
LIBDIR_SCHEMA=lib$LIBDIRSUFFIX \
SYSTEM_FONTS=/usr/share/fonts \
- INPUT_PLUGINS=sqlite,ogr,shape,geojson,gdal,pgraster,raster,topojson,postgis,csv \
- CUSTOM_DEFINES="$CUSTOM_DEFINES" \
+ INPUT_PLUGINS=all \
+ CUSTOM_DEFINES="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 $CUSTOM_DEFINES" \
DESTDIR=$PKG
-make install
+make PYTHON=python3 install
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -110,4 +118,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/mapnik/mapnik.info b/gis/mapnik/mapnik.info
index 5f6866cda4..3704b3ae58 100644
--- a/gis/mapnik/mapnik.info
+++ b/gis/mapnik/mapnik.info
@@ -1,13 +1,12 @@
PRGNAM="mapnik"
-VERSION="3.0.22"
+VERSION="3.1.0"
HOMEPAGE="https://mapnik.org"
-DOWNLOAD="https://github.com/mapnik/mapnik/archive/v3.0.22/mapnik-3.0.22.tar.gz \
- https://github.com/mapbox/variant/archive/v1.1.5/variant-1.1.5.tar.gz"
-MD5SUM="2e26d8614484b8d4015c42f91a4a2dff \
- efeccaf1adb1da180983445020275c9c"
+DOWNLOAD="https://github.com/mapnik/mapnik/archive/v3.1.0/mapnik-3.1.0.tar.gz \
+ https://github.com/mapbox/variant/archive/v1.2.0/variant-1.2.0.tar.gz"
+MD5SUM="a83ef25e8df0e533cba12f094a17eeac \
+ 695181bbd9a0fd577a4bed4a07c960fb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
-
diff --git a/gis/merkaartor/README b/gis/merkaartor/README
index 3d3f5f9df0..a60e997674 100644
--- a/gis/merkaartor/README
+++ b/gis/merkaartor/README
@@ -2,3 +2,11 @@ Merkaartor is an openstreetmap mapping program.
Merkaartor focuses on providing a visually pleasing but
performant editing environment for free geographical data.
+
+gpsd is an optional dependency autodetected enabled by default
+if found in the system. You can disable the support by passing
+ GPSD=no ./merkaartor.SlackBuild
+
+The option -DWEBENGINE is set to ON by default. You can disable
+it by passing
+ WEBENGINE=no ./merkaartor.SlackBuild
diff --git a/gis/merkaartor/merkaartor.SlackBuild b/gis/merkaartor/merkaartor.SlackBuild
index 21655c5d14..123e5d7e75 100644
--- a/gis/merkaartor/merkaartor.SlackBuild
+++ b/gis/merkaartor/merkaartor.SlackBuild
@@ -1,29 +1,64 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for Merkaartor
+# Slackware build script for merkaartor
# Written by otzy_007 (oz@oprod.net)
+# Maintained 2020-2021 by Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Maintained 2023 by Giancarlo Dessi, Cagliari, IT
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=merkaartor
-VERSION=${VERSION:-0.18.2}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.19.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+if [ -x /etc/rc.d/rc.gpsd ] ; then
+ gpsd="-DGPSD=ON" ; [ "${GPSD:-yes}" = "no" ] && gpsd=""
+else
+ gpsd=""
+fi
+
+webengine="-DWEBENGINE=ON" ; [ "${WEBENGINE:-yes}" = "no" ] && webengine=""
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -51,25 +86,33 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make -C translations release
+# fix build failure in current
+if [ -f /usr/lib${LIBDIRSUFFIX}/libexiv2.so.0.28* ] ; then
+ sed -i ./src/Docks/GeoImageDock.cpp -e "s/AutoPtr/UniquePtr/g"
+fi
-qmake \
- QMAKE_CFLAGS="$SLKCFLAGS" \
- QMAKE_CXXFLAGS="$SLKCFLAGS" \
- NODEBUG=1 \
- PREFIX=/usr \
- DOCDIR=/usr/doc/$PRGNAM-$VERSION \
- LIBDIR="/usr/lib${LIBDIRSUFFIX}"
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ $gpsd \
+ $webengine \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
-make
-make install INSTALL_ROOT=$PKG
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS CHANGELOG CREDITS HACKING INSTALL LICENSE LICENSE.rtf TODO \
+ AUTHORS CHANGELOG CREDITS HACKING.md LICENSE LICENSE.rtf README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -78,4 +121,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/merkaartor/merkaartor.info b/gis/merkaartor/merkaartor.info
index 222414b326..5e426ded21 100644
--- a/gis/merkaartor/merkaartor.info
+++ b/gis/merkaartor/merkaartor.info
@@ -1,10 +1,10 @@
PRGNAM="merkaartor"
-VERSION="0.18.2"
+VERSION="0.19.0"
HOMEPAGE="http://www.merkaartor.be"
-DOWNLOAD="https://github.com/openstreetmap/merkaartor/archive/0.18.2/merkaartor-0.18.2.tar.gz"
-MD5SUM="20bbcc08ae0b36819a73f7754a44c5fe"
+DOWNLOAD="https://github.com/openstreetmap/merkaartor/archive/0.19.0/merkaartor-0.19.0.tar.gz"
+MD5SUM="3696fde6c0521182e9e8c51563d68b94"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="gdal"
-MAINTAINER="otzy_007"
-EMAIL="oz@oprod.net"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/mobac/README b/gis/mobac/README
deleted file mode 100644
index 0c987b1f4e..0000000000
--- a/gis/mobac/README
+++ /dev/null
@@ -1,10 +0,0 @@
-Mobile Atlas Creator (formerly known as TrekBuddy Atlas Creator) is an open
-source program which creates offline atlases for GPS handhelds and cell phone
-applications like TrekBuddy, AndNav and other Android and WindowsCE-based
-applications. For the full list of supported applications please see the
-features section. Additionally individual maps can be exported as one large PNG
-image with calibration MAP file for OziExplorer. As source for an offline atlas
-Mobile Atlas Creator can use a large number of different online maps such as
-OpenStreetMap and other online map providers.
-
-The SlackBuild will create /usr/bin/mobac to launch Mobile Atlas Creator.
diff --git a/gis/mobac/directories.ini b/gis/mobac/directories.ini
deleted file mode 100644
index fd4a41091c..0000000000
--- a/gis/mobac/directories.ini
+++ /dev/null
@@ -1,42 +0,0 @@
-################################################
-# MOBAC system wide directory configuration
-################################################
-#
-# For activating this configuration file rename it to "directories.ini"
-# and place it in the same directory as the file Mobile_Atlas_Creator.jar
-#
-# You can use any available system variable - but you have to write it in Java notation
-#
-# Therefore the tmp directory is available on all platforms via "${TMP}"
-#
-# Besides the default system variables MOBAC defines two own variables:
-#
-# ${home}
-# user home directory, e.g. /home/username/ on Linux
-#
-# ${mobac-prog}
-# directory where MOBAC (or to be detailed Mobile_Atlas_Creator.jar) has been installed into
-#
-# Notes:
-# Absolute pathes are also valid
-
-#Uncomment one of the following lines starting with "mobac." for redefining the directory
-
-# Directory where to save settings.xml and search for log4j.xml
-mobac.usersettingsdir=${home}/.mobac
-
-# Directory where to save and load atlas profiles
-mobac.atlasprofilesdir=${home}/.mobac
-
-# Directory where to search "map packs", custom maps and beanShell map sources
-# Updated map packs are also saved into this directory overwriting old ones
-mobac.mapsourcesdir=${mobac-prog}/mapsources
-
-# Directory where to create the cache databases of downloaded tiles
-mobac.tilestoredir=${home}/.cache/mobac
-
-# Directory where to save config files for executing external tools from within MOBAC
-#mobac.toolsdir=${mobac-prog}/tools
-
-# Directory where to create the temporary download container
-mobac.tmpdir=/tmp
diff --git a/gis/mobac/mobac.SlackBuild b/gis/mobac/mobac.SlackBuild
deleted file mode 100644
index 1364e36a54..0000000000
--- a/gis/mobac/mobac.SlackBuild
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for mobac
-# Benjamin Trigona-Harany
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=mobac
-SRCNAM=Mobile\ Atlas\ Creator
-VERSION=${VERSION:-1.9.16}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-MOBAC_HOME=usr/share/$PRGNAM
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG/$MOBAC_HOME $PKG/usr/bin $OUTPUT
-cd $TMP
-rm -rf $PRGNAM
-mkdir $PRGNAM
-cd $PRGNAM
-unzip "$CWD/$SRCNAM $VERSION.zip"
-chown -R root:root .
-
-sed -i "s/-jar /\-jar \/usr\/share\/$PRGNAM\//g" start.sh
-cp -ar *.jar mapsources start.sh $PKG/$MOBAC_HOME
-cp $CWD/directories.ini $PKG/$MOBAC_HOME
-
-chmod +x $PKG/$MOBAC_HOME/start.sh
-ln -s /$MOBAC_HOME/start.sh $PKG/usr/bin/$PRGNAM
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGELOG.txt README.HTM ReleaseNotes.txt gpl.txt $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/mobac/mobac.info b/gis/mobac/mobac.info
deleted file mode 100644
index 1dda0eae71..0000000000
--- a/gis/mobac/mobac.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="mobac"
-VERSION="1.9.16"
-HOMEPAGE="http://mobac.sourceforge.net/"
-DOWNLOAD="http://sourceforge.net/projects/mobac/files/Mobile%20Atlas%20Creator/MOBAC%201.9/Mobile%20Atlas%20Creator%201.9.16.zip"
-MD5SUM="79e0412e5a084c2795a7a487cc6cb632"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="jdk"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/mobac/slack-desc b/gis/mobac/slack-desc
deleted file mode 100644
index d145335160..0000000000
--- a/gis/mobac/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-mobac: mobac (Mobile Atlas Creator)
-mobac:
-mobac: Mobile Atlas Creator (formerly known as TrekBuddy Atlas Creator) is
-mobac: an open source program which creates offline atlases for GPS handhelds
-mobac: and cell phone applications like TrekBuddy, AndNav and other Android
-mobac: and WindowuCE-based applications. For the full list of supported
-mobac: applications please see the features section. Additionally individual
-mobac: maps can be exported as one large PNG image with calibration MAP file
-mobac: for OziExplorer. As source for an offline atlas Mobile Atlas Creator
-mobac: can use a large number of different online maps such as OpenStreetMap
-mobac: and other online map providers.
diff --git a/gis/navit/navit.SlackBuild b/gis/navit/navit.SlackBuild
index bdfe25c6cc..ae63ec7946 100644
--- a/gis/navit/navit.SlackBuild
+++ b/gis/navit/navit.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for navit
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=navit
-VERSION=${VERSION:-R7651}
+VERSION=${VERSION:-0.5.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -72,7 +82,7 @@ find -L . \
mkdir -p build
cd build
cmake \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DSAMPLE_MAP=n \
@@ -86,11 +96,12 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mv $PKG/usr/share/man $PKG/usr/man
+cp -a man/* $PKG/usr/man
find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/share/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog COPYRIGHT README GPL-2 LGPL-2 $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING CONTRIBUTING.md CHANGELOG.md COPYRIGHT README.md GPL-2 LGPL-2 $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -98,4 +109,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/navit/navit.info b/gis/navit/navit.info
index b30a3e705f..0290e268be 100644
--- a/gis/navit/navit.info
+++ b/gis/navit/navit.info
@@ -1,8 +1,8 @@
PRGNAM="navit"
-VERSION="R7651"
+VERSION="0.5.6"
HOMEPAGE="https://www.navit-project.org"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/navit-R7651.tar.gz"
-MD5SUM="cf23a4bc24d1b552da80861b93e86343"
+DOWNLOAD="https://github.com/navit-gps/navit/archive/v0.5.6/navit-0.5.6.tar.gz"
+MD5SUM="98b93da6b70c928d825c1ede6691087a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild
index 0e1c9688c7..7c4a2a8780 100644
--- a/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild
+++ b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for opencpn-plugin-oesenc
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=opencpn-plugin-oesenc
-VERSION=${VERSION:-3.3.0}
+VERSION=${VERSION:-4.0.10}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=oesenc_pi
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -98,11 +108,11 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a Notes README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info
index 8b1de36b02..576e3c446b 100644
--- a/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info
+++ b/gis/opencpn-plugin-oesenc/opencpn-plugin-oesenc.info
@@ -1,8 +1,8 @@
PRGNAM="opencpn-plugin-oesenc"
-VERSION="3.3.0"
+VERSION="4.0.10"
HOMEPAGE="https://opencpn.org/OpenCPN/plugins/oesenc.html"
-DOWNLOAD="https://github.com/bdbcat/oesenc_pi/archive/v3.3.0/oesenc_pi-3.3.0.tar.gz"
-MD5SUM="01366411ef82a2d775a4f7b0f23d33d6"
+DOWNLOAD="https://github.com/bdbcat/oesenc_pi/archive/v4.0.10/oesenc_pi-4.0.10.tar.gz"
+MD5SUM="bfd9b8a1a1661990e95ee73bf86e6bd0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="opencpn"
diff --git a/gis/opencpn/README b/gis/opencpn/README
index 13429d3b66..7b1dd96ad5 100644
--- a/gis/opencpn/README
+++ b/gis/opencpn/README
@@ -3,15 +3,6 @@ plotter and navigation software, for use underway or as a planning
tool. OpenCPN is developed by a team of active sailors using real
world conditions for program testing and refinement.
-If you are upgrading or installing new, OpenCPN 5.x now requires
-that wxGTK3 be built with webkitgtk support. So you will have to
-install webkitgtk available here at SBo, then build and install
-wxGTK3.
-
-OpenCPN only looks for plugins in the "lib" directories. So on
-x86_64 we have to pass an environment variable to use plugins.
-The menu launcher will automatically set this for you, however
-if you choose to launch OpenCPN from the command line you must
-launch it with this command to get plugin support on x86_64.
-
-OPENCPN_PLUGIN_DIRS="/usr/lib64/opencpn" opencpn
+If you are upgrading or installing new, OpenCPN 5.2.x needs wxGTK3
+to be built with webkit support. So you will have to install
+webkit2gtk, available here at SBo, then build and install wxGTK3.
diff --git a/gis/opencpn/opencpn.SlackBuild b/gis/opencpn/opencpn.SlackBuild
index f0d12e610b..0204b254d9 100644
--- a/gis/opencpn/opencpn.SlackBuild
+++ b/gis/opencpn/opencpn.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for opencpn
-# Copyright 2019 Matt Dinslage, Springfield, MO
+# Copyright 2021 Matt Dinslage, Springfield, MO
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=opencpn
-VERSION=${VERSION:-5.0.0}
+VERSION=${VERSION:-5.2.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -61,7 +70,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/OpenCPN-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+tar xvf $CWD/OpenCPN-$VERSION.tar.gz
cd OpenCPN-$VERSION
chown -R root:root .
find -L . \
@@ -70,20 +79,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Apply patches to fix following issues...
-# Honor MANDIR
-# Honor LIBSUFFIXDIR
-# Fix building with newer cmake versions
-for patch in $CWD/patches/* ; do
- patch -p1 < $patch
-done
-
-# opencpn does not have specific checks for Slackware so it
-# defautls to a i386 arch. Change this for x86_64
+# Fix LIBDIR
if [ "$ARCH" = "x86_64" ]; then
- sed -i '0,/i386/s//x86_64/' CMakeLists.txt
+ sed -i '0,/"i386"/{s/"i386"/"x86_64"/}' cmake/GetArch.cmake
+ sed -i '0,/"lib"/{s/"lib"/"lib64"/}' cmake/GetArch.cmake
fi
+# Fix MANDIR
+sed -i 's,${PREFIX_DATA}/man/man1,/usr/man/man1,g' CMakeLists.txt
+
mkdir -p build
cd build
cmake \
@@ -91,6 +95,8 @@ cd build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DOPCPN_FORCE_GTK3=ON \
+ -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \
-DBUNDLE_GSHHS=CRUDE \
-DBUNDLE_TCDATA=ON \
-DBUNDLE_DOCS=ON \
@@ -99,6 +105,9 @@ cd build
make install DESTDIR=$PKG
cd ..
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -111,21 +120,18 @@ mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
rm -rf $PKG/usr/share/doc
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# Add an icon to /usr/share/pixmaps so menu launcher has icon
+rm -r $PKG/usr/share/icons/hicolor/*
+mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps
+cp $TMP/OpenCPN-$VERSION/src/bitmaps/other_svg_src/opencpn_logo.svg \
+ $PKG/usr/share/icons/hicolor/scalable/apps/opencpn.svg
+
mkdir -p $PKG/usr/share/pixmaps
convert $PKG/usr/share/icons/hicolor/scalable/apps/opencpn.svg -resize 256x256 \
$PKG/usr/share/pixmaps/opencpn.png
-# OpenCPN only looks for plugins in the "lib" directories. We
-# have to set an evnironment variable in order for OpenCPN to
-# find plugins in "lib64"
-if [ "$ARCH" = "x86_64" ]; then
- sed -i 's,Exec=opencpn,Exec=env OPENCPN_PLUGIN_DIRS="/usr/lib64/opencpn" opencpn,g' $PKG/usr/share/applications/opencpn.desktop
-fi
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/opencpn/opencpn.info b/gis/opencpn/opencpn.info
index b90d60ab9f..a44554b6bb 100644
--- a/gis/opencpn/opencpn.info
+++ b/gis/opencpn/opencpn.info
@@ -1,10 +1,10 @@
PRGNAM="opencpn"
-VERSION="5.0.0"
+VERSION="5.2.4"
HOMEPAGE="https://opencpn.org/"
-DOWNLOAD="https://github.com/OpenCPN/OpenCPN/archive/v5.0.0/OpenCPN-5.0.0.tar.gz"
-MD5SUM="a6e79c2c6f64037be1894b48b9a1014a"
+DOWNLOAD="https://github.com/OpenCPN/OpenCPN/archive/v5.2.4/OpenCPN-5.2.4.tar.gz"
+MD5SUM="9ca81bed7bca1706ecaac98a7578d6bb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gpsd tinyxml libmspack portaudio webkitgtk wxGTK3"
+REQUIRES="gpsd tinyxml libmspack portaudio lsb-release webkit2gtk wxGTK3"
MAINTAINER="M.Dinslage"
EMAIL="daedra1980@gmail.com"
diff --git a/gis/opencpn/patches/cmake_build_fix.patch b/gis/opencpn/patches/cmake_build_fix.patch
deleted file mode 100644
index aca98fe9f0..0000000000
--- a/gis/opencpn/patches/cmake_build_fix.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index fcec1191a..8df2a9e21 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -408,9 +408,9 @@ IF((_wx_selected_config MATCHES "qt-armv7"))
- ENDIF()
-
- IF((_wx_selected_config MATCHES "qt-armv7"))
-- SET(wxWidgets_USE_LIBS base core xml html adv aui)
-+ SET(wxWidgets_FIND_COMPONENTS base core xml html adv aui)
- ELSE()
-- SET(wxWidgets_USE_LIBS net xml html adv aui core base webview)
-+ SET(wxWidgets_FIND_COMPONENTS net xml html adv aui core base webview)
- ENDIF()
-
- OPTION (USE_GL "Enable OpenGL support" ON)
-@@ -436,7 +436,7 @@ IF (ARCH MATCHES "arm*" AND (NOT QT_ANDROID) AND CMAKE_SYSTEM_NAME MATCHES ".*Li
- SET(OPENGLES_FOUND "YES")
- SET(OPENGL_FOUND "YES")
-
-- SET(wxWidgets_USE_LIBS ${wxWidgets_USE_LIBS} gl )
-+ SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_FIND_COMPONENTS} gl )
- add_subdirectory(src/glshim)
-
- SET(OPENGL_LIBRARIES "GL_static" "EGL" "X11" "drm" )
-@@ -455,7 +455,7 @@ IF(QT_ANDROID)
- SET(OPENGLES_FOUND "YES")
- SET(OPENGL_FOUND "YES")
-
-- SET(wxWidgets_USE_LIBS ${wxWidgets_USE_LIBS} gl )
-+ SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_FIND_COMPONENTS} gl )
- add_subdirectory(src/glshim)
- ENDIF(QT_ANDROID)
-
-@@ -468,7 +468,7 @@ IF ((NOT OPENGLES_FOUND) AND (NOT QT_ANDROID))
- ENDIF(USE_GL)
-
- IF(OPENGL_FOUND)
-- SET(wxWidgets_USE_LIBS gl ${wxWidgets_USE_LIBS} )
-+ SET(wxWidgets_FIND_COMPONENTS gl ${wxWidgets_FIND_COMPONENTS} )
- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
-
- MESSAGE (STATUS "Found OpenGL...." )
-@@ -529,14 +529,14 @@ IF(NOT QT_ANDROID)
- ENDIF(MSVC)
-
- IF(WIN32 OR APPLE OR QT_ANDROID)
-- FIND_PACKAGE(wxWidgets)
-+ FIND_PACKAGE(wxWidgets COMPONENTS ${wxWidgets_FIND_COMPONENTS})
- if (wxWidgets_FOUND)
- message(STATUS "Found wxWidgets webview add-on")
- add_definitions(-DOCPN_USE_WEBVIEW)
- else ()
-- list(REMOVE_ITEM wxWidgets_USE_LIBS webview)
-+ list(REMOVE_ITEM wxWidgets_FIND_COMPONENTS webview)
- message(STATUS "Could not find wxWidgets webview add-on")
-- FIND_PACKAGE(wxWidgets REQUIRED)
-+ FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS ${wxWidgets_FIND_COMPONENTS})
- endif ()
- IF(MSYS)
- # this is to convert msys to windows paths, and handle the missing /usr
-@@ -1053,14 +1053,14 @@ IF(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
- set(wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --toolkit=gtk3)
- MESSAGE(STATUS "Building against GTK3...")
- ENDIF(GTK2_FOUND)
-- FIND_PACKAGE(wxWidgets)
-+ FIND_PACKAGE(wxWidgets COMPONENTS ${wxWidgets_FIND_COMPONENTS})
- if (wxWidgets_FOUND)
- message(STATUS "Found wxWidgets webview add-on")
- add_definitions(-DOCPN_USE_WEBVIEW)
- else ()
-- list(REMOVE_ITEM wxWidgets_USE_LIBS webview)
-+ list(REMOVE_ITEM wxWidgets_FIND_COMPONENTS webview)
- message(STATUS "Could not find wxWidgets webview add-on")
-- FIND_PACKAGE(wxWidgets REQUIRED)
-+ FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS ${wxWidgets_FIND_COMPONENTS})
- endif ()
- MESSAGE (STATUS "Found wxWidgets..." )
- MESSAGE (STATUS " wxWidgets Include: ${wxWidgets_INCLUDE_DIRS}")
diff --git a/gis/opencpn/patches/honor_mandir.patch b/gis/opencpn/patches/honor_mandir.patch
deleted file mode 100644
index 8a92dd86c8..0000000000
--- a/gis/opencpn/patches/honor_mandir.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -up OpenCPN-5.0.0/CMakeLists.txt.orig OpenCPN-5.0.0/CMakeLists.txt
---- OpenCPN-5.0.0/CMakeLists.txt.orig 2019-04-03 13:49:21.423885285 -0500
-+++ OpenCPN-5.0.0/CMakeLists.txt 2019-04-03 13:51:19.789880135 -0500
-@@ -91,6 +91,7 @@ SET(CMAKE_MODULE_PATH
- ${CMAKE_SOURCE_DIR}/cmake
- )
-
-+SET(MAN_PATH "man/man1")
-
- set (CMAKE_CXX_STANDARD 11)
- message(STATUS "Setting C++11 standard via cmake standard mechanism")
-@@ -2422,7 +2423,7 @@ IF(NOT APPLE)
- INSTALL(FILES src/bitmaps/other_svg_src/opencpn.svg DESTINATION ${PREFIX_DATA}/icons/hicolor/scalable/apps PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- INSTALL(FILES data/opencpn.desktop DESTINATION ${PREFIX_DATA}/applications PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
- INSTALL(FILES data/opencpn.appdata.xml DESTINATION ${PREFIX_DATA}/appdata PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
-- INSTALL(FILES opencpn.1 DESTINATION ${PREFIX_DATA}/man/man1 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
-+ INSTALL(FILES opencpn.1 DESTINATION ${MAN_PATH} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ )
- ENDIF(UNIX)
-
- ENDIF(NOT APPLE)
diff --git a/gis/opencpn/patches/opencpn-4.4.0-multilib-strict.patch b/gis/opencpn/patches/opencpn-4.4.0-multilib-strict.patch
deleted file mode 100644
index 877e7beb8c..0000000000
--- a/gis/opencpn/patches/opencpn-4.4.0-multilib-strict.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up OpenCPN-4.4.0/CMakeLists.txt.orig OpenCPN-4.4.0/CMakeLists.txt
---- OpenCPN-4.4.0/CMakeLists.txt.orig 2016-10-22 03:24:56.824710722 -0500
-+++ OpenCPN-4.4.0/CMakeLists.txt 2016-10-22 03:28:10.592724737 -0500
-@@ -101,6 +101,9 @@ IF (NOT WIN32)
- IF (EXISTS /etc/gentoo-release)
- SET (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
- ENDIF (EXISTS /etc/gentoo-release)
-+ IF (EXISTS /etc/slackware-version)
-+ SET (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
-+ ENDIF (EXISTS /etc/slackware-version)
- IF(APPLE)
- IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
- # IF (CMAKE_OSX_64)
-
diff --git a/gis/opengrads/README b/gis/opengrads/README
index 8e53ac4fed..ba9eb6f718 100644
--- a/gis/opengrads/README
+++ b/gis/opengrads/README
@@ -1,5 +1,6 @@
-The Grid Analysis and Display System (GrADS) is an interactive desktop tool for
-easy access, manipulation, and visualization of earth science data.
+The Grid Analysis and Display System (GrADS) is an interactive desktop
+tool for easy access, manipulation, and visualization of earth science
+data.
-The OpenGrADS Project seeks to develop advanced interfaces and extensions based
-on the main GrADS engine.
+The OpenGrADS Project seeks to develop advanced interfaces and
+extensions based on the main GrADS engine.
diff --git a/gis/opengrads/opengrads.SlackBuild b/gis/opengrads/opengrads.SlackBuild
index cc95db3dbd..518524257b 100644
--- a/gis/opengrads/opengrads.SlackBuild
+++ b/gis/opengrads/opengrads.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for OpenGrADS
@@ -24,13 +24,23 @@
# Written by Oda - edu.oda@gmail.com
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=opengrads
VERSION=${VERSION:-2.0.1.oga.1}
ARCH=${ARCH:-i686}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -81,4 +91,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/openorienteering-mapper/69977dfd4cbb8608aafa8ca8b5388d4983f5430a.patch b/gis/openorienteering-mapper/69977dfd4cbb8608aafa8ca8b5388d4983f5430a.patch
new file mode 100644
index 0000000000..6545099e95
--- /dev/null
+++ b/gis/openorienteering-mapper/69977dfd4cbb8608aafa8ca8b5388d4983f5430a.patch
@@ -0,0 +1,35 @@
+From 69977dfd4cbb8608aafa8ca8b5388d4983f5430a Mon Sep 17 00:00:00 2001
+From: Bas Couwenberg <sebastic@debian.org>
+Date: Sat, 23 Oct 2021 17:08:31 +0200
+Subject: [PATCH] Add support for proj.h, proj_api.h is removed in PROJ 8.
+
+---
+ cmake/FindPROJ4.cmake | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+index 093deaa79..10dfc7afa 100644
+--- a/cmake/FindPROJ4.cmake
++++ b/cmake/FindPROJ4.cmake
+@@ -91,6 +91,21 @@ if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+ string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+ set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+ set(PROJ4_VERSION_COUNT 3)
++else()
++ find_path(PROJ4_INCLUDE_DIR NAMES proj.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
++ mark_as_advanced(PROJ4_INCLUDE_DIR)
++
++ if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj.h")
++ file(STRINGS "${PROJ4_INCLUDE_DIR}/proj.h" PROJ_VERSION_MAJOR REGEX "^#define PROJ_VERSION_MAJOR [0-9]+$")
++ file(STRINGS "${PROJ4_INCLUDE_DIR}/proj.h" PROJ_VERSION_MINOR REGEX "^#define PROJ_VERSION_MINOR [0-9]+$")
++ file(STRINGS "${PROJ4_INCLUDE_DIR}/proj.h" PROJ_VERSION_PATCH REGEX "^#define PROJ_VERSION_PATCH [0-9]+$")
++
++ string(REGEX REPLACE "^.*PROJ_VERSION_[A-Z]+ ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ_VERSION_MAJOR}")
++ string(REGEX REPLACE "^.*PROJ_VERSION_[A-Z]+ ([0-9]).*$" "\\1" PROJ4_VERSION_MINOR "${PROJ_VERSION_MINOR}")
++ string(REGEX REPLACE "^.*PROJ_VERSION_[A-Z]+ ([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ_VERSION_PATCH}")
++ set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
++ set(PROJ4_VERSION_COUNT 3)
++ endif()
+ endif()
+
+ # Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
diff --git a/gis/openorienteering-mapper/README b/gis/openorienteering-mapper/README
index 8dafcbf0d5..316c8a5b7f 100644
--- a/gis/openorienteering-mapper/README
+++ b/gis/openorienteering-mapper/README
@@ -1,2 +1,3 @@
-OpenOrienteering Mapper is an orienteering mapmaking program and provides
-a free and open source alternative to existing commercial software.
+OpenOrienteering Mapper is an orienteering mapmaking program and
+provides a free and open source alternative to existing commercial
+software.
diff --git a/gis/openorienteering-mapper/fix_doc_path.diff b/gis/openorienteering-mapper/fix_doc_path.diff
deleted file mode 100644
index e699058897..0000000000
--- a/gis/openorienteering-mapper/fix_doc_path.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- mapper-0.8.4/CMakeLists.txt.orig 2018-12-24 21:53:23.908987869 +0300
-+++ mapper-0.8.4/CMakeLists.txt 2018-12-24 21:54:21.859594839 +0300
-@@ -152,7 +152,7 @@
- set(MAPPER_RUNTIME_DESTINATION "bin")
- set(MAPPER_LIBRARY_DESTINATION "lib/${Mapper_PACKAGE_NAME}")
- set(MAPPER_DATA_DESTINATION "share/${Mapper_PACKAGE_NAME}")
-- set(MAPPER_ABOUT_DESTINATION "share/doc/${Mapper_PACKAGE_NAME}")
-+ set(MAPPER_ABOUT_DESTINATION "doc/${Mapper_PACKAGE_NAME}-${Mapper_VERSION}")
- endif()
-
- if(CMAKE_CROSSCOMPILING)
diff --git a/gis/openorienteering-mapper/openorienteering-mapper.SlackBuild b/gis/openorienteering-mapper/openorienteering-mapper.SlackBuild
index a9e593923c..ed77cca493 100644
--- a/gis/openorienteering-mapper/openorienteering-mapper.SlackBuild
+++ b/gis/openorienteering-mapper/openorienteering-mapper.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for OpenOrienteering Mapper
-# Copyright 2016-2018, Nikolay Korotkiy <sikmir@gmail.com>
+# Copyright 2016-2019, Nikolay Korotkiy <sikmir@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=openorienteering-mapper
-VERSION=${VERSION:-0.8.4}
+VERSION=${VERSION:-0.9.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,7 +79,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch -p1 < $CWD/fix_doc_path.diff
+# patch for Proj 8 submitted PR to upstream from debian
+patch -p1 < $CWD/69977dfd4cbb8608aafa8ca8b5388d4983f5430a.patch
mkdir -p build
cd build
@@ -78,6 +89,7 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_DOCDIR="/usr/doc/$PRGNAM-$VERSION" \
-DLICENSING_PROVIDER:BOOL=OFF \
-DMapper_PACKAGE_NAME=$PRGNAM \
-Wno-dev ..
@@ -99,4 +111,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/openorienteering-mapper/openorienteering-mapper.info b/gis/openorienteering-mapper/openorienteering-mapper.info
index 8eea48c9ae..b7e51274b6 100644
--- a/gis/openorienteering-mapper/openorienteering-mapper.info
+++ b/gis/openorienteering-mapper/openorienteering-mapper.info
@@ -1,10 +1,10 @@
PRGNAM="openorienteering-mapper"
-VERSION="0.8.4"
+VERSION="0.9.5"
HOMEPAGE="https://www.openorienteering.org/apps/mapper/"
-DOWNLOAD="https://github.com/OpenOrienteering/mapper/archive/v0.8.4/mapper-0.8.4.tar.gz"
-MD5SUM="a29b2c5878910d6619bd022f95774c69"
+DOWNLOAD="https://github.com/OpenOrienteering/mapper/archive/v0.9.5/mapper-0.9.5.tar.gz"
+MD5SUM="87cde1b4bbb94704ec1dc356674ec92d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gdal polyclipping proj qt5"
+REQUIRES="gdal polyclipping"
MAINTAINER="Nikolay Korotkiy"
EMAIL="sikmir@gmail.com"
diff --git a/gis/osgEarth/README b/gis/osgEarth/README
index 8026af489f..f589884f3f 100644
--- a/gis/osgEarth/README
+++ b/gis/osgEarth/README
@@ -1,23 +1,6 @@
-osgEarth is a C++ terrain rendering toolkit. Just create a simple XML file,
-point it at your imagery, elevation, and vector data, load it into your favorite
-OpenSceneGraph application, and go!
+osgEarth is a C++ terrain rendering toolkit. Just create a simple XML
+file, point it at your imagery, elevation, and vector data, load it
+into your favorite OpenSceneGraph application, and go!
-osgEarth supports all kinds of data and comes with lots of examples to help you
-get up and running quickly and easily.
-
-Some optional requirements are recommended for enhanced functionality
-and/or performance. They include:
- osgQt, poco, protobuf, rocksdb
-
-For all but osgQt, they will be used if detected when osgEarth is built.
-
-In the case of osgQt, the version of Qt that it was built with is relevant.
-If osgQt was built with Qt5, the environment variable OSGQT=5 must be set when
-running the osgEarth SlackBuild i.e.
- OSGQT=5 sh osgEarth.SlackBuild
-In this case, the qt5 package is also an additional build requirement.
-
-If osgQt was built with Qt4 (the standard for Slackware 14.2), set OSGQT=4 i.e.
- OSGQT=4 sh osgEarth.SlackBuild
-
-If OSGQT is not set, osgQt support will not be included.
+osgEarth supports all kinds of data and comes with lots of examples to
+help you get up and running quickly and easily.
diff --git a/gis/osgEarth/geos-3_6_1-support.patch b/gis/osgEarth/geos-3_6_1-support.patch
deleted file mode 100644
index fc6a6beefb..0000000000
--- a/gis/osgEarth/geos-3_6_1-support.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff -Naur osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS
---- osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS 2016-09-15 17:19:21.000000000 +0300
-+++ osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS 2017-02-02 19:43:19.103864300 +0300
-@@ -26,6 +26,7 @@
- #include <osgEarthSymbology/Style>
- #include <osgEarthSymbology/Geometry>
- #include <geos/geom/Geometry.h>
-+#include <geos/geom/GeometryFactory.h>
-
- namespace osgEarth { namespace Symbology
- {
-@@ -45,7 +46,7 @@
- void disposeGeometry(geos::geom::Geometry* input);
-
- protected:
-- geos::geom::GeometryFactory* _factory;
-+ geos::geom::GeometryFactory::unique_ptr _factory;
- };
-
- } } // namespace osgEarth::Features
-diff -Naur osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS.cpp osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS.cpp
---- osgearth-osgearth-2.8-orig/src/osgEarthSymbology/GEOS.cpp 2016-09-15 17:19:21.000000000 +0300
-+++ osgearth-osgearth-2.8/src/osgEarthSymbology/GEOS.cpp 2017-02-02 19:44:46.772878700 +0300
-@@ -67,7 +67,7 @@
- }
-
- geom::Geometry*
-- import( const Symbology::Geometry* input, const geom::GeometryFactory* f )
-+ import( const Symbology::Geometry* input, const geom::GeometryFactory::unique_ptr f )
- {
- geom::Geometry* output = 0L;
-
-@@ -216,7 +216,7 @@
- geos::geom::PrecisionModel* pm = new geos::geom::PrecisionModel(geom::PrecisionModel::FLOATING);
-
- // Factory will clone the PM
-- _factory = new geos::geom::GeometryFactory( pm );
-+ _factory = geos::geom::GeometryFactory::create( pm );
-
- // Delete the template.
- delete pm;
-@@ -224,7 +224,6 @@
-
- GEOSContext::~GEOSContext()
- {
-- delete _factory;
- }
-
- geom::Geometry*
-@@ -331,10 +330,7 @@
- {
- if (input)
- {
-- geom::GeometryFactory* f = const_cast<geom::GeometryFactory*>(input->getFactory());
- _factory->destroyGeometry(input);
-- if ( f != _factory )
-- delete f;
- }
- }
-
diff --git a/gis/osgEarth/osgEarth.SlackBuild b/gis/osgEarth/osgEarth.SlackBuild
index ff83e100c5..ede79953f1 100644
--- a/gis/osgEarth/osgEarth.SlackBuild
+++ b/gis/osgEarth/osgEarth.SlackBuild
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for osgEarth
# Copyright 2012 Alexander Bruy <alexander.bruy@gmail.com>
-# Copyright 2018-2019 Christoph Willing, Brisbane Australia
+# Copyright 2018-2023 Christoph Willing, Brisbane Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,11 +23,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=osgEarth
SRCNAM=osgearth
-VERSION=${VERSION:-2.10.2}
+VERSION=${VERSION:-3.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -56,24 +66,14 @@ else
LIBDIRSUFFIX=""
fi
-osgqt="";
-echo "OSGQT = $OSGQT"
-if [ "$OSGQT" = "4" ]; then
- osgqt="-DOSGEARTH_QT_BUILD=ON -DOSGEARTH_QT_VERSION=4"
-elif [ "$OSGQT" = "5" ]; then
- osgqt="-DOSGEARTH_QT_BUILD=ON -DOSGEARTH_QT_VERSION=5"
-else
- osgqt=""
-fi
-
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -87,9 +87,7 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -lX11" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release \
- -DDYNAMIC_OSGEARTH=ON \
- $osgqt
+ -DCMAKE_BUILD_TYPE=Release
make
make install DESTDIR=$PKG
@@ -99,11 +97,11 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a tests LICENSE.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/osgEarth/osgEarth.info b/gis/osgEarth/osgEarth.info
index d87bb83193..e46300338f 100644
--- a/gis/osgEarth/osgEarth.info
+++ b/gis/osgEarth/osgEarth.info
@@ -1,10 +1,10 @@
PRGNAM="osgEarth"
-VERSION="2.10.2"
+VERSION="3.5"
HOMEPAGE="http://osgearth.org/"
-DOWNLOAD="https://github.com/gwaldron/osgearth/archive/osgearth-2.10.2/osgearth-osgearth-2.10.2.tar.gz"
-MD5SUM="24f01afedb2eeac8154bf64772b7cbc7"
+DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/osgEarth/osgearth-3.5.tar.gz"
+MD5SUM="58de6c17ac7643a3ba30d978dc6f0e1b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="OpenSceneGraph gdal"
+REQUIRES="fmt gdal OpenSceneGraph protobuf3 rocksdb spdlog"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@linux.com"
diff --git a/gis/osm-gps-map/README b/gis/osm-gps-map/README
index 497ece375d..1604ee71b0 100644
--- a/gis/osm-gps-map/README
+++ b/gis/osm-gps-map/README
@@ -1,7 +1,7 @@
osm-gps-map is a Gtk mapping widget (with Python bindings) that, given
-GPS co-ordinates, draws a GPS track and points of interest on a moving map
-display.
+GPS co-ordinates, draws a GPS track and points of interest on a moving
+map display.
osm-gps-map downloads map data from a number of websites, including
-openstreetmap.org, openaerialmap.org and others, and can be used to build
-desktop mapping or geolocation applications.
+openstreetmap.org, openaerialmap.org and others, and can be used to
+build desktop mapping or geolocation applications.
diff --git a/gis/osm-gps-map/osm-gps-map.SlackBuild b/gis/osm-gps-map/osm-gps-map.SlackBuild
index 8868ed1562..f72ec86c92 100644
--- a/gis/osm-gps-map/osm-gps-map.SlackBuild
+++ b/gis/osm-gps-map/osm-gps-map.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for osm-gps-map
@@ -22,26 +22,36 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=osm-gps-map
VERSION=${VERSION:-1.1.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -94,8 +104,10 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/lib*/*.la
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/osm-gps-map/osm-gps-map.info b/gis/osm-gps-map/osm-gps-map.info
index 9e05521623..85c6cf8ff7 100644
--- a/gis/osm-gps-map/osm-gps-map.info
+++ b/gis/osm-gps-map/osm-gps-map.info
@@ -1,7 +1,7 @@
PRGNAM="osm-gps-map"
VERSION="1.1.0"
HOMEPAGE="http://nzjrs.github.io/osm-gps-map/"
-DOWNLOAD="https://github.com/nzjrs/osm-gps-map/archive/1.1.0.tar.gz"
+DOWNLOAD="https://github.com/nzjrs/osm-gps-map/archive/1.1.0/osm-gps-map-1.1.0.tar.gz"
MD5SUM="5e9dc55922a597798ef4411130815212"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
diff --git a/gis/osm2pgrouting/osm2pgrouting.SlackBuild b/gis/osm2pgrouting/osm2pgrouting.SlackBuild
index 85f927efd1..82333f1f8c 100644
--- a/gis/osm2pgrouting/osm2pgrouting.SlackBuild
+++ b/gis/osm2pgrouting/osm2pgrouting.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for osm2pgrouting
-# Copyright 2013-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=osm2pgrouting
-VERSION=${VERSION:-2.3.6}
+VERSION=${VERSION:-2.3.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -82,7 +92,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS.md COPYING NEWS Readme.md \
+ AUTHORS.md COPYING NEWS README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -90,4 +100,4 @@ mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/osm2pgrouting/osm2pgrouting.info b/gis/osm2pgrouting/osm2pgrouting.info
index ec5e008a9e..bdf2423bef 100644
--- a/gis/osm2pgrouting/osm2pgrouting.info
+++ b/gis/osm2pgrouting/osm2pgrouting.info
@@ -1,8 +1,8 @@
PRGNAM="osm2pgrouting"
-VERSION="2.3.6"
+VERSION="2.3.8"
HOMEPAGE="https://pgrouting.org"
-DOWNLOAD="https://github.com/pgRouting/osm2pgrouting/archive/v2.3.6/osm2pgrouting-2.3.6.tar.gz"
-MD5SUM="7d5b073f55f551ddfd51d07c7f15b651"
+DOWNLOAD="https://github.com/pgRouting/osm2pgrouting/archive/v2.3.8/osm2pgrouting-2.3.8.tar.gz"
+MD5SUM="4272cd8ef956765a6ca574cae122ea4b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libpqxx pgrouting"
diff --git a/gis/osm2pgsql-legacy/README b/gis/osm2pgsql-legacy/README
new file mode 100644
index 0000000000..1a1c261707
--- /dev/null
+++ b/gis/osm2pgsql-legacy/README
@@ -0,0 +1,8 @@
+This is the legacy version of osm2pgsql package.
+
+osm2pgsql is a utility program that converts OpenStreetMap data to
+PostGIS-enabled PostgreSQL databases.
+
+osm2pgsql 1.9.2 is the latest version with support to 32 bit
+architectures. If you have a Slackware64 and want to install a version
+earlier than 1.9.2, please refer to osm2pgsql package.
diff --git a/gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild b/gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild
new file mode 100644
index 0000000000..a284fab5cd
--- /dev/null
+++ b/gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild
@@ -0,0 +1,119 @@
+#!/bin/bash
+# Slackware build script for osm2pgsql-legacy
+
+# Copyright 2013-2021 Benjamin Trigona-Harany
+# Copyright 2024 Giancarlo Dessi, Cagliari, IT
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=osm2pgsql-legacy
+SRCNAM=osm2pgsql
+VERSION=${VERSION:-1.9.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+if [ -d /usr/doc/osm2pgsql-1* ]; then
+ echo "**********************************************************************"
+ echo "WARNING: an old installation of osm2pgsql is found in your system!"
+ echo "osm2pgsql-legacy could conflict with other installations of osm2pgsql."
+ echo "Please remove any previous packages installed before install this:"
+ echo "# removepkg osm2pgsql"
+ echo "**********************************************************************"
+ exit 1
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_TESTS=OFF \
+ -DWITH_LUAJIT=ON \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mv $PKG/usr/share/man $PKG/usr
+gzip -9 $PKG/usr/man/man?/*
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/osm2pgsql-legacy/osm2pgsql-legacy.info b/gis/osm2pgsql-legacy/osm2pgsql-legacy.info
new file mode 100644
index 0000000000..6344e8a920
--- /dev/null
+++ b/gis/osm2pgsql-legacy/osm2pgsql-legacy.info
@@ -0,0 +1,10 @@
+PRGNAM="osm2pgsql-legacy"
+VERSION="1.9.2"
+HOMEPAGE="https://osm2pgsql.org/"
+DOWNLOAD="https://github.com/osm2pgsql-dev/osm2pgsql/archive/1.9.2/osm2pgsql-1.9.2.tar.gz"
+MD5SUM="a133dbfdddaa634fdffb807567a62635"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="luajit nlohmann_json postgis"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/geoserver-oracle/slack-desc b/gis/osm2pgsql-legacy/slack-desc
index 4bddc4009c..d80c0103c7 100644
--- a/gis/geoserver-oracle/slack-desc
+++ b/gis/osm2pgsql-legacy/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-geoserver-oracle: geoserver-oracle (Oracle data store support for GeoServer)
-geoserver-oracle:
-geoserver-oracle: The Oracle plugin adds support for Oracle data stores to GeoServer.
-geoserver-oracle:
-geoserver-oracle:
-geoserver-oracle:
-geoserver-oracle:
-geoserver-oracle:
-geoserver-oracle:
-geoserver-oracle:
-geoserver-oracle:
+osm2pgsql-legacy: osm2pgsql-legacy (convert OpenStreetMap data to PostGIS)
+osm2pgsql-legacy:
+osm2pgsql-legacy: osm2pgsql is a utility program that converts OpenStreetMap data to
+osm2pgsql-legacy: PostGIS-enabled PostgreSQL databases.
+osm2pgsql-legacy: This package supports also 32 bit architectures
+osm2pgsql-legacy:
+osm2pgsql-legacy:
+osm2pgsql-legacy: Homepage: https://osm2pgsql.org/
+osm2pgsql-legacy:
+osm2pgsql-legacy:
+osm2pgsql-legacy:
diff --git a/gis/osm2pgsql/README b/gis/osm2pgsql/README
index c83188f770..4fa8d0224f 100644
--- a/gis/osm2pgsql/README
+++ b/gis/osm2pgsql/README
@@ -1,2 +1,5 @@
osm2pgsql is a utility program that converts OpenStreetMap data to
PostGIS-enabled PostgreSQL databases.
+
+Since version 1.10.0 osm2pgsql needs a 64 bit architecture. For 32 bit
+architectures you have to install osm2pgsql-legacy.
diff --git a/gis/osm2pgsql/osm2pgsql.SlackBuild b/gis/osm2pgsql/osm2pgsql.SlackBuild
index 4e6768ce43..3131240f2d 100644
--- a/gis/osm2pgsql/osm2pgsql.SlackBuild
+++ b/gis/osm2pgsql/osm2pgsql.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for osm2pgsql
-# Copyright 2013-2019 Benjamin Trigona-Harany
+# Copyright 2013-2021 Benjamin Trigona-Harany
+# Copyright 2024 Giancarlo Dessi, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=osm2pgsql
-VERSION=${VERSION:-1.0.0}
+VERSION=${VERSION:-1.11.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -34,27 +38,35 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
+ARCH64="no"
+if [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ ARCH64="yes"
else
- SLKCFLAGS="-O2"
+ SLKCFLAGS=""
LIBDIRSUFFIX=""
fi
set -e
+if [ $ARCH64 = "no" ]; then
+ echo "*****************************************"
+ echo "THIS PACKAGE DOES NOT SUPPORT YOUR SYSTEM"
+ echo "YOU NEED osm2pgsql-legacy package"
+ echo "*****************************************"
+ exit 1
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -74,7 +86,6 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_TESTING=OFF \
-DBUILD_TESTS=OFF \
-DWITH_LUAJIT=ON \
-DCMAKE_BUILD_TYPE=Release ..
@@ -90,7 +101,7 @@ gzip -9 $PKG/usr/man/man?/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS COPYING ChangeLog README.md \
+ AUTHORS COPYING README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -98,4 +109,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/osm2pgsql/osm2pgsql.info b/gis/osm2pgsql/osm2pgsql.info
index 133e0dcb55..c6c549619f 100644
--- a/gis/osm2pgsql/osm2pgsql.info
+++ b/gis/osm2pgsql/osm2pgsql.info
@@ -1,10 +1,10 @@
PRGNAM="osm2pgsql"
-VERSION="1.0.0"
-HOMEPAGE="https://wiki.openstreetmap.org/wiki/Osm2pgsql"
-DOWNLOAD="https://github.com/openstreetmap/osm2pgsql/archive/1.0.0/osm2pgsql-1.0.0.tar.gz"
-MD5SUM="89783dce1ff4e123950de1072e646223"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="luajit postgis"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+VERSION="1.11.0"
+HOMEPAGE="https://osm2pgsql.org/"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/osm2pgsql-dev/osm2pgsql/archive/1.11.0/osm2pgsql-1.11.0.tar.gz"
+MD5SUM_x86_64="20c445875232011522c39c533bfb2f21"
+REQUIRES="luajit nlohmann_json postgis"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/osm2pgsql/slack-desc b/gis/osm2pgsql/slack-desc
index 2cdacd1cb3..82dc4e1c9f 100644
--- a/gis/osm2pgsql/slack-desc
+++ b/gis/osm2pgsql/slack-desc
@@ -11,7 +11,7 @@ osm2pgsql:
osm2pgsql: osm2pgsql is a utility program that converts OpenStreetMap data to
osm2pgsql: PostGIS-enabled PostgreSQL databases.
osm2pgsql:
-osm2pgsql: Homepage: http://wiki.openstreetmap.org/wiki/Osm2pgsql
+osm2pgsql: Homepage: https://osm2pgsql.org/
osm2pgsql:
osm2pgsql:
osm2pgsql:
diff --git a/gis/ossim/README b/gis/ossim/README
index f46c66389e..a6a973ca26 100644
--- a/gis/ossim/README
+++ b/gis/ossim/README
@@ -1,6 +1,4 @@
-OSSIM is a powerful suite of geospatial libraries and applications used to
-process imagery, maps, terrain and vector data. The software has been under
-active development since 1996 and is deployed across a number of private,
-federal and civilian agencies.
-
-Optional dependencies: hdf5.
+OSSIM is a powerful suite of geospatial libraries and applications
+used to process imagery, maps, terrain and vector data. The software
+has been under active development since 1996 and is deployed across a
+number of private, federal and civilian agencies.
diff --git a/gis/ossim/ossim.SlackBuild b/gis/ossim/ossim.SlackBuild
index 034bb012b4..298be790bd 100644
--- a/gis/ossim/ossim.SlackBuild
+++ b/gis/ossim/ossim.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for ossim
-# Copyright 2018-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2018-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,11 +24,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=ossim
-RELNAM=Miami
-VERSION=${VERSION:-2.9.1}
+VERSION=${VERSION:-2.12.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -62,9 +71,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$RELNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$RELNAM-$VERSION.tar.gz
-cd $PRGNAM-$RELNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -77,16 +86,16 @@ sed -i "s/lib\b/lib${LIBDIRSUFFIX}/" CMakeLists.txt
mkdir -p build
cd build
cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DINSTALL_LIBRARY_DIR:PATH=/usr/lib${LIBDIRSUFFIX} \
- -DINSTALL_ARCHIVE_DIR:PATH=/usr/lib${LIBDIRSUFFIX} \
+ -DINSTALL_LIBRARY_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DINSTALL_ARCHIVE_DIR=/usr/lib${LIBDIRSUFFIX} \
-DBUILD_OSSIM_TESTS=OFF \
-DBUILD_OSSIM_APPS=ON \
-DBUILD_OSSIM_FREETYPE_SUPPORT=ON \
-DBUILD_OSSIM_GUI=ON \
- -DBUILD_OSSIM_HDF5_SUPPORT=ON \
+ -DBUILD_OSSIM_HDF5_SUPPORT=OFF \
-DBUILD_OSSIM_ID_SUPPORT=ON \
-DBUILD_OSSIM_PLANET=ON \
-DBUILD_OSSIM_WMS=ON \
@@ -110,4 +119,4 @@ mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/ossim/ossim.info b/gis/ossim/ossim.info
index dadbf7f7c0..1b6df8a8b5 100644
--- a/gis/ossim/ossim.info
+++ b/gis/ossim/ossim.info
@@ -1,8 +1,8 @@
PRGNAM="ossim"
-VERSION="2.9.1"
+VERSION="2.12.0"
HOMEPAGE="https://trac.osgeo.org/ossim/"
-DOWNLOAD="https://github.com/ossimlabs/ossim/archive/Miami-2.9.1/ossim-Miami-2.9.1.tar.gz"
-MD5SUM="9e1ed041b470198168100a57f66b7e75"
+DOWNLOAD="https://github.com/ossimlabs/ossim/archive/2.12.0/ossim-2.12.0.tar.gz"
+MD5SUM="6b5930d3eca47555f4031480f8dc8847"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="geos jsoncpp libgeotiff"
diff --git a/gis/ossim/slack-desc b/gis/ossim/slack-desc
index e17fcb0e55..04e1291fff 100644
--- a/gis/ossim/slack-desc
+++ b/gis/ossim/slack-desc
@@ -1,4 +1,4 @@
-#/ossim-2.3.1 HOW TO EDIT THIS FILE:
+# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
@@ -11,9 +11,9 @@ ossim:
ossim: OSSIM is a powerful suite of geospatial libraries and applications
ossim: used to process imagery, maps, terrain and vector data. The software
ossim: has been under active development since 1996 and is deployed across a
-ossim: number of private, federal and civilian agencies.
+ossim: number of private, federal and civilian agencies.
+ossim:
ossim:
ossim:
-ossim:
ossim:
ossim:
diff --git a/gis/pdal/README b/gis/pdal/README
index 7f086c1e22..95f8695aa2 100644
--- a/gis/pdal/README
+++ b/gis/pdal/README
@@ -1,9 +1,40 @@
-PDAL is a BSD licensed library for translating and manipulating point cloud
-data of various formats. It is a library that is analogous to the GDAL raster
-library. PDAL is focussed on reading, writing, and translating point cloud data
-from the ever-growing constellation of data formats that are being developed
-for working with multi-dimensional emitted-pulse scanning systems. While PDAL
-is not explicitly limited to working with LiDAR data formats, its initial
+PDAL is a BSD licensed library for translating and manipulating
+point cloud data of various formats. It is a library that is
+analogous to the GDAL raster library. PDAL is focussed on reading,
+writing, and translating point cloud data from the ever-growing
+constellation of data formats that are being developed for working
+with multi-dimensional emitted-pulse scanning systems. While PDAL is
+not explicitly limited to working with LiDAR data formats, its initial
rollout is focused in that area.
-Optional dependencies: jsoncpp, laszip, hdf5, OpenSceneGraph.
+PDAL includes several plugins needed for some extended features or to
+write/read data in specific formats. The build of these plugins
+requires optional dependencies included in Slackware 15.0 or available
+as packages from Slackbuilds.org. Other plugins need third parts
+dependencies that are not available here.
+
+If their dependencies (autodetected) are installed, the script enables
+by default the build of the supported plugins. You can disable each of
+them by passing to the slackwbuild its environment variable set as
+"no" (for example E57=no ./pdal.SlackBuild).
+
+Plugins enabled by default if their dependencies are installed (see
+README.SBo to know what feature they extend):
+
+- E57: requires xerces-c
+- OSG: requires OpenSceneGraph
+- DRACO: requires libdraco
+
+HDF, ICEBRIDGE do not require optional deps
+
+Other optional dependencies (autodetected) that improve the
+functionality of PDAL are jsoncpp and laszip. The installation of
+laszip is strongly recommended.
+
+PDAL can include also the Matlab plugin, that allows to write data to
+a .mat file. Since the standard MATLAB is a proprietary software, the
+build of this plugin is disabled by default. If you need this plugin
+launch the script with MATLAB=yes ./pdal.SlackBuild
+
+Warning: the build of these plugin does not support free platforms
+compatible or alternative to MATLAB, like Octave or Scilab.
diff --git a/gis/pdal/README.SBo b/gis/pdal/README.SBo
new file mode 100644
index 0000000000..b4680db5a2
--- /dev/null
+++ b/gis/pdal/README.SBo
@@ -0,0 +1,7 @@
+Features added by following plugins
+
+- E57: read and write data to and from e57 format
+- HDF: read data in the HDF format
+- ICEBRIDGE: read data in the Icebridge format
+- OSG: read and write OpenSceneGraph objects
+- DRACO: compress/decompress 3D meshes and point clouds
diff --git a/gis/pdal/pdal.SlackBuild b/gis/pdal/pdal.SlackBuild
index f6be62bba3..dfb181ed11 100644
--- a/gis/pdal/pdal.SlackBuild
+++ b/gis/pdal/pdal.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for pdal
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +23,40 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pdal
SRCNAM=PDAL
-VERSION=${VERSION:-1.9.1}
+VERSION=${VERSION:-2.7.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# *************************************************************************
+
+# Build of these plugin is enabled by default since they require netcdf and hdf5
+BUILDICEBRIDGE="-DBUILD_PLUGIN_ICEBRIDGE=ON" ; \
+ [ "${ICEBRIDGE:-yes}" = "no" ] && BUILDICEBRIDGE=""
+BUILDHDF="-DBUILD_PLUGIN_HDF=ON" ; \
+ [ "${HDF:-yes}" = "no" ] && BUILDHDF=""
+
+# Build of these is enabled by default if their additional optional deps are installed
+if [ "${OSG:-yes}" = "yes" ]; then
+ BUILDOSG="" ; [ -x /usr/bin/osgversion ] && BUILDOSG="-DBUILD_PLUGIN_OPENSCENEGRAPH=ON"
+fi
+if [ "${E57:-yes}" = "yes" ]; then
+ BUILDE57="" ; [ -d /usr/include/xercesc ] && BUILDE57="-DBUILD_PLUGIN_E57=ON"
+fi
+if [ "${DRACO:-yes}" = "yes" ]; then
+ BUILDDRACO="" ; [ -x /usr/bin/draco_decoder-1.5.* ] && BUILDDRACO="-DBUILD_PLUGIN_DRACO=ON"
+fi
+
+# *************************************************************************
+
+# Users that have a standard installation of proprietary MatLAB would enable
+# the build of Matlab plugin. This is disabled by default
+BUILDMATLAB="" ; [ "${MATLAB:-no}" = "yes" ] && \
+ BUILDMATLAB="-DBUILD_PLUGIN_MATLAB=ON"
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +66,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -81,15 +115,30 @@ cd build
-DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
-DBUILD_PGPOINTCLOUD_TESTS=OFF \
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \
- -DBUILD_PLUGIN_SQLITE=ON \
- -DBUILD_PLUGIN_DELAUNAY=ON \
-DWITH_COMPLETION=ON \
+ -DWITH_BACKTRACE=OFF \
+ -DWITH_TESTS=FALSE \
+ $BUILDICEBRIDGE \
+ $BUILDE57 \
+ $BUILDDRACO \
+ $BUILDOSG \
+ $BUILDHDF \
+ $BUILDMATLAB \
..
+ make
make install DESTDIR=$PKG
cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Remove empty directories and fix permissions (issues found by sbopkglint)
+rmdir $PKG/usr/include/pdal/filters/private/csf
+rmdir $PKG/usr/include/pdal/filters/private/miniball
+chmod 644 $PKG/usr/include/pdal/*.hpp
+chmod 644 $PKG/usr/include/pdal/*/*.hpp
+chmod 644 $PKG/usr/include/pdal/*/*/*.hpp
+chmod 644 $PKG/usr/include/pdal/*/*/*/*.hpp
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
@@ -101,4 +150,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/pdal/pdal.info b/gis/pdal/pdal.info
index a1ba332574..64b125f2de 100644
--- a/gis/pdal/pdal.info
+++ b/gis/pdal/pdal.info
@@ -1,10 +1,10 @@
PRGNAM="pdal"
-VERSION="1.9.1"
-HOMEPAGE="http://pointcloud.org"
-DOWNLOAD="https://github.com/PDAL/PDAL/archive/1.9.1/PDAL-1.9.1.tar.gz"
-MD5SUM="17c1d509a1f6c00538b79e96338e0314"
+VERSION="2.7.1"
+HOMEPAGE="https://pdal.io"
+DOWNLOAD="https://github.com/PDAL/PDAL/archive/2.7.1/PDAL-2.7.1.tar.gz"
+MD5SUM="a524026179dec11482d0f4670e0f68e0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gdal libgeotiff postgresql"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="gdal libgeotiff netcdf postgresql"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/pdal/slack-desc b/gis/pdal/slack-desc
index 10cf3600ca..56c1cf23d8 100644
--- a/gis/pdal/slack-desc
+++ b/gis/pdal/slack-desc
@@ -11,7 +11,7 @@ pdal:
pdal: PDAL is a BSD licensed library for translating and manipulating point
pdal: cloud data of various formats.
pdal:
-pdal: Homepage: http://pointcloud.org
+pdal: Homepage: https://pdal.io
pdal:
pdal:
pdal:
diff --git a/gis/pgrouting/README b/gis/pgrouting/README
index 2c23f7965b..8fa6d63917 100644
--- a/gis/pgrouting/README
+++ b/gis/pgrouting/README
@@ -1,5 +1,5 @@
-pgRouting extends the PostGIS / PostgreSQL geospatial database to provide
-geospatial routing functionality.
+pgRouting extends the PostGIS / PostgreSQL geospatial database to
+provide geospatial routing functionality.
The following algorithms are compiled:
* All Pairs Shortest Path, Johnson's Algorithm
diff --git a/gis/pgrouting/pgrouting.SlackBuild b/gis/pgrouting/pgrouting.SlackBuild
index fb107ea466..81c926b9fd 100644
--- a/gis/pgrouting/pgrouting.SlackBuild
+++ b/gis/pgrouting/pgrouting.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for pgRouting
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,10 +25,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pgrouting
-VERSION=${VERSION:-2.6.3}
+VERSION=${VERSION:-3.6.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +41,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,6 +79,14 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Prevent cmake warnings in current
+if [ -d /usr/share/cmake-3.28 ]; then
+ CMAKE_POLICY="-DCMAKE_POLICY_DEFAULT_CMP0148=OLD "
+ sed -i ./CMakeLists.txt -e "s/VERSION 3.2 FATAL_ERROR/VERSION 3.5 FATAL_ERROR/g"
+else
+ CMAKE_POLICY=""
+fi
+
mkdir -p build
cd build
cmake \
@@ -78,7 +94,8 @@ cd build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_DOC=${WITH_DOC:-OFF} \
- ..
+ $CMAKE_POLICY \
+ -DCMAKE_BUILD_TYPE=Release ..
make all doc
make install DESTDIR=$PKG
@@ -100,4 +117,4 @@ mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/pgrouting/pgrouting.info b/gis/pgrouting/pgrouting.info
index 9c405c787a..90acfc5ecf 100644
--- a/gis/pgrouting/pgrouting.info
+++ b/gis/pgrouting/pgrouting.info
@@ -1,10 +1,10 @@
PRGNAM="pgrouting"
-VERSION="2.6.3"
+VERSION="3.6.2"
HOMEPAGE="https://pgrouting.org"
-DOWNLOAD="https://github.com/pgRouting/pgrouting/archive/v2.6.3/pgrouting-2.6.3.tar.gz"
-MD5SUM="16f8537a553d2953ef50726764dd7d66"
+DOWNLOAD="https://github.com/pgRouting/pgrouting/archive/v3.6.2/pgrouting-3.6.2.tar.gz"
+MD5SUM="96336316353a7244976a97d59f4c9061"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="CGAL postgis"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="postgis"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/pgsql-ogr-fdw/README b/gis/pgsql-ogr-fdw/README
index cf5eb43796..7230b2ae9b 100644
--- a/gis/pgsql-ogr-fdw/README
+++ b/gis/pgsql-ogr-fdw/README
@@ -1,2 +1,2 @@
-pgsql-ogr-fdw is a foreign data wrapper for OGR that allows arbitrary OGR
-vector data stores to be accessed as PostgreSQL tables.
+pgsql-ogr-fdw is a foreign data wrapper for OGR that allows arbitrary
+OGR vector data stores to be accessed as PostgreSQL tables.
diff --git a/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.SlackBuild b/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.SlackBuild
index 9b5f2b8660..9ea5f30b04 100644
--- a/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.SlackBuild
+++ b/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for pgsql-ogr-fdw
-# Copyright 2015-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2015-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pgsql-ogr-fdw
-VERSION=${VERSION:-1.0.8}
+VERSION=${VERSION:-1.1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -91,4 +101,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.info b/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.info
index 5eabb8d09b..d510b6662b 100644
--- a/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.info
+++ b/gis/pgsql-ogr-fdw/pgsql-ogr-fdw.info
@@ -1,8 +1,8 @@
PRGNAM="pgsql-ogr-fdw"
-VERSION="1.0.8"
+VERSION="1.1.1"
HOMEPAGE="https://github.com/pramsey/pgsql-ogr-fdw"
-DOWNLOAD="https://github.com/pramsey/pgsql-ogr-fdw/archive/v1.0.8/pgsql-ogr-fdw-1.0.8.tar.gz"
-MD5SUM="0dba1b51e1eca5e79056104d009a1739"
+DOWNLOAD="https://github.com/pramsey/pgsql-ogr-fdw/archive/v1.1.1/pgsql-ogr-fdw-1.1.1.tar.gz"
+MD5SUM="6bf61db1b4f3a5e33c98cc6618c20bd6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="postgis"
diff --git a/gis/pktools/README b/gis/pktools/README
index 1aa9d4642f..ed86d16551 100644
--- a/gis/pktools/README
+++ b/gis/pktools/README
@@ -1,9 +1,6 @@
-pktools is a suite of utilities written in C++ for image processing with a
-focus on remote sensing applications. It relies on the Geospatial Data
-Abstraction Library and OGR.
-
-Optional dependencies
+pktools is a suite of utilities written in C++ for image processing
+with a focus on remote sensing applications. It relies on the
+Geospatial Data Abstraction Library and OGR.
If the fann SlackBuild is installed, support can be added by passing
-FANN=ON. If the libLAS SlackBuild is installed, support can be added by
-passing LIBLAS=ON.
+FANN=ON.
diff --git a/gis/pktools/pktools.SlackBuild b/gis/pktools/pktools.SlackBuild
index ca31debb15..98edbb7593 100644
--- a/gis/pktools/pktools.SlackBuild
+++ b/gis/pktools/pktools.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for pktools
-# Copyright 2017-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2017-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,11 +24,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pktools
SRCNAM=$(echo $PRGNAM | tr "[a-z]" "[A-Z]")
VERSION=${VERSION:-2.6.7.6}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -73,7 +83,6 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
WITH_FANN=${FANN:-OFF}
-WITH_LIBLAS=${LIBLAS:-OFF}
mkdir -p build
cd build
@@ -85,7 +94,6 @@ cd build
-DINSTALL_LIBRARY_DIR=lib${LIBDIRSUFFIX} \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_WITH_FANN=$WITH_FANN \
- -DBUILD_WITH_LIBLAS=$WITH_LIBLAS \
..
make
@@ -109,4 +117,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/pointcloud/README b/gis/pointcloud/README
index eef3cbf2a2..4790cf0e7a 100644
--- a/gis/pointcloud/README
+++ b/gis/pointcloud/README
@@ -1,6 +1,6 @@
-The PostgreSQL Pointcloud extension allows LiDAR point cloud data to be stored
-in the database.
+The PostgreSQL Pointcloud extension allows LiDAR point cloud data to
+be stored in the database.
The SlackBuild will install two PostgreSQL extensions: pointcloud and
-pointcloud_postgis. To use the pointcloud_postgis extension, postgis must be
-installed.
+pointcloud_postgis. To use the pointcloud_postgis extension, postgis
+must be installed.
diff --git a/gis/pointcloud/pointcloud.SlackBuild b/gis/pointcloud/pointcloud.SlackBuild
index f74b10186f..8735234308 100644
--- a/gis/pointcloud/pointcloud.SlackBuild
+++ b/gis/pointcloud/pointcloud.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for pointcloud
-# Copyright 2013-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pointcloud
-VERSION=${VERSION:-1.2.0}
+VERSION=${VERSION:-1.2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -92,4 +102,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/pointcloud/pointcloud.info b/gis/pointcloud/pointcloud.info
index 9a495b8e7b..d0014093db 100644
--- a/gis/pointcloud/pointcloud.info
+++ b/gis/pointcloud/pointcloud.info
@@ -1,8 +1,8 @@
PRGNAM="pointcloud"
-VERSION="1.2.0"
-HOMEPAGE="https://github.com/pramsey/pointcloud"
-DOWNLOAD="https://github.com/pramsey/pointcloud/archive/v1.2.0/pointcloud-1.2.0.tar.gz"
-MD5SUM="ad7241cd53f69d8fd2b3850fba28c39e"
+VERSION="1.2.1"
+HOMEPAGE="https://pgpointcloud.github.io/pointcloud/"
+DOWNLOAD="https://github.com/pgpointcloud/pointcloud/archive/v1.2.1/pointcloud-1.2.1.tar.gz"
+MD5SUM="902e6028dbf12271e6d3909471065d9d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="postgresql"
diff --git a/gis/polyline/README b/gis/polyline/README
index ec484299f6..f8e3d139e4 100644
--- a/gis/polyline/README
+++ b/gis/polyline/README
@@ -1,2 +1,2 @@
-polyline is a Python implementation of Google's Encoded Polyline Algorithm
-Format built with Python 2 and 3 support in mind.
+polyline is a Python implementation of Google's Encoded Polyline
+Algorithm Format built with Python 2 and 3 support in mind.
diff --git a/gis/polyline/polyline.SlackBuild b/gis/polyline/polyline.SlackBuild
index 304e8a71a5..36a28afa6f 100644
--- a/gis/polyline/polyline.SlackBuild
+++ b/gis/polyline/polyline.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for polyline
-# Copyright 2015-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2015-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=polyline
-VERSION=${VERSION:-1.3.2}
+VERSION=${VERSION:-1.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,7 +79,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -82,4 +91,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/polyline/polyline.info b/gis/polyline/polyline.info
index 0d4449ce2a..52a27af76b 100644
--- a/gis/polyline/polyline.info
+++ b/gis/polyline/polyline.info
@@ -1,10 +1,10 @@
PRGNAM="polyline"
-VERSION="1.3.2"
+VERSION="1.4.0"
HOMEPAGE="https://pypi.python.org/pypi/polyline/"
-DOWNLOAD="https://files.pythonhosted.org/packages/source/p/polyline/polyline-1.3.2.tar.gz"
-MD5SUM="802f43c5134f5a2386657f60dca9602b"
+DOWNLOAD="https://files.pythonhosted.org/packages/source/p/polyline/polyline-1.4.0.tar.gz"
+MD5SUM="b97c57378605c4a856c437569f95a0cb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="six python3-six"
+REQUIRES=""
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/postgis/README b/gis/postgis/README
index 67c3bac5b7..a493cb969d 100644
--- a/gis/postgis/README
+++ b/gis/postgis/README
@@ -1,12 +1,10 @@
-PostGIS adds support for geographic objects to the PostgreSQL object-relational
-database. In effect, PostGIS "spatially enables" the PostgreSQL server,
-allowing it to be used as a backend spatial database for geographic information
-systems (GIS).
+PostGIS adds support for geographic objects to the PostgreSQL
+object-relational database. In effect, PostGIS "spatially enables"
+the PostgreSQL server, allowing it to be used as a backend spatial
+database for geographic information systems (GIS).
SFCGAL is an optional dependency for advanced 3D support.
-protobuf-c is an optional dependency for MapBox vector tile support.
-
To disable the GTK-based graphical interface for shp2pgsql, set GUI=no.
To include the shp2pgsql plugin for pgAdmin set PGADMIN=yes.
diff --git a/gis/postgis/doinst.sh b/gis/postgis/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/gis/postgis/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/gis/postgis/postgis.SlackBuild b/gis/postgis/postgis.SlackBuild
index 862c1b87d3..6c14107eda 100644
--- a/gis/postgis/postgis.SlackBuild
+++ b/gis/postgis/postgis.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for PostGIS
# Copyright 2009 Peter Sarkoci <sarkoci@math.sk>
-# Maintained 2013-2019 by Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,10 +24,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=postgis
-VERSION=${VERSION:-2.5.3}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-3.4.2}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +40,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -76,15 +84,19 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+pgbindir=$(pg_config --bindir)
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--build=$ARCH \
--prefix=/usr \
+ --bindir=$pgbindir \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--datarootdir=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
+ --without-protobuf \
$SHP2PGSQL_GUI \
--build=$ARCH-slackware-linux
@@ -99,7 +111,6 @@ if [ "$PGADMIN" = "yes" ] ; then
fi
mkdir -p $PKG/usr/bin
-pgbindir=$(pg_config --bindir)
cd $PKG/$pgbindir
for f in *; do
base=`basename $f`
@@ -112,14 +123,19 @@ mkdir -p $PKG/usr/man/man1
cp -a doc/man/* $PKG/usr/man/man1
gzip -9 $PKG/usr/man/man1/*.1
+mv $PKG/usr/icons $PKG/usr/share
+mv $PKG/usr/applications $PKG/usr/share
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- COPYING CREDITS ChangeLog NEWS README.postgis TODO \
+ COPYING CREDITS ChangeLog NEWS README.postgis TODO LICENSE.TXT \
$PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/doc/postgresql* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/postgis/postgis.info b/gis/postgis/postgis.info
index 7b2cc160e0..8651201812 100644
--- a/gis/postgis/postgis.info
+++ b/gis/postgis/postgis.info
@@ -1,10 +1,10 @@
PRGNAM="postgis"
-VERSION="2.5.3"
+VERSION="3.4.2"
HOMEPAGE="http://postgis.org"
-DOWNLOAD="http://download.osgeo.org/postgis/source/postgis-2.5.3.tar.gz"
-MD5SUM="475bca6249ee11f675b899de14fd3f42"
+DOWNLOAD="https://download.osgeo.org/postgis/source/postgis-3.4.2.tar.gz"
+MD5SUM="632abda8b4267af437db6cde1bc9d9dc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="gdal postgresql"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/proj-data/README b/gis/proj-data/README
new file mode 100644
index 0000000000..4214b49d32
--- /dev/null
+++ b/gis/proj-data/README
@@ -0,0 +1,2 @@
+proj-data contains shift grids for horizontal and vertical coordinate
+transformations for use with the proj package.
diff --git a/gis/geoserver-python/geoserver-python.SlackBuild b/gis/proj-data/proj-data.SlackBuild
index b0894a6297..4179581b3c 100644
--- a/gis/geoserver-python/geoserver-python.SlackBuild
+++ b/gis/proj-data/proj-data.SlackBuild
@@ -1,9 +1,8 @@
-#!/bin/sh
+#!/bin/bash
-# SlackBuild script for geoserver-python
-
-# Copyright 2013 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
-# All rights reserved.
+# Slackware build script for proj-data
+# Copyright 2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2024 Gregory J. L. Tourte <artourter@gmail.com>
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -22,14 +21,23 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=geoserver-python
-VERSION=${VERSION:-2.7}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=proj-data
+VERSION=${VERSION:-1.17}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-
+PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -38,27 +46,17 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP
-mkdir $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/geoserver-$VERSION-SNAPSHOT-python-plugin.zip
-
-# remove SNAPSHOT versions of .jar files duplicated in dependencies
-rm gt-geojson-13-SNAPSHOT.jar
-rm gt-process-13-SNAPSHOT.jar
-rm gt-process-feature-13-SNAPSHOT.jar
-rm gt-process-geometry-13-SNAPSHOT.jar
-rm gt-process-raster-13-SNAPSHOT.jar
-mkdir -p $PKG/usr/share/geoserver/WEB-INF/lib
-cp -a *.jar $PKG/usr/share/geoserver/WEB-INF/lib
+mkdir -p $PKG/usr/share/proj
+tar -C $PKG/usr/share/proj -x -v -f $CWD/$PRGNAM-$VERSION.tar.gz
+chown -R root:root $PKG/usr/share/proj
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/proj/README.DATA $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-mkdir $PKG/install
+mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/proj-data/proj-data.info b/gis/proj-data/proj-data.info
new file mode 100644
index 0000000000..63d3a7c4e8
--- /dev/null
+++ b/gis/proj-data/proj-data.info
@@ -0,0 +1,10 @@
+PRGNAM="proj-data"
+VERSION="1.17"
+HOMEPAGE="https://www.osgeo.org/projects/proj/"
+DOWNLOAD="https://github.com/OSGeo/PROJ-data/releases/download/1.17.0/proj-data-1.17.tar.gz"
+MD5SUM="d68d676603d84ac332427a39ca9d6a0e"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="proj"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/geogig-py/slack-desc b/gis/proj-data/slack-desc
index fd147070cb..c62281090f 100644
--- a/gis/geogig-py/slack-desc
+++ b/gis/proj-data/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-geogig-py: geogig-py (Python library for GeoGig)
-geogig-py:
-geogig-py: geogig-py is a Python library to use GeoGig designed to provide access
-geogig-py: to all GeoGig functionality, so it can be used to script tasks or as
-geogig-py: the base library for a GeoGig client.
-geogig-py:
-geogig-py:
-geogig-py:
-geogig-py:
-geogig-py:
-geogig-py:
+proj-data: proj-data (proj datum grids)
+proj-data:
+proj-data: proj-data contains shift grids for horizontal and vertical
+proj-data: coordinate transformations for use with the proj package.
+proj-data:
+proj-data:
+proj-data:
+proj-data:
+proj-data:
+proj-data:
+proj-data:
diff --git a/gis/proj/README b/gis/proj/README
index 7af2be3c54..7ea5f0548d 100644
--- a/gis/proj/README
+++ b/gis/proj/README
@@ -1,6 +1,10 @@
-PROJ is a generic coordinate transformation software, that transforms
+proj is a generic coordinate transformation software, that transforms
coordinates from one coordinate reference system (CRS) to another. This
includes cartographic projections as well as geodetic transformations.
-This SlackBuild also includes the datum grid files for PROJ (excluding the
-regional resource packages).
+For datum grids, install the proj-data package. Without this package,
+proj can fetch required grids from the internet as needed.
+
+By default, the script does not build nor run the tests. You can use the
+option TESTBUILD=YES to build and run the tests before the make install
+part.
diff --git a/gis/proj/proj.SlackBuild b/gis/proj/proj.SlackBuild
index cb67e4fdb0..8baaa49113 100644
--- a/gis/proj/proj.SlackBuild
+++ b/gis/proj/proj.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for proj
-# Written by Kyle Guinn <elyk03@gmail.com>
-# Copyright 2014-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Originally written by Kyle Guinn <elyk03@gmail.com>
+# Copyright 2014-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2024 Gregory J. L. Tourte <artourter@gmail.com>
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -21,11 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=proj
-VERSION=${VERSION:-5.2.0}
-DGVERSION=${DGVERSION:-1.8}
+VERSION=${VERSION:-9.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -56,6 +66,11 @@ fi
set -e
+TESTBUILDFLAGS=''
+if [[ ${TESTBUILD:='NO'} == 'NO' ]]; then
+ TESTBUILDFLAGS='-DBUILD_TESTING=OFF'
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -64,37 +79,31 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --infodir=/usr/info \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-shared \
- --disable-static \
- --build=$ARCH-slackware-linux
-
-make
-make install-strip DESTDIR=$PKG
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-unzip -n -d $PKG/usr/share/$PRGNAM $CWD/$PRGNAM-datumgrid-$DGVERSION.zip
-chmod o+rX $PKG/usr/share/$PRGNAM/*
+mkdir -p build
+( cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_MANDIR=man \
+ -DCMAKE_INSTALL_DOCDIR=doc/$PRGNAM-$VERSION \
+ -DCMAKE_BUILD_TYPE=Release \
+ $TESTBUILDFLAGS \
+ ..
+ make
+ [[ $TESTBUILD == "YES" ]] && make test
+ make install/strip DESTDIR=$PKG
+)
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS COPYING ChangeLog INSTALL NEWS README \
+ AUTHORS CITATION COPYING ChangeLog NEWS README README.md\
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -102,4 +111,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/proj/proj.info b/gis/proj/proj.info
index d207350d8f..e416208b14 100644
--- a/gis/proj/proj.info
+++ b/gis/proj/proj.info
@@ -1,12 +1,10 @@
PRGNAM="proj"
-VERSION="5.2.0"
-HOMEPAGE="http://trac.osgeo.org/proj/"
-DOWNLOAD="http://download.osgeo.org/proj/proj-5.2.0.tar.gz \
- http://download.osgeo.org/proj/proj-datumgrid-1.8.zip"
-MD5SUM="ad285c7d03cbb138d9246e10e1f3191c \
- a64b68863336f361065c7051acc5a991"
+VERSION="9.4.0"
+HOMEPAGE="https://www.osgeo.org/projects/proj/"
+DOWNLOAD="https://github.com/OSGeo/PROJ/releases/download/9.4.0/proj-9.4.0.tar.gz"
+MD5SUM="c33fd24cf4e3a3048c330b1b07e86b4f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/pyproj/README b/gis/pyproj/README
deleted file mode 100644
index b86dd367a6..0000000000
--- a/gis/pyproj/README
+++ /dev/null
@@ -1,16 +0,0 @@
-Performs cartographic transformations and geodetic computations.
-
-The Proj class can convert from geographic (longitude,latitude) to native map
-projection (x,y) coordinates and vice versa, or from one map projection
-coordinate system directly to another.
-
-The Geod class can perform forward and inverse geodetic, or Great Circle,
-computations. The forward computation involves determining latitude, longitude
-and back azimuth of a terminus point given the latitude and longitude of an
-initial point, plus azimuth and distance. The inverse computation involves
-determining the forward and back azimuths and distance given the latitudes and
-longitudes of an initial and terminus point.
-
-Input coordinates can be given as python arrays, lists/tuples, scalars or
-numpy/Numeric/numarray arrays. Optimized for objects that support the Python
-buffer protocol (regular python and numpy array objects).
diff --git a/gis/pyproj/pyproj.info b/gis/pyproj/pyproj.info
deleted file mode 100644
index fb6f50ca8d..0000000000
--- a/gis/pyproj/pyproj.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="pyproj"
-VERSION="1.9.6"
-HOMEPAGE="https://github.com/jswhit/pyproj"
-DOWNLOAD="https://github.com/jswhit/pyproj/archive/v1.9.6rel/pyproj-1.9.6rel.tar.gz"
-MD5SUM="f1a4190278f9b1b3e21aad2000e39e48"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="proj python3-Cython"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/pyshp/README b/gis/pyshp/README
deleted file mode 100644
index 47bdcfc2cc..0000000000
--- a/gis/pyshp/README
+++ /dev/null
@@ -1,4 +0,0 @@
-The pyshp library reads and writes ESRI Shapefiles in pure Python. You can read
-and write shp, shx, and dbf files with all types of geometry. Everything in the
-public ESRI shapefile specification is implemented. This library is compatible
-with Python versions 2.4 to 3.x.
diff --git a/gis/pyshp/pyshp.info b/gis/pyshp/pyshp.info
deleted file mode 100644
index 80feb41b48..0000000000
--- a/gis/pyshp/pyshp.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="pyshp"
-VERSION="2.1.0"
-HOMEPAGE="https://github.com/GeospatialPython/pyshp"
-DOWNLOAD="https://github.com/GeospatialPython/pyshp/archive/2.1.0/pyshp-2.1.0.tar.gz"
-MD5SUM="c4ecdcaf6d4b50377821419cbe331687"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="python3"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/pyshp/slack-desc b/gis/pyshp/slack-desc
deleted file mode 100644
index a3ac9c6b9e..0000000000
--- a/gis/pyshp/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-pyshp: pyshp (Python shapefile manipulation library)
-pyshp:
-pyshp: This library reads and writes ESRI Shapefiles in pure Python. You can
-pyshp: read and write shp, shx, and dbf files with all types of geometry.
-pyshp: Everything in the public ESRI shapefile specification is implemented.
-pyshp: This library is compatible with Python versions 2.4 to 3.x.
-pyshp:
-pyshp:
-pyshp:
-pyshp:
-pyshp:
diff --git a/gis/pyspatialite/README b/gis/pyspatialite/README
deleted file mode 100644
index 0510b0be8f..0000000000
--- a/gis/pyspatialite/README
+++ /dev/null
@@ -1,5 +0,0 @@
-pyspatialite is an interface to the SQLite 3.x embedded relational database
-engine with spatialite extensions.
-
-It is almost fully compliant with the Python database API version 2.0 and also
-exposes the unique features of SQLite and spatialite.
diff --git a/gis/pyspatialite/pyspatialite.info b/gis/pyspatialite/pyspatialite.info
deleted file mode 100644
index 0d2249deb5..0000000000
--- a/gis/pyspatialite/pyspatialite.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="pyspatialite"
-VERSION="3.0.1_alpha_0"
-HOMEPAGE="https://github.com/lokkju/pyspatialite"
-DOWNLOAD="https://github.com/lokkju/pyspatialite/archive/3.0.1-alpha-0/pyspatialite-3.0.1-alpha-0.tar.gz"
-MD5SUM="d4b9364756b90bc81399fea27af9dc98"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="libspatialite"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/pyspatialite/slack-desc b/gis/pyspatialite/slack-desc
deleted file mode 100644
index 2f05d732d7..0000000000
--- a/gis/pyspatialite/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-pyspatialite: pyspatialite (Python bindings for Spatialite)
-pyspatialite:
-pyspatialite: pyspatialite is an interface to the SQLite 3.x embedded relational
-pyspatialite: database engine with spatialite extensions.
-pyspatialite:
-pyspatialite: It is almost fully compliant with the Python database API version
-pyspatialite: 2.0 and also exposes the unique features of SQLite and spatialite.
-pyspatialite:
-pyspatialite:
-pyspatialite:
-pyspatialite:
diff --git a/gis/python-mapnik/python-mapnik.SlackBuild b/gis/python-mapnik/python-mapnik.SlackBuild
index 5a54a13d52..2110a030cf 100644
--- a/gis/python-mapnik/python-mapnik.SlackBuild
+++ b/gis/python-mapnik/python-mapnik.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# SlackBuild for python-mapnik
#
-# Copyright 2017 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2017-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -21,10 +21,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220312 bkw: Modified by SlackBuilds.org: VERSION must be constant,
+# and match VERSION in the .info file.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=python-mapnik
-VERSION=${VERSION:-3.0.16}
+GITREV=${GITREV:-7da019cf9eb12af8f8aa88b7d75789dfcd1e901b}
+VERSION=${VERSION:-git7da019c}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -34,7 +41,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -58,9 +69,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xzf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$GITREV
+tar xvf $CWD/$PRGNAM-$GITREV.tar.gz
+cd $PRGNAM-$GITREV
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -68,10 +79,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+BOOST_PYTHON_LIB="boost_python$(python -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))')"
+export BOOST_PYTHON_LIB
+export BOOST_THREAD_LIB="boost_thread"
+export BOOST_SYSTEM_LIB="boost_system"
python setup.py install --root=$PKG
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
-fi
+
+BOOST_PYTHON_LIB="boost_python$(python3 -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))')"
+export BOOST_PYTHON_LIB
+python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -86,4 +102,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python-mapnik/python-mapnik.info b/gis/python-mapnik/python-mapnik.info
index 17dffb195e..24c2ce6bae 100644
--- a/gis/python-mapnik/python-mapnik.info
+++ b/gis/python-mapnik/python-mapnik.info
@@ -1,8 +1,8 @@
PRGNAM="python-mapnik"
-VERSION="3.0.16"
+VERSION="git7da019c"
HOMEPAGE="https://mapnik.org"
-DOWNLOAD="https://github.com/mapnik/python-mapnik/archive/v3.0.16/python-mapnik-3.0.16.tar.gz"
-MD5SUM="1a23274f810812791af163d3806792a2"
+DOWNLOAD="https://github.com/mapnik/python-mapnik/archive/7da019cf9eb12af8f8aa88b7d75789dfcd1e901b/python-mapnik-7da019cf9eb12af8f8aa88b7d75789dfcd1e901b.tar.gz"
+MD5SUM="88fa158fec168c4a54f5b1010849af85"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="mapnik"
diff --git a/gis/python-pygeos/README b/gis/python-pygeos/README
new file mode 100644
index 0000000000..72b58085fc
--- /dev/null
+++ b/gis/python-pygeos/README
@@ -0,0 +1,4 @@
+PyGEOS is a C/Python library with vectorized geometry functions. The
+geometry operations are done in the open-source geometry library
+GEOS. PyGEOS wraps these operations in NumPy ufuncs providing a
+performance improvement when operating on arrays of geometries.
diff --git a/gis/Shapely/Shapely.SlackBuild b/gis/python-pygeos/python-pygeos.SlackBuild
index 5af6caefb4..03323d75e4 100644
--- a/gis/Shapely/Shapely.SlackBuild
+++ b/gis/python-pygeos/python-pygeos.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for Shapely
+# Slackware build script for python-pygeos
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2019-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2023 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=Shapely
-VERSION=${VERSION:-1.6.4}
-BUILD=${BUILD:-2}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python-pygeos
+VERSION=${VERSION:-0.14}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=pygeos
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -59,9 +72,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,10 +82,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# remove unnecessary .pxi file
-sed -i "s/data_files\s*=.*/data_files = [],/g" setup.py
-
-python2 setup.py install --root=$PKG
python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -80,7 +89,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- CHANGES.txt CREDITS.txt LICENSE.txt README.rst \
+ LICENSE README.rst \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -88,4 +97,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python-pygeos/python-pygeos.info b/gis/python-pygeos/python-pygeos.info
new file mode 100644
index 0000000000..6a5191b9e7
--- /dev/null
+++ b/gis/python-pygeos/python-pygeos.info
@@ -0,0 +1,10 @@
+PRGNAM="python-pygeos"
+VERSION="0.14"
+HOMEPAGE="https://pygeos.readthedocs.io"
+DOWNLOAD="https://pypi.python.org/packages/source/p/pygeos/pygeos-0.14.tar.gz"
+MD5SUM="85450969759e2a9601fe18bf82fddcee"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="geos python3-numpy"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/geoserver-css/slack-desc b/gis/python-pygeos/slack-desc
index e29177d15a..344a192198 100644
--- a/gis/geoserver-css/slack-desc
+++ b/gis/python-pygeos/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-geoserver-css: geoserver-css (CSS styling support for GeoServer)
-geoserver-css:
-geoserver-css: The CSS plugin adds support for CSS styling to GeoServer.
-geoserver-css:
-geoserver-css:
-geoserver-css:
-geoserver-css:
-geoserver-css:
-geoserver-css:
-geoserver-css:
-geoserver-css:
+python-pygeos: python-pygeos (Python wrapper for geos)
+python-pygeos:
+python-pygeos: PyGEOS is a C/Python library with vectorized geometry functions. The
+python-pygeos: geometry operations are done in the open-source geometry library
+python-pygeos: GEOS. PyGEOS wraps these operations in NumPy ufuncs providing a
+python-pygeos: performance improvement when operating on arrays of geometries.
+python-pygeos:
+python-pygeos:
+python-pygeos:
+python-pygeos:
+python-pygeos:
diff --git a/gis/python3-basemap/python3-basemap.SlackBuild b/gis/python3-basemap/python3-basemap.SlackBuild
index 084a3e4703..565e20285b 100644
--- a/gis/python3-basemap/python3-basemap.SlackBuild
+++ b/gis/python3-basemap/python3-basemap.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for python3-basemap
@@ -22,11 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=python3-basemap
SRCNAM=basemap
-VERSION=${VERSION:-1.2.1}
+VERSION=${VERSION:-1.4.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -60,9 +70,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-${VERSION}rel
-tar xvf $CWD/$SRCNAM-${VERSION}rel.tar.gz
-cd $SRCNAM-${VERSION}rel
+rm -rf $SRCNAM-${VERSION}
+tar xvf $CWD/$SRCNAM-${VERSION}.tar.gz
+cd $SRCNAM-${VERSION}
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,17 +80,30 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+cd packages/${SRCNAM}
+# regenerate cythonized sources
+# thanks arch linux maintainers
+cythonize --force src/_geoslib.pyx
+python3 setup.py install --root=$PKG
+cd ${TMP}/${SRCNAM}-${VERSION}
+
+cd packages/${SRCNAM}_data
+python3 setup.py install --root=$PKG
+cd ${TMP}/${SRCNAM}-${VERSION}
+
+cd packages/${SRCNAM}_data_hires
python3 setup.py install --root=$PKG
+cd ${TMP}/${SRCNAM}-${VERSION}
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE* README.md Changelog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README.md CHANGELOG.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-basemap/python3-basemap.info b/gis/python3-basemap/python3-basemap.info
index 256c6f70f8..1d1be2c8d0 100644
--- a/gis/python3-basemap/python3-basemap.info
+++ b/gis/python3-basemap/python3-basemap.info
@@ -1,10 +1,10 @@
PRGNAM="python3-basemap"
-VERSION="1.2.1"
+VERSION="1.4.1"
HOMEPAGE="https://github.com/matplotlib/basemap"
-DOWNLOAD="https://github.com/matplotlib/basemap/archive/v1.2.1rel/basemap-1.2.1rel.tar.gz"
-MD5SUM="b3c4c1292b36abac27050eb67ada914e"
+DOWNLOAD="https://github.com/matplotlib/basemap/archive/v1.4.1/basemap-1.4.1.tar.gz"
+MD5SUM="e286126fda9c545b5420f29f404b9c6c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="geos pyproj pyshp python3-matplotlib"
+REQUIRES="geos python3-pyproj python3-pyshp python3-matplotlib"
MAINTAINER="Cristiano Urban"
EMAIL="cristiano.urban.slack@gmail.com"
diff --git a/gis/cartopy/README b/gis/python3-cartopy/README
index 3e1086f905..584d84e8e6 100644
--- a/gis/cartopy/README
+++ b/gis/python3-cartopy/README
@@ -1,11 +1,11 @@
-Cartopy is a Python package designed to make drawing maps for data analysis an
-visualisation as easy as possible.
+Cartopy is a Python package designed to make drawing maps for data
+analysis an visualisation as easy as possible.
Some of the key features of cartopy are:
* object oriented projection definitions
* point, line, polygon and image transformations between projections
-* integration to expose advanced mapping in matplotlib with a simple and
- intuitive interface
-* powerful vector data handling by integrating shapefile reading with Shapely
- capabilities
+* integration to expose advanced mapping in matplotlib with a simple
+ and intuitive interface
+* powerful vector data handling by integrating shapefile reading with
+ shapely capabilities
diff --git a/gis/cartopy/cartopy.SlackBuild b/gis/python3-cartopy/python3-cartopy.SlackBuild
index ce376aa696..42993d5796 100644
--- a/gis/cartopy/cartopy.SlackBuild
+++ b/gis/python3-cartopy/python3-cartopy.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for cartopy
+# Slackware build script for python3-cartopy
-# Copyright 2014-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2014-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2023 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=cartopy
-VERSION=${VERSION:-0.17.0}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-cartopy
+VERSION=${VERSION:-0.22.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=Cartopy
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -59,24 +72,32 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -o \! -perm 755 -o -exec chmod 755 {} + -o \
+ \! -perm /111 -o \! -perm 644 -o -exec chmod 644 {} +
+
+# Fixing numpy dependency check in pyproject.toml:
+# oldest-supported-numpy has a strict check and doesn't support newer version
+# so we replace it. The alternative is to add --skip-dependency-check to tbe
+# build line but this is not deemed optimal.
+sed -i 's/oldest-supported-numpy/numpy>=1.19.3/' pyproject.toml
+
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages/
-python setup.py install --root=$PKG
+python3 -m build --no-isolation
+python3 -m installer -d "$PKG" dist/*.whl
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- CHANGES CONTRIBUTING.md COPYING COPYING.LESSER README.md \
+ CHANGES COPYING COPYING.LESSER README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -84,4 +105,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-cartopy/python3-cartopy.info b/gis/python3-cartopy/python3-cartopy.info
new file mode 100644
index 0000000000..19dbf3eaed
--- /dev/null
+++ b/gis/python3-cartopy/python3-cartopy.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-cartopy"
+VERSION="0.22.0"
+HOMEPAGE="https://scitools.org.uk/cartopy/"
+DOWNLOAD="https://files.pythonhosted.org/packages/source/C/Cartopy/Cartopy-0.22.0.tar.gz"
+MD5SUM="1a96bec92d02a0f9c95fa6364cb0767d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="gdal python3-matplotlib python3-pyproj python3-pyshp python3-scipy python3-shapely python3-setuptools-scm-opt"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/python3-cartopy/slack-desc b/gis/python3-cartopy/slack-desc
new file mode 100644
index 0000000000..467935f9bc
--- /dev/null
+++ b/gis/python3-cartopy/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-cartopy: python3-cartopy (cartographic tools for Python)
+python3-cartopy:
+python3-cartopy: Cartopy is a Python package designed to make drawing maps for data
+python3-cartopy: analysis and visualisation as easy as possible.
+python3-cartopy:
+python3-cartopy:
+python3-cartopy:
+python3-cartopy:
+python3-cartopy:
+python3-cartopy:
+python3-cartopy:
diff --git a/gis/python3-cftime/README b/gis/python3-cftime/README
new file mode 100644
index 0000000000..80a804fee4
--- /dev/null
+++ b/gis/python3-cftime/README
@@ -0,0 +1,4 @@
+python3-cftime
+
+Python library for decoding time units and variable values in a netCDF
+file conforming to the Climate and Forecasting (CF) netCDF conventions.
diff --git a/gis/basemap/basemap.SlackBuild b/gis/python3-cftime/python3-cftime.SlackBuild
index b61a4f4cc1..91ccad5961 100644
--- a/gis/basemap/basemap.SlackBuild
+++ b/gis/python3-cftime/python3-cftime.SlackBuild
@@ -1,9 +1,8 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for basemap
+# Slackware build script for python3-cftime
-# Originally written by Dimitris Zlatanidis <d.zlatanidis@gmail.com>
-# Copyright (c) 2019 Cristiano Urban, Gonars, Italy
+# Copyright 2022-2023 - Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,10 +22,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=basemap
-VERSION=${VERSION:-1.2.1}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-cftime
+VERSION=${VERSION:-1.6.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=cftime
+SRCVER=${VERSION}rel
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,51 +41,44 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-${VERSION}rel
-tar xvf $CWD/$PRGNAM-${VERSION}rel.tar.gz
-cd $PRGNAM-${VERSION}rel
+rm -rf $SRCNAM-$SRCVER
+tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
+cd $SRCNAM-$SRCVER
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+sed -i 's/oldest-supported-numpy/numpy>=1.19.3/' pyproject.toml
-python setup.py install --root=$PKG
+python3 -m build --no-isolation
+python3 -m installer -d "$PKG" dist/*.whl
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE* README.md Changelog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ Changelog LICENSE README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-cftime/python3-cftime.info b/gis/python3-cftime/python3-cftime.info
new file mode 100644
index 0000000000..6f074ce474
--- /dev/null
+++ b/gis/python3-cftime/python3-cftime.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-cftime"
+VERSION="1.6.3"
+HOMEPAGE="https://unidata.github.io/cftime/"
+DOWNLOAD="https://github.com/Unidata/cftime/archive/v1.6.3rel/cftime-1.6.3rel.tar.gz"
+MD5SUM="2e77ad0b187fbdcd48fd1f39eecfa04a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-numpy"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/spatialite_gui/slack-desc b/gis/python3-cftime/slack-desc
index 5c1f13c491..993e08f765 100644
--- a/gis/spatialite_gui/slack-desc
+++ b/gis/python3-cftime/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-spatialite_gui: spatialite_gui (GUI for SpatiaLite)
-spatialite_gui:
-spatialite_gui: spatialite-gui is an open source Graphical User Interface (GUI) tool
-spatialite_gui: supporting SpatiaLite
-spatialite_gui:
-spatialite_gui: Project home: https://www.gaia-gis.it/fossil/libgaiagraphics/index
-spatialite_gui:
-spatialite_gui:
-spatialite_gui:
-spatialite_gui:
-spatialite_gui:
+python3-cftime: python3-cftime (Time-handling functionality from netcdf4)
+python3-cftime:
+python3-cftime: Python library for decoding time units and variable values in a netCDF
+python3-cftime: file conforming to the Climate and Forecasting (CF) netCDF
+python3-cftime: conventions.
+python3-cftime:
+python3-cftime:
+python3-cftime:
+python3-cftime:
+python3-cftime:
+python3-cftime:
diff --git a/gis/python3-netcdf4-python/README b/gis/python3-netcdf4-python/README
new file mode 100644
index 0000000000..1905489969
--- /dev/null
+++ b/gis/python3-netcdf4-python/README
@@ -0,0 +1,17 @@
+python3-netcdf4 is a Python3 interface to the netCDF C library.
+
+netCDF version 4 has many features not found in earlier versions of the
+library and is implemented on top of HDF5. This module can read and
+write files in both the new netCDF 4 and the old netCDF 3 format, and
+can create files that are readable by HDF5 clients. The API modelled
+after Scientific.IO.NetCDF, and should be familiar to users of that
+module.
+
+Most new features of netCDF 4 are implemented, such as multiple
+unlimited dimensions, groups and data compression. All the new numeric
+data types (such as 64 bit and unsigned integer types) are implemented.
+Compound (struct), variable length (vlen) and enumerated (enum) data
+types are supported, but not the opaque data type. Mixtures of compound,
+vlen and enum data types (such as compound types containing enums, or
+vlens containing compound types) are not supported.
+
diff --git a/gis/python3-netcdf4-python/python3-netcdf4-python.SlackBuild b/gis/python3-netcdf4-python/python3-netcdf4-python.SlackBuild
new file mode 100644
index 0000000000..1e9dffc224
--- /dev/null
+++ b/gis/python3-netcdf4-python/python3-netcdf4-python.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+# Slackware build script for python3-netcdf4-python
+
+# Copyright 2022-2023 - Gregory J. L. Tourte <artourter@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-netcdf4-python
+VERSION=${VERSION:-1.6.5}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=netcdf4-python
+SRCVER=${VERSION}rel
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$SRCVER
+tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
+cd $SRCNAM-$SRCVER
+chown -R root:root .
+find -L . \
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+# Fixing numpy dependency check in pyproject.toml:
+# oldest-supported-numpy has a strict check and doesn't support newer version
+# so we replace it. The alternative is to add --skip-dependency-check to tbe
+# build line but this is not deemed optimal.
+sed -i 's/oldest-supported-numpy/numpy>=1.19.3/' pyproject.toml
+
+# Requires newer version of setuptools than available in -stable. Has not
+# effect on -current
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
+
+python3 -m build --no-isolation
+python3 -m installer -d "$PKG" dist/*.whl
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/man/man1/
+for manfile in man/*.1; do
+ gzip -c $manfile > $PKG/usr/man/man1/$(basename $manfile).gz
+done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ Changelog LICENSE README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-netcdf4-python/python3-netcdf4-python.info b/gis/python3-netcdf4-python/python3-netcdf4-python.info
new file mode 100644
index 0000000000..7cf893659f
--- /dev/null
+++ b/gis/python3-netcdf4-python/python3-netcdf4-python.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-netcdf4-python"
+VERSION="1.6.5"
+HOMEPAGE="http://unidata.github.io/netcdf4-python/"
+DOWNLOAD="https://github.com/Unidata/netcdf4-python/archive/v1.6.5rel/netcdf4-python-1.6.5rel.tar.gz"
+MD5SUM="c3ebdf74ae184f2bd9ecbbc3f16801fe"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="netcdf python3-cftime python3-setuptools-opt"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/python3-netcdf4-python/slack-desc b/gis/python3-netcdf4-python/slack-desc
new file mode 100644
index 0000000000..44d3f0c1dd
--- /dev/null
+++ b/gis/python3-netcdf4-python/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-netcdf4-python: python3-netcdf4-python (Python3 interface for netCDF)
+python3-netcdf4-python:
+python3-netcdf4-python: netcdf4-python is a Python/numpy interface to the netCDF C library.
+python3-netcdf4-python:
+python3-netcdf4-python: netCDF version 4 has many features not found in earlier versions of
+python3-netcdf4-python: the library and is implemented on top of HDF5. This module can read
+python3-netcdf4-python: and write files in both the new netCDF 4 and the old netCDF 3 format,
+python3-netcdf4-python: and can create files that are readable by HDF5 clients. The API
+python3-netcdf4-python: modelled after Scientific.IO.NetCDF, and should be familiar to users
+python3-netcdf4-python: of that module.
+python3-netcdf4-python:
diff --git a/gis/python3-pyproj/README b/gis/python3-pyproj/README
new file mode 100644
index 0000000000..e9c818dd27
--- /dev/null
+++ b/gis/python3-pyproj/README
@@ -0,0 +1,17 @@
+Performs cartographic transformations and geodetic computations.
+
+The Proj class can convert from geographic (longitude,latitude) to
+native map projection (x,y) coordinates and vice versa, or from one
+map projection coordinate system directly to another.
+
+The Geod class can perform forward and inverse geodetic, or Great
+Circle, computations. The forward computation involves determining
+latitude, longitude and back azimuth of a terminus point given
+the latitude and longitude of an initial point, plus azimuth and
+distance. The inverse computation involves determining the forward and
+back azimuths and distance given the latitudes and longitudes of an
+initial and terminus point.
+
+Input coordinates can be given as python arrays, lists/tuples, scalars
+or numpy/Numeric/numarray arrays. Optimized for objects that support
+the Python buffer protocol (regular python and numpy array objects).
diff --git a/gis/pyspatialite/pyspatialite.SlackBuild b/gis/python3-pyproj/python3-pyproj.SlackBuild
index b4dc849ffe..55256a46f3 100644
--- a/gis/pyspatialite/pyspatialite.SlackBuild
+++ b/gis/python3-pyproj/python3-pyproj.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for pyspatialite
+# Slackware build script for pyproj
-# Copyright 2016 Benjamin Trigona-Harany
+# Copyright 2013-2021 Benjamin Trigona-Harany
+# Copyright 2021-2023 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=pyspatialite
-VERSION=${VERSION:-3.0.1_alpha_0}
-SRCVER=$(echo $VERSION | tr '_' '-')
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-pyproj
+VERSION=${VERSION:-3.6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=pyproj
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -60,9 +72,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$SRCVER
-tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
-cd $PRGNAM-$SRCVER
+rm -rf $SRCNAM-${VERSION}
+tar xvf $CWD/$SRCNAM-${VERSION}.tar.gz
+cd $SRCNAM-${VERSION}
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,16 +82,18 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-sed -i '/^#include "sqlite3.h"$/d' src/{statement,util}.h
-CFLAGS=-I/usr/include python setup.py install --root=$PKG
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
+
+python3 -m build --no-isolation
+python3 -m installer -d "$PKG" dist/*.whl
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-rm -r $PKG/usr/$PRGNAM-doc
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- CHANGES LICENSE README.md \
+ LICENSE README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -87,4 +101,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-pyproj/python3-pyproj.info b/gis/python3-pyproj/python3-pyproj.info
new file mode 100644
index 0000000000..f093177f12
--- /dev/null
+++ b/gis/python3-pyproj/python3-pyproj.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-pyproj"
+VERSION="3.6.0"
+HOMEPAGE="https://github.com/pyproj4/pyproj"
+DOWNLOAD="https://github.com/pyproj4/pyproj/archive/3.6.0/pyproj-3.6.0.tar.gz"
+MD5SUM="dd28c4d2b030431ebde1c96b118f55cd"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="proj python3-setuptools-opt"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/python3-pyproj/slack-desc b/gis/python3-pyproj/slack-desc
new file mode 100644
index 0000000000..c0e5d2594e
--- /dev/null
+++ b/gis/python3-pyproj/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-pyproj: python3-pyproj (Python interface to the PROJ.4 library)
+python3-pyproj:
+python3-pyproj: pyproj can convert from geographic (longitude,latitude) to native
+python3-pyproj: map projection (x,y) coordinates and vice versa, or from one map
+python3-pyproj: projection coordinate system directly to another.
+python3-pyproj:
+python3-pyproj: Homepage: http://code.google.com/p/pyproj/
+python3-pyproj:
+python3-pyproj:
+python3-pyproj:
+python3-pyproj:
diff --git a/gis/python3-pyshp/README b/gis/python3-pyshp/README
new file mode 100644
index 0000000000..84ca915686
--- /dev/null
+++ b/gis/python3-pyshp/README
@@ -0,0 +1,18 @@
+The Python Shapefile Library (PyShp) provides read and write support for
+the Esri Shapefile format. The Shapefile format is a popular Geographic
+Information System vector data format created by Esri. For more
+information about this format please read the well-written "ESRI
+Shapefile Technical Description - July 1998" located at
+http://www.esri.com/library/whitepapers/p dfs/shapefile.pdf . The Esri
+document describes the shp and shx file formats. However a third file
+format called dbf is also required. This format is documented on the web
+as the "XBase File Format Description" and is a simple file-based
+database format created in the 1960's.
+
+Both the Esri and XBase file-formats are very simple in design and
+memory efficient which is part of the reason the shapefile format
+remains popular despite the numerous ways to store and exchange GIS data
+available today.
+
+Pyshp is compatible with Python 2.7-3.x, however this script only build
+the python3 version.
diff --git a/gis/pyproj/pyproj.SlackBuild b/gis/python3-pyshp/python3-pyshp.SlackBuild
index 7d8a88df92..5878759999 100644
--- a/gis/pyproj/pyproj.SlackBuild
+++ b/gis/python3-pyshp/python3-pyshp.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for pyproj
+# Slackware build script for pyshp
-# Copyright 2013-2019 Benjamin Trigona-Harany
+# Copyright 2014-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2022 Gregory J. L. Tourte <artourter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=pyproj
-VERSION=${VERSION:-1.9.6}
-BUILD=${BUILD:-2}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-pyshp
+VERSION=${VERSION:-2.3.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=pyshp
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -59,9 +72,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-${VERSION}rel
-tar xvf $CWD/$PRGNAM-${VERSION}rel.tar.gz
-cd $PRGNAM-${VERSION}rel
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,14 +83,13 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python3 setup.py install --root=$PKG
-python2 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- Changelog LICENSE_proj4 LICENSE_proj4 README.md \
+ changelog.txt README.md LICENSE.TXT \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -85,4 +97,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-pyshp/python3-pyshp.info b/gis/python3-pyshp/python3-pyshp.info
new file mode 100644
index 0000000000..d97d86d34b
--- /dev/null
+++ b/gis/python3-pyshp/python3-pyshp.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-pyshp"
+VERSION="2.3.1"
+HOMEPAGE="https://github.com/GeospatialPython/pyshp"
+DOWNLOAD="https://github.com/GeospatialPython/pyshp/archive/2.3.1/pyshp-2.3.1.tar.gz"
+MD5SUM="975ccc60d663b3e6f55b583acf18f05a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/python3-pyshp/slack-desc b/gis/python3-pyshp/slack-desc
new file mode 100644
index 0000000000..20a9fad16d
--- /dev/null
+++ b/gis/python3-pyshp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-pyshp: python3-pyshp (Python shapefile manipulation library)
+python3-pyshp:
+python3-pyshp: This library reads and writes Esri Shapefiles in pure Python. You can
+python3-pyshp: read and write shp, shx, and dbf files with all types of geometry.
+python3-pyshp: Everything in the public Esri shapefile specification is implemented.
+python3-pyshp:
+python3-pyshp: This library is compatible with Python versions 2.7 to 3.x, but this
+python3-pyshp: package only contains the python3 version.
+python3-pyshp:
+python3-pyshp:
+python3-pyshp:
diff --git a/gis/Shapely/README b/gis/python3-shapely/README
index 99de18871f..99de18871f 100644
--- a/gis/Shapely/README
+++ b/gis/python3-shapely/README
diff --git a/gis/python3-shapely/python3-shapely.SlackBuild b/gis/python3-shapely/python3-shapely.SlackBuild
new file mode 100644
index 0000000000..12a2c42b8b
--- /dev/null
+++ b/gis/python3-shapely/python3-shapely.SlackBuild
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+# Slackware build script for Shapely
+
+# Copyright 2013-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2021-2024 Gregory J. L. Tourte <artourter@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-shapely
+VERSION=${VERSION:-2.0.3}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=shapely
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ -perm /111 -o \! -perm 755 -o -exec chmod 755 {} + -a \
+ \! -perm /111 -o \! -perm 644 -o -exec chmod 644 {} +
+
+# Fixing numpy dependency check in pyproject.toml:
+# oldest-supported-numpy has a strict check and doesn't support newer version
+# so we replace it. The alternative is to add --skip-dependency-check to tbe
+# build line but this is not deemed optimal.
+sed -i 's/oldest-supported-numpy/numpy>=1.19.3/' pyproject.toml
+
+# Requires newer version of setuptools than available in -stable. Has not
+# effect on -current
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages
+
+python3 -m build --no-isolation
+python3 -m installer -d "$PKG" dist/*.whl
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CHANGES.txt CREDITS.txt LICENSE.txt README.rst \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-shapely/python3-shapely.info b/gis/python3-shapely/python3-shapely.info
new file mode 100644
index 0000000000..d3033b5463
--- /dev/null
+++ b/gis/python3-shapely/python3-shapely.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-shapely"
+VERSION="2.0.3"
+HOMEPAGE="https://github.com/shapely/shapely"
+DOWNLOAD="https://github.com/shapely/shapely/archive/2.0.3/shapely-2.0.3.tar.gz"
+MD5SUM="0baf77e1ec33f9f2ec0aeeb8d2fd5fae"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-setuptools-opt python3-numpy geos"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/python3-shapely/slack-desc b/gis/python3-shapely/slack-desc
new file mode 100644
index 0000000000..779402b414
--- /dev/null
+++ b/gis/python3-shapely/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-shapely: python3-shapely (geometric objects, predicates, and operations)
+python3-shapely:
+python3-shapely: Shapely is a BSD-licensed Python package for manipulation and analysis
+python3-shapely: of planar geometric objects. It is based on the widely deployed GEOS
+python3-shapely: (the engine of PostGIS) and JTS (from which GEOS is ported) libraries.
+python3-shapely: Shapely is not concerned with data formats or coordinate systems, but
+python3-shapely: can be readily integrated with packages that are.
+python3-shapely:
+python3-shapely: Homepage: https://github.com/shapely/shapely
+python3-shapely:
+python3-shapely:
diff --git a/gis/python3-xarray/README b/gis/python3-xarray/README
new file mode 100644
index 0000000000..3984ba192b
--- /dev/null
+++ b/gis/python3-xarray/README
@@ -0,0 +1,10 @@
+xarray is an open source project and Python package that aims to
+bring the labeled data power of pandas to the physical sciences, by
+providing N-dimensional variants of the core pandas data structures.
+
+The goal is to provide a pandas-like and pandas-compatible toolkit for
+analytics on multi-dimensional arrays, rather than the tabular data
+for which pandas excels. Our approach adopts the Common Data Model
+for self- describing scientific data in widespread use in the Earth
+sciences: xarray.Dataset is an in-memory representation of a netCDF
+file.
diff --git a/gis/python3-xarray/python3-xarray.SlackBuild b/gis/python3-xarray/python3-xarray.SlackBuild
new file mode 100644
index 0000000000..92d7f121e6
--- /dev/null
+++ b/gis/python3-xarray/python3-xarray.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# Slackware build script for python3-xarray
+
+# Copyright 2018-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2022-2024 Gregory J. L. Tourte <artourter@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=python3-xarray
+VERSION=${VERSION:-2024.03.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=xarray
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages/
+
+python3 -m build --wheel --no-isolation
+python3 -m installer --destdir "$PKG" dist/*.whl
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CITATION.cff CODE_OF_CONDUCT.md CONTRIBUTING.md HOW_TO_RELEASE.md LICENSE README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/python3-xarray/python3-xarray.info b/gis/python3-xarray/python3-xarray.info
new file mode 100644
index 0000000000..5bd43896ba
--- /dev/null
+++ b/gis/python3-xarray/python3-xarray.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-xarray"
+VERSION="2024.03.0"
+HOMEPAGE="http://xarray.pydata.org"
+DOWNLOAD="https://github.com/pydata/xarray/archive/v2024.03.0/xarray-2024.03.0.tar.gz"
+MD5SUM="af81c70f069c3adb95acde6ffd7fdac1"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-pandas python3-setuptools-scm-opt"
+MAINTAINER="ArTourter"
+EMAIL="artourter@gmail.com"
diff --git a/gis/CreateCloudMap/slack-desc b/gis/python3-xarray/slack-desc
index 07404c420e..80a5ce8750 100644
--- a/gis/CreateCloudMap/slack-desc
+++ b/gis/python3-xarray/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-CreateCloudMap: CreateCloudMap (cloud map for xplanet)
-CreateCloudMap:
-CreateCloudMap: Python script to create a cloud map for xplanet using satellite
-CreateCloudMap: images from the Dundee Satellite Receiving Station, Dundee
-CreateCloudMap: University, UK.
-CreateCloudMap:
-CreateCloudMap: Homepage: https://github.com/jmozmoz/cloudmap
-CreateCloudMap:
-CreateCloudMap:
-CreateCloudMap:
-CreateCloudMap:
+python3-xarray: python3-xarray (N-D labeled arrays and datasets)
+python3-xarray:
+python3-xarray: xarray is an open source project and Python package that aims to
+python3-xarray: bring the labeled data power of pandas to the physical sciences,
+python3-xarray: by providing N-dimensional variants of the core pandas data
+python3-xarray: structures.
+python3-xarray:
+python3-xarray:
+python3-xarray:
+python3-xarray:
+python3-xarray:
diff --git a/gis/pytrainer/pytrainer.SlackBuild b/gis/pytrainer/pytrainer.SlackBuild
index eeceb65401..7165cf0033 100644
--- a/gis/pytrainer/pytrainer.SlackBuild
+++ b/gis/pytrainer/pytrainer.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Pytrainer
-# Copyright 2014-2019 Kyle Guinn <elyk03@gmail.com>
+# Copyright 2014-2024 Kyle Guinn <elyk03@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pytrainer
-VERSION=${VERSION:-2.0.1}
+VERSION=${VERSION:-2.2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
@@ -35,9 +38,13 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM-$VERSION
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING INSTALL PLUGINS.README README.md"
@@ -53,7 +60,7 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go-w,a+rX-st .
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
@@ -64,4 +71,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/pytrainer/pytrainer.info b/gis/pytrainer/pytrainer.info
index ef93cc8484..6222f3a15b 100644
--- a/gis/pytrainer/pytrainer.info
+++ b/gis/pytrainer/pytrainer.info
@@ -1,10 +1,10 @@
PRGNAM="pytrainer"
-VERSION="2.0.1"
+VERSION="2.2.1"
HOMEPAGE="https://github.com/pytrainer/pytrainer"
-DOWNLOAD="https://github.com/pytrainer/pytrainer/archive/v2.0.1/pytrainer-2.0.1.tar.gz"
-MD5SUM="4f72a99412a40be7e40f5b84c8744472"
+DOWNLOAD="https://github.com/pytrainer/pytrainer/archive/v2.2.1/pytrainer-2.2.1.tar.gz"
+MD5SUM="2fee7f07868d7185554e2d3e4ba1aeed"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="lxml sqlalchemy-migrate python-dateutil python-certifi python-requests matplotlib webkit2gtk zenity"
+REQUIRES="python3-lxml SQLAlchemy python3-matplotlib webkit2gtk zenity"
MAINTAINER="Kyle Guinn"
EMAIL="elyk03@gmail.com"
diff --git a/gis/qgis/README b/gis/qgis/README
index 5fb9af9437..72d371f3fa 100644
--- a/gis/qgis/README
+++ b/gis/qgis/README
@@ -1,20 +1,11 @@
-Quantum GIS (QGIS) is a user friendly Geographic Information System
-that lets you view and manipulate spatial data on your computer. It
-supports many common spatial data formats (e.g. PostGIS, ShapeFile and
-geotiff).
+QGIS is a user friendly Geographic Information System that lets you
+view and manipulate spatial data on your computer. It supports many
+common spatial data formats (e.g. PostGIS, ShapeFile and geotiff).
-Optional compile-time dependencies:
- - postgresql and postgis: for PostGIS support
- - gpsbabel: for the GPS plugin
- - grass: for the Grass plugin
- - gsl: for georeferencing support
- - fcgi: for the QGIS server (see README.server)
+The installation of QGIS from sources can result strongly different
+depending on the optional/required packages installed and enabled. This
+slackbuild is based on basic and some optional settings that require
+the dependencies (and related nested deps) reported in the REQUIRES
+field of qgis.info.
-Optional run-time dependencies:
- - OTB
- - R
- - saga-gis
- - TauDEM
-
-If ninja is installed, set NINJA=yes to use it for parallel builds that should
-be faster on most systems.
+For further information see the README.Slackware file.
diff --git a/gis/qgis/README.Slackware b/gis/qgis/README.Slackware
new file mode 100644
index 0000000000..0c2fbf044d
--- /dev/null
+++ b/gis/qgis/README.Slackware
@@ -0,0 +1,87 @@
+Table of contents
+
+1. BUILD-TIME DEPENDENCIES
+2. PYTHON BINDINGS AND DEPENDENCIES
+3. RUNTIME DEPENDENCIES AND FORMATS
+4. ISSUES
+
+1. BUILD-TIME DEPENDENCIES
+Regardless of settings in this slackbuild, a basic installation of QGIS
+requires these compile-time dependencies:
+ - proj
+ - geos
+ - libspatialite
+ - libspatialindex
+ - gdal
+ - qwt
+The slackbuilds of these are available in this repository. The packages
+gdal, proj, and geos are not reported in REQUIRES field of qgis.info
+because should be installed as dependencies of others.
+Other dependencies must be already installed in your system with a
+full installation of Slackware (for example, Qt5, QScintilla, qca,
+Python 3, qtkeychain, eccetera).
+
+Optional dependencies that are enabled as strictly required in this
+slackbuild are the following:
+ - postgis: needed for PostGIS
+
+Other optional dependencies are enabled by default if found in the
+system. These are the following
+ - gpsbabel: for the GPS plugin
+ - grass: for the Grass plugin
+ - pdal: for support to PDAL
+ - libdraco: for support to Draco plugin
+ - gsl: for georeferencing support
+ - fcgi: for the QGIS server functionality
+
+The build install as optional dependencies - autodetected - also
+hdf5 and netcdf. If they are installed, the support of PDAL and/or
+Draco can be disabled also by setting to "no" the environment variable
+ PDAL=no [DRACO=no] ./qgis.SlackBuild
+
+2. PYTHON BINDINGS AND DEPENDENCIES
+The functionality of QGIS is strongly enhanced by a lot of plugins that
+can be installed in runtime. Since these plugins are based on Python
+modules, the support of Python is enabled by default. This requires
+some Python dependencies that are available in a full installation of
+Slackware or as slackbuilds in this repository. For a full support of
+Python in QGIS you have to install the following packages (as reported
+in REQUIRES field of qgis.info):
+ - OWSLib
+ - python3-numpy
+ - python3-psycopg2
+ - termcolor
+Other python modules are required as nested dependencies. The lack of
+some of these modules could not affect the build/runtime of QGIS but
+could affect the part or the entire functionality of the Python
+support.
+
+3. RUNTIME DEPENDENCIES AND FORMATS
+Optional run-time dependencies are:
+ - OTB
+ - R
+ - saga-gis
+ - TauDEM
+
+QGIS supports indirectly several formats that depends on the GDAL
+support in build-time (usually autodetected). For example, the support
+of the proprietary format ECW is enabled in QGIS if gdal has been build
+with this support (this requires the package libecwj2 installed before
+build gdal).
+
+4. ISSUES
+Support to OpenCL is enabled by default but the build could fail in
+systems with old drivers/graphic cards. If you want to prevent this
+pass to the slackbuild the environment variable
+
+ OPENCL=no ./qgis.SlackBuild
+
+It has reported that QGIS shows runtime warnings about 'osgeo' unless
+the Python GDAL library is installed. If you encounter this issue you
+can solve by installing via pip the Python GDAL library as simple user
+(not root!) as following
+ $ pip install GDAL
+
+Other issues not noticed may be encountered depending on various
+system settings. If you found any problem please contact the
+maintainer.
diff --git a/gis/qgis/README.server b/gis/qgis/README.server
deleted file mode 100644
index 40fb86b098..0000000000
--- a/gis/qgis/README.server
+++ /dev/null
@@ -1,23 +0,0 @@
-QGIS Server is a WMS server for your QGIS project. It requires fcgi. It is
-optionally built at the same time as QGIS; you need to specify SERVER=yes
-to the SlackBuild, for example
-
- SERVER=yes sh qgis.SlackBuild
-
-By default, the server is installed into /var/www/cgi-bin/qgis, and so the
-WMS URL is 'http://<hostname>/cgi-bin/qgis/qgis_mapserv.fcgi'. However, a
-different directory can be specified by passing CGIBINDIR=<path> to the
-SlackBuild script.
-
-After installing QGIS (and the server), you will need to set up the server.
-To serve a single QGIS project, this can be done as follows:
-
-* In the qgis 'Project Properties' window, on the 'General' tab, ensure
-that 'Save paths' is set to 'absolute', and on the 'WMS Server' tab, fill
-in all relevant details (particularly including 'Coordinate Systems
-Restrictions').
-
-* Create a symlink to your QGIS project file from /var/www/cgi-bin/qgis/:
-
- ln -s /home/user/maps/mymap.qgs /var/www/cgi-bin/qgis/
-
diff --git a/gis/qgis/qgis.SlackBuild b/gis/qgis/qgis.SlackBuild
index 3d24b91656..249dad3bc6 100644
--- a/gis/qgis/qgis.SlackBuild
+++ b/gis/qgis/qgis.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for Quantum GIS
+# Slackware build script for QGIS
# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
-# Copyright 2013 Benjamin Trigona-Harany
+# Copyright 2013-2021 Benjamin Trigona-Harany
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,10 +24,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=qgis
-VERSION=${VERSION:-2.18.18}
+VERSION=${VERSION:-3.36.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +40,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -70,84 +78,79 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-WITHGRASS=""
-if pkg-config --exists grass; then
- WITHGRASS="-DGRASS_PREFIX=$(pkg-config --variable=prefix grass)"
+if pkg-config --exists OpenCL; then
+ OCL="-DUSE_OPENCL=OFF " ; [ "${OPENCL:-yes}" = "yes" ] && OCL="-DUSE_OPENCL=ON "
+else
+ OCL="-DUSE_OPENCL=OFF "
fi
-WITHSERVER="-DWITH_SERVER=FALSE"
-CGIBINDIR="${CGIBINDIR:-/var/www/cgi-bin/qgis}"
-if [ "${SERVER:-no}" = "yes" ]; then
- WITHSERVER="-DWITH_SERVER=TRUE -DQGIS_CGIBIN_SUBDIR=$CGIBINDIR"
+if pkg-config --exists pdal; then
+ WITHPDAL="-DWITH_PDAL=OFF "; [ "${PDAL:-yes}" = "yes" ] && WITHPDAL="-DWITH_PDAL=ON "
+else
+ WITHPDAL="-DWITH_PDAL=OFF "
fi
-WITHNINJA=""
-if [ "${NINJA:-no}" = "yes" ]; then
- WITHNINJA="-GNinja"
+if pkg-config --exists draco; then
+ WITHDRACO="-DWITH_DRACO=OFF "; [ "${DRACO:-yes}" = "yes" ] && WITHDRACO="-DWITH_DRACO=ON "
+else
+ WITHDRACO="-DWITH_DRACO=OFF "
fi
-# fix double qjson target
-patch -p1 < $CWD/qjson.cmake.diff
+if pkg-config --exists grass; then
+ WITHGRASS="-DGRASS_PREFIX=$(pkg-config --variable=prefix grass) "
+else
+ WITHGRASS=""
+fi
-mkdir build
+sed -i '43 i IF (NOT PROJ_INCLUDE_DIR)\nFIND_PATH(PROJ_INCLUDE_DIR proj.h\n"$ENV{INCLUDE}"\n"$ENV{LIB_DIR}/include"\n)\nENDIF (NOT PROJ_INCLUDE_DIR)\n' cmake/FindProj.cmake
+
+mkdir -p build
cd build
cmake .. \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -pthread" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQGIS_LIB_SUBDIR=lib${LIBDIRSUFFIX} \
-DQGIS_LIBEXEC_SUBDIR=lib${LIBDIRSUFFIX}/qgis \
-DQGIS_PLUGIN_SUBDIR=lib${LIBDIRSUFFIX}/qgis \
- -DWITH_INTERNAL_QWTPOLAR=FALSE \
- -DQWTPOLAR_INCLUDE_DIR=/usr/include/qwt \
+ -DWITH_QWTPOLAR=TRUE \
+ -DWITH_CUSTOM_WIDGETS=FALSE \
+ -DBINDINGS_GLOBAL_INSTALL=TRUE \
+ -DQWT_INCLUDE_DIR=/usr/include/qwt \
+ -DQSCINTILLA_INCLUDE_DIR=/usr/include/qt5 \
-DENABLE_TESTS=FALSE \
- $WITHSERVER \
- $WITHGRASS \
- $WITHNINJA
-
- if [ -z "$WITHNINJA" ]; then
- make install -j2 DESTDIR=$PKG
- else
- DESTDIR=$PKG ninja install
- fi
+ -DWITH_3D=TRUE \
+ -Wno-dev \
+ $OCL \
+ $WITHPDAL \
+ $WITHDRACO \
+ $WITHGRASS
+
+ make
+ make install DESTDIR=$PKG
cd -
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-install -D -m 0644 debian/qgis.desktop \
- $PKG/usr/share/applications/qgis.desktop
-install -D -m 0644 debian/qgis.xml \
- $PKG/usr/share/mime/packages/qgis.xml
-sed -i "s_image/jpeg;__" $PKG/usr/share/applications/qgis.desktop
-
-mkdir -p $PKG/usr/share/pixmaps
-ln -s /usr/share/qgis/images/icons/qgis-icon.png $PKG/usr/share/pixmaps/qgis.png
-ln -s /usr/share/qgis/images/icons/qgis-mime-icon.png $PKG/usr/share/pixmaps/qgis-mime.png
+mkdir -p $PKG/usr/share/mime/packages
+cp debian/qgis.xml $PKG/usr/share/mime/packages
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc
+mv $PKG/usr/share/$PRGNAM/doc $PKG/usr/doc/$PRGNAM-$VERSION
+rm -f $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL.md
cp -a \
- doc/AUTHORS BUGS doc/CONTRIBUTORS COPYING ChangeLog \
- doc/DONORS Exception_to_GPL_for_Qt.txt INSTALL NEWS \
- PROVENANCE README.md doc/SPONSORS doc/TRANSLATORS \
+ COPYING ChangeLog Exception_to_GPL_for_Qt.txt NEWS.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README.server > $PKG/usr/doc/$PRGNAM-$VERSION/README.server
-
-# Move a couple of optional server files to a more appropriate place -- they
-# need to be properly customised (and the server works without them).
-if [ -d $PKG/$CGIBINDIR ]; then
- mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
- mv $PKG/$CGIBINDIR/wms_metadata.xml $PKG/$CGIBINDIR/admin.sld \
- $PKG/usr/doc/$PRGNAM-$VERSION/examples
-fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/qgis/qgis.info b/gis/qgis/qgis.info
index 91e35ce6c1..c1f196f212 100644
--- a/gis/qgis/qgis.info
+++ b/gis/qgis/qgis.info
@@ -1,10 +1,10 @@
PRGNAM="qgis"
-VERSION="2.18.18"
-HOMEPAGE="http://qgis.org/"
-DOWNLOAD="http://qgis.org/downloads/qgis-2.18.18.tar.bz2"
-MD5SUM="297a0bf4e04e00f7f8d091691499f69d"
+VERSION="3.36.1"
+HOMEPAGE="https://qgis.org/"
+DOWNLOAD="https://qgis.org/downloads/qgis-3.36.1.tar.bz2"
+MD5SUM="991b01d1e8f81d2cb87a85b509cdfad9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gdal Jinja2 libspatialindex numpy OWSLib Pygments psycopg2 pyspatialite qwtpolar"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="libspatialite libspatialindex OWSLib postgis python3-numpy python3-psycopg2 qwt termcolor protobuf3"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/qgis/qjson.cmake.diff b/gis/qgis/qjson.cmake.diff
deleted file mode 100644
index a6bd906aef..0000000000
--- a/gis/qgis/qjson.cmake.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- qgis-2.16.0.orig/src/providers/arcgisrest/CMakeLists.txt 2016-07-09 06:48:26.627018690 -0700
-+++ qgis-2.16.0/providers/arcgisrest/CMakeLists.txt 2016-07-09 06:48:03.037018088 -0700
-@@ -1,4 +1,6 @@
--FIND_PACKAGE(QJSON)
-+if(NOT TARGET qjson)
-+ FIND_PACKAGE(QJSON)
-+endif()
-
- INCLUDE_DIRECTORIES(
- ../../core
diff --git a/gis/qlandkartegt/README b/gis/qlandkartegt/README
deleted file mode 100644
index b8abb32778..0000000000
--- a/gis/qlandkartegt/README
+++ /dev/null
@@ -1,19 +0,0 @@
-QLandkarteGT (GeoTIFF/Garmin map/OSM viewer)
-
-QLandkarte GT is the ultimate outdoor aficionado's tool. It supports
-GPS maps in GeoTiff format as well as Garmin's img vector map format.
-
-Also it is a front end to the GDAL tools, to make georeferencing
-scanned maps feasible for the normal user. Compared to similar tools
-like QGis, its target users are more on the consumer side than on the
-scientific one. QLandkarte GT might not let you select every possible
-feature of the GDAL tools, but it will simplify their use to the demands
-of most users.
-
-See http://sourceforge.net/apps/mediawiki/qlandkartegt/ for details on
-how to install and convert maps.
-
-See http://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/Download for
-a list of downloadable osm-based mapsets.
-
-gpsd and libdmtx are optional.
diff --git a/gis/qlandkartegt/doinst.sh b/gis/qlandkartegt/doinst.sh
deleted file mode 100644
index 140e332222..0000000000
--- a/gis/qlandkartegt/doinst.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database -q usr/share/applications
-fi
diff --git a/gis/qlandkartegt/qlandkartegt.SlackBuild b/gis/qlandkartegt/qlandkartegt.SlackBuild
deleted file mode 100644
index b2655dd5b7..0000000000
--- a/gis/qlandkartegt/qlandkartegt.SlackBuild
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for QLandkarteGT
-# Copyright 2012 Daniel Stolarski <daniel.stolarski@gmail.com>
-#
-# This program is free software. It comes without any warranty, to
-# the extent permitted by applicable law. You can redistribute it
-# and/or modify it under the terms of the Do What The Fuck You Want
-# To Public License, Version 2, as published by Sam Hocevar. See
-# http://sam.zoy.org/wtfpl/COPYING for more details.
-
-PRGNAM=qlandkartegt
-VERSION=${VERSION:-1.8.1}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-mkdir -p build
-cd build
- cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc \
- -DCMAKE_BUILD_TYPE=Release ..
- make
- make install DESTDIR=$PKG
-cd ..
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-# Move and compress man pages
-mv $PKG/usr/share/man $PKG/usr
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a INSTALL changelog.txt copying $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/qlandkartegt/qlandkartegt.info b/gis/qlandkartegt/qlandkartegt.info
deleted file mode 100644
index 9af0e5c2a5..0000000000
--- a/gis/qlandkartegt/qlandkartegt.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="qlandkartegt"
-VERSION="1.8.1"
-HOMEPAGE="http://www.qlandkarte.org"
-DOWNLOAD="http://downloads.sf.net/qlandkartegt/qlandkartegt-1.8.1.tar.gz"
-MD5SUM="2bfe90aff7e21b19572b7b250d76a540"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="gdal"
-MAINTAINER="Daniel Stolarski"
-EMAIL="daniel.stolarski@gmail.com"
diff --git a/gis/qlandkartegt/slack-desc b/gis/qlandkartegt/slack-desc
deleted file mode 100644
index 037128c97a..0000000000
--- a/gis/qlandkartegt/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-qlandkartegt: qlandkartegt (Geotiff/Garmin map/OSM viewer)
-qlandkartegt:
-qlandkartegt: QLandkarte GT is the ultimate outdoor aficionado's tool. It supports
-qlandkartegt: GPS maps in GeoTiff format as well as Garmin's img vector map format.
-qlandkartegt:
-qlandkartegt: Also it is a front end to the GDAL tools, to make georeferencing
-qlandkartegt: scanned maps feasible for the normal user. Compared to similar
-qlandkartegt: tools like QGis, its target users are more on the consumer side
-qlandkartegt: than on the scientific one.
-qlandkartegt:
-qlandkartegt:
diff --git a/gis/qmapshack/addqmaptool.patch b/gis/qmapshack/addqmaptool.patch
deleted file mode 100644
index 71553ddcc4..0000000000
--- a/gis/qmapshack/addqmaptool.patch
+++ /dev/null
@@ -1,25494 +0,0 @@
-From c6e5240ec25b91d3320f265346a904b5bd906363 Mon Sep 17 00:00:00 2001
-From: Oliver Eichler <oliver.eichler@dspsolutions.de>
-Date: Thu, 12 Sep 2019 20:29:51 +0200
-Subject: [PATCH] [QMS-3] Add QMapTool from former sub-repo
-
----
- src/qmaptool/.hgtags | 1 +
- src/qmaptool/CAbout.cpp | 46 +
- src/qmaptool/CAbout.h | 35 +
- src/qmaptool/CMainWindow.cpp | 182 ++
- src/qmaptool/CMainWindow.h | 100 +
- src/qmaptool/CMakeLists.txt | 269 +++
- src/qmaptool/CSingleInstanceProxy.cpp | 102 +
- src/qmaptool/CSingleInstanceProxy.h | 41 +
- src/qmaptool/GeoMath.cpp | 54 +
- src/qmaptool/GeoMath.h | 31 +
- src/qmaptool/IAbout.ui | 164 ++
- src/qmaptool/IMainWindow.ui | 208 ++
- src/qmaptool/README.md | 7 +
- src/qmaptool/canvas/CCanvas.cpp | 189 ++
- src/qmaptool/canvas/CCanvas.h | 92 +
- src/qmaptool/canvas/CDrawContextPixel.cpp | 168 ++
- src/qmaptool/canvas/CDrawContextPixel.h | 91 +
- src/qmaptool/canvas/CDrawContextProj.cpp | 166 ++
- src/qmaptool/canvas/CDrawContextProj.h | 89 +
- src/qmaptool/canvas/IDrawContext.cpp | 300 +++
- src/qmaptool/canvas/IDrawContext.h | 164 ++
- src/qmaptool/helpers/CDraw.cpp | 239 +++
- src/qmaptool/helpers/CDraw.h | 96 +
- src/qmaptool/helpers/CGdalFile.cpp | 221 +++
- src/qmaptool/helpers/CGdalFile.h | 93 +
- src/qmaptool/helpers/CSettings.h | 54 +
- src/qmaptool/helpers/mitab.cpp | 260 +++
- src/qmaptool/helpers/mitab.h | 46 +
- src/qmaptool/items/CItemCutMap.cpp | 97 +
- src/qmaptool/items/CItemCutMap.h | 52 +
- src/qmaptool/items/CItemFile.cpp | 37 +
- src/qmaptool/items/CItemFile.h | 38 +
- src/qmaptool/items/CItemListWidget.cpp | 157 ++
- src/qmaptool/items/CItemListWidget.h | 84 +
- src/qmaptool/items/CItemMap.cpp | 82 +
- src/qmaptool/items/CItemMap.h | 54 +
- src/qmaptool/items/CItemMapLayer.cpp | 119 ++
- src/qmaptool/items/CItemMapLayer.h | 57 +
- src/qmaptool/items/CItemRefMap.cpp | 114 ++
- src/qmaptool/items/CItemRefMap.h | 56 +
- src/qmaptool/items/CItemTreeWidget.cpp | 317 +++
- src/qmaptool/items/CItemTreeWidget.h | 94 +
- src/qmaptool/items/IItem.cpp | 141 ++
- src/qmaptool/items/IItem.h | 97 +
- src/qmaptool/items/IItemListWidget.ui | 127 ++
- src/qmaptool/items/IItemTreeWidget.ui | 135 ++
- src/qmaptool/locale/qmaptool.ts | 1675 ++++++++++++++++
- src/qmaptool/locale/qmaptool_de.ts | 1712 ++++++++++++++++
- src/qmaptool/locale/qmaptool_es.ts | 1715 +++++++++++++++++
- src/qmaptool/main.cpp | 76 +
- src/qmaptool/overlay/COverlayCutMap.cpp | 644 +++++++
- src/qmaptool/overlay/COverlayCutMap.h | 105 +
- src/qmaptool/overlay/COverlayGridTool.cpp | 348 ++++
- src/qmaptool/overlay/COverlayGridTool.h | 68 +
- src/qmaptool/overlay/COverlayRefMap.cpp | 747 +++++++
- src/qmaptool/overlay/COverlayRefMap.h | 103 +
- src/qmaptool/overlay/IOverlay.cpp | 36 +
- src/qmaptool/overlay/IOverlay.h | 43 +
- src/qmaptool/overlay/IOverlayCutMap.ui | 202 ++
- src/qmaptool/overlay/IOverlayGridTool.ui | 184 ++
- src/qmaptool/overlay/IOverlayRefMap.ui | 351 ++++
- src/qmaptool/overlay/gridtool/CGridPlacer.cpp | 274 +++
- src/qmaptool/overlay/gridtool/CGridPlacer.h | 85 +
- src/qmaptool/overlay/gridtool/CGridPoint.cpp | 184 ++
- src/qmaptool/overlay/gridtool/CGridPoint.h | 70 +
- .../overlay/gridtool/CGridSelArea.cpp | 240 +++
- src/qmaptool/overlay/gridtool/CGridSelArea.h | 97 +
- src/qmaptool/overlay/gridtool/CGridSetRef.cpp | 105 +
- src/qmaptool/overlay/gridtool/CGridSetRef.h | 86 +
- src/qmaptool/overlay/gridtool/IGridPlacer.ui | 248 +++
- src/qmaptool/overlay/gridtool/IGridSelArea.ui | 49 +
- src/qmaptool/overlay/gridtool/IGridSetRef.ui | 117 ++
- .../overlay/refmap/CDialogRefPoint.cpp | 74 +
- src/qmaptool/overlay/refmap/CDialogRefPoint.h | 46 +
- .../overlay/refmap/COverlayRefMapPoint.cpp | 52 +
- .../overlay/refmap/COverlayRefMapPoint.h | 67 +
- src/qmaptool/overlay/refmap/CProjWizard.cpp | 237 +++
- src/qmaptool/overlay/refmap/CProjWizard.h | 44 +
- .../overlay/refmap/IDialogRefPoint.ui | 131 ++
- src/qmaptool/overlay/refmap/IProjWizard.ui | 210 ++
- src/qmaptool/resources.qrc | 93 +
- src/qmaptool/setup/CAppOpts.h | 47 +
- src/qmaptool/setup/CAppSetupLinux.cpp | 62 +
- src/qmaptool/setup/CAppSetupLinux.h | 44 +
- src/qmaptool/setup/CAppSetupMac.cpp | 140 ++
- src/qmaptool/setup/CAppSetupMac.h | 49 +
- src/qmaptool/setup/CAppSetupWin.cpp | 69 +
- src/qmaptool/setup/CAppSetupWin.h | 45 +
- src/qmaptool/setup/CCommandProcessor.cpp | 58 +
- src/qmaptool/setup/CCommandProcessor.h | 33 +
- src/qmaptool/setup/CLogHandler.cpp | 122 ++
- src/qmaptool/setup/CLogHandler.h | 47 +
- src/qmaptool/setup/CSetupExtTools.cpp | 93 +
- src/qmaptool/setup/CSetupExtTools.h | 46 +
- src/qmaptool/setup/IAppSetup.cpp | 161 ++
- src/qmaptool/setup/IAppSetup.h | 210 ++
- src/qmaptool/setup/ISetupExtTools.ui | 360 ++++
- src/qmaptool/shell/CShell.cpp | 198 ++
- src/qmaptool/shell/CShell.h | 75 +
- src/qmaptool/shell/CShellCmd.cpp | 27 +
- src/qmaptool/shell/CShellCmd.h | 47 +
- src/qmaptool/tool/CToolAddOverview.cpp | 225 +++
- src/qmaptool/tool/CToolAddOverview.h | 51 +
- src/qmaptool/tool/CToolBox.cpp | 44 +
- src/qmaptool/tool/CToolBox.h | 40 +
- src/qmaptool/tool/CToolCutMap.cpp | 202 ++
- src/qmaptool/tool/CToolCutMap.h | 51 +
- src/qmaptool/tool/CToolExport.cpp | 193 ++
- src/qmaptool/tool/CToolExport.h | 63 +
- src/qmaptool/tool/CToolGrid.cpp | 124 ++
- src/qmaptool/tool/CToolGrid.h | 57 +
- src/qmaptool/tool/CToolOverviewGroupBox.cpp | 95 +
- src/qmaptool/tool/CToolOverviewGroupBox.h | 43 +
- src/qmaptool/tool/CToolPalettize.cpp | 319 +++
- src/qmaptool/tool/CToolPalettize.h | 57 +
- src/qmaptool/tool/CToolRefMap.cpp | 257 +++
- src/qmaptool/tool/CToolRefMap.h | 52 +
- src/qmaptool/tool/CToolStack.cpp | 44 +
- src/qmaptool/tool/CToolStack.h | 41 +
- src/qmaptool/tool/ITool.cpp | 20 +
- src/qmaptool/tool/ITool.h | 234 +++
- src/qmaptool/tool/IToolAddOverview.ui | 278 +++
- src/qmaptool/tool/IToolCutMap.ui | 263 +++
- src/qmaptool/tool/IToolExport.ui | 206 ++
- src/qmaptool/tool/IToolGrid.ui | 158 ++
- src/qmaptool/tool/IToolGui.cpp | 111 ++
- src/qmaptool/tool/IToolGui.h | 48 +
- src/qmaptool/tool/IToolOverviewGroupBox.ui | 130 ++
- src/qmaptool/tool/IToolPalettize.ui | 269 +++
- src/qmaptool/tool/IToolRefMap.ui | 276 +++
- src/qmaptool/tool/export/CToolExportJnx.cpp | 28 +
- src/qmaptool/tool/export/CToolExportJnx.h | 68 +
- src/qmaptool/tool/export/IToolExportJnx.ui | 224 +++
- src/qmaptool/units/CCoordFormatSetup.cpp | 67 +
- src/qmaptool/units/CCoordFormatSetup.h | 37 +
- src/qmaptool/units/CTimeZoneSetup.cpp | 105 +
- src/qmaptool/units/CTimeZoneSetup.h | 36 +
- src/qmaptool/units/CUnitImperial.cpp | 113 ++
- src/qmaptool/units/CUnitImperial.h | 41 +
- src/qmaptool/units/CUnitMetric.cpp | 132 ++
- src/qmaptool/units/CUnitMetric.h | 37 +
- src/qmaptool/units/CUnitNautic.cpp | 96 +
- src/qmaptool/units/CUnitNautic.h | 37 +
- src/qmaptool/units/CUnitsSetup.cpp | 59 +
- src/qmaptool/units/CUnitsSetup.h | 35 +
- src/qmaptool/units/ICoordFormatSetup.ui | 125 ++
- src/qmaptool/units/ITimeZoneSetup.ui | 182 ++
- src/qmaptool/units/IUnit.cpp | 776 ++++++++
- src/qmaptool/units/IUnit.h | 153 ++
- src/qmaptool/units/IUnitsSetup.ui | 125 ++
- src/qmaptool/version.h | 33 +
- 154 files changed, 24277 insertions(+)
- create mode 100644 src/qmaptool/.hgtags
- create mode 100644 src/qmaptool/CAbout.cpp
- create mode 100644 src/qmaptool/CAbout.h
- create mode 100644 src/qmaptool/CMainWindow.cpp
- create mode 100644 src/qmaptool/CMainWindow.h
- create mode 100644 src/qmaptool/CMakeLists.txt
- create mode 100644 src/qmaptool/CSingleInstanceProxy.cpp
- create mode 100644 src/qmaptool/CSingleInstanceProxy.h
- create mode 100644 src/qmaptool/GeoMath.cpp
- create mode 100644 src/qmaptool/GeoMath.h
- create mode 100644 src/qmaptool/IAbout.ui
- create mode 100644 src/qmaptool/IMainWindow.ui
- create mode 100644 src/qmaptool/README.md
- create mode 100644 src/qmaptool/canvas/CCanvas.cpp
- create mode 100644 src/qmaptool/canvas/CCanvas.h
- create mode 100644 src/qmaptool/canvas/CDrawContextPixel.cpp
- create mode 100644 src/qmaptool/canvas/CDrawContextPixel.h
- create mode 100644 src/qmaptool/canvas/CDrawContextProj.cpp
- create mode 100644 src/qmaptool/canvas/CDrawContextProj.h
- create mode 100644 src/qmaptool/canvas/IDrawContext.cpp
- create mode 100644 src/qmaptool/canvas/IDrawContext.h
- create mode 100644 src/qmaptool/helpers/CDraw.cpp
- create mode 100644 src/qmaptool/helpers/CDraw.h
- create mode 100644 src/qmaptool/helpers/CGdalFile.cpp
- create mode 100644 src/qmaptool/helpers/CGdalFile.h
- create mode 100644 src/qmaptool/helpers/CSettings.h
- create mode 100644 src/qmaptool/helpers/mitab.cpp
- create mode 100644 src/qmaptool/helpers/mitab.h
- create mode 100644 src/qmaptool/items/CItemCutMap.cpp
- create mode 100644 src/qmaptool/items/CItemCutMap.h
- create mode 100644 src/qmaptool/items/CItemFile.cpp
- create mode 100644 src/qmaptool/items/CItemFile.h
- create mode 100644 src/qmaptool/items/CItemListWidget.cpp
- create mode 100644 src/qmaptool/items/CItemListWidget.h
- create mode 100644 src/qmaptool/items/CItemMap.cpp
- create mode 100644 src/qmaptool/items/CItemMap.h
- create mode 100644 src/qmaptool/items/CItemMapLayer.cpp
- create mode 100644 src/qmaptool/items/CItemMapLayer.h
- create mode 100644 src/qmaptool/items/CItemRefMap.cpp
- create mode 100644 src/qmaptool/items/CItemRefMap.h
- create mode 100644 src/qmaptool/items/CItemTreeWidget.cpp
- create mode 100644 src/qmaptool/items/CItemTreeWidget.h
- create mode 100644 src/qmaptool/items/IItem.cpp
- create mode 100644 src/qmaptool/items/IItem.h
- create mode 100644 src/qmaptool/items/IItemListWidget.ui
- create mode 100644 src/qmaptool/items/IItemTreeWidget.ui
- create mode 100644 src/qmaptool/locale/qmaptool.ts
- create mode 100644 src/qmaptool/locale/qmaptool_de.ts
- create mode 100644 src/qmaptool/locale/qmaptool_es.ts
- create mode 100644 src/qmaptool/main.cpp
- create mode 100644 src/qmaptool/overlay/COverlayCutMap.cpp
- create mode 100644 src/qmaptool/overlay/COverlayCutMap.h
- create mode 100644 src/qmaptool/overlay/COverlayGridTool.cpp
- create mode 100644 src/qmaptool/overlay/COverlayGridTool.h
- create mode 100644 src/qmaptool/overlay/COverlayRefMap.cpp
- create mode 100644 src/qmaptool/overlay/COverlayRefMap.h
- create mode 100644 src/qmaptool/overlay/IOverlay.cpp
- create mode 100644 src/qmaptool/overlay/IOverlay.h
- create mode 100644 src/qmaptool/overlay/IOverlayCutMap.ui
- create mode 100644 src/qmaptool/overlay/IOverlayGridTool.ui
- create mode 100644 src/qmaptool/overlay/IOverlayRefMap.ui
- create mode 100644 src/qmaptool/overlay/gridtool/CGridPlacer.cpp
- create mode 100644 src/qmaptool/overlay/gridtool/CGridPlacer.h
- create mode 100644 src/qmaptool/overlay/gridtool/CGridPoint.cpp
- create mode 100644 src/qmaptool/overlay/gridtool/CGridPoint.h
- create mode 100644 src/qmaptool/overlay/gridtool/CGridSelArea.cpp
- create mode 100644 src/qmaptool/overlay/gridtool/CGridSelArea.h
- create mode 100644 src/qmaptool/overlay/gridtool/CGridSetRef.cpp
- create mode 100644 src/qmaptool/overlay/gridtool/CGridSetRef.h
- create mode 100644 src/qmaptool/overlay/gridtool/IGridPlacer.ui
- create mode 100644 src/qmaptool/overlay/gridtool/IGridSelArea.ui
- create mode 100644 src/qmaptool/overlay/gridtool/IGridSetRef.ui
- create mode 100644 src/qmaptool/overlay/refmap/CDialogRefPoint.cpp
- create mode 100644 src/qmaptool/overlay/refmap/CDialogRefPoint.h
- create mode 100644 src/qmaptool/overlay/refmap/COverlayRefMapPoint.cpp
- create mode 100644 src/qmaptool/overlay/refmap/COverlayRefMapPoint.h
- create mode 100644 src/qmaptool/overlay/refmap/CProjWizard.cpp
- create mode 100644 src/qmaptool/overlay/refmap/CProjWizard.h
- create mode 100644 src/qmaptool/overlay/refmap/IDialogRefPoint.ui
- create mode 100644 src/qmaptool/overlay/refmap/IProjWizard.ui
- create mode 100644 src/qmaptool/resources.qrc
- create mode 100644 src/qmaptool/setup/CAppOpts.h
- create mode 100644 src/qmaptool/setup/CAppSetupLinux.cpp
- create mode 100644 src/qmaptool/setup/CAppSetupLinux.h
- create mode 100644 src/qmaptool/setup/CAppSetupMac.cpp
- create mode 100644 src/qmaptool/setup/CAppSetupMac.h
- create mode 100644 src/qmaptool/setup/CAppSetupWin.cpp
- create mode 100644 src/qmaptool/setup/CAppSetupWin.h
- create mode 100644 src/qmaptool/setup/CCommandProcessor.cpp
- create mode 100644 src/qmaptool/setup/CCommandProcessor.h
- create mode 100644 src/qmaptool/setup/CLogHandler.cpp
- create mode 100644 src/qmaptool/setup/CLogHandler.h
- create mode 100644 src/qmaptool/setup/CSetupExtTools.cpp
- create mode 100644 src/qmaptool/setup/CSetupExtTools.h
- create mode 100644 src/qmaptool/setup/IAppSetup.cpp
- create mode 100644 src/qmaptool/setup/IAppSetup.h
- create mode 100644 src/qmaptool/setup/ISetupExtTools.ui
- create mode 100644 src/qmaptool/shell/CShell.cpp
- create mode 100644 src/qmaptool/shell/CShell.h
- create mode 100644 src/qmaptool/shell/CShellCmd.cpp
- create mode 100644 src/qmaptool/shell/CShellCmd.h
- create mode 100644 src/qmaptool/tool/CToolAddOverview.cpp
- create mode 100644 src/qmaptool/tool/CToolAddOverview.h
- create mode 100644 src/qmaptool/tool/CToolBox.cpp
- create mode 100644 src/qmaptool/tool/CToolBox.h
- create mode 100644 src/qmaptool/tool/CToolCutMap.cpp
- create mode 100644 src/qmaptool/tool/CToolCutMap.h
- create mode 100644 src/qmaptool/tool/CToolExport.cpp
- create mode 100644 src/qmaptool/tool/CToolExport.h
- create mode 100644 src/qmaptool/tool/CToolGrid.cpp
- create mode 100644 src/qmaptool/tool/CToolGrid.h
- create mode 100644 src/qmaptool/tool/CToolOverviewGroupBox.cpp
- create mode 100644 src/qmaptool/tool/CToolOverviewGroupBox.h
- create mode 100644 src/qmaptool/tool/CToolPalettize.cpp
- create mode 100644 src/qmaptool/tool/CToolPalettize.h
- create mode 100644 src/qmaptool/tool/CToolRefMap.cpp
- create mode 100644 src/qmaptool/tool/CToolRefMap.h
- create mode 100644 src/qmaptool/tool/CToolStack.cpp
- create mode 100644 src/qmaptool/tool/CToolStack.h
- create mode 100644 src/qmaptool/tool/ITool.cpp
- create mode 100644 src/qmaptool/tool/ITool.h
- create mode 100644 src/qmaptool/tool/IToolAddOverview.ui
- create mode 100644 src/qmaptool/tool/IToolCutMap.ui
- create mode 100644 src/qmaptool/tool/IToolExport.ui
- create mode 100644 src/qmaptool/tool/IToolGrid.ui
- create mode 100644 src/qmaptool/tool/IToolGui.cpp
- create mode 100644 src/qmaptool/tool/IToolGui.h
- create mode 100644 src/qmaptool/tool/IToolOverviewGroupBox.ui
- create mode 100644 src/qmaptool/tool/IToolPalettize.ui
- create mode 100644 src/qmaptool/tool/IToolRefMap.ui
- create mode 100644 src/qmaptool/tool/export/CToolExportJnx.cpp
- create mode 100644 src/qmaptool/tool/export/CToolExportJnx.h
- create mode 100644 src/qmaptool/tool/export/IToolExportJnx.ui
- create mode 100644 src/qmaptool/units/CCoordFormatSetup.cpp
- create mode 100644 src/qmaptool/units/CCoordFormatSetup.h
- create mode 100644 src/qmaptool/units/CTimeZoneSetup.cpp
- create mode 100644 src/qmaptool/units/CTimeZoneSetup.h
- create mode 100644 src/qmaptool/units/CUnitImperial.cpp
- create mode 100644 src/qmaptool/units/CUnitImperial.h
- create mode 100644 src/qmaptool/units/CUnitMetric.cpp
- create mode 100644 src/qmaptool/units/CUnitMetric.h
- create mode 100644 src/qmaptool/units/CUnitNautic.cpp
- create mode 100644 src/qmaptool/units/CUnitNautic.h
- create mode 100644 src/qmaptool/units/CUnitsSetup.cpp
- create mode 100644 src/qmaptool/units/CUnitsSetup.h
- create mode 100644 src/qmaptool/units/ICoordFormatSetup.ui
- create mode 100644 src/qmaptool/units/ITimeZoneSetup.ui
- create mode 100644 src/qmaptool/units/IUnit.cpp
- create mode 100644 src/qmaptool/units/IUnit.h
- create mode 100644 src/qmaptool/units/IUnitsSetup.ui
- create mode 100644 src/qmaptool/version.h
-
-diff --git a/src/qmaptool/.hgtags b/src/qmaptool/.hgtags
-new file mode 100644
-index 00000000..b3bd51f1
---- /dev/null
-+++ b/src/qmaptool/.hgtags
-@@ -0,0 +1 @@
-+ed93a4558565182ee15572442250f22981d3de56 V 1.1.0
-diff --git a/src/qmaptool/CAbout.cpp b/src/qmaptool/CAbout.cpp
-new file mode 100644
-index 00000000..6c3c2cec
---- /dev/null
-+++ b/src/qmaptool/CAbout.cpp
-@@ -0,0 +1,46 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CAbout.h"
-+#include "version.h"
-+
-+#include <gdal.h>
-+#include <proj_api.h>
-+#include <QtWidgets>
-+
-+
-+CAbout::CAbout(QWidget *parent)
-+ : QDialog(parent)
-+{
-+ setupUi(this);
-+
-+ if(QString(VER_SUFFIX).isEmpty())
-+ {
-+ labelVersion->setText(VER_STR);
-+ }
-+ else
-+ {
-+ labelVersion->setText(VER_STR "." VER_SUFFIX);
-+ }
-+
-+ labelQtVersion->setText(qVersion());
-+ labelGDALVersion->setText(GDALVersionInfo("--version"));
-+ labelProj4Version->setText(QString::number(PJ_VERSION));
-+}
-+
-+
-diff --git a/src/qmaptool/CAbout.h b/src/qmaptool/CAbout.h
-new file mode 100644
-index 00000000..52a6bfd7
---- /dev/null
-+++ b/src/qmaptool/CAbout.h
-@@ -0,0 +1,35 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CABOUT_H
-+#define CABOUT_H
-+
-+#include "ui_IAbout.h"
-+#include <QDialog>
-+
-+
-+class CAbout : public QDialog, private Ui::IAbout
-+{
-+ Q_OBJECT
-+public:
-+ CAbout(QWidget * parent);
-+ virtual ~CAbout() = default;
-+};
-+
-+#endif //CABOUT_H
-+
-diff --git a/src/qmaptool/CMainWindow.cpp b/src/qmaptool/CMainWindow.cpp
-new file mode 100644
-index 00000000..c21b566b
---- /dev/null
-+++ b/src/qmaptool/CMainWindow.cpp
-@@ -0,0 +1,182 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CAbout.h"
-+#include "CMainWindow.h"
-+#include "helpers/CSettings.h"
-+#include "setup/CSetupExtTools.h"
-+#include "tool/CToolAddOverview.h"
-+#include "tool/CToolBox.h"
-+#include "tool/CToolCutMap.h"
-+#include "tool/CToolExport.h"
-+#include "tool/CToolGrid.h"
-+#include "tool/CToolPalettize.h"
-+#include "tool/CToolRefMap.h"
-+#include "units/CCoordFormatSetup.h"
-+#include "units/CUnitsSetup.h"
-+#include "units/IUnit.h"
-+#include "version.h"
-+
-+CMainWindow * CMainWindow::pSelf = nullptr;
-+
-+CMainWindow::CMainWindow()
-+{
-+ SETTINGS;
-+ IUnit::setUnitType((IUnit::type_e)cfg.value("Units/units",IUnit::eTypeMetric).toInt(), this);
-+ IUnit::setCoordFormat((IUnit::coord_format_e)cfg.value("Units/coordFormat", IUnit::eCoordFormat1).toInt());
-+
-+ pSelf = this;
-+ setupUi(this);
-+ setWindowTitle(WHAT_STR);
-+
-+ canvas->setToolInterface(toolStack);
-+
-+ connect(actionAbout, &QAction::triggered, this, &CMainWindow::slotAbout);
-+ connect(actionSetupExtTools, &QAction::triggered, this, &CMainWindow::slotSetupExtTools);
-+ connect(actionSetupUnits, &QAction::triggered, this, &CMainWindow::slotSetupUnits);
-+ connect(actionSetupCoordFormat, &QAction::triggered, this, &CMainWindow::slotSetupCoordFormat);
-+ connect(&IAppSetup::self(), &IAppSetup::sigSetupChanged, this, &CMainWindow::slotSetupChanged);
-+
-+ menuWindow->addAction(dockTools->toggleViewAction());
-+ menuWindow->addAction(dockShell->toggleViewAction());
-+ prepareMenuForMac();
-+
-+ toolBox = new CToolBox(this);
-+ toolStack->addWidget(toolBox);
-+
-+ toolAddOverview = new CToolAddOverview(toolBox);
-+ toolBox->addItem(toolAddOverview, QIcon("://icons/32x32/AddOverview.png"), toolAddOverview->objectName());
-+
-+ toolCutMap = new CToolCutMap(toolBox);
-+ toolBox->addItem(toolCutMap, QIcon("://icons/32x32/CutMap.png"), toolCutMap->objectName());
-+
-+ toolRefMap = new CToolRefMap(toolBox);
-+ toolBox->addItem(toolRefMap, QIcon("://icons/32x32/ReferenceMap.png"), toolRefMap->objectName());
-+
-+ toolPalettize = new CToolPalettize(toolBox);
-+ toolBox->addItem(toolPalettize, QIcon("://icons/32x32/Rasterize.png"), toolPalettize->objectName());
-+
-+ toolExport = new CToolExport(toolBox);
-+ toolBox->addItem(toolExport, QIcon("://icons/32x32/Export.png"), toolExport->objectName());
-+
-+ toolGrid = new CToolGrid(this);
-+ toolStack->addWidget(toolGrid);
-+
-+ // start ---- restore window geometry -----
-+ if ( cfg.contains("MainWindow/geometry"))
-+ {
-+ restoreGeometry(cfg.value("MainWindow/geometry").toByteArray());
-+ }
-+ else
-+ {
-+ QTimer::singleShot(500, this, SLOT(showMaximized()));
-+ }
-+
-+ if ( cfg.contains("MainWindow/state"))
-+ {
-+ restoreState(cfg.value("MainWindow/state").toByteArray());
-+ }
-+ // end ---- restore window geometry -----
-+ //toolStack->setCurrentIndex(cfg.value("Tool/Stack/current",0).toInt());
-+ toolBox->setCurrentIndex(cfg.value("Tool/Box/current",0).toInt());
-+ actionShowToolHelp->setChecked(cfg.value("Tool/showHelp", true).toBool());
-+ mapFont = cfg.value("Canvas/mapFont", font()).value<QFont>();
-+ actionFlipMouseWheel->setChecked(cfg.value("Canvas/flipMouseWheel", false).toBool());
-+}
-+
-+CMainWindow::~CMainWindow()
-+{
-+ SETTINGS;
-+ cfg.setValue("MainWindow/state", saveState());
-+ cfg.setValue("MainWindow/geometry", saveGeometry());
-+
-+ cfg.setValue("Canvas/mapFont", mapFont);
-+ cfg.setValue("Canvas/flipMouseWheel", actionFlipMouseWheel->isChecked());
-+
-+ cfg.setValue("Units/units", IUnit::self().type);
-+ cfg.setValue("Units/coordFormat", IUnit::getCoordFormat());
-+
-+ cfg.setValue("Tool/Box/current", toolBox->currentIndex());
-+ cfg.setValue("Tool/showHelp", actionShowToolHelp->isChecked());
-+}
-+
-+QString CMainWindow::getUser()
-+{
-+ QString user = getenv("USER");
-+ if(user.isEmpty())
-+ {
-+ user = getenv("USERNAME"); //for windows
-+
-+ if(user.isEmpty())
-+ {
-+ user = "QMapTool";
-+ }
-+ }
-+
-+ return user;
-+}
-+
-+void CMainWindow::prepareMenuForMac()
-+{
-+ dockTools->toggleViewAction()->setMenuRole(QAction::NoRole);
-+}
-+
-+void CMainWindow::makeShellVisible()
-+{
-+ dockShell->show();
-+}
-+
-+void CMainWindow::startGridTool(CItemRefMap *item)
-+{
-+ toolGrid->registerItem(item);
-+ toolStack->setCurrentWidget(toolGrid);
-+}
-+
-+void CMainWindow::showToolBox()
-+{
-+ toolStack->setCurrentWidget(toolBox);
-+}
-+
-+void CMainWindow::slotAbout()
-+{
-+ CAbout dlg(this);
-+ dlg.exec();
-+}
-+
-+void CMainWindow::slotSetupExtTools()
-+{
-+ CSetupExtTools dlg(this);
-+ dlg.exec();
-+}
-+
-+void CMainWindow::slotSetupUnits()
-+{
-+ CUnitsSetup dlg(this);
-+ dlg.exec();
-+}
-+
-+void CMainWindow::slotSetupCoordFormat()
-+{
-+ CCoordFormatSetup dlg(this);
-+ dlg.exec();
-+}
-+
-+void CMainWindow::slotSetupChanged()
-+{
-+ toolStack->setupChanged();
-+}
-diff --git a/src/qmaptool/CMainWindow.h b/src/qmaptool/CMainWindow.h
-new file mode 100644
-index 00000000..40077106
---- /dev/null
-+++ b/src/qmaptool/CMainWindow.h
-@@ -0,0 +1,100 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CMAINWINDOW_H
-+#define CMAINWINDOW_H
-+
-+#include "ui_IMainWindow.h"
-+#include <QMainWindow>
-+
-+class CToolBox;
-+class CToolAddOverview;
-+class CToolCutMap;
-+class CToolRefMap;
-+class CToolPalettize;
-+class CCanvas;
-+class CToolGrid;
-+class CItemRefMap;
-+class CToolExport;
-+
-+class CMainWindow : public QMainWindow, private Ui::IMainWindow
-+{
-+ Q_OBJECT
-+public:
-+ static CMainWindow& self()
-+ {
-+ return *pSelf;
-+ }
-+
-+ virtual ~CMainWindow();
-+
-+ static QString getUser();
-+
-+ CCanvas * getCanvas() const
-+ {
-+ return canvas;
-+ }
-+
-+ const QFont& getMapFont() const
-+ {
-+ return mapFont;
-+ }
-+
-+ bool flipMouseWheel() const
-+ {
-+ return actionFlipMouseWheel->isChecked();
-+ }
-+
-+ QAction * showToolHelp() const
-+ {
-+ return actionShowToolHelp;
-+ }
-+
-+ void makeShellVisible();
-+
-+ void startGridTool(CItemRefMap * item);
-+ void showToolBox();
-+
-+private slots:
-+ void slotAbout();
-+ void slotSetupExtTools();
-+ void slotSetupUnits();
-+ void slotSetupCoordFormat();
-+ void slotSetupChanged();
-+
-+private:
-+ friend int main(int argc, char ** argv);
-+ CMainWindow();
-+ static CMainWindow * pSelf;
-+
-+ void prepareMenuForMac();
-+
-+ QFont mapFont;
-+
-+ CToolBox * toolBox;
-+ CToolGrid * toolGrid;
-+
-+ CToolAddOverview * toolAddOverview;
-+ CToolCutMap * toolCutMap;
-+ CToolRefMap * toolRefMap;
-+ CToolPalettize * toolPalettize;
-+ CToolExport * toolExport;
-+};
-+
-+#endif //CMAINWINDOW_H
-+
-diff --git a/src/qmaptool/CMakeLists.txt b/src/qmaptool/CMakeLists.txt
-new file mode 100644
-index 00000000..5fd64152
---- /dev/null
-+++ b/src/qmaptool/CMakeLists.txt
-@@ -0,0 +1,269 @@
-+# Prevent custom commands/targets outputs to be deleted by make clean
-+# We need this to prevent .ts files from being deleted with make clean, when
-+# UPDATE_TRANSLATIONS=ON
-+# WARNING: Only works with Makefile generator.
-+set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM TRUE)
-+# Find includes in corresponding build directories
-+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-+# Instruct CMake to run moc automatically when needed.
-+set(CMAKE_AUTOMOC ON)
-+
-+###############################################################################################
-+# Setup application name and version tags
-+###############################################################################################
-+
-+set(APPLICATION_NAME qmaptool)
-+set(QMAPTOOL_VERSION_MAJOR 1)
-+set(QMAPTOOL_VERSION_MINOR 1)
-+set(QMAPTOOL_VERSION_PATCH 1)
-+
-+add_definitions(
-+ -DVER_MAJOR=${QMAPTOOL_VERSION_MAJOR}
-+ -DVER_MINOR=${QMAPTOOL_VERSION_MINOR}
-+ -DVER_STEP=${QMAPTOOL_VERSION_PATCH}
-+ -DVER_TWEAK=${VERSION_SUFFIX}
-+ -DAPPLICATION_NAME=${APPLICATION_NAME}
-+)
-+
-+###############################################################################################
-+# All source files needed to compile
-+###############################################################################################
-+set( SRCS
-+ CAbout.cpp
-+ canvas/CCanvas.cpp
-+ canvas/CDrawContextPixel.cpp
-+ canvas/CDrawContextProj.cpp
-+ canvas/IDrawContext.cpp
-+ CMainWindow.cpp
-+ CSingleInstanceProxy.cpp
-+ GeoMath.cpp
-+ helpers/CDraw.cpp
-+ helpers/CGdalFile.cpp
-+ helpers/mitab.cpp
-+ items/CItemCutMap.cpp
-+ items/CItemFile.cpp
-+ items/CItemListWidget.cpp
-+ items/CItemMap.cpp
-+ items/CItemMapLayer.cpp
-+ items/CItemRefMap.cpp
-+ items/CItemTreeWidget.cpp
-+ items/IItem.cpp
-+ main.cpp
-+ overlay/COverlayCutMap.cpp
-+ overlay/COverlayGridTool.cpp
-+ overlay/COverlayRefMap.cpp
-+ overlay/gridtool/CGridPlacer.cpp
-+ overlay/gridtool/CGridPoint.cpp
-+ overlay/gridtool/CGridSelArea.cpp
-+ overlay/gridtool/CGridSetRef.cpp
-+ overlay/IOverlay.cpp
-+ overlay/refmap/CDialogRefPoint.cpp
-+ overlay/refmap/COverlayRefMapPoint.cpp
-+ overlay/refmap/CProjWizard.cpp
-+ setup/CAppSetupLinux.cpp
-+ setup/CAppSetupMac.cpp
-+ setup/CAppSetupWin.cpp
-+ setup/CCommandProcessor.cpp
-+ setup/CLogHandler.cpp
-+ setup/CSetupExtTools.cpp
-+ setup/IAppSetup.cpp
-+ shell/CShellCmd.cpp
-+ shell/CShell.cpp
-+ tool/export/CToolExportJnx.cpp
-+ tool/CToolAddOverview.cpp
-+ tool/CToolBox.cpp
-+ tool/CToolCutMap.cpp
-+ tool/CToolExport.cpp
-+ tool/CToolGrid.cpp
-+ tool/CToolOverviewGroupBox.cpp
-+ tool/CToolPalettize.cpp
-+ tool/CToolRefMap.cpp
-+ tool/CToolStack.cpp
-+ tool/ITool.cpp
-+ tool/IToolGui.cpp
-+ units/CCoordFormatSetup.cpp
-+ units/CTimeZoneSetup.cpp
-+ units/CUnitImperial.cpp
-+ units/CUnitMetric.cpp
-+ units/CUnitNautic.cpp
-+ units/CUnitsSetup.cpp
-+ units/IUnit.cpp
-+)
-+
-+set( HDRS
-+ CAbout.h
-+ canvas/CCanvas.h
-+ canvas/CDrawContextPixel.h
-+ canvas/CDrawContextProj.h
-+ canvas/IDrawContext.h
-+ CMainWindow.h
-+ CSingleInstanceProxy.h
-+ GeoMath.h
-+ helpers/CDraw.h
-+ helpers/CGdalFile.h
-+ helpers/CSettings.h
-+ helpers/CSettings.h
-+ helpers/mitab.h
-+ items/CItemCutMap.h
-+ items/CItemFile.h
-+ items/CItemListWidget.h
-+ items/CItemMap.h
-+ items/CItemMapLayer.h
-+ items/CItemRefMap.h
-+ items/CItemTreeWidget.h
-+ items/IItem.h
-+ overlay/COverlayCutMap.h
-+ overlay/COverlayGridTool.h
-+ overlay/COverlayRefMap.h
-+ overlay/gridtool/CGridPlacer.h
-+ overlay/gridtool/CGridPoint.h
-+ overlay/gridtool/CGridSelArea.h
-+ overlay/gridtool/CGridSetRef.h
-+ overlay/IOverlay.h
-+ overlay/refmap/CDialogRefPoint.h
-+ overlay/refmap/COverlayRefMapPoint.h
-+ overlay/refmap/CProjWizard.h
-+ setup/CAppOpts.h
-+ setup/CAppSetupLinux.h
-+ setup/CAppSetupMac.h
-+ setup/CAppSetupWin.h
-+ setup/CCommandProcessor.h
-+ setup/CLogHandler.h
-+ setup/CSetupExtTools.h
-+ setup/IAppSetup.h
-+ shell/CShellCmd.h
-+ shell/CShell.h
-+ tool/export/CToolExportJnx.h
-+ tool/CToolAddOverview.h
-+ tool/CToolBox.h
-+ tool/CToolCutMap.h
-+ tool/CToolExport.h
-+ tool/CToolGrid.h
-+ tool/CToolOverviewGroupBox.h
-+ tool/CToolPalettize.h
-+ tool/CToolRefMap.h
-+ tool/CToolStack.h
-+ tool/IToolGui.h
-+ tool/ITool.h
-+ units/CCoordFormatSetup.h
-+ units/CTimeZoneSetup.h
-+ units/CUnitImperial.h
-+ units/CUnitMetric.h
-+ units/CUnitNautic.h
-+ units/CUnitsSetup.h
-+ units/IUnit.h
-+ version.h
-+)
-+
-+set( UIS
-+ IAbout.ui
-+ IMainWindow.ui
-+ items/IItemListWidget.ui
-+ items/IItemTreeWidget.ui
-+ overlay/gridtool/IGridPlacer.ui
-+ overlay/gridtool/IGridSelArea.ui
-+ overlay/gridtool/IGridSetRef.ui
-+ overlay/IOverlayCutMap.ui
-+ overlay/IOverlayGridTool.ui
-+ overlay/IOverlayRefMap.ui
-+ overlay/refmap/IDialogRefPoint.ui
-+ overlay/refmap/IProjWizard.ui
-+ setup/ISetupExtTools.ui
-+ tool/export/IToolExportJnx.ui
-+ tool/IToolAddOverview.ui
-+ tool/IToolCutMap.ui
-+ tool/IToolExport.ui
-+ tool/IToolGrid.ui
-+ tool/IToolOverviewGroupBox.ui
-+ tool/IToolPalettize.ui
-+ tool/IToolRefMap.ui
-+ units/ICoordFormatSetup.ui
-+ units/ITimeZoneSetup.ui
-+ units/IUnitsSetup.ui
-+)
-+
-+
-+set( RCS
-+ resources.qrc
-+)
-+
-+
-+###############################################################################################
-+# Some Qt magic
-+###############################################################################################
-+
-+qt5_wrap_ui(UI_HDRS ${UIS})
-+qt5_add_resources(RC_SRCS ${RCS})
-+
-+###############################################################################################
-+# Translation related stuff
-+###############################################################################################
-+translate_ts(${APPLICATION_NAME}_QM_FILES
-+ UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
-+ UPDATE_OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}" ${KEEP_OLD_TRANSLATIONS}
-+ SOURCES ${SRCS} ${HDRS} ${UIS}
-+ TEMPLATE ${APPLICATION_NAME}
-+ TRANSLATION_DIR "locale"
-+)
-+
-+if (UNIX AND NOT WIN32 AND NOT APPLE)
-+ translate_desktop(${APPLICATION_NAME}_DESKTOP_FILES
-+ TRANSLATION_DIR "locale"
-+ SOURCES "${PROJECT_SOURCE_DIR}/qmaptool.desktop.in"
-+ )
-+endif()
-+
-+###############################################################################################
-+# Build source file and include paths lists
-+###############################################################################################
-+set(MAININP
-+ ${SRCS}
-+ ${HDRS}
-+ ${UI_HDRS}
-+ ${RC_SRCS}
-+ ${${APPLICATION_NAME}_QM_FILES}
-+ ${${APPLICATION_NAME}_DESKTOP_FILES}
-+)
-+
-+include_directories(
-+ SYSTEM # this prevents warnings from non-QMS headers
-+ ${CMAKE_BINARY_DIR}
-+ ${GDAL_INCLUDE_DIRS}
-+ ${PROJ4_INCLUDE_DIRS}
-+)
-+
-+if(APPLE)
-+ INCLUDE_DIRECTORIES(/System/Library/Frameworks/Foundation.framework)
-+ INCLUDE_DIRECTORIES(/System/Library/Frameworks/DiskArbitration.framework)
-+endif(APPLE)
-+
-+
-+###############################################################################################
-+# Build the executable and define necessary libraries.
-+###############################################################################################
-+add_executable(${APPLICATION_NAME} WIN32 ${MAININP})
-+
-+target_link_libraries(${APPLICATION_NAME}
-+ Qt5::Widgets
-+ Qt5::Network
-+ ${GDAL_LIBRARIES}
-+ ${PROJ4_LIBRARIES}
-+)
-+
-+if(APPLE)
-+ target_link_libraries(${APPLICATION_NAME}
-+ ${Foundation_LIBRARY}
-+ ${DiskArbitration_LIBRARY}
-+ )
-+endif(APPLE)
-+
-+
-+###############################################################################################
-+# Install target related stuff
-+###############################################################################################
-+install(TARGETS ${APPLICATION_NAME} DESTINATION ${BIN_INSTALL_DIR})
-+
-+if (UNIX AND NOT WIN32 AND NOT APPLE)
-+ install(FILES ${${APPLICATION_NAME}_QM_FILES} DESTINATION ${DATA_INSTALL_PREFIX}/${APPLICATION_NAME}/translations)
-+ install(FILES ${${APPLICATION_NAME}_DESKTOP_FILES} DESTINATION ${XDG_APPS_DIR})
-+endif (UNIX AND NOT WIN32 AND NOT APPLE)
-diff --git a/src/qmaptool/CSingleInstanceProxy.cpp b/src/qmaptool/CSingleInstanceProxy.cpp
-new file mode 100644
-index 00000000..58cc933e
---- /dev/null
-+++ b/src/qmaptool/CSingleInstanceProxy.cpp
-@@ -0,0 +1,102 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "CSingleInstanceProxy.h"
-+#include <QtNetwork>
-+
-+CSingleInstanceProxy::CSingleInstanceProxy(const QStringList filenames)
-+{
-+ serverName = CMainWindow::self().getUser();
-+ if(serverName != "QMapTool")
-+ {
-+ serverName = "QMapTool-" + serverName;
-+ }
-+
-+ QLocalSocket socket;
-+ socket.connectToServer(serverName);
-+ if(socket.waitForConnected(1000))
-+ {
-+ // if the connection is successful another instance
-+ // is already running. In that case the list of files to
-+ // open is sent to the primary instance. And this instance
-+ // will be closed imediately.
-+ QDataStream stream(&socket);
-+ stream << filenames;
-+ socket.waitForBytesWritten(3000);
-+
-+ // wait for confirmation
-+ socket.waitForReadyRead(3000);
-+ bool ok;
-+ stream >> ok;
-+ qDebug() << "Sent parameters to primary instance. Result" << ok;
-+ qDebug() << "There can only be one. Exit.";
-+ exit(0);
-+ }
-+
-+ // Looks like we are the first instance.
-+ // Create a server socket and wait for other instances to connect.
-+ server = new QLocalServer(this);
-+ connect(server, &QLocalServer::newConnection, this, &CSingleInstanceProxy::slotNewConnection);
-+ server->removeServer(serverName);
-+ if(!server->listen(serverName))
-+ {
-+ qDebug() << "CSingleInstanceProxy: Failed to start single instance server socket.";
-+ }
-+ else
-+ {
-+ qDebug() << "CSingleInstanceProxy: Single instance server socket listening to" << server->fullServerName();
-+ }
-+}
-+
-+CSingleInstanceProxy::~CSingleInstanceProxy()
-+{
-+ qDebug() << "CSingleInstanceProxy::~CSingleInstanceProxy()";
-+}
-+
-+void CSingleInstanceProxy::slotNewConnection()
-+{
-+ QLocalSocket * socket = server->nextPendingConnection();
-+ if(socket == nullptr)
-+ {
-+ return;
-+ }
-+
-+ // Each secondary instance will send a QStringList with files to open
-+ // The list can be empty.
-+ if(socket->waitForReadyRead(3000))
-+ {
-+ QStringList filenames;
-+ QDataStream stream(socket);
-+ stream >> filenames;
-+
-+ CMainWindow& w = CMainWindow::self();
-+ //w.loadGISData(filenames);
-+
-+ // confirm that files are loaded
-+ stream << true;
-+ socket->waitForBytesWritten(3000);
-+
-+ // raise the application window to top of desktop
-+ w.raise();
-+ QApplication::setActiveWindow(&w);
-+ }
-+
-+ socket->close();
-+ delete socket;
-+}
-diff --git a/src/qmaptool/CSingleInstanceProxy.h b/src/qmaptool/CSingleInstanceProxy.h
-new file mode 100644
-index 00000000..c211c8cb
---- /dev/null
-+++ b/src/qmaptool/CSingleInstanceProxy.h
-@@ -0,0 +1,41 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CSINGLEINSTANCEPROXY_H
-+#define CSINGLEINSTANCEPROXY_H
-+
-+#include <QObject>
-+class QLocalServer;
-+
-+class CSingleInstanceProxy : public QObject
-+{
-+public:
-+ CSingleInstanceProxy(const QStringList filenames);
-+ virtual ~CSingleInstanceProxy();
-+
-+private slots:
-+ void slotNewConnection();
-+
-+private:
-+ QLocalServer * server = nullptr;
-+
-+ QString serverName;
-+};
-+
-+#endif //CSINGLEINSTANCEPROXY_H
-+
-diff --git a/src/qmaptool/GeoMath.cpp b/src/qmaptool/GeoMath.cpp
-new file mode 100644
-index 00000000..00596006
---- /dev/null
-+++ b/src/qmaptool/GeoMath.cpp
-@@ -0,0 +1,54 @@
-+/**********************************************************************************************
-+ Copyright (C) 2009 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+
-+**********************************************************************************************/
-+
-+#include "GeoMath.h"
-+
-+#define PI M_PI
-+#define TWOPI (2*PI)
-+
-+
-+void GPS_Math_DegMinSec_To_Deg(bool sign, const qint32 d, const qint32 m, const qreal s, qreal &deg)
-+{
-+ deg = qAbs(d) + qreal(m) / 60.0 + s / 3600;
-+ if(sign)
-+ {
-+ deg = -deg;
-+ }
-+}
-+
-+
-+bool GPS_Math_Deg_To_DegMin(qreal v, qint32 *deg, qreal *min)
-+{
-+ *deg = qAbs(v);
-+ *min = (qAbs(v) - *deg) * 60.0;
-+
-+ return v < 0;
-+}
-+
-+
-+void GPS_Math_DegMin_To_Deg(bool sign, const qint32 d, const qreal m, qreal& deg)
-+{
-+ deg = qAbs(d) + m / 60.0;
-+ if(sign)
-+ {
-+ deg = -deg;
-+ }
-+}
-+
-+
-diff --git a/src/qmaptool/GeoMath.h b/src/qmaptool/GeoMath.h
-new file mode 100644
-index 00000000..7f48a1fe
---- /dev/null
-+++ b/src/qmaptool/GeoMath.h
-@@ -0,0 +1,31 @@
-+/**********************************************************************************************
-+ Copyright (C) 2009 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+
-+**********************************************************************************************/
-+
-+#ifndef GEOMATH_H
-+#define GEOMATH_H
-+
-+#include <QtGlobal>
-+#include <stdint.h>
-+
-+void GPS_Math_DegMin_To_Deg(bool sign, const qint32 d, const qreal m, qreal& deg);
-+void GPS_Math_DegMinSec_To_Deg(bool sign, const qint32 d, const qint32 m, const qreal s, qreal& deg);
-+bool GPS_Math_Deg_To_DegMin(qreal v, qint32 *deg, qreal *min);
-+
-+#endif //GEOMATH_H
-+
-diff --git a/src/qmaptool/IAbout.ui b/src/qmaptool/IAbout.ui
-new file mode 100644
-index 00000000..17d509bd
---- /dev/null
-+++ b/src/qmaptool/IAbout.ui
-@@ -0,0 +1,164 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IAbout</class>
-+ <widget class="QDialog" name="IAbout">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>418</width>
-+ <height>407</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>About...</string>
-+ </property>
-+ <property name="windowIcon">
-+ <iconset resource="resources.qrc">
-+ <normaloff>:/icons/32x32/QMapTool.png</normaloff>:/icons/32x32/QMapTool.png</iconset>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <widget class="QLabel" name="label_2">
-+ <property name="text">
-+ <string>&lt;b&gt;QMapTool&lt;/b&gt;, Version</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelVersion">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>TextLabel</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label_4">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="pixmap">
-+ <pixmap resource="resources.qrc">:/icons/48x48/QMapTool.png</pixmap>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="Line" name="line">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QFormLayout" name="formLayout">
-+ <property name="fieldGrowthPolicy">
-+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
-+ </property>
-+ <item row="0" column="0">
-+ <widget class="QLabel" name="label_5">
-+ <property name="text">
-+ <string>Qt</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="1">
-+ <widget class="QLabel" name="labelQtVersion">
-+ <property name="text">
-+ <string>TextLabel</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="0">
-+ <widget class="QLabel" name="label_6">
-+ <property name="text">
-+ <string>GDAL</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="1">
-+ <widget class="QLabel" name="labelGDALVersion">
-+ <property name="text">
-+ <string>TextLabel</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="0">
-+ <widget class="QLabel" name="label_7">
-+ <property name="text">
-+ <string>Proj4</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="1">
-+ <widget class="QLabel" name="labelProj4Version">
-+ <property name="text">
-+ <string>TextLabel</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="Line" name="line_2">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label_35">
-+ <property name="text">
-+ <string>This software is licensed under GPL3 or any later version</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label_36">
-+ <property name="text">
-+ <string>© 2017 Oliver Eichler (oliver.eichler@gmx.de)</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="pixmap">
-+ <pixmap resource="resources.qrc">:/pic/splash.png</pixmap>
-+ </property>
-+ <property name="scaledContents">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources>
-+ <include location="resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/IMainWindow.ui b/src/qmaptool/IMainWindow.ui
-new file mode 100644
-index 00000000..6b11c3bb
---- /dev/null
-+++ b/src/qmaptool/IMainWindow.ui
-@@ -0,0 +1,208 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IMainWindow</class>
-+ <widget class="QMainWindow" name="IMainWindow">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>800</width>
-+ <height>600</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>MainWindow</string>
-+ </property>
-+ <property name="windowIcon">
-+ <iconset resource="resources.qrc">
-+ <normaloff>:/icons/48x48/QMapTool.png</normaloff>:/icons/48x48/QMapTool.png</iconset>
-+ </property>
-+ <widget class="CCanvas" name="canvas"/>
-+ <widget class="QMenuBar" name="menubar">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>800</width>
-+ <height>23</height>
-+ </rect>
-+ </property>
-+ <widget class="QMenu" name="menuSetup">
-+ <property name="title">
-+ <string>Setup</string>
-+ </property>
-+ <addaction name="actionSetupExtTools"/>
-+ <addaction name="actionSetupUnits"/>
-+ <addaction name="actionSetupCoordFormat"/>
-+ <addaction name="actionShowToolHelp"/>
-+ </widget>
-+ <widget class="QMenu" name="menuView">
-+ <property name="title">
-+ <string>View</string>
-+ </property>
-+ <addaction name="actionFlipMouseWheel"/>
-+ </widget>
-+ <widget class="QMenu" name="menuWindow">
-+ <property name="title">
-+ <string>Window</string>
-+ </property>
-+ </widget>
-+ <widget class="QMenu" name="menu">
-+ <property name="title">
-+ <string>?</string>
-+ </property>
-+ <addaction name="actionAbout"/>
-+ </widget>
-+ <addaction name="menuSetup"/>
-+ <addaction name="menuView"/>
-+ <addaction name="menuWindow"/>
-+ <addaction name="menu"/>
-+ </widget>
-+ <widget class="QStatusBar" name="statusbar"/>
-+ <widget class="QDockWidget" name="dockTools">
-+ <property name="features">
-+ <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetVerticalTitleBar</set>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Tools</string>
-+ </property>
-+ <attribute name="dockWidgetArea">
-+ <number>1</number>
-+ </attribute>
-+ <widget class="QWidget" name="dockWidgetContents">
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <property name="spacing">
-+ <number>0</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="CToolStack" name="toolStack"/>
-+ </item>
-+ </layout>
-+ </widget>
-+ </widget>
-+ <widget class="QDockWidget" name="dockShell">
-+ <property name="features">
-+ <set>QDockWidget::DockWidgetFeatureMask</set>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Shell</string>
-+ </property>
-+ <attribute name="dockWidgetArea">
-+ <number>8</number>
-+ </attribute>
-+ <widget class="QWidget" name="dockWidgetContents_3">
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <widget class="CShell" name="textBrowser"/>
-+ </item>
-+ </layout>
-+ </widget>
-+ </widget>
-+ <action name="actionAbout">
-+ <property name="icon">
-+ <iconset resource="resources.qrc">
-+ <normaloff>:/icons/32x32/Info.png</normaloff>:/icons/32x32/Info.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>About</string>
-+ </property>
-+ </action>
-+ <action name="actionSetupExtTools">
-+ <property name="icon">
-+ <iconset resource="resources.qrc">
-+ <normaloff>:/icons/32x32/Apply.png</normaloff>:/icons/32x32/Apply.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>Ext. Tools</string>
-+ </property>
-+ <property name="toolTip">
-+ <string>Setup paths to external tools, like gdalwarp etc.</string>
-+ </property>
-+ </action>
-+ <action name="actionFlipMouseWheel">
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="resources.qrc">
-+ <normaloff>:/icons/32x32/MouseWheel.png</normaloff>:/icons/32x32/MouseWheel.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>Flip Mouse Wheel</string>
-+ </property>
-+ <property name="toolTip">
-+ <string>Flip Mouse Wheel</string>
-+ </property>
-+ </action>
-+ <action name="actionSetupUnits">
-+ <property name="icon">
-+ <iconset resource="resources.qrc">
-+ <normaloff>:/icons/32x32/UnitSetup.png</normaloff>:/icons/32x32/UnitSetup.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>Setup Units</string>
-+ </property>
-+ <property name="toolTip">
-+ <string>Setup Units</string>
-+ </property>
-+ </action>
-+ <action name="actionSetupCoordFormat">
-+ <property name="icon">
-+ <iconset resource="resources.qrc">
-+ <normaloff>:/icons/32x32/SetupCoordFormat.png</normaloff>:/icons/32x32/SetupCoordFormat.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>Setup Coord. Format</string>
-+ </property>
-+ <property name="toolTip">
-+ <string>Change the format coordinates are displayed</string>
-+ </property>
-+ </action>
-+ <action name="actionShowToolHelp">
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="checked">
-+ <bool>true</bool>
-+ </property>
-+ <property name="text">
-+ <string>Show Tool Help</string>
-+ </property>
-+ </action>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>CShell</class>
-+ <extends>QTextBrowser</extends>
-+ <header>shell/CShell.h</header>
-+ </customwidget>
-+ <customwidget>
-+ <class>CCanvas</class>
-+ <extends>QWidget</extends>
-+ <header>canvas/CCanvas.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ <customwidget>
-+ <class>CToolStack</class>
-+ <extends>QStackedWidget</extends>
-+ <header>tool/CToolStack.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <resources>
-+ <include location="resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/README.md b/src/qmaptool/README.md
-new file mode 100644
-index 00000000..2db8ed98
---- /dev/null
-+++ b/src/qmaptool/README.md
-@@ -0,0 +1,7 @@
-+# README #
-+
-+This is a sub-project of QMapShack and it's not supposed to compile on it's own. Please refere to
-+
-+https://bitbucket.org/maproom/qmapshack/overview
-+
-+to check out and compile this project.
-\ No newline at end of file
-diff --git a/src/qmaptool/canvas/CCanvas.cpp b/src/qmaptool/canvas/CCanvas.cpp
-new file mode 100644
-index 00000000..11b65e54
---- /dev/null
-+++ b/src/qmaptool/canvas/CCanvas.cpp
-@@ -0,0 +1,189 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CCanvas.h"
-+#include "canvas/IDrawContext.h"
-+#include "helpers/CDraw.h"
-+
-+
-+#include <QtWidgets>
-+
-+CCanvas::CCanvas(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setFocusPolicy(Qt::WheelFocus);
-+ setMouseTracking(true);
-+
-+ loadIndicator1 = new QMovie("://animation/loader.gif", QByteArray(), this);
-+ mapLoadIndicator = new QLabel(this);
-+ mapLoadIndicator->setMovie(loadIndicator1);
-+ loadIndicator1->start();
-+ mapLoadIndicator->show();
-+}
-+
-+void CCanvas::setOverrideCursor(const QCursor &cursor, const QString&)
-+{
-+// qDebug() << "setOverrideCursor" << src;
-+ QApplication::setOverrideCursor(cursor);
-+}
-+
-+void CCanvas::restoreOverrideCursor(const QString& src)
-+{
-+// qDebug() << "restoreOverrideCursor" << src;
-+ QApplication::restoreOverrideCursor();
-+}
-+
-+void CCanvas::changeOverrideCursor(const QCursor& cursor, const QString &src)
-+{
-+// qDebug() << "changeOverrideCursor" << src;
-+ QApplication::changeOverrideCursor(cursor);
-+}
-+
-+
-+void CCanvas::resizeEvent(QResizeEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+
-+ needsRedraw = eRedrawAll;
-+
-+ // move map loading indicator to new center of canvas
-+ QPoint p1(mapLoadIndicator->width()>>1, mapLoadIndicator->height()>>1);
-+ mapLoadIndicator->move(rect().center() - p1);
-+
-+ emit sigChangedSize(e->size());
-+
-+ QWidget::resizeEvent(e);
-+}
-+
-+void CCanvas::paintEvent(QPaintEvent *e)
-+{
-+ QPainter p;
-+ p.begin(this);
-+ USE_ANTI_ALIASING(p,true);
-+
-+ // fill the background with default pattern
-+ p.fillRect(rect(), backColor);
-+
-+ // ----- start to draw thread based content -----
-+
-+ mutex.lock();
-+ if(!tool->drawFx(p,needsRedraw))
-+ {
-+ mutex.unlock();
-+ slotHideLoadIndicator();
-+ CDraw::text(tr("No map view available."), p, rect(), Qt::black);
-+ mutex.lock();
-+ }
-+ mutex.unlock();
-+ // ----- start to draw fast content -----
-+ p.end();
-+ needsRedraw = eRedrawNone;
-+}
-+
-+void CCanvas::mousePressEvent(QMouseEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+ tool->mousePressEventFx(e);
-+ e->accept();
-+}
-+
-+void CCanvas::mouseMoveEvent(QMouseEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+ tool->mouseMoveEventFx(e);
-+ e->accept();
-+}
-+
-+void CCanvas::mouseReleaseEvent(QMouseEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+ tool->mouseReleaseEventFx(e);
-+ e->accept();
-+}
-+
-+void CCanvas::mouseDoubleClickEvent(QMouseEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+ tool->mouseDoubleClickEventFx(e);
-+ e->accept();
-+}
-+
-+void CCanvas::wheelEvent(QWheelEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+ tool->wheelEventFx(e);
-+}
-+
-+void CCanvas::enterEvent(QEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+
-+ tool->enterEventFx(e);
-+ CCanvas::setOverrideCursor(tool->getCursorFx(), "enterEvent");
-+
-+ setMouseTracking(true);
-+}
-+
-+void CCanvas::leaveEvent(QEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+
-+ tool->leaveEventFx(e);
-+
-+ // bad hack to stop bad number of override cursors.
-+ while(QApplication::overrideCursor())
-+ {
-+ CCanvas::restoreOverrideCursor("leaveEvent");
-+ }
-+
-+
-+ setMouseTracking(false);
-+}
-+
-+void CCanvas::keyPressEvent(QKeyEvent *e)
-+{
-+ QMutexLocker lock(&mutex);
-+ if(!tool->keyPressEventFx(e))
-+ {
-+ e->ignore();
-+ }
-+}
-+
-+
-+void CCanvas::slotTriggerCompleteUpdate(CCanvas::redraw_e flags)
-+{
-+ needsRedraw = (redraw_e)(needsRedraw | flags);
-+ update();
-+}
-+
-+void CCanvas::slotShowLoadIndicator()
-+{
-+ QMutexLocker lock(&mutex);
-+ mapLoadIndicator->show();
-+ mapLoadIndicatorCount++;
-+}
-+
-+void CCanvas::slotHideLoadIndicator()
-+{
-+ QMutexLocker lock(&mutex);
-+ if(--mapLoadIndicatorCount <= 0)
-+ {
-+ mapLoadIndicator->hide();
-+ mapLoadIndicatorCount = 0;
-+ }
-+}
-diff --git a/src/qmaptool/canvas/CCanvas.h b/src/qmaptool/canvas/CCanvas.h
-new file mode 100644
-index 00000000..552085ea
---- /dev/null
-+++ b/src/qmaptool/canvas/CCanvas.h
-@@ -0,0 +1,92 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CCANVAS_H
-+#define CCANVAS_H
-+
-+#include <QLabel>
-+#include <QMovie>
-+#include <QMutex>
-+#include <QPointer>
-+#include <QWidget>
-+
-+class ITool;
-+class CMainWindow;
-+class QStackedWidget;
-+
-+class CCanvas : public QWidget
-+{
-+ Q_OBJECT
-+public:
-+ CCanvas(QWidget *parent);
-+ virtual ~CCanvas() = default;
-+
-+ static void setOverrideCursor(const QCursor &cursor, const QString&);
-+ static void restoreOverrideCursor(const QString &src);
-+ static void changeOverrideCursor(const QCursor& cursor, const QString &src);
-+
-+ enum redraw_e
-+ {
-+ eRedrawNone = 0
-+ , eRedrawMap = 0x01
-+ , eRedrawOverlay = 0x08
-+ , eRedrawAll = 0xFFFFFFFF
-+ };
-+
-+ void setToolInterface(ITool * t)
-+ {
-+ tool = t;
-+ }
-+
-+signals:
-+ void sigChangedSize(const QSize& size);
-+
-+public slots:
-+ void slotTriggerCompleteUpdate(CCanvas::redraw_e flags);
-+
-+ void slotShowLoadIndicator();
-+ void slotHideLoadIndicator();
-+
-+protected:
-+ void resizeEvent(QResizeEvent *e) override;
-+ void paintEvent(QPaintEvent *e) override;
-+ void mousePressEvent(QMouseEvent *e) override;
-+ void mouseMoveEvent(QMouseEvent *e) override;
-+ void mouseReleaseEvent(QMouseEvent *e) override;
-+ void mouseDoubleClickEvent(QMouseEvent *e) override;
-+ void wheelEvent(QWheelEvent *e) override;
-+ void enterEvent(QEvent *e) override;
-+ void leaveEvent(QEvent *e) override;
-+ void keyPressEvent(QKeyEvent *e) override;
-+
-+private:
-+ mutable QMutex mutex {QMutex::Recursive};
-+
-+ QColor backColor = "#FFFFBF"; //< the background color used in case of missing map tiles
-+ redraw_e needsRedraw = eRedrawAll; //< set true to initiate a complete redraw of the screen content
-+
-+ /// load indicator for maps
-+ QMovie * loadIndicator1;
-+ QLabel * mapLoadIndicator;
-+ qint32 mapLoadIndicatorCount = 0;
-+
-+ ITool * tool = nullptr;
-+};
-+
-+#endif //CCANVAS_H
-+
-diff --git a/src/qmaptool/canvas/CDrawContextPixel.cpp b/src/qmaptool/canvas/CDrawContextPixel.cpp
-new file mode 100644
-index 00000000..a28c383e
---- /dev/null
-+++ b/src/qmaptool/canvas/CDrawContextPixel.cpp
-@@ -0,0 +1,168 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CDrawContextPixel.h"
-+#include "helpers/CDraw.h"
-+
-+#include <gdal_priv.h>
-+#include <ogr_spatialref.h>
-+#include <QtWidgets>
-+
-+CDrawContextPixel::CDrawContextPixel(CCanvas *canvas, QObject * parent)
-+ : IDrawContext(canvas, parent)
-+{
-+ scale = QPointF(1.0, 1.0);
-+}
-+
-+CDrawContextPixel::~CDrawContextPixel()
-+{
-+ unload();
-+}
-+
-+void CDrawContextPixel::convertMap2Coord(QPointF &pt) const
-+{
-+ pt = trFwd.map(pt);
-+}
-+
-+void CDrawContextPixel::convertCoord2Map(QPointF &pt) const
-+{
-+ pt = trInv.map(pt);
-+}
-+
-+
-+void CDrawContextPixel::setSourceFile(const QString& filename, bool resetContext)
-+{
-+ unload();
-+
-+ if(resetContext)
-+ {
-+ focus = QPointF(0,0);
-+ zoom(6);
-+ }
-+
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ load(filename);
-+
-+ intNeedsRedraw = true;
-+}
-+
-+void CDrawContextPixel::drawt(buffer_t& buf)
-+{
-+ QPainter p(&buf.image);
-+
-+ if(needsRedraw() || (dataset == nullptr) || (isValid == false))
-+ {
-+ CDraw::text(tr("Failed to load"), p, canvas->rect(), Qt::black);
-+ return;
-+ }
-+
-+ // calculate area to read from file
-+ QPointF pt1 = buf.ref1;
-+ QPointF pt2 = buf.ref2;
-+ QPointF pt4 = buf.ref4;
-+
-+ pt1.rx() = qMax(pt1.x(), 0.0);
-+ pt1.rx() = qMin(pt1.x(), xsize_px);
-+
-+ pt2.rx() = qMax(pt2.x(), 0.0);
-+ pt2.rx() = qMin(pt2.x(), xsize_px);
-+
-+ pt1.ry() = qMax(pt1.y(), 0.0);
-+ pt1.ry() = qMin(pt1.y(), ysize_px);
-+
-+ pt4.ry() = qMax(pt4.y(), 0.0);
-+ pt4.ry() = qMin(pt4.y(), ysize_px);
-+
-+ qint32 mapWidth = qRound(pt2.x() - pt1.x());
-+ qint32 mapHeight = qRound(pt4.y() - pt1.y());
-+ QPointF mapOff = pt1;
-+
-+ convertMap2Screen(pt1);
-+ convertMap2Screen(pt2);
-+ convertMap2Screen(pt4);
-+
-+ qint32 screenWidth = qRound(pt2.x() - pt1.x()) & 0xFFFFFFFC;
-+ qint32 screenHeight = qRound(pt4.y() - pt1.y());
-+ QPointF screenOff = pt1;
-+
-+
-+ // start to draw the map
-+ QImage img;
-+ QVector<quint8> buffer(screenWidth * screenHeight, 0);
-+
-+ CPLErr err = CE_Failure;
-+
-+ if(rasterBandCount == 1)
-+ {
-+ GDALRasterBand * pBand;
-+ pBand = dataset->GetRasterBand(1);
-+
-+ img = QImage(screenWidth,screenHeight,QImage::Format_Indexed8);
-+ img.setColorTable(colortable);
-+
-+ mutex.lock();
-+ err = pBand->RasterIO(GF_Read, mapOff.x(), mapOff.y(), mapWidth, mapHeight, img.bits(), screenWidth, screenHeight, GDT_Byte, 0, 0);
-+ mutex.unlock();
-+ }
-+ else
-+ {
-+ const QRgb testPix = qRgba(GCI_RedBand, GCI_GreenBand, GCI_BlueBand, GCI_AlphaBand);
-+ img = QImage(screenWidth, screenHeight, QImage::Format_ARGB32);
-+ // fill alpha channel of image buffer
-+ img.fill(Qt::white);
-+
-+ // read map band by band and copy color values into the image buffer
-+ for(int b = 1; b <= rasterBandCount; ++b)
-+ {
-+ GDALRasterBand * pBand;
-+ pBand = dataset->GetRasterBand(b);
-+
-+ mutex.lock();
-+ err = pBand->RasterIO(GF_Read, mapOff.x(), mapOff.y(), mapWidth, mapHeight, buffer.data(), screenWidth, screenHeight, GDT_Byte, 0, 0);
-+ mutex.unlock();
-+ if(err == CE_None)
-+ {
-+ int pbandColour = pBand->GetColorInterpretation();
-+ unsigned int offset;
-+
-+ for (offset = 0; offset < sizeof(testPix) && *(((quint8 *)&testPix) + offset) != pbandColour; offset++)
-+ {
-+ }
-+ if(offset < sizeof(testPix))
-+ {
-+ quint8 * pTar = img.bits() + offset;
-+ quint8 * pSrc = buffer.data();
-+ const int size = buffer.size();
-+
-+ for(int i = 0; i < size; ++i)
-+ {
-+ *pTar = *pSrc;
-+ pTar += sizeof(testPix);
-+ pSrc += 1;
-+ }
-+ }
-+ }
-+ }
-+ }
-+
-+ p.drawImage(screenOff, img);
-+}
-diff --git a/src/qmaptool/canvas/CDrawContextPixel.h b/src/qmaptool/canvas/CDrawContextPixel.h
-new file mode 100644
-index 00000000..7ebc598f
---- /dev/null
-+++ b/src/qmaptool/canvas/CDrawContextPixel.h
-@@ -0,0 +1,91 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CDRAWCONTEXTPIXEL_H
-+#define CDRAWCONTEXTPIXEL_H
-+
-+#include "canvas/IDrawContext.h"
-+#include "helpers/CGdalFile.h"
-+
-+class GDALDataset;
-+
-+
-+class CDrawContextPixel : public IDrawContext, public CGdalFile
-+{
-+ Q_OBJECT
-+public:
-+ CDrawContextPixel(CCanvas *canvas, QObject *parent);
-+ virtual ~CDrawContextPixel();
-+
-+ void setSourceFile(const QString& filename, bool resetContext) override;
-+
-+ void unload() override
-+ {
-+ CGdalFile::unload();
-+ }
-+
-+ bool getIsValid() const override
-+ {
-+ return isValid;
-+ }
-+
-+ const QString& getProjection() const override
-+ {
-+ return proj4str;
-+ }
-+
-+ const QTransform& getTrFwd() const override
-+ {
-+ return trFwd;
-+ }
-+
-+ bool getNoData() const override
-+ {
-+ return hasNoData != -1;
-+ }
-+
-+ int getRasterBandCount() const override
-+ {
-+ return rasterBandCount;
-+ }
-+
-+ QString getInfo() const override
-+ {
-+ return CGdalFile::getInfo();
-+ }
-+
-+ bool is32BitRgb() const override
-+ {
-+ return rasterBandCount >= 3;
-+ }
-+
-+
-+ QRectF getMapArea() const override
-+ {
-+ return QRectF(0,0, xsize_px, ysize_px);
-+ }
-+
-+ void convertMap2Coord(QPointF &pt) const override;
-+ void convertCoord2Map(QPointF &pt) const override;
-+
-+protected:
-+ void drawt(buffer_t& buf) override;
-+};
-+
-+#endif //CDRAWCONTEXTPIXEL_H
-+
-diff --git a/src/qmaptool/canvas/CDrawContextProj.cpp b/src/qmaptool/canvas/CDrawContextProj.cpp
-new file mode 100644
-index 00000000..c2ac302a
---- /dev/null
-+++ b/src/qmaptool/canvas/CDrawContextProj.cpp
-@@ -0,0 +1,166 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CDrawContextProj.h"
-+#include "helpers/CDraw.h"
-+
-+#include <gdal_priv.h>
-+#include <QtWidgets>
-+
-+CDrawContextProj::CDrawContextProj(CCanvas *canvas, QObject *parent)
-+ : IDrawContext(canvas, parent)
-+{
-+}
-+
-+void CDrawContextProj::setSourceFile(const QString& filename, bool resetContext)
-+{
-+ unload();
-+
-+ if(resetContext)
-+ {
-+ focus = QPointF(0,0);
-+ zoom(6);
-+ }
-+
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ load(filename);
-+
-+ if(resetContext)
-+ {
-+ convertMap2Coord(focus);
-+ }
-+
-+ intNeedsRedraw = true;
-+}
-+
-+void CDrawContextProj::convertMap2Coord(QPointF &pt) const
-+{
-+ pt = trFwd.map(pt);
-+}
-+
-+void CDrawContextProj::convertCoord2Map(QPointF &pt) const
-+{
-+ pt = trInv.map(pt);
-+}
-+
-+
-+void CDrawContextProj::drawt(buffer_t& buf)
-+{
-+ QPainter p(&buf.image);
-+
-+ if(needsRedraw() || (dataset == nullptr) || (isValid == false))
-+ {
-+ CDraw::text(tr("Failed to load"), p, canvas->rect(), Qt::black);
-+ return;
-+ }
-+
-+ // calculate area to read from file
-+ QPointF pt1 = buf.ref1;
-+ QPointF pt3 = buf.ref3;
-+
-+ pt1.rx() = qMax(CGdalFile::ref1.x(), pt1.x());
-+ pt1.rx() = qMin(CGdalFile::ref2.x(), pt1.x());
-+
-+ pt1.ry() = qMin(CGdalFile::ref1.y(), pt1.y());
-+ pt1.ry() = qMax(CGdalFile::ref3.y(), pt1.y());
-+
-+ pt3.rx() = qMax(CGdalFile::ref1.x(), pt3.x());
-+ pt3.rx() = qMin(CGdalFile::ref2.x(), pt3.x());
-+
-+ pt3.ry() = qMin(CGdalFile::ref1.y(), pt3.y());
-+ pt3.ry() = qMax(CGdalFile::ref3.y(), pt3.y());
-+
-+ convertCoord2Map(pt1);
-+ convertCoord2Map(pt3);
-+
-+ qint32 mapWidth = qRound(pt3.x() - pt1.x());
-+ qint32 mapHeight = qRound(pt3.y() - pt1.y());
-+ QPointF mapOff = pt1;
-+
-+ convertMap2Screen(pt1);
-+ convertMap2Screen(pt3);
-+
-+ qint32 screenWidth = qRound(pt3.x() - pt1.x()) & 0xFFFFFFFC;
-+ qint32 screenHeight = qRound(pt3.y() - pt1.y());
-+ QPointF screenOff = pt1;
-+
-+ // start to draw the map
-+ QImage img;
-+ QVector<quint8> buffer(screenWidth * screenHeight, 0);
-+
-+ CPLErr err = CE_Failure;
-+
-+ if(rasterBandCount == 1)
-+ {
-+ GDALRasterBand * pBand;
-+ pBand = dataset->GetRasterBand(1);
-+
-+ img = QImage(screenWidth,screenHeight,QImage::Format_Indexed8);
-+ img.setColorTable(colortable);
-+
-+ mutex.lock();
-+ err = pBand->RasterIO(GF_Read, mapOff.x(), mapOff.y(), mapWidth, mapHeight, img.bits(), screenWidth, screenHeight, GDT_Byte, 0, 0);
-+ mutex.unlock();
-+ }
-+ else
-+ {
-+ const QRgb testPix = qRgba(GCI_RedBand, GCI_GreenBand, GCI_BlueBand, GCI_AlphaBand);
-+ img = QImage(screenWidth, screenHeight, QImage::Format_ARGB32);
-+ // fill alpha channel of image buffer
-+ img.fill(Qt::white);
-+
-+ // read map band by band and copy color values into the image buffer
-+ for(int b = 1; b <= rasterBandCount; ++b)
-+ {
-+ GDALRasterBand * pBand;
-+ pBand = dataset->GetRasterBand(b);
-+
-+ mutex.lock();
-+ err = pBand->RasterIO(GF_Read, mapOff.x(), mapOff.y(), mapWidth, mapHeight, buffer.data(), screenWidth, screenHeight, GDT_Byte, 0, 0);
-+ mutex.unlock();
-+ if(err == CE_None)
-+ {
-+ int pbandColour = pBand->GetColorInterpretation();
-+ unsigned int offset;
-+
-+ for (offset = 0; offset < sizeof(testPix) && *(((quint8 *)&testPix) + offset) != pbandColour; offset++)
-+ {
-+ }
-+ if(offset < sizeof(testPix))
-+ {
-+ quint8 * pTar = img.bits() + offset;
-+ quint8 * pSrc = buffer.data();
-+ const int size = buffer.size();
-+
-+ for(int i = 0; i < size; ++i)
-+ {
-+ *pTar = *pSrc;
-+ pTar += sizeof(testPix);
-+ pSrc += 1;
-+ }
-+ }
-+ }
-+ }
-+ }
-+
-+ p.drawImage(screenOff, img);
-+}
-diff --git a/src/qmaptool/canvas/CDrawContextProj.h b/src/qmaptool/canvas/CDrawContextProj.h
-new file mode 100644
-index 00000000..ecb10f92
---- /dev/null
-+++ b/src/qmaptool/canvas/CDrawContextProj.h
-@@ -0,0 +1,89 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CDRAWCONTEXTPROJ_H
-+#define CDRAWCONTEXTPROJ_H
-+
-+#include "canvas/IDrawContext.h"
-+#include "helpers/CGdalFile.h"
-+
-+#include <proj_api.h>
-+
-+class CDrawContextProj : public IDrawContext, public CGdalFile
-+{
-+ Q_OBJECT
-+public:
-+ CDrawContextProj(CCanvas *canvas, QObject *parent);
-+ virtual ~CDrawContextProj() = default;
-+
-+ void setSourceFile(const QString& filename, bool resetContext) override;
-+
-+ void unload() override
-+ {
-+ CGdalFile::unload();
-+ }
-+
-+ bool getIsValid() const override
-+ {
-+ return isValid;
-+ }
-+
-+ const QString& getProjection() const override
-+ {
-+ return proj4str;
-+ }
-+
-+ const QTransform& getTrFwd() const override
-+ {
-+ return trFwd;
-+ }
-+
-+ bool getNoData() const override
-+ {
-+ return hasNoData != -1;
-+ }
-+
-+ int getRasterBandCount() const override
-+ {
-+ return rasterBandCount;
-+ }
-+
-+ QString getInfo() const override
-+ {
-+ return CGdalFile::getInfo();
-+ }
-+
-+ bool is32BitRgb() const override
-+ {
-+ return rasterBandCount >= 3;
-+ }
-+
-+
-+ QRectF getMapArea() const override
-+ {
-+ return QRectF(0,0, xsize_px, ysize_px);
-+ }
-+
-+ void convertMap2Coord(QPointF &pt) const override;
-+ void convertCoord2Map(QPointF &pt) const override;
-+
-+ void drawt(buffer_t& buf) override;
-+};
-+
-+#endif //CDRAWCONTEXTPROJ_H
-+
-diff --git a/src/qmaptool/canvas/IDrawContext.cpp b/src/qmaptool/canvas/IDrawContext.cpp
-new file mode 100644
-index 00000000..ce960e24
---- /dev/null
-+++ b/src/qmaptool/canvas/IDrawContext.cpp
-@@ -0,0 +1,300 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+
-+#include <QtWidgets>
-+
-+#define N_DEFAULT_ZOOM_LEVELS 31
-+const qreal IDrawContext::scales[N_DEFAULT_ZOOM_LEVELS] =
-+{
-+ 0.10, 0.15, 0.20, 0.30, 0.50, 0.70, 1.0, 1.5, 2.0, 3.0,
-+ 5.0, 7.0, 10.0, 15.0, 20.0, 30.0, 50.0, 70.0, 100.0, 150.0,
-+ 200.0, 300.0, 500.0, 700.0, 1000.0, 1500.0, 2000.0, 3000.0, 5000.0, 7000.0,
-+ 10000.0
-+ //, 15000.0, 20000.0, 30000.0, 50000.0, 70000.0
-+};
-+
-+QPointF operator*(const QPointF& p1, const QPointF& p2)
-+{
-+ return QPointF(p1.x() * p2.x(), p1.y() * p2.y());
-+}
-+
-+QPointF operator/(const QPointF& p1, const QPointF& p2)
-+{
-+ return QPointF(p1.x() / p2.x(), p1.y() / p2.y());
-+}
-+
-+QMutex IDrawContext::mutex(QMutex::Recursive);
-+
-+
-+IDrawContext::IDrawContext(CCanvas * canvas, QObject * parent)
-+ : QThread(parent)
-+ , canvas(canvas)
-+{
-+ init();
-+}
-+
-+void IDrawContext::init()
-+{
-+ connect(this, &IDrawContext::finished, canvas, static_cast<void (CCanvas::*)()>(&CCanvas::update));
-+ connect(this, &IDrawContext::started, canvas, &CCanvas::slotShowLoadIndicator);
-+ connect(this, &IDrawContext::finished, canvas, &CCanvas::slotHideLoadIndicator);
-+ connect(canvas, &CCanvas::sigChangedSize, this, &IDrawContext::slotResize);
-+
-+ slotResize(canvas->size());
-+}
-+
-+
-+void IDrawContext::saveSettings(QSettings& cfg) const
-+{
-+ QMutexLocker lock(&mutex);
-+
-+ cfg.beginGroup("DrawContext");
-+ cfg.setValue("focus", focus);
-+ cfg.setValue("zoomFactorIdx", zoomFactorIdx);
-+ cfg.endGroup();
-+}
-+
-+void IDrawContext::loadSettings(QSettings& cfg)
-+{
-+ QMutexLocker lock(&mutex);
-+
-+ cfg.beginGroup("DrawContext");
-+ focus = cfg.value("focus", focus).toPointF();
-+ zoomFactorIdx = cfg.value("zoomFactorIdx", zoomFactorIdx).toInt();
-+ cfg.endGroup();
-+
-+ zoom(zoomFactorIdx);
-+}
-+
-+
-+void IDrawContext::slotResize(const QSize& size)
-+{
-+ if(isRunning())
-+ {
-+ wait();
-+ }
-+
-+ QMutexLocker lock(&mutex);
-+ viewWidth = size.width();
-+ viewHeight = size.height();
-+
-+ bufWidth = viewWidth;
-+ bufHeight = viewHeight;
-+
-+ buffer[0].image = QImage(qRound(bufWidth), qRound(bufHeight), QImage::Format_ARGB32);
-+ buffer[1].image = QImage(qRound(bufWidth), qRound(bufHeight), QImage::Format_ARGB32);
-+}
-+
-+bool IDrawContext::needsRedraw() const
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+ bool res = intNeedsRedraw;
-+ mutex.unlock(); // --------- stop serialize with thread
-+ return res;
-+}
-+
-+void IDrawContext::convertScreen2Map(QPointF& pt) const
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+
-+ QPointF f = focus;
-+ convertCoord2Map(f);
-+
-+ pt = f + pt * scale * zoomFactor;
-+
-+ mutex.unlock(); // --------- stop serialize with thread
-+}
-+
-+void IDrawContext::convertMap2Screen(QPointF& pt) const
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+
-+ QPointF f = focus;
-+ convertCoord2Map(f);
-+
-+ pt = (pt - f) / (scale * zoomFactor);
-+
-+ mutex.unlock(); // --------- stop serialize with thread
-+}
-+
-+void IDrawContext::convertMap2Screen(QPolygonF& line) const
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+
-+ const int N = line.size();
-+ for(int n = 0; n < N; n++)
-+ {
-+ line[n] = (line[n] - focus) / (scale * zoomFactor);
-+ }
-+
-+ mutex.unlock(); // --------- stop serialize with thread
-+}
-+
-+void IDrawContext::convertMap2Screen(QRectF& rect) const
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+
-+ QPointF topLeft = rect.topLeft();
-+ convertMap2Screen(topLeft);
-+ rect.setTopLeft(topLeft);
-+
-+ QPointF bottomRight = rect.bottomRight();
-+ convertMap2Screen(bottomRight);
-+ rect.setBottomRight(bottomRight);
-+
-+ mutex.unlock(); // --------- stop serialize with thread
-+}
-+
-+
-+void IDrawContext::move(const QPointF& delta)
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+ QPointF f = focus;
-+
-+ convertCoord2Map(f);
-+ convertMap2Screen(f);
-+ f -= delta;
-+ convertScreen2Map(f);
-+ convertMap2Coord(f);
-+
-+ focus = f;
-+ mutex.unlock(); // --------- stop serialize with thread
-+}
-+
-+void IDrawContext::zoom(bool in, const QPointF& pt)
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+
-+ QPointF pt2 = pt;
-+
-+ convertScreen2Map(pt2);
-+ zoom(zoomFactorIdx + (in ? -1 : 1));
-+ convertMap2Screen(pt2);
-+
-+ move(pt - pt2);
-+
-+ mutex.unlock(); // --------- stop serialize with thread
-+}
-+
-+void IDrawContext::zoom(int idx)
-+{
-+ idx = qMax(idx, 0);
-+ idx = qMin(idx, N_DEFAULT_ZOOM_LEVELS - 1);
-+
-+ mutex.lock(); // --------- start serialize with thread
-+ if((zoomFactorIdx != idx) || (zoomFactor.x() != scales[idx]))
-+ {
-+ zoomFactorIdx = idx;
-+ zoomFactor.rx() = scales[idx];
-+ zoomFactor.ry() = scales[idx];
-+ intNeedsRedraw = true;
-+ }
-+ mutex.unlock(); // --------- stop serialize with thread
-+}
-+
-+void IDrawContext::draw(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ mutex.lock(); // --------- start serialize with thread
-+ // derive map reference points for all corners coordinate of map buffer
-+ ref1 = QPointF( 0, 0);
-+ ref2 = QPointF( bufWidth, 0);
-+ ref3 = QPointF( bufWidth, bufHeight);
-+ ref4 = QPointF( 0, bufHeight);
-+
-+ convertScreen2Map(ref1);
-+ convertScreen2Map(ref2);
-+ convertScreen2Map(ref3);
-+ convertScreen2Map(ref4);
-+
-+ convertMap2Coord(ref1);
-+ convertMap2Coord(ref2);
-+ convertMap2Coord(ref3);
-+ convertMap2Coord(ref4);
-+
-+ // get current active buffer
-+ const buffer_t& currentBuffer = buffer[bufIndex];
-+
-+ // calculate screen offset of current buffer
-+ QPointF offset = currentBuffer.ref1;
-+ convertCoord2Map(offset);
-+ convertMap2Screen(offset);
-+
-+ p.save();
-+ // add offset
-+ p.translate(offset);
-+ // scale image if current zoomfactor does not match buffer's zoomfactor
-+ p.scale(currentBuffer.zoomFactor.x()/zoomFactor.x(), currentBuffer.zoomFactor.y()/zoomFactor.y());
-+ // draw buffer to painter
-+ p.drawImage(0,0, currentBuffer.image);
-+ p.restore();
-+
-+ emit sigDraw(p);
-+
-+ // intNeedsRedraw is reset by the thread
-+ if(needsRedraw & maskRedraw)
-+ {
-+ intNeedsRedraw = true;
-+ }
-+ mutex.unlock(); // --------- stop serialize with thread
-+
-+ if((needsRedraw & maskRedraw) && !isRunning())
-+ {
-+ start();
-+ }
-+}
-+
-+
-+void IDrawContext::run()
-+{
-+ mutex.lock();
-+
-+ QTime t;
-+ t.start();
-+ qDebug() << "start thread" << objectName();
-+
-+ IDrawContext::buffer_t& currentBuffer = buffer[!bufIndex];
-+ while(intNeedsRedraw)
-+ {
-+ // copy all projection information need by the
-+ // map render objects to buffer structure
-+ currentBuffer.zoomFactor = zoomFactor;
-+ currentBuffer.scale = scale;
-+ currentBuffer.ref1 = ref1;
-+ currentBuffer.ref2 = ref2;
-+ currentBuffer.ref3 = ref3;
-+ currentBuffer.ref4 = ref4;
-+ currentBuffer.focus = focus;
-+ intNeedsRedraw = false;
-+
-+ mutex.unlock();
-+ // ----- reset buffer -----
-+ currentBuffer.image.fill(Qt::transparent);
-+
-+ drawt(currentBuffer);
-+
-+ mutex.lock();
-+ }
-+ // ----- switch buffer ------
-+ bufIndex = !bufIndex;
-+ qDebug() << "stop thread" << objectName() << "after" << t.elapsed() << "ms";
-+
-+ mutex.unlock();
-+}
-+
-diff --git a/src/qmaptool/canvas/IDrawContext.h b/src/qmaptool/canvas/IDrawContext.h
-new file mode 100644
-index 00000000..c87d4403
---- /dev/null
-+++ b/src/qmaptool/canvas/IDrawContext.h
-@@ -0,0 +1,164 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef IDRAWCONTEXT_H
-+#define IDRAWCONTEXT_H
-+
-+#include "canvas/CCanvas.h"
-+#include "units/IUnit.h"
-+
-+#include <QMutex>
-+#include <QThread>
-+class QPainter;
-+class QSettings;
-+
-+class IDrawContext : public QThread
-+{
-+ Q_OBJECT
-+public:
-+ IDrawContext(CCanvas *canvas, QObject *parent);
-+ virtual ~IDrawContext() = default;
-+
-+ virtual QString getInfo() const = 0;
-+
-+ virtual bool is32BitRgb() const = 0;
-+
-+ virtual int getRasterBandCount() const = 0;
-+
-+ virtual bool getNoData() const = 0;
-+
-+ virtual const QString& getProjection() const = 0;
-+
-+ virtual const QTransform& getTrFwd() const = 0;
-+
-+ virtual QRectF getMapArea() const = 0;
-+
-+ virtual void setSourceFile(const QString& filename, bool resetContext) = 0;
-+
-+ virtual void unload() = 0;
-+
-+ virtual bool getIsValid() const = 0;
-+
-+ virtual void saveSettings(QSettings& cfg) const;
-+
-+ virtual void loadSettings(QSettings& cfg);
-+
-+ void move(const QPointF& delta);
-+
-+ void zoom(bool in, const QPointF& pt);
-+
-+ bool needsRedraw() const;
-+
-+ void convertScreen2Map(QPointF &pt) const;
-+ void convertMap2Screen(QPointF& pt) const;
-+ void convertMap2Screen(QPolygonF& line) const;
-+ void convertMap2Screen(QRectF &rect) const;
-+
-+ virtual void convertMap2Coord(QPointF &pt) const = 0;
-+ virtual void convertCoord2Map(QPointF &pt) const = 0;
-+
-+ /**
-+ @brief draw
-+ @param p
-+ @param needsRedraw
-+ */
-+ void draw(QPainter& p, CCanvas::redraw_e needsRedraw);
-+
-+ void triggerCompleteUpdate(CCanvas::redraw_e flags) const
-+ {
-+ canvas->slotTriggerCompleteUpdate(flags);
-+ }
-+
-+ const CCanvas * getCanvas() const
-+ {
-+ return canvas;
-+ }
-+
-+signals:
-+ void sigDraw(QPainter& p);
-+
-+protected slots:
-+ void slotResize(const QSize& size);
-+
-+protected:
-+ CCanvas *canvas;
-+
-+ struct buffer_t
-+ {
-+ QImage image;
-+
-+ QPointF zoomFactor {1.0,1.0}; //< the zoomfactor used to draw the canvas
-+ QPointF scale {1.0,1.0}; //< the scale of the global viewport
-+
-+ QPointF ref1; //< top left corner
-+ QPointF ref2; //< top right corner
-+ QPointF ref3; //< bottom right corner
-+ QPointF ref4; //< bottom left corner
-+ QPointF focus; //< point of focus
-+ };
-+
-+ void run() override;
-+
-+ virtual void drawt(buffer_t& currentBuffer) = 0;
-+
-+ void zoom(int idx);
-+
-+ static QMutex mutex;
-+
-+ /// internal needs redraw flag
-+ bool intNeedsRedraw = true;
-+
-+ const CCanvas::redraw_e maskRedraw = CCanvas::eRedrawMap;
-+
-+ /// map canvas twin buffer
-+ buffer_t buffer[2];
-+ /// the main threads currently used map canvas buffer
-+ bool bufIndex = false;
-+
-+ qreal bufWidth = 100; //< buffer width [px]
-+ qreal bufHeight = 100; //< buffer height [px]
-+ qreal viewWidth = 100; //< the viewports width [px]
-+ qreal viewHeight = 100; //< the viewports height [px]
-+
-+ QPointF focus {0, 0};
-+
-+ /// the basic scale of the map canvas
-+ QPointF scale = QPoint(1.0, 1.0);
-+
-+private:
-+ void init();
-+
-+ static const qreal scales[];
-+ qint32 zoomFactorIdx = 6;
-+
-+ /// the actual used scaleFactor
-+ QPointF zoomFactor {scales[zoomFactorIdx], scales[zoomFactorIdx]};
-+
-+ QPointF ref1; //< top left corner of next buffer
-+ QPointF ref2; //< top right corner of next buffer
-+ QPointF ref3; //< bottom right corner of next buffer
-+ QPointF ref4; //< bottom left corner of next buffer
-+};
-+
-+extern QPointF operator*(const QPointF& p1, const QPointF& p2);
-+
-+extern QPointF operator/(const QPointF& p1, const QPointF& p2);
-+
-+
-+#endif //IDRAWCONTEXT_H
-+
-diff --git a/src/qmaptool/helpers/CDraw.cpp b/src/qmaptool/helpers/CDraw.cpp
-new file mode 100644
-index 00000000..ef2367d7
---- /dev/null
-+++ b/src/qmaptool/helpers/CDraw.cpp
-@@ -0,0 +1,239 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+ Copyright (C) 2015 Christian Eichler code@christian-eichler.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CCanvas.h"
-+#include "helpers/CDraw.h"
-+
-+#include <QDebug>
-+#include <QImage>
-+#include <QPointF>
-+#include <QtMath>
-+
-+QPen CDraw::penBorderBlue(QColor(10,10,150,220),2);
-+QPen CDraw::penBorderGray(Qt::lightGray,2);
-+QPen CDraw::penBorderBlack(QColor(0,0,0,200),2);
-+QBrush CDraw::brushBackWhite(QColor(255,255,255,255));
-+QBrush CDraw::brushBackYellow(QColor(0xff, 0xff, 0xcc, 0xE0));
-+
-+
-+QImage CDraw::createBasicArrow(const QBrush &brush, qreal scale)
-+{
-+ QImage arrow(21*scale, 16*scale, QImage::Format_ARGB32);
-+ arrow.fill(qRgba(0, 0, 0, 0));
-+
-+ QPainter painter(&arrow);
-+ USE_ANTI_ALIASING(painter, true);
-+
-+ // white background, same foreground as p
-+ painter.setPen(QPen(Qt::white, 2));
-+ painter.setBrush(brush);
-+
-+ QPointF arrowPoints[4] =
-+ {
-+ QPointF(20.0*scale, 7.0*scale), // front
-+ QPointF( 0.0*scale, 0.0*scale), // upper tail
-+ QPointF( 5.0*scale, 7.0*scale), // mid tail
-+ QPointF( 0.0*scale, 15.0*scale) // lower tail
-+ };
-+ painter.drawPolygon(arrowPoints, 4);
-+ painter.end();
-+
-+ return arrow;
-+}
-+
-+/**
-+ @brief Calculates the square distance between two points
-+ @return (int) ( (x2 - x1)^2 + (y2 - y1)^2 )
-+ */
-+
-+static inline int pointDistanceSquare(const QPointF &p1, const QPointF &p2)
-+{
-+ return (p2.x() - p1.x()) * (p2.x() - p1.x()) + (p2.y() - p1.y()) * (p2.y() - p1.y());
-+}
-+
-+void CDraw::arrows(const QPolygonF &line, const QRectF &viewport, QPainter &p, int minPointDist, int minArrowDist, qreal scale)
-+{
-+ QImage arrow = createBasicArrow(p.brush(), scale);
-+ qreal xoff = qCeil(arrow.width()/2.0);
-+ qreal yoff = qFloor((arrow.height()-1)/2.0);
-+
-+ const qreal minArrowDistSquare = minArrowDist * minArrowDist;
-+ const qreal minPointDistSquare = minPointDist * minPointDist;
-+
-+ QPointF prevArrow;
-+ bool firstArrow = true;
-+ for(int i = 1; i < line.size(); i++)
-+ {
-+ const QPointF &pt = line[i ];
-+ const QPointF &prevPt = line[i - 1];
-+
-+ // ensure there is enough space between two line points
-+ if( pointDistanceSquare(pt, prevPt) >= minPointDistSquare )
-+ {
-+ QPointF arrowPos = prevPt + (pt - prevPt)/2;
-+
-+ if( (viewport.contains(pt) || 0 == viewport.height()) // ensure the point is visible
-+ && (firstArrow || pointDistanceSquare(prevArrow, arrowPos) >= minArrowDistSquare) )
-+ {
-+ p.save();
-+
-+ // rotate and draw the arrow (between bullets)
-+ p.translate(arrowPos);
-+ qreal direction = ( qAtan2((pt.y() - prevPt.y()), (pt.x() - prevPt.x())) * 180.) / M_PI;
-+ p.rotate(direction);
-+ p.drawImage(-xoff, -yoff, arrow);
-+
-+ p.restore();
-+
-+ prevArrow = arrowPos;
-+ firstArrow = false;
-+ }
-+ }
-+ }
-+}
-+
-+void CDraw::text(const QString &str, QPainter &p, const QPoint &center, const QColor &color, const QFont &font)
-+{
-+ QFontMetrics fm(font);
-+ QRect r = fm.boundingRect(str);
-+
-+ r.moveCenter(center);
-+ p.setFont(font);
-+
-+ // draw the white `shadow`
-+ p.setPen(Qt::white);
-+ p.drawText(r.topLeft() - QPoint(-1, -1), str);
-+ p.drawText(r.topLeft() - QPoint( 0, -1), str);
-+ p.drawText(r.topLeft() - QPoint(+1, -1), str);
-+
-+ p.drawText(r.topLeft() - QPoint(-1, 0), str);
-+ p.drawText(r.topLeft() - QPoint(+1, 0), str);
-+
-+ p.drawText(r.topLeft() - QPoint(-1, +1), str);
-+ p.drawText(r.topLeft() - QPoint( 0, +1), str);
-+ p.drawText(r.topLeft() - QPoint(+1, +1), str);
-+
-+ p.setPen(color);
-+ p.drawText(r.topLeft(), str);
-+}
-+
-+void CDraw::text(const QString &str, QPainter &p, const QRect &r, const QColor &color)
-+{
-+ p.setPen(Qt::white);
-+ p.setFont(CMainWindow::self().getMapFont());
-+
-+ // draw the white `shadow`
-+ p.drawText(r.adjusted(-1, -1, -1, -1), Qt::AlignCenter, str);
-+ p.drawText(r.adjusted( 0, -1, 0, -1), Qt::AlignCenter, str);
-+ p.drawText(r.adjusted(+1, -1, +1, -1), Qt::AlignCenter, str);
-+
-+ p.drawText(r.adjusted(-1, 0, -1, 0), Qt::AlignCenter, str);
-+ p.drawText(r.adjusted(+1, 0, +1, 0), Qt::AlignCenter, str);
-+
-+ p.drawText(r.adjusted(-1, +1, -1, +1), Qt::AlignCenter, str);
-+ p.drawText(r.adjusted( 0, +1, 0, +1), Qt::AlignCenter, str);
-+ p.drawText(r.adjusted(+1, +1, +1, +1), Qt::AlignCenter, str);
-+
-+ p.setPen(color);
-+ p.drawText(r, Qt::AlignCenter, str);
-+}
-+
-+QPoint CDraw::bubble(QPainter &p, const QRect &contentRect, const QPoint &pointerPos, int pointerBaseWidth, float pointerBasePos)
-+{
-+ QPainterPath bubblePath;
-+ bubblePath.addRoundedRect(contentRect, RECT_RADIUS, RECT_RADIUS);
-+
-+ // draw the arrow
-+ int pointerBaseCenterX = (pointerBasePos <= 1)
-+ ? contentRect.left() + (pointerBasePos * contentRect.width())
-+ : contentRect.left() + (int) pointerBasePos;
-+
-+ int pointerHeight = 0;
-+ if(pointerPos.y() < contentRect.top())
-+ {
-+ pointerHeight = contentRect.top() - pointerPos.y() + 1;
-+ }
-+ else if(pointerPos.y() > contentRect.bottom())
-+ {
-+ pointerHeight = contentRect.bottom() - pointerPos.y() - 1;
-+ }
-+ else
-+ {
-+ qDebug() << "cannot calculate pointerHeight/pointerBaseCenterX due to invalid parameters";
-+ }
-+
-+ if(0 != pointerHeight)
-+ {
-+ QPolygonF pointerPoly;
-+ pointerPoly << pointerPos
-+ << QPointF(pointerBaseCenterX - pointerBaseWidth / 2, pointerPos.y() + pointerHeight)
-+ << QPointF(pointerBaseCenterX + pointerBaseWidth / 2, pointerPos.y() + pointerHeight)
-+ << pointerPos;
-+
-+ QPainterPath pointerPath;
-+ pointerPath.addPolygon(pointerPoly);
-+
-+ bubblePath = bubblePath.united(pointerPath);
-+ }
-+
-+ p.setPen (CDraw::penBorderGray);
-+ p.setBrush(CDraw::brushBackWhite);
-+
-+ p.drawPolygon(bubblePath.toFillPolygon());
-+
-+ return contentRect.topLeft();
-+}
-+
-+void CDraw::drawCrossHairDot(QPainter& p, const QPointF& pt)
-+{
-+ USE_ANTI_ALIASING(p, false);
-+ p.setBrush(Qt::NoBrush);
-+ QRectF dot2(0,0,7,7);
-+ p.setPen(QPen(Qt::white, 3));
-+ p.drawLine(pt.x(), pt.y() + 3, pt.x(), pt.y() + 20);
-+ p.drawLine(pt.x(), pt.y() - 3, pt.x(), pt.y() - 20);
-+ p.drawLine(pt.x() - 3, pt.y(), pt.x() - +20, pt.y());
-+ p.drawLine(pt.x() + 3, pt.y(), pt.x() + 20, pt.y());
-+ p.setPen(QPen(Qt::red, 1));
-+ p.drawLine(pt.x(), pt.y() + 3, pt.x(), pt.y() + 20);
-+ p.drawLine(pt.x(), pt.y() - 3, pt.x(), pt.y() - 20);
-+ p.drawLine(pt.x() - 3, pt.y(), pt.x() - +20, pt.y());
-+ p.drawLine(pt.x() + 3, pt.y(), pt.x() + 20, pt.y());
-+
-+ dot2.moveCenter(pt);
-+ p.setPen(QPen(Qt::white, 3));
-+ p.drawRect(dot2);
-+ p.setPen(QPen(Qt::red, 1));
-+ p.drawRect(dot2);
-+ USE_ANTI_ALIASING(p, true);
-+}
-+
-+void CDraw::drawRectangle(QPainter& p, const QRectF& rect, const QPen& pen, const QBrush& brush)
-+{
-+ p.setBrush(brush);
-+ p.setPen(QPen(Qt::white, pen.width() + 2));
-+ p.drawRect(rect);
-+ p.setPen(pen);
-+ p.drawRect(rect);
-+}
-+
-+void CDraw::drawRectangle(QPainter& p, const QRectF& rect, const Qt::GlobalColor& pen, const Qt::GlobalColor& brush)
-+{
-+ drawRectangle(p,rect, QPen(pen), QBrush(brush));
-+}
-diff --git a/src/qmaptool/helpers/CDraw.h b/src/qmaptool/helpers/CDraw.h
-new file mode 100644
-index 00000000..517d6baf
---- /dev/null
-+++ b/src/qmaptool/helpers/CDraw.h
-@@ -0,0 +1,96 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+ Copyright (C) 2015 Christian Eichler code@christian-eichler.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CPAINTER_H
-+#define CPAINTER_H
-+
-+#include <QPainter>
-+#include <QPolygonF>
-+#include <QRectF>
-+
-+#include "CMainWindow.h"
-+inline void USE_ANTI_ALIASING(QPainter& p, bool useAntiAliasing)
-+{
-+ p.setRenderHints(QPainter::TextAntialiasing|QPainter::Antialiasing|QPainter::SmoothPixmapTransform|QPainter::HighQualityAntialiasing, useAntiAliasing);
-+}
-+
-+#define RECT_RADIUS 3
-+#define PAINT_ROUNDED_RECT(p,r) p.drawRoundedRect(r,RECT_RADIUS,RECT_RADIUS)
-+
-+
-+class CDraw
-+{
-+public:
-+
-+ static QPen penBorderBlue;
-+ static QPen penBorderGray;
-+ static QPen penBorderBlack;
-+ static QBrush brushBackWhite;
-+ static QBrush brushBackYellow;
-+
-+ /**
-+ @brief Draw arrows along a line
-+
-+ An arrow is drawn if all the following requirements are met:
-+ * the position the new arrow would have been drawn is within viewport
-+ OR
-+ `viewport.height() == 0`
-+ * the two points have a distance of at least `minPointDist`
-+ * the (potential) position of the new arrow has at least a distance of `minArrowDist` from the previous arrow
-+
-+ @param line The line to draw the arrows along
-+ @param viewport Restrict drawing of arrows to this viewport (no limitation is applied if `viewport.height() == 0`)
-+ @param minPointDist The minimum distance of two points (in px)
-+ @param minArrowDist The minimum distance of two consecutive arrows (in px)
-+ */
-+ static void arrows(const QPolygonF &line, const QRectF &viewport, QPainter &p, int minPointDist, int minArrowDist, qreal scale);
-+
-+ static void text(const QString& str, QPainter &p, const QPoint &center, const QColor &color, const QFont &font = CMainWindow::self().getMapFont());
-+ static void text(const QString& str, QPainter &p, const QRect &r, const QColor &color);
-+
-+ /**
-+ @brief Draw a cartoon bubble
-+
-+ `pointerBasePos` denotes the position of the pointer's base, where 0 is `at the very left of the content`, and 1 is `at the very right`.
-+ Be careful with small values (near 0) or large values (near 1) for pointerBasePos, this might lead to incorrect drawing,
-+ especially if pointerBaseWidth is large.
-+ If is larger than 1, a value in pixels is assumed.
-+
-+ @param p An active QPainter
-+ @param contentRect The area the actual content will be in
-+ @param pointerPos The position of the pointer's head
-+ @param pointerBaseWidth The width of the pointer
-+ @param pointerBasePos The (relative) location of the pointer (in percent / pixels)
-+ */
-+ static QPoint bubble(QPainter &p, const QRect &contentRect, const QPoint &pointerPos, int pointerBaseWidth = 20, float pointerBasePos = .5f);
-+
-+ static void drawCrossHairDot(QPainter& p, const QPointF& pt);
-+
-+ static void drawRectangle(QPainter& p, const QRectF& rect, const Qt::GlobalColor& pen, const Qt::GlobalColor& brush);
-+ static void drawRectangle(QPainter& p, const QRectF& rect, const QPen& pen, const QBrush& brush);
-+private:
-+ /**
-+ @brief Creates a new arrow using the brush specified
-+ @return A QImage containing the arrow
-+ */
-+ static QImage createBasicArrow(const QBrush &brush, qreal scale);
-+};
-+
-+#endif // CPAINTER_H
-+
-diff --git a/src/qmaptool/helpers/CGdalFile.cpp b/src/qmaptool/helpers/CGdalFile.cpp
-new file mode 100644
-index 00000000..f1d875ec
---- /dev/null
-+++ b/src/qmaptool/helpers/CGdalFile.cpp
-@@ -0,0 +1,221 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CCanvas.h"
-+#include "CMainWindow.h"
-+#include "helpers/CGdalFile.h"
-+
-+#include <gdal_priv.h>
-+#include <ogr_spatialref.h>
-+
-+#include <QtWidgets>
-+
-+CGdalFile::CGdalFile()
-+{
-+}
-+
-+
-+void CGdalFile::unload()
-+{
-+ isValid = false;
-+ if(dataset != nullptr)
-+ {
-+ GDALClose(dataset);
-+ }
-+ dataset = nullptr;
-+}
-+
-+
-+void CGdalFile::load(const QString& filename)
-+{
-+ qDebug() << filename;
-+ CCanvas * canvas = CMainWindow::self().getCanvas();
-+
-+ dataset = (GDALDataset*)GDALOpenShared(filename.toUtf8(),GA_ReadOnly);
-+
-+ if(nullptr == dataset)
-+ {
-+ QMessageBox::warning(canvas, tr("Error..."), tr("Failed to load file: %1").arg(filename));
-+ return;
-+ }
-+
-+ char str[1025] = {0};
-+ if(dataset->GetProjectionRef())
-+ {
-+ strncpy(str, dataset->GetProjectionRef(), sizeof(str) - 1);
-+ }
-+
-+ {
-+ OGRSpatialReference oSRS;
-+ char *wkt = str;
-+ oSRS.importFromWkt(&wkt);
-+
-+ char *proj4 = nullptr;
-+ oSRS.exportToProj4(&proj4);
-+ proj4str = proj4;
-+ pjsrc = pj_init_plus(proj4);
-+ free(proj4);
-+ }
-+
-+ GDALRasterBand *pBand = dataset->GetRasterBand(1);
-+
-+ if(nullptr == pBand)
-+ {
-+ GDALClose(dataset);
-+ dataset = nullptr;
-+ QMessageBox::warning(canvas, tr("Error..."), tr("Failed to load file: %1").arg(filename));
-+ return;
-+ }
-+ hasOverviews = pBand->GetOverviewCount();
-+ qDebug() << "hasOverviews" << hasOverviews;
-+
-+ // ------- setup color table ---------
-+ rasterBandCount = dataset->GetRasterCount();
-+ if(rasterBandCount == 1)
-+ {
-+ if(pBand->GetColorInterpretation() == GCI_PaletteIndex )
-+ {
-+ GDALColorTable * pct = pBand->GetColorTable();
-+ for(int i=0; i < pct->GetColorEntryCount(); ++i)
-+ {
-+ const GDALColorEntry& e = *pct->GetColorEntry(i);
-+ colortable << qRgba(e.c1, e.c2, e.c3, e.c4);
-+ }
-+ }
-+ else if(pBand->GetColorInterpretation() == GCI_GrayIndex )
-+ {
-+ for(int i=0; i < 256; ++i)
-+ {
-+ colortable << qRgba(i, i, i, 255);
-+ }
-+ }
-+ else
-+ {
-+ GDALClose(dataset);
-+ dataset = nullptr;
-+ QMessageBox::warning(canvas, tr("Error..."), tr("File must be 8 bit palette or gray indexed."));
-+ return;
-+ }
-+
-+ int success = 0;
-+ qreal idx = pBand->GetNoDataValue(&success);
-+ if(success)
-+ {
-+ if((idx >= 0) && (idx < colortable.size()))
-+ {
-+ QColor tmp(colortable[idx]);
-+ tmp.setAlpha(0);
-+ colortable[idx] = tmp.rgba();
-+ hasNoData = idx;
-+ }
-+ else
-+ {
-+ qDebug() << "Index for no data value is out of bound";
-+ return;
-+ }
-+ }
-+ }
-+ qDebug() << "hasNoData" << hasNoData;
-+
-+ xsize_px = dataset->GetRasterXSize();
-+ ysize_px = dataset->GetRasterYSize();
-+
-+ qreal adfGeoTransform[6];
-+ dataset->GetGeoTransform( adfGeoTransform );
-+
-+ xscale = adfGeoTransform[1];
-+ yscale = adfGeoTransform[5];
-+ xrot = adfGeoTransform[4];
-+ yrot = adfGeoTransform[2];
-+
-+ trFwd = QTransform();
-+ trFwd.translate(adfGeoTransform[0], adfGeoTransform[3]);
-+ trFwd.scale(adfGeoTransform[1], adfGeoTransform[5]);
-+
-+ if(adfGeoTransform[4] != 0.0)
-+ {
-+ trFwd.rotate(qAtan(adfGeoTransform[2]/adfGeoTransform[4]));
-+ }
-+
-+ trInv = trFwd.inverted();
-+
-+ ref1 = trFwd.map(QPointF(0,0));
-+ ref2 = trFwd.map(QPointF(xsize_px,0));
-+ ref3 = trFwd.map(QPointF(xsize_px,ysize_px));
-+ ref4 = trFwd.map(QPointF(0,ysize_px));
-+
-+ isValid = true;
-+}
-+
-+QString CGdalFile::getProjection() const
-+{
-+ return proj4str;
-+}
-+
-+QString CGdalFile::getInfo() const
-+{
-+ QString str;
-+ QTextStream out(&str);
-+
-+ if(proj4str.isEmpty())
-+ {
-+ out << "no projection" << endl;
-+ }
-+ else
-+ {
-+ out << getProjection() << endl;
-+ if(pj_is_latlong(pjsrc))
-+ {
-+ out << "xscale: " << xscale << "px/rad\tyscale: " << yscale << "px/rad" << endl;
-+ }
-+ else
-+ {
-+ out << "xscale: " << xscale << "px/m\tyscale: " << yscale << "px/m" << endl;
-+ }
-+ }
-+
-+ out << "num. bands:\t" << rasterBandCount << " ";
-+ switch(rasterBandCount)
-+ {
-+ case 1:
-+ out << tr("(color table)");
-+ break;
-+
-+ case 3:
-+ out << tr("(RGB)");
-+ break;
-+
-+ case 4:
-+ out << tr("(RGBA)");
-+ break;
-+
-+ default:
-+ out << tr("(unknown)");
-+ }
-+
-+ out << endl;
-+
-+ out << "has overviews:\t" << hasOverviews << endl;
-+
-+ if((rasterBandCount != 4) && (hasNoData != -1))
-+ {
-+ out << "has no data:\t" << hasNoData << endl;
-+ }
-+
-+ return str;
-+}
-diff --git a/src/qmaptool/helpers/CGdalFile.h b/src/qmaptool/helpers/CGdalFile.h
-new file mode 100644
-index 00000000..49d77db2
---- /dev/null
-+++ b/src/qmaptool/helpers/CGdalFile.h
-@@ -0,0 +1,93 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CGDALFILE_H
-+#define CGDALFILE_H
-+
-+
-+#include <proj_api.h>
-+#include <QCoreApplication>
-+#include <QPointF>
-+#include <QRgb>
-+#include <QTransform>
-+#include <QVector>
-+
-+class GDALDataset;
-+
-+class CGdalFile
-+{
-+ Q_DECLARE_TR_FUNCTIONS(CGdalFile)
-+public:
-+ CGdalFile();
-+ virtual ~CGdalFile() = default;
-+
-+ bool getIsValid() const
-+ {
-+ return isValid;
-+ }
-+
-+ QString getProjection() const;
-+
-+protected:
-+ virtual QString getInfo() const;
-+ virtual void load(const QString& filename);
-+ virtual void unload();
-+
-+ GDALDataset * dataset = nullptr;
-+
-+ /// number of color bands used by the *vrt
-+ int rasterBandCount = 0;
-+ /// QT representation of the vrt's color table
-+ QVector<QRgb> colortable;
-+
-+ // true if the map file has overviews
-+ qint32 hasOverviews = -1;
-+ qint32 hasNoData = -1;
-+
-+
-+ /// true if the map file could be loaded
-+ bool isValid = false;
-+
-+ /// width in number of px
-+ qreal xsize_px = 0;
-+ /// height in number of px
-+ qreal ysize_px = 0;
-+
-+ /// scale [px/m]
-+ qreal xscale = 0;
-+ /// scale [px/m]
-+ qreal yscale = 0;
-+
-+ qreal xrot = 0;
-+ qreal yrot = 0;
-+
-+ QPointF ref1;
-+ QPointF ref2;
-+ QPointF ref3;
-+ QPointF ref4;
-+
-+ QTransform trFwd;
-+ QTransform trInv;
-+
-+ QString proj4str;
-+
-+ projPJ pjsrc = nullptr;
-+};
-+
-+#endif //CGDALFILE_H
-+
-diff --git a/src/qmaptool/helpers/CSettings.h b/src/qmaptool/helpers/CSettings.h
-new file mode 100644
-index 00000000..6abe4ecd
---- /dev/null
-+++ b/src/qmaptool/helpers/CSettings.h
-@@ -0,0 +1,54 @@
-+/**********************************************************************************************
-+ Copyright (C) 2012 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+#ifndef CSETTINGS_H
-+#define CSETTINGS_H
-+
-+#include "setup/CAppOpts.h"
-+#include <QtCore>
-+
-+class CSettings : public QObject
-+{
-+public:
-+ CSettings()
-+ {
-+ if(!qlOpts->configfile.isEmpty())
-+ {
-+ cfg = new QSettings(qlOpts->configfile, QSettings::IniFormat, this);
-+ }
-+ else
-+ {
-+ cfg = new QSettings(this);
-+ }
-+ }
-+ ~CSettings()
-+ {
-+ }
-+
-+ QSettings& get()
-+ {
-+ return *cfg;
-+ }
-+
-+private:
-+ QSettings * cfg;
-+};
-+
-+#define SETTINGS \
-+ CSettings ccfg; \
-+ QSettings& cfg = ccfg.get()
-+#endif //CSETTINGS_H
-diff --git a/src/qmaptool/helpers/mitab.cpp b/src/qmaptool/helpers/mitab.cpp
-new file mode 100644
-index 00000000..4569a17d
---- /dev/null
-+++ b/src/qmaptool/helpers/mitab.cpp
-@@ -0,0 +1,260 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+#include "mitab.h"
-+
-+const MapInfoDatumInfo asDatumInfoListQL[] =
-+{
-+ { // Datum ignore
-+ 0, "", 29, 0, 0, 0, 0, 0, 0, 0, 0
-+ },
-+ {74, "North_American_Datum_1983", 0, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {1, "Adindan", 6, -162, -12, 206, 0, 0, 0, 0, 0},
-+ {2, "Afgooye", 3, -43, -163, 45, 0, 0, 0, 0, 0},
-+ {3, "Ain_el_Abd_1970", 4, -150, -251, -2, 0, 0, 0, 0, 0},
-+ {4, "Anna_1_Astro_1965", 2, -491, -22, 435, 0, 0, 0, 0, 0},
-+ {5, "Arc_1950", 15,-143, -90, -294,0, 0, 0, 0, 0},
-+ {6, "Arc_1960", 6, -160, -8, -300,0, 0, 0, 0, 0},
-+ {7, "Ascension_Islands", 4, -207, 107, 52, 0, 0, 0, 0, 0},
-+ {8, "Astro_Beacon_E", 4, 145, 75, -272,0, 0, 0, 0, 0},
-+ {9, "Astro_B4_Sorol_Atoll", 4, 114, -116, -333,0, 0, 0, 0, 0},
-+ {10, "Astro_Dos_71_4", 4, -320, 550, -494,0, 0, 0, 0, 0},
-+ {11, "Astronomic_Station_1952", 4, 124, -234, -25, 0, 0, 0, 0, 0},
-+ {12, "Australian_Geodetic_Datum_66",2, -133, -48, 148, 0, 0, 0, 0, 0},
-+ {13, "Australian_Geodetic_Datum_84",2, -134, -48, 149, 0, 0, 0, 0, 0},
-+ {14, "Bellevue_Ign", 4, -127, -769, 472, 0, 0, 0, 0, 0},
-+ {15, "Bermuda_1957", 7, -73, 213, 296, 0, 0, 0, 0, 0},
-+ {16, "Bogota", 4, 307, 304, -318,0, 0, 0, 0, 0},
-+ {17, "Campo_Inchauspe", 4, -148, 136, 90, 0, 0, 0, 0, 0},
-+ {18, "Canton_Astro_1966", 4, 298, -304, -375,0, 0, 0, 0, 0},
-+ {19, "Cape", 6, -136, -108, -292,0, 0, 0, 0, 0},
-+ {20, "Cape_Canaveral", 7, -2, 150, 181, 0, 0, 0, 0, 0},
-+ {21, "Carthage", 6, -263, 6, 431, 0, 0, 0, 0, 0},
-+ {22, "Chatham_1971", 4, 175, -38, 113, 0, 0, 0, 0, 0},
-+ {23, "Chua", 4, -134, 229, -29, 0, 0, 0, 0, 0},
-+ {24, "Corrego_Alegre", 4, -206, 172, -6, 0, 0, 0, 0, 0},
-+ {25, "Batavia", 10,-377,681, -50, 0, 0, 0, 0, 0},
-+ {26, "Dos_1968", 4, 230, -199, -752,0, 0, 0, 0, 0},
-+ {27, "Easter_Island_1967", 4, 211, 147, 111, 0, 0, 0, 0, 0},
-+ {28, "European_Datum_1950", 4, -87, -98, -121,0, 0, 0, 0, 0},
-+ {29, "European_Datum_1979", 4, -86, -98, -119,0, 0, 0, 0, 0},
-+ {30, "Gandajika_1970", 4, -133, -321, 50, 0, 0, 0, 0, 0},
-+ {31, "New_Zealand_GD49", 4, 84, -22, 209, 0, 0, 0, 0, 0},
-+ {32, "GRS_67", 21,0, 0, 0, 0, 0, 0, 0, 0},
-+ {33, "GRS_80", 0, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {34, "Guam_1963", 7, -100, -248, 259, 0, 0, 0, 0, 0},
-+ {35, "Gux_1_Astro", 4, 252, -209, -751,0, 0, 0, 0, 0},
-+ {36, "Hito_XVIII_1963", 4, 16, 196, 93, 0, 0, 0, 0, 0},
-+ {37, "Hjorsey_1955", 4, -73, 46, -86, 0, 0, 0, 0, 0},
-+ {38, "Hong_Kong_1963", 4, -156, -271, -189,0, 0, 0, 0, 0},
-+ {39, "Hu_Tzu_Shan", 4, -634, -549, -201,0, 0, 0, 0, 0},
-+ {40, "Indian_Thailand_Vietnam", 11,214, 836, 303, 0, 0, 0, 0, 0},
-+ {41, "Indian_Bangladesh", 11,289, 734, 257, 0, 0, 0, 0, 0},
-+ {42, "Ireland_1965", 13,506, -122, 611, 0, 0, 0, 0, 0},
-+ {43, "ISTS_073_Astro_1969", 4, 208, -435, -229,0, 0, 0, 0, 0},
-+ {44, "Johnston_Island_1961", 4, 191, -77, -204,0, 0, 0, 0, 0},
-+ {45, "Kandawala", 11,-97, 787, 86, 0, 0, 0, 0, 0},
-+ {46, "Kerguyelen_Island", 4, 145, -187, 103, 0, 0, 0, 0, 0},
-+ {47, "Kertau", 17,-11, 851, 5, 0, 0, 0, 0, 0},
-+ {48, "L_C_5_Astro", 7, 42, 124, 147, 0, 0, 0, 0, 0},
-+ {49, "Liberia_1964", 6, -90, 40, 88, 0, 0, 0, 0, 0},
-+ {50, "Luzon_Phillippines", 7, -133, -77, -51, 0, 0, 0, 0, 0},
-+ {51, "Luzon_Mindanao_Island", 7, -133, -79, -72, 0, 0, 0, 0, 0},
-+ {52, "Mahe_1971", 6, 41, -220, -134,0, 0, 0, 0, 0},
-+ {53, "Marco_Astro", 4, -289, -124, 60, 0, 0, 0, 0, 0},
-+ {54, "Massawa", 10,639, 405, 60, 0, 0, 0, 0, 0},
-+ {55, "Merchich", 16,31, 146, 47, 0, 0, 0, 0, 0},
-+ {56, "Midway_Astro_1961", 4, 912, -58, 1227,0, 0, 0, 0, 0},
-+ {57, "Minna", 6, -92, -93, 122, 0, 0, 0, 0, 0},
-+ {58, "Nahrwan_Masirah_Island", 6, -247, -148, 369, 0, 0, 0, 0, 0},
-+ {59, "Nahrwan_Un_Arab_Emirates", 6, -249, -156, 381, 0, 0, 0, 0, 0},
-+ {60, "Nahrwan_Saudi_Arabia", 6, -231, -196, 482, 0, 0, 0, 0, 0},
-+ {61, "Naparima_1972", 4, -2, 374, 172, 0, 0, 0, 0, 0},
-+ {62, "NAD_1927", 7, -8, 160, 176, 0, 0, 0, 0, 0},
-+ {62, "North_American_Datum_1927", 7, -8, 160, 176, 0, 0, 0, 0, 0},
-+ {63, "NAD_27_Alaska", 7, -5, 135, 172, 0, 0, 0, 0, 0},
-+ {64, "NAD_27_Bahamas", 7, -4, 154, 178, 0, 0, 0, 0, 0},
-+ {65, "NAD_27_San_Salvador", 7, 1, 140, 165, 0, 0, 0, 0, 0},
-+ {66, "NAD_27_Canada", 7, -10, 158, 187, 0, 0, 0, 0, 0},
-+ {67, "NAD_27_Canal_Zone", 7, 0, 125, 201, 0, 0, 0, 0, 0},
-+ {68, "NAD_27_Caribbean", 7, -7, 152, 178, 0, 0, 0, 0, 0},
-+ {69, "NAD_27_Central_America", 7, 0, 125, 194, 0, 0, 0, 0, 0},
-+ {70, "NAD_27_Cuba", 7, -9, 152, 178, 0, 0, 0, 0, 0},
-+ {71, "NAD_27_Greenland", 7, 11, 114, 195, 0, 0, 0, 0, 0},
-+ {72, "NAD_27_Mexico", 7, -12, 130, 190, 0, 0, 0, 0, 0},
-+ {73, "NAD_27_Michigan", 8, -8, 160, 176, 0, 0, 0, 0, 0},
-+ {75, "Observatorio_1966", 4, -425, -169, 81, 0, 0, 0, 0, 0},
-+ {76, "Old_Egyptian", 22,-130, 110, -13, 0, 0, 0, 0, 0},
-+ {77, "Old_Hawaiian", 7, 61, -285, -181,0, 0, 0, 0, 0},
-+ {78, "Oman", 6, -346, -1, 224, 0, 0, 0, 0, 0},
-+ {79, "OSGB_1936", 9, 375, -111, 431, 0, 0, 0, 0, 0},
-+ {80, "Pico_De_Las_Nieves", 4, -307, -92, 127, 0, 0, 0, 0, 0},
-+ {81, "Pitcairn_Astro_1967", 4, 185, 165, 42, 0, 0, 0, 0, 0},
-+ {82, "Provisional_South_American", 4, -288, 175, -376,0, 0, 0, 0, 0},
-+ {83, "Puerto_Rico", 7, 11, 72, -101,0, 0, 0, 0, 0},
-+ {84, "Qatar_National", 4, -128, -283, 22, 0, 0, 0, 0, 0},
-+ {85, "Qornoq", 4, 164, 138, -189, 0, 0, 0, 0, 0},
-+ {86, "Reunion", 4, 94, -948,-1262,0, 0, 0, 0, 0},
-+ {87, "Monte_Mario", 4, -225, -65, 9, 0, 0, 0, 0, 0},
-+ {88, "Santo_Dos", 4, 170, 42, 84, 0, 0, 0, 0, 0},
-+ {89, "Sao_Braz", 4, -203, 141, 53, 0, 0, 0, 0, 0},
-+ {90, "Sapper_Hill_1943", 4, -355, 16, 74, 0, 0, 0, 0, 0},
-+ {91, "Schwarzeck", 14,616, 97, -251, 0, 0, 0, 0, 0},
-+ {92, "South_American_Datum_1969", 24,-57, 1, -41, 0, 0, 0, 0, 0},
-+ {93, "South_Asia", 19,7, -10, -26, 0, 0, 0, 0, 0},
-+ {94, "Southeast_Base", 4, -499, -249,314, 0, 0, 0, 0, 0},
-+ {95, "Southwest_Base", 4, -104, 167, -38, 0, 0, 0, 0, 0},
-+ {96, "Timbalai_1948", 11,-689, 691, -46, 0, 0, 0, 0, 0},
-+ {97, "Tokyo", 10,-128, 481, 664, 0, 0, 0, 0, 0},
-+ {98, "Tristan_Astro_1968", 4, -632, 438, -609, 0, 0, 0, 0, 0},
-+ {99, "Viti_Levu_1916", 6, 51, 391, -36, 0, 0, 0, 0, 0},
-+ {100, "Wake_Entiwetok_1960", 23,101, 52, -39, 0, 0, 0, 0, 0},
-+ {101, "WGS_60", 26,0, 0, 0, 0, 0, 0, 0, 0},
-+ {102, "WGS_66", 27,0, 0, 0, 0, 0, 0, 0, 0},
-+ {103, "WGS_1972", 1, 0, 8, 10, 0, 0, 0, 0, 0},
-+ {104, "WGS_1984", 28,0, 0, 0, 0, 0, 0, 0, 0},
-+ {105, "Yacare", 4, -155, 171, 37, 0, 0, 0, 0, 0},
-+ {106, "Zanderij", 4, -265, 120, -358, 0, 0, 0, 0, 0},
-+ {107, "NTF", 30,-168, -60, 320, 0, 0, 0, 0, 0},
-+ {108, "European_Datum_1987", 4, -83, -96, -113, 0, 0, 0, 0, 0},
-+ {109, "Netherlands_Bessel", 10,593, 26, 478, 0, 0, 0, 0, 0},
-+ {110, "Belgium_Hayford", 4, 81, 120, 129, 0, 0, 0, 0, 0},
-+ {111, "NWGL_10", 1, -1, 15, 1, 0, 0, 0, 0, 0},
-+ {112, "Rikets_koordinatsystem_1990",10,498, -36, 568, 0, 0, 0, 0, 0},
-+ {113, "Lisboa_DLX", 4, -303, -62, 105, 0, 0, 0, 0, 0},
-+ {114, "Melrica_1973_D73", 4, -223, 110, 37, 0, 0, 0, 0, 0},
-+ {115, "Euref_98", 0, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {116, "GDA94", 0, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {117, "NZGD2000", 0, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {118, "America_Samoa", 7, -115, 118, 426, 0, 0, 0, 0, 0},
-+ {119, "Antigua_Astro_1965", 6, -270, 13, 62, 0, 0, 0, 0, 0},
-+ {120, "Ayabelle_Lighthouse", 6, -79, -129, 145, 0, 0, 0, 0, 0},
-+ {121, "Bukit_Rimpah", 10,-384, 664, -48, 0, 0, 0, 0, 0},
-+ {122, "Estonia_1937", 10,374, 150, 588, 0, 0, 0, 0, 0},
-+ {123, "Dabola", 6, -83, 37, 124, 0, 0, 0, 0, 0},
-+ {124, "Deception_Island", 6, 260, 12, -147, 0, 0, 0, 0, 0},
-+ {125, "Fort_Thomas_1955", 6, -7, 215, 225, 0, 0, 0, 0, 0},
-+ {126, "Graciosa_base_1948", 4, -104, 167, -38, 0, 0, 0, 0, 0},
-+ {127, "Herat_North", 4, -333, -222,114, 0, 0, 0, 0, 0},
-+ {128, "Hermanns_Kogel", 10,682, -203, 480, 0, 0, 0, 0, 0},
-+ {129, "Indian", 50,283, 682, 231, 0, 0, 0, 0, 0},
-+ {130, "Indian_1954", 11,217, 823, 299, 0, 0, 0, 0, 0},
-+ {131, "Indian_1960", 11,198, 881, 317, 0, 0, 0, 0, 0},
-+ {132, "Indian_1975", 11,210, 814, 289, 0, 0, 0, 0, 0},
-+ {133, "Indonesian_Datum_1974", 4, -24, -15, 5, 0, 0, 0, 0, 0},
-+ {134, "ISTS061_Astro_1968", 4, -794, 119, -298, 0, 0, 0, 0, 0},
-+ {135, "Kusaie_Astro_1951", 4, 647, 1777, -1124,0, 0, 0, 0, 0},
-+ {136, "Leigon", 6, -130, 29, 364, 0, 0, 0, 0, 0},
-+ {137, "Montserrat_Astro_1958", 6, 174, 359, 365, 0, 0, 0, 0, 0},
-+ {138, "Mporaloko", 6, -74, -130, 42, 0, 0, 0, 0, 0},
-+ {139, "North_Sahara_1959", 6, -186, -93, 310, 0, 0, 0, 0, 0},
-+ {140, "Observatorio_Met_1939", 4, -425, -169,81, 0, 0, 0, 0, 0},
-+ {141, "Point_58", 6, -106, -129,165, 0, 0, 0, 0, 0},
-+ {142, "Pointe_Noire", 6, -148, 51, -291, 0, 0, 0, 0, 0},
-+ {143, "Porto_Santo_1936", 4, -499, -249,314, 0, 0, 0, 0, 0},
-+ {144, "Selvagem_Grande_1938", 4, -289, -124,60, 0, 0, 0, 0, 0},
-+ {145, "Sierra_Leone_1960", 6, -88, 4, 101, 0, 0, 0, 0, 0},
-+ {146, "S_JTSK_Ferro", 10, 589, 76, 480, 0, 0, 0, 0, 0},
-+ {147, "Tananarive_1925", 4, -189, -242,-91, 0, 0, 0, 0, 0},
-+ {148, "Voirol_1874", 6, -73, -247,227, 0, 0, 0, 0, 0},
-+ {149, "Virol_1960", 6, -123, -206,219, 0, 0, 0, 0, 0},
-+ {150, "Hartebeesthoek94", 0, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {151, "ATS77", 51, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {152, "JGD2000", 0, 0, 0, 0, 0, 0, 0, 0, 0},
-+ {1000,"DHDN_Potsdam_Rauenberg", 10,582, 105, 414, -1.04, -0.35, 3.08, 8.3, 0},
-+ {1001,"Pulkovo_1942", 3, 24, -123, -94, -0.02, 0.25, 0.13, 1.1, 0},
-+ {1002,"NTF_Paris_Meridian", 30,-168, -60, 320, 0, 0, 0, 0, 2.337229166667},
-+ {1003,"Switzerland_CH_1903", 10,660.077,13.551, 369.344, 0.804816, 0.577692, 0.952236, 5.66,0},
-+ {1004,"Hungarian_Datum_1972", 21,-56, 75.77, 15.31, -0.37, -0.2, -0.21, -1.01, 0},
-+ {1005,"Cape_7_Parameter", 28,-134.73,-110.92, -292.66, 0, 0, 0, 1, 0},
-+ {1006,"AGD84_7_Param_Aust", 2, -117.763,-51.51, 139.061, -0.292, -0.443, -0.277, -0.191, 0},
-+ {1007,"AGD66_7_Param_ACT", 2, -129.193,-41.212, 130.73, -0.246, -0.374, -0.329, -2.955, 0},
-+ {1008,"AGD66_7_Param_TAS", 2, -120.271,-64.543, 161.632, -0.2175, 0.0672, 0.1291, 2.4985, 0},
-+ {1009,"AGD66_7_Param_VIC_NSW", 2, -119.353,-48.301, 139.484, -0.415, -0.26, -0.437, -0.613, 0},
-+ {1010,"NZGD_7_Param_49", 4, 59.47, -5.04, 187.44, -0.47, 0.1, -1.024, -4.5993, 0},
-+ {1011,"Rikets_Tri_7_Param_1990", 10,419.3836, 99.3335, 591.3451, -0.850389, -1.817277, 7.862238, -0.99496, 0},
-+ {1012,"Russia_PZ90", 52, -1.08,-0.27,-0.9,0, 0, -0.16,-0.12, 0},
-+ {1013,"Russia_SK42", 52, 23.92,-141.27,-80.9, 0, -0.35,-0.82, -0.12, 0},
-+ {1014,"Russia_SK95", 52, 24.82,-131.21,-82.66,0,0,-0.16,-0.12, 0},
-+ {1015,"Tokyo", 10, -146.414, 507.337, 680.507,0,0,0,0,0},
-+ {1016,"Finnish_KKJ", 4, -96.062, -82.428, -121.754, -4.801, -0.345, 1.376, 1.496, 0},
-+
-+ {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
-+};
-+
-+/* -------------------------------------------------------------------- */
-+/* This table was hand entered from Appendix I of the mapinfo 6 */
-+/* manuals. */
-+/* -------------------------------------------------------------------- */
-+
-+const MapInfoSpheroidInfo asSpheroidInfoList[] =
-+{
-+ { 9,"Airy 1930", 6377563.396, 299.3249646},
-+ {13,"Airy 1930 (modified for Ireland 1965", 6377340.189, 299.3249646},
-+ {51,"ATS77 (Average Terrestrial System 1977)", 6378135, 298.257},
-+ { 2,"Australian", 6378160.0, 298.25},
-+ {10,"Bessel 1841", 6377397.155, 299.1528128},
-+ {35,"Bessel 1841 (modified for NGO 1948)", 6377492.0176, 299.15281},
-+ {14,"Bessel 1841 (modified for Schwarzeck)", 6377483.865, 299.1528128},
-+ {36,"Clarke 1858", 6378293.639, 294.26068},
-+ { 7,"Clarke 1866", 6378206.4, 294.9786982},
-+ { 8,"Clarke 1866 (modified for Michigan)", 6378450.047484481,294.9786982},
-+ { 6,"Clarke 1880", 6378249.145, 293.465},
-+ {15,"Clarke 1880 (modified for Arc 1950)", 6378249.145326, 293.4663076},
-+ {30,"Clarke 1880 (modified for IGN)", 6378249.2, 293.4660213},
-+ {37,"Clarke 1880 (modified for Jamaica)", 6378249.136, 293.46631},
-+ {16,"Clarke 1880 (modified for Merchich)", 6378249.2, 293.46598},
-+ {38,"Clarke 1880 (modified for Palestine)", 6378300.79, 293.46623},
-+ {39,"Everest (Brunei and East Malaysia)", 6377298.556, 300.8017},
-+ {11,"Everest (India 1830)", 6377276.345, 300.8017},
-+ {40,"Everest (India 1956)", 6377301.243, 300.80174},
-+ {50,"Everest (Pakistan)", 6377309.613, 300.8017},
-+ {17,"Everest (W. Malaysia and Singapore 1948)", 6377304.063, 300.8017},
-+ {48,"Everest (West Malaysia 1969)", 6377304.063, 300.8017},
-+ {18,"Fischer 1960", 6378166.0, 298.3},
-+ {19,"Fischer 1960 (modified for South Asia)", 6378155.0, 298.3},
-+ {20,"Fischer 1968", 6378150.0, 298.3},
-+ {21,"GRS 67", 6378160.0, 298.247167427},
-+ { 0,"GRS 80", 6378137.0, 298.257222101},
-+ { 5,"Hayford", 6378388.0, 297.0},
-+ {22,"Helmert 1906", 6378200.0, 298.3},
-+ {23,"Hough", 6378270.0, 297.0},
-+ {31,"IAG 75", 6378140.0, 298.257222},
-+ {41,"Indonesian", 6378160.0, 298.247},
-+ { 4,"International 1924", 6378388.0, 297.0},
-+ {49,"Irish (WOFO)", 6377542.178, 299.325},
-+ { 3,"Krassovsky", 6378245.0, 298.3},
-+ {32,"MERIT 83", 6378137.0, 298.257},
-+ {33,"New International 1967", 6378157.5, 298.25},
-+ {42,"NWL 9D", 6378145.0, 298.25},
-+ {43,"NWL 10D", 6378135.0, 298.26},
-+ {44,"OSU86F", 6378136.2, 298.25722},
-+ {45,"OSU91A", 6378136.3, 298.25722},
-+ {46,"Plessis 1817", 6376523.0, 308.64},
-+ {52,"PZ90", 6378136.0, 298.257839303},
-+ {24,"South American", 6378160.0, 298.25},
-+ {12,"Sphere", 6370997.0, 0.0},
-+ {47,"Struve 1860", 6378297.0, 294.73},
-+ {34,"Walbeck", 6376896.0, 302.78},
-+ {25,"War Office", 6378300.583, 296.0},
-+ {26,"WGS 60", 6378165.0, 298.3},
-+ {27,"WGS 66", 6378145.0, 298.25},
-+ { 1,"WGS 72", 6378135.0, 298.26},
-+ {28,"WGS 84", 6378137.0, 298.257223563},
-+ {29,"WGS 84 (MAPINFO Datum 0)", 6378137.01, 298.257223563},
-+ {-1,0, 0.0, 0.0}
-+};
-diff --git a/src/qmaptool/helpers/mitab.h b/src/qmaptool/helpers/mitab.h
-new file mode 100644
-index 00000000..6229b557
---- /dev/null
-+++ b/src/qmaptool/helpers/mitab.h
-@@ -0,0 +1,46 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+#ifndef MITAB_H
-+#define MITAB_H
-+
-+struct MapInfoDatumInfo
-+{
-+ int nMapInfoDatumID;
-+ const char *pszOGCDatumName;
-+ int nEllipsoid;
-+ double dfShiftX;
-+ double dfShiftY;
-+ double dfShiftZ;
-+ double dfDatumParm0; /* RotX */
-+ double dfDatumParm1; /* RotY */
-+ double dfDatumParm2; /* RotZ */
-+ double dfDatumParm3; /* Scale Factor */
-+ double dfDatumParm4; /* Prime Meridian */
-+};
-+
-+struct MapInfoSpheroidInfo
-+{
-+ int nMapInfoId;
-+ const char *pszMapinfoName;
-+ double dfA; /* semi major axis in meters */
-+ double dfInvFlattening; /* Inverse flattening */
-+};
-+
-+extern const MapInfoDatumInfo asDatumInfoListQL[];
-+extern const MapInfoSpheroidInfo asSpheroidInfoList[];
-+#endif //MITAB_H
-diff --git a/src/qmaptool/items/CItemCutMap.cpp b/src/qmaptool/items/CItemCutMap.cpp
-new file mode 100644
-index 00000000..197b81b2
---- /dev/null
-+++ b/src/qmaptool/items/CItemCutMap.cpp
-@@ -0,0 +1,97 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "items/CItemCutMap.h"
-+#include "overlay/COverlayCutMap.h"
-+
-+#include <QtWidgets>
-+
-+CItemCutMap::CItemCutMap(const QString &filename, QStackedWidget *stackedWidget, QListWidget *parent)
-+ : CItemFile(filename, parent)
-+{
-+ overlay = new COverlayCutMap(this, stackedWidget);
-+ connect(overlay, &COverlayCutMap::sigChanged, this, &CItemCutMap::sigChanged);
-+}
-+
-+CItemCutMap::~CItemCutMap()
-+{
-+ overlay->deleteLater();
-+}
-+
-+void CItemCutMap::saveSettings(QSettings& cfg)
-+{
-+ CItemFile::saveSettings(cfg);
-+ overlay->saveSettings(cfg);
-+}
-+
-+void CItemCutMap::loadSettings(QSettings& cfg)
-+{
-+ CItemFile::loadSettings(cfg);
-+ overlay->loadSettings(cfg);
-+}
-+
-+void CItemCutMap::toFront()
-+{
-+ overlay->toFront();
-+}
-+
-+bool CItemCutMap::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ CItemFile::drawFx(p, needsRedraw);
-+ overlay->drawFx(p, needsRedraw);
-+ return true;
-+}
-+
-+void CItemCutMap::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ CItemFile::mouseMoveEventFx(e);
-+ if(!mapIsMoving)
-+ {
-+ overlay->mouseMoveEventFx(e);
-+ }
-+}
-+
-+void CItemCutMap::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ if(!mapDidMove)
-+ {
-+ overlay->mouseReleaseEventFx(e);
-+ }
-+ CItemFile::mouseReleaseEventFx(e);
-+}
-+
-+void CItemCutMap::leaveEventFx(QEvent *e)
-+{
-+ CItemFile::leaveEventFx(e);
-+ overlay->abortStep();
-+}
-+
-+QCursor CItemCutMap::getCursorFx()
-+{
-+ return overlay->getCursorFx();
-+}
-+
-+void CItemCutMap::saveShape(const QString& filename) const
-+{
-+ overlay->saveShape(filename);
-+}
-+
-+bool CItemCutMap::isOk() const
-+{
-+ return overlay->isOk();
-+}
-diff --git a/src/qmaptool/items/CItemCutMap.h b/src/qmaptool/items/CItemCutMap.h
-new file mode 100644
-index 00000000..851589b3
---- /dev/null
-+++ b/src/qmaptool/items/CItemCutMap.h
-@@ -0,0 +1,52 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CITEMCUTMAP_H
-+#define CITEMCUTMAP_H
-+
-+#include "items/CItemFile.h"
-+
-+class COverlayCutMap;
-+
-+class CItemCutMap : public CItemFile
-+{
-+public:
-+ CItemCutMap(const QString& filename, QStackedWidget * stackedWidget, QListWidget *parent);
-+ virtual ~CItemCutMap();
-+
-+ void saveSettings(QSettings& cfg) override;
-+ void loadSettings(QSettings& cfg) override;
-+
-+ void toFront() override;
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override;
-+ void mouseMoveEventFx(QMouseEvent *e) override;
-+ void mouseReleaseEventFx(QMouseEvent *e) override;
-+ void leaveEventFx(QEvent *e) override;
-+ QCursor getCursorFx() override;
-+
-+ void saveShape(const QString& filename) const;
-+
-+ bool isOk() const override;
-+
-+private:
-+ COverlayCutMap * overlay;
-+};
-+
-+#endif //CITEMCUTMAP_H
-+
-diff --git a/src/qmaptool/items/CItemFile.cpp b/src/qmaptool/items/CItemFile.cpp
-new file mode 100644
-index 00000000..3aeff434
---- /dev/null
-+++ b/src/qmaptool/items/CItemFile.cpp
-@@ -0,0 +1,37 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CDrawContextPixel.h"
-+#include "CMainWindow.h"
-+#include "items/CItemFile.h"
-+
-+CItemFile::CItemFile(const QString &filename, QListWidget *parent)
-+ : IItem(filename)
-+ , QListWidgetItem(parent)
-+{
-+ setText(QFileInfo(filename).completeBaseName());
-+ drawContext = new CDrawContextPixel(CMainWindow::self().getCanvas(), this);
-+ reload();
-+}
-+
-+
-+void CItemFile::reload()
-+{
-+ IItem::reload();
-+ setToolTip(filename + "\n" + drawContext->getInfo());
-+}
-diff --git a/src/qmaptool/items/CItemFile.h b/src/qmaptool/items/CItemFile.h
-new file mode 100644
-index 00000000..66b31321
---- /dev/null
-+++ b/src/qmaptool/items/CItemFile.h
-@@ -0,0 +1,38 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CITEMFILE_H
-+#define CITEMFILE_H
-+
-+#include "items/IItem.h"
-+
-+#include <QListWidgetItem>
-+
-+class CItemFile : public IItem, public QListWidgetItem
-+{
-+public:
-+ CItemFile(const QString& filename, QListWidget *parent);
-+ virtual ~CItemFile() = default;
-+
-+ void setupChanged() override {}
-+
-+ void reload() override;
-+};
-+
-+#endif //CITEMFILE_H
-+
-diff --git a/src/qmaptool/items/CItemListWidget.cpp b/src/qmaptool/items/CItemListWidget.cpp
-new file mode 100644
-index 00000000..5776be22
---- /dev/null
-+++ b/src/qmaptool/items/CItemListWidget.cpp
-@@ -0,0 +1,157 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "helpers/CSettings.h"
-+#include "items/CItemListWidget.h"
-+#include "items/IItem.h"
-+
-+
-+#include <QtWidgets>
-+
-+CItemListWidget::CItemListWidget(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setupUi(this);
-+
-+ connect(toolFiles, &QToolButton::clicked, this, &CItemListWidget::slotFiles);
-+ connect(toolDelFile, &QToolButton::clicked, this, &CItemListWidget::slotDeleteFile);
-+ connect(toolDelFiles, &QToolButton::clicked, this, &CItemListWidget::slotDeleteFiles);
-+ connect(toolReloadFile, &QToolButton::clicked, this, &CItemListWidget::slotLoadCurrentMap);
-+ connect(listFiles, &QListWidget::itemSelectionChanged, this, &CItemListWidget::slotSelectionChanged);
-+}
-+
-+void CItemListWidget::saveSettings(QSettings& cfg)
-+{
-+ QStringList files;
-+ const int N = listFiles->count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ IItem * item = dynamic_cast<IItem*>(listFiles->item(n));
-+ if(item != nullptr)
-+ {
-+ files << item->getFilename();
-+ cfg.beginGroup(QString("%1").arg(n));
-+ item->saveSettings(cfg);
-+ cfg.endGroup();
-+ }
-+ }
-+ cfg.setValue("files", files);
-+ cfg.setValue("lastFile", listFiles->currentRow());
-+}
-+
-+void CItemListWidget::loadSettings(QSettings& cfg)
-+{
-+ QStringList files = cfg.value("files", QStringList()).toStringList();
-+ addFiles(files);
-+
-+ const int N = listFiles->count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ IItem * item = dynamic_cast<IItem*>(listFiles->item(n));
-+ if(item != nullptr)
-+ {
-+ cfg.beginGroup(QString("%1").arg(n));
-+ item->loadSettings(cfg);
-+ cfg.endGroup();
-+ }
-+ }
-+
-+ listFiles->setCurrentRow(cfg.value("lastFile",0).toInt());
-+}
-+
-+IItem * CItemListWidget::currentItem()
-+{
-+ return dynamic_cast<IItem*>(listFiles->currentItem());
-+}
-+
-+IItem * CItemListWidget::item(int n)
-+{
-+ return dynamic_cast<IItem*>(listFiles->item(n));
-+}
-+
-+void CItemListWidget::addFiles(const QStringList& files)
-+{
-+ for(const QString& file : files)
-+ {
-+ emit sigAddItem(file, listFiles);
-+ }
-+
-+ listFiles->setCurrentRow(listFiles->count() - 1);
-+ slotSelectionChanged();
-+}
-+
-+void CItemListWidget::slotFiles()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/mapInput", QDir::homePath()).toString();
-+
-+ const QStringList& files = QFileDialog::getOpenFileNames(this, tr("Select files..."), path);
-+ if(files.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ cfg.setValue("Path/mapInput", QFileInfo(files.first()).absolutePath());
-+ addFiles(files);
-+
-+ if(listFiles->count() && (listFiles->currentItem() ==nullptr))
-+ {
-+ listFiles->setCurrentRow(0);
-+ }
-+}
-+
-+void CItemListWidget::slotLoadCurrentMap()
-+{
-+ IItem * item = dynamic_cast<IItem*>(listFiles->currentItem());
-+ if(item != nullptr)
-+ {
-+ item->reload();
-+ }
-+}
-+
-+void CItemListWidget::slotDeleteFiles()
-+{
-+ listFiles->clear();
-+ slotSelectionChanged();
-+}
-+
-+void CItemListWidget::slotDeleteFile()
-+{
-+ QListWidgetItem * item = listFiles->takeItem(listFiles->currentRow());
-+ delete item;
-+ slotSelectionChanged();
-+}
-+
-+void CItemListWidget::slotSelectionChanged()
-+{
-+ IItem * item = dynamic_cast<IItem*>(listFiles->currentItem());
-+ if(item != nullptr)
-+ {
-+ item->toFront();
-+ }
-+
-+ bool isNotEmpty = listFiles->count() != 0;
-+ int row = listFiles->currentRow();
-+
-+ toolDelFile->setEnabled(row != -1);
-+ toolDelFiles->setEnabled(isNotEmpty);
-+ toolReloadFile->setEnabled(row != -1);
-+
-+ emit sigSelectionChanged();
-+}
-+
-diff --git a/src/qmaptool/items/CItemListWidget.h b/src/qmaptool/items/CItemListWidget.h
-new file mode 100644
-index 00000000..ad5123b1
---- /dev/null
-+++ b/src/qmaptool/items/CItemListWidget.h
-@@ -0,0 +1,84 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CITEMLISTWIDGET_H
-+#define CITEMLISTWIDGET_H
-+
-+#include "ui_IItemListWidget.h"
-+
-+class QSettings;
-+class IItem;
-+
-+class CItemListWidget : public QWidget, private Ui::IItemListWidget
-+{
-+ Q_OBJECT
-+public:
-+ CItemListWidget(QWidget * parent);
-+ virtual ~CItemListWidget() = default;
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+ IItem * currentItem();
-+ IItem * item(int n);
-+
-+ qint32 count() const
-+ {
-+ return listFiles->count();
-+ }
-+
-+ template< typename LessThan>
-+ void sort(LessThan lessThan)
-+ {
-+ listFiles->blockSignals(true);
-+
-+ QList<QListWidgetItem*> items;
-+ while(listFiles->count() != 0)
-+ {
-+ items << listFiles->takeItem(0);
-+ }
-+
-+ qSort(items.begin(), items.end(), lessThan);
-+
-+ for(QListWidgetItem* item : items)
-+ {
-+ listFiles->addItem(item);
-+ }
-+
-+ listFiles->blockSignals(false);
-+ }
-+
-+
-+signals:
-+ void sigAddItem(const QString& filename, QListWidget * list);
-+ void sigSelectionChanged();
-+ void sigChanged();
-+
-+protected slots:
-+ void slotFiles();
-+ void slotLoadCurrentMap();
-+ void slotDeleteFiles();
-+ void slotDeleteFile();
-+ void slotSelectionChanged();
-+
-+protected:
-+ void addFiles(const QStringList& files);
-+};
-+
-+#endif //CITEMLISTWIDGET_H
-+
-diff --git a/src/qmaptool/items/CItemMap.cpp b/src/qmaptool/items/CItemMap.cpp
-new file mode 100644
-index 00000000..db007897
---- /dev/null
-+++ b/src/qmaptool/items/CItemMap.cpp
-@@ -0,0 +1,82 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CCanvas.h"
-+#include "canvas/IDrawContext.h"
-+#include "CMainWindow.h"
-+#include "items/CItemMap.h"
-+#include "items/CItemMapLayer.h"
-+#include "items/CItemTreeWidget.h"
-+
-+#include <QtWidgets>
-+
-+CItemMap::CItemMap(const QString &filename)
-+ : IItem(filename)
-+{
-+ setText(CItemTreeWidget::eColumnName, QFileInfo(filename).completeBaseName());
-+ setIcon(CItemTreeWidget::eColumnName, QIcon("://icons/32x32/FolderMap.png"));
-+
-+ reload();
-+}
-+
-+CItemMap::~CItemMap()
-+{
-+ unload();
-+}
-+
-+QPointF CItemMap::getScale() const
-+{
-+ return QPointF(xscale, yscale);
-+}
-+
-+void CItemMap::reload()
-+{
-+ load(filename);
-+ setToolTip(CItemTreeWidget::eColumnName,filename + "\n" + getInfo());
-+
-+ QFile f(filename);
-+ f.open(QIODevice::ReadOnly);
-+ QCryptographicHash md5(QCryptographicHash::Md5);
-+ md5.addData(f.read(1024));
-+ hash = md5.result().toHex();
-+ f.close();
-+}
-+
-+void CItemMap::drawBoundingBox(QPainter& p, IDrawContext * dc)
-+{
-+ QPointF pt1 = ref1;
-+ QPointF pt2 = ref2;
-+ QPointF pt3 = ref3;
-+ QPointF pt4 = ref4;
-+
-+ dc->convertCoord2Map(pt1);
-+ dc->convertCoord2Map(pt2);
-+ dc->convertCoord2Map(pt3);
-+ dc->convertCoord2Map(pt4);
-+
-+ dc->convertMap2Screen(pt1);
-+ dc->convertMap2Screen(pt2);
-+ dc->convertMap2Screen(pt3);
-+ dc->convertMap2Screen(pt4);
-+
-+ p.setPen(QPen(Qt::red, 2));
-+ QPolygonF line;
-+ line << pt1 << pt2 << pt3 << pt4 << pt1;
-+ p.drawPolyline(line);
-+
-+}
-diff --git a/src/qmaptool/items/CItemMap.h b/src/qmaptool/items/CItemMap.h
-new file mode 100644
-index 00000000..b0b8ca84
---- /dev/null
-+++ b/src/qmaptool/items/CItemMap.h
-@@ -0,0 +1,54 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CITEMMAP_H
-+#define CITEMMAP_H
-+
-+#include "helpers/CGdalFile.h"
-+#include "items/IItem.h"
-+
-+#include <QTreeWidgetItem>
-+
-+class GDALDataset;
-+class CItemMapLayer;
-+
-+class CItemMap : public CGdalFile, public IItem, public QTreeWidgetItem
-+{
-+public:
-+ CItemMap(const QString& filename);
-+ virtual ~CItemMap();
-+
-+ void setupChanged() override {}
-+
-+ QPointF getScale() const;
-+
-+ const QString& getHash() const
-+ {
-+ return hash;
-+ }
-+
-+ void reload() override;
-+
-+ void drawBoundingBox(QPainter& p, IDrawContext *dc);
-+
-+private:
-+ QString hash;
-+};
-+
-+#endif //CITEMMAP_H
-+
-diff --git a/src/qmaptool/items/CItemMapLayer.cpp b/src/qmaptool/items/CItemMapLayer.cpp
-new file mode 100644
-index 00000000..a72a81a3
---- /dev/null
-+++ b/src/qmaptool/items/CItemMapLayer.cpp
-@@ -0,0 +1,119 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CDrawContextProj.h"
-+#include "CMainWindow.h"
-+#include "items/CItemMap.h"
-+#include "items/CItemMapLayer.h"
-+#include "items/CItemTreeWidget.h"
-+
-+#include <QtWidgets>
-+
-+CItemMapLayer::CItemMapLayer(QTreeWidget *parent)
-+ : IItem("")
-+ , QTreeWidgetItem(parent)
-+ , vrt(QDir::temp().absoluteFilePath("QMapTool_XXXXXX.vrt"))
-+{
-+ drawContext = new CDrawContextProj(CMainWindow::self().getCanvas(), parent);
-+
-+ setText(CItemTreeWidget::eColumnName, tr("Layer"));
-+ setIcon(CItemTreeWidget::eColumnName, QIcon("://icons/32x32/MapLayer.png"));
-+
-+ // this is needed to create a filename
-+ vrt.open();
-+ vrt.close();
-+}
-+
-+
-+const QString& CItemMapLayer::getProjection() const
-+{
-+ return drawContext->getProjection();
-+}
-+
-+bool CItemMapLayer::addMap(CItemMap *map)
-+{
-+ const QPointF& mapScale = map->getScale();
-+
-+ const QTransform& trFwd = drawContext->getTrFwd();
-+
-+ if(trFwd.isScaling())
-+ {
-+ if((qAbs((mapScale.x() - trFwd.m11())/trFwd.m11()) > 0.2) || (qAbs((mapScale.y() - trFwd.m22())/trFwd.m22()) > 0.2))
-+ {
-+ return false;
-+ }
-+ }
-+
-+ addChild(map);
-+ updateLayer();
-+
-+ return drawContext->getIsValid();
-+}
-+
-+void CItemMapLayer::updateLayer()
-+{
-+ drawContext->unload();
-+ setToolTip(CItemTreeWidget::eColumnName, "");
-+
-+ const int N = childCount();
-+ if(N == 0)
-+ {
-+ return;
-+ }
-+
-+ QStringList args;
-+ args << vrt.fileName();
-+
-+ for(int n = 0; n < N; n++)
-+ {
-+ CItemMap * map = dynamic_cast<CItemMap*>(child(n));
-+ if(map != nullptr)
-+ {
-+ args << map->getFilename();
-+ }
-+ }
-+
-+ QProcess proc;
-+ proc.start(IAppSetup::self().getGdalbuildvrt(), args);
-+ proc.waitForStarted();
-+ proc.waitForFinished();
-+
-+ drawContext->setSourceFile(vrt.fileName(), true);
-+ setToolTip(CItemTreeWidget::eColumnName, drawContext->getInfo());
-+}
-+
-+bool CItemMapLayer::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ drawContext->draw(p, needsRedraw);
-+ return true;
-+}
-+
-+void CItemMapLayer::drawBoundingBoxes(QPainter& p, IDrawContext * dc)
-+{
-+ const int N = childCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ CItemMap * map = dynamic_cast<CItemMap*>(child(n));
-+ if(map == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ map->drawBoundingBox(p, dc);
-+ }
-+}
-diff --git a/src/qmaptool/items/CItemMapLayer.h b/src/qmaptool/items/CItemMapLayer.h
-new file mode 100644
-index 00000000..1165c529
---- /dev/null
-+++ b/src/qmaptool/items/CItemMapLayer.h
-@@ -0,0 +1,57 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CITEMMAPLAYER_H
-+#define CITEMMAPLAYER_H
-+
-+#include "items/IItem.h"
-+
-+#include <QCoreApplication>
-+#include <QTemporaryFile>
-+#include <QTreeWidgetItem>
-+
-+class CItemMap;
-+class CDrawContextProj;
-+
-+class CItemMapLayer : public IItem, public QTreeWidgetItem
-+{
-+ Q_OBJECT
-+public:
-+ CItemMapLayer(QTreeWidget * parent);
-+ virtual ~CItemMapLayer() = default;
-+
-+ bool addMap(CItemMap * map);
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override;
-+
-+ void drawBoundingBoxes(QPainter& p, IDrawContext *dc);
-+
-+ void setupChanged() override {}
-+
-+ const QString& getProjection() const;
-+
-+protected:
-+ friend bool sortByScale(QTreeWidgetItem * item1, QTreeWidgetItem * item2);
-+
-+ void updateLayer();
-+
-+ QTemporaryFile vrt;
-+};
-+
-+#endif //CITEMMAPLAYER_H
-+
-diff --git a/src/qmaptool/items/CItemRefMap.cpp b/src/qmaptool/items/CItemRefMap.cpp
-new file mode 100644
-index 00000000..1bbcad76
---- /dev/null
-+++ b/src/qmaptool/items/CItemRefMap.cpp
-@@ -0,0 +1,114 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "items/CItemRefMap.h"
-+#include "overlay/COverlayRefMap.h"
-+#include "overlay/refmap/COverlayRefMapPoint.h"
-+
-+#include <QtWidgets>
-+
-+CItemRefMap::CItemRefMap(const QString &filename, QStackedWidget *stackedWidget, QListWidget *parent)
-+ : CItemFile(filename, parent)
-+{
-+ overlay = new COverlayRefMap(this, stackedWidget);
-+ connect(overlay, &COverlayRefMap::sigChanged, this, &CItemRefMap::sigChanged);
-+}
-+
-+CItemRefMap::~CItemRefMap()
-+{
-+ overlay->deleteLater();
-+}
-+
-+void CItemRefMap::saveSettings(QSettings& cfg)
-+{
-+ CItemFile::saveSettings(cfg);
-+ overlay->saveSettings(cfg);
-+}
-+
-+void CItemRefMap::loadSettings(QSettings& cfg)
-+{
-+ CItemFile::loadSettings(cfg);
-+ overlay->loadSettings(cfg);
-+}
-+
-+void CItemRefMap::addRefPoints(QList<COverlayRefMapPoint*>& points)
-+{
-+ overlay->addRefPoints(points);
-+}
-+
-+QString CItemRefMap::getMapProjection() const
-+{
-+ return overlay->getMapProjection();
-+}
-+
-+const QList<COverlayRefMapPoint *> CItemRefMap::getRefPoints() const
-+{
-+ return overlay->getRefPoints();
-+}
-+
-+
-+void CItemRefMap::toFront()
-+{
-+ overlay->toFront();
-+}
-+
-+bool CItemRefMap::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ CItemFile::drawFx(p, needsRedraw);
-+ overlay->drawFx(p, needsRedraw);
-+ return true;
-+}
-+
-+void CItemRefMap::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ CItemFile::mouseMoveEventFx(e);
-+ if(!mapIsMoving)
-+ {
-+ overlay->mouseMoveEventFx(e);
-+ }
-+}
-+
-+void CItemRefMap::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ if(!mapDidMove)
-+ {
-+ overlay->mouseReleaseEventFx(e);
-+ }
-+ CItemFile::mouseReleaseEventFx(e);
-+}
-+
-+bool CItemRefMap::keyPressEventFx(QKeyEvent *e)
-+{
-+ return overlay->keyPressEventFx(e);
-+}
-+
-+void CItemRefMap::leaveEventFx(QEvent *e)
-+{
-+ CItemFile::leaveEventFx(e);
-+ overlay->abortStep();
-+}
-+
-+QCursor CItemRefMap::getCursorFx()
-+{
-+ return overlay->getCursorFx();
-+}
-+
-+bool CItemRefMap::isOk() const
-+{
-+ return overlay->isOk();
-+}
-diff --git a/src/qmaptool/items/CItemRefMap.h b/src/qmaptool/items/CItemRefMap.h
-new file mode 100644
-index 00000000..5e74e8bf
---- /dev/null
-+++ b/src/qmaptool/items/CItemRefMap.h
-@@ -0,0 +1,56 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CITEMREFMAP_H
-+#define CITEMREFMAP_H
-+
-+#include "items/CItemFile.h"
-+
-+class COverlayRefMap;
-+class COverlayRefMapPoint;
-+
-+class CItemRefMap : public CItemFile
-+{
-+public:
-+ CItemRefMap(const QString& filename, QStackedWidget * stackedWidget, QListWidget *parent);
-+ virtual ~CItemRefMap();
-+
-+ void saveSettings(QSettings& cfg) override;
-+ void loadSettings(QSettings& cfg) override;
-+
-+ void addRefPoints(QList<COverlayRefMapPoint *> &points);
-+ QString getMapProjection() const;
-+ const QList<COverlayRefMapPoint*> getRefPoints() const;
-+
-+ void toFront() override;
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override;
-+ void mouseMoveEventFx(QMouseEvent *e) override;
-+ void mouseReleaseEventFx(QMouseEvent *e) override;
-+ void leaveEventFx(QEvent *e) override;
-+ bool keyPressEventFx(QKeyEvent *e) override;
-+ QCursor getCursorFx() override;
-+
-+ bool isOk() const override;
-+
-+private:
-+ COverlayRefMap * overlay;
-+};
-+
-+#endif //CITEMREFMAP_H
-+
-diff --git a/src/qmaptool/items/CItemTreeWidget.cpp b/src/qmaptool/items/CItemTreeWidget.cpp
-new file mode 100644
-index 00000000..9a68beaf
---- /dev/null
-+++ b/src/qmaptool/items/CItemTreeWidget.cpp
-@@ -0,0 +1,317 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/CDrawContextProj.h"
-+#include "helpers/CDraw.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemMap.h"
-+#include "items/CItemMapLayer.h"
-+#include "items/CItemTreeWidget.h"
-+
-+#include <QtWidgets>
-+
-+CItemTreeWidget::CItemTreeWidget(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setupUi(this);
-+
-+ connect(toolFiles, &QToolButton::clicked, this, &CItemTreeWidget::slotFiles);
-+ connect(toolDelFile, &QToolButton::clicked, this, &CItemTreeWidget::slotDeleteFile);
-+ connect(toolDelFiles, &QToolButton::clicked, this, &CItemTreeWidget::slotDeleteFiles);
-+ connect(treeFiles, &QTreeWidget::itemSelectionChanged, this, &CItemTreeWidget::slotSelectionChanged);
-+}
-+
-+void CItemTreeWidget::saveSettings(QSettings& cfg)
-+{
-+ QStringList files;
-+ const int N = treeFiles->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(treeFiles->topLevelItem(n));
-+ if(layer == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ const int M = layer->childCount();
-+ for(int m = 0; m < M; m++)
-+ {
-+ CItemMap * map = dynamic_cast<CItemMap*>(layer->child(m));
-+ if(map != nullptr)
-+ {
-+ files << map->getFilename();
-+ cfg.beginGroup(QString("%1_%2").arg(n).arg(m));
-+ map->saveSettings(cfg);
-+ cfg.endGroup();
-+ }
-+ }
-+ }
-+
-+ cfg.setValue("files", files);
-+}
-+
-+void CItemTreeWidget::loadSettings(QSettings& cfg)
-+{
-+ QStringList files = cfg.value("files", QStringList()).toStringList();
-+ addFiles(files);
-+
-+ const int N = treeFiles->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(treeFiles->topLevelItem(n));
-+ if(layer == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ const int M = layer->childCount();
-+ for(int m = 0; m < M; m++)
-+ {
-+ CItemMap * map = dynamic_cast<CItemMap*>(layer->child(m));
-+ if(map != nullptr)
-+ {
-+ cfg.beginGroup(QString("%1_%2").arg(n).arg(m));
-+ map->loadSettings(cfg);
-+ cfg.endGroup();
-+ }
-+ }
-+ }
-+}
-+
-+ITool * CItemTreeWidget::currentItem()
-+{
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(treeFiles->currentItem());
-+ if(layer != nullptr)
-+ {
-+ return layer;
-+ }
-+
-+ CItemMap * map = dynamic_cast<CItemMap*>(treeFiles->currentItem());
-+ if(map != nullptr)
-+ {
-+ return dynamic_cast<CItemMapLayer*>(map->QTreeWidgetItem::parent());
-+ }
-+
-+ return nullptr;
-+}
-+
-+bool sortByScale(QTreeWidgetItem * item1, QTreeWidgetItem * item2)
-+{
-+ CItemMapLayer * layer1 = dynamic_cast<CItemMapLayer*>(item1);
-+ CItemMapLayer * layer2 = dynamic_cast<CItemMapLayer*>(item2);
-+ if(layer1 == nullptr || layer2 == nullptr)
-+ {
-+ return false;
-+ }
-+
-+ return layer1->drawContext->getTrFwd().m11() < layer2->drawContext->getTrFwd().m11();
-+}
-+
-+
-+void CItemTreeWidget::addFiles(const QStringList& files)
-+{
-+ QString projstr;
-+
-+ // preset projstr if there is already a layer with a projection.
-+ if(treeFiles->topLevelItemCount() != 0)
-+ {
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(treeFiles->topLevelItem(0));
-+ if(layer != nullptr)
-+ {
-+ projstr = layer->getProjection();
-+ }
-+ }
-+
-+
-+ for(const QString& file : files)
-+ {
-+ CItemMap * map = new CItemMap(file);
-+
-+ // if something failed simply go on.
-+ if(!map->getIsValid())
-+ {
-+ delete map;
-+ continue;
-+ }
-+
-+ // setup/test for common projection
-+ if(projstr.isEmpty())
-+ {
-+ projstr = map->getProjection();
-+ }
-+ else if(map->getProjection() != projstr)
-+ {
-+ const QString msg = tr("<p>The current map <i>'%1'</i> does not match the projection of previous loaded maps. "
-+ "All map files need to have the same projection.</p>"
-+ "<p><b>This file</b>: %2</p>"
-+ "<p><b>Expected</b>: %3</p>"
-+ ).arg(file).arg(map->getProjection()).arg(projstr);
-+ QMessageBox::warning(this, tr("Error..."), msg, QMessageBox::Abort);
-+ delete map;
-+ continue;
-+ }
-+
-+ // if the map is already in the list simply go on
-+ if(findMapByHash(map->getHash()) != nullptr)
-+ {
-+ delete map;
-+ continue;
-+ }
-+
-+ CItemMapLayer * layer = nullptr;
-+ const int N = treeFiles->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ layer = dynamic_cast<CItemMapLayer*>(treeFiles->topLevelItem(n));
-+ if(layer == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ if(layer->addMap(map))
-+ {
-+ break;
-+ }
-+ layer = nullptr;
-+ }
-+
-+ if(layer == nullptr)
-+ {
-+ layer = new CItemMapLayer(treeFiles);
-+ layer->addMap(map);
-+ }
-+ } // for(const QString& file : files)
-+
-+ sort(sortByScale);
-+ treeFiles->expandAll();
-+ slotSelectionChanged();
-+}
-+
-+CItemMap * CItemTreeWidget::findMapByHash(const QString& hash)
-+{
-+ const int N = treeFiles->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(treeFiles->topLevelItem(n));
-+ if(layer == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ const int M = layer->childCount();
-+ for(int m = 0; m < M; m++)
-+ {
-+ CItemMap * map = dynamic_cast<CItemMap*>(layer->child(m));
-+ if((map != nullptr) && (map->getHash() == hash))
-+ {
-+ return map;
-+ }
-+ }
-+ }
-+
-+ return nullptr;
-+}
-+
-+void CItemTreeWidget::slotFiles()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/mapInput", QDir::homePath()).toString();
-+
-+ const QStringList& files = QFileDialog::getOpenFileNames(this, tr("Select files..."), path);
-+ if(files.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ cfg.setValue("Path/mapInput", QFileInfo(files.first()).absolutePath());
-+ addFiles(files);
-+}
-+
-+void CItemTreeWidget::slotDeleteFiles()
-+{
-+ treeFiles->clear();
-+ slotSelectionChanged();
-+}
-+
-+void CItemTreeWidget::slotDeleteFile()
-+{
-+ CItemMap * map = dynamic_cast<CItemMap*>(treeFiles->currentItem());
-+ if(map != nullptr)
-+ {
-+ QTreeWidgetItem * layer = map->QTreeWidgetItem::parent();
-+ delete map;
-+ if(layer->childCount() == 0)
-+ {
-+ delete layer;
-+ }
-+ slotSelectionChanged();
-+ return;
-+ }
-+
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(treeFiles->currentItem());
-+ if(layer != nullptr)
-+ {
-+ delete layer;
-+ slotSelectionChanged();
-+ return;
-+ }
-+}
-+
-+void CItemTreeWidget::slotSelectionChanged()
-+{
-+ bool isNotEmpty = treeFiles->topLevelItemCount() != 0;
-+ bool isSelected = !treeFiles->selectedItems().isEmpty();
-+
-+ toolDelFile->setEnabled(isSelected);
-+ toolDelFiles->setEnabled(isNotEmpty);
-+ toolReloadFile->setEnabled(isSelected);
-+
-+ emit sigSelectionChanged();
-+}
-+
-+bool CItemTreeWidget::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ bool res = false;
-+
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(currentItem());
-+ if(layer != nullptr)
-+ {
-+ res = layer->drawFx(p, needsRedraw);
-+
-+ IDrawContext * dc = layer->getDrawContext();
-+
-+ if(dc == nullptr)
-+ {
-+ return res;
-+ }
-+
-+ const int N = treeFiles->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(treeFiles->topLevelItem(n));
-+ if(layer == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ layer->drawBoundingBoxes(p, dc);
-+ }
-+ }
-+
-+ return res;
-+}
-diff --git a/src/qmaptool/items/CItemTreeWidget.h b/src/qmaptool/items/CItemTreeWidget.h
-new file mode 100644
-index 00000000..25d87935
---- /dev/null
-+++ b/src/qmaptool/items/CItemTreeWidget.h
-@@ -0,0 +1,94 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CITEMTREEWIDGET_H
-+#define CITEMTREEWIDGET_H
-+
-+#include "ui_IItemTreeWidget.h"
-+
-+class QSettings;
-+class ITool;
-+class CItemMap;
-+
-+class CItemTreeWidget : public QWidget, private Ui::IItemTreeWidget
-+{
-+ Q_OBJECT
-+public:
-+ enum column_e
-+ {
-+ eColumnName
-+ };
-+
-+ CItemTreeWidget(QWidget * parent);
-+ virtual ~CItemTreeWidget() = default;
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+ ITool *currentItem();
-+
-+ template< typename LessThan>
-+ void sort(LessThan lessThan)
-+ {
-+ treeFiles->blockSignals(true);
-+
-+ QList<QTreeWidgetItem*> items;
-+ while(treeFiles->topLevelItemCount() != 0)
-+ {
-+ items << treeFiles->takeTopLevelItem(0);
-+ }
-+
-+ qSort(items.begin(), items.end(), lessThan);
-+
-+ for(QTreeWidgetItem* item : items)
-+ {
-+ treeFiles->addTopLevelItem(item);
-+ }
-+
-+ treeFiles->blockSignals(false);
-+ }
-+
-+ qint32 topLevelItemCount() const
-+ {
-+ return treeFiles->topLevelItemCount();
-+ }
-+
-+ QTreeWidgetItem * topLevelItem(int n)
-+ {
-+ return treeFiles->topLevelItem(n);
-+ }
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw);
-+
-+signals:
-+ void sigSelectionChanged();
-+ void sigChanged();
-+
-+protected slots:
-+ void slotFiles();
-+ void slotDeleteFiles();
-+ void slotDeleteFile();
-+ void slotSelectionChanged();
-+
-+protected:
-+ void addFiles(const QStringList& files);
-+ CItemMap *findMapByHash(const QString& hash);
-+};
-+
-+#endif //CITEMTREEWIDGET_H
-+
-diff --git a/src/qmaptool/items/IItem.cpp b/src/qmaptool/items/IItem.cpp
-new file mode 100644
-index 00000000..9e8e636f
---- /dev/null
-+++ b/src/qmaptool/items/IItem.cpp
-@@ -0,0 +1,141 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "CMainWindow.h"
-+#include "items/IItem.h"
-+
-+#include <QtWidgets>
-+
-+IItem::IItem(const QString &filename)
-+ : filename(filename)
-+{
-+}
-+
-+void IItem::saveSettings(QSettings& cfg)
-+{
-+ if(nullptr != drawContext)
-+ {
-+ drawContext->saveSettings(cfg);
-+ }
-+}
-+
-+void IItem::loadSettings(QSettings& cfg)
-+{
-+ if(nullptr != drawContext)
-+ {
-+ drawContext->loadSettings(cfg);
-+ }
-+}
-+
-+void IItem::reload()
-+{
-+ if(nullptr == drawContext)
-+ {
-+ return;
-+ }
-+ drawContext->setSourceFile(filename, false);
-+}
-+
-+bool IItem::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ if(nullptr == drawContext)
-+ {
-+ return false;
-+ }
-+
-+ drawContext->draw(p, needsRedraw);
-+ return true;
-+}
-+
-+void IItem::mousePressEventFx(QMouseEvent *e)
-+{
-+ if(nullptr == drawContext)
-+ {
-+ return;
-+ }
-+
-+ if(e->button() == Qt::LeftButton)
-+ {
-+ lastPos = e->pos();
-+ firstPos = lastPos;
-+ mapIsMoving = true;
-+ mapDidMove = false;
-+ }
-+}
-+
-+void IItem::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ if(nullptr == drawContext)
-+ {
-+ return;
-+ }
-+
-+ const QPoint& point = e->pos();
-+ if(mapIsMoving)
-+ {
-+ if((point - firstPos).manhattanLength() >= 4)
-+ {
-+ drawContext->move(point - lastPos);
-+
-+ lastPos = point;
-+ mapDidMove = true;
-+
-+ drawContext->triggerCompleteUpdate(CCanvas::eRedrawMap);
-+ }
-+ }
-+}
-+
-+void IItem::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ if(nullptr == drawContext)
-+ {
-+ return;
-+ }
-+
-+ if(e->button() == Qt::LeftButton)
-+ {
-+ lastPos = e->pos();
-+ mapIsMoving = false;
-+ mapDidMove = false;
-+ }
-+}
-+
-+void IItem::wheelEventFx(QWheelEvent *e)
-+{
-+ if(nullptr == drawContext)
-+ {
-+ return;
-+ }
-+
-+ // angleDelta() returns the eighths of a degree
-+ // of the mousewheel
-+ // -> zoom in/out every 15 degress = every 120 eights
-+ const int EIGHTS_ZOOM = 15 * 8;
-+ zoomAngleDelta += e->angleDelta().y();
-+ if(abs(zoomAngleDelta) < EIGHTS_ZOOM)
-+ {
-+ return;
-+ }
-+
-+ zoomAngleDelta = 0;
-+
-+ drawContext->zoom(CMainWindow::self().flipMouseWheel() ? (e->delta() < 0) : (e->delta() > 0), e->posF());
-+ drawContext->triggerCompleteUpdate(CCanvas::eRedrawAll);
-+}
-+
-diff --git a/src/qmaptool/items/IItem.h b/src/qmaptool/items/IItem.h
-new file mode 100644
-index 00000000..59697d2c
---- /dev/null
-+++ b/src/qmaptool/items/IItem.h
-@@ -0,0 +1,97 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef IITEM_H
-+#define IITEM_H
-+
-+
-+#include "tool/ITool.h"
-+#include <QObject>
-+
-+class QSettings;
-+class IDrawContext;
-+
-+class IItem : public QObject, public ITool
-+{
-+ Q_OBJECT
-+public:
-+ IItem(const QString& filename);
-+ virtual ~IItem() = default;
-+
-+ virtual void saveSettings(QSettings& cfg);
-+ virtual void loadSettings(QSettings& cfg);
-+
-+ const QString& getFilename() const
-+ {
-+ return filename;
-+ }
-+
-+ IDrawContext* getDrawContext() const
-+ {
-+ return drawContext;
-+ }
-+
-+ bool getMapDidMove() const
-+ {
-+ return mapDidMove;
-+ }
-+
-+ bool getMapIsMoving() const
-+ {
-+ return mapIsMoving;
-+ }
-+
-+ /// reload file into draw context
-+ virtual void reload();
-+ /// item has been selected, bring everything to front (to be displayed)
-+ virtual void toFront(){}
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override;
-+ void mousePressEventFx(QMouseEvent *e) override;
-+ void mouseMoveEventFx(QMouseEvent *e) override;
-+ void mouseReleaseEventFx(QMouseEvent *e) override;
-+ void wheelEventFx(QWheelEvent *e) override;
-+
-+ virtual bool isOk() const
-+ {
-+ return false;
-+ }
-+
-+signals:
-+ void sigChanged();
-+
-+protected:
-+ QString filename;
-+ IDrawContext * drawContext = nullptr;
-+
-+ /// true while left mouse button is pressed down
-+ bool mapIsMoving = false;
-+ /// true if map actually moved, if not it's a single click
-+ bool mapDidMove = false;
-+
-+ /// last mouse position
-+ QPoint lastPos;
-+ /// mouse position when left button was pressed
-+ QPoint firstPos;
-+
-+ /// current accumulated angleDelta, used/required for zooming on track pads
-+ int zoomAngleDelta = 0;
-+};
-+
-+#endif //IITEM_H
-+
-diff --git a/src/qmaptool/items/IItemListWidget.ui b/src/qmaptool/items/IItemListWidget.ui
-new file mode 100644
-index 00000000..ae057f1a
---- /dev/null
-+++ b/src/qmaptool/items/IItemListWidget.ui
-@@ -0,0 +1,127 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IItemListWidget</class>
-+ <widget class="QWidget" name="IItemListWidget">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>258</width>
-+ <height>152</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_3">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QToolButton" name="toolFiles">
-+ <property name="toolTip">
-+ <string>Add map files to list</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolDelFile">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Remove selected file from the list.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/DeleteOne.png</normaloff>:/icons/32x32/DeleteOne.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolDelFiles">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Clear complete list of map files.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/DeleteMultiple.png</normaloff>:/icons/32x32/DeleteMultiple.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolReloadFile">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Reload the currently selected map.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Reload.png</normaloff>:/icons/32x32/Reload.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer_3">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QListWidget" name="listFiles"/>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources>
-+ <include location="../../qmapshack/resources.qrc"/>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/items/IItemTreeWidget.ui b/src/qmaptool/items/IItemTreeWidget.ui
-new file mode 100644
-index 00000000..cbe6fd8e
---- /dev/null
-+++ b/src/qmaptool/items/IItemTreeWidget.ui
-@@ -0,0 +1,135 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IItemTreeWidget</class>
-+ <widget class="QWidget" name="IItemTreeWidget">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>258</width>
-+ <height>152</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
-+ <property name="spacing">
-+ <number>0</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_3">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QToolButton" name="toolFiles">
-+ <property name="toolTip">
-+ <string>Add map files to list</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolDelFile">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Remove selected file from the list.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/DeleteOne.png</normaloff>:/icons/32x32/DeleteOne.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolDelFiles">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Clear complete list of map files.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/DeleteMultiple.png</normaloff>:/icons/32x32/DeleteMultiple.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolReloadFile">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Reload the currently selected map.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Reload.png</normaloff>:/icons/32x32/Reload.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer_3">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QTreeWidget" name="treeFiles">
-+ <attribute name="headerVisible">
-+ <bool>false</bool>
-+ </attribute>
-+ <column>
-+ <property name="text">
-+ <string notr="true">1</string>
-+ </property>
-+ </column>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/locale/qmaptool.ts b/src/qmaptool/locale/qmaptool.ts
-new file mode 100644
-index 00000000..025b1390
---- /dev/null
-+++ b/src/qmaptool/locale/qmaptool.ts
-@@ -0,0 +1,1675 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!DOCTYPE TS>
-+<TS version="2.1">
-+<context>
-+ <name>CCanvas</name>
-+ <message>
-+ <location filename="../canvas/CCanvas.cpp" line="89"/>
-+ <source>No map view available.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CCommandProcessor</name>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="31"/>
-+ <source>Print debug output to console.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="34"/>
-+ <source>Print debug output to logfile (temp. path).</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="37"/>
-+ <source>Do not show splash screen.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="40"/>
-+ <source>File with QMapTool configuration.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="40"/>
-+ <source>file</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CDialogRefPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="39"/>
-+ <source>bad coordinate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="58"/>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="64"/>
-+ <source>Error</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="58"/>
-+ <source>Bad value for X pixel.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="64"/>
-+ <source>Bad value for Y pixel.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CDrawContextPixel</name>
-+ <message>
-+ <location filename="../canvas/CDrawContextPixel.cpp" line="73"/>
-+ <source>Failed to load</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGdalFile</name>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="52"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="65"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="95"/>
-+ <source>Error...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="52"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="65"/>
-+ <source>Failed to load file: %1</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="95"/>
-+ <source>File must be 8 bit palette or gray indexed.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="179"/>
-+ <source>(color table)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="183"/>
-+ <source>(RGB)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="187"/>
-+ <source>(RGBA)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="191"/>
-+ <source>(unknown)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridPlacer</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="34"/>
-+ <source>Select one of the corners and place the marker at the corresponding grid crossing on the map. All 4 corners have to be placed.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="160"/>
-+ <source>Point 1 - not set</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="164"/>
-+ <source>Point 1 - ok</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="169"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="174"/>
-+ <source>Point 1 - bad</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="185"/>
-+ <source>Point 2 - ok</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="190"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="195"/>
-+ <source>Point 2 - bad</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="207"/>
-+ <source>Point 3 - ok</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="212"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="217"/>
-+ <source>Point 3 - bad</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="229"/>
-+ <source>Point 4 - ok</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="234"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="239"/>
-+ <source>Point 4 - bad</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="181"/>
-+ <source>Point 2 - not set</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="203"/>
-+ <source>Point 3 - not set</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="225"/>
-+ <source>Point 4 - not set</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridSelArea</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridSelArea.cpp" line="30"/>
-+ <source>Select the area to be covered by the calculated reference points. Simply grab the corners of the selection rectangle with a left click and place them where you want with a second click.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridSetRef</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridSetRef.cpp" line="37"/>
-+ <source>Valid coordinate formats: If the projection is lat/lon all values have to be in degree, e.g. &quot;48.2&quot; or &quot;12.4&quot;. For all other projections values are either in multiple of meter or feet. If you are doing it wrong the entry field will turn red.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CItemListWidget</name>
-+ <message>
-+ <location filename="../items/CItemListWidget.cpp" line="103"/>
-+ <source>Select files...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayCutMap</name>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="222"/>
-+ <source>Delete mask...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="222"/>
-+ <source>Are you sure to delete complete mask?</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="239"/>
-+ <source>Save mask...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="287"/>
-+ <source>Load mask...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="301"/>
-+ <source>Failed...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="301"/>
-+ <source>Not a shape file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayGridTool</name>
-+ <message>
-+ <location filename="../overlay/COverlayGridTool.cpp" line="34"/>
-+ <source>Before you proceed with &apos;ok&apos;:
-+Please cross check all data once again. A bad reference coordinate will ruin all the work. Also cross check if the selected area contains as many reference points as possible at the border. You can easily delete points outside the map in the Reference Tool. But it&apos;s much more effort to set additional points in case you miss some. When you are done press &apos;ok&apos; to transfer the derived reference points to the Reference Tool.
-+
-+The next step will be to use the Reference Tool to adjust the position of all reference points to the real grid position on the map.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayRefMap</name>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="42"/>
-+ <source>If you used the Grid Tool you have to fine tune the reference points by placing them as much as possible on the grid crossing. Be aware that if you over scale you get jumping points by rounding effects. Be precise but do not make religion out of the task.
-+If your mouse focus is on the map you can use the N and B keys to jump forward an backward in the reference point list.
-+The is also the option to fine tune the reference points in auto-mode. In this mode the next reference point is selected automatically right after you placed the current one. This is very convenient for a large number of reference points.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="614"/>
-+ <source>Save reference points...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="653"/>
-+ <source>Load reference points...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="694"/>
-+ <source>Delete all reference points...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="694"/>
-+ <source>Are you sure to delete all reference points in the list?</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="729"/>
-+ <source>Delete...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="729"/>
-+ <source>Delete all selected reference points?</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayRefMapPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/COverlayRefMapPoint.cpp" line="43"/>
-+ <source>bad coordinate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CProjWizard</name>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="62"/>
-+ <source>north</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="63"/>
-+ <source>south</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="227"/>
-+ <source>Error...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="227"/>
-+ <source>The value
-+&apos;%1&apos;
-+is not a valid coordinate system definition:
-+%2</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CSetupExtTools</name>
-+ <message>
-+ <location filename="../setup/CSetupExtTools.cpp" line="63"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="64"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="65"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="66"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="67"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="68"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;not found&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CSetupExtTools.cpp" line="80"/>
-+ <source>Select %1 binary...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CShell</name>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="41"/>
-+ <source>Execution of external program `%1` failed: </source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="45"/>
-+ <source>Process cannot be started.
-+</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="46"/>
-+ <source>Make sure the required packages are installed, `%1` exists and is executable.
-+</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="50"/>
-+ <source>External process crashed.
-+</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="54"/>
-+ <source>An unknown error occurred.
-+</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="146"/>
-+ <source>!!! failed !!!
-+</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="161"/>
-+ <source>
-+Canceled by user&apos;s request.
-+</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="191"/>
-+ <source>!!! done !!!
-+</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolAddOverview</name>
-+ <message>
-+ <location filename="../tool/CToolAddOverview.cpp" line="30"/>
-+ <source>Add Overviews</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolAddOverview.cpp" line="32"/>
-+ <source>Raster map files consume quite some memory if a larger area is displayed. Pre-calculated overview levels help to speed up loading and displaying the map. These overviews can be stored within the map file as well as an external file. GDAL can remove internally stored overviews, however it will not free the used space in the file. Therefore it&apos;s size will remain large. If you do not like that use the external option.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolCutMap</name>
-+ <message>
-+ <location filename="../tool/CToolCutMap.cpp" line="30"/>
-+ <source>Cut Map</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolCutMap.cpp" line="32"/>
-+ <source>Paper maps usually have a border you don&apos;t want to have. To combine maps seamlessly you have to cut that border, replacing it by transparent pixel. This tool allows you to define a cut line and it will add an alpha channel for transparency to your map.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolExport</name>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="30"/>
-+ <source>Export Maps</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="33"/>
-+ <source>To use the maps on your device you have to export them to the proprietary format supported by the device. Depending on the device this can vary from a single layer map to a map stack with maps of different scale.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="41"/>
-+ <source>Note: This tool will use all files in the list as a input. This will only work if all files have the same projection.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="136"/>
-+ <source>Select filename...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolGrid</name>
-+ <message>
-+ <location filename="../tool/CToolGrid.cpp" line="37"/>
-+ <source>By placing 4 reference points at the corners of a grid square and referencing them by their top left corner, the width and height, all the other grid points can be estimated.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolPalettize</name>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="30"/>
-+ <source>Add Color Palette</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="34"/>
-+ <source>Usually you use RGBA color while referencing a map because the large color space allows you to scale and rotate the map without any loss of quality. But it results into rather large files. The file size can be optimized by using a color palette instead of the RGBA color space. The impact on quality is low as long as you do not want to scale or rotate the map. If you want to combine files with a color palette all files need to have the same palette.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="46"/>
-+ <source>Note: This tool will use all files in the list as a combined input to derive an optimal palette. This will only work if all files have the same projection and scale.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="109"/>
-+ <source>Select filename...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolRefMap</name>
-+ <message>
-+ <location filename="../tool/CToolRefMap.cpp" line="34"/>
-+ <source>Reference Map</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolRefMap.cpp" line="36"/>
-+ <source>A scan of a paper map can be converted to a referenced raster map if you place at least three reference points on the map. The more points the better the result. If your map has a grid you can place points on that grid with the grid tool.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IAbout</name>
-+ <message>
-+ <location filename="../IAbout.ui" line="14"/>
-+ <source>About...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="26"/>
-+ <source>&lt;b&gt;QMapTool&lt;/b&gt;, Version</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="39"/>
-+ <location filename="../IAbout.ui" line="77"/>
-+ <location filename="../IAbout.ui" line="91"/>
-+ <location filename="../IAbout.ui" line="105"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="70"/>
-+ <source>Qt</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="84"/>
-+ <source>GDAL</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="98"/>
-+ <source>Proj4</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="121"/>
-+ <source>This software is licensed under GPL3 or any later version</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="128"/>
-+ <source>© 2017 Oliver Eichler (oliver.eichler@gmx.de)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ICoordFormatSetup</name>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="14"/>
-+ <source>Coordinate Format...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="24"/>
-+ <source>N48° 53&apos; 39.6&quot; E13° 31&apos; 6.78&quot;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="31"/>
-+ <source>N48.8943° E013.51855°</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="38"/>
-+ <source>N48° 53.660 E013° 31.113</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="53"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IDialogRefPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="14"/>
-+ <source>Dialog</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="25"/>
-+ <source>Coord. Map File [pixel]</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="32"/>
-+ <source>x</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="42"/>
-+ <source>y</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="49"/>
-+ <source>Coord. lat/lon WGS84 [°]</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="59"/>
-+ <source>Bad position format. Must be:
-+&quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot;
-+or
-+&quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridPlacer</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="150"/>
-+ <source>Reset</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="224"/>
-+ <source>Set Area</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridSelArea</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSelArea.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSelArea.ui" line="35"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridSetRef</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="35"/>
-+ <source>Grid Projection:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="47"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="60"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="72"/>
-+ <source>Easting</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="82"/>
-+ <source>Horiz. Spacing</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="92"/>
-+ <source>Northing</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="102"/>
-+ <source>Vert. Spacing</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IItemListWidget</name>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="40"/>
-+ <source>Add map files to list</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="43"/>
-+ <location filename="../items/IItemListWidget.ui" line="60"/>
-+ <location filename="../items/IItemListWidget.ui" line="77"/>
-+ <location filename="../items/IItemListWidget.ui" line="94"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="57"/>
-+ <source>Remove selected file from the list.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="74"/>
-+ <source>Clear complete list of map files.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="91"/>
-+ <source>Reload the currently selected map.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IMainWindow</name>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="14"/>
-+ <source>MainWindow</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="32"/>
-+ <source>Setup</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="41"/>
-+ <source>View</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="47"/>
-+ <source>Window</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="52"/>
-+ <source>?</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="67"/>
-+ <source>Tools</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="100"/>
-+ <source>Shell</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="119"/>
-+ <source>About</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="128"/>
-+ <source>Ext. Tools</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="131"/>
-+ <source>Setup paths to external tools, like gdalwarp etc.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="143"/>
-+ <location filename="../IMainWindow.ui" line="146"/>
-+ <source>Flip Mouse Wheel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="155"/>
-+ <location filename="../IMainWindow.ui" line="158"/>
-+ <source>Setup Units</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="167"/>
-+ <source>Setup Coord. Format</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="170"/>
-+ <source>Change the format coordinates are displayed</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="181"/>
-+ <source>Show Tool Help</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayCutMap</name>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="35"/>
-+ <source>Just move the map and zoom.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="58"/>
-+ <source>Add point to mask.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="61"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="84"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="107"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="137"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="158"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="175"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="81"/>
-+ <source>Move point of mask.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="104"/>
-+ <source>Remove point from mask.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="134"/>
-+ <source>Remove complete cut mask.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="155"/>
-+ <source>Load cut mask from shape file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="172"/>
-+ <source>Save cut mask to shape file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayGridTool</name>
-+ <message>
-+ <location filename="../overlay/IOverlayGridTool.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayGridTool.ui" line="145"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayRefMap</name>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="40"/>
-+ <source>Just move the map and zoom.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="63"/>
-+ <source>Add reference point.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="66"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="89"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="112"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="135"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="165"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="179"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="200"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="217"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="244"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="326"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="86"/>
-+ <source>Move reference point.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="109"/>
-+ <source>Remove single reference point.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="132"/>
-+ <source>Move reference points with auto mode. This will pickup the next point after you moved a reference point.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="162"/>
-+ <source>Remove all reference points.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="176"/>
-+ <source>Switch to the Grid Tool.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="197"/>
-+ <source>Load reference points from GCP file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="214"/>
-+ <source>Save reference points into GCP file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="241"/>
-+ <source>Sort list of reference points.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="281"/>
-+ <source>(x, y)[pixel]</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="286"/>
-+ <source>(lat, lon)[°]</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="294"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="304"/>
-+ <source>Final Map Projection:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="316"/>
-+ <source>Enter a valid projection string. Valid strings are &quot;+proj...&quot; or &quot;+init=epsg:...&quot;.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="323"/>
-+ <source>Start projection wizard.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="343"/>
-+ <source>Delete</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IProjWizard</name>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="14"/>
-+ <source>Proj4 Wizard</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="29"/>
-+ <source>Mercator</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="38"/>
-+ <source>UTM</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="45"/>
-+ <source>zone</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="82"/>
-+ <source>user defined</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="94"/>
-+ <source>Datum</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="104"/>
-+ <source>World Mercator (OSM)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="124"/>
-+ <source>Result:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="138"/>
-+ <source>UPS North (North Pole)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="145"/>
-+ <source>UPS South (South Pole)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="152"/>
-+ <source>Projection</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ISetupExtTools</name>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="14"/>
-+ <source>Setup Ext. Tools</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="22"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="64"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="99"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="173"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="194"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="257"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;not found&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="32"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="53"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="74"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="88"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="135"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="149"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="183"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="211"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="225"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="239"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="264"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="275"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="112"/>
-+ <source>gdal_translate:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="43"/>
-+ <source>gdalbuildvrt</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="166"/>
-+ <source>gdaladdo:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="125"/>
-+ <source>gdalwarp:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="29"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="132"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="180"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="208"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="222"/>
-+ <source>Setup user defined path.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="201"/>
-+ <source>qmt_rgb2pct</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="50"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="71"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="85"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="146"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="236"/>
-+ <source>Reset user defined path setup.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="250"/>
-+ <source>qmt_map2jnx</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="288"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; Usually QMapTool should detect all external tools by itself. If it does not, it&apos;s a bad setup and you should fix the PATH variable of your system. You can setup the paths manually, too, if you know what you are doing. But please keep in mind that GDAL needs a proper environment setup to function properly. If it&apos;s not setup properly you might get results but these can be off grid.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ITimeZoneSetup</name>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="14"/>
-+ <source>Setup Time Zone ...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="22"/>
-+ <source>UTC</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="32"/>
-+ <source>Local</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="42"/>
-+ <source>Automatic</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="75"/>
-+ <source>Print date/time in </source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="82"/>
-+ <source>long format, or</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="92"/>
-+ <source>short format</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolAddOverview</name>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="119"/>
-+ <source>:2</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="126"/>
-+ <source>:4</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="133"/>
-+ <source>:8</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="140"/>
-+ <source>:16</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="147"/>
-+ <source>:32</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="154"/>
-+ <source>:64</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="164"/>
-+ <source>Remove all overview levels from map file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="167"/>
-+ <source>Remove</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="174"/>
-+ <source>Do not copy the overviews into the file itself. Add them as external file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="177"/>
-+ <source>Overview as external file</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="207"/>
-+ <source>Start</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="221"/>
-+ <source>Cancel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="232"/>
-+ <source>For all files</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="257"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolCutMap</name>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="114"/>
-+ <source>Output filename suffix</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="133"/>
-+ <source>_cut</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="148"/>
-+ <source>Create overviews for result.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="176"/>
-+ <source>Start</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="190"/>
-+ <source>Cancel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="201"/>
-+ <source>For all files</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="226"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="236"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolExport</name>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="59"/>
-+ <location filename="../tool/IToolExport.ui" line="72"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="83"/>
-+ <source>Garmin BirdsEye (*.jnx)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="88"/>
-+ <source>TwoNav Raster (*.rmap)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="101"/>
-+ <source>not implemented yet</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="112"/>
-+ <source>Target File</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="130"/>
-+ <source>Start</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="144"/>
-+ <source>Cancel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="173"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;qmt_map2jnx&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="184"/>
-+ <source>Target Filename</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolExportJnx</name>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="35"/>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="81"/>
-+ <source>BirdsEye</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="50"/>
-+ <source>Product ID</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="57"/>
-+ <source>Copyright notice</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="64"/>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="95"/>
-+ <source>None</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="71"/>
-+ <source>Product name</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="88"/>
-+ <source>Description</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="105"/>
-+ <source>JPEG</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="133"/>
-+ <source>Quality</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="140"/>
-+ <source>Chroma subsampling</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="148"/>
-+ <source>411</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="153"/>
-+ <source>422</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="158"/>
-+ <source>444</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="169"/>
-+ <source>Device</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="184"/>
-+ <source>Z-Order</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolGrid</name>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="56"/>
-+ <source>Grid Tool</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="65"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="99"/>
-+ <source>Ok</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="110"/>
-+ <source>Cancel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="134"/>
-+ <source>Reset</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolOverviewGroupBox</name>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="14"/>
-+ <source>GroupBox</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="71"/>
-+ <source>:2</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="78"/>
-+ <source>:4</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="85"/>
-+ <source>:8</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="92"/>
-+ <source>:16</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="99"/>
-+ <source>:32</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="106"/>
-+ <source>:64</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="119"/>
-+ <source>Do not copy the overviews into the file itself. Add them as external file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="122"/>
-+ <source>Overview as external file</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolPalettize</name>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="65"/>
-+ <location filename="../tool/IToolPalettize.ui" line="78"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="96"/>
-+ <source>Single files, filename suffix</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="109"/>
-+ <source>_8bit</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="123"/>
-+ <source>Combined file, filename:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="135"/>
-+ <source>Embed result into *.vrt file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="142"/>
-+ <source>Create overviews for result.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="170"/>
-+ <source>Start</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="184"/>
-+ <source>Cancel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="213"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="223"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="233"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;qmt_rgb2pct&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="247"/>
-+ <source>Select filename</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolRefMap</name>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="113"/>
-+ <source>Output filename suffix</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="132"/>
-+ <source>_ref</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="144"/>
-+ <source>Embed result into *.vrt file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="151"/>
-+ <source>Create overviews for result.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="179"/>
-+ <source>Start</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="193"/>
-+ <source>Cancel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="204"/>
-+ <source>For all files</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="229"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="239"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="249"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IUnit</name>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="740"/>
-+ <location filename="../units/IUnit.cpp" line="746"/>
-+ <source>Error</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="740"/>
-+ <source>Bad position format. Must be: &quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot; or &quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="746"/>
-+ <source>Position values out of bounds. </source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IUnitsSetup</name>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="14"/>
-+ <source>Setup units...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="24"/>
-+ <source>Nautical</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="31"/>
-+ <source>Imperial</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="38"/>
-+ <source>Metric</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="53"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+</TS>
-diff --git a/src/qmaptool/locale/qmaptool_de.ts b/src/qmaptool/locale/qmaptool_de.ts
-new file mode 100644
-index 00000000..b3a43ef9
---- /dev/null
-+++ b/src/qmaptool/locale/qmaptool_de.ts
-@@ -0,0 +1,1712 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!DOCTYPE TS>
-+<TS version="2.0" language="de_DE">
-+<context>
-+ <name>CCanvas</name>
-+ <message>
-+ <location filename="../canvas/CCanvas.cpp" line="89"/>
-+ <source>No map view available.</source>
-+ <translation>Keine Kartenansicht verfügbar.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CCommandProcessor</name>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="31"/>
-+ <source>Print debug output to console.</source>
-+ <translation>Debuginformation in der Konsole ausgeben.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="34"/>
-+ <source>Print debug output to logfile (temp. path).</source>
-+ <translation>Debuginformation in eine Datei schreiben (temp. Pfad).</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="37"/>
-+ <source>Do not show splash screen.</source>
-+ <translation>Das Anfangsbild nicht zeigen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="40"/>
-+ <source>File with QMapTool configuration.</source>
-+ <translation>Eine Datei mit einer QMapTool-Konfiguration.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="40"/>
-+ <source>file</source>
-+ <translation>Datei</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CDialogRefPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="39"/>
-+ <source>bad coordinate</source>
-+ <translation>ungültige Koordinate</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="58"/>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="64"/>
-+ <source>Error</source>
-+ <translation>Fehler</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="58"/>
-+ <source>Bad value for X pixel.</source>
-+ <translation>Ungültiger Wert fur den X Wert des Bildpunktes.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="64"/>
-+ <source>Bad value for Y pixel.</source>
-+ <translation>Ungültiger Wert fur den Y Wert des Bildpunktes.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CDrawContextPixel</name>
-+ <message>
-+ <source>Error...</source>
-+ <translation>Fehler...</translation>
-+ </message>
-+ <message>
-+ <source>Failed to load file: %1</source>
-+ <translation>Datei laden fehlgeschlagen: %1</translation>
-+ </message>
-+ <message>
-+ <source>File must be 8 bit palette or gray indexed.</source>
-+ <translation>Die Datei muss eine 8 Bit Farbpalette haben oder einen Graustufenindex.</translation>
-+ </message>
-+ <message>
-+ <source>(color table)</source>
-+ <translation>(Farbtabelle)</translation>
-+ </message>
-+ <message>
-+ <source>(unknown)</source>
-+ <translation>(unbekannt)</translation>
-+ </message>
-+ <message>
-+ <location filename="../canvas/CDrawContextPixel.cpp" line="73"/>
-+ <source>Failed to load</source>
-+ <translation>Datei laden fehlgeschlagen</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGdalFile</name>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="52"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="65"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="95"/>
-+ <source>Error...</source>
-+ <translation>Fehler...</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="52"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="65"/>
-+ <source>Failed to load file: %1</source>
-+ <translation>Datei laden fehlgeschlagen: %1</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="95"/>
-+ <source>File must be 8 bit palette or gray indexed.</source>
-+ <translation>Die Datei muss eine 8 Bit Farbpalette haben oder einen Graustufenindex.</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="179"/>
-+ <source>(color table)</source>
-+ <translation>(Farbtabelle)</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="183"/>
-+ <source>(RGB)</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="187"/>
-+ <source>(RGBA)</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="191"/>
-+ <source>(unknown)</source>
-+ <translation>(unbekannt)</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridPlacer</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="34"/>
-+ <source>Select one of the corners and place the marker at the corresponding grid crossing on the map. All 4 corners have to be placed.</source>
-+ <translation>Wählen Sie eine Ecke aus und platzieren Sie die Markierung auf dem jeweiligen Gitterpunkt der Karte. Alle 4 Ecken müssen gesetzt werden.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="160"/>
-+ <source>Point 1 - not set</source>
-+ <translation>Punkt 1 - nicht gesetzt</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="164"/>
-+ <source>Point 1 - ok</source>
-+ <translation>Punkt 1 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="169"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="174"/>
-+ <source>Point 1 - bad</source>
-+ <translation>Punkt 1 - falsch</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="185"/>
-+ <source>Point 2 - ok</source>
-+ <translation>Punkt 2 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="190"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="195"/>
-+ <source>Point 2 - bad</source>
-+ <translation>Punkt 2 - falsch</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="207"/>
-+ <source>Point 3 - ok</source>
-+ <translation>Punkt 3 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="212"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="217"/>
-+ <source>Point 3 - bad</source>
-+ <translation>Punkt 3 - falsch</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="229"/>
-+ <source>Point 4 - ok</source>
-+ <translation>Punkt 4 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="234"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="239"/>
-+ <source>Point 4 - bad</source>
-+ <translation>Punkt 4 - falsch</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="181"/>
-+ <source>Point 2 - not set</source>
-+ <translation>Punkt 2 - nicht gesetzt</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="203"/>
-+ <source>Point 3 - not set</source>
-+ <translation>Punkt 3 - nicht gesetzt</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="225"/>
-+ <source>Point 4 - not set</source>
-+ <translation>Punkt 4 - nicht gesetzt</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridSelArea</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridSelArea.cpp" line="30"/>
-+ <source>Select the area to be covered by the calculated reference points. Simply grab the corners of the selection rectangle with a left click and place them where you want with a second click.</source>
-+ <translation>Wählen Sie das Gebiet aus, für das Referenzpunkte berechnet werden sollen. Klicken Sie dazu einfach auf die Ecken des Auswahlrechtecks mit der linken Maustaste und platzieren die Ecke wo Sie wollen mit einem zweiten Klick.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridSetRef</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridSetRef.cpp" line="37"/>
-+ <source>Valid coordinate formats: If the projection is lat/lon all values have to be in degree, e.g. &quot;48.2&quot; or &quot;12.4&quot;. For all other projections values are either in multiple of meter or feet. If you are doing it wrong the entry field will turn red.</source>
-+ <translation>Gültige Koordinatenformate: Wenn die Projektion lat/lon Werte benötigt, müssen alle Eingaben in Grad sein, z.B. &quot;48.2&quot; oder &quot;12.4&quot;. Für alle anderen Projektionen sind die Eingaben entweder in Meter oder in Fuß. Wenn etwas falsch ist, werden die Eingabefelder rot.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CItemListWidget</name>
-+ <message>
-+ <location filename="../items/CItemListWidget.cpp" line="103"/>
-+ <source>Select files...</source>
-+ <translation>Dateien auswählen...</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayCutMap</name>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="222"/>
-+ <source>Delete mask...</source>
-+ <translation>Maske löschen...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="222"/>
-+ <source>Are you sure to delete complete mask?</source>
-+ <translation>Wollen Sie wirklich die gesamte Maske löschen?</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="239"/>
-+ <source>Save mask...</source>
-+ <translation>Maske speichern...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="287"/>
-+ <source>Load mask...</source>
-+ <translation>Maske laden...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="301"/>
-+ <source>Failed...</source>
-+ <translation>Fehlgeschlagen...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="301"/>
-+ <source>Not a shape file.</source>
-+ <translation>Keine Shape-Datei.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayGridTool</name>
-+ <message>
-+ <location filename="../overlay/COverlayGridTool.cpp" line="34"/>
-+ <source>Before you proceed with &apos;ok&apos;:
-+Please cross check all data once again. A bad reference coordinate will ruin all the work. Also cross check if the selected area contains as many reference points as possible at the border. You can easily delete points outside the map in the Reference Tool. But it&apos;s much more effort to set additional points in case you miss some. When you are done press &apos;ok&apos; to transfer the derived reference points to the Reference Tool.
-+
-+The next step will be to use the Reference Tool to adjust the position of all reference points to the real grid position on the map.</source>
-+ <translation>Bevor Sie mit &apos;ok&apos; fortfahren:
-+Bitte überprüfen Sie alle Eingaben erneut. Ein falsche Referenzkoordinate ruiniert die ganze Arbeit. Überprüfen Sie bitte auch, ob das ausgewählte Gebiet an den Grenzen so viele Referenzpunkte wie möglich beinhaltet. Punkte außerhalb der Karte lassen sich recht einfach löschen. Neue Punkte hinzufügen, sollten welche fehlen, ist wesentlich aufwändiger. Wenn Sie fertig sind drücken Sie &apos;ok&apos;, um die berechneten Punkte in das Referenzwerkzeug zu übertragen.
-+
-+Im nächsten Schritte benutzen Sie das Referenzwerkzeug, um die Positionen von allen Referenzpunkten auf die tatsächlichen Gitterpunkte der Karte zu verschieben. </translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayRefMap</name>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="42"/>
-+ <source>If you used the Grid Tool you have to fine tune the reference points by placing them as much as possible on the grid crossing. Be aware that if you over scale you get jumping points by rounding effects. Be precise but do not make religion out of the task.
-+If your mouse focus is on the map you can use the N and B keys to jump forward an backward in the reference point list.
-+The is also the option to fine tune the reference points in auto-mode. In this mode the next reference point is selected automatically right after you placed the current one. This is very convenient for a large number of reference points.</source>
-+ <translation>Wenn Sie das Gitterwerkzeug benutzt haben, müssen Sie die Punkte noch justieren, indem Sie sie auf die Gitterpunkte verschieben. Seien Sie sich bewusst, dass wenn Sie besonders nahe heranzoomen, die Punkte auf Grund von Rundungseffekten springen können. Seien sie beim Positionieren exakt, aber machen Sie daraus keine Religion.
-+
-+Wenn ihr Mausfokus auf der Karte ist, können Sie die N und B Tasten benützen, um sich in der Referenzpunktliste vor und zurück zu bewegen.
-+Es gibt außerdem die Option, die Referenzpunkte im Automode zu justieren. In diesem Modus wird der nächste Referenzpunkt automatisch ausgewählt, nachdem Sie den aktuellen Punkt platziert haben. Diese Funktion ist sehr praktisch, wenn Sie eine große Anzahl an Punkten bearbeiten wollen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="614"/>
-+ <source>Save reference points...</source>
-+ <translation>Referenzpunkte speichern...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="653"/>
-+ <source>Load reference points...</source>
-+ <translation>Referenzpunkte laden...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="694"/>
-+ <source>Delete all reference points...</source>
-+ <translation>Alle Referenzpunkte löschen...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="694"/>
-+ <source>Are you sure to delete all reference points in the list?</source>
-+ <translation>Sind Sie sicher, dass Sie alle Referenzpunkte aus der Liste löschen wollen?</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="729"/>
-+ <source>Delete...</source>
-+ <translation>Löschen...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="729"/>
-+ <source>Delete all selected reference points?</source>
-+ <translation>Alle ausgewählten Referenzpunkte löschen?</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayRefMapPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/COverlayRefMapPoint.cpp" line="43"/>
-+ <source>bad coordinate</source>
-+ <translation>ungültige Koordinate</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CProjWizard</name>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="62"/>
-+ <source>north</source>
-+ <translation>Nord</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="63"/>
-+ <source>south</source>
-+ <translation>Süd</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="227"/>
-+ <source>Error...</source>
-+ <translation>Fehler...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="227"/>
-+ <source>The value
-+&apos;%1&apos;
-+is not a valid coordinate system definition:
-+%2</source>
-+ <translation>Die Eingabe
-+&apos;%1&apos;
-+ist keine gültige Koordinatensystemdefinition:
-+%2</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CSetupExtTools</name>
-+ <message>
-+ <location filename="../setup/CSetupExtTools.cpp" line="63"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="64"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="65"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="66"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="67"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="68"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;not found&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;nicht gefunden&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CSetupExtTools.cpp" line="80"/>
-+ <source>Select %1 binary...</source>
-+ <translation>Programm %1 auswählen...</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CShell</name>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="41"/>
-+ <source>Execution of external program `%1` failed: </source>
-+ <translation>Ausführen der externen Anwendung &apos;%1&apos; fehlgeschlagen:</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="45"/>
-+ <source>Process cannot be started.
-+</source>
-+ <translation>Der Prozess kann nicht gestartet werden.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="46"/>
-+ <source>Make sure the required packages are installed, `%1` exists and is executable.
-+</source>
-+ <translation>Stellen Sie sicher, dass alle benötigten Pakete installiert sind, &apos;%1&apos; vorhanden und ausführbar ist.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="50"/>
-+ <source>External process crashed.
-+</source>
-+ <translation>Der externe Prozess ist abgestürzt.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="54"/>
-+ <source>An unknown error occurred.
-+</source>
-+ <translation>Ein unbekannter Fehler ist aufgetreten.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="146"/>
-+ <source>!!! failed !!!
-+</source>
-+ <translation>!!! fehlgeschlagen !!!</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="161"/>
-+ <source>
-+Canceled by user&apos;s request.
-+</source>
-+ <translation>
-+Durch den Benutzer abgebrochen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="191"/>
-+ <source>!!! done !!!
-+</source>
-+ <translation>!!! fertig !!!</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolAddOverview</name>
-+ <message>
-+ <location filename="../tool/CToolAddOverview.cpp" line="30"/>
-+ <source>Add Overviews</source>
-+ <translation>Übersichten hinzufügen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolAddOverview.cpp" line="32"/>
-+ <source>Raster map files consume quite some memory if a larger area is displayed. Pre-calculated overview levels help to speed up loading and displaying the map. These overviews can be stored within the map file as well as an external file. GDAL can remove internally stored overviews, however it will not free the used space in the file. Therefore it&apos;s size will remain large. If you do not like that use the external option.</source>
-+ <translation>Rasterkarten benötigen recht viel Speicher, wenn ein größeres Gebiet angezeigt werden soll. Vorberechnete Übersichtsebenen helfen dabei, die Karte schnell zu laden und anzuzeigen. Diese Übersichtsebenen können in der Kartendatei oder als externe Datei gespeichert werden. GDAL kann zwar interne Übersichtsebenen entfernen, gibt dabei aber leider den Speicher nicht frei. Deswegen wird die Datei groß bleiben. Wenn Sie das nicht wünschen, dann sollten Sie die Option zur Erstellung einer externen Datei verwenden.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolCutMap</name>
-+ <message>
-+ <location filename="../tool/CToolCutMap.cpp" line="30"/>
-+ <source>Cut Map</source>
-+ <translation>Karte freistellen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolCutMap.cpp" line="32"/>
-+ <source>Paper maps usually have a border you don&apos;t want to have. To combine maps seamlessly you have to cut that border, replacing it by transparent pixel. This tool allows you to define a cut line and it will add an alpha channel for transparency to your map.</source>
-+ <translation>Papierkarten haben üblicherweise einen Rand, den man nicht dabei haben will. Um Karten blattschnittfrei zu kombinieren, muss man diesen Rand ausschneiden und durch transparente Bildpunkte ersetzen. Dieses Werkzeug ermöglicht es Ihnen, eine Schnittmaske zu erstellen, um damit einen Alphakanal mit den transparenten Bildpunkten zu erstellen. </translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolExport</name>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="30"/>
-+ <source>Export Maps</source>
-+ <translation>Karten exportieren</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="33"/>
-+ <source>To use the maps on your device you have to export them to the proprietary format supported by the device. Depending on the device this can vary from a single layer map to a map stack with maps of different scale.</source>
-+ <translation>Wenn Sie die Karten auf ihrem Gerät benützen wollen, müssen Sie diese in das jeweilige geschlossene Format. welches vom Gerät verwendet wird, exportieren. Abhängig vom Gerät kann das eine Karte mit einer einzelnen Auflösungsbene sein, oder eine mit mehreren Ebenen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="41"/>
-+ <source>Note: This tool will use all files in the list as a input. This will only work if all files have the same projection.</source>
-+ <translation>Hinweis: Dieses Werkzeug verwendet alle Dateien in der Liste als Eingabe. Das funktioniert nur, wenn alle Karten die selbe Projektion verwenden.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="136"/>
-+ <source>Select filename...</source>
-+ <translation>Dateinamen auswählen...</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolGrid</name>
-+ <message>
-+ <location filename="../tool/CToolGrid.cpp" line="37"/>
-+ <source>By placing 4 reference points at the corners of a grid square and referencing them by their top left corner, the width and height, all the other grid points can be estimated.</source>
-+ <translation>Indem Sie 4 Referenzpunkte in den Ecken eines Gitterquadrates setzen und diese über die obere linke Ecke und die Breite und Höhe referenzieren, können alle anderen Gitterpunkte ungefähr berechnet werden.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolPalettize</name>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="30"/>
-+ <source>Add Color Palette</source>
-+ <translation>Farbtabelle erzeugen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="34"/>
-+ <source>Usually you use RGBA color while referencing a map because the large color space allows you to scale and rotate the map without any loss of quality. But it results into rather large files. The file size can be optimized by using a color palette instead of the RGBA color space. The impact on quality is low as long as you do not want to scale or rotate the map. If you want to combine files with a color palette all files need to have the same palette.</source>
-+ <translation>Üblicherweise benützt man RGBA Farben während man eine Karte referenziert, weil der große Farbraum einem erlaubt, die Karte ohne Qualitätseinbuße zu drehen und zu skalieren. Leider wird deswegen auch die Datei sehr groß. Die Größe kann optimiert werden, wenn man eine Farbpalette anstelle von RGBA verwendet. Die Qualitätseinbußen sind gering, solange man die Karte nicht drehen oder skalieren möchte. Wenn Sie mehrer Karten zusammenfügen wolle, müssen alle dieselbe Palette benützen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="46"/>
-+ <source>Note: This tool will use all files in the list as a combined input to derive an optimal palette. This will only work if all files have the same projection and scale.</source>
-+ <translation>Anmerkung: Dieses Werkzeug benützt alle Dateien in der Liste als gemeinsame Eingabe, um eine optimale Palette zu berechnen. Das kann nur funktionieren, wenn alle Dateien die gleiche Projektion und Skalierung haben.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="109"/>
-+ <source>Select filename...</source>
-+ <translation>Dateinamen auswählen...</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolRefMap</name>
-+ <message>
-+ <location filename="../tool/CToolRefMap.cpp" line="34"/>
-+ <source>Reference Map</source>
-+ <translation>Karte referenzieren</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolRefMap.cpp" line="36"/>
-+ <source>A scan of a paper map can be converted to a referenced raster map if you place at least three reference points on the map. The more points the better the result. If your map has a grid you can place points on that grid with the grid tool.</source>
-+ <translation>Eine gescannte Papierkarte kann in eine referenzierte Rasterkarte umgewandelt werden, indem Sie mindestens 3 Referenzpunkte auf der Karte angeben. Je mehr Punkte Sie setzen, desto besser. Wenn ihre Karte eine Gitter besitzt, können Sie Punkte auf dem Gitter mit dem Gitterwerkzeug setzen.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IAbout</name>
-+ <message>
-+ <location filename="../IAbout.ui" line="14"/>
-+ <source>About...</source>
-+ <translation>Über...</translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="26"/>
-+ <source>&lt;b&gt;QMapTool&lt;/b&gt;, Version</source>
-+ <translation>&lt;b&gt;QMapTool&lt;/b&gt;, Version</translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="39"/>
-+ <location filename="../IAbout.ui" line="77"/>
-+ <location filename="../IAbout.ui" line="91"/>
-+ <location filename="../IAbout.ui" line="105"/>
-+ <source>TextLabel</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="70"/>
-+ <source>Qt</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="84"/>
-+ <source>GDAL</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="98"/>
-+ <source>Proj4</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="121"/>
-+ <source>This software is licensed under GPL3 or any later version</source>
-+ <translation>Diese Software steht unter der GPL3 Lizenz, oder einer neueren Version</translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="128"/>
-+ <source>© 2017 Oliver Eichler (oliver.eichler@gmx.de)</source>
-+ <translation></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ICoordFormatSetup</name>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="14"/>
-+ <source>Coordinate Format...</source>
-+ <translation>Koordinatenformat...</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="24"/>
-+ <source>N48° 53&apos; 39.6&quot; E13° 31&apos; 6.78&quot;</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="31"/>
-+ <source>N48.8943° E013.51855°</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="38"/>
-+ <source>N48° 53.660 E013° 31.113</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="53"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</source>
-+ <translation>&lt;b&gt;Anmerkung:&lt;/b&gt; Bei einigen GUI Elementen wird die Änderung erst mit einem Neustart von QMapTool übernommen.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IDialogRefPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="14"/>
-+ <source>Dialog</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="25"/>
-+ <source>Coord. Map File [pixel]</source>
-+ <translation>Koord. Karte [pixel]</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="32"/>
-+ <source>x</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="42"/>
-+ <source>y</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="49"/>
-+ <source>Coord. lat/lon WGS84 [°]</source>
-+ <translation>Koord. lat/lon WGS84 [°]</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="59"/>
-+ <source>Bad position format. Must be:
-+&quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot;
-+or
-+&quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</source>
-+ <translation>Falsches Format. Entweder:
-+&quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot;
-+oder
-+&quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridPlacer</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="150"/>
-+ <source>Reset</source>
-+ <translation>Zurücksetzen</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="224"/>
-+ <source>Set Area</source>
-+ <translation>Abdeckung</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridSelArea</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSelArea.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSelArea.ui" line="35"/>
-+ <source>TextLabel</source>
-+ <translation></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridSetRef</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="35"/>
-+ <source>Grid Projection:</source>
-+ <translation>Gitterprojektion:</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="47"/>
-+ <source>...</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="60"/>
-+ <source>TextLabel</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="72"/>
-+ <source>Easting</source>
-+ <translation>Ostwert</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="82"/>
-+ <source>Horiz. Spacing</source>
-+ <translation>horiz. Abstand</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="92"/>
-+ <source>Northing</source>
-+ <translation>Nordwert</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="102"/>
-+ <source>Vert. Spacing</source>
-+ <translation>vert. Abstand</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IItemListWidget</name>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="40"/>
-+ <source>Add map files to list</source>
-+ <translation>Kartendateien zur Liste hinzufügen</translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="43"/>
-+ <location filename="../items/IItemListWidget.ui" line="60"/>
-+ <location filename="../items/IItemListWidget.ui" line="77"/>
-+ <location filename="../items/IItemListWidget.ui" line="94"/>
-+ <source>...</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="57"/>
-+ <source>Remove selected file from the list.</source>
-+ <translation>Ausgewählte Dateien aus der Liste entfernen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="74"/>
-+ <source>Clear complete list of map files.</source>
-+ <translation>Die komplette Kartendateiliste löschen. </translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="91"/>
-+ <source>Reload the currently selected map.</source>
-+ <translation>Die aktuell ausgewählte Karte erneut laden.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IMainWindow</name>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="14"/>
-+ <source>MainWindow</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="32"/>
-+ <source>Setup</source>
-+ <translation>Einrichten</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="41"/>
-+ <source>View</source>
-+ <translation>Ansicht</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="47"/>
-+ <source>Window</source>
-+ <translation>Fenster</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="52"/>
-+ <source>?</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="67"/>
-+ <source>Tools</source>
-+ <translation>Werkzeuge</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="100"/>
-+ <source>Shell</source>
-+ <translation>Shell</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="119"/>
-+ <source>About</source>
-+ <translation>Über</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="128"/>
-+ <source>Ext. Tools</source>
-+ <translation>Ext. Werkzeuge</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="131"/>
-+ <source>Setup paths to external tools, like gdalwarp etc.</source>
-+ <translation>Pfade zu den externen Werkzeugen, wie z.B. gdalwarp, einrichten.</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="143"/>
-+ <location filename="../IMainWindow.ui" line="146"/>
-+ <source>Flip Mouse Wheel</source>
-+ <translation>Mausrad umdrehen</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="155"/>
-+ <location filename="../IMainWindow.ui" line="158"/>
-+ <source>Setup Units</source>
-+ <translation>Einheiten einrichten</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="167"/>
-+ <source>Setup Coord. Format</source>
-+ <translation>Koordinatenformat einrichten</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="170"/>
-+ <source>Change the format coordinates are displayed</source>
-+ <translation>Das Format, in dem die Koordinaten angezeigt werden, ändern</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="181"/>
-+ <source>Show Tool Help</source>
-+ <translation>Hilfstexte anzeigen</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayCutMap</name>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="35"/>
-+ <source>Just move the map and zoom.</source>
-+ <translation>Die Karte verschieben und zoomen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="58"/>
-+ <source>Add point to mask.</source>
-+ <translation>Punkte zur Maske hinzufügen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="61"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="84"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="107"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="137"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="158"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="175"/>
-+ <source>...</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="81"/>
-+ <source>Move point of mask.</source>
-+ <translation>Maskenpunkte verschieben.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="104"/>
-+ <source>Remove point from mask.</source>
-+ <translation>Punkte aus der Maske entfernen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="134"/>
-+ <source>Remove complete cut mask.</source>
-+ <translation>Die komplette Freistellmaske entfernen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="155"/>
-+ <source>Load cut mask from shape file.</source>
-+ <translation>Freistellmaske aus einer Shapedatei laden.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="172"/>
-+ <source>Save cut mask to shape file.</source>
-+ <translation>Freistellmaske in einer Shapedatei speichern.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayGridTool</name>
-+ <message>
-+ <location filename="../overlay/IOverlayGridTool.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayGridTool.ui" line="145"/>
-+ <source>do not translate</source>
-+ <translation></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayRefMap</name>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="40"/>
-+ <source>Just move the map and zoom.</source>
-+ <translation>Die Karte verschieben und zoomen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="63"/>
-+ <source>Add reference point.</source>
-+ <translation>Referenzpunkte hinzufügen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="66"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="89"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="112"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="135"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="165"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="179"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="200"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="217"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="244"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="326"/>
-+ <source>...</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="86"/>
-+ <source>Move reference point.</source>
-+ <translation>Referenzpunkte verschieben.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="109"/>
-+ <source>Remove single reference point.</source>
-+ <translation>Referenzpunkte löschen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="132"/>
-+ <source>Move reference points with auto mode. This will pickup the next point after you moved a reference point.</source>
-+ <translation>Referenzpunkte im Automode verschieben. Nachdem der aktuelle Punkt verschoben wurde, wird automatisch der Nächste genommen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="162"/>
-+ <source>Remove all reference points.</source>
-+ <translation>Alle Referenzpunkte löschen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="176"/>
-+ <source>Switch to the Grid Tool.</source>
-+ <translation>Auf das Gitterwerkzeug umschalten.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="197"/>
-+ <source>Load reference points from GCP file.</source>
-+ <translation>Referenzpunkte aus einer GCP Datei lesen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="214"/>
-+ <source>Save reference points into GCP file.</source>
-+ <translation>Referenzpunkte in eine GCP Datei speichern.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="241"/>
-+ <source>Sort list of reference points.</source>
-+ <translation>Die Liste der Referenzpunkte sortieren.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="281"/>
-+ <source>(x, y)[pixel]</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="286"/>
-+ <source>(lat, lon)[°]</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="294"/>
-+ <source>TextLabel</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="304"/>
-+ <source>Final Map Projection:</source>
-+ <translation>Endgültige Kartenprojektion:</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="316"/>
-+ <source>Enter a valid projection string. Valid strings are &quot;+proj...&quot; or &quot;+init=epsg:...&quot;.</source>
-+ <translation>Geben Sie einen gültigen Projektionstext ein. Gültige Formen sind &quot;+proj=...&quot; oder &quot;+init=...&quot;.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="323"/>
-+ <source>Start projection wizard.</source>
-+ <translation>Den Projektionsassistenten öffnen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="343"/>
-+ <source>Delete</source>
-+ <translation>Löschen</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IProjWizard</name>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="14"/>
-+ <source>Proj4 Wizard</source>
-+ <translation>Proj4 Assistent</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="29"/>
-+ <source>Mercator</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="38"/>
-+ <source>UTM</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="45"/>
-+ <source>zone</source>
-+ <translation>Zone</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="82"/>
-+ <source>user defined</source>
-+ <translation>benutzerdefiniert</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="94"/>
-+ <source>Datum</source>
-+ <translation>Datum</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="104"/>
-+ <source>World Mercator (OSM)</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="124"/>
-+ <source>Result:</source>
-+ <translation>Ergebnis:</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="138"/>
-+ <source>UPS North (North Pole)</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="145"/>
-+ <source>UPS South (South Pole)</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="152"/>
-+ <source>Projection</source>
-+ <translation>Projektion</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ISetupExtTools</name>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="14"/>
-+ <source>Setup Ext. Tools</source>
-+ <translation>Externe Werkzeuge einstellen</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="22"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="64"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="99"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="173"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="194"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="257"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;not found&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;nicht gefunden&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="32"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="53"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="74"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="88"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="135"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="149"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="183"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="211"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="225"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="239"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="264"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="275"/>
-+ <source>...</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="112"/>
-+ <source>gdal_translate:</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="43"/>
-+ <source>gdalbuildvrt</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="166"/>
-+ <source>gdaladdo:</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="125"/>
-+ <source>gdalwarp:</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="29"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="132"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="180"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="208"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="222"/>
-+ <source>Setup user defined path.</source>
-+ <translation>Benutzerdefinierten Pfad einstellen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="201"/>
-+ <source>qmt_rgb2pct</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="50"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="71"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="85"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="146"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="236"/>
-+ <source>Reset user defined path setup.</source>
-+ <translation>Benutzerdefinierten Pfad zurücksetzen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="250"/>
-+ <source>qmt_map2jnx</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="288"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; Usually QMapTool should detect all external tools by itself. If it does not, it&apos;s a bad setup and you should fix the PATH variable of your system. You can setup the paths manually, too, if you know what you are doing. But please keep in mind that GDAL needs a proper environment setup to function properly. If it&apos;s not setup properly you might get results but these can be off grid.</source>
-+ <translation>&lt;b&gt;Anmerkung:&lt;/b&gt; Normalerweise sollte QMapTool alle externen Werkzeuge selber finden. Wenn das nicht gelingt, liegt es in der Regel an einer schlechten Einstellung und Sie sollten die PATH Variable ihres Systems überprüfen. Man kann die Werkzeugpfade auch selber setzen. Vorausgesetzt, man weiß was man macht. Bitte bedenken Sie, dass GDAL eine ordentlich aufgesetzte Umgebung benötigt, um fachgerecht zu funktionieren. Wenn dem nicht so ist, können durchaus Ergebnisse erzielt werden, diese können aber verschoben sein.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ITimeZoneSetup</name>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="14"/>
-+ <source>Setup Time Zone ...</source>
-+ <translation>Zeitzone einstellen...</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="22"/>
-+ <source>UTC</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="32"/>
-+ <source>Local</source>
-+ <translation>Lokal</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="42"/>
-+ <source>Automatic</source>
-+ <translation>Automatisch</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="75"/>
-+ <source>Print date/time in </source>
-+ <translation>Datum/Zeit anzeigen im</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="82"/>
-+ <source>long format, or</source>
-+ <translation>langen Format</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="92"/>
-+ <source>short format</source>
-+ <translation>kurzen Format</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolAddOverview</name>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="119"/>
-+ <source>:2</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="126"/>
-+ <source>:4</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="133"/>
-+ <source>:8</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="140"/>
-+ <source>:16</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="147"/>
-+ <source>:32</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="154"/>
-+ <source>:64</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="164"/>
-+ <source>Remove all overview levels from map file.</source>
-+ <translation>Alle Übersichten aus der Kartendatei entfernen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="167"/>
-+ <source>Remove</source>
-+ <translation>Löschen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="174"/>
-+ <source>Do not copy the overviews into the file itself. Add them as external file.</source>
-+ <translation>Die Übersichten nicht in der Datei selbst anlegen. Als extra Datei hinzufügen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="177"/>
-+ <source>Overview as external file</source>
-+ <translation>Übersichten als externe Datei</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="207"/>
-+ <source>Start</source>
-+ <translation>Start</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="221"/>
-+ <source>Cancel</source>
-+ <translation>Abbrechen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="232"/>
-+ <source>For all files</source>
-+ <translation>Für alle Dateien</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="257"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdaladdo&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolCutMap</name>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="114"/>
-+ <source>Output filename suffix</source>
-+ <translation>Suffix der Ausgabedatei</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="133"/>
-+ <source>_cut</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="148"/>
-+ <source>Create overviews for result.</source>
-+ <translation>Übersichten für das Ergebnis erzeugen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="176"/>
-+ <source>Start</source>
-+ <translation>Start</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="190"/>
-+ <source>Cancel</source>
-+ <translation>Abbrechen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="201"/>
-+ <source>For all files</source>
-+ <translation>Für alle Dateien</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="226"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdalwarp&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="236"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdaladdo&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolExport</name>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="59"/>
-+ <location filename="../tool/IToolExport.ui" line="72"/>
-+ <source>do not translate</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="83"/>
-+ <source>Garmin BirdsEye (*.jnx)</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="88"/>
-+ <source>TwoNav Raster (*.rmap)</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="101"/>
-+ <source>not implemented yet</source>
-+ <translation>noch nicht eingebaut</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="112"/>
-+ <source>Target File</source>
-+ <translation>Zieldatei</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="130"/>
-+ <source>Start</source>
-+ <translation>Start</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="144"/>
-+ <source>Cancel</source>
-+ <translation>Abbrechen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="173"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;qmt_map2jnx&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;qmt_map2jnx&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="184"/>
-+ <source>Target Filename</source>
-+ <translation>Dateiname der Zieldatei</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolExportJnx</name>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="35"/>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="81"/>
-+ <source>BirdsEye</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="50"/>
-+ <source>Product ID</source>
-+ <translation>Produkt ID</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="57"/>
-+ <source>Copyright notice</source>
-+ <translation>Urheberhinweis</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="64"/>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="95"/>
-+ <source>None</source>
-+ <translation>Nichts</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="71"/>
-+ <source>Product name</source>
-+ <translation>Produktname</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="88"/>
-+ <source>Description</source>
-+ <translation>Beschreibung</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="105"/>
-+ <source>JPEG</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="133"/>
-+ <source>Quality</source>
-+ <translation>Qualität
-+</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="140"/>
-+ <source>Chroma subsampling</source>
-+ <translation>Halbttonunterabtastung</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="148"/>
-+ <source>411</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="153"/>
-+ <source>422</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="158"/>
-+ <source>444</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="169"/>
-+ <source>Device</source>
-+ <translation>Gerät</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="184"/>
-+ <source>Z-Order</source>
-+ <translation>Reihenfolge (Z-Achse)</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolGrid</name>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="56"/>
-+ <source>Grid Tool</source>
-+ <translation>Gitterwerkzeug</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="65"/>
-+ <source>do not translate</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="99"/>
-+ <source>Ok</source>
-+ <translation>OK</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="110"/>
-+ <source>Cancel</source>
-+ <translation>Abbrechen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="134"/>
-+ <source>Reset</source>
-+ <translation>Zurücksetzen</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolOverviewGroupBox</name>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="14"/>
-+ <source>GroupBox</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="71"/>
-+ <source>:2</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="78"/>
-+ <source>:4</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="85"/>
-+ <source>:8</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="92"/>
-+ <source>:16</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="99"/>
-+ <source>:32</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="106"/>
-+ <source>:64</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="119"/>
-+ <source>Do not copy the overviews into the file itself. Add them as external file.</source>
-+ <translation>Die Übersichten nicht in der Datei selber anlegen. Als extra Datei hinzufügen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="122"/>
-+ <source>Overview as external file</source>
-+ <translation>Übersichten als externe Datei</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolPalettize</name>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="65"/>
-+ <location filename="../tool/IToolPalettize.ui" line="78"/>
-+ <source>do not translate</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="96"/>
-+ <source>Single files, filename suffix</source>
-+ <translation>Einzelne Dateien, Dateinamensuffix</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="109"/>
-+ <source>_8bit</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="123"/>
-+ <source>Combined file, filename:</source>
-+ <translation>In einer Datei zusammenfassen, Dateiname:</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="135"/>
-+ <source>Embed result into *.vrt file.</source>
-+ <translation>Ergebnis in eine *.vrt Datei einbetten.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="142"/>
-+ <source>Create overviews for result.</source>
-+ <translation>Übersichten für das Ergebnis erzeugen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="170"/>
-+ <source>Start</source>
-+ <translation>Start</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="184"/>
-+ <source>Cancel</source>
-+ <translation>Abbrechen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="213"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdaladdo&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="223"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdal_translate&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="233"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;qmt_rgb2pct&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;qmt_rgb2pct&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="247"/>
-+ <source>Select filename</source>
-+ <translation>Dateinamen auswählen</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolRefMap</name>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="113"/>
-+ <source>Output filename suffix</source>
-+ <translation>Suffix der Ausgabedatei</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="132"/>
-+ <source>_ref</source>
-+ <translation></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="144"/>
-+ <source>Embed result into *.vrt file.</source>
-+ <translation>Ergebnis in eine *.vrt Datei einbetten.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="151"/>
-+ <source>Create overviews for result.</source>
-+ <translation>Übersichten für das Ergebnis erzeugen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="179"/>
-+ <source>Start</source>
-+ <translation>Start</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="193"/>
-+ <source>Cancel</source>
-+ <translation>Abbrechen</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="204"/>
-+ <source>For all files</source>
-+ <translation>Für alle Dateien</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="229"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdalwarp&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="239"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdal_translate&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="249"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;gdaladdo&quot;nicht gefunden. Bitte überprüfen Sie die Einstellungen!&lt;/b&gt;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IUnit</name>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="740"/>
-+ <location filename="../units/IUnit.cpp" line="746"/>
-+ <source>Error</source>
-+ <translation>Fehler</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="740"/>
-+ <source>Bad position format. Must be: &quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot; or &quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</source>
-+ <translation>Falsches Format. Entweder:
-+&quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot;
-+oder
-+&quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="746"/>
-+ <source>Position values out of bounds. </source>
-+ <translation>Positionswerte außerhalb der Grenzen. </translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IUnitsSetup</name>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="14"/>
-+ <source>Setup units...</source>
-+ <translation>Einheiten einrichten...</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="24"/>
-+ <source>Nautical</source>
-+ <translation>nautisch</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="31"/>
-+ <source>Imperial</source>
-+ <translation>imperial</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="38"/>
-+ <source>Metric</source>
-+ <translation>metrisch</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="53"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</source>
-+ <translation>&lt;b&gt;Anmerkung:&lt;/b&gt; Bei einigen GUI Elementen wird die Änderung erst mit einem Neustart von QMapTool übernommen.</translation>
-+ </message>
-+</context>
-+</TS>
-diff --git a/src/qmaptool/locale/qmaptool_es.ts b/src/qmaptool/locale/qmaptool_es.ts
-new file mode 100644
-index 00000000..4b6a5cb3
---- /dev/null
-+++ b/src/qmaptool/locale/qmaptool_es.ts
-@@ -0,0 +1,1715 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!DOCTYPE TS>
-+<TS version="2.1">
-+<context>
-+ <name>CCanvas</name>
-+ <message>
-+ <location filename="../canvas/CCanvas.cpp" line="89"/>
-+ <source>No map view available.</source>
-+ <translation>Vista de mapa no disponible.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CCommandProcessor</name>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="31"/>
-+ <source>Print debug output to console.</source>
-+ <translation>Mostrar salida de depuración en la consola.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="34"/>
-+ <source>Print debug output to logfile (temp. path).</source>
-+ <translation>Mostrar salida de depuración en archivo log (Carpeta temporal).</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="37"/>
-+ <source>Do not show splash screen.</source>
-+ <translation>No mostrar pantalla de bienvenida.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="40"/>
-+ <source>File with QMapTool configuration.</source>
-+ <translation>Archivo con la configuración de QMapTool.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CCommandProcessor.cpp" line="40"/>
-+ <source>file</source>
-+ <translation>archivo</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CDialogRefPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="39"/>
-+ <source>bad coordinate</source>
-+ <translation>Coordenada incorrecta</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="58"/>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="64"/>
-+ <source>Error</source>
-+ <translation>Error</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="58"/>
-+ <source>Bad value for X pixel.</source>
-+ <translation>Valor incorrecto para el pixel X.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CDialogRefPoint.cpp" line="64"/>
-+ <source>Bad value for Y pixel.</source>
-+ <translation>Valor incorrecto para el pixel Y.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CDrawContextPixel</name>
-+ <message>
-+ <source>Error...</source>
-+ <translation type="vanished">Error...</translation>
-+ </message>
-+ <message>
-+ <source>Failed to load file: %1</source>
-+ <translation type="vanished">Fallo al cargar el archivo: %1</translation>
-+ </message>
-+ <message>
-+ <source>File must be 8 bit palette or gray indexed.</source>
-+ <translation type="vanished">El archivo debe de tener una paleta superior a 8 bits o gris indexado.</translation>
-+ </message>
-+ <message>
-+ <source>(color table)</source>
-+ <translation type="vanished">(tabla de color)</translation>
-+ </message>
-+ <message>
-+ <source>(RGB)</source>
-+ <translation type="vanished">(RGB)</translation>
-+ </message>
-+ <message>
-+ <source>(RGBA)</source>
-+ <translation type="vanished">(RGBA)</translation>
-+ </message>
-+ <message>
-+ <source>(unknown)</source>
-+ <translation type="obsolete">(desconocido)</translation>
-+ </message>
-+ <message>
-+ <location filename="../canvas/CDrawContextPixel.cpp" line="73"/>
-+ <source>Failed to load</source>
-+ <translation>Fallo al cargar</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGdalFile</name>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="52"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="65"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="95"/>
-+ <source>Error...</source>
-+ <translation type="unfinished">Error...</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="52"/>
-+ <location filename="../helpers/CGdalFile.cpp" line="65"/>
-+ <source>Failed to load file: %1</source>
-+ <translation type="unfinished">Fallo al cargar el archivo: %1</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="95"/>
-+ <source>File must be 8 bit palette or gray indexed.</source>
-+ <translation type="unfinished">El archivo debe de tener una paleta superior a 8 bits o gris indexado.</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="179"/>
-+ <source>(color table)</source>
-+ <translation type="unfinished">(tabla de color)</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="183"/>
-+ <source>(RGB)</source>
-+ <translation type="unfinished">(RGB)</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="187"/>
-+ <source>(RGBA)</source>
-+ <translation type="unfinished">(RGBA)</translation>
-+ </message>
-+ <message>
-+ <location filename="../helpers/CGdalFile.cpp" line="191"/>
-+ <source>(unknown)</source>
-+ <translation type="unfinished">(desconocido)</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridPlacer</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="34"/>
-+ <source>Select one of the corners and place the marker at the corresponding grid crossing on the map. All 4 corners have to be placed.</source>
-+ <translation>Seleccionar una de las esquinas y colocar el marcador en el cruce de cuadrícula correspondiente en el mapa. Las 4 esquinas deben de estar colocadas.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="160"/>
-+ <source>Point 1 - not set</source>
-+ <translation>Punto 1 - no establecido</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="164"/>
-+ <source>Point 1 - ok</source>
-+ <translation>Punto 1 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="169"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="174"/>
-+ <source>Point 1 - bad</source>
-+ <translation>Punto 1 - error</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="185"/>
-+ <source>Point 2 - ok</source>
-+ <translation>Punto 2 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="190"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="195"/>
-+ <source>Point 2 - bad</source>
-+ <translation>Punto 2 - error</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="207"/>
-+ <source>Point 3 - ok</source>
-+ <translation>Punto 3 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="212"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="217"/>
-+ <source>Point 3 - bad</source>
-+ <translation>Punto 3 - error</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="229"/>
-+ <source>Point 4 - ok</source>
-+ <translation>Punto 4 - ok</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="234"/>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="239"/>
-+ <source>Point 4 - bad</source>
-+ <translation>Punto 4 - error</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="181"/>
-+ <source>Point 2 - not set</source>
-+ <translation>Punto 2 - no establecido</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="203"/>
-+ <source>Point 3 - not set</source>
-+ <translation>Punto 3 - no establecido</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridPlacer.cpp" line="225"/>
-+ <source>Point 4 - not set</source>
-+ <translation>Punto 4 - no establecido</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridSelArea</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridSelArea.cpp" line="30"/>
-+ <source>Select the area to be covered by the calculated reference points. Simply grab the corners of the selection rectangle with a left click and place them where you want with a second click.</source>
-+ <translation>Seleccionar el área cubierta por los puntos de referencia calculados. Coger las esquinas de la selección rectangular con un clic izquierdo y soltarlas en el nuevo emplazamiento con un segundo clic.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CGridSetRef</name>
-+ <message>
-+ <location filename="../overlay/gridtool/CGridSetRef.cpp" line="37"/>
-+ <source>Valid coordinate formats: If the projection is lat/lon all values have to be in degree, e.g. &quot;48.2&quot; or &quot;12.4&quot;. For all other projections values are either in multiple of meter or feet. If you are doing it wrong the entry field will turn red.</source>
-+ <translation>Formatos de coordenadas válidos: si la proyección es lat / lon, todos los valores deben estar en grados, p. &quot;48,2&quot; o &quot;12,4&quot;. Para el resto de las proyecciones, los valores están en múltiplos de metro o pies. Si te equivocas, el campo de entrada se pone rojo.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CItemListWidget</name>
-+ <message>
-+ <location filename="../items/CItemListWidget.cpp" line="103"/>
-+ <source>Select files...</source>
-+ <translation>Seleccionar archivos...</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayCutMap</name>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="222"/>
-+ <source>Delete mask...</source>
-+ <translation>Borrar máscara...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="222"/>
-+ <source>Are you sure to delete complete mask?</source>
-+ <translation>¿Estás seguro de eliminar la máscara completa?</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="239"/>
-+ <source>Save mask...</source>
-+ <translation>Guardar máscara...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="287"/>
-+ <source>Load mask...</source>
-+ <translation>Cargar máscara...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="301"/>
-+ <source>Failed...</source>
-+ <translation>Fallo...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayCutMap.cpp" line="301"/>
-+ <source>Not a shape file.</source>
-+ <translation>No es un archivo shape.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayGridTool</name>
-+ <message>
-+ <location filename="../overlay/COverlayGridTool.cpp" line="34"/>
-+ <source>Before you proceed with &apos;ok&apos;:
-+Please cross check all data once again. A bad reference coordinate will ruin all the work. Also cross check if the selected area contains as many reference points as possible at the border. You can easily delete points outside the map in the Reference Tool. But it&apos;s much more effort to set additional points in case you miss some. When you are done press &apos;ok&apos; to transfer the derived reference points to the Reference Tool.
-+
-+The next step will be to use the Reference Tool to adjust the position of all reference points to the real grid position on the map.</source>
-+ <translation>Antes de continuar pulsando &apos;ok&apos;:
-+Verificar los datos una vez más. Una coordenada errónea en la referencia arruinará todo el trabajo. Verificar también si el área seleccionada contiene tantos puntos como sea posible en el borde. Puedes eliminar puntos fácilmente fuera del mapa en la Herramienta de Referencia, pero es mas trabajoso establecer puntos adicionales en caso de que se pierda alguno. Cuando hayas terminado, pulsar &apos;ok&apos; para transferir los puntos a la Herramienta de Referencia.
-+
-+El siguiente paso será usar la herramienta de referencia para ajustar la posición de todos los puntos a la posición de la cuadrícula real del mapa.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayRefMap</name>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="42"/>
-+ <source>If you used the Grid Tool you have to fine tune the reference points by placing them as much as possible on the grid crossing. Be aware that if you over scale you get jumping points by rounding effects. Be precise but do not make religion out of the task.
-+If your mouse focus is on the map you can use the N and B keys to jump forward an backward in the reference point list.
-+The is also the option to fine tune the reference points in auto-mode. In this mode the next reference point is selected automatically right after you placed the current one. This is very convenient for a large number of reference points.</source>
-+ <translation>Si se utilizó la Herramienta de Cuadrícula, hay que ajustar los puntos de referencia colocándolos en el cruce de la cuadrícula lo máximo posible. Ten en cuenta que si sobre escalas obtendrás puntos con valores redondeados, se necesita precisión, pero tampoco es necesario exagerar.
-+Si el mapa esta en el primer plano del foco del ratón, puedes usar las teclas N y B para avanzar y retroceder en la lista de puntos de referencia.
-+También es la opción para ajustar los puntos de referencia en modo automático. En este modo, el siguiente punto de referencia se selecciona automáticamente justo después de que coloques el actual, muy conveniente cuando los puntos son muchos.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="614"/>
-+ <source>Save reference points...</source>
-+ <translation>Guardar puntos de referencia...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="653"/>
-+ <source>Load reference points...</source>
-+ <translation>Cargar puntos de referencia...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="694"/>
-+ <source>Delete all reference points...</source>
-+ <translation>Borrar todos los puntos de referencia...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="694"/>
-+ <source>Are you sure to delete all reference points in the list?</source>
-+ <translation>¿Estás seguro de borrar todos los puntos de la lista?</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="729"/>
-+ <source>Delete...</source>
-+ <translation>Borrar...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/COverlayRefMap.cpp" line="729"/>
-+ <source>Delete all selected reference points?</source>
-+ <translation>¿Borrar los puntos seleccionados?</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>COverlayRefMapPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/COverlayRefMapPoint.cpp" line="43"/>
-+ <source>bad coordinate</source>
-+ <translation>Coordenada errónea</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CProjWizard</name>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="62"/>
-+ <source>north</source>
-+ <translation>Norte</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="63"/>
-+ <source>south</source>
-+ <translation>Sur</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="227"/>
-+ <source>Error...</source>
-+ <translation>Error...</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/CProjWizard.cpp" line="227"/>
-+ <source>The value
-+&apos;%1&apos;
-+is not a valid coordinate system definition:
-+%2</source>
-+ <translation>El valor
-+&apos;%1&apos;
-+No es una definición válida del sistema de coordenadas:
-+%2</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CSetupExtTools</name>
-+ <message>
-+ <location filename="../setup/CSetupExtTools.cpp" line="63"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="64"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="65"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="66"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="67"/>
-+ <location filename="../setup/CSetupExtTools.cpp" line="68"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;not found&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;no encontrado&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/CSetupExtTools.cpp" line="80"/>
-+ <source>Select %1 binary...</source>
-+ <translation>Seleccionar %1 binario</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CShell</name>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="41"/>
-+ <source>Execution of external program `%1` failed: </source>
-+ <translation>La ejecución del programa externo `%1` falló:</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="45"/>
-+ <source>Process cannot be started.
-+</source>
-+ <translation>El proceso no se puede iniciar.
-+</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="46"/>
-+ <source>Make sure the required packages are installed, `%1` exists and is executable.
-+</source>
-+ <translation>Asegúrate de que los paquetes requeridos están instalados, `%1` existe y es ejecutable.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="50"/>
-+ <source>External process crashed.
-+</source>
-+ <translation>Proceso externo bloqueado.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="54"/>
-+ <source>An unknown error occurred.
-+</source>
-+ <translation>Ha ocurrido un error desconocido</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="146"/>
-+ <source>!!! failed !!!
-+</source>
-+ <translation>!!! falló !!!</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="161"/>
-+ <source>
-+Canceled by user&apos;s request.
-+</source>
-+ <translation>Cancelado por el usuario.</translation>
-+ </message>
-+ <message>
-+ <location filename="../shell/CShell.cpp" line="191"/>
-+ <source>!!! done !!!
-+</source>
-+ <translation>¡¡¡ hecho !!!</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolAddOverview</name>
-+ <message>
-+ <location filename="../tool/CToolAddOverview.cpp" line="30"/>
-+ <source>Add Overviews</source>
-+ <translation>Añadir niveles de zoom</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolAddOverview.cpp" line="32"/>
-+ <source>Raster map files consume quite some memory if a larger area is displayed. Pre-calculated overview levels help to speed up loading and displaying the map. These overviews can be stored within the map file as well as an external file. GDAL can remove internally stored overviews, however it will not free the used space in the file. Therefore it&apos;s size will remain large. If you do not like that use the external option.</source>
-+ <translation>Cuando el área es muy grande los archivos de los mapas raster son muy pesados. Los distintos niveles de zoom aceleran la carga y visualización. Se pueden almacenar en el mismo archivo que el mapa o en otro distinto. GDAL puede eliminar los niveles de zoom almacenados internamente pero el tamaño del archivo seguirá siendo el mismo, no así cuando se almacenan en archivo externo.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolCutMap</name>
-+ <message>
-+ <location filename="../tool/CToolCutMap.cpp" line="30"/>
-+ <source>Cut Map</source>
-+ <translation>Cortar Mapa</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolCutMap.cpp" line="32"/>
-+ <source>Paper maps usually have a border you don&apos;t want to have. To combine maps seamlessly you have to cut that border, replacing it by transparent pixel. This tool allows you to define a cut line and it will add an alpha channel for transparency to your map.</source>
-+ <translation>Los mapas en papel suelen tener un marco en blanco innecesario. Para unir mapas a la perfección, es necesario eliminar ese borde y reemplazarlo por un píxel transparente. Esta herramienta te permite definir una línea de corte y agregar un canal alfa para la transparencia del mapa.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolExport</name>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="30"/>
-+ <source>Export Maps</source>
-+ <translation>Exportar Mapas</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="33"/>
-+ <source>To use the maps on your device you have to export them to the proprietary format supported by the device. Depending on the device this can vary from a single layer map to a map stack with maps of different scale.</source>
-+ <translation>Para poder ver los mapas en tu dispositivo hay que exportarlos a un formato que este admita, puede ser necesario un mapa multicapa con distintos niveles de zoom o de una sola capa.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="41"/>
-+ <source>Note: This tool will use all files in the list as a input. This will only work if all files have the same projection.</source>
-+ <translation>Nota: Esta herramienta usa todos los archivos de la lista. Es necesario que todos tengan la misma proyección.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolExport.cpp" line="136"/>
-+ <source>Select filename...</source>
-+ <translation>Seleccionar nombre de archivo...</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolGrid</name>
-+ <message>
-+ <location filename="../tool/CToolGrid.cpp" line="37"/>
-+ <source>By placing 4 reference points at the corners of a grid square and referencing them by their top left corner, the width and height, all the other grid points can be estimated.</source>
-+ <translation>Al poner los 4 puntos de referencia en las esquinas de un cuadrado de la cuadrícula y referenciarlos en ancho y alto por su esquina superior izquierda, todos los otros puntos se pueden estimar.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolPalettize</name>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="30"/>
-+ <source>Add Color Palette</source>
-+ <translation>Añadir Paleta de Color</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="34"/>
-+ <source>Usually you use RGBA color while referencing a map because the large color space allows you to scale and rotate the map without any loss of quality. But it results into rather large files. The file size can be optimized by using a color palette instead of the RGBA color space. The impact on quality is low as long as you do not want to scale or rotate the map. If you want to combine files with a color palette all files need to have the same palette.</source>
-+ <translation>Por lo general, se utiliza color RGBA al referenciar un mapa, ya que el gran espacio de color permite escalar y rotar sin pérdida de calidad, pero los archivos resultan ser muy grandes, se puede optimizar utilizando una paleta de colores en lugar del espacio de color RGBA. El impacto en la calidad es bajo siempre y cuando no quieras escalar o rotar. Si quieres combinar archivos con paleta de colores, todos deben de tener la misma.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="46"/>
-+ <source>Note: This tool will use all files in the list as a combined input to derive an optimal palette. This will only work if all files have the same projection and scale.</source>
-+ <translation>Nota: Esta herramienta utilizará los archivos de la lista para obtener una paleta óptima. Solo funcionará si todos los archivos tienen la misma proyección y escala.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolPalettize.cpp" line="109"/>
-+ <source>Select filename...</source>
-+ <translation>Seleccionar nombre de archivo...</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>CToolRefMap</name>
-+ <message>
-+ <location filename="../tool/CToolRefMap.cpp" line="34"/>
-+ <source>Reference Map</source>
-+ <translation>Referenciar Mapa</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/CToolRefMap.cpp" line="36"/>
-+ <source>A scan of a paper map can be converted to a referenced raster map if you place at least three reference points on the map. The more points the better the result. If your map has a grid you can place points on that grid with the grid tool.</source>
-+ <translation>Un mapa de papel escaneado se puede convertir en un mapa ráster referenciado poniendo al menos tres puntos de referencia en el mapa. Cuantos más puntos, mejor es el resultado. Si el mapa tiene una cuadrícula, se pueden poner puntos en esa cuadrícula con la herramienta de cuadrícula.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IAbout</name>
-+ <message>
-+ <location filename="../IAbout.ui" line="14"/>
-+ <source>About...</source>
-+ <translation>Acerca de...</translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="26"/>
-+ <source>&lt;b&gt;QMapTool&lt;/b&gt;, Version</source>
-+ <translation>&lt;b&gt;QMapTool&lt;/b&gt;, Versión</translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="39"/>
-+ <location filename="../IAbout.ui" line="77"/>
-+ <location filename="../IAbout.ui" line="91"/>
-+ <location filename="../IAbout.ui" line="105"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="70"/>
-+ <source>Qt</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="84"/>
-+ <source>GDAL</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="98"/>
-+ <source>Proj4</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="121"/>
-+ <source>This software is licensed under GPL3 or any later version</source>
-+ <translation>Este programa está bajo licencia GPL3 o posterior</translation>
-+ </message>
-+ <message>
-+ <location filename="../IAbout.ui" line="128"/>
-+ <source>© 2017 Oliver Eichler (oliver.eichler@gmx.de)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ICoordFormatSetup</name>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="14"/>
-+ <source>Coordinate Format...</source>
-+ <translation>Formato de Coordenadas...</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="24"/>
-+ <source>N48° 53&apos; 39.6&quot; E13° 31&apos; 6.78&quot;</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="31"/>
-+ <source>N48.8943° E013.51855°</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="38"/>
-+ <source>N48° 53.660 E013° 31.113</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ICoordFormatSetup.ui" line="53"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</source>
-+ <translation>&lt;b&gt;Nota:&lt;/b&gt; El cambio de las unidades de algunos elementos no se producirá hasta el reinicio de QMapTool.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IDialogRefPoint</name>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="14"/>
-+ <source>Dialog</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="25"/>
-+ <source>Coord. Map File [pixel]</source>
-+ <translation>Coord. archivo Map [pixel]</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="32"/>
-+ <source>x</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="42"/>
-+ <source>y</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="49"/>
-+ <source>Coord. lat/lon WGS84 [°]</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IDialogRefPoint.ui" line="59"/>
-+ <source>Bad position format. Must be:
-+&quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot;
-+or
-+&quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</source>
-+ <translation>Formato de posición incorrecto. Debe ser:
-+&quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot;
-+o
-+&quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridPlacer</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="150"/>
-+ <source>Reset</source>
-+ <translation>Reiniciar</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridPlacer.ui" line="224"/>
-+ <source>Set Area</source>
-+ <translation>Establecer área</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridSelArea</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSelArea.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSelArea.ui" line="35"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IGridSetRef</name>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="35"/>
-+ <source>Grid Projection:</source>
-+ <translation>Proyección de la Cuadrícula:</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="47"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="60"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="72"/>
-+ <source>Easting</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="82"/>
-+ <source>Horiz. Spacing</source>
-+ <translation>Espaciado horizontal</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="92"/>
-+ <source>Northing</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/gridtool/IGridSetRef.ui" line="102"/>
-+ <source>Vert. Spacing</source>
-+ <translation>Espaciado vertical</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IItemListWidget</name>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="40"/>
-+ <source>Add map files to list</source>
-+ <translation>Añadir archivos de mapa a la lista</translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="43"/>
-+ <location filename="../items/IItemListWidget.ui" line="60"/>
-+ <location filename="../items/IItemListWidget.ui" line="77"/>
-+ <location filename="../items/IItemListWidget.ui" line="94"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="57"/>
-+ <source>Remove selected file from the list.</source>
-+ <translation>Borrar archivo seleccionado de la lista.</translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="74"/>
-+ <source>Clear complete list of map files.</source>
-+ <translation>Borrar lista completa de archivos de mapa.</translation>
-+ </message>
-+ <message>
-+ <location filename="../items/IItemListWidget.ui" line="91"/>
-+ <source>Reload the currently selected map.</source>
-+ <translation>Recargar mapa seleccionado.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IMainWindow</name>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="14"/>
-+ <source>MainWindow</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="32"/>
-+ <source>Setup</source>
-+ <translation>Configuración</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="41"/>
-+ <source>View</source>
-+ <translation>Ver</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="47"/>
-+ <source>Window</source>
-+ <translation>Ventana</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="52"/>
-+ <source>?</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="67"/>
-+ <source>Tools</source>
-+ <translation>Herramientas</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="100"/>
-+ <source>Shell</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="119"/>
-+ <source>About</source>
-+ <translation>Acerca de</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="128"/>
-+ <source>Ext. Tools</source>
-+ <translation>Herramientas ext.</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="131"/>
-+ <source>Setup paths to external tools, like gdalwarp etc.</source>
-+ <translation>Configurar rutas de las herramientas ext.</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="143"/>
-+ <location filename="../IMainWindow.ui" line="146"/>
-+ <source>Flip Mouse Wheel</source>
-+ <translation>Invertir rueda del ratón</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="155"/>
-+ <location filename="../IMainWindow.ui" line="158"/>
-+ <source>Setup Units</source>
-+ <translation>Configurar unidades</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="167"/>
-+ <source>Setup Coord. Format</source>
-+ <translation>Configurar formato de coordenadas</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="170"/>
-+ <source>Change the format coordinates are displayed</source>
-+ <translation>Cambiar formato de coordenadas mostrado.</translation>
-+ </message>
-+ <message>
-+ <location filename="../IMainWindow.ui" line="181"/>
-+ <source>Show Tool Help</source>
-+ <translation>Mostrar ayuda de la herramienta</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayCutMap</name>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="35"/>
-+ <source>Just move the map and zoom.</source>
-+ <translation>Solo mueve el mapa y zoom</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="58"/>
-+ <source>Add point to mask.</source>
-+ <translation>Añadir punto a la máscara.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="61"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="84"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="107"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="137"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="158"/>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="175"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="81"/>
-+ <source>Move point of mask.</source>
-+ <translation>Mover punto de la máscara.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="104"/>
-+ <source>Remove point from mask.</source>
-+ <translation>Borrar punto de la máscara.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="134"/>
-+ <source>Remove complete cut mask.</source>
-+ <translation>Borrar máscara de corte completa.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="155"/>
-+ <source>Load cut mask from shape file.</source>
-+ <translation>Cargar máscara de corte desde archivo Shape.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayCutMap.ui" line="172"/>
-+ <source>Save cut mask to shape file.</source>
-+ <translation>Guardar máscara de corte en archivo Shape.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayGridTool</name>
-+ <message>
-+ <location filename="../overlay/IOverlayGridTool.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayGridTool.ui" line="145"/>
-+ <source>do not translate</source>
-+ <translation>No traducir</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IOverlayRefMap</name>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="40"/>
-+ <source>Just move the map and zoom.</source>
-+ <translation>Solo mover mapa y zoom.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="63"/>
-+ <source>Add reference point.</source>
-+ <translation>Añadir punto de referencia.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="66"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="89"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="112"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="135"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="165"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="179"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="200"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="217"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="244"/>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="326"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="86"/>
-+ <source>Move reference point.</source>
-+ <translation>Mover punto de referencia.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="109"/>
-+ <source>Remove single reference point.</source>
-+ <translation>Borrar un punto de referencia.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="132"/>
-+ <source>Move reference points with auto mode. This will pickup the next point after you moved a reference point.</source>
-+ <translation>Mover puntos de referencia con modo auto, captará el siguiente tras el desplazamiento del anterior.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="162"/>
-+ <source>Remove all reference points.</source>
-+ <translation>Borrar todos los puntos de referencia.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="176"/>
-+ <source>Switch to the Grid Tool.</source>
-+ <translation>Cambiar a la Herramienta de cuadrícula.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="197"/>
-+ <source>Load reference points from GCP file.</source>
-+ <translation>Cargar puntos de referencia desde archivo GCP.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="214"/>
-+ <source>Save reference points into GCP file.</source>
-+ <translation>Guardar puntos de referencia en archivo GCP.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="241"/>
-+ <source>Sort list of reference points.</source>
-+ <translation>Ordenar lista de puntos de referencia</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="281"/>
-+ <source>(x, y)[pixel]</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="286"/>
-+ <source>(lat, lon)[°]</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="294"/>
-+ <source>TextLabel</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="304"/>
-+ <source>Final Map Projection:</source>
-+ <translation>Proyección final del mapa:</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="316"/>
-+ <source>Enter a valid projection string. Valid strings are &quot;+proj...&quot; or &quot;+init=epsg:...&quot;.</source>
-+ <translation>Introducir una cadena de proyección válida. Las cadenas válidas son &quot;+proj...&quot; o &quot;+init=epsg:...&quot;.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="323"/>
-+ <source>Start projection wizard.</source>
-+ <translation>Iniciar asistente de proyección.</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/IOverlayRefMap.ui" line="343"/>
-+ <source>Delete</source>
-+ <translation>Borrar</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IProjWizard</name>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="14"/>
-+ <source>Proj4 Wizard</source>
-+ <translation>Asistente de Proj4</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="29"/>
-+ <source>Mercator</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="38"/>
-+ <source>UTM</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="45"/>
-+ <source>zone</source>
-+ <translation>zona</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="82"/>
-+ <source>user defined</source>
-+ <translation>definida por el usuario</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="94"/>
-+ <source>Datum</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="104"/>
-+ <source>World Mercator (OSM)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="124"/>
-+ <source>Result:</source>
-+ <translation>Resultado:</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="138"/>
-+ <source>UPS North (North Pole)</source>
-+ <translation>UPS Norte (Polo Norte)</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="145"/>
-+ <source>UPS South (South Pole)</source>
-+ <translation>UPS Sur (Polo Sur)</translation>
-+ </message>
-+ <message>
-+ <location filename="../overlay/refmap/IProjWizard.ui" line="152"/>
-+ <source>Projection</source>
-+ <translation>Proyección</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ISetupExtTools</name>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="14"/>
-+ <source>Setup Ext. Tools</source>
-+ <translation>Configurar Herramientas Ext.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="22"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="64"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="99"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="173"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="194"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="257"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;not found&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;no encontrado&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="32"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="53"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="74"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="88"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="135"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="149"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="183"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="211"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="225"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="239"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="264"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="275"/>
-+ <source>...</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="112"/>
-+ <source>gdal_translate:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="43"/>
-+ <source>gdalbuildvrt</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="166"/>
-+ <source>gdaladdo:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="125"/>
-+ <source>gdalwarp:</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="29"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="132"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="180"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="208"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="222"/>
-+ <source>Setup user defined path.</source>
-+ <translation>Configurar ruta definida por el usuario.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="201"/>
-+ <source>qmt_rgb2pct</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="50"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="71"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="85"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="146"/>
-+ <location filename="../setup/ISetupExtTools.ui" line="236"/>
-+ <source>Reset user defined path setup.</source>
-+ <translation>Reiniciar la configuración de la ruta definida por el usuario.</translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="250"/>
-+ <source>qmt_map2jnx</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../setup/ISetupExtTools.ui" line="288"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; Usually QMapTool should detect all external tools by itself. If it does not, it&apos;s a bad setup and you should fix the PATH variable of your system. You can setup the paths manually, too, if you know what you are doing. But please keep in mind that GDAL needs a proper environment setup to function properly. If it&apos;s not setup properly you might get results but these can be off grid.</source>
-+ <translation>&lt;b&gt;Nota:&lt;/b&gt; QMapTool debería detectar todas las herramientas externas automáticamente, si no es así, es debido a una configuración errónea y hay que corregir la variable PATH del sistema. También se pueden configurar las rutas manualmente, si se sabe lo que se está haciendo, pero ten en cuenta que GDAL necesita una configuración del entorno adecuada para funcionar correctamente. Si no es correcta se pueden obtener resultados, pero pueden ser incorrectos.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>ITimeZoneSetup</name>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="14"/>
-+ <source>Setup Time Zone ...</source>
-+ <translation>Configurar Zona Horaria...</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="22"/>
-+ <source>UTC</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="32"/>
-+ <source>Local</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="42"/>
-+ <source>Automatic</source>
-+ <translation>Automática</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="75"/>
-+ <source>Print date/time in </source>
-+ <translation>Mostrar fecha y hora en </translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="82"/>
-+ <source>long format, or</source>
-+ <translation>formato largo o</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/ITimeZoneSetup.ui" line="92"/>
-+ <source>short format</source>
-+ <translation>formato corto</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolAddOverview</name>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation>no traducir</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="119"/>
-+ <source>:2</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="126"/>
-+ <source>:4</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="133"/>
-+ <source>:8</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="140"/>
-+ <source>:16</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="147"/>
-+ <source>:32</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="154"/>
-+ <source>:64</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="164"/>
-+ <source>Remove all overview levels from map file.</source>
-+ <translation>Borrar los niveles de zoom del archivo del mapa.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="167"/>
-+ <source>Remove</source>
-+ <translation>Borrar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="174"/>
-+ <source>Do not copy the overviews into the file itself. Add them as external file.</source>
-+ <translation>No copiar los niveles de zoom en el mismo archivo, hacerlo en uno externo.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="177"/>
-+ <source>Overview as external file</source>
-+ <translation>Niveles de zoom en archivo externo</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="207"/>
-+ <source>Start</source>
-+ <translation>Iniciar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="221"/>
-+ <source>Cancel</source>
-+ <translation>Cancelar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="232"/>
-+ <source>For all files</source>
-+ <translation>Para todos los archivos</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolAddOverview.ui" line="257"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;Gdaladdo&quot; no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolCutMap</name>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation>no traducir</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="114"/>
-+ <source>Output filename suffix</source>
-+ <translation>Sufijo del nombre de archivo resultante</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="133"/>
-+ <source>_cut</source>
-+ <translation>_cortar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="148"/>
-+ <source>Create overviews for result.</source>
-+ <translation>Crear niveles de zoom.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="176"/>
-+ <source>Start</source>
-+ <translation>Iniciar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="190"/>
-+ <source>Cancel</source>
-+ <translation>Cancelar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="201"/>
-+ <source>For all files</source>
-+ <translation>Para todos los archivos</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="226"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>lt;b style=&apos;color: red;&apos;&gt; &quot;Gdalwarp&quot;no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolCutMap.ui" line="236"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt; &quot;Gdaladdo&quot;no encontrado ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolExport</name>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="59"/>
-+ <location filename="../tool/IToolExport.ui" line="72"/>
-+ <source>do not translate</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="83"/>
-+ <source>Garmin BirdsEye (*.jnx)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="88"/>
-+ <source>TwoNav Raster (*.rmap)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="101"/>
-+ <source>not implemented yet</source>
-+ <translation>Todavía no implementado</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="112"/>
-+ <source>Target File</source>
-+ <translation>Archivo de destino</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="130"/>
-+ <source>Start</source>
-+ <translation>Iniciar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="144"/>
-+ <source>Cancel</source>
-+ <translation>Cancelar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="173"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;qmt_map2jnx&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;qmt_map2jnx&quot; No encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolExport.ui" line="184"/>
-+ <source>Target Filename</source>
-+ <translation>Nombre del archivo de destino</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolExportJnx</name>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="35"/>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="81"/>
-+ <source>BirdsEye</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="50"/>
-+ <source>Product ID</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="57"/>
-+ <source>Copyright notice</source>
-+ <translation>Aviso de copyright</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="64"/>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="95"/>
-+ <source>None</source>
-+ <translation>Ninguno</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="71"/>
-+ <source>Product name</source>
-+ <translation>Nombre del producto</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="88"/>
-+ <source>Description</source>
-+ <translation type="unfinished">Descripción</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="105"/>
-+ <source>JPEG</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="133"/>
-+ <source>Quality</source>
-+ <translation>Calidad</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="140"/>
-+ <source>Chroma subsampling</source>
-+ <translation>Submuestreo de Chroma</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="148"/>
-+ <source>411</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="153"/>
-+ <source>422</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="158"/>
-+ <source>444</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="169"/>
-+ <source>Device</source>
-+ <translation>Dispositivo</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/export/IToolExportJnx.ui" line="184"/>
-+ <source>Z-Order</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolGrid</name>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="56"/>
-+ <source>Grid Tool</source>
-+ <translation>Herramienta Cuadrícula</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="65"/>
-+ <source>do not translate</source>
-+ <translation>no traducir</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="99"/>
-+ <source>Ok</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="110"/>
-+ <source>Cancel</source>
-+ <translation>Cancelar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolGrid.ui" line="134"/>
-+ <source>Reset</source>
-+ <translation>Reiniciar</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolOverviewGroupBox</name>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="14"/>
-+ <source>GroupBox</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="71"/>
-+ <source>:2</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="78"/>
-+ <source>:4</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="85"/>
-+ <source>:8</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="92"/>
-+ <source>:16</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="99"/>
-+ <source>:32</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="106"/>
-+ <source>:64</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="119"/>
-+ <source>Do not copy the overviews into the file itself. Add them as external file.</source>
-+ <translation>No copiar los niveles de zoom en el mismo archivo, hacerlo en uno externo.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolOverviewGroupBox.ui" line="122"/>
-+ <source>Overview as external file</source>
-+ <translation>Niveles de zoom en archivo externo</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolPalettize</name>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="65"/>
-+ <location filename="../tool/IToolPalettize.ui" line="78"/>
-+ <source>do not translate</source>
-+ <translation>no traducir</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="96"/>
-+ <source>Single files, filename suffix</source>
-+ <translation>Archivos individuales, sufijo del nombre</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="109"/>
-+ <source>_8bit</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="123"/>
-+ <source>Combined file, filename:</source>
-+ <translation>Archivo combinado, nombre:</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="135"/>
-+ <source>Embed result into *.vrt file.</source>
-+ <translation>Insertar el resultado en un archivo *.vrt.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="142"/>
-+ <source>Create overviews for result.</source>
-+ <translation>Crear niveles de zoom.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="170"/>
-+ <source>Start</source>
-+ <translation>Iniciar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="184"/>
-+ <source>Cancel</source>
-+ <translation>Cancelar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="213"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;Gdaladdo&quot; no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="223"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;Gdal_translate&quot; no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="233"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;qmt_rgb2pct&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;Qmt_rgb2pct&quot; no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolPalettize.ui" line="247"/>
-+ <source>Select filename</source>
-+ <translation>Seleccionar nombre de archivo</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IToolRefMap</name>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="14"/>
-+ <source>Form</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="59"/>
-+ <source>do not translate</source>
-+ <translation>no traducir</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="113"/>
-+ <source>Output filename suffix</source>
-+ <translation>Sufijo del nombre de archivo</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="132"/>
-+ <source>_ref</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="144"/>
-+ <source>Embed result into *.vrt file.</source>
-+ <translation>Insertar resultado en archivo *.vrt.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="151"/>
-+ <source>Create overviews for result.</source>
-+ <translation>Crear niveles de zoom.</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="179"/>
-+ <source>Start</source>
-+ <translation>Iniciar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="193"/>
-+ <source>Cancel</source>
-+ <translation>Cancelar</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="204"/>
-+ <source>For all files</source>
-+ <translation>Para todos los archivos</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="229"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;Gdalwarp&quot; no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="239"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;Gdal_translate&quot; no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+ <message>
-+ <location filename="../tool/IToolRefMap.ui" line="249"/>
-+ <source>&lt;b style=&apos;color: red;&apos;&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</source>
-+ <translation>&lt;b style=&apos;color: red;&apos;&gt;&quot;Gdaladdo&quot; no encontrado. ¡Comprobar la configuración!&lt;/b&gt;</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IUnit</name>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="740"/>
-+ <location filename="../units/IUnit.cpp" line="746"/>
-+ <source>Error</source>
-+ <translation>Error</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="740"/>
-+ <source>Bad position format. Must be: &quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot; or &quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</source>
-+ <translation>Formato de posición incorrecto. Debe ser: &quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot; or &quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnit.cpp" line="746"/>
-+ <source>Position values out of bounds. </source>
-+ <translation>Valores de posición fuera de los límites.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>IUnitsSetup</name>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="14"/>
-+ <source>Setup units...</source>
-+ <translation>Configurar unidades...</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="24"/>
-+ <source>Nautical</source>
-+ <translation>Náutico</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="31"/>
-+ <source>Imperial</source>
-+ <translation>Imperial</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="38"/>
-+ <source>Metric</source>
-+ <translation>Métrico</translation>
-+ </message>
-+ <message>
-+ <location filename="../units/IUnitsSetup.ui" line="53"/>
-+ <source>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</source>
-+ <translation>&lt;b&gt;Nota:&lt;/b&gt; El cambio de las unidades de algunos elementos no se producirá hasta el reinicio de QMapTool.</translation>
-+ </message>
-+</context>
-+</TS>
-diff --git a/src/qmaptool/main.cpp b/src/qmaptool/main.cpp
-new file mode 100644
-index 00000000..2d23b037
---- /dev/null
-+++ b/src/qmaptool/main.cpp
-@@ -0,0 +1,76 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "CSingleInstanceProxy.h"
-+#include "setup/IAppSetup.h"
-+#include "version.h"
-+
-+#include <QApplication>
-+#include <QtWidgets>
-+
-+int main(int argc, char ** argv)
-+{
-+ QApplication app(argc, argv);
-+
-+ QCoreApplication::setApplicationName("QMapTool");
-+ QCoreApplication::setOrganizationName("QLandkarte");
-+ QCoreApplication::setOrganizationDomain("qlandkarte.org");
-+
-+ IAppSetup& env = IAppSetup::createInstance(qApp);
-+ env.processArguments();
-+ env.initLogHandler();
-+ env.initQMapTool();
-+
-+ // make sure this is the one and only instance on the system
-+ CSingleInstanceProxy s(qlOpts->arguments);
-+
-+ QSplashScreen *splash = nullptr;
-+ if (!qlOpts->nosplash)
-+ {
-+ QPixmap pic(":/pic/splash.png");
-+ QPainter p(&pic);
-+ QFont f = p.font();
-+ f.setBold(true);
-+
-+ p.setPen(Qt::black);
-+ p.setFont(f);
-+ p.drawText(260,195,"QMapTool, V " VER_STR);
-+
-+ splash = new QSplashScreen(pic);
-+#ifdef Q_OS_MAC
-+ // remove the splash screen flag on OS-X as workaround for the reported bug
-+ // https://bugreports.qt.io/browse/QTBUG-49576
-+ splash->setWindowFlags(splash->windowFlags() & (~Qt::SplashScreen));
-+#endif
-+ splash->show();
-+ }
-+
-+ CMainWindow w;
-+ w.show();
-+
-+ if(nullptr != splash)
-+ {
-+ splash->finish(&w);
-+ delete splash;
-+ }
-+
-+ return app.exec();
-+}
-+
-+
-diff --git a/src/qmaptool/overlay/COverlayCutMap.cpp b/src/qmaptool/overlay/COverlayCutMap.cpp
-new file mode 100644
-index 00000000..ec64e12a
---- /dev/null
-+++ b/src/qmaptool/overlay/COverlayCutMap.cpp
-@@ -0,0 +1,644 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "helpers/CDraw.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemCutMap.h"
-+#include "overlay/COverlayCutMap.h"
-+
-+#include <functional>
-+#include <QtWidgets>
-+using std::bind;
-+
-+static inline qreal sqr(qreal a)
-+{
-+ return a*a;
-+}
-+
-+static inline qreal sqrlen(const QPointF &a)
-+{
-+ return sqr(a.x()) + sqr(a.y());
-+}
-+
-+
-+COverlayCutMap::COverlayCutMap(CItemCutMap *item, QStackedWidget *stackedWidget)
-+ : IOverlay(stackedWidget)
-+ , context(item->getDrawContext())
-+{
-+ setupUi(this);
-+
-+ QFileInfo fi(item->getFilename());
-+ shapeFilename = fi.completeBaseName() + ".shp";
-+
-+ connect(toolNone, &QToolButton::clicked, this, bind(&COverlayCutMap::slotSetMode, this, eModeNone, std::placeholders::_1));
-+ connect(toolPointMove, &QToolButton::clicked, this, bind(&COverlayCutMap::slotSetMode, this, eModePointMove, std::placeholders::_1));
-+ connect(toolPointAdd, &QToolButton::clicked, this, bind(&COverlayCutMap::slotSetMode, this, eModePointAdd, std::placeholders::_1));
-+ connect(toolPointDel, &QToolButton::clicked, this, bind(&COverlayCutMap::slotSetMode, this, eModePointDel, std::placeholders::_1));
-+ connect(toolPointDelAll, &QToolButton::clicked, this, &COverlayCutMap::slotResetMask);
-+ connect(toolLoadShape, &QToolButton::clicked, this, &COverlayCutMap::slotLoadShape);
-+ connect(toolSaveShape, &QToolButton::clicked, this, &COverlayCutMap::slotSaveShape);
-+}
-+
-+void COverlayCutMap::saveSettings(QSettings& cfg)
-+{
-+ cfg.setValue("region", region);
-+}
-+
-+void COverlayCutMap::loadSettings(QSettings& cfg)
-+{
-+ region = (cfg.value("region", QPolygonF()).value<QPolygonF>());
-+
-+ updateGui();
-+}
-+
-+
-+bool COverlayCutMap::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ if(region.isEmpty())
-+ {
-+ return true;
-+ }
-+
-+ QPolygonF shape = region;
-+ context->convertMap2Screen(shape);
-+
-+ if(shape.size() > 2)
-+ {
-+ QPainterPath path;
-+
-+ QRectF rectMap = context->getMapArea();
-+ context->convertMap2Screen(rectMap);
-+
-+ path.addRect(rectMap);
-+ path.addPolygon(shape);
-+
-+ p.setPen(QPen(Qt::darkBlue,1));
-+
-+ p.setBrush((idxFocus1 == NOIDX) ? Qt::BDiagPattern : Qt::NoBrush);
-+ p.drawPath(path);
-+ }
-+
-+ QRectF dot1(0,0,5,5);
-+ QRectF dot2(0,0,7,7);
-+ const QPointF& pt1 = idxFocus1 != NOIDX ? shape[idxFocus1] : NOPOINTF;
-+ const QPointF& pt2 = idxFocus2 != NOIDX ? shape[idxFocus2] : NOPOINTF;
-+
-+ // draw black dots for each point in region
-+ p.setPen(QPen(Qt::black, 1));
-+ p.setBrush(Qt::black);
-+ for(const QPointF& pt : shape)
-+ {
-+ if(pt == pt1)
-+ {
-+ continue;
-+ }
-+ dot1.moveCenter(pt);
-+ p.drawRect(dot1);
-+ }
-+
-+ // if just one dot is selected draw crosshair
-+ if((idxFocus2 == NOIDX) && (idxFocus1 != NOIDX))
-+ {
-+ CDraw::drawCrossHairDot(p, pt1);
-+ }
-+ else if((idxFocus2 != NOIDX) && (idxFocus1 == NOIDX))
-+ {
-+ CDraw::drawCrossHairDot(p, pt2);
-+ }
-+ // if both points are selected highlight segment
-+ else if((idxFocus2 != NOIDX) && (idxFocus1 != NOIDX))
-+ {
-+ p.setPen(QPen(Qt::red, 2));
-+ p.setBrush(Qt::red);
-+
-+ dot2.moveCenter(pt1);
-+ p.drawRect(dot2);
-+ dot2.moveCenter(pt2);
-+ p.drawRect(dot2);
-+ p.drawLine(pt1, pt2);
-+ }
-+ return true;
-+}
-+
-+void COverlayCutMap::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ QPointF pt = e->pos();
-+ context->convertScreen2Map(pt);
-+
-+ switch(mode)
-+ {
-+ case eModePointMove:
-+ mouseMovePointMove(pt);
-+ break;
-+
-+ case eModePointAdd:
-+ mouseMovePointAdd(pt);
-+ break;
-+
-+ case eModePointDel:
-+ mouseMovePointDel(pt);
-+ break;
-+
-+ default:
-+ return;
-+ }
-+
-+ updateGui();
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void COverlayCutMap::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ QPointF pt = e->pos();
-+ context->convertScreen2Map(pt);
-+
-+ Qt::MouseButton button = e->button();
-+
-+ switch(mode)
-+ {
-+ case eModePointMove:
-+ mouseReleasePointMove(pt, button);
-+ break;
-+
-+ case eModePointAdd:
-+ mouseReleasePointAdd(pt, button);
-+ break;
-+
-+ case eModePointDel:
-+ mouseReleasePointDel(pt, button);
-+ break;
-+
-+ default:
-+ return;
-+ }
-+
-+ updateGui();
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+QCursor COverlayCutMap::getCursorFx()
-+{
-+ switch(mode)
-+ {
-+ case eModePointAdd:
-+ return QCursor(QPixmap(":/cursors/cursorPointAdd.png"), 0, 0);
-+
-+ case eModePointDel:
-+ return QCursor(QPixmap(":/cursors/cursorPointDel.png"), 0, 0);
-+
-+ case eModePointMove:
-+ return QCursor(QPixmap(":/cursors/cursorPointMove.png"), 0, 0);
-+ }
-+
-+ return Qt::ArrowCursor;
-+}
-+
-+void COverlayCutMap::slotSetMode(mode_e m, bool on)
-+{
-+ if(on)
-+ {
-+ mode = m;
-+ }
-+}
-+
-+void COverlayCutMap::slotResetMask()
-+{
-+ int res = QMessageBox::question(this, tr("Delete mask..."), tr("Are you sure to delete complete mask?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
-+ if(res != QMessageBox::Yes)
-+ {
-+ return;
-+ }
-+
-+ mouseReset();
-+ region.clear();
-+ storeToHistory(region);
-+ updateGui();
-+}
-+
-+void COverlayCutMap::slotSaveShape()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/shapeInput", QDir::homePath()).toString();
-+
-+ QString filename = QFileDialog::getSaveFileName(&CMainWindow::self(), tr("Save mask..."), path + "/" + shapeFilename, "Shape file (*.shp)");
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+ cfg.setValue("Path/shapeInput", QFileInfo(shapeFilename).absolutePath());
-+
-+ if(region.isEmpty())
-+ {
-+ return;
-+ }
-+ shapeFilename = filename;
-+ saveShape(filename);
-+}
-+
-+void COverlayCutMap::saveShape(const QString& filename)
-+{
-+ const QPolygonF& line = region;
-+
-+ QFile file(filename);
-+ file.open(QIODevice::WriteOnly);
-+ QTextStream out(&file);
-+
-+ out << "id,WKT" << endl;
-+ out << "1,\"POLYGON((";
-+
-+ bool first = true;
-+ for(const QPointF& pt : line)
-+ {
-+ QPointF pt1 = pt;
-+ context->convertMap2Coord(pt1);
-+
-+ if(!first)
-+ {
-+ out << ", ";
-+ }
-+ first = false;
-+
-+ out << qRound(pt1.x()) << " " << qRound(pt1.y());
-+ }
-+ out << "))\"" << endl;
-+}
-+
-+void COverlayCutMap::slotLoadShape()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/shapeInput", QDir::homePath()).toString();
-+
-+ QString filename = QFileDialog::getOpenFileName(&CMainWindow::self(), tr("Load mask..."), path, "Shape file (*.shp)");
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+ cfg.setValue("Path/shapeInput", QFileInfo(filename).absolutePath());
-+
-+ QFile file(filename);
-+ file.open(QIODevice::ReadOnly);
-+ QTextStream in(&file);
-+
-+ QString line = in.readLine().simplified();
-+ if(line != "id,WKT")
-+ {
-+ QMessageBox::warning(&CMainWindow::self(), tr("Failed..."), tr("Not a shape file."), QMessageBox::Abort);
-+ return;
-+ }
-+
-+ while(!in.atEnd())
-+ {
-+ QString line = in.readLine().simplified();
-+ if(line.startsWith("1,\"POLYGON(("))
-+ {
-+ region.clear();
-+
-+ line = line.mid(12);
-+ QTextStream in2(&line, QIODevice::ReadOnly);
-+
-+ while(!in2.atEnd())
-+ {
-+ qreal x, y;
-+ in2 >> x >> y;
-+
-+ QPointF pt(x,y);
-+ context->convertCoord2Map(pt);
-+
-+ region << pt;
-+
-+ QString str;
-+ in2 >> str;
-+ if(str != ",")
-+ {
-+ break;
-+ }
-+ }
-+ }
-+ }
-+
-+ updateGui();
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+ emit sigChanged();
-+}
-+
-+void COverlayCutMap::mouseReset()
-+{
-+ addPoint = false;
-+ movePoint = false;
-+ idxFocus1 = NOIDX;
-+ idxFocus1 = NOIDX;
-+}
-+
-+void COverlayCutMap::abortStep()
-+{
-+ if(addPoint)
-+ {
-+ restoreFromHistory(region);
-+ addPoint = false;
-+ idxFocus1 = NOIDX;
-+ idxFocus2 = NOIDX;
-+ }
-+ else if(movePoint)
-+ {
-+ restoreFromHistory(region);
-+ movePoint = false;
-+ idxFocus1 = NOIDX;
-+ }
-+
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void COverlayCutMap::restoreFromHistory(QPolygonF& line)
-+{
-+ line = history[idxHistory];
-+ emit sigChanged();
-+}
-+
-+void COverlayCutMap::storeToHistory(const QPolygonF& line)
-+{
-+ // crop history if necessary
-+ if(idxHistory != NOIDX)
-+ {
-+ while(history.size() > (idxHistory + 1))
-+ {
-+ history.pop_back();
-+ }
-+ }
-+
-+ history << line;
-+ idxHistory = history.size() - 1;
-+
-+ emit sigChanged();
-+}
-+
-+void COverlayCutMap::isCloseTo(QPointF pt, QPolygonF line, qint32& idx) const
-+{
-+ idx = NOIDX;
-+
-+ context->convertMap2Screen(pt);
-+ context->convertMap2Screen(line);
-+
-+ if(line.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ qint32 min = 30;
-+ const int N = region.size();
-+ for(int i = 0; i < N; i++)
-+ {
-+ qint32 d = (pt - line[i]).manhattanLength();
-+ if(d < min)
-+ {
-+ min = d;
-+ idx = i;
-+ }
-+ }
-+}
-+
-+void COverlayCutMap::isCloseToLine(QPointF pt, QPolygonF line, qint32& idx1, qint32& idx2) const
-+{
-+ idx1 = NOIDX;
-+ idx2 = NOIDX;
-+
-+ context->convertMap2Screen(pt);
-+ context->convertMap2Screen(line);
-+
-+ const int count = line.size();
-+ if(count < 2)
-+ {
-+ return;
-+ }
-+
-+ QPointF b = line[0];
-+ QPointF dbq = b - pt;
-+ qreal dist = 30*30;
-+
-+ for (qint32 i = 1; i < count; ++i)
-+ {
-+ const QPointF a = b;
-+ const QPointF daq = dbq;
-+ b = line[i];
-+ dbq = b - pt;
-+
-+ const QPointF dab = a - b;
-+
-+ const qreal inv_sqrlen = 1./sqrlen(dab);
-+ const qreal t = (dab.x()*daq.x() + dab.y()*daq.y())*inv_sqrlen;
-+ if (t < 0.)
-+ {
-+ continue;
-+ }
-+ qreal current_dist;
-+ if (t <= 1.)
-+ {
-+ current_dist = sqr(dab.x()*dbq.y() - dab.y()*dbq.x())*inv_sqrlen;
-+ }
-+ else//t>1.
-+ {
-+ current_dist = sqrlen(dbq);
-+ }
-+
-+ if (current_dist < dist)
-+ {
-+ dist = current_dist;
-+ idx1 = i - 1;
-+ idx2 = i;
-+ }
-+ }
-+}
-+
-+
-+void COverlayCutMap::mouseMovePointAdd(const QPointF &pt)
-+{
-+ if(region.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ if(addPoint)
-+ {
-+ region[idxFocus1] = pt;
-+ }
-+ else
-+ {
-+ // find line segment close to cursor
-+ isCloseToLine(pt, region, idxFocus1, idxFocus2);
-+ }
-+}
-+
-+void COverlayCutMap::mouseReleasePointAdd(const QPointF &pt, Qt::MouseButton button)
-+{
-+ if(button == Qt::LeftButton)
-+ {
-+ if(addPoint)
-+ {
-+ // if isPoint is true the line has been appended/prepended
-+ // in this case go on with adding another point
-+ if(idxFocus1 == (region.size() - 1))
-+ {
-+ idxFocus1++;
-+ }
-+ // store current state of line to undo/redo history
-+ storeToHistory(region);
-+ region.insert(idxFocus1, pt);
-+ }
-+ else if(idxFocus1 != NOIDX)
-+ {
-+ // add a new point to line segment
-+ idxFocus2 = NOIDX;
-+ idxFocus1++;
-+ region.insert(idxFocus1, pt);
-+ addPoint = true;
-+ CCanvas::setOverrideCursor(Qt::BlankCursor, "COverlayCutMap::mouseReleasePointAdd");
-+ }
-+ else if(region.isEmpty())
-+ {
-+ region.append(pt);
-+ storeToHistory(region);
-+ region.append(pt);
-+ region.append(pt);
-+ idxFocus1 = 1;
-+ addPoint = true;
-+ CCanvas::setOverrideCursor(Qt::BlankCursor, "COverlayCutMap::mouseReleasePointAdd");
-+ }
-+ }
-+ else if(button == Qt::RightButton)
-+ {
-+ CCanvas::restoreOverrideCursor("COverlayCutMap::mouseReleasePointAdd");
-+ if(!addPoint)
-+ {
-+ toolNone->click();
-+ }
-+ abortStep();
-+ }
-+}
-+
-+void COverlayCutMap::mouseMovePointDel(const QPointF &pt)
-+{
-+ isCloseTo(pt, region, idxFocus1);
-+}
-+
-+void COverlayCutMap::mouseReleasePointDel(const QPointF &pt, Qt::MouseButton button)
-+{
-+ if((idxFocus1 != NOIDX) && (button == Qt::LeftButton))
-+ {
-+ //special case first or last point.
-+ if((idxFocus1 == 0) || (idxFocus1 == (region.size() - 1)))
-+ {
-+ if(region.size() > 2)
-+ {
-+ // more than one point set
-+ region.pop_back();
-+ region.pop_front();
-+ }
-+ else
-+ {
-+ // remove last point
-+ region.clear();
-+ }
-+
-+ // close polygon area by appending the first point
-+ if(!region.isEmpty())
-+ {
-+ region << region.first();
-+ }
-+ }
-+ else
-+ {
-+ region.remove(idxFocus1);
-+ }
-+ storeToHistory(region);
-+ }
-+ else if(button == Qt::RightButton)
-+ {
-+ CCanvas::restoreOverrideCursor("COverlayCutMap::mouseReleasePointDel");
-+ toolNone->click();
-+ }
-+ idxFocus1 = NOIDX;
-+}
-+
-+void COverlayCutMap::mouseMovePointMove(const QPointF &pt)
-+{
-+ if(movePoint)
-+ {
-+ if((idxFocus1 == 0) || (idxFocus1 == (region.size() - 1)))
-+ {
-+ region.first() = pt;
-+ region.last() = pt;
-+ }
-+ else
-+ {
-+ region[idxFocus1] = pt;
-+ }
-+ }
-+ else
-+ {
-+ // no point selected yet, find point to highlight
-+ isCloseTo(pt, region, idxFocus1);
-+ }
-+}
-+
-+void COverlayCutMap::mouseReleasePointMove(const QPointF &pt, Qt::MouseButton button)
-+{
-+ if(button == Qt::LeftButton)
-+ {
-+ if(movePoint)
-+ {
-+ // terminate moving the point
-+ movePoint = false;
-+ // store new state of line to undo/redo history
-+ storeToHistory(region);
-+ CCanvas::restoreOverrideCursor("COverlayCutMap::mouseReleasePointAdd");
-+ }
-+ else if(idxFocus1 != NOIDX)
-+ {
-+ if((idxFocus1 == 0) || (idxFocus1 == (region.size() - 1)))
-+ {
-+ region.first() = pt;
-+ region.last() = pt;
-+ }
-+ else
-+ {
-+ region[idxFocus1] = pt;
-+ }
-+
-+ movePoint = true;
-+ CCanvas::setOverrideCursor(Qt::BlankCursor, "COverlayCutMap::mouseReleasePointMove");
-+ }
-+ }
-+ else if(button == Qt::RightButton)
-+ {
-+ CCanvas::restoreOverrideCursor("COverlayCutMap::mouseReleasePointMove");
-+ if(!movePoint)
-+ {
-+ toolNone->click();
-+ }
-+ abortStep();
-+ }
-+}
-+
-+void COverlayCutMap::updateGui()
-+{
-+ bool enable = !region.isEmpty();
-+ toolPointMove->setEnabled(enable);
-+ toolPointDel->setEnabled(enable);
-+ toolPointDelAll->setEnabled(enable);
-+ toolSaveShape->setEnabled(enable);
-+}
-diff --git a/src/qmaptool/overlay/COverlayCutMap.h b/src/qmaptool/overlay/COverlayCutMap.h
-new file mode 100644
-index 00000000..8938f006
---- /dev/null
-+++ b/src/qmaptool/overlay/COverlayCutMap.h
-@@ -0,0 +1,105 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef COVERLAYCUTMAP_H
-+#define COVERLAYCUTMAP_H
-+
-+#include "canvas/CCanvas.h"
-+#include "overlay/IOverlay.h"
-+#include "ui_IOverlayCutMap.h"
-+#include "units/IUnit.h"
-+
-+
-+class QStackedWidget;
-+class IDrawContext;
-+class QSettings;
-+class CItemCutMap;
-+
-+class COverlayCutMap : public IOverlay, private Ui::IOverlayCutMap
-+{
-+ Q_OBJECT
-+public:
-+ COverlayCutMap(CItemCutMap *item, QStackedWidget * stackedWidget);
-+ virtual ~COverlayCutMap() = default;
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw);
-+ void mouseMoveEventFx(QMouseEvent *e);
-+ void mouseReleaseEventFx(QMouseEvent *e);
-+ QCursor getCursorFx();
-+
-+ void abortStep();
-+
-+ enum mode_e
-+ {
-+ eModeNone
-+ ,eModePointMove
-+ ,eModePointAdd
-+ ,eModePointDel
-+ };
-+
-+ void saveShape(const QString& filename);
-+
-+ bool isOk() const
-+ {
-+ return !region.isEmpty();
-+ }
-+
-+private slots:
-+ void slotSetMode(mode_e m, bool on);
-+ void slotResetMask();
-+ void slotSaveShape();
-+ void slotLoadShape();
-+
-+private:
-+ void restoreFromHistory(QPolygonF& line);
-+ void storeToHistory(const QPolygonF& line);
-+ void isCloseTo(QPointF pt, QPolygonF line, qint32& idx) const;
-+ void isCloseToLine(QPointF pt, QPolygonF line, qint32 &idx1, qint32 &idx2) const;
-+ void mouseReset();
-+
-+ void mouseMovePointAdd(const QPointF &pt);
-+ void mouseMovePointDel(const QPointF &pt);
-+ void mouseMovePointMove(const QPointF &pt);
-+
-+ void mouseReleasePointAdd(const QPointF &pt, Qt::MouseButton button);
-+ void mouseReleasePointDel(const QPointF &pt, Qt::MouseButton button);
-+ void mouseReleasePointMove(const QPointF &pt, Qt::MouseButton button);
-+
-+ void updateGui();
-+
-+ IDrawContext* context;
-+
-+ mode_e mode = eModeNone;
-+ QPolygonF region;
-+
-+ qint32 idxFocus1 = NOIDX;
-+ qint32 idxFocus2 = NOIDX;
-+ bool addPoint = false;
-+ bool movePoint = false;
-+
-+ QList<QPolygonF> history;
-+ qint32 idxHistory = NOIDX;
-+
-+ QString shapeFilename;
-+};
-+
-+#endif //COVERLAYCUTMAP_H
-+
-diff --git a/src/qmaptool/overlay/COverlayGridTool.cpp b/src/qmaptool/overlay/COverlayGridTool.cpp
-new file mode 100644
-index 00000000..7a0fa26e
---- /dev/null
-+++ b/src/qmaptool/overlay/COverlayGridTool.cpp
-@@ -0,0 +1,348 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "CMainWindow.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemRefMap.h"
-+#include "overlay/COverlayGridTool.h"
-+#include "overlay/refmap/COverlayRefMapPoint.h"
-+#include "overlay/refmap/CProjWizard.h"
-+
-+#include <proj_api.h>
-+#include <QtWidgets>
-+
-+COverlayGridTool::COverlayGridTool(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setupUi(this);
-+ labelFinal->setText(tr("Before you proceed with 'ok':\n"
-+ "Please cross check all data once again. A bad reference coordinate will ruin "
-+ "all the work. Also cross check if the selected area contains as many reference "
-+ "points as possible at the border. You can easily delete points outside the map "
-+ "in the Reference Tool. But it's much more effort to set additional points in "
-+ "case you miss some. When you are done press 'ok' to transfer the derived "
-+ "reference points to the Reference Tool.\n\n"
-+ "The next step will be to use the Reference Tool to adjust the position of all "
-+ "reference points to the real grid position on the map."));
-+
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelFinal, &QLabel::setVisible);
-+
-+ QButtonGroup * group = new QButtonGroup(this);
-+ group->addButton(radioSetRef);
-+ group->addButton(radioGridPlacer);
-+ group->addButton(radioSelectArea);
-+
-+
-+ connect(radioSetRef, &QRadioButton::toggled, widgetSetRef, &QFrame::setEnabled);
-+ connect(radioGridPlacer, &QRadioButton::toggled, widgetGridPlacer, &CGridPlacer::setEnabled);
-+ connect(radioSelectArea, &QRadioButton::toggled, widgetSelectArea, &QLabel::setEnabled);
-+
-+
-+ connect(widgetSetRef, &CGridSetRef::sigChanged, this, &COverlayGridTool::slotCalculate);
-+ connect(widgetSetRef, &CGridSetRef::sigChanged, this, &COverlayGridTool::slotCheckInput);
-+
-+ connect(widgetGridPlacer, &CGridPlacer::sigChanged, this, &COverlayGridTool::slotCheckInput);
-+ connect(widgetGridPlacer, &CGridPlacer::sigSetArea, this, &COverlayGridTool::slotSetArea);
-+ connect(widgetGridPlacer, &CGridPlacer::sigChanged, this, &COverlayGridTool::slotCalculate);
-+
-+ connect(widgetSelectArea, &CGridSelArea::sigChanged, this, &COverlayGridTool::slotCalculate);
-+ connect(widgetSelectArea, &CGridSelArea::sigChanged, this, &COverlayGridTool::slotCheckInput);
-+}
-+
-+void COverlayGridTool::slotReset()
-+{
-+ widgetSetRef->slotReset();
-+ widgetGridPlacer->slotReset();
-+ widgetSelectArea->slotReset();
-+
-+ radioSetRef->setChecked(true);
-+
-+ SETTINGS;
-+ cfg.beginGroup("GridTool");
-+ cfg.remove("");
-+ cfg.endGroup();
-+ cfg.sync();
-+}
-+
-+void COverlayGridTool::registerItem(CItemRefMap * item)
-+{
-+ this->item = item;
-+ if(item != nullptr)
-+ {
-+ context = item->getDrawContext();
-+ if(context == nullptr)
-+ {
-+ this->item = nullptr;
-+ }
-+ }
-+ else
-+ {
-+ context = nullptr;
-+ }
-+
-+
-+ widgetGridPlacer->registerItem(this->item);
-+ widgetSelectArea->registerItem(this->item);
-+
-+ radioSetRef->setChecked(true);
-+
-+ SETTINGS;
-+ cfg.beginGroup("GridTool");
-+ if(this->item != nullptr)
-+ {
-+ widgetSetRef->loadSettings(cfg);
-+ widgetGridPlacer->loadSettings(cfg);
-+ widgetSelectArea->loadSettings(cfg);
-+ }
-+ else
-+ {
-+ cfg.remove("");
-+
-+ widgetSetRef->saveSettings(cfg);
-+ widgetGridPlacer->saveSettings(cfg);
-+ widgetSelectArea->saveSettings(cfg);
-+ }
-+ cfg.endGroup();
-+
-+ slotCheckInput();
-+}
-+
-+
-+void COverlayGridTool::slotCheckInput()
-+{
-+ bool group1Ok = widgetSetRef->isOk();
-+ radioGridPlacer->setEnabled(group1Ok);
-+
-+ bool group2Ok = widgetGridPlacer->isOk();
-+ radioSelectArea->setEnabled(group2Ok&& group1Ok);
-+
-+ const QPointF& p1 = widgetGridPlacer->getPoint(0);
-+ const QPointF& p2 = widgetGridPlacer->getPoint(1);
-+ const QPointF& p3 = widgetGridPlacer->getPoint(2);
-+ const QPointF& p4 = widgetGridPlacer->getPoint(3);
-+ const QRectF& area = widgetSelectArea->getArea();
-+
-+ bool group3Ok = true;
-+ group3Ok &= !area.isEmpty();
-+ group3Ok &= area.isValid();
-+ group3Ok &= !area.isNull();
-+ group3Ok &= area.contains(p1);
-+ group3Ok &= area.contains(p2);
-+ group3Ok &= area.contains(p3);
-+ group3Ok &= area.contains(p4);
-+
-+ labelFinal->setEnabled(group1Ok && group2Ok && group3Ok);
-+
-+ emit sigChanged(group1Ok && group2Ok && group3Ok);
-+}
-+
-+bool COverlayGridTool::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ if(radioSelectArea->isEnabled())
-+ {
-+ widgetSelectArea->drawFx(p, needsRedraw);
-+
-+ QRectF dot1(0,0,7,7);
-+ p.setPen(QPen(Qt::white, 1));
-+ p.setBrush(Qt::darkGreen);
-+
-+ for(COverlayRefMapPoint * point : refPoints)
-+ {
-+ QPointF pt = point->getPtPtx();
-+ context->convertMap2Screen(pt);
-+ dot1.moveCenter(pt);
-+ p.drawRect(dot1);
-+ }
-+ }
-+
-+ widgetGridPlacer->drawFx(p, needsRedraw);
-+ return false;
-+}
-+
-+void COverlayGridTool::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ if(radioGridPlacer->isChecked())
-+ {
-+ widgetGridPlacer->mouseMoveEventFx(e);
-+ }
-+ else if(radioSelectArea->isChecked())
-+ {
-+ widgetSelectArea->mouseMoveEventFx(e);
-+ }
-+}
-+
-+void COverlayGridTool::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ if(radioGridPlacer->isChecked())
-+ {
-+ widgetGridPlacer->mouseReleaseEventFx(e);
-+ }
-+ else if(radioSelectArea->isChecked())
-+ {
-+ widgetSelectArea->mouseReleaseEventFx(e);
-+ }
-+}
-+
-+void COverlayGridTool::leaveEventFx(QEvent *e)
-+{
-+ if(radioGridPlacer->isChecked())
-+ {
-+ widgetGridPlacer->leaveEventFx(e);
-+ }
-+ else if(radioSelectArea->isChecked())
-+ {
-+ widgetSelectArea->leaveEventFx(e);
-+ }
-+}
-+
-+QCursor COverlayGridTool::getCursorFx()
-+{
-+ if(radioGridPlacer->isChecked())
-+ {
-+ return widgetGridPlacer->getCursorFx();
-+ }
-+ else if(radioSelectArea->isChecked())
-+ {
-+ return widgetSelectArea->getCursorFx();
-+ }
-+ else
-+ {
-+ return Qt::ArrowCursor;
-+ }
-+}
-+
-+
-+void COverlayGridTool::slotSetArea(const QRectF& rect)
-+{
-+ qreal hspace = rect.width() / 2;
-+ qreal vspace = rect.height() / 2;
-+ QRectF area = rect;
-+
-+ area.setTopLeft(rect.topLeft() - QPointF(hspace, vspace));
-+ area.setBottomRight(rect.bottomRight() + QPointF(hspace, vspace));
-+
-+ widgetSelectArea->slotSetArea(area);
-+ radioSelectArea->setChecked(true);
-+}
-+
-+void COverlayGridTool::slotCalculate()
-+{
-+ if(!radioSelectArea->isEnabled())
-+ {
-+ return;
-+ }
-+
-+ qDeleteAll(refPoints);
-+ refPoints.clear();
-+
-+ projPJ pjsrc = pj_init_plus(widgetSetRef->getProjection().toLatin1());
-+ if(pjsrc == nullptr)
-+ {
-+ return;
-+ }
-+
-+ projPJ pjtar = pj_init_plus("+proj=longlat +datum=WGS84 +no_defs");
-+ if(pjtar == nullptr)
-+ {
-+ pj_free(pjsrc);
-+ return;
-+ }
-+
-+ const QRectF& area = widgetSelectArea->getArea();
-+
-+ const QPointF& ptTopLeft = widgetGridPlacer->getPoint(0);
-+ const QPointF& ptTopRight = widgetGridPlacer->getPoint(1);
-+ const QPointF& ptBottomRight = widgetGridPlacer->getPoint(2);
-+ const QPointF& ptBottomLeft = widgetGridPlacer->getPoint(3);
-+
-+ qreal dx11 = ptTopRight.x() - ptTopLeft.x();
-+ qreal dy11 = ptTopRight.y() - ptTopLeft.y();
-+ qreal dx12 = ptBottomRight.x() - ptBottomLeft.x();
-+ qreal dy12 = ptBottomRight.y() - ptBottomLeft.y();
-+ qreal dx1 = (dx11 + dx12) / 2;
-+ qreal dy1 = (dy11 + dy12) / 2;
-+
-+ qreal alpha = qAtan(dy1/dx1);
-+ qreal distx = qSqrt(dx1*dx1 + dy1*dy1);
-+
-+ qreal dx21 = ptBottomLeft.x() - ptTopLeft.x();
-+ qreal dy21 = ptBottomLeft.y() - ptTopLeft.y();
-+ qreal dx22 = ptBottomRight.x() - ptTopRight.x();
-+ qreal dy22 = ptBottomRight.y() - ptTopRight.y();
-+ qreal dx2 = (dx21 + dx22) / 2;
-+ qreal dy2 = (dy21 + dy22) / 2;
-+
-+ qreal disty = qSqrt(dx2*dx2 + dy2*dy2);
-+
-+ QMatrix translationMatrix(1, 0, 0, 1, ptTopLeft.x(), ptTopLeft.y());
-+ QMatrix rotationMatrix(qCos(alpha), qSin(alpha), -qSin(alpha), qCos(alpha), 0, 0);
-+ QMatrix scalingMatrix(distx, 0, 0, disty, 0, 0);
-+
-+ // forward matrix index -> map pixel coord
-+ QMatrix mxFwd = scalingMatrix * rotationMatrix * translationMatrix;
-+ // backward matrix map pixel coord -> index
-+ QMatrix mxBwd = mxFwd.inverted();
-+
-+ QPointF tl = mxBwd.map(area.topLeft());
-+ QPointF br = mxBwd.map(area.bottomRight());
-+
-+ int xMin = qCeil(tl.x()) - 1;
-+ int yMin = qCeil(tl.y()) - 1;
-+
-+ int xMax = qCeil(br.x()) + 1;
-+ int yMax = qCeil(br.y()) + 1;
-+
-+ qreal lonRef = widgetSetRef->getEasting();
-+ qreal latRef = widgetSetRef->getNorthing();
-+ qreal dLon = widgetSetRef->getHorizSpacing();
-+ qreal dLat = widgetSetRef->getVertSpacing();
-+
-+ bool isLonLat = pj_is_latlong(pjsrc);
-+
-+ for(int y = yMin; y < yMax; y++)
-+ {
-+ for(int x = xMin; x < xMax; x++)
-+ {
-+ QPointF ptPtx = mxFwd.map(QPointF(x,y));
-+ if(area.contains(ptPtx))
-+ {
-+ ptPtx.rx() = qRound(ptPtx.x());
-+ ptPtx.ry() = qRound(ptPtx.y());
-+
-+ qreal lat = latRef - y * dLat;
-+ qreal lon = lonRef + x * dLon;
-+
-+ if(isLonLat)
-+ {
-+ lon *= DEG_TO_RAD;
-+ lat *= DEG_TO_RAD;
-+ }
-+
-+ pj_transform(pjsrc, pjtar, 1, 0, &lon, &lat, 0);
-+ lon *= RAD_TO_DEG;
-+ lat *= RAD_TO_DEG;
-+
-+ refPoints << new COverlayRefMapPoint(0, QPointF(lon,lat), ptPtx, nullptr);
-+ }
-+ }
-+ }
-+
-+ pj_free(pjsrc);
-+ pj_free(pjtar);
-+}
-diff --git a/src/qmaptool/overlay/COverlayGridTool.h b/src/qmaptool/overlay/COverlayGridTool.h
-new file mode 100644
-index 00000000..f50b22f1
---- /dev/null
-+++ b/src/qmaptool/overlay/COverlayGridTool.h
-@@ -0,0 +1,68 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef COVERLAYGRIDTOOL_H
-+#define COVERLAYGRIDTOOL_H
-+
-+#include "canvas/CCanvas.h"
-+#include "ui_IOverlayGridTool.h"
-+
-+class CItemRefMap;
-+class COverlayRefMapPoint;
-+
-+class COverlayGridTool : public QWidget, private Ui::IOverlayGridTool
-+{
-+ Q_OBJECT
-+public:
-+ COverlayGridTool(QWidget * parent);
-+ virtual ~COverlayGridTool() = default;
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw);
-+ void mouseMoveEventFx(QMouseEvent *e);
-+ void mouseReleaseEventFx(QMouseEvent *e);
-+ void leaveEventFx(QEvent *e);
-+ QCursor getCursorFx();
-+
-+ void registerItem(CItemRefMap * item);
-+
-+ QList<COverlayRefMapPoint*>& getRefPoints()
-+ {
-+ return refPoints;
-+ }
-+
-+signals:
-+ void sigChanged(bool ok);
-+
-+public slots:
-+ void slotReset();
-+
-+private slots:
-+ void slotCheckInput();
-+ void slotSetArea(const QRectF& rect);
-+ void slotCalculate();
-+
-+private:
-+
-+ CItemRefMap * item = nullptr;
-+ const IDrawContext * context = nullptr;
-+
-+ QList<COverlayRefMapPoint*> refPoints;
-+};
-+
-+#endif //COVERLAYGRIDTOOL_H
-+
-diff --git a/src/qmaptool/overlay/COverlayRefMap.cpp b/src/qmaptool/overlay/COverlayRefMap.cpp
-new file mode 100644
-index 00000000..0afc882c
---- /dev/null
-+++ b/src/qmaptool/overlay/COverlayRefMap.cpp
-@@ -0,0 +1,747 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "helpers/CDraw.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemRefMap.h"
-+#include "overlay/COverlayRefMap.h"
-+#include "overlay/refmap/CDialogRefPoint.h"
-+#include "overlay/refmap/COverlayRefMapPoint.h"
-+#include "overlay/refmap/CProjWizard.h"
-+
-+#include <functional>
-+#include <QtWidgets>
-+using std::bind;
-+
-+COverlayRefMap::COverlayRefMap(CItemRefMap *item, QStackedWidget *stackedWidget)
-+ : IOverlay(stackedWidget)
-+ , context(item->getDrawContext())
-+ , item(item)
-+{
-+ setupUi(this);
-+
-+ QFileInfo fi(item->getFilename());
-+ gcpFilename = fi.completeBaseName() + ".gcp";
-+
-+ labelHelp->setText(tr("If you used the Grid Tool you have to fine tune the reference points by placing them "
-+ "as much as possible on the grid crossing. Be aware that if you over scale you get "
-+ "jumping points by rounding effects. Be precise but do not make religion out "
-+ "of the task.\nIf your mouse focus is on the map you can use the N and B keys to "
-+ "jump forward an backward in the reference point list. "
-+ "\nThe is also the option to fine tune the reference points in auto-mode. In this "
-+ "mode the next reference point is selected automatically right after you placed the "
-+ "current one. This is very convenient for a large number of reference points."));
-+
-+ labelHelp->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+
-+ treeWidget->addAction(actionDelRefPoint);
-+
-+ connect(toolNone, &QToolButton::clicked, this, bind(&COverlayRefMap::slotSetMode, this, eModeNone, std::placeholders::_1));
-+ connect(toolRefMove, &QToolButton::clicked, this, bind(&COverlayRefMap::slotSetMode, this, eModePointMove, std::placeholders::_1));
-+ connect(toolRefAdd, &QToolButton::clicked, this, bind(&COverlayRefMap::slotSetMode, this, eModePointAdd, std::placeholders::_1));
-+ connect(toolRefDel, &QToolButton::clicked, this, bind(&COverlayRefMap::slotSetMode, this, eModePointDel, std::placeholders::_1));
-+ connect(toolRefMoveAuto, &QToolButton::clicked, this, bind(&COverlayRefMap::slotSetMode, this, eModePointMoveAuto, std::placeholders::_1));
-+ connect(toolRefDelAll, &QToolButton::clicked, this, &COverlayRefMap::slotResetRef);
-+ connect(toolLoadGcp, &QToolButton::clicked, this, &COverlayRefMap::slotLoadGcp);
-+ connect(toolSaveGcp, &QToolButton::clicked, this, &COverlayRefMap::slotSaveGcp);
-+ connect(toolProjection, &QToolButton::clicked, this, &COverlayRefMap::slotProjWizard);
-+ connect(toolGridTool, &QToolButton::clicked, this, &COverlayRefMap::slotGridTool);
-+ connect(toolSort, &QToolButton::clicked, this, &COverlayRefMap::slotSortRefPoints);
-+ connect(treeWidget, &QTreeWidget::itemSelectionChanged, this, &COverlayRefMap::slotSelectionChanged);
-+ connect(actionDelRefPoint, &QAction::triggered, this, &COverlayRefMap::slotDelRefPoints);
-+}
-+
-+void COverlayRefMap::saveSettings(QSettings& cfg)
-+{
-+ QByteArray buffer;
-+ QDataStream stream(&buffer, QIODevice::WriteOnly);
-+ stream.setByteOrder(QDataStream::LittleEndian);
-+ stream.setVersion(QDataStream::Qt_5_4);
-+
-+ const int N = treeWidget->topLevelItemCount();
-+ stream << N;
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * item = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(item != nullptr)
-+ {
-+ stream << item->getPtPtx() << item->getPtRef();
-+ }
-+ }
-+
-+ cfg.beginGroup("grid");
-+ cfg.setValue("points", buffer);
-+ cfg.setValue("projection", lineProjection->text());
-+ cfg.endGroup();
-+}
-+
-+void COverlayRefMap::loadSettings(QSettings& cfg)
-+{
-+ QByteArray buffer;
-+ cfg.beginGroup("grid");
-+ buffer = cfg.value("points", buffer).toByteArray();
-+ lineProjection->setText(cfg.value("projection", "").toString());
-+ lineProjection->setCursorPosition(0);
-+ cfg.endGroup();
-+
-+ QDataStream stream(&buffer, QIODevice::ReadOnly);
-+ stream.setByteOrder(QDataStream::LittleEndian);
-+ stream.setVersion(QDataStream::Qt_5_4);
-+
-+
-+ int N;
-+ stream >> N;
-+ for(int n = 0; n < N; n++)
-+ {
-+ QPointF ptPtx;
-+ QPointF ptRef;
-+ stream >> ptPtx >> ptRef;
-+ new COverlayRefMapPoint(n+1, ptRef, ptPtx, treeWidget);
-+ }
-+
-+ updateGui();
-+ slotSortRefPoints();
-+ emit sigChanged();
-+}
-+
-+void COverlayRefMap::slotSortRefPoints()
-+{
-+ treeWidget->sortItems(0, Qt::AscendingOrder);
-+ const int N = treeWidget->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * point = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(point == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ point->setIndex(n);
-+ }
-+
-+ treeWidget->header()->resizeSections(QHeaderView::ResizeToContents);
-+}
-+
-+void COverlayRefMap::addRefPoints(QList<COverlayRefMapPoint*>& points)
-+{
-+ // it's faster to use a bulk add
-+ QList<QTreeWidgetItem*> items;
-+ for(QTreeWidgetItem * item : points)
-+ {
-+ items << item;
-+ }
-+ treeWidget->addTopLevelItems(items);
-+
-+ // as the tree widget owns the items now, the list has to be cleared
-+ points.clear();
-+ // reflect changes on the GUI
-+ updateGui();
-+
-+ emit sigChanged();
-+}
-+
-+QString COverlayRefMap::getMapProjection() const
-+{
-+ return lineProjection->text();
-+}
-+
-+const QList<COverlayRefMapPoint*> COverlayRefMap::getRefPoints() const
-+{
-+ QList<COverlayRefMapPoint*> points;
-+
-+ const int N = treeWidget->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * item = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(item != nullptr)
-+ {
-+ points << item;
-+ }
-+ }
-+
-+ return points;
-+}
-+
-+bool COverlayRefMap::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ QRectF dot1(0,0,5,5);
-+ const int N = treeWidget->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * item = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(item != nullptr)
-+ {
-+ if(item->isSelected())
-+ {
-+ p.setPen(QPen(Qt::red, 1));
-+ p.setBrush(Qt::red);
-+ }
-+ else
-+ {
-+ p.setPen(QPen(Qt::black, 1));
-+ p.setBrush(Qt::black);
-+ }
-+
-+ QPointF pt = item->getPtPtx();
-+ if((pt - ptFocus1).manhattanLength() > 30)
-+ {
-+ context->convertMap2Screen(pt);
-+ dot1.moveCenter(pt);
-+ p.drawRect(dot1);
-+ }
-+ }
-+ }
-+
-+ QPointF pt = NOPOINTF;
-+ if(ptFocus2 != NOPOINTF)
-+ {
-+ pt = ptFocus2;
-+ }
-+ else if(ptFocus1 != NOPOINTF)
-+ {
-+ pt = ptFocus1;
-+ }
-+
-+
-+ if(pt != NOPOINTF)
-+ {
-+ context->convertMap2Screen(pt);
-+
-+ if(movePoint)
-+ {
-+ QPointF pt1 = ptFocus1;
-+ context->convertMap2Screen(pt1);
-+
-+ p.setPen(QPen(Qt::red, 1));
-+ p.setBrush(Qt::red);
-+ p.drawLine(pt1, pt);
-+ dot1.moveCenter(pt1);
-+ p.drawRect(dot1);
-+ }
-+
-+ CDraw::drawCrossHairDot(p, pt);
-+ }
-+
-+
-+ return true;
-+}
-+
-+QPointF COverlayRefMap::isCloseTo(QPointF pt)
-+{
-+ qint32 min = 30;
-+ COverlayRefMapPoint * selItem = nullptr;
-+
-+ context->convertMap2Screen(pt);
-+
-+ const int N = treeWidget->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * item = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(item == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ QPointF ptx = item->getPtPtx();
-+ context->convertMap2Screen(ptx);
-+
-+ qint32 d = (pt - ptx).manhattanLength();
-+ if(d < min)
-+ {
-+ min = d;
-+ selItem = item;
-+ }
-+ }
-+
-+ if(selItem != nullptr)
-+ {
-+ treeWidget->setCurrentItem(selItem);
-+ return selItem->getPtPtx();
-+ }
-+ else
-+ {
-+ return NOPOINTF;
-+ }
-+}
-+
-+
-+void COverlayRefMap::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ QPointF pt = e->pos();
-+ context->convertScreen2Map(pt);
-+
-+ switch(mode)
-+ {
-+ case eModePointMove:
-+ case eModePointMoveAuto:
-+ mouseMovePointMove(pt);
-+ break;
-+
-+ case eModePointAdd:
-+ mouseMovePointAdd(pt);
-+ break;
-+
-+ case eModePointDel:
-+ mouseMovePointDel(pt);
-+ break;
-+ }
-+
-+ updateGui();
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void COverlayRefMap::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ QPointF pt = e->pos();
-+ context->convertScreen2Map(pt);
-+
-+ Qt::MouseButton button = e->button();
-+
-+ switch(mode)
-+ {
-+ case eModePointMove:
-+ case eModePointMoveAuto:
-+ mouseReleasePointMove(pt, button);
-+ break;
-+
-+ case eModePointAdd:
-+ mouseReleasePointAdd(pt, button);
-+ break;
-+
-+ case eModePointDel:
-+ mouseReleasePointDel(pt, button);
-+ break;
-+ }
-+
-+ updateGui();
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void COverlayRefMap::mouseMovePointAdd(const QPointF &pt)
-+{
-+ ptFocus1 = pt;
-+}
-+
-+void COverlayRefMap::mouseMovePointDel(const QPointF &pt)
-+{
-+ ptFocus1 = isCloseTo(pt);
-+}
-+
-+void COverlayRefMap::mouseMovePointMove(const QPointF &pt)
-+{
-+ if(movePoint)
-+ {
-+ ptFocus2 = pt;
-+ }
-+ else
-+ {
-+ ptFocus1 = isCloseTo(pt);
-+ }
-+}
-+
-+void COverlayRefMap::mouseReleasePointAdd(const QPointF &pt, Qt::MouseButton button)
-+{
-+ if(button == Qt::LeftButton)
-+ {
-+ QPointF ptPtx = pt;
-+ QPointF ptRef = NOPOINTF;
-+ // ask for coordinate
-+ CDialogRefPoint dlg(ptPtx, ptRef, this);
-+ int res = dlg.exec();
-+ if(res == QDialog::Accepted)
-+ {
-+ new COverlayRefMapPoint(treeWidget->topLevelItemCount() + 1, ptRef, ptPtx, treeWidget);
-+ emit sigChanged();
-+ }
-+ }
-+ else if(button == Qt::RightButton)
-+ {
-+ abortStep();
-+ toolNone->click();
-+ CCanvas::restoreOverrideCursor("CRefMapGrid::mouseReleasePointAdd");
-+ }
-+}
-+
-+void COverlayRefMap::mouseReleasePointDel(const QPointF &pt, Qt::MouseButton button)
-+{
-+ if(button == Qt::LeftButton)
-+ {
-+ if(ptFocus1 == NOPOINTF)
-+ {
-+ return;
-+ }
-+
-+ const int N = treeWidget->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * item = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(item == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ if(item->getPtPtx() == ptFocus1)
-+ {
-+ delete item;
-+ abortStep();
-+ emit sigChanged();
-+ return;
-+ }
-+ }
-+ }
-+ else if(button == Qt::RightButton)
-+ {
-+ CCanvas::restoreOverrideCursor("CRefMapGrid::mouseReleasePointDel");
-+ toolNone->click();
-+ abortStep();
-+ }
-+}
-+
-+void COverlayRefMap::mouseReleasePointMove(const QPointF &pt, Qt::MouseButton button)
-+{
-+ if(button == Qt::LeftButton)
-+ {
-+ if(movePoint)
-+ {
-+ const int N = treeWidget->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * item = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(item == nullptr)
-+ {
-+ continue;
-+ }
-+
-+ if(item->getPtPtx() == ptFocus1)
-+ {
-+ item->setPtPtx(pt);
-+ break;
-+ }
-+ }
-+
-+ switch(mode)
-+ {
-+ case eModePointMove:
-+ {
-+ abortStep();
-+ CCanvas::restoreOverrideCursor("CRefMapGrid::mouseReleasePointMove");
-+ break;
-+ }
-+
-+ case eModePointMoveAuto:
-+ {
-+ int idx = treeWidget->indexOfTopLevelItem(treeWidget->currentItem()) + 1;
-+ if(idx >= treeWidget->topLevelItemCount())
-+ {
-+ abortStep();
-+ CCanvas::restoreOverrideCursor("CRefMapGrid::mouseReleasePointMove");
-+ }
-+ else
-+ {
-+ COverlayRefMapPoint * point = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(idx));
-+ if(point == nullptr)
-+ {
-+ return;
-+ }
-+ treeWidget->setCurrentItem(point);
-+ treeWidget->scrollToItem(point);
-+
-+ QPointF pt1 = point->getPtPtx();
-+ ptFocus1 = pt1;
-+ ptFocus2 = pt;
-+ context->convertMap2Screen(pt1);
-+
-+ QPointF pt2 = context->getCanvas()->rect().center();
-+ context->move(pt2 - pt1);
-+ context->triggerCompleteUpdate(CCanvas::eRedrawAll);
-+ }
-+ break;
-+ }
-+ }
-+ }
-+ else
-+ {
-+ if(ptFocus1 != NOPOINTF)
-+ {
-+ ptFocus2 = pt;
-+ movePoint = true;
-+ CCanvas::setOverrideCursor(Qt::BlankCursor, "CRefMapGrid::mouseReleasePointMove");
-+ }
-+ }
-+ }
-+ else if(button == Qt::RightButton)
-+ {
-+ if(!movePoint)
-+ {
-+ toolNone->click();
-+ }
-+ abortStep();
-+ CCanvas::restoreOverrideCursor("CRefMapGrid::mouseReleasePointMove");
-+ }
-+}
-+
-+
-+bool COverlayRefMap::keyPressEventFx(QKeyEvent *e)
-+{
-+ QTreeWidgetItem * item = treeWidget->currentItem();
-+ if(item == nullptr)
-+ {
-+ return false;
-+ }
-+
-+ int idx = treeWidget->indexOfTopLevelItem(item);
-+
-+ switch(e->key())
-+ {
-+ case Qt::Key_N:
-+ {
-+ ++idx;
-+ idx = qMin(idx, treeWidget->topLevelItemCount() - 1);
-+ break;
-+ }
-+
-+ case Qt::Key_B:
-+ {
-+ --idx;
-+ idx = qMax(idx, 0);
-+ break;
-+ }
-+
-+ default:
-+ return false;
-+ }
-+
-+
-+ if(movePoint)
-+ {
-+ switch(mode)
-+ {
-+ case eModePointMove:
-+ return false;
-+
-+ case eModePointMoveAuto:
-+ abortStep();
-+ CCanvas::restoreOverrideCursor("CRefMapGrid::mouseReleasePointMove");
-+ break;
-+ }
-+ }
-+
-+ COverlayRefMapPoint * point = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(idx));
-+ if(point == nullptr)
-+ {
-+ return false;
-+ }
-+ treeWidget->setCurrentItem(point);
-+ treeWidget->scrollToItem(point);
-+
-+ QPointF pt1 = point->getPtPtx();
-+ QPointF pt2 = context->getCanvas()->rect().center();
-+ context->convertMap2Screen(pt1);
-+ context->move(pt2 - pt1);
-+
-+ context->triggerCompleteUpdate(CCanvas::eRedrawAll);
-+
-+ return true;
-+}
-+
-+QCursor COverlayRefMap::getCursorFx()
-+{
-+ switch(mode)
-+ {
-+ case COverlayRefMap::eModePointAdd:
-+ return Qt::BlankCursor;
-+
-+ case COverlayRefMap::eModePointDel:
-+ return QCursor(QPixmap(":/cursors/cursorPointDel.png"), 0, 0);
-+
-+ case COverlayRefMap::eModePointMoveAuto:
-+ case COverlayRefMap::eModePointMove:
-+ return QCursor(QPixmap(":/cursors/cursorPointMove.png"), 0, 0);
-+ }
-+
-+ return Qt::ArrowCursor;
-+}
-+
-+void COverlayRefMap::updateGui()
-+{
-+ bool isEmpty = treeWidget->topLevelItemCount() == 0;
-+ toolRefDel->setDisabled(isEmpty);
-+ toolRefMove->setDisabled(isEmpty);
-+ toolRefDelAll->setDisabled(isEmpty);
-+ toolRefMoveAuto->setDisabled(isEmpty);
-+ toolSaveGcp->setDisabled(isEmpty);
-+}
-+
-+void COverlayRefMap::abortStep()
-+{
-+ movePoint = false;
-+ ptFocus1 = NOPOINTF;
-+ ptFocus2 = NOPOINTF;
-+
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void COverlayRefMap::slotSetMode(mode_e m, bool on)
-+{
-+ if(on)
-+ {
-+ mode = m;
-+ }
-+}
-+
-+void COverlayRefMap::slotSaveGcp()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/gcpInput", QDir::homePath()).toString();
-+
-+ QString filename = QFileDialog::getSaveFileName(0, tr("Save reference points..."), path + "/" + gcpFilename, "Ref. points (*.gcp)");
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+ cfg.setValue("Path/gcpInput", QFileInfo(filename).absolutePath());
-+
-+ gcpFilename = filename;
-+
-+ QFile file(filename);
-+ file.open(QIODevice::WriteOnly);
-+ QTextStream out(&file);
-+ out.setRealNumberPrecision(10);
-+
-+ out << "#V1.0" << endl;
-+ out << "#gcpproj: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" << endl;
-+
-+ const int N = treeWidget->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ COverlayRefMapPoint * pt = dynamic_cast<COverlayRefMapPoint*>(treeWidget->topLevelItem(n));
-+ if(pt == nullptr)
-+ {
-+ continue;
-+ }
-+ const QPointF& ptx = pt->getPtPtx();
-+ const QPointF& ref = pt->getPtRef();
-+
-+ out << "-gcp " << ptx.x() << " " << ptx.y() << " " << ref.y() << " " << ref.x() << endl;
-+ }
-+
-+ file.close();
-+}
-+
-+void COverlayRefMap::slotLoadGcp()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/gcpInput", QDir::homePath()).toString();
-+
-+ QString filename = QFileDialog::getOpenFileName(0, tr("Load reference points..."), path, "Ref. points (*.gcp)");
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+ cfg.setValue("Path/gcpInput", QFileInfo(filename).absolutePath());
-+
-+ QFile file(filename);
-+ file.open(QIODevice::ReadOnly);
-+ QString line = file.readLine();
-+ if(line.trimmed() == "#V1.0")
-+ {
-+ QRegExp re1("^-gcp\\s(-{0,1}[0-9]+)\\s(-{0,1}[0-9]+)\\s(-{0,1}[0-9\\.]+)\\s(-{0,1}[0-9\\.]+).*$");
-+ QRegExp re2("^-a_srs\\s(.*)$");
-+ QRegExp re3("^#gcpproj:\\s(.*)$");
-+
-+ qint32 cnt = 1;
-+ while(1)
-+ {
-+ if(re1.exactMatch(line))
-+ {
-+ QPointF ptPtx(re1.cap(1).toDouble(),re1.cap(2).toDouble());
-+ QPointF ptRef(re1.cap(4).toDouble(),re1.cap(3).toDouble());
-+ new COverlayRefMapPoint(cnt++, ptRef, ptPtx, treeWidget);
-+ }
-+
-+ if (file.atEnd())
-+ {
-+ break;
-+ }
-+ line = file.readLine();
-+ }
-+ }
-+
-+ updateGui();
-+
-+ emit sigChanged();
-+}
-+
-+void COverlayRefMap::slotResetRef()
-+{
-+ int res = QMessageBox::question(this, tr("Delete all reference points..."), tr("Are you sure to delete all reference points in the list?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
-+ if(res != QMessageBox::Yes)
-+ {
-+ return;
-+ }
-+ treeWidget->clear();
-+ updateGui();
-+
-+ emit sigChanged();
-+}
-+
-+void COverlayRefMap::slotProjWizard()
-+{
-+ CProjWizard dlg(*lineProjection, this);
-+ dlg.exec();
-+ lineProjection->setCursorPosition(0);
-+
-+ emit sigChanged();
-+}
-+
-+void COverlayRefMap::slotGridTool()
-+{
-+ CMainWindow::self().startGridTool(item);
-+}
-+
-+void COverlayRefMap::slotSelectionChanged()
-+{
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void COverlayRefMap::slotDelRefPoints()
-+{
-+ const QList<QTreeWidgetItem*>items = treeWidget->selectedItems();
-+ if(items.count() > 1)
-+ {
-+ int res = QMessageBox::question(this, tr("Delete..."), tr("Delete all selected reference points?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes);
-+ if(res != QMessageBox::Yes)
-+ {
-+ return;
-+ }
-+ }
-+
-+ qDeleteAll(items);
-+
-+ emit sigChanged();
-+}
-+
-+bool COverlayRefMap::isOk() const
-+{
-+ bool ok = true;
-+ ok &= (treeWidget->topLevelItemCount() > 2);
-+ ok &= CProjWizard::validProjStr(lineProjection->text());
-+ return ok;
-+}
-diff --git a/src/qmaptool/overlay/COverlayRefMap.h b/src/qmaptool/overlay/COverlayRefMap.h
-new file mode 100644
-index 00000000..03391000
---- /dev/null
-+++ b/src/qmaptool/overlay/COverlayRefMap.h
-@@ -0,0 +1,103 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef COVERLAYREFMAP_H
-+#define COVERLAYREFMAP_H
-+
-+#include "overlay/IOverlay.h"
-+#include "ui_IOverlayRefMap.h"
-+#include "units/IUnit.h"
-+
-+class QStackedWidget;
-+class IDrawContext;
-+class QSettings;
-+class CItemRefMap;
-+class COverlayRefMapPoint;
-+
-+class COverlayRefMap : public IOverlay, private Ui::IOverlayRefMap
-+{
-+ Q_OBJECT
-+public:
-+ COverlayRefMap(CItemRefMap *item, QStackedWidget * stackedWidget);
-+ virtual ~COverlayRefMap() = default;
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+ void addRefPoints(QList<COverlayRefMapPoint*>& points);
-+ QString getMapProjection() const;
-+ const QList<COverlayRefMapPoint *> getRefPoints() const;
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw);
-+ void mouseMoveEventFx(QMouseEvent *e);
-+ void mouseReleaseEventFx(QMouseEvent *e);
-+ bool keyPressEventFx(QKeyEvent *e);
-+ QCursor getCursorFx();
-+
-+ void abortStep();
-+
-+ enum mode_e
-+ {
-+ eModeNone
-+ ,eModePointMove
-+ ,eModePointAdd
-+ ,eModePointDel
-+ ,eModePointMoveAuto
-+ };
-+
-+ bool isOk() const;
-+
-+private slots:
-+ void slotSetMode(mode_e m, bool on);
-+ void slotSaveGcp();
-+ void slotLoadGcp();
-+ void slotResetRef();
-+ void slotProjWizard();
-+ void slotGridTool();
-+ void slotSelectionChanged();
-+ void slotDelRefPoints();
-+ void slotSortRefPoints();
-+
-+
-+private:
-+ void updateGui();
-+ QPointF isCloseTo(QPointF pt);
-+
-+ void mouseMovePointAdd(const QPointF &pt);
-+ void mouseMovePointDel(const QPointF &pt);
-+ void mouseMovePointMove(const QPointF &pt);
-+
-+ void mouseReleasePointAdd(const QPointF &pt, Qt::MouseButton button);
-+ void mouseReleasePointDel(const QPointF &pt, Qt::MouseButton button);
-+ void mouseReleasePointMove(const QPointF &pt, Qt::MouseButton button);
-+
-+ IDrawContext* context;
-+ CItemRefMap * item;
-+
-+ mode_e mode = eModeNone;
-+
-+ QPointF ptFocus1 = NOPOINTF;
-+ QPointF ptFocus2 = NOPOINTF;
-+ bool movePoint = false;
-+
-+ QString gcpFilename;
-+};
-+
-+#endif //COVERLAYREFMAP_H
-+
-+
-diff --git a/src/qmaptool/overlay/IOverlay.cpp b/src/qmaptool/overlay/IOverlay.cpp
-new file mode 100644
-index 00000000..148d1c10
---- /dev/null
-+++ b/src/qmaptool/overlay/IOverlay.cpp
-@@ -0,0 +1,36 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "overlay/IOverlay.h"
-+
-+#include <QtWidgets>
-+
-+IOverlay::IOverlay(QStackedWidget *parent)
-+ : QWidget(parent)
-+ , stackedWidget(parent)
-+{
-+ stackedWidget->addWidget(this);
-+}
-+
-+
-+void IOverlay::toFront()
-+{
-+ stackedWidget->setCurrentWidget(this);
-+}
-+
-+
-diff --git a/src/qmaptool/overlay/IOverlay.h b/src/qmaptool/overlay/IOverlay.h
-new file mode 100644
-index 00000000..d7e968ec
---- /dev/null
-+++ b/src/qmaptool/overlay/IOverlay.h
-@@ -0,0 +1,43 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef IOVERLAY_H
-+#define IOVERLAY_H
-+
-+#include <QWidget>
-+
-+class QStackedWidget;
-+
-+class IOverlay : public QWidget
-+{
-+ Q_OBJECT
-+public:
-+ IOverlay(QStackedWidget * parent);
-+ virtual ~IOverlay() = default;
-+
-+ void toFront();
-+
-+signals:
-+ void sigChanged();
-+
-+protected:
-+ QStackedWidget * stackedWidget;
-+};
-+
-+#endif //IOVERLAY_H
-+
-diff --git a/src/qmaptool/overlay/IOverlayCutMap.ui b/src/qmaptool/overlay/IOverlayCutMap.ui
-new file mode 100644
-index 00000000..e7a69766
---- /dev/null
-+++ b/src/qmaptool/overlay/IOverlayCutMap.ui
-@@ -0,0 +1,202 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IOverlayCutMap</class>
-+ <widget class="QWidget" name="IOverlayCutMap">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>254</width>
-+ <height>25</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QToolButton" name="toolNone">
-+ <property name="toolTip">
-+ <string>Just move the map and zoom.</string>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/MoveArrow.png</normaloff>:/icons/32x32/MoveArrow.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="checked">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolPointAdd">
-+ <property name="toolTip">
-+ <string>Add point to mask.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/PointAdd.png</normaloff>:/icons/32x32/PointAdd.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolPointMove">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Move point of mask.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/PointMove.png</normaloff>:/icons/32x32/PointMove.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolPointDel">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Remove point from mask.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/PointDel.png</normaloff>:/icons/32x32/PointDel.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="Line" name="line">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolPointDelAll">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Remove complete cut mask.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/PointDelAll.png</normaloff>:/icons/32x32/PointDelAll.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="Line" name="line_2">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolLoadShape">
-+ <property name="toolTip">
-+ <string>Load cut mask from shape file.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/LoadShape.png</normaloff>:/icons/32x32/LoadShape.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolSaveShape">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Save cut mask to shape file.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/SaveShape.png</normaloff>:/icons/32x32/SaveShape.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/overlay/IOverlayGridTool.ui b/src/qmaptool/overlay/IOverlayGridTool.ui
-new file mode 100644
-index 00000000..7e8c1ab3
---- /dev/null
-+++ b/src/qmaptool/overlay/IOverlayGridTool.ui
-@@ -0,0 +1,184 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IOverlayGridTool</class>
-+ <widget class="QWidget" name="IOverlayGridTool">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>462</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QGridLayout" name="gridLayout_2">
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item row="0" column="0">
-+ <layout class="QVBoxLayout" name="verticalLayout_3">
-+ <item>
-+ <widget class="QRadioButton" name="radioSetRef">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="checked">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer_3">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ <item row="1" column="0">
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <widget class="QRadioButton" name="radioGridPlacer">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ <item row="1" column="1">
-+ <widget class="CGridPlacer" name="widgetGridPlacer" native="true">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="0">
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <item>
-+ <widget class="QRadioButton" name="radioSelectArea">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer_2">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ <item row="2" column="1">
-+ <widget class="CGridSelArea" name="widgetSelectArea" native="true">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="1">
-+ <widget class="QLabel" name="labelFinal">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="1">
-+ <widget class="CGridSetRef" name="widgetSetRef" native="true"/>
-+ </item>
-+ </layout>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>CGridPlacer</class>
-+ <extends>QWidget</extends>
-+ <header>overlay/gridtool/CGridPlacer.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ <customwidget>
-+ <class>CGridSelArea</class>
-+ <extends>QWidget</extends>
-+ <header>overlay/gridtool/CGridSelArea.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ <customwidget>
-+ <class>CGridSetRef</class>
-+ <extends>QWidget</extends>
-+ <header>overlay/gridtool/CGridSetRef.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <tabstops>
-+ <tabstop>radioSetRef</tabstop>
-+ <tabstop>radioGridPlacer</tabstop>
-+ <tabstop>radioSelectArea</tabstop>
-+ </tabstops>
-+ <resources/>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/overlay/IOverlayRefMap.ui b/src/qmaptool/overlay/IOverlayRefMap.ui
-new file mode 100644
-index 00000000..9001fe66
---- /dev/null
-+++ b/src/qmaptool/overlay/IOverlayRefMap.ui
-@@ -0,0 +1,351 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IOverlayRefMap</class>
-+ <widget class="QWidget" name="IOverlayRefMap">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>376</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QToolButton" name="toolNone">
-+ <property name="toolTip">
-+ <string>Just move the map and zoom.</string>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/MoveArrow.png</normaloff>:/icons/32x32/MoveArrow.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="checked">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolRefAdd">
-+ <property name="toolTip">
-+ <string>Add reference point.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/RefAdd.png</normaloff>:/icons/32x32/RefAdd.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolRefMove">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Move reference point.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/RefMove.png</normaloff>:/icons/32x32/RefMove.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolRefDel">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Remove single reference point.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/RefDel.png</normaloff>:/icons/32x32/RefDel.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolRefMoveAuto">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Move reference points with auto mode. This will pickup the next point after you moved a reference point.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/RefMoveAuto.png</normaloff>:/icons/32x32/RefMoveAuto.png</iconset>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="autoExclusive">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="Line" name="line_2">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolRefDelAll">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Remove all reference points.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/RefDelAll.png</normaloff>:/icons/32x32/RefDelAll.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolGridTool">
-+ <property name="toolTip">
-+ <string>Switch to the Grid Tool.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/GridTool.png</normaloff>:/icons/32x32/GridTool.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="Line" name="line">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolLoadGcp">
-+ <property name="toolTip">
-+ <string>Load reference points from GCP file.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/LoadGcp.png</normaloff>:/icons/32x32/LoadGcp.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolSaveGcp">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Save reference points into GCP file.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/SaveGcp.png</normaloff>:/icons/32x32/SaveGcp.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolSort">
-+ <property name="toolTip">
-+ <string>Sort list of reference points.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Sort.png</normaloff>:/icons/32x32/Sort.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QTreeWidget" name="treeWidget">
-+ <property name="contextMenuPolicy">
-+ <enum>Qt::ActionsContextMenu</enum>
-+ </property>
-+ <property name="selectionMode">
-+ <enum>QAbstractItemView::ExtendedSelection</enum>
-+ </property>
-+ <property name="selectionBehavior">
-+ <enum>QAbstractItemView::SelectRows</enum>
-+ </property>
-+ <property name="rootIsDecorated">
-+ <bool>false</bool>
-+ </property>
-+ <property name="itemsExpandable">
-+ <bool>false</bool>
-+ </property>
-+ <property name="expandsOnDoubleClick">
-+ <bool>false</bool>
-+ </property>
-+ <column>
-+ <property name="text">
-+ <string notr="true">#</string>
-+ </property>
-+ </column>
-+ <column>
-+ <property name="text">
-+ <string>(x, y)[pixel]</string>
-+ </property>
-+ </column>
-+ <column>
-+ <property name="text">
-+ <string>(lat, lon)[°]</string>
-+ </property>
-+ </column>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>TextLabel</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>Final Map Projection:</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_2">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QLineEdit" name="lineProjection">
-+ <property name="toolTip">
-+ <string>Enter a valid projection string. Valid strings are &quot;+proj...&quot; or &quot;+init=epsg:...&quot;.</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolProjection">
-+ <property name="toolTip">
-+ <string>Start projection wizard.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/GridWizard.png</normaloff>:/icons/32x32/GridWizard.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ <action name="actionDelRefPoint">
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/DeleteMultiple.png</normaloff>:/icons/32x32/DeleteMultiple.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>Delete</string>
-+ </property>
-+ </action>
-+ </widget>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/overlay/gridtool/CGridPlacer.cpp b/src/qmaptool/overlay/gridtool/CGridPlacer.cpp
-new file mode 100644
-index 00000000..62b211c3
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridPlacer.cpp
-@@ -0,0 +1,274 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "items/CItemRefMap.h"
-+#include "overlay/gridtool/CGridPlacer.h"
-+#include "overlay/gridtool/CGridPoint.h"
-+
-+#include <functional>
-+#include <QtWidgets>
-+using std::bind;
-+
-+
-+CGridPlacer::CGridPlacer(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setupUi(this);
-+
-+ labelHelp->setText(tr("Select one of the corners and place the marker at "
-+ "the corresponding grid crossing on the map. All "
-+ "4 corners have to be placed."));
-+
-+ QButtonGroup * group = new QButtonGroup(this);
-+ group->addButton(radioPoint1);
-+ group->addButton(radioPoint2);
-+ group->addButton(radioPoint3);
-+ group->addButton(radioPoint4);
-+
-+ connect(radioPoint1, &QToolButton::toggled, this, bind(&CGridPlacer::slotSetPoint, this, 0, std::placeholders::_1));
-+ connect(radioPoint2, &QToolButton::toggled, this, bind(&CGridPlacer::slotSetPoint, this, 1, std::placeholders::_1));
-+ connect(radioPoint3, &QToolButton::toggled, this, bind(&CGridPlacer::slotSetPoint, this, 2, std::placeholders::_1));
-+ connect(radioPoint4, &QToolButton::toggled, this, bind(&CGridPlacer::slotSetPoint, this, 3, std::placeholders::_1));
-+ connect(pushReset, &QPushButton::clicked, this, &CGridPlacer::slotReset);
-+ connect(pushSetArea, &QPushButton::clicked, this, &CGridPlacer::slotSetArea);
-+}
-+
-+void CGridPlacer::registerItem(CItemRefMap * item)
-+{
-+ this->item = item;
-+
-+ if(item != nullptr)
-+ {
-+ points = QVector<CGridPoint>(4);
-+
-+ for(CGridPoint& point : points)
-+ {
-+ point.registerItem(item);
-+ }
-+
-+ radioPoint1->setChecked(true);
-+ }
-+}
-+
-+void CGridPlacer::saveSettings(QSettings& cfg)
-+{
-+ cfg.beginGroup("Points");
-+ for(int i = 0; i < points.size(); i++)
-+ {
-+ const QPointF& pt = points[i].getPoint();
-+ if(pt != NOPOINTF)
-+ {
-+ cfg.setValue(QString::number(i), pt);
-+ }
-+ }
-+ cfg.endGroup();
-+}
-+
-+void CGridPlacer::loadSettings(QSettings& cfg)
-+{
-+ cfg.beginGroup("Points");
-+ for(int i = 0; i < points.size(); i++)
-+ {
-+ QPointF pt = cfg.value(QString::number(i), NOPOINTF).toPointF();
-+ points[i].setPoint(pt);
-+ }
-+ cfg.endGroup();
-+ updateStatus();
-+}
-+
-+bool CGridPlacer::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ for(CGridPoint& point : points)
-+ {
-+ point.drawFx(p, needsRedraw);
-+ }
-+
-+ return true;
-+}
-+
-+void CGridPlacer::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ points[idx].mouseMoveEventFx(e);
-+}
-+
-+void CGridPlacer::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ points[idx].mouseReleaseEventFx(e);
-+ updateStatus();
-+}
-+
-+void CGridPlacer::leaveEventFx(QEvent *e)
-+{
-+ points[idx].leaveEventFx(e);
-+}
-+
-+QCursor CGridPlacer::getCursorFx()
-+{
-+ return points[idx].getCursorFx();
-+}
-+
-+void CGridPlacer::slotSetPoint(qint32 i, bool on)
-+{
-+ if(on)
-+ {
-+ idx = i;
-+ }
-+}
-+
-+void CGridPlacer::slotReset()
-+{
-+ for(CGridPoint& point : points)
-+ {
-+ point.setPoint(NOPOINTF);
-+ }
-+
-+ updateStatus();
-+
-+ item->getDrawContext()->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void CGridPlacer::updateStatus()
-+{
-+ /// @todo optimize this
-+
-+ const QPointF& pt1 = points[0].getPoint();
-+ const QPointF& pt2 = points[1].getPoint();
-+ const QPointF& pt3 = points[2].getPoint();
-+ const QPointF& pt4 = points[3].getPoint();
-+
-+ statusIsOk = true;
-+
-+ if(pt1 == NOPOINTF)
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint1->setText(tr("Point 1 - not set"));
-+ }
-+ else
-+ {
-+ labelStatusPoint1->setText("<b style='color: green'>" + tr("Point 1 - ok") + "</b>");
-+
-+ if((pt2 != NOPOINTF) && (pt2.x() < pt1.x()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint1->setText("<b style='color: red'>" + tr("Point 1 - bad") + "</b>");
-+ }
-+ if((pt4 != NOPOINTF) && (pt4.y() < pt1.y()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint1->setText("<b style='color: red'>" + tr("Point 1 - bad") + "</b>");
-+ }
-+ }
-+
-+ if(pt2 == NOPOINTF)
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint2->setText(tr("Point 2 - not set"));
-+ }
-+ else
-+ {
-+ labelStatusPoint2->setText("<b style='color: green'>" + tr("Point 2 - ok") + "</b>");
-+
-+ if((pt1 != NOPOINTF) && (pt1.x() > pt2.x()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint2->setText("<b style='color: red'>" + tr("Point 2 - bad") + "</b>");
-+ }
-+ if((pt3 != NOPOINTF) && (pt3.y() < pt2.y()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint2->setText("<b style='color: red'>" + tr("Point 2 - bad") + "</b>");
-+ }
-+ }
-+
-+
-+ if(pt3 == NOPOINTF)
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint3->setText(tr("Point 3 - not set"));
-+ }
-+ else
-+ {
-+ labelStatusPoint3->setText("<b style='color: green'>" + tr("Point 3 - ok") + "</b>");
-+
-+ if((pt4 != NOPOINTF) && (pt4.x() > pt3.x()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint3->setText("<b style='color: red'>" + tr("Point 3 - bad") + "</b>");
-+ }
-+ if((pt2 != NOPOINTF) && (pt2.y() > pt3.y()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint3->setText("<b style='color: red'>" + tr("Point 3 - bad") + "</b>");
-+ }
-+ }
-+
-+
-+ if(pt4 == NOPOINTF)
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint4->setText(tr("Point 4 - not set"));
-+ }
-+ else
-+ {
-+ labelStatusPoint4->setText("<b style='color: green'>" + tr("Point 4 - ok") + "</b>");
-+
-+ if((pt3 != NOPOINTF) && (pt3.x() < pt4.x()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint4->setText("<b style='color: red'>" + tr("Point 4 - bad") + "</b>");
-+ }
-+ if((pt1 != NOPOINTF) && (pt1.y() > pt4.y()))
-+ {
-+ statusIsOk = false;
-+ labelStatusPoint4->setText("<b style='color: red'>" + tr("Point 4 - bad") + "</b>");
-+ }
-+ }
-+
-+ pushSetArea->setEnabled(statusIsOk);
-+
-+ emit sigChanged();
-+}
-+
-+
-+void CGridPlacer::slotSetArea() const
-+{
-+ qreal bottom = -NOFLOAT;
-+ qreal top = NOFLOAT;
-+ qreal left = NOFLOAT;
-+ qreal right = -NOFLOAT;
-+
-+ for(const CGridPoint& point : points)
-+ {
-+ const QPointF& pt = point.getPoint();
-+
-+ top = qMin(pt.y(), top);
-+ bottom = qMax(pt.y(), bottom);
-+ left = qMin(pt.x(), left);
-+ right = qMax(pt.x(), right);
-+ }
-+
-+ QRectF r(0,0,1,1);
-+ r.setLeft(left);
-+ r.setRight(right);
-+ r.setTop(top);
-+ r.setBottom(bottom);
-+
-+
-+ emit sigSetArea(r);
-+}
-diff --git a/src/qmaptool/overlay/gridtool/CGridPlacer.h b/src/qmaptool/overlay/gridtool/CGridPlacer.h
-new file mode 100644
-index 00000000..8d321041
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridPlacer.h
-@@ -0,0 +1,85 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CGRIDPLACER_H
-+#define CGRIDPLACER_H
-+
-+#include "canvas/CCanvas.h"
-+#include "overlay/gridtool/CGridPoint.h"
-+
-+#include "ui_IGridPlacer.h"
-+
-+class CItemRefMap;
-+class QSettings;
-+
-+class CGridPlacer : public QWidget, private Ui::IGridPlacer
-+{
-+ Q_OBJECT
-+public:
-+ CGridPlacer(QWidget * parent);
-+ virtual ~CGridPlacer() = default;
-+
-+ void registerItem(CItemRefMap * item);
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw);
-+ void mouseMoveEventFx(QMouseEvent *e);
-+ void mouseReleaseEventFx(QMouseEvent *e);
-+ void leaveEventFx(QEvent *e);
-+ QCursor getCursorFx();
-+
-+ bool isOk() const
-+ {
-+ return statusIsOk;
-+ }
-+
-+ const QPointF& getPoint(int idx) const
-+ {
-+ if(idx < points.count())
-+ {
-+ return points[idx].getPoint();
-+ }
-+ return NOPOINTF;
-+ }
-+
-+signals:
-+ void sigChanged();
-+ void sigSetArea(const QRectF& area) const;
-+
-+public slots:
-+ void slotReset();
-+
-+private slots:
-+ void slotSetPoint(qint32 i, bool on);
-+ void slotSetArea() const;
-+
-+private:
-+ void updateStatus();
-+ CItemRefMap * item = nullptr;
-+
-+ qint32 idx = 0;
-+
-+ QVector<CGridPoint> points;
-+
-+ bool statusIsOk = false;
-+};
-+
-+#endif //CGRIDPLACER_H
-+
-diff --git a/src/qmaptool/overlay/gridtool/CGridPoint.cpp b/src/qmaptool/overlay/gridtool/CGridPoint.cpp
-new file mode 100644
-index 00000000..b1a1cf6e
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridPoint.cpp
-@@ -0,0 +1,184 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "helpers/CDraw.h"
-+#include "items/CItemRefMap.h"
-+#include "overlay/gridtool/CGridPoint.h"
-+
-+#include <QtWidgets>
-+
-+CGridPoint::CGridPoint()
-+{
-+}
-+
-+void CGridPoint::registerItem(CItemRefMap * item)
-+{
-+ this->item = item;
-+
-+ if(item != nullptr)
-+ {
-+ context = item->getDrawContext();
-+ if(context == nullptr)
-+ {
-+ this->item = nullptr;
-+ }
-+ }
-+ else
-+ {
-+ context = nullptr;
-+ }
-+}
-+
-+bool CGridPoint::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ if(ptFocus1 != NOPOINTF)
-+ {
-+ QPointF pt = ptFocus1;
-+ context->convertMap2Screen(pt);
-+ CDraw::drawCrossHairDot(p, pt);
-+ }
-+
-+ if(ptPoint != NOPOINTF)
-+ {
-+ QPointF pt = ptPoint;
-+ context->convertMap2Screen(pt);
-+
-+ QRectF dot1(0,0,7,7);
-+ dot1.moveCenter(pt);
-+
-+ if(state == eStateHighlight)
-+ {
-+ p.setPen(QPen(QColor("#ffaa00"), 2));
-+ p.setBrush(QColor("#ffaa00"));
-+ }
-+ else
-+ {
-+ p.setPen(QPen(Qt::white, 1));
-+ p.setBrush(QColor("#ffaa00"));
-+ }
-+
-+ p.drawRect(dot1);
-+ }
-+
-+ return true;
-+}
-+
-+void CGridPoint::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ QPointF pt = e->pos();
-+
-+
-+ switch(state)
-+ {
-+ case eStateMove:
-+ case eStateNotSet:
-+ context->convertScreen2Map(pt);
-+ ptFocus1 = pt;
-+ break;
-+
-+ case eStateSet:
-+ {
-+ QPointF point = ptPoint;
-+ context->convertMap2Screen(point);
-+ if((point - pt).manhattanLength() < 30)
-+ {
-+ state = eStateHighlight;
-+ }
-+ break;
-+ }
-+
-+ case eStateHighlight:
-+ {
-+ QPointF point = ptPoint;
-+ context->convertMap2Screen(point);
-+ if((point - pt).manhattanLength() >= 30)
-+ {
-+ state = eStateSet;
-+ }
-+ break;
-+ }
-+ }
-+
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void CGridPoint::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ switch(state)
-+ {
-+ case eStateMove:
-+ case eStateNotSet:
-+ ptPoint = ptFocus1;
-+ ptFocus1 = NOPOINTF;
-+ state = eStateSet;
-+ CCanvas::restoreOverrideCursor("CGridPoint::mouseReleaseEventFx");
-+ break;
-+
-+ case eStateSet:
-+ break;
-+
-+ case eStateHighlight:
-+ ptFocus1 = ptPoint;
-+ ptPoint = NOPOINTF;
-+ state = eStateMove;
-+ CCanvas::setOverrideCursor(Qt::BlankCursor, "CGridPoint::mouseReleaseEventFx");
-+ break;
-+ }
-+
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+void CGridPoint::leaveEventFx(QEvent *e)
-+{
-+ ptFocus1 = NOPOINTF;
-+
-+ switch(state)
-+ {
-+ case eStateNotSet:
-+ case eStateSet:
-+ break;
-+
-+ case eStateHighlight:
-+ case eStateMove:
-+ state = eStateSet;
-+ break;
-+ }
-+
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+}
-+
-+QCursor CGridPoint::getCursorFx()
-+{
-+ switch(state)
-+ {
-+ case eStateNotSet:
-+ return Qt::BlankCursor;
-+
-+ case eStateSet:
-+ return Qt::ArrowCursor;
-+
-+ case eStateHighlight:
-+ return Qt::ArrowCursor;
-+
-+ case eStateMove:
-+ return Qt::BlankCursor;
-+ }
-+
-+ return Qt::ArrowCursor;
-+}
-diff --git a/src/qmaptool/overlay/gridtool/CGridPoint.h b/src/qmaptool/overlay/gridtool/CGridPoint.h
-new file mode 100644
-index 00000000..5db2d868
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridPoint.h
-@@ -0,0 +1,70 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CGRIDPOINT_H
-+#define CGRIDPOINT_H
-+
-+#include "canvas/CCanvas.h"
-+#include "units/IUnit.h"
-+
-+class CItemRefMap;
-+class IDrawContext;
-+
-+class CGridPoint
-+{
-+public:
-+ CGridPoint();
-+ virtual ~CGridPoint() = default;
-+
-+ void registerItem(CItemRefMap * item);
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw);
-+ void mouseMoveEventFx(QMouseEvent *e);
-+ void mouseReleaseEventFx(QMouseEvent *e);
-+ void leaveEventFx(QEvent *e);
-+ QCursor getCursorFx();
-+
-+ const QPointF& getPoint() const
-+ {
-+ return ptPoint;
-+ }
-+
-+ void setPoint(const QPointF& pt)
-+ {
-+ ptPoint = pt;
-+ state = pt == NOPOINTF ? eStateNotSet : eStateSet;
-+ }
-+
-+private:
-+ enum state_e
-+ {
-+ eStateNotSet
-+ ,eStateSet
-+ ,eStateHighlight
-+ ,eStateMove
-+ };
-+
-+ state_e state = eStateNotSet;
-+ CItemRefMap * item = nullptr;
-+ const IDrawContext * context = nullptr;
-+ QPointF ptPoint = NOPOINTF;
-+ QPointF ptFocus1 = NOPOINTF;
-+};
-+
-+#endif //CGRIDPOINT_H
-+
-diff --git a/src/qmaptool/overlay/gridtool/CGridSelArea.cpp b/src/qmaptool/overlay/gridtool/CGridSelArea.cpp
-new file mode 100644
-index 00000000..d929633d
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridSelArea.cpp
-@@ -0,0 +1,240 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "helpers/CDraw.h"
-+#include "items/CItemRefMap.h"
-+#include "overlay/gridtool/CGridSelArea.h"
-+
-+#include <QtWidgets>
-+
-+CGridSelArea::CGridSelArea(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setupUi(this);
-+ labelHelp->setText(tr("Select the area to be covered by the calculated reference points. Simply grab "
-+ "the corners of the selection rectangle with a left click and place them where "
-+ "you want with a second click."));
-+}
-+
-+
-+void CGridSelArea::registerItem(CItemRefMap * item)
-+{
-+ this->item = item;
-+
-+ if(item != nullptr)
-+ {
-+ context = item->getDrawContext();
-+ if(context == nullptr)
-+ {
-+ this->item = nullptr;
-+ }
-+ }
-+ else
-+ {
-+ context = nullptr;
-+ }
-+}
-+
-+void CGridSelArea::saveSettings(QSettings& cfg)
-+{
-+ cfg.setValue("area", area);
-+}
-+
-+void CGridSelArea::loadSettings(QSettings& cfg)
-+{
-+ area = cfg.value("area", QRectF()).toRectF();
-+ emit sigChanged();
-+}
-+
-+bool CGridSelArea::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ if(area.isEmpty())
-+ {
-+ return false;
-+ }
-+
-+ QRectF rect = area;
-+ context->convertMap2Screen(rect);
-+
-+ rectTopLeft.moveTopLeft(rect.topLeft());
-+ rectTopRight.moveTopRight(rect.topRight());
-+ rectBottomLeft.moveBottomLeft(rect.bottomLeft());
-+ rectBottomRight.moveBottomRight(rect.bottomRight());
-+
-+ CDraw::drawRectangle(p, rectTopLeft, Qt::black, Qt::lightGray);
-+ CDraw::drawRectangle(p, rectTopRight, Qt::black, Qt::lightGray);
-+ CDraw::drawRectangle(p, rectBottomLeft, Qt::black, Qt::lightGray);
-+ CDraw::drawRectangle(p, rectBottomRight, Qt::black, Qt::lightGray);
-+
-+ p.setBrush(Qt::red);
-+ switch(corner)
-+ {
-+ case eCornerTopLeft:
-+ CDraw::drawRectangle(p, rectTopLeft, Qt::black, Qt::red);
-+ break;
-+
-+ case eCornerTopRight:
-+ CDraw::drawRectangle(p, rectTopRight, Qt::black, Qt::red);
-+ break;
-+
-+ case eCornerBottomLeft:
-+ CDraw::drawRectangle(p, rectBottomLeft, Qt::black, Qt::red);
-+ break;
-+
-+ case eCornerBottomRight:
-+ CDraw::drawRectangle(p, rectBottomRight, Qt::black, Qt::red);
-+ break;
-+ }
-+
-+ CDraw::drawRectangle(p, rect, QPen(Qt::black), Qt::NoBrush);
-+
-+ return true;
-+}
-+
-+void CGridSelArea::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ switch(state)
-+ {
-+ case eStateIdle:
-+ {
-+ corner_e _corner = corner;
-+ QPoint pos = e->pos();
-+ if(rectTopLeft.contains(pos))
-+ {
-+ offset = pos - rectTopLeft.topLeft();
-+ corner = eCornerTopLeft;
-+ }
-+ else if(rectTopRight.contains(pos))
-+ {
-+ offset = pos - rectTopRight.topRight();
-+ corner = eCornerTopRight;
-+ }
-+ else if(rectBottomLeft.contains(pos))
-+ {
-+ offset = pos - rectBottomLeft.bottomLeft();
-+ corner = eCornerBottomLeft;
-+ }
-+ else if(rectBottomRight.contains(pos))
-+ {
-+ offset = pos - rectBottomRight.bottomRight();
-+ corner = eCornerBottomRight;
-+ }
-+ else
-+ {
-+ corner = eCornerNone;
-+ }
-+
-+ if(corner != _corner)
-+ {
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+ }
-+
-+ break;
-+ }
-+
-+ case eStateMove:
-+ {
-+ QPointF pos = e->pos() - offset;
-+ context->convertScreen2Map(pos);
-+
-+ switch(corner)
-+ {
-+ case eCornerTopLeft:
-+ area.setTopLeft(pos);
-+ break;
-+
-+ case eCornerTopRight:
-+ area.setTopRight(pos);
-+ break;
-+
-+ case eCornerBottomLeft:
-+ area.setBottomLeft(pos);
-+ break;
-+
-+ case eCornerBottomRight:
-+ area.setBottomRight(pos);
-+ break;
-+ }
-+
-+ emit sigChanged();
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+ break;
-+ }
-+ }
-+}
-+
-+void CGridSelArea::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ if(e->button() == Qt::LeftButton)
-+ {
-+ switch(state)
-+ {
-+ case eStateIdle:
-+ {
-+ if(corner != eCornerNone)
-+ {
-+ areaSave = area;
-+ state = eStateMove;
-+ }
-+ break;
-+ }
-+
-+ case eStateMove:
-+ {
-+ corner = eCornerNone;
-+ state = eStateIdle;
-+ break;
-+ }
-+ }
-+ }
-+ else
-+ {
-+ area = areaSave;
-+ state = eStateIdle;
-+ corner = eCornerNone;
-+ }
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+ emit sigChanged();
-+}
-+
-+void CGridSelArea::leaveEventFx(QEvent *e)
-+{
-+}
-+
-+QCursor CGridSelArea::getCursorFx()
-+{
-+ return Qt::ArrowCursor;
-+}
-+
-+
-+void CGridSelArea::slotSetArea(const QRectF& rect)
-+{
-+ area = rect;
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+ emit sigChanged();
-+}
-+
-+void CGridSelArea::slotReset()
-+{
-+ area = QRectF();
-+ state = eStateIdle;
-+ corner = eCornerNone;
-+ context->triggerCompleteUpdate(CCanvas::eRedrawOverlay);
-+ emit sigChanged();
-+}
-diff --git a/src/qmaptool/overlay/gridtool/CGridSelArea.h b/src/qmaptool/overlay/gridtool/CGridSelArea.h
-new file mode 100644
-index 00000000..1505c106
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridSelArea.h
-@@ -0,0 +1,97 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CGRIDSELAREA_H
-+#define CGRIDSELAREA_H
-+
-+#include "canvas/CCanvas.h"
-+#include "ui_IGridSelArea.h"
-+
-+class CItemRefMap;
-+class QSettings;
-+class IDrawContext;
-+
-+
-+class CGridSelArea : public QWidget, private Ui::IGridSelArea
-+{
-+ Q_OBJECT
-+public:
-+ CGridSelArea(QWidget * parent);
-+ virtual ~CGridSelArea() = default;
-+
-+ void registerItem(CItemRefMap * item);
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw);
-+ void mouseMoveEventFx(QMouseEvent *e);
-+ void mouseReleaseEventFx(QMouseEvent *e);
-+ void leaveEventFx(QEvent *e);
-+ QCursor getCursorFx();
-+
-+ const QRectF& getArea() const
-+ {
-+ return area;
-+ }
-+
-+public slots:
-+ void slotSetArea(const QRectF& rect);
-+ void slotReset();
-+
-+
-+signals:
-+ void sigChanged();
-+
-+private:
-+ CItemRefMap * item = nullptr;
-+ const IDrawContext * context = nullptr;
-+
-+ QRectF area;
-+ QRectF areaSave;
-+ QPointF offset;
-+
-+ QRectF rectTopLeft {0, 0, 20, 20};
-+ QRectF rectTopRight {0, 0, 20, 20};
-+ QRectF rectBottomLeft {0, 0, 20, 20};
-+ QRectF rectBottomRight {0, 0, 20, 20};
-+
-+ enum state_e
-+ {
-+ eStateIdle
-+ ,eStateMove
-+ };
-+
-+ state_e state = eStateIdle;
-+
-+ enum corner_e
-+ {
-+ eCornerNone
-+ , eCornerTopLeft
-+ , eCornerTopRight
-+ , eCornerBottomLeft
-+ , eCornerBottomRight
-+ , eCornerPrint
-+ , eCornerImage
-+ };
-+
-+ corner_e corner = eCornerNone;
-+};
-+
-+#endif //CGRIDSELAREA_H
-+
-diff --git a/src/qmaptool/overlay/gridtool/CGridSetRef.cpp b/src/qmaptool/overlay/gridtool/CGridSetRef.cpp
-new file mode 100644
-index 00000000..c027cf15
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridSetRef.cpp
-@@ -0,0 +1,105 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "overlay/gridtool/CGridSetRef.h"
-+#include "overlay/refmap/CProjWizard.h"
-+
-+#include <QtWidgets>
-+
-+CGridSetRef::CGridSetRef(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setupUi(this);
-+
-+ connect(toolGridProj, &QToolButton::clicked, this, &CGridSetRef::slotSetupGridProj);
-+ connect(lineEasting, &QLineEdit::textChanged, this, &CGridSetRef::sigChanged);
-+ connect(lineNorthing, &QLineEdit::textChanged, this, &CGridSetRef::sigChanged);
-+ connect(lineHorizSpacing, &QLineEdit::textChanged, this, &CGridSetRef::sigChanged);
-+ connect(lineVertSpacing, &QLineEdit::textChanged, this, &CGridSetRef::sigChanged);
-+ connect(lineGridProj, &QLineEdit::textChanged, this, &CGridSetRef::sigChanged);
-+
-+ labelHelp->setText(tr("Valid coordinate formats: If the projection is lat/lon all values have to be in degree, e.g. \"48.2\" or \"12.4\". "
-+ "For all other projections values are either in multiple of meter or feet. If you are doing it wrong the entry field "
-+ "will turn red."
-+ ));
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+}
-+
-+void CGridSetRef::saveSettings(QSettings& cfg)
-+{
-+ cfg.setValue("proj", lineGridProj->text());
-+ cfg.setValue("easting", lineEasting->text().toDouble());
-+ cfg.setValue("northing", lineNorthing->text().toDouble());
-+ cfg.setValue("horizSpacing", lineHorizSpacing->text().toDouble());
-+ cfg.setValue("vertSpacing", lineVertSpacing->text().toDouble());
-+}
-+
-+void CGridSetRef::loadSettings(QSettings& cfg)
-+{
-+ lineGridProj->setText(cfg.value("proj","").toString());
-+ lineEasting->setText(cfg.value("easting","").toString());
-+ lineNorthing->setText(cfg.value("northing","").toString());
-+ lineHorizSpacing->setText(cfg.value("horizSpacing","").toString());
-+ lineVertSpacing->setText(cfg.value("vertSpacing","").toString());
-+ lineGridProj->setCursorPosition(0);
-+}
-+
-+
-+bool CGridSetRef::isOk()
-+{
-+ bool allOk = true;
-+
-+ bool ok = CProjWizard::validProjStr(lineGridProj->text());
-+ markWidget(lineGridProj, ok);
-+ allOk &= ok;
-+
-+ ok &= lineEasting->text().toDouble(&ok) != 0;
-+ markWidget(lineEasting, ok);
-+ allOk &= ok;
-+
-+ ok &= lineNorthing->text().toDouble(&ok) != 0;
-+ markWidget(lineNorthing, ok);
-+ allOk &= ok;
-+
-+ ok &= lineHorizSpacing->text().toDouble(&ok) != 0;
-+ markWidget(lineHorizSpacing, ok);
-+ allOk &= ok;
-+
-+ ok &= lineVertSpacing->text().toDouble(&ok) != 0;
-+ markWidget(lineVertSpacing, ok);
-+ allOk &= ok;
-+
-+ return allOk;
-+}
-+
-+void CGridSetRef::slotSetupGridProj()
-+{
-+ CProjWizard dlg(*lineGridProj, this);
-+ dlg.exec();
-+ lineGridProj->setCursorPosition(0);
-+}
-+
-+void CGridSetRef::slotReset()
-+{
-+ lineGridProj->clear();
-+ lineEasting->clear();
-+ lineNorthing->clear();
-+ lineHorizSpacing->clear();
-+ lineVertSpacing->clear();
-+}
-diff --git a/src/qmaptool/overlay/gridtool/CGridSetRef.h b/src/qmaptool/overlay/gridtool/CGridSetRef.h
-new file mode 100644
-index 00000000..7956b0d3
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/CGridSetRef.h
-@@ -0,0 +1,86 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CGRIDSETREF_H
-+#define CGRIDSETREF_H
-+
-+#include "ui_IGridSetRef.h"
-+
-+class QSettings;
-+
-+class CGridSetRef : public QWidget, private Ui::IGridSetRef
-+{
-+ Q_OBJECT
-+public:
-+ CGridSetRef(QWidget * parent);
-+ virtual ~CGridSetRef() = default;
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+ bool isOk();
-+
-+ QString getProjection() const
-+ {
-+ return lineGridProj->text();
-+ }
-+
-+ qreal getEasting() const
-+ {
-+ return lineEasting->text().toDouble();
-+ }
-+
-+ qreal getNorthing() const
-+ {
-+ return lineNorthing->text().toDouble();
-+ }
-+
-+ qreal getHorizSpacing() const
-+ {
-+ return lineHorizSpacing->text().toDouble();
-+ }
-+
-+ qreal getVertSpacing() const
-+ {
-+ return lineVertSpacing->text().toDouble();
-+ }
-+
-+signals:
-+ void sigChanged();
-+
-+public slots:
-+ void slotReset();
-+
-+private slots:
-+ void slotSetupGridProj();
-+
-+private:
-+ template<typename T>
-+ void markWidget(T * w, bool isOk)
-+ {
-+ QPalette pal = T(this).palette();
-+ if(!isOk)
-+ {
-+ pal.setColor(QPalette::Base, "#ffaa7f");
-+ }
-+ w->setPalette(pal);
-+ }
-+};
-+
-+#endif //CGRIDSETREF_H
-+
-diff --git a/src/qmaptool/overlay/gridtool/IGridPlacer.ui b/src/qmaptool/overlay/gridtool/IGridPlacer.ui
-new file mode 100644
-index 00000000..833585ad
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/IGridPlacer.ui
-@@ -0,0 +1,248 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IGridPlacer</class>
-+ <widget class="QWidget" name="IGridPlacer">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>254</width>
-+ <height>224</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout" stretch="0">
-+ <property name="spacing">
-+ <number>0</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <layout class="QGridLayout" name="gridLayout">
-+ <item row="1" column="1">
-+ <widget class="QRadioButton" name="radioPoint1">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="checked">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="1">
-+ <widget class="QRadioButton" name="radioPoint4">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="2">
-+ <widget class="QLabel" name="label_4">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="pixmap">
-+ <pixmap resource="../../resources.qrc">:/pic/line_3px_horizontal.png</pixmap>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignCenter</set>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="3">
-+ <widget class="QRadioButton" name="radioPoint3">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="3">
-+ <widget class="QLabel" name="label_3">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="pixmap">
-+ <pixmap resource="../../resources.qrc">:/pic/line_3px_vertical.png</pixmap>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignCenter</set>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="3">
-+ <widget class="QRadioButton" name="radioPoint2">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="1">
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="pixmap">
-+ <pixmap resource="../../resources.qrc">:/pic/line_3px_vertical.png</pixmap>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignCenter</set>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="4">
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item row="2" column="2">
-+ <widget class="QPushButton" name="pushReset">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>Reset</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="2">
-+ <widget class="QLabel" name="label_5">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="pixmap">
-+ <pixmap resource="../../resources.qrc">:/pic/line_3px_horizontal.png</pixmap>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignCenter</set>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="5">
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <item>
-+ <widget class="QLabel" name="labelStatusPoint1">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelStatusPoint2">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelStatusPoint3">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelStatusPoint4">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushSetArea">
-+ <property name="text">
-+ <string>Set Area</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item row="0" column="0" colspan="6">
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources>
-+ <include location="../../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/overlay/gridtool/IGridSelArea.ui b/src/qmaptool/overlay/gridtool/IGridSelArea.ui
-new file mode 100644
-index 00000000..dd3f4a04
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/IGridSelArea.ui
-@@ -0,0 +1,49 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IGridSelArea</class>
-+ <widget class="QWidget" name="IGridSelArea">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>300</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>0</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>TextLabel</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/overlay/gridtool/IGridSetRef.ui b/src/qmaptool/overlay/gridtool/IGridSetRef.ui
-new file mode 100644
-index 00000000..68fe4d31
---- /dev/null
-+++ b/src/qmaptool/overlay/gridtool/IGridSetRef.ui
-@@ -0,0 +1,117 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IGridSetRef</class>
-+ <widget class="QWidget" name="IGridSetRef">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>133</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>Grid Projection:</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <widget class="QLineEdit" name="lineGridProj"/>
-+ </item>
-+ <item>
-+ <widget class="QToolButton" name="toolGridProj">
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../resources.qrc">
-+ <normaloff>:/icons/32x32/GridWizard.png</normaloff>:/icons/32x32/GridWizard.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>TextLabel</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QGridLayout" name="gridLayout">
-+ <item row="0" column="0">
-+ <widget class="QLabel" name="label_2">
-+ <property name="text">
-+ <string>Easting</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="1">
-+ <widget class="QLineEdit" name="lineEasting"/>
-+ </item>
-+ <item row="0" column="2">
-+ <widget class="QLabel" name="label_3">
-+ <property name="text">
-+ <string>Horiz. Spacing</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="3">
-+ <widget class="QLineEdit" name="lineHorizSpacing"/>
-+ </item>
-+ <item row="1" column="0">
-+ <widget class="QLabel" name="label_4">
-+ <property name="text">
-+ <string>Northing</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="1">
-+ <widget class="QLineEdit" name="lineNorthing"/>
-+ </item>
-+ <item row="1" column="2">
-+ <widget class="QLabel" name="labelVertSpacing">
-+ <property name="text">
-+ <string>Vert. Spacing</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="3">
-+ <widget class="QLineEdit" name="lineVertSpacing"/>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources>
-+ <include location="../../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/overlay/refmap/CDialogRefPoint.cpp b/src/qmaptool/overlay/refmap/CDialogRefPoint.cpp
-new file mode 100644
-index 00000000..895ef920
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/CDialogRefPoint.cpp
-@@ -0,0 +1,74 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "overlay/refmap/CDialogRefPoint.h"
-+#include "units/IUnit.h"
-+
-+#include <QtWidgets>
-+
-+CDialogRefPoint::CDialogRefPoint(QPointF& ptPtx, QPointF& ptRef, QWidget *parent)
-+ : QDialog(parent)
-+ , ptPtx(ptPtx)
-+ , ptRef(ptRef)
-+{
-+ setupUi(this);
-+ connect(lineCoord, &QLineEdit::textEdited, this, &CDialogRefPoint::slotEditPosition);
-+
-+ lineX->setText(QString::number(qRound(ptPtx.x())));
-+ lineY->setText(QString::number(qRound(ptPtx.y())));
-+ if(ptRef != NOPOINTF)
-+ {
-+ QString str;
-+ if(IUnit::degToStr(ptRef.x(), ptRef.y(), str))
-+ {
-+ str = tr("bad coordinate");
-+ }
-+ lineCoord->setText(str);
-+ }
-+
-+ labelWarning->hide();
-+}
-+
-+void CDialogRefPoint::slotEditPosition(const QString& str)
-+{
-+ labelWarning->setVisible(!IUnit::isValidCoordString(str));
-+}
-+
-+void CDialogRefPoint::accept()
-+{
-+ bool ok;
-+ ptPtx.setX(lineX->text().toInt(&ok));
-+ if(!ok)
-+ {
-+ QMessageBox::warning(this, tr("Error"), tr("Bad value for X pixel."), QMessageBox::Ok);
-+ return;
-+ }
-+ ptPtx.setY(lineY->text().toInt(&ok));
-+ if(!ok)
-+ {
-+ QMessageBox::warning(this, tr("Error"), tr("Bad value for Y pixel."), QMessageBox::Ok);
-+ return;
-+ }
-+
-+ if(!IUnit::strToDeg(lineCoord->text(), ptRef.rx(), ptRef.ry()))
-+ {
-+ return;
-+ }
-+
-+ QDialog::accept();
-+}
-diff --git a/src/qmaptool/overlay/refmap/CDialogRefPoint.h b/src/qmaptool/overlay/refmap/CDialogRefPoint.h
-new file mode 100644
-index 00000000..67bc5df5
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/CDialogRefPoint.h
-@@ -0,0 +1,46 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CDIALOGREFPOINT_H
-+#define CDIALOGREFPOINT_H
-+
-+#include "ui_IDialogRefPoint.h"
-+#include <QDialog>
-+
-+class QPointF;
-+
-+class CDialogRefPoint : public QDialog, private Ui::IDialogRefPoint
-+{
-+ Q_OBJECT
-+public:
-+ CDialogRefPoint(QPointF& ptPtx, QPointF& ptRef, QWidget * parent);
-+ virtual ~CDialogRefPoint() = default;
-+
-+public slots:
-+ void accept() override;
-+
-+private slots:
-+ void slotEditPosition(const QString& str);
-+
-+private:
-+ QPointF& ptPtx;
-+ QPointF& ptRef;
-+};
-+
-+#endif //CDIALOGREFPOINT_H
-+
-diff --git a/src/qmaptool/overlay/refmap/COverlayRefMapPoint.cpp b/src/qmaptool/overlay/refmap/COverlayRefMapPoint.cpp
-new file mode 100644
-index 00000000..eae52331
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/COverlayRefMapPoint.cpp
-@@ -0,0 +1,52 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "overlay/refmap/COverlayRefMapPoint.h"
-+#include "units/IUnit.h"
-+
-+COverlayRefMapPoint::COverlayRefMapPoint(qint32 cnt, const QPointF &ptRef, const QPointF &ptPtx, QTreeWidget *parent)
-+ : QTreeWidgetItem(parent)
-+{
-+ setText(eColumnCnt, QString::number(cnt));
-+ setPtPtx(ptPtx);
-+ setPtRef(ptRef);
-+}
-+
-+void COverlayRefMapPoint::setPtPtx(const QPointF& pt)
-+{
-+ ptPtx.rx() = qRound(pt.x());
-+ ptPtx.ry() = qRound(pt.y());
-+ setText(eColumnXY, QString("%1, %2").arg(ptPtx.x()).arg(ptPtx.y()));
-+}
-+
-+void COverlayRefMapPoint::setPtRef(const QPointF& pt)
-+{
-+ ptRef = pt;
-+ QString str;
-+ if(!IUnit::self().degToStr(ptRef.x(), ptRef.y(), str))
-+ {
-+ str = tr("bad coordinate");
-+ }
-+ setText(eColumnLonLat, str);
-+}
-+
-+void COverlayRefMapPoint::setIndex(int n)
-+{
-+ setText(eColumnCnt, QString::number(n));
-+}
-+
-diff --git a/src/qmaptool/overlay/refmap/COverlayRefMapPoint.h b/src/qmaptool/overlay/refmap/COverlayRefMapPoint.h
-new file mode 100644
-index 00000000..53bced7c
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/COverlayRefMapPoint.h
-@@ -0,0 +1,67 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef COVERLAYREFMAPPOINT_H
-+#define COVERLAYREFMAPPOINT_H
-+
-+#include <QCoreApplication>
-+#include <QTreeWidgetItem>
-+
-+class COverlayRefMapPoint : public QTreeWidgetItem
-+{
-+ Q_DECLARE_TR_FUNCTIONS(COverlayRefMapPoint)
-+public:
-+ COverlayRefMapPoint(qint32 cnt, const QPointF& ptRef, const QPointF& ptPtx, QTreeWidget * parent);
-+ virtual ~COverlayRefMapPoint() = default;
-+
-+ enum column_e
-+ {
-+ eColumnCnt
-+ , eColumnXY
-+ , eColumnLonLat
-+ };
-+
-+ void setPtPtx(const QPointF& pt);
-+ void setPtRef(const QPointF& pt);
-+ void setIndex(int n);
-+
-+ const QPointF& getPtPtx() const
-+ {
-+ return ptPtx;
-+ }
-+
-+ const QPointF& getPtRef() const
-+ {
-+ return ptRef;
-+ }
-+
-+ bool operator<(const QTreeWidgetItem& p) const override
-+ {
-+ const COverlayRefMapPoint& pt = dynamic_cast<const COverlayRefMapPoint&>(p);
-+ qreal v1 = ptPtx.y() * 1000000000 + ptPtx.x();
-+ qreal v2 = pt.ptPtx.y() * 1000000000 + pt.ptPtx.x();
-+ return v1 < v2;
-+ }
-+
-+private:
-+ QPointF ptRef;
-+ QPointF ptPtx;
-+};
-+
-+#endif //COVERLAYREFMAPPOINT_H
-+
-diff --git a/src/qmaptool/overlay/refmap/CProjWizard.cpp b/src/qmaptool/overlay/refmap/CProjWizard.cpp
-new file mode 100644
-index 00000000..2f325932
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/CProjWizard.cpp
-@@ -0,0 +1,237 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "helpers/mitab.h"
-+#include "overlay/refmap/CProjWizard.h"
-+
-+#include <proj_api.h>
-+#include <QtWidgets>
-+
-+struct mitab_entry_t
-+{
-+ QString name;
-+ int idx;
-+};
-+
-+static bool mitabLessThan(const mitab_entry_t &s1, const mitab_entry_t &s2)
-+{
-+ return s1.name < s2.name;
-+}
-+
-+CProjWizard::CProjWizard(QLineEdit &line, QWidget * parent)
-+ : QDialog(parent)
-+ , line(line)
-+{
-+ setupUi(this);
-+ QList<mitab_entry_t> list;
-+ int idx = 0;
-+ const MapInfoDatumInfo * di = asDatumInfoListQL;
-+
-+ while(di->nMapInfoDatumID != -1)
-+ {
-+ mitab_entry_t entry;
-+ entry.name = di->pszOGCDatumName;
-+ entry.idx = idx;
-+ list << entry;
-+ ++di;
-+ ++idx;
-+ }
-+ qSort(list.begin(), list.end(), mitabLessThan);
-+
-+ for(const mitab_entry_t &entry : list)
-+ {
-+ comboDatum->addItem(entry.name, entry.idx);
-+ }
-+
-+ comboHemisphere->addItem(tr("north"), "");
-+ comboHemisphere->addItem(tr("south"), "+south");
-+
-+ connect(radioMercator, &QRadioButton::clicked, this, &CProjWizard::slotChange);
-+ connect(radioWorldMercator, &QRadioButton::clicked, this, &CProjWizard::slotChange);
-+ connect(radioUPSNorth, &QRadioButton::clicked, this, &CProjWizard::slotChange);
-+ connect(radioUPSSouth, &QRadioButton::clicked, this, &CProjWizard::slotChange);
-+ connect(radioUTM, &QRadioButton::clicked, this, &CProjWizard::slotChange);
-+ connect(radioUserDef, &QRadioButton::clicked, this, &CProjWizard::slotChange);
-+ connect(lineUserDef, &QLineEdit::textChanged, this, &CProjWizard::slotChange);
-+
-+ connect(spinUTMZone, static_cast<void (QSpinBox::*)(int) >(&QSpinBox::valueChanged), this, &CProjWizard::slotChange);
-+ connect(comboDatum, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &CProjWizard::slotChange);
-+ connect(comboHemisphere, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &CProjWizard::slotChange);
-+
-+ QString projstr = line.text();
-+ QRegExp re2("\\s*\\+proj=merc \\+a=6378137 \\+b=6378137 \\+lat_ts=0.001 \\+lon_0=0.0 \\+x_0=0.0 \\+y_0=0 \\+k=1.0 \\+units=m \\+nadgrids=@null \\+no_defs");
-+ QRegExp re3("\\s*\\+proj=merc\\s(.*)");
-+ QRegExp re4("\\s*\\+proj=utm \\+zone=([0-9]+)\\s(.*)");
-+
-+ if(re2.exactMatch(projstr))
-+ {
-+ radioWorldMercator->setChecked(true);
-+ }
-+ else if(re3.exactMatch(projstr))
-+ {
-+ radioMercator->setChecked(true);
-+ findDatum(re3.cap(1));
-+ }
-+ else if(re4.exactMatch(projstr))
-+ {
-+ radioUTM->setChecked(true);
-+ spinUTMZone->setValue(re4.cap(1).toInt());
-+
-+ QString datum = re4.cap(2);
-+ if(datum.startsWith("+south "))
-+ {
-+ datum = datum.mid(7);
-+ comboHemisphere->setCurrentIndex(1);
-+ }
-+
-+ findDatum(datum);
-+ }
-+
-+ slotChange();
-+}
-+
-+CProjWizard::~CProjWizard()
-+{
-+}
-+
-+
-+void CProjWizard::findDatum(const QString& str)
-+{
-+ QString cmp;
-+ int idx = 0;
-+ const MapInfoDatumInfo * di = asDatumInfoListQL;
-+
-+ while(di->nMapInfoDatumID != -1)
-+ {
-+ cmp.clear();
-+ if(di->pszOGCDatumName != QString())
-+ {
-+ const MapInfoSpheroidInfo * si = asSpheroidInfoList;
-+ while(si->nMapInfoId != -1)
-+ {
-+ if(si->nMapInfoId == di->nEllipsoid)
-+ {
-+ break;
-+ }
-+ ++si;
-+ }
-+
-+ cmp += QString("+a=%1 +b=%2 ").arg(si->dfA,0,'f',4).arg(si->dfA * (1.0 - (1.0/si->dfInvFlattening)),0,'f',4);
-+ cmp += QString("+towgs84=%1,%2,%3,%4,%5,%6,%7,%8 ").arg(di->dfShiftX).arg(di->dfShiftY).arg(di->dfShiftZ).arg(di->dfDatumParm0).arg(di->dfDatumParm1).arg(di->dfDatumParm2).arg(di->dfDatumParm3).arg(di->dfDatumParm4);
-+ cmp += "+units=m +no_defs";
-+ }
-+
-+ if(cmp == str)
-+ {
-+ comboDatum->setCurrentIndex(comboDatum->findText(di->pszOGCDatumName));
-+ break;
-+ }
-+
-+ ++di;
-+ ++idx;
-+ }
-+}
-+
-+
-+void CProjWizard::slotChange()
-+{
-+ QString str;
-+ if(radioMercator->isChecked())
-+ {
-+ str += "+proj=merc ";
-+ }
-+ else if(radioWorldMercator->isChecked())
-+ {
-+ str += "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.001 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs";
-+ labelResult->setText(str);
-+ return;
-+ }
-+ else if(radioUPSNorth->isChecked())
-+ {
-+ str += "+init=epsg:32661";
-+ }
-+ else if(radioUPSSouth->isChecked())
-+ {
-+ str += "+init=epsg:32761";
-+ }
-+ else if(radioUTM->isChecked())
-+ {
-+ str += QString("+proj=utm +zone=%1 %2 ").arg(spinUTMZone->value()).arg(comboHemisphere->itemData(comboHemisphere->currentIndex()).toString());
-+ }
-+ else if(radioUserDef->isChecked())
-+ {
-+ str += lineUserDef->text() + " ";
-+ }
-+
-+ int idx = comboDatum->itemData(comboDatum->currentIndex()).toInt();
-+ const MapInfoDatumInfo di = asDatumInfoListQL[idx];
-+ if(di.pszOGCDatumName != QString())
-+ {
-+ const MapInfoSpheroidInfo * si = asSpheroidInfoList;
-+ while(si->nMapInfoId != -1)
-+ {
-+ if(si->nMapInfoId == di.nEllipsoid)
-+ {
-+ break;
-+ }
-+ ++si;
-+ }
-+
-+ str += QString("+a=%1 +b=%2 ").arg(si->dfA,0,'f',4).arg(si->dfA * (1.0 - (1.0/si->dfInvFlattening)),0,'f',4);
-+ str += QString("+towgs84=%1,%2,%3,%4,%5,%6,%7,%8 ").arg(di.dfShiftX).arg(di.dfShiftY).arg(di.dfShiftZ).arg(di.dfDatumParm0).arg(di.dfDatumParm1).arg(di.dfDatumParm2).arg(di.dfDatumParm3).arg(di.dfDatumParm4);
-+ str += "+units=m +no_defs";
-+ }
-+
-+ labelResult->setText(str);
-+}
-+
-+
-+void CProjWizard::accept()
-+{
-+ if (CProjWizard::validProjStr(labelResult->text()))
-+ {
-+ line.setText(labelResult->text());
-+ line.setCursorPosition(0);
-+ QDialog::accept();
-+ }
-+}
-+
-+
-+bool CProjWizard::validProjStr(const QString projStr)
-+{
-+ if(projStr.isEmpty())
-+ {
-+ return false;
-+ }
-+
-+ projPJ projCheck = pj_init_plus(projStr.toUtf8().data());
-+
-+ if (!projCheck)
-+ { /* For some reason pj_errno does not work as expected in some versions of Visual Studio, so using pj_get_errno_ref instead */
-+ QMessageBox::warning(&CMainWindow::self(), tr("Error..."),tr("The value\n'%1'\nis not a valid coordinate system definition:\n%2").arg(projStr).arg(pj_strerrno(*pj_get_errno_ref())),QMessageBox::Abort,QMessageBox::Abort);
-+ return false;
-+ }
-+ else
-+ {
-+ pj_free(projCheck);
-+ return true;
-+ }
-+}
-+
-+
-diff --git a/src/qmaptool/overlay/refmap/CProjWizard.h b/src/qmaptool/overlay/refmap/CProjWizard.h
-new file mode 100644
-index 00000000..5cd1f38f
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/CProjWizard.h
-@@ -0,0 +1,44 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CPROJWIZARD_H
-+#define CPROJWIZARD_H
-+
-+#include "ui_IProjWizard.h"
-+#include <QDialog>
-+
-+class CProjWizard : public QDialog, private Ui::IProjWizard
-+{
-+ Q_OBJECT
-+public:
-+ CProjWizard(QLineEdit& line, QWidget *parent);
-+ virtual ~CProjWizard();
-+ static bool validProjStr(const QString projStr);
-+
-+public slots:
-+ void accept() override;
-+ void slotChange();
-+
-+private:
-+ void findDatum(const QString& str);
-+
-+ QLineEdit& line;
-+};
-+
-+#endif //CPROJWIZARD_H
-+
-diff --git a/src/qmaptool/overlay/refmap/IDialogRefPoint.ui b/src/qmaptool/overlay/refmap/IDialogRefPoint.ui
-new file mode 100644
-index 00000000..7e1ecd4e
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/IDialogRefPoint.ui
-@@ -0,0 +1,131 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IDialogRefPoint</class>
-+ <widget class="QDialog" name="IDialogRefPoint">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>510</width>
-+ <height>191</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Dialog</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <layout class="QGridLayout" name="gridLayout">
-+ <item row="1" column="2" colspan="3">
-+ <widget class="QLineEdit" name="lineCoord"/>
-+ </item>
-+ <item row="0" column="0">
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>Coord. Map File [pixel]</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="1">
-+ <widget class="QLabel" name="label_4">
-+ <property name="text">
-+ <string>x</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="2">
-+ <widget class="QLineEdit" name="lineX"/>
-+ </item>
-+ <item row="0" column="3">
-+ <widget class="QLabel" name="label_5">
-+ <property name="text">
-+ <string>y</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="0">
-+ <widget class="QLabel" name="label_2">
-+ <property name="text">
-+ <string>Coord. lat/lon WGS84 [°]</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="4">
-+ <widget class="QLineEdit" name="lineY"/>
-+ </item>
-+ <item row="2" column="2" colspan="3">
-+ <widget class="QLabel" name="labelWarning">
-+ <property name="text">
-+ <string>Bad position format. Must be:
-+&quot;[N|S] ddd mm.sss [W|E] ddd mm.sss&quot;
-+or
-+&quot;[N|S] ddd.ddd [W|E] ddd.ddd&quot;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <widget class="QDialogButtonBox" name="buttonBox">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="standardButtons">
-+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>accepted()</signal>
-+ <receiver>IDialogRefPoint</receiver>
-+ <slot>accept()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>248</x>
-+ <y>254</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>157</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>rejected()</signal>
-+ <receiver>IDialogRefPoint</receiver>
-+ <slot>reject()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>316</x>
-+ <y>260</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>286</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ </connections>
-+</ui>
-diff --git a/src/qmaptool/overlay/refmap/IProjWizard.ui b/src/qmaptool/overlay/refmap/IProjWizard.ui
-new file mode 100644
-index 00000000..3f78eec9
---- /dev/null
-+++ b/src/qmaptool/overlay/refmap/IProjWizard.ui
-@@ -0,0 +1,210 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IProjWizard</class>
-+ <widget class="QDialog" name="IProjWizard">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>440</width>
-+ <height>280</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Proj4 Wizard</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <widget class="QFrame" name="frame">
-+ <property name="frameShape">
-+ <enum>QFrame::StyledPanel</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Raised</enum>
-+ </property>
-+ <layout class="QGridLayout">
-+ <item row="1" column="1">
-+ <widget class="QRadioButton" name="radioMercator">
-+ <property name="text">
-+ <string>Mercator</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="5" column="1">
-+ <layout class="QHBoxLayout">
-+ <item>
-+ <widget class="QRadioButton" name="radioUTM">
-+ <property name="text">
-+ <string>UTM</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label_3">
-+ <property name="text">
-+ <string>zone</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QSpinBox" name="spinUTMZone">
-+ <property name="minimum">
-+ <number>1</number>
-+ </property>
-+ <property name="maximum">
-+ <number>60</number>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QComboBox" name="comboHemisphere"/>
-+ </item>
-+ <item>
-+ <spacer>
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ <item row="6" column="1">
-+ <layout class="QHBoxLayout">
-+ <item>
-+ <widget class="QRadioButton" name="radioUserDef">
-+ <property name="text">
-+ <string>user defined</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLineEdit" name="lineUserDef"/>
-+ </item>
-+ </layout>
-+ </item>
-+ <item row="7" column="0">
-+ <widget class="QLabel" name="label_2">
-+ <property name="text">
-+ <string>Datum</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="7" column="1">
-+ <widget class="QComboBox" name="comboDatum"/>
-+ </item>
-+ <item row="2" column="1">
-+ <widget class="QRadioButton" name="radioWorldMercator">
-+ <property name="text">
-+ <string>World Mercator (OSM)</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="8" column="1">
-+ <spacer>
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item row="9" column="0">
-+ <widget class="QLabel" name="label_4">
-+ <property name="text">
-+ <string>Result:</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="9" column="1">
-+ <widget class="QLabel" name="labelResult">
-+ <property name="text">
-+ <string/>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="1">
-+ <widget class="QRadioButton" name="radioUPSNorth">
-+ <property name="text">
-+ <string>UPS North (North Pole)</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="4" column="1">
-+ <widget class="QRadioButton" name="radioUPSSouth">
-+ <property name="text">
-+ <string>UPS South (South Pole)</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="0">
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>Projection</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <widget class="QDialogButtonBox" name="buttonBox">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="standardButtons">
-+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>accepted()</signal>
-+ <receiver>IProjWizard</receiver>
-+ <slot>accept()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>248</x>
-+ <y>254</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>157</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>rejected()</signal>
-+ <receiver>IProjWizard</receiver>
-+ <slot>reject()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>316</x>
-+ <y>260</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>286</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ </connections>
-+</ui>
-diff --git a/src/qmaptool/resources.qrc b/src/qmaptool/resources.qrc
-new file mode 100644
-index 00000000..9dc34535
---- /dev/null
-+++ b/src/qmaptool/resources.qrc
-@@ -0,0 +1,93 @@
-+<RCC>
-+ <qresource prefix="/">
-+ <file>../animation/loader.gif</file>
-+
-+ <file>../cursors/cursorPointAdd.png</file>
-+ <file>../cursors/cursorPointDel.png</file>
-+ <file>../cursors/cursorPointMove.png</file>
-+
-+ <file>../icons/32x32/AddOverview.png</file>
-+ <file>../icons/32x32/Add.png</file>
-+ <file>../icons/32x32/Apply.png</file>
-+ <file>../icons/32x32/Cancel.png</file>
-+ <file>../icons/32x32/Check.png</file>
-+ <file>../icons/32x32/CombineMap.png</file>
-+ <file>../icons/32x32/CutMap.png</file>
-+ <file>../icons/32x32/DeleteMultiple.png</file>
-+ <file>../icons/32x32/DeleteOne.png</file>
-+ <file>../icons/32x32/Export.png</file>
-+ <file>../icons/32x32/FolderMap.png</file>
-+ <file>../icons/32x32/GridTool.png</file>
-+ <file>../icons/32x32/GridWizard.png</file>
-+ <file>../icons/32x32/Info.png</file>
-+ <file>../icons/32x32/LoadGcp.png</file>
-+ <file>../icons/32x32/LoadShape.png</file>
-+ <file>../icons/32x32/MapLayer.png</file>
-+ <file>../icons/32x32/MouseWheel.png</file>
-+ <file>../icons/32x32/MoveArrow.png</file>
-+ <file>../icons/32x32/PathBlue.png</file>
-+ <file>../icons/32x32/PointAdd.png</file>
-+ <file>../icons/32x32/PointDelAll.png</file>
-+ <file>../icons/32x32/PointDel.png</file>
-+ <file>../icons/32x32/PointMove.png</file>
-+ <file>../icons/32x32/QMapTool.png</file>
-+ <file>../icons/32x32/Rasterize.png</file>
-+ <file>../icons/32x32/RefAdd.png</file>
-+ <file>../icons/32x32/RefDelAll.png</file>
-+ <file>../icons/32x32/RefDel.png</file>
-+ <file>../icons/32x32/ReferenceMap.png</file>
-+ <file>../icons/32x32/RefMoveAuto.png</file>
-+ <file>../icons/32x32/RefMove.png</file>
-+ <file>../icons/32x32/Reload.png</file>
-+ <file>../icons/32x32/Reset.png</file>
-+ <file>../icons/32x32/SaveGcp.png</file>
-+ <file>../icons/32x32/SaveShape.png</file>
-+ <file>../icons/32x32/SetupCoordFormat.png</file>
-+ <file>../icons/32x32/Sort.png</file>
-+ <file>../icons/32x32/UnitSetup.png</file>
-+
-+ <file>../icons/48x48/AddOverview.png</file>
-+ <file>../icons/48x48/Add.png</file>
-+ <file>../icons/48x48/Apply.png</file>
-+ <file>../icons/48x48/Cancel.png</file>
-+ <file>../icons/48x48/Check.png</file>
-+ <file>../icons/48x48/CombineMap.png</file>
-+ <file>../icons/48x48/CutMap.png</file>
-+ <file>../icons/48x48/DeleteMultiple.png</file>
-+ <file>../icons/48x48/DeleteOne.png</file>
-+ <file>../icons/48x48/Export.png</file>
-+ <file>../icons/48x48/FolderMap.png</file>
-+ <file>../icons/48x48/GridTool.png</file>
-+ <file>../icons/48x48/GridWizard.png</file>
-+ <file>../icons/48x48/Info.png</file>
-+ <file>../icons/48x48/LoadGcp.png</file>
-+ <file>../icons/48x48/LoadShape.png</file>
-+ <file>../icons/48x48/MapLayer.png</file>
-+ <file>../icons/48x48/MouseWheel.png</file>
-+ <file>../icons/48x48/MoveArrow.png</file>
-+ <file>../icons/48x48/PathBlue.png</file>
-+ <file>../icons/48x48/PointAdd.png</file>
-+ <file>../icons/48x48/PointDelAll.png</file>
-+ <file>../icons/48x48/PointDel.png</file>
-+ <file>../icons/48x48/PointMove.png</file>
-+ <file>../icons/48x48/QMapTool.png</file>
-+ <file>../icons/48x48/Rasterize.png</file>
-+ <file>../icons/48x48/RefAdd.png</file>
-+ <file>../icons/48x48/RefDelAll.png</file>
-+ <file>../icons/48x48/RefDel.png</file>
-+ <file>../icons/48x48/ReferenceMap.png</file>
-+ <file>../icons/48x48/RefMoveAuto.png</file>
-+ <file>../icons/48x48/RefMove.png</file>
-+ <file>../icons/48x48/Reload.png</file>
-+ <file>../icons/48x48/Reset.png</file>
-+ <file>../icons/48x48/SaveGcp.png</file>
-+ <file>../icons/48x48/SaveShape.png</file>
-+ <file>../icons/48x48/SetupCoordFormat.png</file>
-+ <file>../icons/48x48/Sort.png</file>
-+ <file>../icons/48x48/UnitSetup.png</file>
-+
-+ <file>pic/line_3px_horizontal.png</file>
-+ <file>pic/line_3px_vertical.png</file>
-+ <file>pic/splash.png</file>
-+ </qresource>
-+</RCC>
-diff --git a/src/qmaptool/setup/CAppOpts.h b/src/qmaptool/setup/CAppOpts.h
-new file mode 100644
-index 00000000..88992b17
---- /dev/null
-+++ b/src/qmaptool/setup/CAppOpts.h
-@@ -0,0 +1,47 @@
-+/**********************************************************************************************
-+ Copyright (C) 2009 Joerg Wunsch <j@uriah.heep.sax.de>
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+#ifndef CAPPOPTS_H
-+#define CAPPOPTS_H
-+/*
-+ * This class holds the options passed from the command-line,
-+ * including the positional arguments.
-+ */
-+
-+#include <QStringList>
-+
-+class CAppOpts
-+{
-+public:
-+ const bool debug; // -d, print debug messages
-+ const bool logfile; // -f, print debug messages to logfile
-+ const bool nosplash; // -n, do not display splash screen
-+ const QString configfile;
-+ const QStringList arguments;
-+
-+ CAppOpts(bool doDebug, bool doLogfile, bool noSplash, const QString& config, const QStringList& args)
-+ : debug(doDebug)
-+ , logfile(doLogfile)
-+ , nosplash(noSplash)
-+ , configfile(config)
-+ , arguments(args)
-+ {
-+ }
-+};
-+
-+extern CAppOpts *qlOpts;
-+#endif //CAPPOPTS_H
-diff --git a/src/qmaptool/setup/CAppSetupLinux.cpp b/src/qmaptool/setup/CAppSetupLinux.cpp
-new file mode 100644
-index 00000000..e2d012d8
---- /dev/null
-+++ b/src/qmaptool/setup/CAppSetupLinux.cpp
-@@ -0,0 +1,62 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "config.h"
-+#include "setup/CAppSetupLinux.h"
-+
-+#ifndef _MKSTR_1
-+#define _MKSTR_1(x) #x
-+#define _MKSTR(x) _MKSTR_1(x)
-+#endif
-+
-+void CAppSetupLinux::initQMapTool()
-+{
-+ prepareGdal("", "");
-+
-+ // setup translators
-+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-+ QString translationPath = QCoreApplication::applicationDirPath();
-+ translationPath.replace(QRegExp("bin$"), "share/qmaptool/translations");
-+ prepareTranslator(resourceDir, "qt_");
-+ prepareTranslator(translationPath, "qmaptool_");
-+
-+ // create directories
-+ IAppSetup::path(logDir(), 0, true, "LOG");
-+
-+ prepareToolPaths();
-+}
-+
-+
-+
-+QString CAppSetupLinux::defaultCachePath()
-+{
-+ return IAppSetup::path(QDir::home().absolutePath(), ".QMapTool/", false, 0);
-+}
-+
-+
-+QString CAppSetupLinux::userDataPath(QString subdir)
-+{
-+ QString path = QDir::home().absoluteFilePath(CONFIGDIR);
-+ return IAppSetup::path(path, subdir, false, 0);
-+}
-+
-+
-+QString CAppSetupLinux::logDir()
-+{
-+ return QDir::temp().absolutePath();
-+}
-diff --git a/src/qmaptool/setup/CAppSetupLinux.h b/src/qmaptool/setup/CAppSetupLinux.h
-new file mode 100644
-index 00000000..a0d26b45
---- /dev/null
-+++ b/src/qmaptool/setup/CAppSetupLinux.h
-@@ -0,0 +1,44 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CAPPSETUPLINUX_H
-+#define CAPPSETUPLINUX_H
-+
-+#include "setup/IAppSetup.h"
-+
-+#include <QtCore>
-+
-+class CAppSetupLinux : public IAppSetup
-+{
-+public:
-+ CAppSetupLinux(QObject * parent)
-+ : IAppSetup(parent)
-+ {
-+ }
-+
-+ ~CAppSetupLinux() = default;
-+ void initQMapTool() override;
-+
-+ QString defaultCachePath() override;
-+ QString userDataPath(QString subdir = 0) override;
-+ QString logDir() override;
-+ QString findExecutable(const QString &name) override { return QStandardPaths::findExecutable(name); }
-+};
-+
-+
-+#endif // CAPPSETUPLINUX_H
-diff --git a/src/qmaptool/setup/CAppSetupMac.cpp b/src/qmaptool/setup/CAppSetupMac.cpp
-new file mode 100644
-index 00000000..8d7ab0a2
---- /dev/null
-+++ b/src/qmaptool/setup/CAppSetupMac.cpp
-@@ -0,0 +1,140 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "setup/CAppSetupMac.h"
-+
-+static QString relTranslationDir = "Resources/translations"; // app
-+static QString relGdalDir = "Resources/gdal"; // app
-+static QString relProjDir = "Resources/proj"; // app
-+static QString relBinDir = "Tools"; // app
-+
-+static QString relLogDir = "Library/Logs"; // home
-+
-+
-+void CAppSetupMac::extendPath()
-+{
-+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
-+ QStringList envlist = env.toStringList();
-+ QString value = "";
-+ for(int i=0; i < envlist.size(); i++)
-+ {
-+ QString entry = envlist[i];
-+ if(entry.startsWith("PATH="))
-+ {
-+ int index = entry.indexOf("=");
-+
-+ if(index != -1)
-+ {
-+ value = entry.right(entry.length() - (index+1)) + ":";
-+ }
-+ break;
-+ }
-+ }
-+ QString binDir = getApplicationDir(relBinDir).absolutePath();
-+ qDebug() << "BIN" << binDir;
-+ value += binDir;
-+ qputenv("PATH", value.toLatin1().constData());
-+
-+ prepareToolPaths();
-+}
-+
-+
-+void CAppSetupMac::initQMapTool()
-+{
-+ extendPath();
-+ // setup gdal
-+ QString gdalDir = getApplicationDir(relGdalDir).absolutePath();
-+ QString projDir = getApplicationDir(relProjDir).absolutePath();
-+ prepareGdal(gdalDir, projDir);
-+
-+ // setup translators
-+ QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
-+ prepareTranslator(translationPath, "qt_");
-+ prepareTranslator(translationPath, "qmaptool_");
-+
-+ migrateDirContent(defaultCachePath());
-+ migrateDirContent(userDataPath());
-+
-+ // create directories
-+ IAppSetup::path(logDir(), 0, false, "LOG");
-+}
-+
-+
-+QString CAppSetupMac::defaultCachePath()
-+{
-+ QString cachePath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).first();
-+ return IAppSetup::path(cachePath, 0, false, 0);
-+}
-+
-+
-+QString CAppSetupMac::userDataPath(QString subdir)
-+{
-+#if QT_VERSION >= 0x050400
-+ QString dataDir = QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation).first();
-+#else
-+ QString dataDir = QStandardPaths::standardLocations(QStandardPaths::DataLocation).first();
-+#endif
-+ return IAppSetup::path(dataDir, subdir, false, 0);
-+}
-+
-+
-+QString CAppSetupMac::logDir()
-+{
-+ // home location returns / (root) instead of user home...
-+ QString home = QStandardPaths::standardLocations(QStandardPaths::DesktopLocation).first();
-+ QDir dir = QDir(home);
-+ dir.cdUp();
-+ return IAppSetup::path(dir.absolutePath(), relLogDir, false, 0);
-+}
-+
-+
-+QDir CAppSetupMac::getApplicationDir(QString subdir)
-+{
-+ QDir appDir(QCoreApplication::applicationDirPath());
-+ appDir.cdUp();
-+ appDir.cd(subdir);
-+ return appDir;
-+}
-+
-+
-+void CAppSetupMac::migrateDirContent(QString dest)
-+{
-+ QString src = dest;
-+ src.replace("/QLandkarte/", "/");
-+ QDir dirDest = QDir(dest);
-+ QDir dirSource = QDir(src);
-+
-+ if (!dirDest.exists() && dirSource.exists())
-+ {
-+ qDebug() << "src directory for migration" << src;
-+ qDebug() << "dst directory for migration" << dest;
-+
-+ QDir wdir;
-+ QString newdir = dest;
-+ newdir.remove("/QMapTool");
-+ wdir.mkdir(newdir);
-+ qDebug() << "directory created" << newdir;
-+
-+ qDebug() << "migrate data from "<<dirSource.absolutePath() << "to" << dirDest.absolutePath();
-+ QDir mvDir;
-+ if(!mvDir.rename(dirSource.absolutePath(), dirDest.absolutePath()))
-+ {
-+ qDebug() << "error migrating directory" << dirSource;
-+ }
-+ }
-+}
-diff --git a/src/qmaptool/setup/CAppSetupMac.h b/src/qmaptool/setup/CAppSetupMac.h
-new file mode 100644
-index 00000000..6afbb8f7
---- /dev/null
-+++ b/src/qmaptool/setup/CAppSetupMac.h
-@@ -0,0 +1,49 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CAPPSETUPMAC_H
-+#define CAPPSETUPMAC_H
-+
-+#include "setup/IAppSetup.h"
-+
-+#include <QtCore>
-+
-+
-+class CAppSetupMac : public IAppSetup
-+{
-+public:
-+ CAppSetupMac(QObject * parent)
-+ : IAppSetup(parent)
-+ {
-+ }
-+
-+ ~CAppSetupMac() = default;
-+ void initQMapTool() override;
-+
-+ QString defaultCachePath() override;
-+ QString userDataPath(QString subdir = 0) override;
-+ QString logDir() override;
-+ QString findExecutable(const QString &name) override { return QStandardPaths::findExecutable(name); }
-+
-+private:
-+ QDir getApplicationDir(QString subdir);
-+ void migrateDirContent(QString dest);
-+ void extendPath();
-+};
-+
-+#endif // CAPPSETUPMAC_H
-diff --git a/src/qmaptool/setup/CAppSetupWin.cpp b/src/qmaptool/setup/CAppSetupWin.cpp
-new file mode 100644
-index 00000000..ede10da7
---- /dev/null
-+++ b/src/qmaptool/setup/CAppSetupWin.cpp
-@@ -0,0 +1,69 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "config.h"
-+#include "setup/CAppSetupWin.h"
-+
-+
-+void CAppSetupWin::initQMapTool()
-+{
-+ // setup environment variables for GDAL/Proj4
-+ QString apppath = QCoreApplication::applicationDirPath();
-+ apppath = apppath.replace("/", "\\");
-+ QString gdalDir = QString("%1\\data").arg(apppath);
-+ QString projDir = QString("%1\\share\\proj").arg(apppath);
-+
-+ qunsetenv("GDAL_DRIVER_PATH");
-+ prepareGdal(gdalDir, projDir);
-+
-+ QString appResourceDir = QString("%1\\translations").arg(apppath).toUtf8();
-+ prepareTranslator(appResourceDir, "qtbase_");
-+ prepareTranslator(appResourceDir, "qmaptool_");
-+
-+ // limit PATH to application directory in order to avoid that wrong .dll's are loaded
-+ path = apppath.toUtf8();
-+ qputenv("PATH", path);
-+
-+ // create directories
-+ IAppSetup::path(logDir(), 0, true, "LOG");
-+
-+ prepareToolPaths();
-+}
-+
-+QString CAppSetupWin::defaultCachePath()
-+{
-+ return IAppSetup::path(QDir::home().absolutePath(), ".QMapTool/", false, 0);
-+}
-+
-+
-+QString CAppSetupWin::userDataPath(QString subdir)
-+{
-+ QString path = QDir::home().absoluteFilePath(CONFIGDIR);
-+ return IAppSetup::path(path, subdir, false, 0);
-+}
-+
-+
-+QString CAppSetupWin::logDir()
-+{
-+ return QDir::temp().absolutePath();
-+}
-+
-+QString CAppSetupWin::findExecutable(const QString &name)
-+{
-+ return QStandardPaths::findExecutable(name);
-+}
-diff --git a/src/qmaptool/setup/CAppSetupWin.h b/src/qmaptool/setup/CAppSetupWin.h
-new file mode 100644
-index 00000000..4ef0043e
---- /dev/null
-+++ b/src/qmaptool/setup/CAppSetupWin.h
-@@ -0,0 +1,45 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CAPPSETUPWIN_H
-+#define CAPPSETUPWIN_H
-+
-+#include "setup/IAppSetup.h"
-+
-+#include <QtCore>
-+
-+class CAppSetupWin : public IAppSetup
-+{
-+public:
-+ CAppSetupWin(QObject * parent)
-+ : IAppSetup(parent)
-+ {
-+ }
-+
-+ ~CAppSetupWin() = default;
-+ void initQMapTool() override;
-+
-+ QString defaultCachePath() override;
-+ QString userDataPath(QString subdir = 0) override;
-+ QString logDir() override;
-+ QString findExecutable(const QString &name) override;
-+
-+ QByteArray path;
-+};
-+
-+#endif // CAPPSETUPWIN_H
-diff --git a/src/qmaptool/setup/CCommandProcessor.cpp b/src/qmaptool/setup/CCommandProcessor.cpp
-new file mode 100644
-index 00000000..b0cf6519
---- /dev/null
-+++ b/src/qmaptool/setup/CCommandProcessor.cpp
-@@ -0,0 +1,58 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "setup/CCommandProcessor.h"
-+
-+#include <iostream>
-+#include <QApplication>
-+#include <QCommandLineParser>
-+
-+
-+CAppOpts* CCommandProcessor::processOptions(const QStringList &arguments)
-+{
-+ QCommandLineParser parser;
-+ QCommandLineOption helpOption = parser.addHelpOption(); // h help
-+
-+ QCommandLineOption debugOption(QStringList() << "d" << "debug", tr("Print debug output to console."));
-+ parser.addOption(debugOption);
-+
-+ QCommandLineOption logfileOption(QStringList() << "f" << "logfile", tr("Print debug output to logfile (temp. path)."));
-+ parser.addOption(logfileOption);
-+
-+ QCommandLineOption nosplashOption(QStringList() << "n" << "no-splash", tr("Do not show splash screen."));
-+ parser.addOption(nosplashOption);
-+
-+ QCommandLineOption configOption(QStringList() << "c" << "config", tr("File with QMapTool configuration."), tr("file"));
-+ parser.addOption(configOption);
-+
-+ //parser.addPositionalArgument("files", tr("Files for future use."));
-+
-+ if (!parser.parse(arguments))
-+ {
-+ std::cerr << parser.errorText().toUtf8().constData();
-+ std::cerr << parser.helpText().toUtf8().constData();
-+ exit(1);
-+ }
-+ if (parser.isSet(helpOption))
-+ {
-+ std::cout << parser.helpText().toUtf8().constData();
-+ exit(0);
-+ }
-+
-+ return new CAppOpts(parser.isSet(debugOption), parser.isSet(logfileOption), parser.isSet(nosplashOption), parser.value(configOption), parser.positionalArguments());
-+}
-diff --git a/src/qmaptool/setup/CCommandProcessor.h b/src/qmaptool/setup/CCommandProcessor.h
-new file mode 100644
-index 00000000..55a41e8f
---- /dev/null
-+++ b/src/qmaptool/setup/CCommandProcessor.h
-@@ -0,0 +1,33 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CCOMMANDPROCESSOR_H
-+#define CCOMMANDPROCESSOR_H
-+
-+#include "setup/CAppOpts.h"
-+#include <QCoreApplication>
-+
-+class CCommandProcessor
-+{
-+ Q_DECLARE_TR_FUNCTIONS(CCommandProcessor)
-+public:
-+ CAppOpts* processOptions(const QStringList &arguments);
-+};
-+
-+
-+#endif // CCOMMANDPROCESSOR_H
-diff --git a/src/qmaptool/setup/CLogHandler.cpp b/src/qmaptool/setup/CLogHandler.cpp
-new file mode 100644
-index 00000000..41b87cc2
---- /dev/null
-+++ b/src/qmaptool/setup/CLogHandler.cpp
-@@ -0,0 +1,122 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "setup/CLogHandler.h"
-+#include <iostream>
-+
-+
-+CLogHandler::CLogHandler(QString logDirectory, bool writeToFile, bool debugOutput) :
-+ writeToFile(writeToFile), debugOutput(debugOutput), logFile(QDir(logDirectory).absoluteFilePath(logfileName())),
-+ fileStream(&logFile)
-+{
-+ if (writeToFile)
-+ {
-+ fileStream.setCodec("UTF-8");
-+ logFile.open(QIODevice::WriteOnly | QIODevice::Append);
-+ }
-+ qSetMessagePattern("%{time yyyy-MM-dd h:mm:ss.zzz} [%{type}] %{message}");
-+}
-+
-+void CLogHandler::log(QtMsgType type, const QMessageLogContext &context, const QString &msg)
-+{
-+#if QT_VERSION >= 0x050400
-+ QString txt = qFormatLogMessage(type, context, msg);
-+#else
-+ QString txt = msg;
-+#endif
-+ printToConsole(type, txt);
-+ appendToFile(type, txt);
-+}
-+
-+void CLogHandler::printLoggerInfo()
-+{
-+ qDebug() << "Log configuration:" << "log file=" << logFile.fileName() << "write to file=" << writeToFile <<
-+ "debug output=" << debugOutput;
-+}
-+
-+QString CLogHandler::logfileName()
-+{
-+ QStringList domainSplit = QCoreApplication::organizationDomain().split(".");
-+ QString fileName;
-+ for(const QString &part : domainSplit)
-+ {
-+ fileName = fileName.insert(0, part + ".");
-+ }
-+ fileName.append(QCoreApplication::applicationName() + ".log");
-+ return fileName;
-+}
-+
-+
-+void CLogHandler::appendToFile(QtMsgType type, QString formatedMsg)
-+{
-+ Q_UNUSED(type);
-+ if (writeToFile)
-+ {
-+ fileStream << formatedMsg << endl;
-+ }
-+}
-+
-+
-+void CLogHandler::printToConsole(QtMsgType type, QString formatedMsg)
-+{
-+ switch (type)
-+ {
-+ case QtDebugMsg:
-+ if (debugOutput)
-+ {
-+ std::cout << formatedMsg.toUtf8().constData() << std::endl;
-+ }
-+ break;
-+
-+#if QT_VERSION >= 0x050500
-+ case QtInfoMsg:
-+ std::cout << formatedMsg.toUtf8().constData() << std::endl;
-+ break;
-+
-+#endif
-+ case QtWarningMsg:
-+ std::cerr << formatedMsg.toUtf8().constData() << std::endl;
-+ break;
-+
-+ case QtCriticalMsg:
-+ std::cerr << formatedMsg.toUtf8().constData() << std::endl;
-+ break;
-+
-+ case QtFatalMsg:
-+ std::cerr << formatedMsg.toUtf8().constData() << std::endl;
-+ abort();
-+ break;
-+ }
-+}
-+
-+static CLogHandler* logHandler = nullptr;
-+
-+static void logCallback(QtMsgType type, const QMessageLogContext &context, const QString &msg)
-+{
-+ logHandler->log(type, context, msg);
-+}
-+
-+
-+void CLogHandler::initLogHandler(QString logDirectory, bool writeToFile, bool debugOutput)
-+{
-+ logHandler = new CLogHandler(logDirectory, writeToFile, debugOutput);
-+ qInstallMessageHandler(logCallback);
-+ logHandler->printLoggerInfo();
-+}
-+
-+
-diff --git a/src/qmaptool/setup/CLogHandler.h b/src/qmaptool/setup/CLogHandler.h
-new file mode 100644
-index 00000000..f544e3e3
---- /dev/null
-+++ b/src/qmaptool/setup/CLogHandler.h
-@@ -0,0 +1,47 @@
-+/**********************************************************************************************
-+ Copyright (C) 2015 Ivo Kronenberg
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CLOGHANDLER_H
-+#define CLOGHANDLER_H
-+
-+#include <QtCore>
-+
-+class CLogHandler
-+{
-+public:
-+ static void initLogHandler(QString logDirectory, bool writeToFile, bool debugOutput);
-+
-+ void log(QtMsgType type, const QMessageLogContext &context, const QString &msg);
-+
-+private:
-+ CLogHandler(QString logDirectory, bool writeToFile, bool debugOutput);
-+ void printLoggerInfo();
-+
-+ void appendToFile(QtMsgType type, QString formatedMsg);
-+ void printToConsole(QtMsgType type, QString formatedMsg);
-+
-+ QString logfileName();
-+
-+ bool writeToFile;
-+ bool debugOutput;
-+ QFile logFile;
-+ QTextStream fileStream;
-+};
-+
-+#endif // CLOGHANDLER_H
-+
-diff --git a/src/qmaptool/setup/CSetupExtTools.cpp b/src/qmaptool/setup/CSetupExtTools.cpp
-new file mode 100644
-index 00000000..54c37142
---- /dev/null
-+++ b/src/qmaptool/setup/CSetupExtTools.cpp
-@@ -0,0 +1,93 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "setup/CSetupExtTools.h"
-+#include "setup/IAppSetup.h"
-+
-+#include <QtWidgets>
-+
-+using std::bind;
-+
-+#define slot1(name, method) \
-+ std::bind(&CSetupExtTools::slotSetPathXOverride, this, name, [](const QString& path){IAppSetup::self().method(path); })
-+
-+#define slot2(method) \
-+ std::bind(&CSetupExtTools::slotResetPathXOverride, this, [](){IAppSetup::self().method(); })
-+
-+CSetupExtTools::CSetupExtTools(QWidget *parent)
-+ : QDialog(parent)
-+{
-+ setupUi(this);
-+ setupGui();
-+
-+ connect(toolPathGdaladdo, &QToolButton::pressed, this, slot1("gdaladdo", setGdaladdoOverride));
-+ connect(toolPathGdaltranslate, &QToolButton::pressed, this, slot1("gdal_translate", setGdaltranslateOverride));
-+ connect(toolPathGdalwarp, &QToolButton::pressed, this, slot1("gdalwarp", setGdalwarpOverride));
-+ connect(toolPathGdalbuildvrt, &QToolButton::pressed, this, slot1("gdalbuildvrt", setGdalbuildvrtOverride));
-+ connect(toolPathQmtrgb2pct, &QToolButton::pressed, this, slot1("qmt_rgb2pct", setQmtrgb2pctOverride));
-+ connect(toolPathQmtmap2jnx, &QToolButton::pressed, this, slot1("qmt_map2jnx", setQmtmap2jnxOverride));
-+
-+ connect(toolResetGdaladdo, &QToolButton::pressed, this, slot2(resetGdaladdoOverride));
-+ connect(toolResetGdaltranslate, &QToolButton::pressed, this, slot2(resetGdaltranslateOverride));
-+ connect(toolResetGdalwarp, &QToolButton::pressed, this, slot2(resetGdalwarpOverride));
-+ connect(toolResetGdalbuildvrt, &QToolButton::pressed, this, slot2(resetGdalbuildvrtOverride));
-+ connect(toolResetQmtrgb2pct, &QToolButton::pressed, this, slot2(resetQmtrgb2pctOverride));
-+ connect(toolResetQmtmap2jnx, &QToolButton::pressed, this, slot2(resetQmtmap2jnxOverride));
-+}
-+
-+void CSetupExtTools::setupGui()
-+{
-+ const IAppSetup& setup = IAppSetup::self();
-+ const QString& gdaladdo = setup.getGdaladdo();
-+ const QString& gdaltranslate = setup.getGdaltranslate();
-+ const QString& gdalwarp = setup.getGdalwarp();
-+ const QString& gdalbuildvrt = setup.getGdalbuildvrt();
-+ const QString& qmtrgb2pct = setup.getQmtrgb2pct();
-+ const QString& qmtmap2jnx = setup.getQmtmap2jnx();
-+
-+ labelPathGdaladdo->setText(gdaladdo.isEmpty() ? tr("<b style='color: red;'>not found</b>") : gdaladdo);
-+ labelPathGdaltranslate->setText(gdaltranslate.isEmpty() ? tr("<b style='color: red;'>not found</b>") : gdaltranslate);
-+ labelPathGdalwarp->setText(gdalwarp.isEmpty() ? tr("<b style='color: red;'>not found</b>") : gdalwarp);
-+ labelPathGdalbuildvrt->setText(gdalbuildvrt.isEmpty() ? tr("<b style='color: red;'>not found</b>") : gdalbuildvrt);
-+ labelPathQmtrgb2pct->setText(qmtrgb2pct.isEmpty() ? tr("<b style='color: red;'>not found</b>") : qmtrgb2pct);
-+ labelPathQmtmap2jnx->setText(qmtmap2jnx.isEmpty() ? tr("<b style='color: red;'>not found</b>") : qmtmap2jnx);
-+
-+ toolResetGdaladdo->setEnabled(setup.isGdaladdoOverride());
-+ toolResetGdaltranslate->setEnabled(setup.isGdaltranslateOverride());
-+ toolResetGdalwarp->setEnabled(setup.isGdalwarpOverride());
-+ toolResetGdalbuildvrt->setEnabled(setup.isGdalbuildvrtOverride());
-+ toolResetQmtrgb2pct->setEnabled(setup.isQmtrgb2pctOverride());
-+ toolResetQmtmap2jnx->setEnabled(setup.isQmtmap2jnxOverride());
-+}
-+
-+void CSetupExtTools::slotSetPathXOverride(const QString& name, fSetPath setPath)
-+{
-+ const QString& path = QFileDialog::getOpenFileName(this, tr("Select %1 binary...").arg(name), QDir::rootPath());
-+ if(path.isEmpty())
-+ {
-+ return;
-+ }
-+ setPath(path);
-+ setupGui();
-+}
-+
-+void CSetupExtTools::slotResetPathXOverride(fResetPath resetPath)
-+{
-+ resetPath();
-+ setupGui();
-+}
-diff --git a/src/qmaptool/setup/CSetupExtTools.h b/src/qmaptool/setup/CSetupExtTools.h
-new file mode 100644
-index 00000000..f93c264f
---- /dev/null
-+++ b/src/qmaptool/setup/CSetupExtTools.h
-@@ -0,0 +1,46 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CSETUPEXTTOOLS_H
-+#define CSETUPEXTTOOLS_H
-+
-+#include <functional>
-+#include <QDialog>
-+
-+#include "ui_ISetupExtTools.h"
-+
-+using fResetPath = std::function<void()>;
-+using fSetPath = std::function<void(const QString&)>;
-+
-+class CSetupExtTools : public QDialog, private Ui::ISetupExtTools
-+{
-+ Q_OBJECT
-+public:
-+ CSetupExtTools(QWidget * parent);
-+ virtual ~CSetupExtTools() = default;
-+
-+private slots:
-+ void slotSetPathXOverride(const QString& name, fSetPath setPath);
-+ void slotResetPathXOverride(fResetPath resetPath);
-+
-+private:
-+ void setupGui();
-+};
-+
-+#endif //CSETUPEXTTOOLS_H
-+
-diff --git a/src/qmaptool/setup/IAppSetup.cpp b/src/qmaptool/setup/IAppSetup.cpp
-new file mode 100644
-index 00000000..912dc0ef
---- /dev/null
-+++ b/src/qmaptool/setup/IAppSetup.cpp
-@@ -0,0 +1,161 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+
-+#include "setup/CCommandProcessor.h"
-+#include "setup/CLogHandler.h"
-+#include "setup/IAppSetup.h"
-+
-+#include "setup/CAppSetupLinux.h"
-+#include "setup/CAppSetupMac.h"
-+#include "setup/CAppSetupWin.h"
-+
-+#include "helpers/CSettings.h"
-+
-+#include <gdal.h>
-+
-+
-+IAppSetup* IAppSetup::pSelf = nullptr;
-+
-+IAppSetup& IAppSetup::self()
-+{
-+ return *pSelf;
-+}
-+
-+IAppSetup::~IAppSetup()
-+{
-+ SETTINGS;
-+ cfg.setValue("ExtTools/pathGdaladdoOverride",pathGdaladdoOverride);
-+ cfg.setValue("ExtTools/pathGdaltranslateOverride",pathGdaltranslateOverride);
-+ cfg.setValue("ExtTools/pathGdalwarpOverride",pathGdalwarpOverride);
-+ cfg.setValue("ExtTools/pathGdalbuildvrtOverride",pathGdalbuildvrtOverride);
-+ cfg.setValue("ExtTools/pathQmtrgb2pctOverride",pathQmtrgb2pctOverride);
-+ cfg.setValue("ExtTools/pathQmtmap2jnxOverride",pathQmtmap2jnxOverride);
-+}
-+
-+IAppSetup& IAppSetup::createInstance(QObject * parent)
-+{
-+ if(pSelf != nullptr)
-+ {
-+ return self();
-+ }
-+#if defined(Q_OS_MAC)
-+ new CAppSetupMac(parent);
-+#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(Q_OS_CYGWIN)
-+ new CAppSetupLinux(parent);
-+#elif defined (Q_OS_WIN32)
-+ new CAppSetupWin(parent);
-+#else
-+ #error OS not supported
-+#endif
-+ return self();
-+}
-+
-+void IAppSetup::prepareToolPaths()
-+{
-+ pathGdaladdo = this->findExecutable("gdaladdo");
-+ pathGdaltranslate = this->findExecutable("gdal_translate");
-+ pathGdalwarp = this->findExecutable("gdalwarp");
-+ pathGdalbuildvrt = this->findExecutable("gdalbuildvrt");
-+ pathQmtrgb2pct = this->findExecutable("qmt_rgb2pct");
-+ pathQmtmap2jnx = this->findExecutable("qmt_map2jnx");
-+
-+ SETTINGS;
-+ pathGdaladdoOverride = cfg.value("ExtTools/pathGdaladdoOverride",pathGdaladdoOverride).toString();
-+ pathGdaltranslateOverride = cfg.value("ExtTools/pathGdaltranslateOverride",pathGdaltranslateOverride).toString();
-+ pathGdalwarpOverride = cfg.value("ExtTools/pathGdalwarpOverride",pathGdalwarpOverride).toString();
-+ pathGdalbuildvrtOverride = cfg.value("ExtTools/pathGdalbuildvrtOverride", pathGdalbuildvrtOverride).toString();
-+ pathQmtrgb2pctOverride = cfg.value("ExtTools/pathQmtrgb2pctOverride", pathQmtrgb2pctOverride).toString();
-+ pathQmtmap2jnxOverride = cfg.value("ExtTools/pathQmtmap2jnxOverride", pathQmtmap2jnxOverride).toString();
-+}
-+
-+void IAppSetup::prepareGdal(QString gdalDir, QString projDir)
-+{
-+ if(!gdalDir.isEmpty())
-+ {
-+ qputenv("GDAL_DATA", gdalDir.toUtf8());
-+ qDebug() << "GDAL_DATA directory set to " + gdalDir;
-+ }
-+
-+ if(!projDir.isEmpty())
-+ {
-+ qputenv("PROJ_LIB", projDir.toUtf8());
-+ qDebug() << "PROJ_LIB directory set to " + projDir;
-+ }
-+
-+ GDALAllRegister();
-+}
-+
-+
-+QString IAppSetup::path(QString path, QString subdir, bool mkdir, QString debugName)
-+{
-+ QDir pathDir(path);
-+
-+ if(subdir != 0)
-+ {
-+ pathDir = QDir(pathDir.absoluteFilePath(subdir));
-+ }
-+ if(mkdir && !pathDir.exists())
-+ {
-+ pathDir.mkpath(pathDir.absolutePath());
-+ qDebug() << debugName << "path created" << pathDir.absolutePath();
-+ }
-+ else if (debugName != 0)
-+ {
-+ qDebug() << debugName << "path" << pathDir.absolutePath();
-+ }
-+ return pathDir.absolutePath();
-+}
-+
-+
-+void IAppSetup::prepareTranslator(QString translationPath, QString translationPrefix)
-+{
-+ QString locale = QLocale::system().name();
-+ QDir dir(translationPath);
-+ if(!QFile::exists(dir.absoluteFilePath(translationPrefix + locale)))
-+ {
-+ locale = locale.left(2);
-+ }
-+ qDebug() << "locale" << locale;
-+
-+ QApplication* app = (QApplication*) QCoreApplication::instance();
-+ QTranslator *qtTranslator = new QTranslator(app);
-+ if (qtTranslator->load(translationPrefix + locale, translationPath))
-+ {
-+ app->installTranslator(qtTranslator);
-+ qDebug() << "using file '"+ translationPath + "/" + translationPrefix + locale + ".qm' for translations.";
-+ }
-+ else
-+ {
-+ qWarning() << "no file found for translations '"+ translationPath + "/" + translationPrefix + locale + "' (using default).";
-+ }
-+}
-+
-+
-+void IAppSetup::initLogHandler()
-+{
-+ CLogHandler::initLogHandler(logDir(), qlOpts->logfile, qlOpts->debug);
-+}
-+
-+CAppOpts *qlOpts = nullptr;
-+
-+void IAppSetup::processArguments()
-+{
-+ CCommandProcessor cmdParse;
-+ qlOpts = cmdParse.processOptions(QCoreApplication::instance()->arguments());
-+}
-diff --git a/src/qmaptool/setup/IAppSetup.h b/src/qmaptool/setup/IAppSetup.h
-new file mode 100644
-index 00000000..6718332c
---- /dev/null
-+++ b/src/qmaptool/setup/IAppSetup.h
-@@ -0,0 +1,210 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef IAPPSETUP_H
-+#define IAPPSETUP_H
-+
-+#include "CAppOpts.h"
-+#include <QApplication>
-+#include <QtCore>
-+
-+
-+class IAppSetup : public QObject
-+{
-+ Q_OBJECT
-+public:
-+ static IAppSetup& self();
-+ static IAppSetup &createInstance(QObject * parent);
-+
-+ virtual ~IAppSetup();
-+
-+ virtual void initQMapTool() = 0;
-+ void initLogHandler();
-+ void processArguments();
-+
-+ virtual QString defaultCachePath() = 0;
-+ virtual QString userDataPath(QString subdir = 0) = 0;
-+ virtual QString logDir() = 0;
-+ virtual QString findExecutable(const QString &name) = 0;
-+
-+ QString getGdaladdo() const
-+ {
-+ return QFile::exists(pathGdaladdoOverride) ? pathGdaladdoOverride : QFile::exists(pathGdaladdo) ? pathGdaladdo : "";
-+ }
-+
-+ QString getGdaltranslate() const
-+ {
-+ return QFile::exists(pathGdaltranslateOverride) ? pathGdaltranslateOverride : QFile::exists(pathGdaltranslate) ? pathGdaltranslate : "";
-+ }
-+
-+ QString getGdalwarp() const
-+ {
-+ return QFile::exists(pathGdalwarpOverride) ? pathGdalwarpOverride : QFile::exists(pathGdalwarp) ? pathGdalwarp : "";
-+ }
-+
-+ QString getGdalbuildvrt() const
-+ {
-+ return QFile::exists(pathGdalbuildvrtOverride) ? pathGdalbuildvrtOverride : QFile::exists(pathGdalbuildvrt) ? pathGdalbuildvrt : "";
-+ }
-+
-+ QString getQmtrgb2pct() const
-+ {
-+ return QFile::exists(pathQmtrgb2pctOverride) ? pathQmtrgb2pctOverride : QFile::exists(pathQmtrgb2pct) ? pathQmtrgb2pct : "";
-+ }
-+
-+ QString getQmtmap2jnx() const
-+ {
-+ return QFile::exists(pathQmtmap2jnxOverride) ? pathQmtmap2jnxOverride : QFile::exists(pathQmtmap2jnx) ? pathQmtmap2jnx : "";
-+ }
-+
-+ void setGdaladdoOverride(const QString& path)
-+ {
-+ pathGdaladdoOverride = path;
-+ emit sigSetupChanged();
-+ }
-+
-+ void setGdaltranslateOverride(const QString& path)
-+ {
-+ pathGdaltranslateOverride = path;
-+ emit sigSetupChanged();
-+ }
-+
-+ void setGdalwarpOverride(const QString& path)
-+ {
-+ pathGdalwarpOverride = path;
-+ emit sigSetupChanged();
-+ }
-+
-+ void setGdalbuildvrtOverride(const QString& path)
-+ {
-+ pathGdalbuildvrtOverride = path;
-+ emit sigSetupChanged();
-+ }
-+
-+ void setQmtrgb2pctOverride(const QString& path)
-+ {
-+ pathQmtrgb2pctOverride = path;
-+ emit sigSetupChanged();
-+ }
-+
-+ void setQmtmap2jnxOverride(const QString& path)
-+ {
-+ pathQmtmap2jnxOverride = path;
-+ emit sigSetupChanged();
-+ }
-+
-+ void resetGdaladdoOverride()
-+ {
-+ pathGdaladdoOverride.clear();
-+ emit sigSetupChanged();
-+ }
-+
-+ void resetGdaltranslateOverride()
-+ {
-+ pathGdaltranslateOverride.clear();
-+ emit sigSetupChanged();
-+ }
-+
-+ void resetGdalwarpOverride()
-+ {
-+ pathGdalwarpOverride.clear();
-+ emit sigSetupChanged();
-+ }
-+
-+ void resetGdalbuildvrtOverride()
-+ {
-+ pathGdalbuildvrtOverride.clear();
-+ emit sigSetupChanged();
-+ }
-+
-+ void resetQmtrgb2pctOverride()
-+ {
-+ pathQmtrgb2pctOverride.clear();
-+ emit sigSetupChanged();
-+ }
-+
-+ void resetQmtmap2jnxOverride()
-+ {
-+ pathQmtmap2jnxOverride.clear();
-+ emit sigSetupChanged();
-+ }
-+
-+ bool isGdaladdoOverride() const
-+ {
-+ return !pathGdaladdoOverride.isEmpty();
-+ }
-+
-+ bool isGdaltranslateOverride() const
-+ {
-+ return !pathGdaltranslateOverride.isEmpty();
-+ }
-+
-+ bool isGdalwarpOverride() const
-+ {
-+ return !pathGdalwarpOverride.isEmpty();
-+ }
-+
-+ bool isGdalbuildvrtOverride() const
-+ {
-+ return !pathGdalbuildvrtOverride.isEmpty();
-+ }
-+
-+ bool isQmtrgb2pctOverride() const
-+ {
-+ return !pathQmtrgb2pctOverride.isEmpty();
-+ }
-+
-+ bool isQmtmap2jnxOverride() const
-+ {
-+ return !pathQmtmap2jnxOverride.isEmpty();
-+ }
-+
-+signals:
-+ void sigSetupChanged();
-+
-+protected:
-+ static IAppSetup* pSelf;
-+
-+ IAppSetup(QObject * parent)
-+ : QObject(parent)
-+ {
-+ pSelf = this;
-+ }
-+
-+ void prepareGdal(QString gdalDir, QString projDir);
-+ void prepareTranslator(QString translationPath, QString translationPrefix);
-+ void prepareToolPaths();
-+
-+ QString path(QString path, QString subdir, bool mkdir, QString debugName);
-+
-+ QString pathGdaladdo;
-+ QString pathGdaltranslate;
-+ QString pathGdalwarp;
-+ QString pathGdalbuildvrt;
-+ QString pathQmtrgb2pct;
-+ QString pathQmtmap2jnx;
-+
-+ QString pathGdaladdoOverride;
-+ QString pathGdaltranslateOverride;
-+ QString pathGdalwarpOverride;
-+ QString pathGdalbuildvrtOverride;
-+ QString pathQmtrgb2pctOverride;
-+ QString pathQmtmap2jnxOverride;
-+};
-+
-+#endif // IAPPSETUP_H
-diff --git a/src/qmaptool/setup/ISetupExtTools.ui b/src/qmaptool/setup/ISetupExtTools.ui
-new file mode 100644
-index 00000000..59a4db1e
---- /dev/null
-+++ b/src/qmaptool/setup/ISetupExtTools.ui
-@@ -0,0 +1,360 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>ISetupExtTools</class>
-+ <widget class="QDialog" name="ISetupExtTools">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>348</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Setup Ext. Tools</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <layout class="QGridLayout" name="gridLayout">
-+ <item row="3" column="1">
-+ <widget class="QLabel" name="labelPathGdalbuildvrt">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;not found&lt;/b&gt;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="2">
-+ <widget class="QToolButton" name="toolPathGdalwarp">
-+ <property name="toolTip">
-+ <string>Setup user defined path.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="0">
-+ <widget class="QLabel" name="label_4">
-+ <property name="text">
-+ <string>gdalbuildvrt</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="3">
-+ <widget class="QToolButton" name="toolResetGdaladdo">
-+ <property name="toolTip">
-+ <string>Reset user defined path setup.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Reset.png</normaloff>:/icons/32x32/Reset.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="4" column="1">
-+ <widget class="QLabel" name="labelPathQmtrgb2pct">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;not found&lt;/b&gt;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="3">
-+ <widget class="QToolButton" name="toolResetGdalbuildvrt">
-+ <property name="toolTip">
-+ <string>Reset user defined path setup.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Reset.png</normaloff>:/icons/32x32/Reset.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="3">
-+ <widget class="QToolButton" name="toolResetGdaltranslate">
-+ <property name="toolTip">
-+ <string>Reset user defined path setup.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Reset.png</normaloff>:/icons/32x32/Reset.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="1">
-+ <widget class="QLabel" name="labelPathGdaltranslate">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;not found&lt;/b&gt;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="0">
-+ <widget class="QLabel" name="label_3">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>gdal_translate:</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="0">
-+ <widget class="QLabel" name="label_5">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>gdalwarp:</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="4" column="2">
-+ <widget class="QToolButton" name="toolPathQmtrgb2pct">
-+ <property name="toolTip">
-+ <string>Setup user defined path.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="4" column="3">
-+ <widget class="QToolButton" name="toolResetQmtrgb2pct">
-+ <property name="toolTip">
-+ <string>Reset user defined path setup.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Reset.png</normaloff>:/icons/32x32/Reset.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="0">
-+ <widget class="QLabel" name="label">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>gdaladdo:</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="1">
-+ <widget class="QLabel" name="labelPathGdaladdo">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;not found&lt;/b&gt;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="2">
-+ <widget class="QToolButton" name="toolPathGdaladdo">
-+ <property name="toolTip">
-+ <string>Setup user defined path.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="1">
-+ <widget class="QLabel" name="labelPathGdalwarp">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;not found&lt;/b&gt;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="4" column="0">
-+ <widget class="QLabel" name="label_6">
-+ <property name="text">
-+ <string>qmt_rgb2pct</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="2">
-+ <widget class="QToolButton" name="toolPathGdalbuildvrt">
-+ <property name="toolTip">
-+ <string>Setup user defined path.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="2">
-+ <widget class="QToolButton" name="toolPathGdaltranslate">
-+ <property name="toolTip">
-+ <string>Setup user defined path.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="3">
-+ <widget class="QToolButton" name="toolResetGdalwarp">
-+ <property name="toolTip">
-+ <string>Reset user defined path setup.</string>
-+ </property>
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Reset.png</normaloff>:/icons/32x32/Reset.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="5" column="0">
-+ <widget class="QLabel" name="label_7">
-+ <property name="text">
-+ <string>qmt_map2jnx</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="5" column="1">
-+ <widget class="QLabel" name="labelPathQmtmap2jnx">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;not found&lt;/b&gt;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="5" column="2">
-+ <widget class="QToolButton" name="toolPathQmtmap2jnx">
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="5" column="3">
-+ <widget class="QToolButton" name="toolResetQmtmap2jnx">
-+ <property name="text">
-+ <string>...</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Reset.png</normaloff>:/icons/32x32/Reset.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label_2">
-+ <property name="text">
-+ <string>&lt;b&gt;Note:&lt;/b&gt; Usually QMapTool should detect all external tools by itself. If it does not, it's a bad setup and you should fix the PATH variable of your system. You can setup the paths manually, too, if you know what you are doing. But please keep in mind that GDAL needs a proper environment setup to function properly. If it's not setup properly you might get results but these can be off grid.</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignJustify|Qt::AlignVCenter</set>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <widget class="QDialogButtonBox" name="buttonBox">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="standardButtons">
-+ <set>QDialogButtonBox::Ok</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources>
-+ <include location="../../qmapshack/resources.qrc"/>
-+ </resources>
-+ <connections>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>accepted()</signal>
-+ <receiver>ISetupExtTools</receiver>
-+ <slot>accept()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>248</x>
-+ <y>254</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>157</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>rejected()</signal>
-+ <receiver>ISetupExtTools</receiver>
-+ <slot>reject()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>316</x>
-+ <y>260</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>286</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ </connections>
-+</ui>
-diff --git a/src/qmaptool/shell/CShell.cpp b/src/qmaptool/shell/CShell.cpp
-new file mode 100644
-index 00000000..e124adba
---- /dev/null
-+++ b/src/qmaptool/shell/CShell.cpp
-@@ -0,0 +1,198 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "shell/CShell.h"
-+
-+#include <QtWidgets>
-+
-+CShell * CShell::pSelf = nullptr;
-+
-+CShell::CShell(QWidget *parent)
-+ : QTextBrowser(parent)
-+{
-+ pSelf = this;
-+
-+ connect(&cmd, &QProcess::readyReadStandardError, this, &CShell::slotStderr);
-+ connect(&cmd, &QProcess::readyReadStandardOutput, this, &CShell::slotStdout);
-+
-+ connect(&cmd, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &CShell::slotFinished);
-+ connect(&cmd, static_cast<void (QProcess::*)(QProcess::ProcessError) >(&QProcess::error), this, &CShell::slotError);
-+}
-+
-+void CShell::slotError(QProcess::ProcessError error)
-+{
-+ setTextColor(Qt::red);
-+ insertPlainText(QString(tr("Execution of external program `%1` failed: ")).arg(cmd.program()));
-+ switch(error)
-+ {
-+ case QProcess::FailedToStart:
-+ insertPlainText(QString(tr("Process cannot be started.\n")));
-+ insertPlainText(QString(tr("Make sure the required packages are installed, `%1` exists and is executable.\n")).arg(cmd.program()));
-+ break;
-+
-+ case QProcess::Crashed:
-+ insertPlainText(QString(tr("External process crashed.\n")));
-+ break;
-+
-+ default:
-+ insertPlainText(QString(tr("An unknown error occurred.\n")));
-+ break;
-+ }
-+}
-+
-+void CShell::slotStderr()
-+{
-+ QString str;
-+ setTextColor(Qt::red);
-+ str = cmd.readAllStandardError();
-+
-+ if(str[0] == '\r')
-+ {
-+#ifdef WIN32
-+ if(str.contains("\n"))
-+ {
-+ insertPlainText("\n");
-+ }
-+ else
-+#endif // WIN32
-+ {
-+ moveCursor( QTextCursor::End, QTextCursor::MoveAnchor );
-+ moveCursor( QTextCursor::StartOfLine, QTextCursor::MoveAnchor );
-+ moveCursor( QTextCursor::End, QTextCursor::KeepAnchor );
-+ textCursor().removeSelectedText();
-+ }
-+
-+
-+#ifdef WIN32
-+ str = str.split("\r").last().remove("\r").remove("\n");
-+#else
-+ str = str.split("\r").last();
-+#endif
-+ }
-+
-+ insertPlainText(str);
-+ verticalScrollBar()->setValue(verticalScrollBar()->maximum());
-+}
-+
-+void CShell::slotStdout()
-+{
-+ QString str;
-+ setTextColor(Qt::blue);
-+ str = cmd.readAllStandardOutput();
-+
-+ if(str[0] == '\r')
-+ {
-+#ifdef WIN32
-+ if(str.contains("\n"))
-+ {
-+ insertPlainText("\n");
-+ }
-+ else
-+#endif // WIN32
-+ {
-+ moveCursor( QTextCursor::End, QTextCursor::MoveAnchor );
-+ moveCursor( QTextCursor::StartOfLine, QTextCursor::MoveAnchor );
-+ moveCursor( QTextCursor::End, QTextCursor::KeepAnchor );
-+ textCursor().removeSelectedText();
-+ }
-+
-+#ifdef WIN32
-+ str = str.split("\r").last().remove("\r").remove("\n");
-+#else
-+ str = str.split("\r").last();
-+#endif
-+ }
-+
-+ insertPlainText(str);
-+ verticalScrollBar()->setValue(verticalScrollBar()->maximum());
-+}
-+
-+void CShell::stdOut(const QString& str)
-+{
-+ setTextColor(Qt::black);
-+ append(str);
-+}
-+
-+
-+void CShell::stdErr(const QString& str)
-+{
-+ setTextColor(Qt::red);
-+ append(str);
-+}
-+
-+
-+void CShell::slotFinished(int exitCode, QProcess::ExitStatus status)
-+{
-+ if(exitCode || status)
-+ {
-+ emit sigFinishedJob(jobId);
-+ setTextColor(Qt::red);
-+ append(tr("!!! failed !!!\n"));
-+ return;
-+ }
-+
-+ ++idxCommand;
-+ nextCommand();
-+}
-+
-+void CShell::slotCancel()
-+{
-+ if(cmd.state() == QProcess::NotRunning)
-+ {
-+ return;
-+ }
-+
-+ stdOut(tr("\nCanceled by user's request.\n"));
-+ cmd.kill();
-+ cmd.waitForFinished(10000);
-+}
-+
-+int CShell::execute(QList<CShellCmd> cmds)
-+{
-+ CMainWindow::self().makeShellVisible();
-+
-+ if(cmd.state() != QProcess::NotRunning)
-+ {
-+ return -1;
-+ }
-+
-+ clear();
-+
-+ idxCommand = 0;
-+ commands = cmds;
-+
-+ nextCommand();
-+ return ++jobId;
-+}
-+
-+
-+void CShell::nextCommand()
-+{
-+ if(idxCommand >= commands.size())
-+ {
-+ emit sigFinishedJob(jobId);
-+ setTextColor(Qt::darkGreen);
-+ append(tr("!!! done !!!\n"));
-+ return;
-+ }
-+
-+ const CShellCmd& command = commands[idxCommand];
-+ stdOut(command.getCmd() + " " + command.getArgs().join(" ") + "\n");
-+ cmd.start(command.getCmd(), command.getArgs());
-+}
-diff --git a/src/qmaptool/shell/CShell.h b/src/qmaptool/shell/CShell.h
-new file mode 100644
-index 00000000..b4330c78
---- /dev/null
-+++ b/src/qmaptool/shell/CShell.h
-@@ -0,0 +1,75 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CSHELL_H
-+#define CSHELL_H
-+
-+#include "shell/CShellCmd.h"
-+
-+#include <QList>
-+#include <QProcess>
-+#include <QTextBrowser>
-+
-+class CShell : public QTextBrowser
-+{
-+ Q_OBJECT
-+public:
-+ static CShell& self()
-+ {
-+ return *pSelf;
-+ }
-+
-+ virtual ~CShell() = default;
-+
-+ int execute(QList<CShellCmd> cmds);
-+signals:
-+ void sigFinishedJob(qint32 jobId);
-+
-+public slots:
-+ void slotCancel();
-+
-+protected slots:
-+ /// read the stderr from the process and paste it into the text browser
-+ void slotStderr();
-+ /// read the stdout from the process and paste it into the text browser
-+ void slotStdout();
-+ void slotError(QProcess::ProcessError error);
-+ virtual void slotFinished(int exitCode, QProcess::ExitStatus status);
-+
-+protected:
-+ void nextCommand();
-+
-+ /// write text to stdout color channel of the text browser
-+ void stdOut(const QString& str);
-+ /// write text to stderr color channel of the text browser
-+ void stdErr(const QString& str);
-+
-+ QProcess cmd;
-+
-+ QList<CShellCmd> commands;
-+ qint32 idxCommand = 0;
-+ qint32 jobId = 0;
-+
-+private:
-+ friend class Ui_IMainWindow;
-+ CShell(QWidget * parent);
-+ static CShell * pSelf;
-+};
-+
-+#endif //CSHELL_H
-+
-diff --git a/src/qmaptool/shell/CShellCmd.cpp b/src/qmaptool/shell/CShellCmd.cpp
-new file mode 100644
-index 00000000..25980d7c
---- /dev/null
-+++ b/src/qmaptool/shell/CShellCmd.cpp
-@@ -0,0 +1,27 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "shell/CShellCmd.h"
-+
-+CShellCmd::CShellCmd(const QString &cmd, const QStringList &args)
-+ : cmd(cmd)
-+ , args(args)
-+{
-+}
-+
-+
-diff --git a/src/qmaptool/shell/CShellCmd.h b/src/qmaptool/shell/CShellCmd.h
-new file mode 100644
-index 00000000..f440325e
---- /dev/null
-+++ b/src/qmaptool/shell/CShellCmd.h
-@@ -0,0 +1,47 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CSHELLCMD_H
-+#define CSHELLCMD_H
-+
-+#include <QString>
-+#include <QStringList>
-+
-+class CShellCmd
-+{
-+public:
-+ CShellCmd(const QString& cmd, const QStringList& args);
-+ virtual ~CShellCmd() = default;
-+
-+ const QString& getCmd() const
-+ {
-+ return cmd;
-+ }
-+
-+ const QStringList& getArgs() const
-+ {
-+ return args;
-+ }
-+
-+private:
-+ QString cmd;
-+ QStringList args;
-+};
-+
-+#endif //CSHELLCMD_H
-+
-diff --git a/src/qmaptool/tool/CToolAddOverview.cpp b/src/qmaptool/tool/CToolAddOverview.cpp
-new file mode 100644
-index 00000000..88b8b712
---- /dev/null
-+++ b/src/qmaptool/tool/CToolAddOverview.cpp
-@@ -0,0 +1,225 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "CMainWindow.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemFile.h"
-+#include "setup/IAppSetup.h"
-+#include "tool/CToolAddOverview.h"
-+
-+CToolAddOverview::CToolAddOverview(QWidget *parent)
-+ : IToolGui(parent)
-+{
-+ setupUi(this);
-+ setObjectName(tr("Add Overviews"));
-+
-+ labelHelp->setText(tr("Raster map files consume quite some memory if a larger area is displayed. "
-+ "Pre-calculated overview levels help to speed up loading and displaying the "
-+ "map. These overviews can be stored within the map file as well as an external "
-+ "file. GDAL can remove internally stored overviews, however it will not free "
-+ "the used space in the file. Therefore it's size will remain large. If you "
-+ "do not like that use the external option."));
-+
-+ labelHelp->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+
-+ connect(itemList, &CItemListWidget::sigAddItem, this, &CToolAddOverview::slotAddItem);
-+ connect(checkBy2, &QCheckBox::stateChanged, this, &CToolAddOverview::slotSelectionChanged);
-+ connect(checkBy4, &QCheckBox::stateChanged, this, &CToolAddOverview::slotSelectionChanged);
-+ connect(checkBy8, &QCheckBox::stateChanged, this, &CToolAddOverview::slotSelectionChanged);
-+ connect(checkBy16, &QCheckBox::stateChanged, this, &CToolAddOverview::slotSelectionChanged);
-+ connect(checkBy32, &QCheckBox::stateChanged, this, &CToolAddOverview::slotSelectionChanged);
-+ connect(checkBy64, &QCheckBox::stateChanged, this, &CToolAddOverview::slotSelectionChanged);
-+ connect(checkRemove, &QCheckBox::stateChanged, this, &CToolAddOverview::slotSelectionChanged);
-+
-+ connect(itemList, &CItemListWidget::sigSelectionChanged, this, &CToolAddOverview::slotMapSelectionChanged);
-+
-+ connect(pushStart, &QPushButton::clicked, this, &CToolAddOverview::slotStart);
-+ connect(pushCancel, &QPushButton::clicked, &CShell::self(), &CShell::slotCancel);
-+ connect(&CShell::self(), &CShell::sigFinishedJob, this, &CToolAddOverview::slotFinished);
-+
-+
-+ setupChanged();
-+
-+ SETTINGS;
-+ cfg.beginGroup("ToolAddOverview");
-+ itemList->loadSettings(cfg);
-+ checkBy2->setChecked(cfg.value("by2", false).toBool());
-+ checkBy4->setChecked(cfg.value("by4", false).toBool());
-+ checkBy8->setChecked(cfg.value("by8", false).toBool());
-+ checkBy16->setChecked(cfg.value("by16", false).toBool());
-+ checkBy32->setChecked(cfg.value("by32", false).toBool());
-+ checkBy64->setChecked(cfg.value("by64", false).toBool());
-+ checkExternal->setChecked(cfg.value("useExternal", true).toBool());
-+ checkAllFiles->setChecked(cfg.value("allFiles", false).toBool());
-+ cfg.endGroup();
-+}
-+
-+CToolAddOverview::~CToolAddOverview()
-+{
-+ SETTINGS;
-+ cfg.beginGroup("ToolAddOverview");
-+ cfg.remove("");
-+ itemList->saveSettings(cfg);
-+ cfg.setValue("by2", checkBy2->isChecked());
-+ cfg.setValue("by4", checkBy4->isChecked());
-+ cfg.setValue("by8", checkBy8->isChecked());
-+ cfg.setValue("by16", checkBy16->isChecked());
-+ cfg.setValue("by32", checkBy32->isChecked());
-+ cfg.setValue("by64", checkBy64->isChecked());
-+ cfg.setValue("useExternal", checkExternal->isChecked());
-+ cfg.setValue("allFiles", checkAllFiles->isChecked());
-+ cfg.endGroup();
-+}
-+
-+
-+void CToolAddOverview::setupChanged()
-+{
-+ bool hasGdaladdo = !IAppSetup::self().getGdaladdo().isEmpty();
-+ labelNoGdaladdo->setVisible(!hasGdaladdo);
-+ frame->setVisible(hasGdaladdo);
-+}
-+
-+void CToolAddOverview::slotAddItem(const QString& filename, QListWidget * list)
-+{
-+ CItemFile * item = new CItemFile(filename, list);
-+ connect(item, &CItemFile::sigChanged, itemList, &CItemListWidget::sigChanged);
-+}
-+
-+void CToolAddOverview::slotMapSelectionChanged()
-+{
-+ CMainWindow::self().getCanvas()->slotTriggerCompleteUpdate(CCanvas::eRedrawAll);
-+ slotSelectionChanged();
-+}
-+
-+void CToolAddOverview::slotSelectionChanged()
-+{
-+ bool enable = checkBy2->isChecked()|checkBy4->isChecked()|checkBy8->isChecked()|checkBy16->isChecked()|checkBy32->isChecked()|checkBy64->isChecked()|checkRemove->isChecked();
-+ pushStart->setEnabled(enable && itemList->count());
-+
-+ bool isRemove = checkRemove->isChecked();
-+ frameLevels->setDisabled(isRemove);
-+ checkExternal->setDisabled(isRemove);
-+}
-+
-+void CToolAddOverview::buildCmd(QList<CShellCmd>& cmds, const IItem *iitem)
-+{
-+ const CItemFile * item = dynamic_cast<const CItemFile*>(iitem);
-+ if(nullptr == item)
-+ {
-+ return;
-+ }
-+
-+ item->getDrawContext()->unload();
-+
-+ // remove previous overview
-+ QStringList args;
-+ if(checkRemove->isChecked())
-+ {
-+ args << "-clean" << item->getFilename();
-+ cmds << CShellCmd(IAppSetup::self().getGdaladdo(), args);
-+ /// @todo: shrink the file
-+ }
-+ else
-+ {
-+ IDrawContext * context = item->getDrawContext();
-+
-+ // add new ones
-+ args.clear();
-+ args << "-r";
-+ args << (context->is32BitRgb() ? "cubic" : "nearest");
-+
-+ if(checkExternal->isChecked())
-+ {
-+ args << "-ro";
-+ }
-+
-+ args << item->getFilename();
-+ if(checkBy2->isChecked())
-+ {
-+ args << "2";
-+ }
-+ if(checkBy4->isChecked())
-+ {
-+ args << "4";
-+ }
-+ if(checkBy8->isChecked())
-+ {
-+ args << "8";
-+ }
-+ if(checkBy16->isChecked())
-+ {
-+ args << "16";
-+ }
-+ if(checkBy32->isChecked())
-+ {
-+ args << "32";
-+ }
-+ if(checkBy64->isChecked())
-+ {
-+ args << "64";
-+ }
-+
-+ cmds << CShellCmd(IAppSetup::self().getGdaladdo(), args);
-+ }
-+}
-+
-+void CToolAddOverview::slotStart()
-+{
-+ start(itemList, checkAllFiles->isChecked());
-+ if(jobId > 0)
-+ {
-+ itemList->setEnabled(false);
-+ frameInput->setEnabled(false);
-+ pushStart->setEnabled(false);
-+ pushCancel->setEnabled(true);
-+ }
-+}
-+
-+void CToolAddOverview::slotFinished(qint32 id)
-+{
-+ if(finished(id))
-+ {
-+ itemList->setEnabled(true);
-+ frameInput->setEnabled(true);
-+ pushStart->setEnabled(true);
-+ pushCancel->setEnabled(false);
-+ }
-+
-+ if(checkAllFiles->isChecked())
-+ {
-+ const int N = itemList->count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ IItem * item = itemList->item(n);
-+ if(nullptr != item)
-+ {
-+ item->reload();
-+ }
-+ }
-+ }
-+ else
-+ {
-+ IItem * item = itemList->currentItem();
-+ if(nullptr != item)
-+ {
-+ item->reload();
-+ }
-+ }
-+}
-diff --git a/src/qmaptool/tool/CToolAddOverview.h b/src/qmaptool/tool/CToolAddOverview.h
-new file mode 100644
-index 00000000..902c64aa
---- /dev/null
-+++ b/src/qmaptool/tool/CToolAddOverview.h
-@@ -0,0 +1,51 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLADDOVERVIEW_H
-+#define CTOOLADDOVERVIEW_H
-+
-+#include "items/IItem.h"
-+#include "tool/ITool.h"
-+#include "tool/IToolGui.h"
-+#include "ui_IToolAddOverview.h"
-+
-+
-+class CToolAddOverview : public IToolGui, public ITool, private Ui::IToolAddOverview
-+{
-+ Q_OBJECT
-+public:
-+ CToolAddOverview(QWidget * parent);
-+ virtual ~CToolAddOverview();
-+
-+ void setupChanged() override;
-+
-+ FORWARD_LIST_ALL(itemList)
-+
-+private slots:
-+ void slotAddItem(const QString& filename, QListWidget * list);
-+ void slotMapSelectionChanged();
-+ void slotSelectionChanged();
-+ void slotStart();
-+ void slotFinished(qint32 id);
-+
-+protected:
-+ void buildCmd(QList<CShellCmd>& cmds, const IItem * iitem) override;
-+};
-+
-+#endif //CTOOLADDOVERVIEW_H
-+
-diff --git a/src/qmaptool/tool/CToolBox.cpp b/src/qmaptool/tool/CToolBox.cpp
-new file mode 100644
-index 00000000..c154280a
---- /dev/null
-+++ b/src/qmaptool/tool/CToolBox.cpp
-@@ -0,0 +1,44 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "tool/CToolBox.h"
-+
-+CToolBox::CToolBox(QWidget *parent)
-+ : QToolBox(parent)
-+{
-+ connect(this, &CToolBox::currentChanged, this, &CToolBox::slotToolChanged);
-+}
-+
-+void CToolBox::setupChanged()
-+{
-+ const int N = count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ ITool * tool = dynamic_cast<ITool*>(widget(n));
-+ if(nullptr != tool)
-+ {
-+ tool->setupChanged();
-+ }
-+ }
-+}
-+
-+void CToolBox::slotToolChanged(int idx)
-+{
-+ CMainWindow::self().getCanvas()->slotTriggerCompleteUpdate(CCanvas::eRedrawAll);
-+}
-diff --git a/src/qmaptool/tool/CToolBox.h b/src/qmaptool/tool/CToolBox.h
-new file mode 100644
-index 00000000..d357d903
---- /dev/null
-+++ b/src/qmaptool/tool/CToolBox.h
-@@ -0,0 +1,40 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLBOX_H
-+#define CTOOLBOX_H
-+
-+#include "tool/ITool.h"
-+#include <QToolBox>
-+
-+class CToolBox : public ITool, public QToolBox
-+{
-+public:
-+ CToolBox(QWidget * parent);
-+ virtual ~CToolBox() = default;
-+
-+ void setupChanged() override;
-+
-+ FORWARD_WIDGET_ALL()
-+
-+private slots:
-+ void slotToolChanged(int idx);
-+};
-+
-+#endif //CTOOLBOX_H
-+
-diff --git a/src/qmaptool/tool/CToolCutMap.cpp b/src/qmaptool/tool/CToolCutMap.cpp
-new file mode 100644
-index 00000000..a835230d
---- /dev/null
-+++ b/src/qmaptool/tool/CToolCutMap.cpp
-@@ -0,0 +1,202 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "CMainWindow.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemCutMap.h"
-+#include "setup/IAppSetup.h"
-+#include "tool/CToolCutMap.h"
-+
-+CToolCutMap::CToolCutMap(QWidget *parent)
-+ : IToolGui(parent)
-+{
-+ setupUi(this);
-+ setObjectName(tr("Cut Map"));
-+
-+ labelHelp->setText(tr("Paper maps usually have a border you don't want to have. To combine "
-+ "maps seamlessly you have to cut that border, replacing it by transparent "
-+ "pixel. This tool allows you to define a cut line and it will add an alpha "
-+ "channel for transparency to your map."));
-+
-+ labelHelp->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+
-+ connect(itemList, &CItemListWidget::sigAddItem, this, &CToolCutMap::slotAddItem);
-+ connect(itemList, &CItemListWidget::sigSelectionChanged, this, &CToolCutMap::slotMapSelectionChanged);
-+ connect(itemList, &CItemListWidget::sigChanged, this, &CToolCutMap::slotSomethingChanged);
-+
-+ connect(lineSuffix, &QLineEdit::textChanged, this, &CToolCutMap::slotSomethingChanged);
-+
-+ connect(pushStart, &QPushButton::clicked, this, &CToolCutMap::slotStart);
-+ connect(pushCancel, &QPushButton::clicked, &CShell::self(), &CShell::slotCancel);
-+ connect(&CShell::self(), &CShell::sigFinishedJob, this, &CToolCutMap::slotFinished);
-+
-+ setupChanged();
-+
-+ SETTINGS;
-+ cfg.beginGroup("ToolCutMap");
-+ itemList->loadSettings(cfg);
-+ groupOverviews->loadSettings(cfg);
-+ checkAllFiles->setChecked(cfg.value("allFiles", false).toBool());
-+ lineSuffix->setText(cfg.value("suffix","_cut").toString());
-+ cfg.endGroup();
-+
-+ slotSomethingChanged();
-+}
-+
-+CToolCutMap::~CToolCutMap()
-+{
-+ SETTINGS;
-+ cfg.beginGroup("ToolCutMap");
-+ cfg.remove("");
-+ itemList->saveSettings(cfg);
-+ groupOverviews->saveSettings(cfg);
-+ cfg.setValue("allFiles", checkAllFiles->isChecked());
-+ cfg.setValue("suffix", lineSuffix->text());
-+ cfg.endGroup();
-+}
-+
-+void CToolCutMap::setupChanged()
-+{
-+ bool hasGdalwarp = !IAppSetup::self().getGdalwarp().isEmpty();
-+ labelNoGdalwarp->setVisible(!hasGdalwarp);
-+
-+ bool hasGdaladdo = !IAppSetup::self().getGdaladdo().isEmpty();
-+ labelNoGdaladdo->setVisible(!hasGdaladdo);
-+
-+ frame->setVisible(hasGdalwarp && hasGdaladdo);
-+}
-+
-+void CToolCutMap::slotAddItem(const QString& filename, QListWidget * list)
-+{
-+ CItemCutMap * item = new CItemCutMap(filename, stackedWidget, list);
-+ connect(item, &CItemFile::sigChanged, itemList, &CItemListWidget::sigChanged);
-+}
-+
-+void CToolCutMap::slotMapSelectionChanged()
-+{
-+ CMainWindow::self().getCanvas()->slotTriggerCompleteUpdate(CCanvas::eRedrawAll);
-+ slotSomethingChanged();
-+}
-+
-+void CToolCutMap::slotSomethingChanged()
-+{
-+ IItem * item = itemList->currentItem();
-+ if(item != nullptr)
-+ {
-+ bool ok = item->isOk();
-+ if(lineSuffix->text().isEmpty())
-+ {
-+ ok = false;
-+ }
-+ pushStart->setEnabled(ok);
-+ }
-+ else
-+ {
-+ pushStart->setEnabled(false);
-+ }
-+}
-+
-+
-+void CToolCutMap::buildCmd(QList<CShellCmd>& cmds, const IItem *iitem)
-+{
-+ const CItemCutMap * item = dynamic_cast<const CItemCutMap*>(iitem);
-+ if(nullptr == item)
-+ {
-+ return;
-+ }
-+
-+ // ---- command 1 ----------------------
-+ const IDrawContext * context = item->getDrawContext();
-+ QStringList args;
-+ // --- overwrite last output file ---
-+ args << "-overwrite";
-+ // --- use all CPU cores when possible ---
-+ args << "-multi";
-+ args << "-wo";
-+ args << "NUM_THREADS=ALL_CPUS";
-+
-+ if(context->getProjection().isEmpty())
-+ {
-+ // --- if the source in not referenced ---
-+ args << "-to";
-+ args << "SRC_METHOD=NO_GEOTRANSFORM";
-+ args << "-to";
-+ args << "DST_METHOD=NO_GEOTRANSFORM";
-+ }
-+ else
-+ {
-+ // --- this only works for referenced sources ---
-+ args << "-crop_to_cutline";
-+ }
-+
-+ // --- define transparent color ---
-+ if(context->getRasterBandCount() == 1)
-+ {
-+ if(!context->getNoData())
-+ {
-+ // --- use no data value for destination, too ---
-+ args << "-dstnodata" << "255";
-+ }
-+ }
-+ else if(context->getRasterBandCount() == 3)
-+ {
-+ // --- add alpha channel to files with just RGB ---
-+ args << "-dstalpha";
-+ }
-+
-+ QString wktFilename = createTempFile("csv");
-+ item->saveShape(wktFilename);
-+ QString inFilename = item->getFilename();
-+ QFileInfo fi(inFilename);
-+ QString outFilename = fi.absoluteDir().absoluteFilePath(fi.completeBaseName() + lineSuffix->text() + "." + fi.suffix());
-+
-+ args << "-cutline";
-+ args << wktFilename;
-+ args << inFilename;
-+ args << outFilename;
-+
-+ cmds << CShellCmd(IAppSetup::self().getGdalwarp(), args);
-+
-+ // ---- command 2 ----------------------
-+ groupOverviews->buildCmd(cmds, outFilename, context->is32BitRgb() ? "cubic" : "nearest");
-+}
-+
-+void CToolCutMap::slotStart()
-+{
-+ start(itemList, checkAllFiles->isChecked());
-+ if(jobId > 0)
-+ {
-+ itemList->setEnabled(false);
-+ frameInput->setEnabled(false);
-+ pushStart->setEnabled(false);
-+ pushCancel->setEnabled(true);
-+ }
-+}
-+
-+void CToolCutMap::slotFinished(qint32 id)
-+{
-+ if(finished(id))
-+ {
-+ itemList->setEnabled(true);
-+ frameInput->setEnabled(true);
-+ pushStart->setEnabled(true);
-+ pushCancel->setEnabled(false);
-+ }
-+}
-diff --git a/src/qmaptool/tool/CToolCutMap.h b/src/qmaptool/tool/CToolCutMap.h
-new file mode 100644
-index 00000000..c2f94938
---- /dev/null
-+++ b/src/qmaptool/tool/CToolCutMap.h
-@@ -0,0 +1,51 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLCUTMAP_H
-+#define CTOOLCUTMAP_H
-+
-+#include "items/IItem.h"
-+#include "tool/ITool.h"
-+#include "tool/IToolGui.h"
-+#include "ui_IToolCutMap.h"
-+
-+class CToolCutMap : public IToolGui, public ITool, private Ui::IToolCutMap
-+{
-+ Q_OBJECT
-+public:
-+ CToolCutMap(QWidget * parent);
-+ virtual ~CToolCutMap();
-+
-+ void setupChanged() override;
-+
-+ FORWARD_LIST_ALL(itemList)
-+
-+
-+private slots:
-+ void slotAddItem(const QString& filename, QListWidget * list);
-+ void slotMapSelectionChanged();
-+ void slotSomethingChanged();
-+ void slotStart();
-+ void slotFinished(qint32 id);
-+
-+private:
-+ void buildCmd(QList<CShellCmd>& cmds, const IItem *iitem) override;
-+};
-+
-+#endif //CTOOLCUTMAP_H
-+
-diff --git a/src/qmaptool/tool/CToolExport.cpp b/src/qmaptool/tool/CToolExport.cpp
-new file mode 100644
-index 00000000..41ae83f5
---- /dev/null
-+++ b/src/qmaptool/tool/CToolExport.cpp
-@@ -0,0 +1,193 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemMap.h"
-+#include "tool/CToolExport.h"
-+
-+#include <QtWidgets>
-+
-+CToolExport::CToolExport(QWidget *parent)
-+ : IToolGui(parent)
-+{
-+ setupUi(this);
-+ setObjectName(tr("Export Maps"));
-+ lineTragetFile->addAction(actionTargetFilename,QLineEdit::TrailingPosition);
-+
-+ labelHelp->setText(tr("To use the maps on your device you have to export them to the proprietary "
-+ "format supported by the device. Depending on the device this can vary from "
-+ "a single layer map to a map stack with maps of different scale."
-+ ));
-+
-+ labelHelp->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+
-+ labelNote->setText(tr("Note: This tool will use all files in the list as a input. "
-+ "This will only work if all files have the same projection."
-+ ));
-+ labelNote->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelNote, &QLabel::setVisible);
-+
-+ connect(itemTree, &CItemTreeWidget::sigSelectionChanged, this, &CToolExport::slotMapSelectionChanged);
-+ connect(itemTree, &CItemTreeWidget::sigChanged, this, &CToolExport::slotSomethingChanged);
-+ connect(lineTragetFile, &QLineEdit::textChanged, this, &CToolExport::slotSomethingChanged);
-+ connect(actionTargetFilename, &QAction::triggered, this, &CToolExport::slotSelectFilename);
-+ connect(comboExport, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), stackedWidget, &QStackedWidget::setCurrentIndex);
-+
-+ connect(pushStart, &QPushButton::clicked, this, &CToolExport::slotStart);
-+ connect(pushCancel, &QPushButton::clicked, &CShell::self(), &CShell::slotCancel);
-+ connect(&CShell::self(), &CShell::sigFinishedJob, this, &CToolExport::slotFinished);
-+
-+
-+ setupChanged();
-+
-+ SETTINGS;
-+ cfg.beginGroup("ToolExport");
-+ itemTree->loadSettings(cfg);
-+
-+ comboExport->setCurrentIndex(cfg.value("current",0).toInt());
-+ lineTragetFile->setText(cfg.value("targetFile", "").toString());
-+ cfg.endGroup();
-+}
-+
-+CToolExport::~CToolExport()
-+{
-+ SETTINGS;
-+ cfg.beginGroup("ToolExport");
-+ cfg.remove("");
-+ itemTree->saveSettings(cfg);
-+ cfg.setValue("current", comboExport->currentIndex());
-+ cfg.setValue("targetFile", lineTragetFile->text());
-+ cfg.endGroup();
-+}
-+
-+
-+void CToolExport::setupChanged()
-+{
-+ bool hasMap2jnx = !IAppSetup::self().getQmtmap2jnx().isEmpty();
-+ labelNoMap2jnx->setVisible(!hasMap2jnx);
-+
-+ frame->setVisible(hasMap2jnx);
-+}
-+
-+void CToolExport::slotMapSelectionChanged()
-+{
-+ CMainWindow::self().getCanvas()->slotTriggerCompleteUpdate(CCanvas::eRedrawAll);
-+ slotSomethingChanged();
-+}
-+
-+
-+void CToolExport::slotSomethingChanged()
-+{
-+ bool ok = true;
-+ if(itemTree->topLevelItemCount() == 0)
-+ {
-+ ok = false;
-+ }
-+ if(lineTragetFile->text().isEmpty())
-+ {
-+ ok = false;
-+ }
-+ pushStart->setEnabled(ok);
-+}
-+
-+void CToolExport::slotSelectFilename()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/mapInput", QDir::homePath()).toString();
-+ QString filename = QFileDialog::getSaveFileName(this, tr("Select filename..."), path);
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+ cfg.setValue("Path/mapInput", QFileInfo(filename).absolutePath());
-+
-+ lineTragetFile->setText(filename);
-+}
-+
-+
-+void CToolExport::buildCmd(QList<CShellCmd>& cmds, const IItem * iitem)
-+{
-+ inputFiles << iitem->getFilename();
-+}
-+
-+void CToolExport::buildCmdFinal(QList<CShellCmd>& cmds)
-+{
-+ switch(comboExport->currentIndex())
-+ {
-+ case eTypeJnx:
-+ buildCmdFinalJnx(cmds);
-+ break;
-+
-+ case eTypeRmap:
-+ buildCmdFinalRmap(cmds);
-+ break;
-+ }
-+}
-+
-+void CToolExport::buildCmdFinalJnx(QList<CShellCmd>& cmds)
-+{
-+ QStringList args;
-+ args << "-q" << pageBirdsEyeJnx->getJpegQuality();
-+ args << "-s" << pageBirdsEyeJnx->getJpegSubsampling();
-+ args << "-p" << pageBirdsEyeJnx->getProductId();
-+ args << "-m" << pageBirdsEyeJnx->getProductName();
-+ args << "-n" << pageBirdsEyeJnx->getDescription();
-+ args << "-c" << pageBirdsEyeJnx->getCopyright();
-+ args << "-z" << pageBirdsEyeJnx->getZOrder();
-+ args += inputFiles;
-+
-+ QString targetFile = lineTragetFile->text();
-+ QFileInfo fi(targetFile);
-+ if(fi.suffix().toUpper() != "JNX")
-+ {
-+ targetFile += ".jnx";
-+ }
-+ args << targetFile;
-+ cmds << CShellCmd(IAppSetup::self().getQmtmap2jnx(), args);
-+}
-+
-+void CToolExport::buildCmdFinalRmap(QList<CShellCmd>& cmds)
-+{
-+}
-+
-+
-+void CToolExport::slotStart()
-+{
-+ inputFiles.clear();
-+
-+ start(itemTree);
-+ if(jobId > 0)
-+ {
-+ itemTree->setEnabled(false);
-+ pushStart->setEnabled(false);
-+ pushCancel->setEnabled(true);
-+ }
-+}
-+
-+void CToolExport::slotFinished(qint32 id)
-+{
-+ if(finished(id))
-+ {
-+ itemTree->setEnabled(true);
-+ pushStart->setEnabled(true);
-+ pushCancel->setEnabled(false);
-+ }
-+}
-+
-diff --git a/src/qmaptool/tool/CToolExport.h b/src/qmaptool/tool/CToolExport.h
-new file mode 100644
-index 00000000..560370c8
---- /dev/null
-+++ b/src/qmaptool/tool/CToolExport.h
-@@ -0,0 +1,63 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLEXPORT_H
-+#define CTOOLEXPORT_H
-+
-+#include "items/IItem.h"
-+#include "tool/ITool.h"
-+#include "tool/IToolGui.h"
-+#include "ui_IToolExport.h"
-+
-+class CToolExport : public IToolGui, public ITool, private Ui::IToolExport
-+{
-+ Q_OBJECT
-+public:
-+ CToolExport(QWidget * parent);
-+ virtual ~CToolExport();
-+
-+ void setupChanged() override;
-+
-+ FORWARD_TREE_ALL(itemTree)
-+
-+private slots:
-+ void slotMapSelectionChanged();
-+ void slotSomethingChanged();
-+ void slotStart();
-+ void slotFinished(qint32 id);
-+
-+ void slotSelectFilename();
-+
-+private:
-+ void buildCmd(QList<CShellCmd>& cmds, const IItem * iitem) override;
-+ void buildCmdFinal(QList<CShellCmd>& cmds) override;
-+
-+ void buildCmdFinalJnx(QList<CShellCmd>& cmds);
-+ void buildCmdFinalRmap(QList<CShellCmd>& cmds);
-+
-+ enum type_e
-+ {
-+ eTypeJnx = 0
-+ , eTypeRmap = 1
-+ };
-+
-+ QStringList inputFiles;
-+};
-+
-+#endif //CTOOLEXPORT_H
-+
-diff --git a/src/qmaptool/tool/CToolGrid.cpp b/src/qmaptool/tool/CToolGrid.cpp
-new file mode 100644
-index 00000000..c232340a
---- /dev/null
-+++ b/src/qmaptool/tool/CToolGrid.cpp
-@@ -0,0 +1,124 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "items/CItemRefMap.h"
-+#include "overlay/COverlayRefMap.h"
-+#include "tool/CToolGrid.h"
-+
-+#include <QtWidgets>
-+
-+#define TESTITEM(cmd) \
-+ if(nullptr == item) \
-+ { \
-+ return cmd; \
-+ } \
-+
-+
-+CToolGrid::CToolGrid(QWidget *parent)
-+ : QWidget(parent)
-+{
-+ setupUi(this);
-+ labelHelp->setText(tr("By placing 4 reference points at the corners of a grid "
-+ "square and referencing them by their top left corner, "
-+ "the width and height, all the other grid points can be "
-+ "estimated."));
-+
-+ labelHelp->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+
-+ connect(pushOk, &QPushButton::clicked, this, &CToolGrid::slotOk);
-+ connect(pushCancel, &QPushButton::clicked, this, &CToolGrid::slotCancel);
-+ connect(overlay, &COverlayGridTool::sigChanged, pushOk, &QPushButton::setEnabled);
-+ connect(pushReset, &QPushButton::clicked, overlay, &COverlayGridTool::slotReset);
-+}
-+
-+void CToolGrid::registerItem(CItemRefMap * item)
-+{
-+ this->item = item;
-+ overlay->registerItem(item);
-+}
-+
-+bool CToolGrid::drawFx(QPainter& p, CCanvas::redraw_e needsRedraw)
-+{
-+ TESTITEM(false)
-+ item->drawFx(p, needsRedraw);
-+ overlay->drawFx(p, needsRedraw);
-+
-+ return true;
-+}
-+
-+void CToolGrid::mousePressEventFx(QMouseEvent *e)
-+{
-+ TESTITEM()
-+ item->CItemFile::mousePressEventFx(e);
-+}
-+
-+void CToolGrid::mouseMoveEventFx(QMouseEvent *e)
-+{
-+ TESTITEM()
-+ item->CItemFile::mouseMoveEventFx(e);
-+ if(!item->getMapIsMoving())
-+ {
-+ overlay->mouseMoveEventFx(e);
-+ }
-+}
-+
-+void CToolGrid::mouseReleaseEventFx(QMouseEvent *e)
-+{
-+ TESTITEM()
-+ if(!item->getMapDidMove())
-+ {
-+ overlay->mouseReleaseEventFx(e);
-+ }
-+ item->CItemFile::mouseReleaseEventFx(e);
-+}
-+
-+void CToolGrid::wheelEventFx(QWheelEvent *e)
-+{
-+ TESTITEM()
-+ item->CItemFile::wheelEventFx(e);
-+}
-+
-+void CToolGrid::leaveEventFx(QEvent *e)
-+{
-+ TESTITEM()
-+ item->CItemFile::leaveEventFx(e);
-+ overlay->leaveEventFx(e);
-+}
-+
-+QCursor CToolGrid::getCursorFx()
-+{
-+ TESTITEM(Qt::ArrowCursor)
-+ return overlay->getCursorFx();
-+}
-+
-+
-+void CToolGrid::slotOk()
-+{
-+ TESTITEM()
-+ item->addRefPoints(overlay->getRefPoints());
-+ slotCancel();
-+}
-+
-+
-+void CToolGrid::slotCancel()
-+{
-+ CMainWindow::self().showToolBox();
-+ registerItem(nullptr);
-+}
-diff --git a/src/qmaptool/tool/CToolGrid.h b/src/qmaptool/tool/CToolGrid.h
-new file mode 100644
-index 00000000..4dd970ce
---- /dev/null
-+++ b/src/qmaptool/tool/CToolGrid.h
-@@ -0,0 +1,57 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLGRID_H
-+#define CTOOLGRID_H
-+
-+#include "tool/ITool.h"
-+#include "ui_IToolGrid.h"
-+
-+class CItemRefMap;
-+
-+class CToolGrid : public QWidget, public ITool, private Ui::IToolGrid
-+{
-+ Q_OBJECT
-+public:
-+ virtual ~CToolGrid() = default;
-+
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override;
-+ void mousePressEventFx(QMouseEvent *e) override;
-+ void mouseMoveEventFx(QMouseEvent *e) override;
-+ void mouseReleaseEventFx(QMouseEvent *e) override;
-+ void wheelEventFx(QWheelEvent *e) override;
-+ void leaveEventFx(QEvent *e) override;
-+ QCursor getCursorFx() override;
-+
-+ void setupChanged() override {}
-+
-+ void registerItem(CItemRefMap * item);
-+
-+private slots:
-+ void slotOk();
-+ void slotCancel();
-+
-+private:
-+ friend class CMainWindow;
-+ CToolGrid(QWidget * parent);
-+
-+ CItemRefMap * item = nullptr;
-+};
-+
-+#endif //CTOOLGRID_H
-+
-diff --git a/src/qmaptool/tool/CToolOverviewGroupBox.cpp b/src/qmaptool/tool/CToolOverviewGroupBox.cpp
-new file mode 100644
-index 00000000..4ea7d417
---- /dev/null
-+++ b/src/qmaptool/tool/CToolOverviewGroupBox.cpp
-@@ -0,0 +1,95 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "setup/IAppSetup.h"
-+#include "tool/CToolOverviewGroupBox.h"
-+
-+#include <QtWidgets>
-+
-+CToolOverviewGroupBox::CToolOverviewGroupBox(QWidget *parent)
-+ : QGroupBox(parent)
-+{
-+ setupUi(this);
-+}
-+
-+void CToolOverviewGroupBox::saveSettings(QSettings& cfg)
-+{
-+ cfg.setValue("createOverviews", isChecked());
-+ cfg.setValue("by2", checkBy2->isChecked());
-+ cfg.setValue("by4", checkBy4->isChecked());
-+ cfg.setValue("by8", checkBy8->isChecked());
-+ cfg.setValue("by16", checkBy16->isChecked());
-+ cfg.setValue("by32", checkBy32->isChecked());
-+ cfg.setValue("by64", checkBy64->isChecked());
-+ cfg.setValue("useExternal", checkExternal->isChecked());
-+}
-+
-+void CToolOverviewGroupBox::loadSettings(QSettings& cfg)
-+{
-+ setChecked(cfg.value("createOverviews", false).toBool());
-+ checkBy2->setChecked(cfg.value("by2", false).toBool());
-+ checkBy4->setChecked(cfg.value("by4", false).toBool());
-+ checkBy8->setChecked(cfg.value("by8", false).toBool());
-+ checkBy16->setChecked(cfg.value("by16", false).toBool());
-+ checkBy32->setChecked(cfg.value("by32", false).toBool());
-+ checkBy64->setChecked(cfg.value("by64", false).toBool());
-+ checkExternal->setChecked(cfg.value("useExternal", true).toBool());
-+}
-+
-+
-+void CToolOverviewGroupBox::buildCmd(QList<CShellCmd>& cmds, const QString& filename, const QString& resampling)
-+{
-+ if(isChecked())
-+ {
-+ QStringList args;
-+ if(checkExternal->isChecked())
-+ {
-+ args << "-ro";
-+ }
-+
-+ args << "-r";
-+ args << resampling;
-+
-+ args << filename;
-+ if(checkBy2->isChecked())
-+ {
-+ args << "2";
-+ }
-+ if(checkBy4->isChecked())
-+ {
-+ args << "4";
-+ }
-+ if(checkBy8->isChecked())
-+ {
-+ args << "8";
-+ }
-+ if(checkBy16->isChecked())
-+ {
-+ args << "16";
-+ }
-+ if(checkBy32->isChecked())
-+ {
-+ args << "32";
-+ }
-+ if(checkBy64->isChecked())
-+ {
-+ args << "64";
-+ }
-+ cmds << CShellCmd(IAppSetup::self().getGdaladdo(), args);
-+ }
-+}
-diff --git a/src/qmaptool/tool/CToolOverviewGroupBox.h b/src/qmaptool/tool/CToolOverviewGroupBox.h
-new file mode 100644
-index 00000000..776a8a50
---- /dev/null
-+++ b/src/qmaptool/tool/CToolOverviewGroupBox.h
-@@ -0,0 +1,43 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLOVERVIEWGROUPBOX_H
-+#define CTOOLOVERVIEWGROUPBOX_H
-+
-+#include "shell/CShellCmd.h"
-+
-+#include "ui_IToolOverviewGroupBox.h"
-+
-+class QSettings;
-+
-+class CToolOverviewGroupBox : public QGroupBox, private Ui::IToolOverviewGroupBox
-+{
-+ Q_OBJECT
-+public:
-+ CToolOverviewGroupBox(QWidget * parent);
-+ virtual ~CToolOverviewGroupBox() = default;
-+
-+ void saveSettings(QSettings& cfg);
-+ void loadSettings(QSettings& cfg);
-+
-+
-+ void buildCmd(QList<CShellCmd>& cmds, const QString& filename, const QString &resampling);
-+};
-+
-+#endif //CTOOLOVERVIEWGROUPBOX_H
-+
-diff --git a/src/qmaptool/tool/CToolPalettize.cpp b/src/qmaptool/tool/CToolPalettize.cpp
-new file mode 100644
-index 00000000..fd266c12
---- /dev/null
-+++ b/src/qmaptool/tool/CToolPalettize.cpp
-@@ -0,0 +1,319 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemFile.h"
-+#include "tool/CToolPalettize.h"
-+
-+#include <QtWidgets>
-+
-+CToolPalettize::CToolPalettize(QWidget *parent)
-+ : IToolGui(parent)
-+{
-+ setupUi(this);
-+ setObjectName(tr("Add Color Palette"));
-+
-+ lineFilename->addAction(actionFilename,QLineEdit::TrailingPosition);
-+
-+ labelHelp->setText(tr("Usually you use RGBA color while referencing a map because the large "
-+ "color space allows you to scale and rotate the map without any loss "
-+ "of quality. But it results into rather large files. The file size can "
-+ "be optimized by using a color palette instead of the RGBA color space. "
-+ "The impact on quality is low as long as you do not want to scale or "
-+ "rotate the map. If you want to combine files with a color palette all "
-+ "files need to have the same palette."
-+ ));
-+
-+ labelHelp->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+
-+ labelNote->setText(tr("Note: This tool will use all files in the list as a combined input "
-+ "to derive an optimal palette. This will only work if all files have "
-+ "the same projection and scale."
-+ ));
-+ labelNote->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelNote, &QLabel::setVisible);
-+
-+ connect(itemList, &CItemListWidget::sigAddItem, this, &CToolPalettize::slotAddItem);
-+ connect(itemList, &CItemListWidget::sigSelectionChanged, this, &CToolPalettize::slotMapSelectionChanged);
-+ connect(itemList, &CItemListWidget::sigChanged, this, &CToolPalettize::slotSomethingChanged);
-+
-+ connect(radioSingle, &QRadioButton::toggled, lineSuffix, &QLineEdit::setEnabled);
-+ connect(radioSingle, &QRadioButton::toggled, this, &CToolPalettize::slotSomethingChanged);
-+ connect(radioCombined, &QRadioButton::toggled, lineFilename, &QLineEdit::setEnabled);
-+ connect(radioCombined, &QRadioButton::toggled, this, &CToolPalettize::slotSomethingChanged);
-+
-+ connect(actionFilename, &QAction::triggered, this, &CToolPalettize::slotSelectFilename);
-+ connect(lineSuffix, &QLineEdit::textChanged, this, &CToolPalettize::slotSomethingChanged);
-+ connect(lineFilename, &QLineEdit::textChanged, this, &CToolPalettize::slotSomethingChanged);
-+
-+ connect(pushStart, &QPushButton::clicked, this, &CToolPalettize::slotStart);
-+ connect(pushCancel, &QPushButton::clicked, &CShell::self(), &CShell::slotCancel);
-+ connect(&CShell::self(), &CShell::sigFinishedJob, this, &CToolPalettize::slotFinished);
-+
-+ setupChanged();
-+
-+ SETTINGS;
-+ cfg.beginGroup("ToolPalettize");
-+ itemList->loadSettings(cfg);
-+ checkCreateVrt->setChecked(cfg.value("createVrt", false).toBool());
-+ groupOverviews->loadSettings(cfg);
-+ radioSingle->setChecked(cfg.value("singleFiles", true).toBool());
-+ radioCombined->setChecked(cfg.value("combinedFile", false).toBool());
-+ lineFilename->setText(cfg.value("filename","").toString());
-+ lineSuffix->setText(cfg.value("suffix","_8bit").toString());
-+ cfg.endGroup();
-+
-+ lineFilename->setEnabled(radioCombined->isChecked());
-+ lineSuffix->setEnabled(radioSingle->isChecked());
-+
-+ inputFileList1 = new QTemporaryFile(this);
-+ inputFileList2 = new QTemporaryFile(this);
-+}
-+
-+CToolPalettize::~CToolPalettize()
-+{
-+ SETTINGS;
-+ cfg.beginGroup("ToolPalettize");
-+ cfg.remove("");
-+ itemList->saveSettings(cfg);
-+ cfg.setValue("createVrt", checkCreateVrt->isChecked());
-+ groupOverviews->saveSettings(cfg);
-+ cfg.setValue("singleFiles", radioSingle->isChecked());
-+ cfg.setValue("combinedFile", radioCombined->isChecked());
-+ cfg.setValue("filename", lineFilename->text());
-+ cfg.setValue("suffix", lineSuffix->text());
-+ cfg.endGroup();
-+}
-+
-+void CToolPalettize::slotSelectFilename()
-+{
-+ SETTINGS;
-+ QString path = cfg.value("Path/mapInput", QDir::homePath()).toString();
-+ QString filename = QFileDialog::getSaveFileName(this, tr("Select filename..."), path);
-+ if(filename.isEmpty())
-+ {
-+ return;
-+ }
-+ cfg.setValue("Path/mapInput", QFileInfo(filename).absolutePath());
-+
-+ if(!filename.toUpper().endsWith(".TIF"))
-+ {
-+ filename += ".tif";
-+ }
-+
-+ lineFilename->setText(filename);
-+}
-+
-+void CToolPalettize::setupChanged()
-+{
-+ bool hasGdaladdo = !IAppSetup::self().getGdaladdo().isEmpty();
-+ labelNoGdaladdo->setVisible(!hasGdaladdo);
-+
-+ bool hasGdaltranslate = !IAppSetup::self().getGdaltranslate().isEmpty();
-+ labelNoGdaltranslate->setVisible(!hasGdaltranslate);
-+
-+ bool hasQmtrgb2pct = !IAppSetup::self().getQmtrgb2pct().isEmpty();
-+ labelNoQmtrgb2pct->setVisible(!hasQmtrgb2pct);
-+
-+ frame->setVisible(hasGdaladdo && hasQmtrgb2pct && hasGdaltranslate);
-+}
-+
-+void CToolPalettize::slotAddItem(const QString& filename, QListWidget * list)
-+{
-+ CItemFile * item = new CItemFile(filename, list);
-+ connect(item, &CItemFile::sigChanged, itemList, &CItemListWidget::sigChanged);
-+}
-+
-+void CToolPalettize::slotMapSelectionChanged()
-+{
-+ CMainWindow::self().getCanvas()->slotTriggerCompleteUpdate(CCanvas::eRedrawAll);
-+ slotSomethingChanged();
-+}
-+
-+void CToolPalettize::slotSomethingChanged()
-+{
-+ bool ok = itemList->count() > 0;
-+ if(radioSingle->isChecked() && lineSuffix->text().isEmpty())
-+ {
-+ ok = false;
-+ }
-+ if(radioCombined->isChecked() && lineFilename->text().isEmpty())
-+ {
-+ ok = false;
-+ }
-+
-+ pushStart->setEnabled(ok);
-+}
-+
-+void CToolPalettize::buildCmd(QList<CShellCmd>& cmds, const IItem * iitem)
-+{
-+ inputFileList1->open();
-+ QTextStream stream(inputFileList1);
-+ stream << iitem->getFilename() << endl;
-+ inputFileList1->close();
-+}
-+
-+void CToolPalettize::buildCmdFinal(QList<CShellCmd>& cmds)
-+{
-+ QStringList args;
-+
-+ // ---- command 1 ----------------------
-+ QString vrtFilename = createTempFile("vrt");
-+ args.clear();
-+ args << vrtFilename;
-+ args << "-input_file_list" << inputFileList1->fileName();
-+ cmds << CShellCmd(IAppSetup::self().getGdalbuildvrt(), args);
-+
-+ // ---- command 2 ----------------------
-+ QString pctFilename = createTempFile("vrt");
-+ args.clear();
-+ args << "--sct" << pctFilename;
-+ args << vrtFilename;
-+ cmds << CShellCmd(IAppSetup::self().getQmtrgb2pct(), args);
-+
-+ // ---- command 2..2 + N ----------------------
-+ if(radioCombined->isChecked())
-+ {
-+ inputFileList2->open();
-+ QTextStream stream(inputFileList2);
-+
-+ const int N = itemList->count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ const IItem * item = dynamic_cast<const IItem*>(itemList->item(n));
-+ if(nullptr == item)
-+ {
-+ continue;
-+ }
-+ QString inFilename = item->getFilename();
-+ QString outFilename = createTempFile("tif");
-+
-+ stream << outFilename << endl;
-+
-+ args.clear();
-+ args << "--pct" << pctFilename;
-+ args << inFilename;
-+ args << outFilename;
-+ cmds << CShellCmd(IAppSetup::self().getQmtrgb2pct(), args);
-+ }
-+
-+ inputFileList2->close();
-+
-+ // ---- command 2 + N + 1 ----------------------
-+ QString vrtFilename = createTempFile("vrt");
-+ args.clear();
-+ args << vrtFilename;
-+ args << "-input_file_list" << inputFileList2->fileName();
-+ cmds << CShellCmd(IAppSetup::self().getGdalbuildvrt(), args);
-+
-+ // ---- command 2 + N + 2 ----------------------
-+ QString outFilename = lineFilename->text();
-+ if(!outFilename.toUpper().endsWith(".TIF"))
-+ {
-+ outFilename += ".tif";
-+ }
-+
-+ args.clear();
-+ args << "-co" << "TILED=YES";
-+ args << "-co" << "COMPRESS=LZW";
-+ args << vrtFilename;
-+ args << outFilename;
-+ cmds << CShellCmd(IAppSetup::self().getGdaltranslate(), args);
-+
-+ QString lastOutFilname = outFilename;
-+ // ---- command 2 + N + 3 ----------------------
-+ if(checkCreateVrt->isChecked())
-+ {
-+ QFileInfo fi(outFilename);
-+ QString vrtFilename = fi.absoluteDir().absoluteFilePath(fi.completeBaseName() + ".vrt");
-+ args.clear();
-+ args << vrtFilename << outFilename;
-+ cmds << CShellCmd(IAppSetup::self().getGdalbuildvrt(), args);
-+ lastOutFilname = vrtFilename;
-+ }
-+
-+ // ---- command 2 + N + 4 ----------------------
-+ groupOverviews->buildCmd(cmds, lastOutFilname, "nearest");
-+ }
-+ else
-+ {
-+ // ---- command 3..3*N ----------------------
-+ const int N = itemList->count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ const IItem * item = dynamic_cast<const IItem*>(itemList->item(n));
-+ if(nullptr == item)
-+ {
-+ continue;
-+ }
-+ QString inFilename = item->getFilename();
-+ QFileInfo fi(inFilename);
-+ QString outFilename = fi.absoluteDir().absoluteFilePath(fi.completeBaseName() + lineSuffix->text() + "." + fi.suffix());
-+
-+ // ---- command n*3 ----------------------
-+ args.clear();
-+ args << "--pct" << pctFilename;
-+ args << inFilename;
-+ args << outFilename;
-+ cmds << CShellCmd(IAppSetup::self().getQmtrgb2pct(), args);
-+
-+ QString lastOutFilname = outFilename;
-+ // ---- command n*3 + 1 ----------------------
-+ if(checkCreateVrt->isChecked())
-+ {
-+ QFileInfo fi(outFilename);
-+ QString vrtFilename = fi.absoluteDir().absoluteFilePath(fi.completeBaseName() + ".vrt");
-+ args.clear();
-+ args << vrtFilename << outFilename;
-+ cmds << CShellCmd(IAppSetup::self().getGdalbuildvrt(), args);
-+ lastOutFilname = vrtFilename;
-+ }
-+
-+ // ---- command n*3 + 2 ----------------------
-+ groupOverviews->buildCmd(cmds, lastOutFilname, "nearest");
-+ }
-+ }
-+}
-+
-+void CToolPalettize::slotStart()
-+{
-+ // reset file with list of input files
-+ inputFileList1->open();
-+ inputFileList1->resize(0);
-+ inputFileList1->close();
-+
-+ start(itemList, true);
-+ if(jobId > 0)
-+ {
-+ itemList->setEnabled(false);
-+ pushStart->setEnabled(false);
-+ pushCancel->setEnabled(true);
-+ }
-+}
-+
-+void CToolPalettize::slotFinished(qint32 id)
-+{
-+ if(finished(id))
-+ {
-+ itemList->setEnabled(true);
-+ pushStart->setEnabled(true);
-+ pushCancel->setEnabled(false);
-+ }
-+}
-diff --git a/src/qmaptool/tool/CToolPalettize.h b/src/qmaptool/tool/CToolPalettize.h
-new file mode 100644
-index 00000000..d518faf7
---- /dev/null
-+++ b/src/qmaptool/tool/CToolPalettize.h
-@@ -0,0 +1,57 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLPALETTIZE_H
-+#define CTOOLPALETTIZE_H
-+
-+#include "items/IItem.h"
-+#include "tool/ITool.h"
-+#include "tool/IToolGui.h"
-+#include "ui_IToolPalettize.h"
-+
-+class CToolPalettize : public IToolGui, public ITool, private Ui::IToolPalettize
-+{
-+ Q_OBJECT
-+public:
-+ CToolPalettize(QWidget * parent);
-+ virtual ~CToolPalettize();
-+
-+ void setupChanged() override;
-+
-+ FORWARD_LIST_ALL(itemList)
-+
-+private slots:
-+ void slotAddItem(const QString& filename, QListWidget * list);
-+ void slotMapSelectionChanged();
-+ void slotSomethingChanged();
-+ void slotStart();
-+ void slotFinished(qint32 id);
-+
-+ void slotSelectFilename();
-+
-+private:
-+ void buildCmd(QList<CShellCmd>& cmds, const IItem * iitem) override;
-+ void buildCmdFinal(QList<CShellCmd>& cmds) override;
-+
-+ //QStringList inputFiles;
-+ QTemporaryFile * inputFileList1;
-+ QTemporaryFile * inputFileList2;
-+};
-+
-+#endif //CTOOLPALETTIZE_H
-+
-diff --git a/src/qmaptool/tool/CToolRefMap.cpp b/src/qmaptool/tool/CToolRefMap.cpp
-new file mode 100644
-index 00000000..5b1b87b4
---- /dev/null
-+++ b/src/qmaptool/tool/CToolRefMap.cpp
-@@ -0,0 +1,257 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "CMainWindow.h"
-+#include "CToolRefMap.h"
-+#include "helpers/CSettings.h"
-+#include "items/CItemRefMap.h"
-+#include "overlay/refmap/COverlayRefMapPoint.h"
-+#include "setup/IAppSetup.h"
-+#include "shell/CShell.h"
-+
-+#include <proj_api.h>
-+
-+CToolRefMap::CToolRefMap(QWidget *parent)
-+ : IToolGui(parent)
-+{
-+ setupUi(this);
-+ setObjectName(tr("Reference Map"));
-+
-+ labelHelp->setText(tr("A scan of a paper map can be converted to a referenced raster map if "
-+ "you place at least three reference points on the map. The more points "
-+ "the better the result. If your map has a grid you can place points on "
-+ "that grid with the grid tool."));
-+
-+ labelHelp->setVisible(CMainWindow::self().showToolHelp()->isChecked());
-+ connect(CMainWindow::self().showToolHelp(), &QAction::toggled, labelHelp, &QLabel::setVisible);
-+
-+ connect(itemList, &CItemListWidget::sigAddItem, this, &CToolRefMap::slotAddItem);
-+ connect(itemList, &CItemListWidget::sigSelectionChanged, this, &CToolRefMap::slotMapSelectionChanged);
-+ connect(itemList, &CItemListWidget::sigChanged, this, &CToolRefMap::slotSomethingChanged);
-+
-+ connect(lineSuffix, &QLineEdit::textChanged, this, &CToolRefMap::slotSomethingChanged);
-+
-+ connect(pushStart, &QPushButton::clicked, this, &CToolRefMap::slotStart);
-+ connect(pushCancel, &QPushButton::clicked, &CShell::self(), &CShell::slotCancel);
-+ connect(&CShell::self(), &CShell::sigFinishedJob, this, &CToolRefMap::slotFinished);
-+
-+ setupChanged();
-+
-+ SETTINGS;
-+ cfg.beginGroup("ToolRefMap");
-+ itemList->loadSettings(cfg);
-+ checkCreateVrt->setChecked(cfg.value("createVrt", false).toBool());
-+ groupOverviews->loadSettings(cfg);
-+ checkAllFiles->setChecked(cfg.value("allFiles", false).toBool());
-+ lineSuffix->setText(cfg.value("suffix","_ref").toString());
-+ cfg.endGroup();
-+
-+ slotSomethingChanged();
-+
-+ adjustSize();
-+}
-+
-+CToolRefMap::~CToolRefMap()
-+{
-+ SETTINGS;
-+ cfg.beginGroup("ToolRefMap");
-+ cfg.remove("");
-+ itemList->saveSettings(cfg);
-+ cfg.setValue("createVrt", checkCreateVrt->isChecked());
-+ groupOverviews->saveSettings(cfg);
-+ cfg.setValue("allFiles", checkAllFiles->isChecked());
-+ cfg.setValue("suffix", lineSuffix->text());
-+ cfg.endGroup();
-+}
-+
-+
-+void CToolRefMap::setupChanged()
-+{
-+ bool hasGdalwarp = !IAppSetup::self().getGdalwarp().isEmpty();
-+ labelNoGdalwarp->setVisible(!hasGdalwarp);
-+
-+ bool hasGdaltranslate = !IAppSetup::self().getGdaltranslate().isEmpty();
-+ labelNoGdalTranslate->setVisible(!hasGdaltranslate);
-+
-+ bool hasGdaladdo = !IAppSetup::self().getGdaladdo().isEmpty();
-+ labelNoGdaladdo->setVisible(!hasGdaladdo);
-+
-+ frame->setVisible(hasGdalwarp && hasGdaltranslate && hasGdaladdo);
-+
-+ checkCreateVrt->setVisible(!IAppSetup::self().getGdalbuildvrt().isEmpty());
-+}
-+
-+void CToolRefMap::slotAddItem(const QString& filename, QListWidget * list)
-+{
-+ CItemRefMap * item = new CItemRefMap(filename, stackedWidget, list);
-+ connect(item, &CItemFile::sigChanged, itemList, &CItemListWidget::sigChanged);
-+}
-+
-+void CToolRefMap::slotMapSelectionChanged()
-+{
-+ CMainWindow::self().getCanvas()->slotTriggerCompleteUpdate(CCanvas::eRedrawAll);
-+ slotSomethingChanged();
-+}
-+
-+void CToolRefMap::slotSomethingChanged()
-+{
-+ IItem * item = itemList->currentItem();
-+ if(item != nullptr)
-+ {
-+ bool ok = item->isOk();
-+ if(lineSuffix->text().isEmpty())
-+ {
-+ ok = false;
-+ }
-+ pushStart->setEnabled(ok);
-+ }
-+ else
-+ {
-+ pushStart->setEnabled(false);
-+ }
-+}
-+
-+void CToolRefMap::buildCmd(QList<CShellCmd>& cmds, const IItem *iitem)
-+{
-+ const CItemRefMap * item = dynamic_cast<const CItemRefMap*>(iitem);
-+ if(nullptr == item)
-+ {
-+ return;
-+ }
-+
-+ projPJ pjsrc = pj_init_plus("+proj=longlat +datum=WGS84 +no_defs");
-+ if(pjsrc == nullptr)
-+ {
-+ return;
-+ }
-+
-+ projPJ pjtar = pj_init_plus(item->getMapProjection().toLatin1());
-+ if(pjtar == nullptr)
-+ {
-+ pj_free(pjsrc);
-+ return;
-+ }
-+
-+ // ---- command 1 ----------------------
-+ QStringList args;
-+ args << "-a_srs" << item->getMapProjection();
-+
-+ const QList<COverlayRefMapPoint*>& points = item->getRefPoints();
-+ for(const COverlayRefMapPoint* pt : points)
-+ {
-+ qreal lon = pt->getPtRef().x() * DEG_TO_RAD;
-+ qreal lat = pt->getPtRef().y() * DEG_TO_RAD;
-+ pj_transform(pjsrc, pjtar, 1, 0, &lon, &lat, 0);
-+
-+ args << "-gcp";
-+ args << QString::number(pt->getPtPtx().x());
-+ args << QString::number(pt->getPtPtx().y());
-+
-+ args << QString::number(lon,'f',6);
-+ args << QString::number(lat,'f',6);
-+ args << "0";
-+ }
-+
-+ QString tmpname1 = createTempFile("tif");
-+ QString inFilename = item->getFilename();
-+ args << inFilename << tmpname1;
-+ cmds << CShellCmd(IAppSetup::self().getGdaltranslate(), args);
-+
-+ // ---- command 2 ----------------------
-+ IDrawContext * context = item->getDrawContext();
-+ args.clear();
-+ // --- set re-sampling method ---
-+ args << "-r";
-+ args << (context->is32BitRgb() ? "cubic" : "near");
-+ // --- overwrite last output file ---
-+ args << "-overwrite";
-+ // --- use all CPU cores when possible ---
-+ args << "-multi";
-+ args << "-wo";
-+ args << "NUM_THREADS=ALL_CPUS";
-+ // --- define transparent color ---
-+ if(context->getRasterBandCount() == 1)
-+ {
-+ if(!context->getNoData())
-+ {
-+ // --- use no data value for destination, too ---
-+ args << "-dstnodata" << "255";
-+ }
-+ }
-+ else if(context->getRasterBandCount() == 3)
-+ {
-+ // --- add alpha channel to files with just RGB ---
-+ args << "-dstalpha";
-+ }
-+
-+ QString tmpname2 = createTempFile("tif");
-+ args << tmpname1 << tmpname2;
-+ cmds << CShellCmd(IAppSetup::self().getGdalwarp(), args);
-+
-+ // ---- command 3 ----------------------
-+ QFileInfo fi(inFilename);
-+ QString outFilename = fi.absoluteDir().absoluteFilePath(fi.completeBaseName() + lineSuffix->text() + "." + fi.suffix());
-+
-+ args.clear();
-+ args << "-co" << "tiled=yes" << "-co" << "compress=deflate";
-+ args << tmpname2 << outFilename;
-+ cmds << CShellCmd(IAppSetup::self().getGdaltranslate(), args);
-+
-+ QString lastOutFilname = outFilename;
-+ // ---- command 4 ----------------------
-+ if(checkCreateVrt->isChecked())
-+ {
-+ QFileInfo fi(outFilename);
-+ QString vrtFilename = fi.absoluteDir().absoluteFilePath(fi.completeBaseName() + ".vrt");
-+ args.clear();
-+ args << vrtFilename << outFilename;
-+ cmds << CShellCmd(IAppSetup::self().getGdalbuildvrt(), args);
-+ lastOutFilname = vrtFilename;
-+ }
-+
-+ // ---- command 5 ----------------------
-+ groupOverviews->buildCmd(cmds, lastOutFilname, context->is32BitRgb() ? "cubic" : "nearest");
-+
-+ pj_free(pjsrc);
-+ pj_free(pjtar);
-+}
-+
-+void CToolRefMap::slotStart()
-+{
-+ start(itemList, checkAllFiles->isChecked());
-+ if(jobId > 0)
-+ {
-+ itemList->setEnabled(false);
-+ frameInput->setEnabled(false);
-+ pushStart->setEnabled(false);
-+ pushCancel->setEnabled(true);
-+ }
-+}
-+
-+void CToolRefMap::slotFinished(qint32 id)
-+{
-+ if(finished(id))
-+ {
-+ itemList->setEnabled(true);
-+ frameInput->setEnabled(true);
-+ pushStart->setEnabled(true);
-+ pushCancel->setEnabled(false);
-+ }
-+}
-+
-diff --git a/src/qmaptool/tool/CToolRefMap.h b/src/qmaptool/tool/CToolRefMap.h
-new file mode 100644
-index 00000000..2f009b34
---- /dev/null
-+++ b/src/qmaptool/tool/CToolRefMap.h
-@@ -0,0 +1,52 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLREFMAP_H
-+#define CTOOLREFMAP_H
-+
-+#include "items/IItem.h"
-+#include "tool/ITool.h"
-+#include "tool/IToolGui.h"
-+#include "ui_IToolRefMap.h"
-+
-+
-+class CToolRefMap : public IToolGui, public ITool, private Ui::IToolRefMap
-+{
-+ Q_OBJECT
-+public:
-+ CToolRefMap(QWidget * parent);
-+ virtual ~CToolRefMap();
-+
-+ void setupChanged() override;
-+
-+ FORWARD_LIST_ALL(itemList)
-+
-+
-+private slots:
-+ void slotAddItem(const QString& filename, QListWidget * list);
-+ void slotMapSelectionChanged();
-+ void slotSomethingChanged();
-+ void slotStart();
-+ void slotFinished(qint32 id);
-+
-+private:
-+ void buildCmd(QList<CShellCmd>& cmds, const IItem * iitem) override;
-+};
-+
-+#endif //CTOOLREFMAP_H
-+
-diff --git a/src/qmaptool/tool/CToolStack.cpp b/src/qmaptool/tool/CToolStack.cpp
-new file mode 100644
-index 00000000..47cc916d
---- /dev/null
-+++ b/src/qmaptool/tool/CToolStack.cpp
-@@ -0,0 +1,44 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "tool/CToolStack.h"
-+
-+CToolStack::CToolStack(QWidget * parent)
-+ : QStackedWidget(parent)
-+{
-+ connect(this, &CToolStack::currentChanged, this, &CToolStack::slotToolChanged);
-+}
-+
-+void CToolStack::setupChanged()
-+{
-+ const int N = count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ ITool * tool = dynamic_cast<ITool*>(widget(n));
-+ if(nullptr != tool)
-+ {
-+ tool->setupChanged();
-+ }
-+ }
-+}
-+
-+void CToolStack::slotToolChanged(int idx)
-+{
-+ CMainWindow::self().getCanvas()->slotTriggerCompleteUpdate(CCanvas::eRedrawAll);
-+}
-diff --git a/src/qmaptool/tool/CToolStack.h b/src/qmaptool/tool/CToolStack.h
-new file mode 100644
-index 00000000..f0af7d28
---- /dev/null
-+++ b/src/qmaptool/tool/CToolStack.h
-@@ -0,0 +1,41 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLSTACK_H
-+#define CTOOLSTACK_H
-+
-+
-+#include "tool/ITool.h"
-+#include <QStackedWidget>
-+
-+class CToolStack : public ITool, public QStackedWidget
-+{
-+public:
-+ CToolStack(QWidget * parent);
-+ virtual ~CToolStack() = default;
-+
-+ void setupChanged() override;
-+
-+ FORWARD_WIDGET_ALL()
-+
-+private slots:
-+ void slotToolChanged(int idx);
-+};
-+
-+#endif //CTOOLSTACK_H
-+
-diff --git a/src/qmaptool/tool/ITool.cpp b/src/qmaptool/tool/ITool.cpp
-new file mode 100644
-index 00000000..157c999a
---- /dev/null
-+++ b/src/qmaptool/tool/ITool.cpp
-@@ -0,0 +1,20 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "tool/ITool.h"
-+
-diff --git a/src/qmaptool/tool/ITool.h b/src/qmaptool/tool/ITool.h
-new file mode 100644
-index 00000000..b2c43672
---- /dev/null
-+++ b/src/qmaptool/tool/ITool.h
-@@ -0,0 +1,234 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef ITOOL_H
-+#define ITOOL_H
-+
-+#include "canvas/CCanvas.h"
-+#include "setup/IAppSetup.h"
-+#include "shell/CShellCmd.h"
-+#include <QCursor>
-+#include <QWidget>
-+class QPainter;
-+class QMouseEvent;
-+class QWheelEvent;
-+class QEvent;
-+class CItemListWidget;
-+class IItem;
-+
-+#define FORWARD_WIDGET_VOID(cmd) \
-+ ITool * tool = dynamic_cast<ITool*>(currentWidget()); \
-+ if(nullptr != tool) \
-+ { \
-+ tool->cmd; \
-+ } \
-+
-+#define FORWARD_WIDGET_RETURN(cmd, def) \
-+ ITool * tool = dynamic_cast<ITool*>(currentWidget()); \
-+ if(nullptr != tool) \
-+ { \
-+ return tool->cmd; \
-+ } \
-+ return def; \
-+
-+#define FORWARD_WIDGET_ALL() \
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override \
-+ { \
-+ FORWARD_WIDGET_RETURN(drawFx(p, needsRedraw), false) \
-+ } \
-+ void mousePressEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_WIDGET_VOID(mousePressEventFx(e)) \
-+ } \
-+ void mouseMoveEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_WIDGET_VOID(mouseMoveEventFx(e)) \
-+ } \
-+ void mouseReleaseEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_WIDGET_VOID(mouseReleaseEventFx(e)) \
-+ } \
-+ void mouseDoubleClickEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_WIDGET_VOID(mouseDoubleClickEventFx(e)) \
-+ } \
-+ void wheelEventFx(QWheelEvent *e) override \
-+ { \
-+ FORWARD_WIDGET_VOID(wheelEventFx(e)) \
-+ } \
-+ void enterEventFx(QEvent *e) override \
-+ { \
-+ FORWARD_WIDGET_VOID(enterEventFx(e)) \
-+ } \
-+ void leaveEventFx(QEvent *e) override \
-+ { \
-+ FORWARD_WIDGET_VOID(leaveEventFx(e)) \
-+ } \
-+ QCursor getCursorFx() override \
-+ { \
-+ FORWARD_WIDGET_RETURN(getCursorFx(), Qt::ArrowCursor) \
-+ } \
-+ bool keyPressEventFx(QKeyEvent * e) override \
-+ { \
-+ FORWARD_WIDGET_RETURN(keyPressEventFx(e), false) \
-+ } \
-+
-+
-+#define FORWARD_LIST_VOID(list, cmd) \
-+ ITool * tool = dynamic_cast<ITool*>(list->currentItem()); \
-+ if(nullptr != tool) \
-+ { \
-+ tool->cmd; \
-+ } \
-+
-+#define FORWARD_LIST_RETURN(list, cmd, def) \
-+ ITool * tool = dynamic_cast<ITool*>(list->currentItem()); \
-+ if(nullptr != tool) \
-+ { \
-+ return tool->cmd; \
-+ } \
-+ return def; \
-+
-+
-+#define FORWARD_LIST_ALL(list) \
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override \
-+ { \
-+ FORWARD_LIST_RETURN(list, drawFx(p, needsRedraw), false) \
-+ } \
-+ void mousePressEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_LIST_VOID(list, mousePressEventFx(e)) \
-+ } \
-+ void mouseMoveEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_LIST_VOID(list, mouseMoveEventFx(e)) \
-+ } \
-+ void mouseReleaseEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_LIST_VOID(list, mouseReleaseEventFx(e)) \
-+ } \
-+ void mouseDoubleClickEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_LIST_VOID(list, mouseDoubleClickEventFx(e)) \
-+ } \
-+ void wheelEventFx(QWheelEvent *e) override \
-+ { \
-+ FORWARD_LIST_VOID(list, wheelEventFx(e)) \
-+ } \
-+ void enterEventFx(QEvent *e) override \
-+ { \
-+ FORWARD_LIST_VOID(list, enterEventFx(e)) \
-+ } \
-+ void leaveEventFx(QEvent *e) override \
-+ { \
-+ FORWARD_LIST_VOID(list, leaveEventFx(e)) \
-+ } \
-+ QCursor getCursorFx() override \
-+ { \
-+ FORWARD_LIST_RETURN(list, getCursorFx(), Qt::ArrowCursor) \
-+ } \
-+ bool keyPressEventFx(QKeyEvent * e) override \
-+ { \
-+ FORWARD_LIST_RETURN(list, keyPressEventFx(e), false) \
-+ } \
-+
-+#define FORWARD_TREE_VOID(tree, cmd) \
-+ ITool * tool = dynamic_cast<ITool*>(tree->currentItem()); \
-+ if(nullptr != tool) \
-+ { \
-+ tool->cmd; \
-+ } \
-+
-+#define FORWARD_TREE_RETURN(tree, cmd, def) \
-+ ITool * tool = dynamic_cast<ITool*>(tree->currentItem()); \
-+ if(nullptr != tool) \
-+ { \
-+ return tool->cmd; \
-+ } \
-+ return def; \
-+
-+#define FORWARD_TREE_ALL(tree) \
-+ bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) override \
-+ { \
-+ return tree->drawFx(p, needsRedraw); \
-+ } \
-+ void mousePressEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_TREE_VOID(tree, mousePressEventFx(e)) \
-+ } \
-+ void mouseMoveEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_TREE_VOID(tree, mouseMoveEventFx(e)) \
-+ } \
-+ void mouseReleaseEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_TREE_VOID(tree, mouseReleaseEventFx(e)) \
-+ } \
-+ void mouseDoubleClickEventFx(QMouseEvent *e) override \
-+ { \
-+ FORWARD_TREE_VOID(tree, mouseDoubleClickEventFx(e)) \
-+ } \
-+ void wheelEventFx(QWheelEvent *e) override \
-+ { \
-+ FORWARD_TREE_VOID(tree, wheelEventFx(e)) \
-+ } \
-+ void enterEventFx(QEvent *e) override \
-+ { \
-+ FORWARD_TREE_VOID(tree, enterEventFx(e)) \
-+ } \
-+ void leaveEventFx(QEvent *e) override \
-+ { \
-+ FORWARD_TREE_VOID(tree, leaveEventFx(e)) \
-+ } \
-+ QCursor getCursorFx() override \
-+ { \
-+ FORWARD_TREE_RETURN(tree, getCursorFx(), Qt::ArrowCursor) \
-+ } \
-+ bool keyPressEventFx(QKeyEvent * e) override \
-+ { \
-+ FORWARD_TREE_RETURN(tree, keyPressEventFx(e), false) \
-+ } \
-+
-+class ITool
-+{
-+public:
-+ ITool()
-+ {
-+ }
-+ virtual ~ITool() = default;
-+
-+ virtual bool drawFx(QPainter& p, CCanvas::redraw_e needsRedraw) = 0;
-+ virtual void setupChanged() = 0;
-+
-+ virtual void mousePressEventFx(QMouseEvent *e) {}
-+ virtual void mouseMoveEventFx(QMouseEvent *e){}
-+ virtual void mouseReleaseEventFx(QMouseEvent *e){}
-+ virtual void mouseDoubleClickEventFx(QMouseEvent *e){}
-+ virtual void wheelEventFx(QWheelEvent *e){}
-+ virtual void enterEventFx(QEvent *e){}
-+ virtual void leaveEventFx(QEvent *e){}
-+ virtual bool keyPressEventFx(QKeyEvent *e){return false; }
-+
-+ virtual QCursor getCursorFx()
-+ {
-+ return Qt::ArrowCursor;
-+ }
-+};
-+
-+#endif //ITOOL_H
-+
-diff --git a/src/qmaptool/tool/IToolAddOverview.ui b/src/qmaptool/tool/IToolAddOverview.ui
-new file mode 100644
-index 00000000..346fb216
---- /dev/null
-+++ b/src/qmaptool/tool/IToolAddOverview.ui
-@@ -0,0 +1,278 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolAddOverview</class>
-+ <widget class="QWidget" name="IToolAddOverview">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>601</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_3">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QFrame" name="frame">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="textFormat">
-+ <enum>Qt::RichText</enum>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CItemListWidget" name="itemList" native="true"/>
-+ </item>
-+ <item>
-+ <widget class="QFrame" name="frameInput">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <layout class="QFormLayout" name="formLayout">
-+ <item row="0" column="1">
-+ <widget class="QFrame" name="frameLevels">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy2">
-+ <property name="text">
-+ <string>:2</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy4">
-+ <property name="text">
-+ <string>:4</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy8">
-+ <property name="text">
-+ <string>:8</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy16">
-+ <property name="text">
-+ <string>:16</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy32">
-+ <property name="text">
-+ <string>:32</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy64">
-+ <property name="text">
-+ <string>:64</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item row="2" column="1">
-+ <widget class="QCheckBox" name="checkRemove">
-+ <property name="toolTip">
-+ <string>Remove all overview levels from map file.</string>
-+ </property>
-+ <property name="text">
-+ <string>Remove</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="1">
-+ <widget class="QCheckBox" name="checkExternal">
-+ <property name="toolTip">
-+ <string>Do not copy the overviews into the file itself. Add them as external file.</string>
-+ </property>
-+ <property name="text">
-+ <string>Overview as external file</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>0</width>
-+ <height>0</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_3">
-+ <item>
-+ <widget class="QPushButton" name="pushStart">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Start</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Apply.png</normaloff>:/icons/32x32/Apply.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushCancel">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Cancel</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Cancel.png</normaloff>:/icons/32x32/Cancel.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkAllFiles">
-+ <property name="text">
-+ <string>For all files</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdaladdo">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>CItemListWidget</class>
-+ <extends>QWidget</extends>
-+ <header>items/CItemListWidget.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/tool/IToolCutMap.ui b/src/qmaptool/tool/IToolCutMap.ui
-new file mode 100644
-index 00000000..75f9b23d
---- /dev/null
-+++ b/src/qmaptool/tool/IToolCutMap.ui
-@@ -0,0 +1,263 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolCutMap</class>
-+ <widget class="QWidget" name="IToolCutMap">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>340</width>
-+ <height>610</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_4">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QFrame" name="frame">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="textFormat">
-+ <enum>Qt::RichText</enum>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CItemListWidget" name="itemList" native="true"/>
-+ </item>
-+ <item>
-+ <widget class="QFrame" name="frameInput">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QStackedWidget" name="stackedWidget">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_2">
-+ <item>
-+ <widget class="QLabel" name="label_2">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>Output filename suffix</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLineEdit" name="lineSuffix">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>_cut</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignCenter</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CToolOverviewGroupBox" name="groupOverviews">
-+ <property name="title">
-+ <string>Create overviews for result.</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>0</width>
-+ <height>0</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QPushButton" name="pushStart">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Start</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Apply.png</normaloff>:/icons/32x32/Apply.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushCancel">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Cancel</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Cancel.png</normaloff>:/icons/32x32/Cancel.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkAllFiles">
-+ <property name="text">
-+ <string>For all files</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdalwarp">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdaladdo">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>CItemListWidget</class>
-+ <extends>QWidget</extends>
-+ <header>items/CItemListWidget.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ <customwidget>
-+ <class>CToolOverviewGroupBox</class>
-+ <extends>QGroupBox</extends>
-+ <header>tool/CToolOverviewGroupBox.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/tool/IToolExport.ui b/src/qmaptool/tool/IToolExport.ui
-new file mode 100644
-index 00000000..89e2cfd5
---- /dev/null
-+++ b/src/qmaptool/tool/IToolExport.ui
-@@ -0,0 +1,206 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolExport</class>
-+ <widget class="QWidget" name="IToolExport">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>332</width>
-+ <height>346</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QFrame" name="frame">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CItemTreeWidget" name="itemTree" native="true"/>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNote">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QComboBox" name="comboExport">
-+ <item>
-+ <property name="text">
-+ <string>Garmin BirdsEye (*.jnx)</string>
-+ </property>
-+ </item>
-+ <item>
-+ <property name="text">
-+ <string>TwoNav Raster (*.rmap)</string>
-+ </property>
-+ </item>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QStackedWidget" name="stackedWidget">
-+ <widget class="CToolExportJnx" name="pageBirdsEyeJnx"/>
-+ <widget class="QWidget" name="pageTwoNavRmap">
-+ <layout class="QVBoxLayout" name="verticalLayout_3">
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>not implemented yet</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label_2">
-+ <property name="text">
-+ <string>Target File</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLineEdit" name="lineTragetFile"/>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QPushButton" name="pushStart">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Start</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Apply.png</normaloff>:/icons/32x32/Apply.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushCancel">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Cancel</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Cancel.png</normaloff>:/icons/32x32/Cancel.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoMap2jnx">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;qmt_map2jnx&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ <action name="actionTargetFilename">
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>Target Filename</string>
-+ </property>
-+ </action>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>CToolExportJnx</class>
-+ <extends>QWidget</extends>
-+ <header>tool/export/CToolExportJnx.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ <customwidget>
-+ <class>CItemTreeWidget</class>
-+ <extends>QWidget</extends>
-+ <header>items/CItemTreeWidget.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/tool/IToolGrid.ui b/src/qmaptool/tool/IToolGrid.ui
-new file mode 100644
-index 00000000..3a79eaa5
---- /dev/null
-+++ b/src/qmaptool/tool/IToolGrid.ui
-@@ -0,0 +1,158 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolGrid</class>
-+ <widget class="QWidget" name="IToolGrid">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>300</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>6</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_2">
-+ <item>
-+ <widget class="QLabel" name="label_2">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <property name="pixmap">
-+ <pixmap resource="../resources.qrc">:/icons/32x32/GridTool.png</pixmap>
-+ </property>
-+ <property name="scaledContents">
-+ <bool>false</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>Grid Tool</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="textFormat">
-+ <enum>Qt::AutoText</enum>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="COverlayGridTool" name="overlay" native="true"/>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>226</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <widget class="QPushButton" name="pushOk">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Ok</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Check.png</normaloff>:/icons/32x32/Check.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushCancel">
-+ <property name="text">
-+ <string>Cancel</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Cancel.png</normaloff>:/icons/32x32/Cancel.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushReset">
-+ <property name="text">
-+ <string>Reset</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Reload.png</normaloff>:/icons/32x32/Reload.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>COverlayGridTool</class>
-+ <extends>QWidget</extends>
-+ <header>overlay/COverlayGridTool.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/tool/IToolGui.cpp b/src/qmaptool/tool/IToolGui.cpp
-new file mode 100644
-index 00000000..fe3f5d8e
---- /dev/null
-+++ b/src/qmaptool/tool/IToolGui.cpp
-@@ -0,0 +1,111 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "canvas/IDrawContext.h"
-+#include "items/CItemListWidget.h"
-+#include "items/CItemMapLayer.h"
-+#include "items/CItemTreeWidget.h"
-+#include "items/IItem.h"
-+#include "shell/CShell.h"
-+#include "tool/IToolGui.h"
-+
-+IToolGui::IToolGui(QWidget * parent)
-+ : QWidget(parent)
-+{
-+}
-+
-+QString IToolGui::createTempFile(const QString& ext)
-+{
-+ QTemporaryFile * tmpFile = new QTemporaryFile(QDir::temp().absoluteFilePath("QMapTool_XXXXXX." + ext));
-+ tmpFile->open();
-+ tmpFile->close();
-+ tmpFiles << tmpFile;
-+
-+ return tmpFile->fileName();
-+}
-+
-+bool IToolGui::finished(qint32 id)
-+{
-+ if(id == jobId)
-+ {
-+ jobId = 0;
-+ qDeleteAll(tmpFiles);
-+ tmpFiles.clear();
-+ return true;
-+ }
-+ return false;
-+}
-+
-+
-+void IToolGui::start(CItemTreeWidget * itemTree)
-+{
-+ QList<CShellCmd> cmds;
-+ const int N = itemTree->topLevelItemCount();
-+ for(int n = 0; n < N; n++)
-+ {
-+ const CItemMapLayer * layer = dynamic_cast<CItemMapLayer*>(itemTree->topLevelItem(n));
-+ if(layer == nullptr)
-+ {
-+ continue;
-+ }
-+ const int M = layer->childCount();
-+ for(int m = 0; m < M; m++)
-+ {
-+ IItem * item = dynamic_cast<IItem*>(layer->child(m));
-+ if(nullptr != item)
-+ {
-+ buildCmd(cmds, item);
-+ }
-+ }
-+ }
-+
-+ buildCmdFinal(cmds);
-+
-+ jobId = CShell::self().execute(cmds);
-+}
-+
-+void IToolGui::start(CItemListWidget * itemList, bool allFiles)
-+{
-+ QList<CShellCmd> cmds;
-+
-+ if(allFiles)
-+ {
-+ const int N = itemList->count();
-+ for(int n = 0; n < N; n++)
-+ {
-+ const IItem * item = dynamic_cast<const IItem*>(itemList->item(n));
-+ if(nullptr != item)
-+ {
-+ buildCmd(cmds, item);
-+ }
-+ }
-+ }
-+ else
-+ {
-+ const IItem * item = dynamic_cast<const IItem*>(itemList->currentItem());
-+ if(nullptr != item)
-+ {
-+ buildCmd(cmds, item);
-+ }
-+ }
-+
-+ buildCmdFinal(cmds);
-+
-+ jobId = CShell::self().execute(cmds);
-+}
-+
-diff --git a/src/qmaptool/tool/IToolGui.h b/src/qmaptool/tool/IToolGui.h
-new file mode 100644
-index 00000000..00432901
---- /dev/null
-+++ b/src/qmaptool/tool/IToolGui.h
-@@ -0,0 +1,48 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef ITOOLGUI_H
-+#define ITOOLGUI_H
-+
-+#include <QWidget>
-+
-+class CItemListWidget;
-+class CItemTreeWidget;
-+
-+class IToolGui : public QWidget
-+{
-+ Q_OBJECT
-+public:
-+ IToolGui(QWidget * parent);
-+ virtual ~IToolGui() = default;
-+
-+
-+protected:
-+ virtual void start(CItemListWidget * itemList, bool allFiles);
-+ virtual void start(CItemTreeWidget * itemTree);
-+ virtual bool finished(qint32 id);
-+ virtual void buildCmd(QList<CShellCmd>& cmds, const IItem * iitem) = 0;
-+ virtual void buildCmdFinal(QList<CShellCmd>& cmds){}
-+
-+ QString createTempFile(const QString &ext);
-+ qint32 jobId = 0;
-+ QList<QTemporaryFile*> tmpFiles;
-+};
-+
-+#endif //ITOOLGUI_H
-+
-diff --git a/src/qmaptool/tool/IToolOverviewGroupBox.ui b/src/qmaptool/tool/IToolOverviewGroupBox.ui
-new file mode 100644
-index 00000000..c127a786
---- /dev/null
-+++ b/src/qmaptool/tool/IToolOverviewGroupBox.ui
-@@ -0,0 +1,130 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolOverviewGroupBox</class>
-+ <widget class="QGroupBox" name="IToolOverviewGroupBox">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>96</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>GroupBox</string>
-+ </property>
-+ <property name="flat">
-+ <bool>false</bool>
-+ </property>
-+ <property name="checkable">
-+ <bool>true</bool>
-+ </property>
-+ <property name="checked">
-+ <bool>true</bool>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>9</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>9</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QFrame" name="frameOverviews">
-+ <property name="enabled">
-+ <bool>true</bool>
-+ </property>
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Raised</enum>
-+ </property>
-+ <layout class="QHBoxLayout" name="horizontalLayout_4">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy2">
-+ <property name="text">
-+ <string>:2</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy4">
-+ <property name="text">
-+ <string>:4</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy8">
-+ <property name="text">
-+ <string>:8</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy16">
-+ <property name="text">
-+ <string>:16</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy32">
-+ <property name="text">
-+ <string>:32</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkBy64">
-+ <property name="text">
-+ <string>:64</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkExternal">
-+ <property name="enabled">
-+ <bool>true</bool>
-+ </property>
-+ <property name="toolTip">
-+ <string>Do not copy the overviews into the file itself. Add them as external file.</string>
-+ </property>
-+ <property name="text">
-+ <string>Overview as external file</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/tool/IToolPalettize.ui b/src/qmaptool/tool/IToolPalettize.ui
-new file mode 100644
-index 00000000..b9131bde
---- /dev/null
-+++ b/src/qmaptool/tool/IToolPalettize.ui
-@@ -0,0 +1,269 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolPalettize</class>
-+ <widget class="QWidget" name="IToolPalettize">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>399</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QFrame" name="frame">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CItemListWidget" name="itemList" native="true"/>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNote">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <widget class="QRadioButton" name="radioSingle">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>Single files, filename suffix</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLineEdit" name="lineSuffix">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>_8bit</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignCenter</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <layout class="QVBoxLayout" name="verticalLayout_3">
-+ <item>
-+ <widget class="QRadioButton" name="radioCombined">
-+ <property name="text">
-+ <string>Combined file, filename:</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLineEdit" name="lineFilename"/>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkCreateVrt">
-+ <property name="text">
-+ <string>Embed result into *.vrt file.</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CToolOverviewGroupBox" name="groupOverviews">
-+ <property name="title">
-+ <string>Create overviews for result.</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_2">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QPushButton" name="pushStart">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Start</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Apply.png</normaloff>:/icons/32x32/Apply.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushCancel">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Cancel</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/Cancel.png</normaloff>:/icons/32x32/Cancel.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer_2">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdaladdo">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdaltranslate">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoQmtrgb2pct">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;qmt_rgb2pct&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ <action name="actionFilename">
-+ <property name="icon">
-+ <iconset resource="../../qmapshack/resources.qrc">
-+ <normaloff>:/icons/32x32/PathBlue.png</normaloff>:/icons/32x32/PathBlue.png</iconset>
-+ </property>
-+ <property name="text">
-+ <string>Select filename</string>
-+ </property>
-+ </action>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>CItemListWidget</class>
-+ <extends>QWidget</extends>
-+ <header>items/CItemListWidget.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ <customwidget>
-+ <class>CToolOverviewGroupBox</class>
-+ <extends>QGroupBox</extends>
-+ <header>tool/CToolOverviewGroupBox.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <resources>
-+ <include location="../../qmapshack/resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/tool/IToolRefMap.ui b/src/qmaptool/tool/IToolRefMap.ui
-new file mode 100644
-index 00000000..9218f5fc
---- /dev/null
-+++ b/src/qmaptool/tool/IToolRefMap.ui
-@@ -0,0 +1,276 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolRefMap</class>
-+ <widget class="QWidget" name="IToolRefMap">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>596</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_4">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QFrame" name="frame">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_3">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QLabel" name="labelHelp">
-+ <property name="text">
-+ <string>do not translate</string>
-+ </property>
-+ <property name="textFormat">
-+ <enum>Qt::RichText</enum>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CItemListWidget" name="itemList" native="true"/>
-+ </item>
-+ <item>
-+ <widget class="QFrame" name="frameInput">
-+ <property name="frameShape">
-+ <enum>QFrame::NoFrame</enum>
-+ </property>
-+ <property name="frameShadow">
-+ <enum>QFrame::Plain</enum>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <property name="spacing">
-+ <number>0</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QStackedWidget" name="stackedWidget"/>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_3">
-+ <item>
-+ <widget class="QLabel" name="label_2">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>Output filename suffix</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLineEdit" name="lineSuffix">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>_ref</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignCenter</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkCreateVrt">
-+ <property name="text">
-+ <string>Embed result into *.vrt file.</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="CToolOverviewGroupBox" name="groupOverviews">
-+ <property name="title">
-+ <string>Create overviews for result.</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_2">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <item>
-+ <widget class="QPushButton" name="pushStart">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Start</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Apply.png</normaloff>:/icons/32x32/Apply.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QPushButton" name="pushCancel">
-+ <property name="enabled">
-+ <bool>false</bool>
-+ </property>
-+ <property name="text">
-+ <string>Cancel</string>
-+ </property>
-+ <property name="icon">
-+ <iconset resource="../resources.qrc">
-+ <normaloff>:/icons/32x32/Cancel.png</normaloff>:/icons/32x32/Cancel.png</iconset>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QCheckBox" name="checkAllFiles">
-+ <property name="text">
-+ <string>For all files</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer_2">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdalwarp">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdalwarp&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdalTranslate">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdal_translate&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="labelNoGdaladdo">
-+ <property name="text">
-+ <string>&lt;b style='color: red;'&gt;No &quot;gdaladdo&quot; found. Please check setup!&lt;/b&gt;</string>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <customwidgets>
-+ <customwidget>
-+ <class>CItemListWidget</class>
-+ <extends>QWidget</extends>
-+ <header>items/CItemListWidget.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ <customwidget>
-+ <class>CToolOverviewGroupBox</class>
-+ <extends>QGroupBox</extends>
-+ <header>tool/CToolOverviewGroupBox.h</header>
-+ <container>1</container>
-+ </customwidget>
-+ </customwidgets>
-+ <resources>
-+ <include location="../resources.qrc"/>
-+ </resources>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/tool/export/CToolExportJnx.cpp b/src/qmaptool/tool/export/CToolExportJnx.cpp
-new file mode 100644
-index 00000000..5fbe48ce
---- /dev/null
-+++ b/src/qmaptool/tool/export/CToolExportJnx.cpp
-@@ -0,0 +1,28 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "tool/export/CToolExportJnx.h"
-+
-+#include <QtWidgets>
-+
-+CToolExportJnx::CToolExportJnx()
-+{
-+ setupUi(this);
-+}
-+
-+
-diff --git a/src/qmaptool/tool/export/CToolExportJnx.h b/src/qmaptool/tool/export/CToolExportJnx.h
-new file mode 100644
-index 00000000..f1bb6619
---- /dev/null
-+++ b/src/qmaptool/tool/export/CToolExportJnx.h
-@@ -0,0 +1,68 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTOOLEXPORTJNX_H
-+#define CTOOLEXPORTJNX_H
-+
-+#include "ui_IToolExportJnx.h"
-+
-+class CToolExportJnx : public QWidget, private Ui::IToolExportJnx
-+{
-+ Q_OBJECT
-+public:
-+ CToolExportJnx();
-+ virtual ~CToolExportJnx() = default;
-+
-+ QString getProductName() const
-+ {
-+ return lineProductName->text();
-+ }
-+
-+ QString getDescription() const
-+ {
-+ return lineDescription->text();
-+ }
-+
-+ QString getCopyright() const
-+ {
-+ return lineCopyrightNotice->text();
-+ }
-+
-+ QString getProductId() const
-+ {
-+ return QString::number(spinProductId->value());
-+ }
-+
-+ QString getJpegQuality() const
-+ {
-+ return QString::number(spinJpegQuality->value());
-+ }
-+
-+ QString getJpegSubsampling() const
-+ {
-+ return comboJpegSubSampling->currentText();
-+ }
-+
-+ QString getZOrder() const
-+ {
-+ return QString::number(spinZOrder->value());
-+ }
-+};
-+
-+#endif //CTOOLEXPORTJNX_H
-+
-diff --git a/src/qmaptool/tool/export/IToolExportJnx.ui b/src/qmaptool/tool/export/IToolExportJnx.ui
-new file mode 100644
-index 00000000..29ab36f6
---- /dev/null
-+++ b/src/qmaptool/tool/export/IToolExportJnx.ui
-@@ -0,0 +1,224 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IToolExportJnx</class>
-+ <widget class="QWidget" name="IToolExportJnx">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>400</width>
-+ <height>321</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Form</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <property name="spacing">
-+ <number>3</number>
-+ </property>
-+ <property name="leftMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="topMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="rightMargin">
-+ <number>0</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>0</number>
-+ </property>
-+ <item>
-+ <widget class="QGroupBox" name="groupBox">
-+ <property name="title">
-+ <string>BirdsEye</string>
-+ </property>
-+ <layout class="QGridLayout" name="gridLayout">
-+ <property name="topMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="verticalSpacing">
-+ <number>3</number>
-+ </property>
-+ <item row="3" column="0">
-+ <widget class="QLabel" name="labelProductId">
-+ <property name="text">
-+ <string>Product ID</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="0">
-+ <widget class="QLabel" name="label_2">
-+ <property name="text">
-+ <string>Copyright notice</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="2" column="1">
-+ <widget class="QLineEdit" name="lineCopyrightNotice">
-+ <property name="text">
-+ <string>None</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="0">
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>Product name</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="3" column="1">
-+ <widget class="QSpinBox" name="spinProductId"/>
-+ </item>
-+ <item row="0" column="1">
-+ <widget class="QLineEdit" name="lineProductName">
-+ <property name="text">
-+ <string>BirdsEye</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="0">
-+ <widget class="QLabel" name="label_6">
-+ <property name="text">
-+ <string>Description</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="1">
-+ <widget class="QLineEdit" name="lineDescription">
-+ <property name="text">
-+ <string>None</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QGroupBox" name="groupBox_2">
-+ <property name="title">
-+ <string>JPEG</string>
-+ </property>
-+ <layout class="QGridLayout" name="gridLayout_2">
-+ <property name="topMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="verticalSpacing">
-+ <number>3</number>
-+ </property>
-+ <item row="0" column="1">
-+ <widget class="QSpinBox" name="spinJpegQuality">
-+ <property name="minimum">
-+ <number>1</number>
-+ </property>
-+ <property name="maximum">
-+ <number>100</number>
-+ </property>
-+ <property name="value">
-+ <number>75</number>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="0">
-+ <widget class="QLabel" name="label_3">
-+ <property name="text">
-+ <string>Quality</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="0">
-+ <widget class="QLabel" name="label_4">
-+ <property name="text">
-+ <string>Chroma subsampling</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="1" column="1">
-+ <widget class="QComboBox" name="comboJpegSubSampling">
-+ <item>
-+ <property name="text">
-+ <string>411</string>
-+ </property>
-+ </item>
-+ <item>
-+ <property name="text">
-+ <string>422</string>
-+ </property>
-+ </item>
-+ <item>
-+ <property name="text">
-+ <string>444</string>
-+ </property>
-+ </item>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QGroupBox" name="groupBox_3">
-+ <property name="title">
-+ <string>Device</string>
-+ </property>
-+ <layout class="QGridLayout" name="gridLayout_3">
-+ <property name="topMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="bottomMargin">
-+ <number>3</number>
-+ </property>
-+ <property name="verticalSpacing">
-+ <number>3</number>
-+ </property>
-+ <item row="0" column="0">
-+ <widget class="QLabel" name="label_5">
-+ <property name="text">
-+ <string>Z-Order</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item row="0" column="1">
-+ <widget class="QSpinBox" name="spinZOrder">
-+ <property name="minimum">
-+ <number>10</number>
-+ </property>
-+ <property name="maximum">
-+ <number>100</number>
-+ </property>
-+ <property name="singleStep">
-+ <number>10</number>
-+ </property>
-+ <property name="value">
-+ <number>50</number>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections/>
-+</ui>
-diff --git a/src/qmaptool/units/CCoordFormatSetup.cpp b/src/qmaptool/units/CCoordFormatSetup.cpp
-new file mode 100644
-index 00000000..69c7be3c
---- /dev/null
-+++ b/src/qmaptool/units/CCoordFormatSetup.cpp
-@@ -0,0 +1,67 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014-2015 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "units/CCoordFormatSetup.h"
-+#include "units/IUnit.h"
-+
-+CCoordFormatSetup::CCoordFormatSetup(QWidget * parent)
-+ : QDialog(parent)
-+{
-+ setupUi(this);
-+
-+ IUnit::coord_format_e coordFormat = IUnit::getCoordFormat();
-+ switch(coordFormat)
-+ {
-+ case IUnit::eCoordFormat1:
-+ radioFormat1->setChecked(true);
-+ break;
-+
-+ case IUnit::eCoordFormat2:
-+ radioFormat2->setChecked(true);
-+ break;
-+
-+ case IUnit::eCoordFormat3:
-+ radioFormat3->setChecked(true);
-+ break;
-+ }
-+}
-+
-+CCoordFormatSetup::~CCoordFormatSetup()
-+{
-+}
-+
-+void CCoordFormatSetup::accept()
-+{
-+ IUnit::coord_format_e coordFormat = IUnit::eCoordFormat1;
-+
-+ if(radioFormat1->isChecked())
-+ {
-+ coordFormat = IUnit::eCoordFormat1;
-+ }
-+ else if(radioFormat2->isChecked())
-+ {
-+ coordFormat = IUnit::eCoordFormat2;
-+ }
-+ else if(radioFormat3->isChecked())
-+ {
-+ coordFormat = IUnit::eCoordFormat3;
-+ }
-+
-+ IUnit::setCoordFormat(coordFormat);
-+ QDialog::accept();
-+}
-diff --git a/src/qmaptool/units/CCoordFormatSetup.h b/src/qmaptool/units/CCoordFormatSetup.h
-new file mode 100644
-index 00000000..0510ae25
---- /dev/null
-+++ b/src/qmaptool/units/CCoordFormatSetup.h
-@@ -0,0 +1,37 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014-2015 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CCOORDFORMATSETUP_H
-+#define CCOORDFORMATSETUP_H
-+
-+#include "ui_ICoordFormatSetup.h"
-+#include <QDialog>
-+
-+class CCoordFormatSetup : public QDialog, private Ui::ICoordFormatSetup
-+{
-+ Q_OBJECT
-+public:
-+ CCoordFormatSetup(QWidget * parent);
-+ virtual ~CCoordFormatSetup();
-+
-+public slots:
-+ void accept() override;
-+};
-+
-+#endif //CCOORDFORMATSETUP_H
-+
-diff --git a/src/qmaptool/units/CTimeZoneSetup.cpp b/src/qmaptool/units/CTimeZoneSetup.cpp
-new file mode 100644
-index 00000000..d6f849bd
---- /dev/null
-+++ b/src/qmaptool/units/CTimeZoneSetup.cpp
-@@ -0,0 +1,105 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "units/CTimeZoneSetup.h"
-+#include "units/IUnit.h"
-+
-+CTimeZoneSetup::CTimeZoneSetup(QWidget *parent)
-+ : QDialog(parent)
-+{
-+ setupUi(this);
-+
-+ QByteArray zone;
-+ IUnit::tz_mode_e mode;
-+ bool useShortFormat;
-+
-+ IUnit::getTimeZoneSetup(mode, zone, useShortFormat);
-+
-+ switch(mode)
-+ {
-+ case IUnit::eTZUtc:
-+ radioUtc->setChecked(true);
-+ break;
-+
-+ case IUnit::eTZLocal:
-+ radioLocal->setChecked(true);
-+ break;
-+
-+ case IUnit::eTZAuto:
-+ radioAutomatic->setChecked(true);
-+ break;
-+
-+ case IUnit::eTZSelected:
-+ radioSelected->setChecked(true);
-+ break;
-+ }
-+
-+ const char ** tz = IUnit::tblTimezone;
-+ while(*tz)
-+ {
-+ comboTimeZone->addItem(*tz);
-+ tz++;
-+ }
-+
-+ if(useShortFormat)
-+ {
-+ radioShortFormat->setChecked(true);
-+ }
-+ else
-+ {
-+ radioLongFormat->setChecked(true);
-+ }
-+
-+ comboTimeZone->setCurrentIndex(comboTimeZone->findText(QString(zone)));
-+}
-+
-+CTimeZoneSetup::~CTimeZoneSetup()
-+{
-+}
-+
-+void CTimeZoneSetup::accept()
-+{
-+ QByteArray zone = comboTimeZone->currentText().toLatin1();
-+ IUnit::tz_mode_e mode = IUnit::eTZUtc;
-+ bool useShortFormat = false;
-+
-+ if(radioUtc->isChecked())
-+ {
-+ mode = IUnit::eTZUtc;
-+ }
-+ else if(radioLocal->isChecked())
-+ {
-+ mode = IUnit::eTZLocal;
-+ }
-+ else if(radioAutomatic->isChecked())
-+ {
-+ mode = IUnit::eTZAuto;
-+ }
-+ else if(radioSelected->isChecked())
-+ {
-+ mode = IUnit::eTZSelected;
-+ }
-+
-+ if(radioShortFormat->isChecked())
-+ {
-+ useShortFormat = true;
-+ }
-+
-+ IUnit::setTimeZoneSetup(mode, zone, useShortFormat);
-+ QDialog::accept();
-+}
-diff --git a/src/qmaptool/units/CTimeZoneSetup.h b/src/qmaptool/units/CTimeZoneSetup.h
-new file mode 100644
-index 00000000..aa06ad85
---- /dev/null
-+++ b/src/qmaptool/units/CTimeZoneSetup.h
-@@ -0,0 +1,36 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CTIMEZONESETUP_H
-+#define CTIMEZONESETUP_H
-+
-+#include "ui_ITimeZoneSetup.h"
-+#include <QDialog>
-+
-+class CTimeZoneSetup : public QDialog, private Ui::ITimeZoneSetup
-+{
-+public:
-+ CTimeZoneSetup(QWidget * parent);
-+ virtual ~CTimeZoneSetup();
-+
-+public slots:
-+ void accept() override;
-+};
-+
-+#endif //CTIMEZONESETUP_H
-+
-diff --git a/src/qmaptool/units/CUnitImperial.cpp b/src/qmaptool/units/CUnitImperial.cpp
-new file mode 100644
-index 00000000..f38c73fb
---- /dev/null
-+++ b/src/qmaptool/units/CUnitImperial.cpp
-@@ -0,0 +1,113 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+
-+#include "units/CUnitImperial.h"
-+
-+const qreal CUnitImperial::footPerMeter = 3.28084;
-+const qreal CUnitImperial::milePerMeter = 0.6213699E-3;
-+const qreal CUnitImperial::meterPerSecToMilePerHour = 2.23693164;
-+
-+CUnitImperial::CUnitImperial(QObject * parent)
-+ : IUnit(eTypeImperial, "ft", footPerMeter, "ml/h", meterPerSecToMilePerHour, parent)
-+{
-+}
-+
-+
-+void CUnitImperial::meter2elevation(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.0f", meter * footPerMeter);
-+ unit = "ft";
-+ }
-+}
-+
-+
-+void CUnitImperial::meter2distance(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else if(meter < 10)
-+ {
-+ val.sprintf("%1.1f", meter * footPerMeter);
-+ unit = "ft";
-+ }
-+ else if(meter < 1600)
-+ {
-+ val.sprintf("%1.0f", meter * footPerMeter);
-+ unit = "ft";
-+ }
-+ else if(meter < 16000)
-+ {
-+ val.sprintf("%1.2f", meter * milePerMeter);
-+ unit = "ml";
-+ }
-+ else if(meter < 32000)
-+ {
-+ val.sprintf("%1.1f", meter * milePerMeter);
-+ unit = "ml";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.0f", meter * milePerMeter);
-+ unit = "ml";
-+ }
-+}
-+
-+void CUnitImperial::meter2area(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.2f", meter / (1/milePerMeter * 1/milePerMeter));
-+ unit = "ml²";
-+ }
-+}
-+
-+qreal CUnitImperial::elevation2meter(const QString& val) const /* override */
-+{
-+ return val.toDouble() / footPerMeter;
-+}
-+
-+void CUnitImperial::meter2unit(qreal meter, qreal& scale, QString& unit) const
-+{
-+ if(meter > 1600)
-+ {
-+ scale = milePerMeter;
-+ unit = "ml";
-+ }
-+ else
-+ {
-+ scale = footPerMeter;
-+ unit = "ft";
-+ }
-+}
-+
-diff --git a/src/qmaptool/units/CUnitImperial.h b/src/qmaptool/units/CUnitImperial.h
-new file mode 100644
-index 00000000..e400159d
---- /dev/null
-+++ b/src/qmaptool/units/CUnitImperial.h
-@@ -0,0 +1,41 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+#ifndef CUNITIMPERIAL_H
-+#define CUNITIMPERIAL_H
-+
-+#include "IUnit.h"
-+
-+class CUnitImperial : public IUnit
-+{
-+public:
-+ CUnitImperial(QObject * parent);
-+ virtual ~CUnitImperial() = default;
-+
-+ void meter2elevation(qreal meter, QString& val, QString& unit) const override;
-+ void meter2distance(qreal meter, QString& val, QString& unit) const override;
-+ void meter2area(qreal meter, QString& val, QString& unit) const override;
-+ qreal elevation2meter(const QString& val) const override;
-+ void meter2unit(qreal meter, qreal& scale, QString& unit) const override;
-+
-+private:
-+ static const qreal footPerMeter;
-+ static const qreal milePerMeter;
-+ static const qreal meterPerSecToMilePerHour;
-+};
-+#endif //CUNITIMPERIAL_H
-diff --git a/src/qmaptool/units/CUnitMetric.cpp b/src/qmaptool/units/CUnitMetric.cpp
-new file mode 100644
-index 00000000..4398eef2
---- /dev/null
-+++ b/src/qmaptool/units/CUnitMetric.cpp
-@@ -0,0 +1,132 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+#include "units/CUnitMetric.h"
-+
-+CUnitMetric::CUnitMetric(QObject * parent)
-+ : IUnit(eTypeMetric, "m", 1.0, "km/h", 3.6, parent)
-+{
-+}
-+
-+
-+void CUnitMetric::meter2elevation(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT || meter == NOINT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.0f", meter);
-+ unit = "m";
-+ }
-+}
-+
-+
-+void CUnitMetric::meter2distance(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else if(meter < 10)
-+ {
-+ val.sprintf("%1.1f", meter);
-+ unit = "m";
-+ }
-+ else if(meter < 1000)
-+ {
-+ val.sprintf("%1.0f", meter);
-+ unit = "m";
-+ }
-+ else if(meter < 10000)
-+ {
-+ val.sprintf("%1.2f", meter / 1000);
-+ unit = "km";
-+ }
-+ else if(meter < 20000)
-+ {
-+ val.sprintf("%1.1f", meter / 1000);
-+ unit = "km";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.0f", meter / 1000);
-+ unit = "km";
-+ }
-+}
-+
-+
-+void CUnitMetric::meter2speed(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else if (meter < 0.27)
-+ {
-+ val.sprintf("%1.0f",meter * speedfactor * 1000);
-+ unit = "m/h";
-+ }
-+ else if (meter < 10.0)
-+ {
-+ val.sprintf("%1.1f",meter * speedfactor);
-+ unit = speedunit;
-+ }
-+ else
-+ {
-+ val.sprintf("%1.0f",meter * speedfactor);
-+ unit = speedunit;
-+ }
-+}
-+
-+void CUnitMetric::meter2area(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.2f", meter / 1000000);
-+ unit = "km²";
-+ }
-+}
-+
-+qreal CUnitMetric::elevation2meter(const QString& val) const /* override */
-+{
-+ return val.toDouble();
-+}
-+
-+void CUnitMetric::meter2unit(qreal meter, qreal& scale, QString& unit) const
-+{
-+ if(meter > 1000)
-+ {
-+ scale = 0.001;
-+ unit = "km";
-+ }
-+ else
-+ {
-+ scale = 1.0;
-+ unit = "m";
-+ }
-+}
-diff --git a/src/qmaptool/units/CUnitMetric.h b/src/qmaptool/units/CUnitMetric.h
-new file mode 100644
-index 00000000..3f8c74a6
---- /dev/null
-+++ b/src/qmaptool/units/CUnitMetric.h
-@@ -0,0 +1,37 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+#ifndef CUNITMETRIC_H
-+#define CUNITMETRIC_H
-+
-+#include "IUnit.h"
-+
-+class CUnitMetric : public IUnit
-+{
-+public:
-+ CUnitMetric(QObject * parent);
-+ virtual ~CUnitMetric() = default;
-+
-+ void meter2elevation(qreal meter, QString& val, QString& unit) const override;
-+ void meter2distance(qreal meter, QString& val, QString& unit) const override;
-+ void meter2speed(qreal meter, QString& val, QString& unit) const override;
-+ void meter2area(qreal meter, QString& val, QString& unit) const override;
-+ qreal elevation2meter(const QString& val) const override;
-+ void meter2unit(qreal meter, qreal& scale, QString& unit) const override;
-+};
-+#endif // CUNITMETRIC_H
-diff --git a/src/qmaptool/units/CUnitNautic.cpp b/src/qmaptool/units/CUnitNautic.cpp
-new file mode 100644
-index 00000000..d4f2a995
---- /dev/null
-+++ b/src/qmaptool/units/CUnitNautic.cpp
-@@ -0,0 +1,96 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+
-+#include "units/CUnitNautic.h"
-+
-+CUnitNautic::CUnitNautic(QObject * parent)
-+ : IUnit(eTypeNautic, "nm", 0.00053989, "nm/h", 1.94361780, parent)
-+{
-+}
-+
-+
-+void CUnitNautic::meter2elevation(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.0f", meter);
-+ unit = "m";
-+ }
-+}
-+
-+
-+void CUnitNautic::meter2distance(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.2f", meter * basefactor);
-+ unit = baseunit;
-+ }
-+}
-+
-+
-+void CUnitNautic::meter2speed(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.2f",meter * speedfactor);
-+ unit = speedunit;
-+ }
-+}
-+
-+void CUnitNautic::meter2area(qreal meter, QString& val, QString& unit) const /* override */
-+{
-+ if(meter == NOFLOAT)
-+ {
-+ val = "-";
-+ unit = "";
-+ }
-+ else
-+ {
-+ val.sprintf("%1.2f", meter / (1852 * 1852));
-+ unit = "nm²";
-+ }
-+}
-+
-+
-+qreal CUnitNautic::elevation2meter(const QString& val) const /* override */
-+{
-+ return val.toDouble();
-+}
-+
-+void CUnitNautic::meter2unit(qreal meter, qreal& scale, QString& unit) const
-+{
-+ scale = basefactor;
-+ unit = "nm";
-+}
-diff --git a/src/qmaptool/units/CUnitNautic.h b/src/qmaptool/units/CUnitNautic.h
-new file mode 100644
-index 00000000..d3afc9e6
---- /dev/null
-+++ b/src/qmaptool/units/CUnitNautic.h
-@@ -0,0 +1,37 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+#ifndef CUNITNAUTIC_H
-+#define CUNITNAUTIC_H
-+
-+#include "IUnit.h"
-+
-+class CUnitNautic : public IUnit
-+{
-+public:
-+ CUnitNautic(QObject * parent);
-+ virtual ~CUnitNautic() = default;
-+
-+ void meter2elevation(qreal meter, QString& val, QString& unit) const override;
-+ void meter2distance(qreal meter, QString& val, QString& unit) const override;
-+ void meter2speed(qreal meter, QString& val, QString& unit) const override;
-+ void meter2area(qreal meter, QString& val, QString& unit) const override;
-+ qreal elevation2meter(const QString& val) const override;
-+ void meter2unit(qreal meter, qreal& scale, QString& unit) const override;
-+};
-+#endif //CUNITNAUTIC_H
-diff --git a/src/qmaptool/units/CUnitsSetup.cpp b/src/qmaptool/units/CUnitsSetup.cpp
-new file mode 100644
-index 00000000..8d083f69
---- /dev/null
-+++ b/src/qmaptool/units/CUnitsSetup.cpp
-@@ -0,0 +1,59 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CMainWindow.h"
-+#include "units/CUnitsSetup.h"
-+#include "units/IUnit.h"
-+
-+CUnitsSetup::CUnitsSetup(QWidget *parent)
-+ : QDialog(parent)
-+{
-+ setupUi(this);
-+
-+ switch(IUnit::self().type)
-+ {
-+ case IUnit::eTypeMetric:
-+ radioMetric->setChecked(true);
-+ break;
-+
-+ case IUnit::eTypeImperial:
-+ radioImperial->setChecked(true);
-+ break;
-+
-+ case IUnit::eTypeNautic:
-+ radioNautic->setChecked(true);
-+ break;
-+ }
-+}
-+
-+void CUnitsSetup::accept()
-+{
-+ if(radioMetric->isChecked())
-+ {
-+ IUnit::setUnitType(IUnit::eTypeMetric, &CMainWindow::self());
-+ }
-+ else if(radioImperial->isChecked())
-+ {
-+ IUnit::setUnitType(IUnit::eTypeImperial, &CMainWindow::self());
-+ }
-+ else if(radioNautic->isChecked())
-+ {
-+ IUnit::setUnitType(IUnit::eTypeNautic, &CMainWindow::self());
-+ }
-+ QDialog::accept();
-+}
-diff --git a/src/qmaptool/units/CUnitsSetup.h b/src/qmaptool/units/CUnitsSetup.h
-new file mode 100644
-index 00000000..765f7969
---- /dev/null
-+++ b/src/qmaptool/units/CUnitsSetup.h
-@@ -0,0 +1,35 @@
-+/**********************************************************************************************
-+ Copyright (C) 2014 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+#ifndef CUNITSSETUP_H
-+#define CUNITSSETUP_H
-+
-+#include "ui_IUnitsSetup.h"
-+#include <QDialog>
-+
-+class CUnitsSetup : public QDialog, private Ui::IUnitsSetup
-+{
-+public:
-+ CUnitsSetup(QWidget * parent);
-+ virtual ~CUnitsSetup() = default;
-+
-+public slots:
-+ void accept() override;
-+};
-+
-+#endif //CUNITSSETUP_H
-+
-diff --git a/src/qmaptool/units/ICoordFormatSetup.ui b/src/qmaptool/units/ICoordFormatSetup.ui
-new file mode 100644
-index 00000000..df39ec7e
---- /dev/null
-+++ b/src/qmaptool/units/ICoordFormatSetup.ui
-@@ -0,0 +1,125 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>ICoordFormatSetup</class>
-+ <widget class="QDialog" name="ICoordFormatSetup">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>512</width>
-+ <height>144</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Coordinate Format...</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <item>
-+ <widget class="QRadioButton" name="radioFormat3">
-+ <property name="text">
-+ <string>N48° 53' 39.6&quot; E13° 31' 6.78&quot;</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioFormat2">
-+ <property name="text">
-+ <string>N48.8943° E013.51855°</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioFormat1">
-+ <property name="text">
-+ <string>N48° 53.660 E013° 31.113</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <widget class="QDialogButtonBox" name="buttonBox">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="standardButtons">
-+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>accepted()</signal>
-+ <receiver>ICoordFormatSetup</receiver>
-+ <slot>accept()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>248</x>
-+ <y>254</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>157</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>rejected()</signal>
-+ <receiver>ICoordFormatSetup</receiver>
-+ <slot>reject()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>316</x>
-+ <y>260</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>286</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ </connections>
-+</ui>
-diff --git a/src/qmaptool/units/ITimeZoneSetup.ui b/src/qmaptool/units/ITimeZoneSetup.ui
-new file mode 100644
-index 00000000..2313e881
---- /dev/null
-+++ b/src/qmaptool/units/ITimeZoneSetup.ui
-@@ -0,0 +1,182 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>ITimeZoneSetup</class>
-+ <widget class="QDialog" name="ITimeZoneSetup">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>398</width>
-+ <height>106</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Setup Time Zone ...</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_2">
-+ <item>
-+ <widget class="QRadioButton" name="radioUtc">
-+ <property name="text">
-+ <string>UTC</string>
-+ </property>
-+ <attribute name="buttonGroup">
-+ <string notr="true">buttonGroup</string>
-+ </attribute>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioLocal">
-+ <property name="text">
-+ <string>Local</string>
-+ </property>
-+ <attribute name="buttonGroup">
-+ <string notr="true">buttonGroup</string>
-+ </attribute>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioAutomatic">
-+ <property name="text">
-+ <string>Automatic</string>
-+ </property>
-+ <attribute name="buttonGroup">
-+ <string notr="true">buttonGroup</string>
-+ </attribute>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioSelected">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string/>
-+ </property>
-+ <attribute name="buttonGroup">
-+ <string notr="true">buttonGroup</string>
-+ </attribute>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QComboBox" name="comboTimeZone"/>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout_3">
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="text">
-+ <string>Print date/time in </string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioLongFormat">
-+ <property name="text">
-+ <string>long format, or</string>
-+ </property>
-+ <attribute name="buttonGroup">
-+ <string notr="true">buttonGroup_2</string>
-+ </attribute>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioShortFormat">
-+ <property name="text">
-+ <string>short format</string>
-+ </property>
-+ <attribute name="buttonGroup">
-+ <string notr="true">buttonGroup_2</string>
-+ </attribute>
-+ </widget>
-+ </item>
-+ <item>
-+ <spacer name="horizontalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>40</width>
-+ <height>20</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>40</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <widget class="QDialogButtonBox" name="buttonBox">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="standardButtons">
-+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>accepted()</signal>
-+ <receiver>ITimeZoneSetup</receiver>
-+ <slot>accept()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>248</x>
-+ <y>254</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>157</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>rejected()</signal>
-+ <receiver>ITimeZoneSetup</receiver>
-+ <slot>reject()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>316</x>
-+ <y>260</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>286</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ </connections>
-+ <buttongroups>
-+ <buttongroup name="buttonGroup"/>
-+ <buttongroup name="buttonGroup_2"/>
-+ </buttongroups>
-+</ui>
-diff --git a/src/qmaptool/units/IUnit.cpp b/src/qmaptool/units/IUnit.cpp
-new file mode 100644
-index 00000000..d266c6d0
---- /dev/null
-+++ b/src/qmaptool/units/IUnit.cpp
-@@ -0,0 +1,776 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+#include "CMainWindow.h"
-+#include "GeoMath.h"
-+#include "units/CUnitImperial.h"
-+#include "units/CUnitMetric.h"
-+#include "units/CUnitNautic.h"
-+
-+#include <proj_api.h>
-+#include <QtWidgets>
-+const IUnit * IUnit::m_self = nullptr;
-+
-+const QPointF NOPOINTF(NOFLOAT, NOFLOAT);
-+const QPoint NOPOINT (NOINT, NOINT);
-+
-+IUnit::tz_mode_e IUnit::timeZoneMode = IUnit::eTZUtc;
-+IUnit::coord_format_e IUnit::coordFormat = IUnit::eCoordFormat1;
-+QByteArray IUnit::timeZone = "UTC";
-+bool IUnit::useShortFormat = false;
-+
-+const char * IUnit::tblTimezone[] =
-+{
-+ "Africa/Abidjan",
-+ "Africa/Accra",
-+ "Africa/Addis_Ababa",
-+ "Africa/Algiers",
-+ "Africa/Asmara",
-+ "Africa/Bamako",
-+ "Africa/Bangui",
-+ "Africa/Banjul",
-+ "Africa/Bissau",
-+ "Africa/Blantyre",
-+ "Africa/Brazzaville",
-+ "Africa/Bujumbura",
-+ "Africa/Cairo",
-+ "Africa/Casablanca",
-+ "Africa/Conakry",
-+ "Africa/Dakar",
-+ "Africa/Dar_es_Salaam",
-+ "Africa/Djibouti",
-+ "Africa/Douala",
-+ "Africa/El_Aaiun",
-+ "Africa/Freetown",
-+ "Africa/Gaborone",
-+ "Africa/Harare",
-+ "Africa/Johannesburg",
-+ "Africa/Kampala",
-+ "Africa/Khartoum",
-+ "Africa/Kigali",
-+ "Africa/Kinshasa",
-+ "Africa/Lagos",
-+ "Africa/Libreville",
-+ "Africa/Lome",
-+ "Africa/Luanda",
-+ "Africa/Lubumbashi",
-+ "Africa/Lusaka",
-+ "Africa/Malabo",
-+ "Africa/Maputo",
-+ "Africa/Maseru",
-+ "Africa/Mbabane",
-+ "Africa/Mogadishu",
-+ "Africa/Monrovia",
-+ "Africa/Nairobi",
-+ "Africa/Ndjamena",
-+ "Africa/Niamey",
-+ "Africa/Nouakchott",
-+ "Africa/Ouagadougou",
-+ "Africa/Porto-Novo",
-+ "Africa/Sao_Tome",
-+ "Africa/Tripoli",
-+ "Africa/Tunis",
-+ "Africa/Windhoek",
-+ "America/Adak",
-+ "America/Anguilla",
-+ "America/Antigua",
-+ "America/Araguaina",
-+ "America/Argentina/Buenos_Aires",
-+ "America/Argentina/Catamarca",
-+ "America/Argentina/Cordoba",
-+ "America/Argentina/Jujuy",
-+ "America/Argentina/La_Rioja",
-+ "America/Argentina/Mendoza",
-+ "America/Argentina/Rio_Gallegos",
-+ "America/Argentina/San_Juan",
-+ "America/Argentina/San_Luis",
-+ "America/Argentina/Tucuman",
-+ "America/Argentina/Ushuaia",
-+ "America/Aruba",
-+ "America/Asuncion",
-+ "America/Atikokan",
-+ "America/Bahia",
-+ "America/Barbados",
-+ "America/Belem",
-+ "America/Belize",
-+ "America/Blanc-Sablon",
-+ "America/Boa_Vista",
-+ "America/Bogota",
-+ "America/Boise",
-+ "America/Cambridge_Bay",
-+ "America/Campo_Grande",
-+ "America/Cancun",
-+ "America/Caracas",
-+ "America/Cayenne",
-+ "America/Cayman",
-+ "America/Chicago",
-+ "America/Chihuahua",
-+ "America/Coral_Harbour",
-+ "America/Costa_Rica",
-+ "America/Cuiaba",
-+ "America/Curacao",
-+ "America/Dawson",
-+ "America/Dawson_Creek",
-+ "America/Denver",
-+ "America/Dominica",
-+ "America/Edmonton",
-+ "America/Eirunepe",
-+ "America/El_Salvador",
-+ "America/Fortaleza",
-+ "America/Glace_Bay",
-+ "America/Goose_Bay",
-+ "America/Grand_Turk",
-+ "America/Grenada",
-+ "America/Guadeloupe",
-+ "America/Guatemala",
-+ "America/Guayaquil",
-+ "America/Guyana",
-+ "America/Halifax",
-+ "America/Havana",
-+ "America/Hermosillo",
-+ "America/Indiana/Indianapolis",
-+ "America/Indiana/Knox",
-+ "America/Indiana/Marengo",
-+ "America/Indiana/Petersburg",
-+ "America/Indiana/Vevay",
-+ "America/Indiana/Vincennes",
-+ "America/Indiana/Winamac",
-+ "America/Inuvik",
-+ "America/Iqaluit",
-+ "America/Jamaica",
-+ "America/Juneau",
-+ "America/Kentucky/Louisville",
-+ "America/Kentucky/Monticello",
-+ "America/La_Paz",
-+ "America/Lima",
-+ "America/Los_Angeles",
-+ "America/Maceio",
-+ "America/Managua",
-+ "America/Manaus",
-+ "America/Marigot",
-+ "America/Martinique",
-+ "America/Mazatlan",
-+ "America/Menominee",
-+ "America/Merida",
-+ "America/Mexico_City",
-+ "America/Miquelon",
-+ "America/Moncton",
-+ "America/Monterrey",
-+ "America/Montevideo",
-+ "America/Montreal",
-+ "America/Montserrat",
-+ "America/Nassau",
-+ "America/New_York",
-+ "America/Nipigon",
-+ "America/Noronha",
-+ "America/North_Dakota/Center",
-+ "America/North_Dakota/Salem",
-+ "America/Panama",
-+ "America/Pangnirtung",
-+ "America/Paramaribo",
-+ "America/Phoenix",
-+ "America/Port-au-Prince",
-+ "America/Port_of_Spain",
-+ "America/Porto_Velho",
-+ "America/Puerto_Rico",
-+ "America/Rainy_River",
-+ "America/Rankin_Inlet",
-+ "America/Recife",
-+ "America/Regina",
-+ "America/Resolute",
-+ "America/Rio_Branco",
-+ "America/Santarem",
-+ "America/Santiago",
-+ "America/Santo_Domingo",
-+ "America/Sao_Paulo",
-+ "America/St_Barthelemy",
-+ "America/St_Johns",
-+ "America/St_Kitts",
-+ "America/St_Lucia",
-+ "America/St_Thomas",
-+ "America/St_Vincent",
-+ "America/Tegucigalpa",
-+ "America/Thunder_Bay",
-+ "America/Tijuana",
-+ "America/Toronto",
-+ "America/Tortola",
-+ "America/Vancouver",
-+ "America/Whitehorse",
-+ "America/Winnipeg",
-+ "America/Yellowknife",
-+ "Ameriica/Swift_Current",
-+ "Arctic/Longyearbyen",
-+ "Asia/Aden",
-+ "Asia/Almaty",
-+ "Asia/Amman",
-+ "Asia/Anadyr",
-+ "Asia/Aqtau",
-+ "Asia/Aqtobe",
-+ "Asia/Ashgabat",
-+ "Asia/Baghdad",
-+ "Asia/Bahrain",
-+ "Asia/Baku",
-+ "Asia/Bangkok",
-+ "Asia/Beirut",
-+ "Asia/Bishkek",
-+ "Asia/Brunei",
-+ "Asia/Choibalsan",
-+ "Asia/Chongqing",
-+ "Asia/Colombo",
-+ "Asia/Damascus",
-+ "Asia/Dhaka",
-+ "Asia/Dili",
-+ "Asia/Dubai",
-+ "Asia/Dushanbe",
-+ "Asia/Gaza",
-+ "Asia/Harbin",
-+ "Asia/Ho_Chi_Minh",
-+ "Asia/Hong_Kong",
-+ "Asia/Hovd",
-+ "Asia/Irkutsk",
-+ "Asia/Jakarta",
-+ "Asia/Jayapura",
-+ "Asia/Jerusalem",
-+ "Asia/Kabul",
-+ "Asia/Kamchatka",
-+ "Asia/Karachi",
-+ "Asia/Kashgar",
-+ "Asia/Katmandu",
-+ "Asia/Kolkata",
-+ "Asia/Krasnoyarsk",
-+ "Asia/Kuala_Lumpur",
-+ "Asia/Kuching",
-+ "Asia/Kuwait",
-+ "Asia/Macau",
-+ "Asia/Magadan",
-+ "Asia/Makassar",
-+ "Asia/Manila",
-+ "Asia/Muscat",
-+ "Asia/Nicosia",
-+ "Asia/Novosibirsk",
-+ "Asia/Omsk",
-+ "Asia/Oral",
-+ "Asia/Phnom_Penh",
-+ "Asia/Pontianak",
-+ "Asia/Pyongyang",
-+ "Asia/Qatar",
-+ "Asia/Qyzylorda",
-+ "Asia/Rangoon",
-+ "Asia/Riyadh",
-+ "Asia/Sakhalin",
-+ "Asia/Samarkand",
-+ "Asia/Seoul",
-+ "Asia/Shanghai",
-+ "Asia/Singapore",
-+ "Asia/Taipei",
-+ "Asia/Tashkent",
-+ "Asia/Tbilisi",
-+ "Asia/Tehran",
-+ "Asia/Thimphu",
-+ "Asia/Tokyo",
-+ "Asia/Ulaanbaatar",
-+ "Asia/Urumqi",
-+ "Asia/Vientiane",
-+ "Asia/Vladivostok",
-+ "Asia/Yakutsk",
-+ "Asia/Yekaterinburg",
-+ "Asia/Yerevan",
-+ "Atlantic/Azores",
-+ "Atlantic/Bermuda",
-+ "Atlantic/Canary",
-+ "Atlantic/Cape_Verde",
-+ "Atlantic/Faroe",
-+ "Atlantic/Madeira",
-+ "Atlantic/Reykjavik",
-+ "Atlantic/South_Georgia",
-+ "Atlantic/St_Helena",
-+ "Atlantic/Stanley",
-+ "Australia/Adelaide",
-+ "Australia/Brisbane",
-+ "Australia/Broken_Hill",
-+ "Australia/Currie",
-+ "Australia/Darwin",
-+ "Australia/Eucla",
-+ "Australia/Hobart",
-+ "Australia/Lindeman",
-+ "Australia/Lord_Howe",
-+ "Australia/Melbourne",
-+ "Australia/Perth",
-+ "Australia/Sydney",
-+ "Europe/Amsterdam",
-+ "Europe/Andorra",
-+ "Europe/Athens",
-+ "Europe/Belgrade",
-+ "Europe/Berlin",
-+ "Europe/Bratislava",
-+ "Europe/Brussels",
-+ "Europe/Bucharest",
-+ "Europe/Budapest",
-+ "Europe/Chisinau",
-+ "Europe/Copenhagen",
-+ "Europe/Dublin",
-+ "Europe/Gibraltar",
-+ "Europe/Guernsey",
-+ "Europe/Helsinki",
-+ "Europe/Isle_of_Man",
-+ "Europe/Istanbul",
-+ "Europe/Jersey",
-+ "Europe/Kaliningrad",
-+ "Europe/Kiev",
-+ "Europe/Lisbon",
-+ "Europe/Ljubljana",
-+ "Europe/London",
-+ "Europe/Luxembourg",
-+ "Europe/Madrid",
-+ "Europe/Malta",
-+ "Europe/Marienhamn",
-+ "Europe/Minsk",
-+ "Europe/Monaco",
-+ "Europe/Moscow",
-+ "Europe/Oslo",
-+ "Europe/Paris",
-+ "Europe/Podgorica",
-+ "Europe/Prague",
-+ "Europe/Riga",
-+ "Europe/Rome",
-+ "Europe/Samara",
-+ "Europe/San_Marino",
-+ "Europe/Sarajevo",
-+ "Europe/Simferopol",
-+ "Europe/Skopje",
-+ "Europe/Sofia",
-+ "Europe/Stockholm",
-+ "Europe/Tallinn",
-+ "Europe/Tirane",
-+ "Europe/Uzhgorod",
-+ "Europe/Vaduz",
-+ "Europe/Vatican",
-+ "Europe/Vienna",
-+ "Europe/Vilnius",
-+ "Europe/Volgograd",
-+ "Europe/Warsaw",
-+ "Europe/Zagreb",
-+ "Europe/Zaporozhye",
-+ "Europe/Zurich",
-+ "Indian/Antananarivo",
-+ "Indian/Chagos",
-+ "Indian/Christmas",
-+ "Indian/Cocos",
-+ "Indian/Comoro",
-+ "Indian/Kerguelen",
-+ "Indian/Mahe",
-+ "Indian/Maldives",
-+ "Indian/Mauritius",
-+ "Indian/Mayotte",
-+ "Indian/Reunion",
-+ "Pacific/Apia",
-+ "Pacific/Auckland",
-+ "Pacific/Chatham",
-+ "Pacific/Easter",
-+ "Pacific/Efate",
-+ "Pacific/Enderbury",
-+ "Pacific/Fakaofo",
-+ "Pacific/Fiji",
-+ "Pacific/Funafuti",
-+ "Pacific/Galapagos",
-+ "Pacific/Gambier",
-+ "Pacific/Guadalcanal",
-+ "Pacific/Guam",
-+ "Pacific/Honolulu",
-+ "Pacific/Johnston",
-+ "Pacific/Kiritimati",
-+ "Pacific/Kosrae",
-+ "Pacific/Kwajalein",
-+ "Pacific/Majuro",
-+ "Pacific/Marquesas",
-+ "Pacific/Midway",
-+ "Pacific/Nauru",
-+ "Pacific/Niue",
-+ "Pacific/Norfolk",
-+ "Pacific/Noumea",
-+ "Pacific/Pago_Pago",
-+ "Pacific/Palau",
-+ "Pacific/Pitcairn",
-+ "Pacific/Ponape",
-+ "Pacific/Port_Moresby",
-+ "Pacific/Rarotonga",
-+ "Pacific/Saipan",
-+ "Pacific/Tahiti",
-+ "Pacific/Tarawa",
-+ "Pacific/Tongatapu",
-+ "Pacific/Truk",
-+ "Pacific/Wake",
-+ "Pacific/Wallis",
-+ 0
-+};
-+
-+const int N_TIMEZONES = sizeof(IUnit::tblTimezone)/sizeof(const char*);
-+
-+const QRegExp IUnit::reCoord1("^\\s*([N|S]){1}\\W*([0-9]+)\\W*([0-9]+\\.[0-9]+)\\s+([E|W|O]){1}\\W*([0-9]+)\\W*([0-9]+\\.[0-9]+)\\s*$");
-+
-+const QRegExp IUnit::reCoord2("^\\s*([N|S]){1}\\s*([0-9]+\\.[0-9]+)\\W*\\s+([E|W|O]){1}\\s*([0-9]+\\.[0-9]+)\\W*\\s*$");
-+
-+const QRegExp IUnit::reCoord3("^\\s*([-0-9]+\\.[0-9]+)\\s+([-0-9]+\\.[0-9]+)\\s*$");
-+
-+const QRegExp IUnit::reCoord4("^\\s*([N|S]){1}\\s*([0-9]+)\\W+([0-9]+)\\W+([0-9]+\\.[0-9]+)\\W*([E|W|O]){1}\\W*([0-9]+)\\W+([0-9]+)\\W+([0-9]+\\.[0-9]+)\\W*\\s*$");
-+
-+const QRegExp IUnit::reCoord5("^\\s*([-0-9]+\\.[0-9]+)([N|S])\\s+([-0-9]+\\.[0-9]+)([W|E])\\s*$");
-+
-+IUnit::IUnit(const type_e &type, const QString& baseunit, const qreal basefactor, const QString& speedunit, const qreal speedfactor, QObject * parent)
-+ : QObject(parent)
-+ , type(type)
-+ , baseunit(baseunit)
-+ , basefactor(basefactor)
-+ , speedunit(speedunit)
-+ , speedfactor(speedfactor)
-+{
-+ //there can be only one...
-+ if(nullptr != m_self)
-+ {
-+ delete m_self;
-+ }
-+ m_self = this;
-+}
-+
-+
-+void IUnit::setUnitType(type_e t, QObject * parent)
-+{
-+ switch(t)
-+ {
-+ case eTypeMetric:
-+ new CUnitMetric(parent);
-+ break;
-+
-+ case eTypeImperial:
-+ new CUnitImperial(parent);
-+ break;
-+
-+ case eTypeNautic:
-+ new CUnitNautic(parent);
-+ break;
-+ }
-+
-+ QSettings cfg;
-+ cfg.setValue("Units/type",t);
-+}
-+
-+void IUnit::meter2speed(qreal meter, QString& val, QString& unit) const
-+{
-+ val.sprintf("%2.2f",meter * speedfactor);
-+ unit = speedunit;
-+}
-+
-+void IUnit::seconds2time(quint32 ttime, QString& val, QString& unit) const
-+{
-+ QTime time(0,0,0);
-+ quint32 days = ttime / 86400;
-+
-+ time = time.addSecs(ttime);
-+
-+ if(days)
-+ {
-+ val = QString("%1:").arg(days) + time.toString("HH:mm:ss");
-+ unit = "d";
-+ }
-+ else
-+ {
-+ val = time.toString("HH:mm:ss");
-+ unit = "h";
-+ }
-+}
-+
-+bool IUnit::parseTimestamp(const QString &time, QDateTime &datetime)
-+{
-+ int tzoffset;
-+ datetime = parseTimestamp(time, tzoffset);
-+
-+ return datetime.isValid();
-+}
-+
-+
-+QDateTime IUnit::parseTimestamp(const QString &timetext, int& tzoffset)
-+{
-+ const QRegExp tzRE("[-+]\\d\\d:\\d\\d$");
-+ int i;
-+
-+ tzoffset = 0;
-+
-+ QString format = "yyyy-MM-dd'T'hh:mm:ss";
-+
-+ i = timetext.indexOf(".");
-+ if (i != NOIDX)
-+ {
-+ if(timetext[i+1] == '0')
-+ {
-+ format += ".zzz";
-+ }
-+ else
-+ {
-+ format += ".z";
-+ }
-+ }
-+
-+ // trailing "Z" explicitly declares the timestamp to be UTC
-+ if (timetext.indexOf("Z") != NOIDX)
-+ {
-+ format += "'Z'";
-+ }
-+ else if ((i = tzRE.indexIn(timetext)) != NOIDX)
-+ {
-+ // trailing timezone offset [-+]HH:MM present
-+ // This does not match the original intentions of the GPX
-+ // file format but appears to be found occasionally in
-+ // the wild. Try our best parsing it.
-+
-+ // add the literal string to the format so fromString()
-+ // will succeed
-+ format += "'";
-+ format += timetext.right(6);
-+ format += "'";
-+
-+ // calculate the offset
-+ int offsetHours(timetext.mid(i + 1, 2).toUInt());
-+ int offsetMinutes(timetext.mid(i + 4, 2).toUInt());
-+ if (timetext[i] == '-')
-+ {
-+ tzoffset = -(60 * offsetHours + offsetMinutes);
-+ }
-+ else
-+ {
-+ tzoffset = 60 * offsetHours + offsetMinutes;
-+ }
-+ tzoffset *= 60; // seconds
-+ }
-+
-+ QDateTime datetime = QDateTime::fromString(timetext, format);
-+ datetime.setOffsetFromUtc(tzoffset);
-+
-+ return datetime;
-+}
-+
-+QString IUnit::datetime2string(const QDateTime& time, bool shortDate, const QPointF& pos)
-+{
-+ QTimeZone tz;
-+
-+ tz_mode_e tmpMode = (pos != NOPOINTF) ? timeZoneMode : eTZLocal;
-+
-+ switch(tmpMode)
-+ {
-+ case eTZUtc:
-+ tz = QTimeZone("UTC");
-+ break;
-+
-+ case eTZLocal:
-+ tz = QTimeZone(QTimeZone::systemTimeZoneId());
-+ break;
-+
-+ case eTZAuto:
-+ tz = QTimeZone(pos2timezone(pos));
-+ break;
-+
-+ case eTZSelected:
-+ tz = QTimeZone(timeZone);
-+ break;
-+ }
-+
-+ QDateTime tmp = time.toTimeZone(tz);
-+ return tmp.toString((shortDate|useShortFormat) ? Qt::ISODate : Qt::SystemLocaleLongDate);
-+}
-+
-+QByteArray IUnit::pos2timezone(const QPointF& pos)
-+{
-+ static QImage imgTimezone = QPixmap(":/pics/timezones.png").toImage();
-+
-+ int x = qRound(2048.0 / 360.0 * (180.0 + pos.x() * RAD_TO_DEG));
-+ int y = qRound(1024.0 / 180.0 * (90.0 - pos.y() * RAD_TO_DEG));
-+
-+ QRgb rgb = imgTimezone.pixel(x,y);
-+
-+ if(qRed(rgb) == 0 && qGreen(rgb) == 0)
-+ {
-+ return "UTC";
-+ }
-+
-+ int tz = ((qRed(rgb) & 248) << 1) + ((qGreen(rgb) >> 4) & 15);
-+ if(tz >= N_TIMEZONES)
-+ {
-+ return 0;
-+ }
-+
-+ return tblTimezone[tz];
-+}
-+
-+bool IUnit::degToStr(const qreal& x, const qreal& y, QString& str)
-+{
-+ if(x < -180 || 180 < x)
-+ {
-+ return false;
-+ }
-+
-+ if(y < -90 || 90 < y)
-+ {
-+ return false;
-+ }
-+
-+ switch(coordFormat)
-+ {
-+ case eCoordFormat1:
-+ {
-+ qint32 degN,degE;
-+ qreal minN,minE;
-+
-+ bool signLat = GPS_Math_Deg_To_DegMin(y, &degN, &minN);
-+ bool signLon = GPS_Math_Deg_To_DegMin(x, &degE, &minE);
-+
-+ const QString &lat = signLat ? "S" : "N";
-+ const QString &lng = signLon ? "W" : "E";
-+ str.sprintf("%s%02d° %06.3f %s%03d° %06.3f",lat.toUtf8().data(),qAbs(degN),minN,lng.toUtf8().data(),qAbs(degE),minE);
-+ break;
-+ }
-+
-+ case eCoordFormat2:
-+ {
-+ const QString &lat = (y < 0) ? "S" : "N";
-+ const QString &lng = (x < 0) ? "W" : "E";
-+ str.sprintf("%s%02.6f° %s%03.6f°",lat.toUtf8().data(),qAbs(y),lng.toUtf8().data(),qAbs(x));
-+ break;
-+ }
-+
-+ case eCoordFormat3:
-+ {
-+ qint32 degN,degE;
-+ qreal minN,minE;
-+
-+ bool signLat = GPS_Math_Deg_To_DegMin(y, &degN, &minN);
-+ bool signLon = GPS_Math_Deg_To_DegMin(x, &degE, &minE);
-+
-+ qreal secN = (minN - qFloor(minN)) * 60;
-+ qreal secE = (minE - qFloor(minE)) * 60;
-+
-+ const QString &lat = signLat ? "S" : "N";
-+ const QString &lng = signLon ? "W" : "E";
-+ str.sprintf("%s%02d° %02d' %02.2f'' %s%03d° %02d' %02.2f''",lat.toUtf8().data(),qAbs(degN),qFloor(minN),secN,lng.toUtf8().data(),qAbs(degE),qFloor(minE),secE);
-+ break;
-+ }
-+ }
-+
-+ return true;
-+}
-+
-+bool IUnit::strToDeg(const QString& str, qreal& lon, qreal& lat)
-+{
-+ if(reCoord2.exactMatch(str))
-+ {
-+ bool signLat = reCoord2.cap(1) == "S";
-+ qreal absLat = reCoord2.cap(2).toDouble();
-+ lat = signLat ? -absLat : absLat;
-+
-+ bool signLon = reCoord2.cap(3) == "W";
-+ qreal absLon = reCoord2.cap(4).toDouble();
-+ lon = signLon ? -absLon : absLon;
-+ }
-+ else if(reCoord1.exactMatch(str))
-+ {
-+ bool signLat = reCoord1.cap(1) == "S";
-+ int degLat = reCoord1.cap(2).toInt();
-+ qreal minLat = reCoord1.cap(3).toDouble();
-+
-+ GPS_Math_DegMin_To_Deg(signLat, degLat, minLat, lat);
-+
-+ bool signLon = reCoord1.cap(4) == "W";
-+ int degLon = reCoord1.cap(5).toInt();
-+ qreal minLon = reCoord1.cap(6).toDouble();
-+
-+ GPS_Math_DegMin_To_Deg(signLon, degLon, minLon, lon);
-+ }
-+ else if(reCoord3.exactMatch(str))
-+ {
-+ lat = reCoord3.cap(1).toDouble();
-+ lon = reCoord3.cap(2).toDouble();
-+ }
-+ else if(reCoord4.exactMatch(str))
-+ {
-+ bool signLat = reCoord4.cap(1) == "S";
-+ int degLat = reCoord4.cap(2).toInt();
-+ int minLat = reCoord4.cap(3).toInt();
-+ qreal secLat = reCoord4.cap(4).toFloat();
-+
-+ GPS_Math_DegMinSec_To_Deg(signLat, degLat, minLat, secLat, lat);
-+
-+ bool signLon = reCoord4.cap(5) == "W";
-+ int degLon = reCoord4.cap(6).toInt();
-+ int minLon = reCoord4.cap(7).toInt();
-+ qreal secLon = reCoord4.cap(8).toFloat();
-+
-+ GPS_Math_DegMinSec_To_Deg(signLon, degLon, minLon, secLon, lon);
-+ }
-+ else if(reCoord5.exactMatch(str))
-+ {
-+ bool signLon = reCoord4.cap(4) == "W";
-+ bool signLat = reCoord4.cap(2) == "S";
-+ lat = reCoord5.cap(1).toDouble();
-+ lon = reCoord5.cap(3).toDouble();
-+
-+ if(signLon)
-+ {
-+ lon = -lon;
-+ }
-+ if(signLat)
-+ {
-+ lat = -lat;
-+ }
-+ }
-+ else
-+ {
-+ QMessageBox::warning(&CMainWindow::self(),tr("Error"),tr("Bad position format. Must be: \"[N|S] ddd mm.sss [W|E] ddd mm.sss\" or \"[N|S] ddd.ddd [W|E] ddd.ddd\""),QMessageBox::Ok,QMessageBox::NoButton);
-+ return false;
-+ }
-+
-+ if(fabs(lon) > 180.0 || fabs(lat) > 90.0)
-+ {
-+ QMessageBox::warning(&CMainWindow::self(),tr("Error"),tr("Position values out of bounds. "),QMessageBox::Ok,QMessageBox::NoButton);
-+ return false;
-+ }
-+
-+ return true;
-+}
-+
-+bool IUnit::isValidCoordString(const QString& str)
-+{
-+ if(reCoord1.exactMatch(str))
-+ {
-+ return true;
-+ }
-+ else if(reCoord2.exactMatch(str))
-+ {
-+ return true;
-+ }
-+ else if(reCoord3.exactMatch(str))
-+ {
-+ return true;
-+ }
-+ else if(reCoord4.exactMatch(str))
-+ {
-+ return true;
-+ }
-+ else if(reCoord5.exactMatch(str))
-+ {
-+ return true;
-+ }
-+ return false;
-+}
-diff --git a/src/qmaptool/units/IUnit.h b/src/qmaptool/units/IUnit.h
-new file mode 100644
-index 00000000..f88077ac
---- /dev/null
-+++ b/src/qmaptool/units/IUnit.h
-@@ -0,0 +1,153 @@
-+/**********************************************************************************************
-+ Copyright (C) 2008 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software; you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 2 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program; if not, write to the Free Software
-+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
-+
-+**********************************************************************************************/
-+#ifndef IUNIT_H
-+#define IUNIT_H
-+#include <QObject>
-+#include <QTimeZone>
-+
-+
-+#define NOFLOAT 1000000000000.0
-+#define NOINT 0x7FFFFFFF
-+#define NOTIME 0xFFFFFFFF
-+#define NOIDX (-1)
-+
-+extern const QPointF NOPOINTF;
-+extern const QPoint NOPOINT;
-+
-+class IUnit : public QObject
-+{
-+ Q_OBJECT
-+public:
-+ virtual ~IUnit() = default;
-+
-+ static const IUnit& self()
-+ {
-+ return *m_self;
-+ }
-+
-+ /// convert meter of elevation into a value and unit string
-+ virtual void meter2elevation(qreal meter, QString& val, QString& unit) const = 0;
-+ /// convert meter of distance into a value and unit string
-+ virtual void meter2distance(qreal meter, QString& val, QString& unit) const = 0;
-+ /// convert meter per second to a speed value string and unit label
-+ virtual void meter2speed(qreal meter, QString& val, QString& unit) const;
-+ /// convert square meter to string and unit label
-+ virtual void meter2area(qreal meter, QString& val, QString& unit) const = 0;
-+ /// convert seconds to a timespan of days, hours, minutes and seconds
-+ virtual void seconds2time(quint32 ttime, QString& val, QString& unit) const;
-+ /// convert an elevation string to a float
-+ virtual qreal elevation2meter(const QString& val) const = 0;
-+ /// convert a range in meter into a scale and a matching unit
-+ virtual void meter2unit(qreal meter, qreal& scale, QString& unit) const = 0;
-+
-+
-+ enum type_e {eTypeMetric, eTypeImperial, eTypeNautic};
-+ /// instantiate the correct unit object
-+ static void setUnitType(type_e t, QObject * parent);
-+
-+ /// parse a string for a timestamp
-+ static bool parseTimestamp(const QString &time, QDateTime &datetime);
-+
-+ /**
-+ @brief Convert date time object to string using the current timezone configuration
-+
-+
-+ @param time the date/time object
-+ @param shortDate set true to get a short ISO time string
-+ @param pos optional a position attached to the date/time object [rad]
-+ @return A time string.
-+ */
-+ static QString datetime2string(const QDateTime& time, bool shortDate, const QPointF& pos = NOPOINTF);
-+
-+ /// find the timezone setup by position
-+ static QByteArray pos2timezone(const QPointF& pos);
-+
-+ const type_e type;
-+ const QString baseunit;
-+ const qreal basefactor;
-+ const QString speedunit;
-+ const qreal speedfactor;
-+ static const char *tblTimezone[];
-+
-+ enum tz_mode_e
-+ {
-+ eTZUtc
-+ ,eTZLocal
-+ ,eTZAuto
-+ ,eTZSelected
-+ };
-+
-+ static void getTimeZoneSetup(tz_mode_e& mode, QByteArray& zone, bool& format)
-+ {
-+ mode = timeZoneMode;
-+ zone = timeZone;
-+ format = useShortFormat;
-+ }
-+
-+ static void setTimeZoneSetup(tz_mode_e mode, const QByteArray& zone, bool format)
-+ {
-+ timeZoneMode = mode;
-+ timeZone = zone;
-+ useShortFormat = format;
-+ }
-+
-+ enum coord_format_e
-+ {
-+ eCoordFormat1
-+ ,eCoordFormat2
-+ ,eCoordFormat3
-+ };
-+
-+ static enum coord_format_e getCoordFormat()
-+ {
-+ return coordFormat;
-+ }
-+
-+ static void setCoordFormat(const coord_format_e format)
-+ {
-+ coordFormat = format;
-+ }
-+
-+ static bool degToStr(const qreal& x, const qreal& y, QString& str);
-+
-+ static bool strToDeg(const QString& str, qreal& lon, qreal& lat);
-+
-+ static bool isValidCoordString(const QString& str);
-+
-+protected:
-+ IUnit(const type_e& type, const QString& baseunit, const qreal basefactor, const QString& speedunit, const qreal speedfactor, QObject *parent);
-+
-+ static QDateTime parseTimestamp(const QString &timetext, int& tzoffset);
-+
-+ static tz_mode_e timeZoneMode;
-+ static QByteArray timeZone;
-+ static bool useShortFormat;
-+
-+ static coord_format_e coordFormat;
-+
-+private:
-+ static const IUnit * m_self;
-+
-+ static const QRegExp reCoord1;
-+ static const QRegExp reCoord2;
-+ static const QRegExp reCoord3;
-+ static const QRegExp reCoord4;
-+ static const QRegExp reCoord5;
-+};
-+#endif //IUNIT_H
-diff --git a/src/qmaptool/units/IUnitsSetup.ui b/src/qmaptool/units/IUnitsSetup.ui
-new file mode 100644
-index 00000000..4ccb69fd
---- /dev/null
-+++ b/src/qmaptool/units/IUnitsSetup.ui
-@@ -0,0 +1,125 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<ui version="4.0">
-+ <class>IUnitsSetup</class>
-+ <widget class="QDialog" name="IUnitsSetup">
-+ <property name="geometry">
-+ <rect>
-+ <x>0</x>
-+ <y>0</y>
-+ <width>432</width>
-+ <height>147</height>
-+ </rect>
-+ </property>
-+ <property name="windowTitle">
-+ <string>Setup units...</string>
-+ </property>
-+ <layout class="QVBoxLayout" name="verticalLayout">
-+ <item>
-+ <layout class="QHBoxLayout" name="horizontalLayout">
-+ <item>
-+ <layout class="QVBoxLayout" name="verticalLayout_2">
-+ <item>
-+ <widget class="QRadioButton" name="radioNautic">
-+ <property name="text">
-+ <string>Nautical</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioImperial">
-+ <property name="text">
-+ <string>Imperial</string>
-+ </property>
-+ </widget>
-+ </item>
-+ <item>
-+ <widget class="QRadioButton" name="radioMetric">
-+ <property name="text">
-+ <string>Metric</string>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <widget class="QLabel" name="label">
-+ <property name="sizePolicy">
-+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-+ <horstretch>0</horstretch>
-+ <verstretch>0</verstretch>
-+ </sizepolicy>
-+ </property>
-+ <property name="text">
-+ <string>&lt;b&gt;Note:&lt;/b&gt; For some GUI elements changing the units will not take effect until you restart QMapTool.</string>
-+ </property>
-+ <property name="alignment">
-+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-+ </property>
-+ <property name="wordWrap">
-+ <bool>true</bool>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </item>
-+ <item>
-+ <spacer name="verticalSpacer">
-+ <property name="orientation">
-+ <enum>Qt::Vertical</enum>
-+ </property>
-+ <property name="sizeHint" stdset="0">
-+ <size>
-+ <width>20</width>
-+ <height>7</height>
-+ </size>
-+ </property>
-+ </spacer>
-+ </item>
-+ <item>
-+ <widget class="QDialogButtonBox" name="buttonBox">
-+ <property name="orientation">
-+ <enum>Qt::Horizontal</enum>
-+ </property>
-+ <property name="standardButtons">
-+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-+ </property>
-+ </widget>
-+ </item>
-+ </layout>
-+ </widget>
-+ <resources/>
-+ <connections>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>accepted()</signal>
-+ <receiver>IUnitsSetup</receiver>
-+ <slot>accept()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>248</x>
-+ <y>254</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>157</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ <connection>
-+ <sender>buttonBox</sender>
-+ <signal>rejected()</signal>
-+ <receiver>IUnitsSetup</receiver>
-+ <slot>reject()</slot>
-+ <hints>
-+ <hint type="sourcelabel">
-+ <x>316</x>
-+ <y>260</y>
-+ </hint>
-+ <hint type="destinationlabel">
-+ <x>286</x>
-+ <y>274</y>
-+ </hint>
-+ </hints>
-+ </connection>
-+ </connections>
-+</ui>
-diff --git a/src/qmaptool/version.h b/src/qmaptool/version.h
-new file mode 100644
-index 00000000..5e1ba038
---- /dev/null
-+++ b/src/qmaptool/version.h
-@@ -0,0 +1,33 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef VERSION_H
-+#define VERSION_H
-+
-+#ifndef _MKSTR_1
-+#define _MKSTR_1(x) #x
-+#define _MKSTR(x) _MKSTR_1(x)
-+#endif
-+
-+#define VER_STR _MKSTR(VER_MAJOR) "." _MKSTR (VER_MINOR) "." _MKSTR (VER_STEP)
-+#define VER_SUFFIX _MKSTR(VER_TWEAK)
-+
-+#define WHAT_STR "QMapTool, Version " VER_STR
-+
-+#endif //VERSION_H
-+
diff --git a/gis/qmapshack/line_3px_horizontal.png b/gis/qmapshack/line_3px_horizontal.png
deleted file mode 100644
index 02c89c8dc4..0000000000
--- a/gis/qmapshack/line_3px_horizontal.png
+++ /dev/null
Binary files differ
diff --git a/gis/qmapshack/line_3px_vertical.png b/gis/qmapshack/line_3px_vertical.png
deleted file mode 100644
index f0f447c291..0000000000
--- a/gis/qmapshack/line_3px_vertical.png
+++ /dev/null
Binary files differ
diff --git a/gis/qmapshack/qmapshack.SlackBuild b/gis/qmapshack/qmapshack.SlackBuild
index e8e62e0632..3262134a32 100644
--- a/gis/qmapshack/qmapshack.SlackBuild
+++ b/gis/qmapshack/qmapshack.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for qmapshack
-# Copyright 2015 Daniel Stolarski <daniel.stolarski@gmail.com>
+# Copyright 2015-2020 Daniel Stolarski <daniel.stolarski@gmail.com>
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
@@ -9,10 +9,13 @@
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=qmapshack
-VERSION=${VERSION:-1.13.2}
+VERSION=${VERSION:-1.17.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -22,7 +25,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -46,20 +56,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+rm -rf $PRGNAM-V_${VERSION}
+tar xvf $CWD/${PRGNAM}-V_${VERSION}.tar.gz
cd ${PRGNAM}-V_${VERSION}
-
-# Patches provided in the source tree
-patch -p1 < FindPROJ4.patch
-patch -p1 < FindQuaZip5.patch
-# Further patches and graphics required to build
-patch -p1 < ${CWD}/addqmaptool.patch
-patch -p1 < ${CWD}/qmt_map2jnx.patch
-patch -p1 < ${CWD}/rgb2pct.patch
-mkdir -p src/qmaptool/pic
-cp ${CWD}/splash.png ${CWD}/line_3px_horizontal.png ${CWD}/line_3px_vertical.png src/qmaptool/pic
-
chown -R root:root .
find -L . \
@@ -71,7 +70,6 @@ find -L . \
mkdir -p build
cd build
cmake \
- -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -99,4 +97,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/qmapshack/qmapshack.info b/gis/qmapshack/qmapshack.info
index ce1f5e3073..8e6e139656 100644
--- a/gis/qmapshack/qmapshack.info
+++ b/gis/qmapshack/qmapshack.info
@@ -1,10 +1,10 @@
PRGNAM="qmapshack"
-VERSION="1.13.2"
-HOMEPAGE="https://bitbucket.org/maproom/qmapshack/wiki/Home"
+VERSION="1.17.1"
+HOMEPAGE="https://github.com/Maproom/qmapshack/wiki"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://github.com/Maproom/qmapshack/archive/V_1.13.2/qmapshack-1.13.2.tar.gz"
-MD5SUM_x86_64="1892583083d339bc393ce06919b7c4d9"
-REQUIRES="gdal qt5-webkit routino quazip-qt5"
+DOWNLOAD_x86_64="https://github.com/Maproom/qmapshack/archive/V_1.17.1/qmapshack-V_1.17.1.tar.gz"
+MD5SUM_x86_64="94851207c9e9800f7d2ca0200ce7ecff"
+REQUIRES="gdal routino"
MAINTAINER="Daniel Stolarski"
EMAIL="daniel.stolarski@gmail.com"
diff --git a/gis/qmapshack/qmt_map2jnx.patch b/gis/qmapshack/qmt_map2jnx.patch
deleted file mode 100644
index 50d5a26666..0000000000
--- a/gis/qmapshack/qmt_map2jnx.patch
+++ /dev/null
@@ -1,1199 +0,0 @@
-From 79a266943a40bee8fa5e71776c6a76c4d46bfbf8 Mon Sep 17 00:00:00 2001
-From: Oliver Eichler <oliver.eichler@dspsolutions.de>
-Date: Thu, 12 Sep 2019 20:31:26 +0200
-Subject: [PATCH] [QMS-3] Add qmt_map2jnx from former sub-repo
-
----
- src/qmt_map2jnx/CMakeLists.txt | 59 ++
- src/qmt_map2jnx/argv.cpp | 45 ++
- src/qmt_map2jnx/argv.h | 16 +
- src/qmt_map2jnx/main.cpp | 1039 ++++++++++++++++++++++++++++++++
- 4 files changed, 1159 insertions(+)
- create mode 100644 src/qmt_map2jnx/CMakeLists.txt
- create mode 100644 src/qmt_map2jnx/argv.cpp
- create mode 100644 src/qmt_map2jnx/argv.h
- create mode 100644 src/qmt_map2jnx/main.cpp
-
-diff --git a/src/qmt_map2jnx/CMakeLists.txt b/src/qmt_map2jnx/CMakeLists.txt
-new file mode 100644
-index 00000000..12b29d94
---- /dev/null
-+++ b/src/qmt_map2jnx/CMakeLists.txt
-@@ -0,0 +1,59 @@
-+
-+
-+set(APPLICATION_NAME qmt_map2jnx)
-+set(MAP2JNX_VERSION_MAJOR 1)
-+set(MAP2JNX_VERSION_MINOR 0)
-+set(MAP2JNX_VERSION_PATCH 0)
-+
-+add_definitions(
-+ -DVER_MAJOR=${MAP2JNX_VERSION_MAJOR}
-+ -DVER_MINOR=${MAP2JNX_VERSION_MINOR}
-+ -DVER_STEP=${MAP2JNX_VERSION_PATCH}
-+ -DVER_TWEAK=${VERSION_SUFFIX}
-+ -DAPPLICATION_NAME=${APPLICATION_NAME}
-+)
-+
-+
-+#if you don't want the full compiler output, remove the following line
-+SET(CMAKE_VERBOSE_MAKEFILE ON)
-+SET(SRCS main.cpp argv.cpp)
-+SET(HDRS argv.h)
-+
-+
-+include_directories(
-+ ${CMAKE_BINARY_DIR}
-+ ${CMAKE_CURRENT_BINARY_DIR}
-+ ${GDAL_INCLUDE_DIRS}
-+ ${PROJ4_INCLUDE_DIRS}
-+ ${JPEG_INCLUDE_DIRS}
-+)
-+
-+if(APPLE)
-+ INCLUDE_DIRECTORIES(/System/Library/Frameworks/Foundation.framework)
-+ INCLUDE_DIRECTORIES(/System/Library/Frameworks/DiskArbitration.framework)
-+endif(APPLE)
-+
-+if(WIN32)
-+ include_directories(
-+ ${CMAKE_SOURCE_DIR}/Win32/
-+ )
-+endif(WIN32)
-+
-+#list all source files here
-+ADD_EXECUTABLE( ${APPLICATION_NAME} ${SRCS} ${HDRS})
-+
-+#add definitions, compiler switches, etc.
-+IF(UNIX)
-+ ADD_DEFINITIONS(-Wall)
-+ENDIF(UNIX)
-+
-+IF(WIN32)
-+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
-+ENDIF(WIN32)
-+
-+TARGET_LINK_LIBRARIES(${APPLICATION_NAME} ${GDAL_LIBRARIES} ${PROJ4_LIBRARIES} ${JPEG_LIBRARIES})
-+
-+install(
-+ TARGETS ${APPLICATION_NAME} DESTINATION ${BIN_INSTALL_DIR}
-+)
-+
-diff --git a/src/qmt_map2jnx/argv.cpp b/src/qmt_map2jnx/argv.cpp
-new file mode 100644
-index 00000000..a7f7939c
---- /dev/null
-+++ b/src/qmt_map2jnx/argv.cpp
-@@ -0,0 +1,45 @@
-+/**********************************************************************************************
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#ifdef WIN32
-+#include <windows.h>
-+#endif
-+
-+char* get_argv(const int index, char** argv)
-+{
-+ char* result = NULL;
-+ int len;
-+
-+#ifdef WIN32
-+ int numargs;
-+ wchar_t** argw = CommandLineToArgvW(GetCommandLineW(), &numargs);
-+
-+ // determine the buffer length first (including the trailing null)
-+ len = WideCharToMultiByte(CP_UTF8, 0, argw[index], -1, NULL, 0, NULL, NULL);
-+ result = (char*)calloc(len, 1);
-+ WideCharToMultiByte(CP_UTF8, 0, argw[index], -1, result, len, NULL, NULL);
-+
-+ GlobalFree(argw);
-+#else
-+ len = strlen(argv[index]) + 1;
-+ result = (char*)calloc(len, 1);
-+ strcpy(result, argv[index]);
-+#endif
-+
-+ return result;
-+}
-diff --git a/src/qmt_map2jnx/argv.h b/src/qmt_map2jnx/argv.h
-new file mode 100644
-index 00000000..0967d0b7
---- /dev/null
-+++ b/src/qmt_map2jnx/argv.h
-@@ -0,0 +1,16 @@
-+/**********************************************************************************************
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+char* get_argv(const int index, char** argv);
-diff --git a/src/qmt_map2jnx/main.cpp b/src/qmt_map2jnx/main.cpp
-new file mode 100644
-index 00000000..bef9cc43
---- /dev/null
-+++ b/src/qmt_map2jnx/main.cpp
-@@ -0,0 +1,1039 @@
-+/**********************************************************************************************
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "config.h"
-+
-+#ifdef _MSC_VER
-+#define fseeko _fseeki64
-+#define ftello _ftelli64
-+#else
-+#define _FILE_OFFSET_BITS 64
-+#endif //
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <stdint.h>
-+#include <math.h>
-+#include <wctype.h>
-+
-+
-+#include <list>
-+#include <string>
-+#include <vector>
-+
-+#include <gdal_priv.h>
-+#include <proj_api.h>
-+#include <ogr_spatialref.h>
-+
-+extern "C"
-+{
-+#include <jpeglib.h>
-+}
-+
-+#include "argv.h"
-+
-+
-+#ifndef _MKSTR_1
-+#define _MKSTR_1(x) #x
-+#define _MKSTR(x) _MKSTR_1(x)
-+#endif
-+
-+#define VER_STR _MKSTR(VER_MAJOR) "." _MKSTR(VER_MINOR) "." _MKSTR(VER_STEP)
-+#define WHAT_STR "qmt_map2jnx, Version " VER_STR
-+
-+#define JNX_MAX_TILES 50000 //6250
-+#define JNX_MAX_TILE_SIZE 1024
-+
-+#define JPG_BLOCK_SIZE (JNX_MAX_TILE_SIZE * JNX_MAX_TILE_SIZE)
-+
-+#define HEADER_BLOCK_SIZE 1024
-+
-+#pragma pack(1)
-+
-+struct jnx_hdr_t
-+{
-+ jnx_hdr_t(): version(0x00000004), devid(0), expire(0), productId(0), crc(0), signature(0), signature_offset(0), zorder(25){}
-+ uint32_t version; // byte 00000000..00000003
-+ uint32_t devid; // byte 00000004..00000007
-+ int32_t top; // byte 00000014..00000017
-+ int32_t right; // byte 00000010..00000013
-+ int32_t bottom; // byte 0000000C..0000000F
-+ int32_t left; // byte 00000008..0000000B
-+ uint32_t details; // byte 00000018..0000001B
-+ uint32_t expire; // byte 0000001C..0000001F
-+ uint32_t productId; // byte 00000020..00000023
-+ uint32_t crc; // byte 00000024..00000027
-+ uint32_t signature; // byte 00000028..0000002B
-+ uint32_t signature_offset; // byte 0000002C..0000002F
-+ uint32_t zorder; // byte 00000030..00000033
-+};
-+
-+
-+struct jnx_level_t
-+{
-+ jnx_level_t(): nTiles(0), offset(0), scale(0), dummy(2){}
-+
-+ uint32_t nTiles;
-+ uint32_t offset;
-+ uint32_t scale;
-+ uint32_t dummy;
-+};
-+
-+struct jnx_tile_t
-+{
-+ jnx_tile_t() : top(0), right(0), bottom(0), left(0), width(0), height(0), size(0), offset(0){}
-+ int32_t top;
-+ int32_t right;
-+ int32_t bottom;
-+ int32_t left;
-+ uint16_t width;
-+ uint16_t height;
-+ uint32_t size;
-+ uint32_t offset;
-+};
-+
-+
-+#ifdef WIN32
-+#pragma pack()
-+#else
-+#pragma pack(0)
-+#endif
-+
-+struct file_t
-+{
-+ file_t(): dataset(0), pj(0){memset(colortable,0, sizeof(colortable));}
-+ ~file_t()
-+ {
-+ //if(dataset) delete dataset;
-+ if(pj) pj_free(pj);
-+ }
-+
-+ bool operator<(const file_t& other) const
-+ {
-+ return (xscale > other.xscale);
-+ }
-+
-+ std::string filename;
-+ std::string projection;
-+ GDALDataset * dataset;
-+ projPJ pj;
-+ uint32_t width;
-+ uint32_t height;
-+ double xscale;
-+ double yscale;
-+ double scale;
-+ double xref1;
-+ double yref1;
-+ double xref2;
-+ double yref2;
-+
-+ double lon1;
-+ double lat1;
-+ double lon2;
-+ double lat2;
-+
-+ uint32_t colortable[256];
-+
-+};
-+
-+struct level_t : public jnx_level_t
-+{
-+ std::list<file_t *> files;
-+ uint32_t tileSize;
-+};
-+
-+struct scale_t
-+{
-+ double scale;
-+ uint32_t jnxScale;
-+};
-+
-+/// number of used levels
-+static int32_t nLevels;
-+/// up to five levels. nLevels gives the actual count
-+static level_t levels[5];
-+/// information about all files
-+static std::list<file_t> files;
-+/// the target lon/lat WGS84 projection
-+static projPJ wgs84;
-+/// the JNX file header to be copied to the outfile
-+static jnx_hdr_t jnx_hdr;
-+/// the tile information table for all 5 levels
-+static jnx_tile_t tileTable[JNX_MAX_TILES * 5];
-+/// tile buffer for 8 bit palette tiles, private to readTile
-+static uint8_t tileBuf8Bit[JNX_MAX_TILE_SIZE * JNX_MAX_TILE_SIZE] = {0};
-+/// tile buffer for 24 bit raw RGB tiles, private to writeTile
-+static uint8_t tileBuf24Bit[JNX_MAX_TILE_SIZE * JNX_MAX_TILE_SIZE * 3] = {0};
-+/// tile buffer for 32 bit raw RGBA tiles
-+static uint32_t tileBuf32Bit[JNX_MAX_TILE_SIZE * JNX_MAX_TILE_SIZE] = {0};
-+/// internal jpeg buffer used by write tile.
-+static std::vector<JOCTET> jpgbuf;
-+
-+static void prinfFileinfo(const file_t& file)
-+{
-+ printf("\n\n----------------------");
-+ printf("\n%s:", file.filename.c_str());
-+ printf("\nprojection: %s", file.projection.c_str());
-+ printf("\nwidth: %i pixel height: %i pixel", file.width, file.height);
-+
-+ if(pj_is_latlong(file.pj))
-+ {
-+ printf("\narea (top/left, bottom/right): %f %f, %f %f", file.lat1, file.lon1, file.lat2, file.lon2);
-+ printf("\nxscale: %f °/px, yscale: %f °/px", file.xscale, file.yscale);
-+ }
-+ else
-+ {
-+ printf("\narea (top/left, bottom/right): %f %f, %f %f", file.lat1, file.lon1, file.lat2, file.lon2);
-+ printf("\nxscale: %f m/px, yscale: %f m/px", file.xscale, file.yscale);
-+ }
-+ printf("\nreal scale: %f m/px", file.scale);
-+}
-+
-+bool readTile(uint32_t xoff, uint32_t yoff, uint32_t xsize, uint32_t ysize, file_t& file, uint32_t * output)
-+{
-+ GDALDataset * dataset = file.dataset;
-+ int32_t rasterBandCount = dataset->GetRasterCount();
-+
-+ memset(output,-1, sizeof(uint32_t) * xsize * ysize);
-+
-+ if(rasterBandCount == 1)
-+ {
-+ GDALRasterBand * pBand;
-+ pBand = dataset->GetRasterBand(1);
-+ if(pBand->RasterIO(GF_Read,(int)xoff,(int)yoff, xsize, ysize, tileBuf8Bit,xsize,ysize,GDT_Byte,0,0) == CE_Failure)
-+ {
-+ return false;
-+ }
-+
-+ for(unsigned int i = 0; i < (xsize * ysize); i++)
-+ {
-+ output[i] = file.colortable[tileBuf8Bit[i]];
-+ }
-+ }
-+ else
-+ {
-+ for(int b = 1; b <= rasterBandCount; ++b)
-+ {
-+ GDALRasterBand * pBand;
-+ pBand = dataset->GetRasterBand(b);
-+
-+ uint32_t mask = ~(0x000000FF << (8*(b-1)));
-+
-+ if(pBand->RasterIO(GF_Read,(int)xoff,(int)yoff, xsize, ysize, tileBuf8Bit,xsize,ysize,GDT_Byte,0,0) == CE_Failure)
-+ {
-+ return false;
-+ }
-+
-+ for(unsigned int i = 0; i < (xsize * ysize); i++)
-+ {
-+ uint32_t pixel = output[i];
-+
-+ pixel &= mask;
-+ pixel |= tileBuf8Bit[i] << (8*(b-1));
-+ output[i] = pixel;
-+ }
-+ }
-+ }
-+
-+ return true;
-+}
-+
-+
-+
-+static void init_destination (j_compress_ptr cinfo)
-+{
-+ jpgbuf.resize(JPG_BLOCK_SIZE);
-+ cinfo->dest->next_output_byte = &jpgbuf[0];
-+ cinfo->dest->free_in_buffer = jpgbuf.size();
-+}
-+
-+static boolean empty_output_buffer (j_compress_ptr cinfo)
-+{
-+ size_t oldsize = jpgbuf.size();
-+ jpgbuf.resize(oldsize + JPG_BLOCK_SIZE);
-+ cinfo->dest->next_output_byte = &jpgbuf[oldsize];
-+ cinfo->dest->free_in_buffer = jpgbuf.size() - oldsize;
-+ return true;
-+}
-+
-+static void term_destination (j_compress_ptr cinfo)
-+{
-+ jpgbuf.resize(jpgbuf.size() - cinfo->dest->free_in_buffer);
-+}
-+
-+
-+static uint32_t writeTile(uint32_t xsize, uint32_t ysize, uint32_t * raw_image, FILE * fid, int quality, int subsampling)
-+{
-+ uint32_t size = 0;
-+ struct jpeg_compress_struct cinfo;
-+ struct jpeg_error_mgr jerr;
-+ JSAMPROW row_pointer[1];
-+
-+ jpeg_destination_mgr destmgr = {0};
-+ destmgr.init_destination = init_destination;
-+ destmgr.empty_output_buffer = empty_output_buffer;
-+ destmgr.term_destination = term_destination;
-+
-+ // convert from RGBA to RGB
-+ for(uint32_t r = 0; r < ysize; r++)
-+ {
-+ for(uint32_t c = 0; c < xsize; c++)
-+ {
-+ uint32_t pixel = raw_image[r * xsize + c];
-+ tileBuf24Bit[r * xsize * 3 + c * 3] = pixel & 0x0FF;
-+ tileBuf24Bit[r * xsize * 3 + c * 3 + 1] = (pixel >> 8) & 0x0FF;
-+ tileBuf24Bit[r * xsize * 3 + c * 3 + 2] = (pixel >> 16) & 0x0FF;
-+ }
-+ }
-+
-+ cinfo.err = jpeg_std_error( &jerr );
-+ jpeg_create_compress(&cinfo);
-+
-+ cinfo.dest = &destmgr;
-+ cinfo.image_width = xsize;
-+ cinfo.image_height = ysize;
-+ cinfo.input_components = 3;
-+ cinfo.in_color_space = JCS_RGB;
-+
-+ jpeg_set_defaults( &cinfo );
-+
-+ if (subsampling != -1)
-+ {
-+ switch (subsampling)
-+ {
-+ case 422: // 2x1, 1x1, 1x1 (4:2:2) : Medium
-+ {
-+ cinfo.comp_info[0].h_samp_factor = 2;
-+ cinfo.comp_info[0].v_samp_factor = 1;
-+ cinfo.comp_info[1].h_samp_factor = 1;
-+ cinfo.comp_info[1].v_samp_factor = 1;
-+ cinfo.comp_info[2].h_samp_factor = 1;
-+ cinfo.comp_info[2].v_samp_factor = 1;
-+ break;
-+ }
-+ case 411: // 2x2, 1x1, 1x1 (4:1:1) : High
-+ {
-+ cinfo.comp_info[0].h_samp_factor = 2;
-+ cinfo.comp_info[0].v_samp_factor = 2;
-+ cinfo.comp_info[1].h_samp_factor = 1;
-+ cinfo.comp_info[1].v_samp_factor = 1;
-+ cinfo.comp_info[2].h_samp_factor = 1;
-+ cinfo.comp_info[2].v_samp_factor = 1;
-+ break;
-+ }
-+ case 444: // 1x1 1x1 1x1 (4:4:4) : None
-+ {
-+ cinfo.comp_info[0].h_samp_factor = 1;
-+ cinfo.comp_info[0].v_samp_factor = 1;
-+ cinfo.comp_info[1].h_samp_factor = 1;
-+ cinfo.comp_info[1].v_samp_factor = 1;
-+ cinfo.comp_info[2].h_samp_factor = 1;
-+ cinfo.comp_info[2].v_samp_factor = 1;
-+ break;
-+ }
-+ }
-+ }
-+
-+ if (quality != -1)
-+ {
-+ jpeg_set_quality( &cinfo, quality, TRUE );
-+ }
-+
-+ jpeg_start_compress( &cinfo, TRUE );
-+
-+ while( cinfo.next_scanline < cinfo.image_height )
-+ {
-+ row_pointer[0] = (JSAMPLE*)&tileBuf24Bit[ cinfo.next_scanline * cinfo.image_width * cinfo.input_components];
-+ jpeg_write_scanlines( &cinfo, row_pointer, 1 );
-+ }
-+ /* similar to read file, clean up after we're done compressing */
-+ jpeg_finish_compress( &cinfo );
-+ jpeg_destroy_compress( &cinfo );
-+
-+ // write data to output file
-+ size = jpgbuf.size() - 2;
-+ fwrite(&jpgbuf[2], size, 1, fid);
-+
-+ return size;
-+}
-+
-+static double distance(const double u1, const double v1, const double u2, const double v2)
-+{
-+ double dU = u2 - u1; // lambda
-+ double dV = v2 - v1; // roh
-+
-+ double d = 2*asin(sqrt(sin(dV/2) * sin(dV/2) + cos(v1) * cos(v2) * sin(dU/2) * sin(dU/2)));
-+
-+ return 6371010 * d;
-+}
-+
-+static uint32_t scale2jnx(double scale)
-+{
-+ /*
-+ Ok, I've made some calculations, and got the following formula to
-+ calculate the JNX scale (S) depending on the map's meters/pixel
-+ ratio (R):
-+
-+ S(R) =
-+ qRound(
-+ 76437 *
-+ exp(
-+ ln(2.000032708011) *
-+ qRound(
-+ ln(R * 130.2084 / 76437) /
-+ ln(2.000032708011)
-+ )
-+ )
-+ )
-+
-+
-+ where
-+ qRound - is a function which returns the closest integer from
-+ floating point value, [unfortunately its defined in C99 but not standard C++]
-+ exp - exponent,
-+ ln - natural logarithm.
-+
-+ Magic number 130.2084 - is an average value for
-+ (JNX scale) / (maps meters per pixel)
-+ ratio among all zoom levels in metric system.
-+
-+ Magic number 2.000032708011 is a ratio on which our standard scale
-+ table is built. It is (76437 / 4777) ^ (1/4).
-+ */
-+
-+ return (uint32_t)floor(0.5 + 76437 * exp(log(2.000032708011) * floor(0.5 + log(scale * 10 * 130.2084 / 76437) / log(2.000032708011) ) ) );
-+}
-+
-+static char randChar()
-+{
-+ char buf[2];
-+#if defined(HAVE_ARC4RANDOM)
-+ int r = (int)((arc4random() * 16.0) / UINT_MAX);
-+#else
-+ int r = (int)((rand() * 16.0) / RAND_MAX);
-+#endif
-+ sprintf(buf,"%X", r & 0x0F);
-+ return buf[0];
-+}
-+
-+static void createGUID(char * guid)
-+{
-+#if !defined(HAVE_ARC4RANDOM)
-+ srand((unsigned int)time(0));
-+#endif
-+
-+ guid[0] = randChar();
-+ guid[1] = randChar();
-+ guid[2] = randChar();
-+ guid[3] = randChar();
-+ guid[4] = randChar();
-+ guid[5] = randChar();
-+ guid[6] = randChar();
-+ guid[7] = randChar();
-+ guid[8] = '-';
-+ guid[9] = randChar();
-+ guid[10] = randChar();
-+ guid[11] = randChar();
-+ guid[12] = randChar();
-+ guid[13] = '-';
-+ guid[14] = randChar();
-+ guid[15] = randChar();
-+ guid[16] = randChar();
-+ guid[17] = randChar();
-+ guid[18] = '-';
-+ guid[19] = randChar();
-+ guid[20] = randChar();
-+ guid[21] = randChar();
-+ guid[22] = randChar();
-+ guid[23] = '-';
-+ guid[24] = randChar();
-+ guid[25] = randChar();
-+ guid[26] = randChar();
-+ guid[27] = randChar();
-+ guid[28] = randChar();
-+ guid[29] = randChar();
-+ guid[30] = randChar();
-+ guid[31] = randChar();
-+ guid[32] = randChar();
-+ guid[33] = randChar();
-+ guid[34] = randChar();
-+ guid[35] = randChar();
-+ guid[36] = 0;
-+
-+}
-+
-+/// this code is from the GDAL project
-+static void printProgress(int current, int total)
-+{
-+ double dfComplete = double(current)/double(total);
-+
-+ static int nLastTick = -1;
-+ int nThisTick = (int) (dfComplete * 40.0);
-+
-+ nThisTick = MIN(40,MAX(0,nThisTick));
-+
-+ // Have we started a new progress run?
-+ if( nThisTick < nLastTick && nLastTick >= 39 )
-+ {
-+ nLastTick = -1;
-+ }
-+
-+ if( nThisTick <= nLastTick )
-+ {
-+ return;
-+ }
-+
-+ while( nThisTick > nLastTick )
-+ {
-+ nLastTick++;
-+ if( nLastTick % 4 == 0 )
-+ {
-+ fprintf( stdout, "%d", (nLastTick / 4) * 10 );
-+ }
-+ else
-+ {
-+ fprintf( stdout, "." );
-+ }
-+ }
-+
-+ if( nThisTick == 40 )
-+ {
-+ fprintf( stdout, " - done.\n" );
-+ }
-+ else
-+ {
-+ fflush( stdout );
-+ }
-+
-+}
-+
-+
-+int main(int argc, char ** argv)
-+{
-+ uint16_t tmp16;
-+ const uint8_t dummy = 0;
-+ uint32_t tileTableStart = 0;
-+ uint32_t tileCnt = 0;
-+ uint32_t tilesTotal = 0;
-+ char projstr[1024];
-+ OGRSpatialReference oSRS;
-+ int quality = -1;
-+ int subsampling = -1;
-+
-+ const char *copyright = "Unknown";
-+ const char *subscname = "BirdsEye";
-+ const char *mapname = "Unknown";
-+
-+ char *copyright_buf = NULL;
-+ char *subscname_buf = NULL;
-+ char *mapname_buf = NULL;
-+
-+ std::vector<int> forced_scale_values;
-+
-+ printf("\n****** %s ******\n", WHAT_STR);
-+
-+ if(argc < 2)
-+ {
-+ fprintf(stderr,"\nusage: qmt_map2jnx -q <1..100> -s <411|422|444> -p <0..> -c \"copyright notice\" -m \"BirdsEye\" -n \"Unknown\" -x file1_scale,file2_scale,...,fileN_scale <file1> <file2> ... <fileN> <outputfile>\n");
-+ fprintf(stderr,"\n");
-+ fprintf(stderr," -q The JPEG quality from 1 to 100. Default is 75 \n");
-+ fprintf(stderr," -s The chroma subsampling. Default is 411 \n");
-+ fprintf(stderr," -p The product ID. Default is 0 \n");
-+ fprintf(stderr," -c The copyright notice. Default is \"Unknown\" \n");
-+ fprintf(stderr," -m The subscription product name. Default is \"BirdsEye\" \n");
-+ fprintf(stderr," -n The map name. Default is \"Unknown\" \n");
-+ fprintf(stderr," -z The z order (drawing order). Default is 25\n");
-+ fprintf(stderr," -x Override levels scale. Default: autodetect\n");
-+ fprintf(stderr,"\n");
-+ fprintf(stderr,"\nThe projection of the input files must have the same latitude along");
-+ fprintf(stderr,"\na pixel row. Mecator and Longitude/Latitude projections match this");
-+ fprintf(stderr,"\nthis property. Transversal Merkator or Lambert projections do not.");
-+ fprintf(stderr,"\n");
-+ fprintf(stderr,"\nTo rectify a geotiff map, you can use the gdalwarp command, e.g.");
-+ fprintf(stderr,"\ngdalwarp -t_srs \"EPSG:4326\" <inputfile> <outputfile>");
-+ fprintf(stderr,"\n");
-+ fprintf(stderr,"Scale levels must be pass in same order as level files pointed.\n");
-+ fprintf(stderr,"Empty and zero values equal to autodetect. We can point only needed\n");
-+ fprintf(stderr,"levels, like:\n");
-+ fprintf(stderr," -x 45356,,,75; -x ,,,,75\n");
-+ fprintf(stderr,"Calculated levels table can be found:\n");
-+ fprintf(stderr," English: http://whiter.brinkster.net/en/JNX.shtml\n");
-+ fprintf(stderr," Russian: http://whiter.brinkster.net/JNX.shtml\n");
-+ fprintf(stderr,"Most common values for different map scales:\n");
-+ fprintf(stderr," JNX scale Map scale\n");
-+ fprintf(stderr," ------------- ---------\n");
-+ fprintf(stderr," 78125-31250 1:1 000 000\n");
-+ fprintf(stderr," 20834-7813 1:500 000\n");
-+ fprintf(stderr," 7813-3125 1:200 000\n");
-+ fprintf(stderr," 3125-2084 1:100 000\n");
-+ fprintf(stderr," 2084-782 1:50 000\n");
-+ fprintf(stderr," 782-32 1:25 000\n");
-+ fprintf(stderr," 32-21 1:10 000\n");
-+ fprintf(stderr," 21-14 1:5000, 1:2000\n");
-+ fprintf(stderr,"\n");
-+ fprintf(stderr,"\n");
-+ exit(-1);
-+ }
-+
-+ GDALAllRegister();
-+ wgs84 = pj_init_plus("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs");
-+
-+ // read geo information from input files
-+ //files.resize(argc - 2);
-+ int skip_next_arg = 0;
-+ int files_count = 0;
-+
-+ for(int i = 1; i < (argc - 1); i++)
-+ {
-+ if (skip_next_arg)
-+ {
-+ skip_next_arg = 0;
-+ continue;
-+ }
-+
-+ if (argv[i][0] == '-')
-+ {
-+ if (towupper(argv[i][1]) == 'Q')
-+ {
-+ quality = atol(argv[i+1]);
-+ skip_next_arg = 1;
-+ continue;
-+ }
-+ else if (towupper(argv[i][1]) == 'S')
-+ {
-+ subsampling = atol(argv[i+1]);
-+ skip_next_arg = 1;
-+ continue;
-+ }
-+ else if (towupper(argv[i][1]) == 'P')
-+ {
-+ jnx_hdr.productId = atol(argv[i+1]);
-+ skip_next_arg = 1;
-+ continue;
-+ }
-+ else if (towupper(argv[i][1]) == 'C')
-+ {
-+ copyright = copyright_buf = get_argv(i + 1, argv);
-+ skip_next_arg = 1;
-+ continue;
-+ }
-+ else if (towupper(argv[i][1]) == 'M')
-+ {
-+ subscname = subscname_buf = get_argv(i + 1, argv);
-+ skip_next_arg = 1;
-+ continue;
-+ }
-+ else if (towupper(argv[i][1]) == 'N')
-+ {
-+ mapname = mapname_buf = get_argv(i + 1, argv);
-+ skip_next_arg = 1;
-+ continue;
-+ }
-+ else if (towupper(argv[i][1]) == 'Z')
-+ {
-+ jnx_hdr.zorder = atol(argv[i+1]);
-+ skip_next_arg = 1;
-+ continue;
-+ }
-+ else if (towupper(argv[i][1]) == 'X')
-+ {
-+ skip_next_arg = 1;
-+
-+ std::string scales_buf(get_argv(i + 1, argv));
-+ size_t pos = 0;
-+ size_t last_pos = 0;
-+
-+ pos = scales_buf.find_first_of(',');
-+ std::string val;
-+ while (pos != std::string::npos)
-+ {
-+ val = scales_buf.substr(last_pos, pos - last_pos);
-+ last_pos = pos + 1;
-+ pos = scales_buf.find_first_of(',', pos + 1);
-+
-+ //printf("val: %s : %d\n", val.c_str(), pos);
-+ forced_scale_values.push_back(atol(val.c_str()));
-+ }
-+ val = scales_buf.substr(last_pos, pos);
-+ //printf("val: %s : %d\n", val.c_str(), pos);
-+ forced_scale_values.push_back(atol(val.c_str()));
-+
-+ continue;
-+ }
-+
-+ }
-+
-+ files_count++;
-+ files.resize(files_count);
-+
-+ double dist;
-+
-+ GDALDataset * dataset = (GDALDataset*)GDALOpen(argv[i],GA_ReadOnly);
-+ if(dataset == 0)
-+ {
-+ fprintf(stderr,"\nFailed to open %s\n", argv[i]);
-+ exit(-1);
-+ }
-+
-+ projPJ pj;
-+ char * ptr = projstr;
-+
-+ if(dataset->GetProjectionRef())
-+ {
-+ strncpy(projstr,dataset->GetProjectionRef(),sizeof(projstr));
-+ }
-+ oSRS.importFromWkt(&ptr);
-+ oSRS.exportToProj4(&ptr);
-+
-+ pj = pj_init_plus(ptr);
-+ if(pj == 0)
-+ {
-+ fprintf(stderr,"\nUnknown projection in file %s\n", argv[i]);
-+ exit(-1);
-+ }
-+
-+ double adfGeoTransform[6];
-+ dataset->GetGeoTransform( adfGeoTransform );
-+
-+ std::list<file_t>::iterator f = files.begin();
-+ std::advance(f, files_count - 1);
-+
-+ file_t& file = *f;
-+ file.filename = argv[i];
-+ file.projection = ptr;
-+ file.dataset = dataset;
-+ file.pj = pj;
-+ file.width = dataset->GetRasterXSize();
-+ file.height = dataset->GetRasterYSize();
-+ file.xscale = adfGeoTransform[1];
-+ file.yscale = adfGeoTransform[5];
-+ file.xref1 = adfGeoTransform[0];
-+ file.yref1 = adfGeoTransform[3];
-+ file.xref2 = file.xref1 + file.width * file.xscale;
-+ file.yref2 = file.yref1 + file.height * file.yscale;
-+
-+ if(pj_is_latlong(file.pj))
-+ {
-+ file.lon1 = file.xref1;
-+ file.lat1 = file.yref1;
-+ file.lon2 = file.xref2;
-+ file.lat2 = file.yref2;
-+ }
-+ else
-+ {
-+ file.lon1 = file.xref1;
-+ file.lat1 = file.yref1;
-+ file.lon2 = file.xref2;
-+ file.lat2 = file.yref2;
-+
-+ pj_transform(pj,wgs84,1,0,&file.lon1,&file.lat1,0);
-+ pj_transform(pj,wgs84,1,0,&file.lon2,&file.lat2,0);
-+
-+ file.lon1 *= RAD_TO_DEG;
-+ file.lat1 *= RAD_TO_DEG;
-+ file.lon2 *= RAD_TO_DEG;
-+ file.lat2 *= RAD_TO_DEG;
-+ }
-+
-+ dist = distance(file.lon1 * DEG_TO_RAD, file.lat1 * DEG_TO_RAD, file.lon2 * DEG_TO_RAD, file.lat1 * DEG_TO_RAD);
-+ file.scale = dist/file.width;
-+
-+ // fill color table if necessary
-+ GDALRasterBand * pBand;
-+ pBand = dataset->GetRasterBand(1);
-+
-+ if(pBand->GetColorInterpretation() == GCI_PaletteIndex)
-+ {
-+ GDALColorTable * pct = pBand->GetColorTable();
-+ for(int c=0; c < pct->GetColorEntryCount(); ++c)
-+ {
-+ const GDALColorEntry& e = *pct->GetColorEntry(c);
-+ file.colortable[c] = e.c1 | (e.c2 << 8) | (e.c3 << 16) | (e.c4 << 24);
-+ }
-+ }
-+ else if(pBand->GetColorInterpretation() == GCI_GrayIndex )
-+ {
-+ for(int c=0; c < 256; ++c)
-+ {
-+ file.colortable[c] = c | (c << 8) | (c << 16) | 0xFF000000;
-+ }
-+ }
-+
-+ int success = 0;
-+ int idx = (int)pBand->GetNoDataValue(&success);
-+
-+ if(success)
-+ {
-+ file.colortable[idx] &= 0x00FFFFFF;
-+ }
-+ }
-+
-+ // apply sorted files to levels and extract file header data
-+ double right = -180.0;
-+ double top = -90.0;
-+ double left = 180.0;
-+ double bottom = 90.0;
-+
-+ double scale = 0.0;
-+ files.sort();
-+ std::list<file_t>::iterator f;
-+ for(f = files.begin(); f != files.end(); f++)
-+ {
-+ file_t& file = *f;
-+ prinfFileinfo(file);
-+
-+ if(file.lon1 < left) left = file.lon1;
-+ if(file.lat1 > top) top = file.lat1;
-+ if(file.lat2 < bottom) bottom = file.lat2;
-+ if(file.lon2 > right) right = file.lon2;
-+
-+ if(scale != 0.0 && ((fabs(scale - file.xscale)) / scale) > 0.02)
-+ {
-+ nLevels++;
-+ if(nLevels > 4)
-+ {
-+ fprintf(stderr,"\nToo many different detail levels.\n");
-+ exit(-1);
-+ }
-+ }
-+ scale = file.xscale;
-+
-+ levels[nLevels].files.push_back(&file);
-+ }
-+ nLevels++;
-+
-+ FILE * fid = fopen(argv[argc-1],"wb");
-+ if(fid == 0)
-+ {
-+ fprintf(stderr,"\nFailed to create file %s\n", argv[argc-1]);
-+ exit(-1);
-+ }
-+
-+ jnx_hdr.left = (int32_t)((left * 0x7FFFFFFF) / 180);
-+ jnx_hdr.top = (int32_t)((top * 0x7FFFFFFF) / 180);
-+ jnx_hdr.right = (int32_t)((right * 0x7FFFFFFF) / 180);
-+ jnx_hdr.bottom = (int32_t)((bottom * 0x7FFFFFFF) / 180);
-+
-+ jnx_hdr.details = nLevels;
-+
-+ printf("\n\n======== map header ========");
-+ printf("\nmap area (top/left, bottom/right): %f %f, %f %f", left, top, right, bottom);
-+ printf("\n %08X %08X, %08X %08X", jnx_hdr.left, jnx_hdr.top, jnx_hdr.right, jnx_hdr.bottom);
-+ printf("\nnumber of detail levels: %i", jnx_hdr.details);
-+ printf("\nz-order: %i\n", jnx_hdr.zorder);
-+
-+
-+ for(int i=0; i<HEADER_BLOCK_SIZE; i++)
-+ {
-+ fwrite(&dummy, sizeof(dummy), 1, fid);
-+ }
-+ fseeko(fid,0,SEEK_SET);
-+ fwrite(&jnx_hdr, sizeof(jnx_hdr), 1, fid);
-+
-+ // --------------------------------------------------------------
-+ // get all information to write the table of detail levels and the dummy tile table
-+ for(int i = 0; i < nLevels; i++)
-+ {
-+ uint32_t size = 256;
-+ level_t& level = levels[i];
-+ std::list<file_t *>::iterator f;
-+ double scale = 0.0;
-+
-+ while(size <= JNX_MAX_TILE_SIZE)
-+ {
-+ level.nTiles = 0;
-+ level.tileSize = size;
-+ for(f = level.files.begin(); f != level.files.end(); f++)
-+ {
-+ file_t& file = *(*f);
-+ double xTiles = file.width / double(size);
-+ double yTiles = file.height / double(size);
-+ level.nTiles += int(ceil(xTiles)) * int(ceil(yTiles));
-+
-+ scale = file.scale;
-+ }
-+
-+ if(level.nTiles < JNX_MAX_TILES)
-+ {
-+ break;
-+ }
-+ size <<= 1;
-+ }
-+
-+
-+ level.offset = tilesTotal * sizeof(jnx_tile_t) + HEADER_BLOCK_SIZE; // still has to be offset by complete header
-+ if (forced_scale_values.size() == 0 || (unsigned)i >= forced_scale_values.size() || forced_scale_values[i] == 0)
-+ {
-+ level.scale = scale2jnx(scale);
-+ }
-+ else
-+ {
-+ level.scale = forced_scale_values[i];
-+ }
-+ tilesTotal += level.nTiles;
-+
-+ fwrite(&level.nTiles, sizeof(level.nTiles), 1, fid);
-+ fwrite(&level.offset, sizeof(level.offset), 1, fid);
-+ fwrite(&level.scale, sizeof(level.scale), 1, fid);
-+ fwrite(&level.dummy, sizeof(level.dummy), 1, fid);
-+ fwrite(copyright, strlen(copyright) + 1, 1, fid);
-+
-+
-+ printf("\n Level %i: % 5i tiles, offset %08X, scale: %i, %ix%i", i, level.nTiles, level.offset, level.scale, level.tileSize, level.tileSize);
-+
-+ }
-+
-+ // --------------------------------------------------------------
-+ // write map loader info block
-+ uint32_t blockVersion = 0x00000009;
-+ char GUID[40];
-+ createGUID(GUID);
-+
-+ tmp16 = jnx_hdr.productId;
-+
-+ fwrite(&blockVersion, sizeof(blockVersion), 1, fid);
-+ fwrite(GUID, 37, 1, fid);
-+ fwrite(subscname, strlen(subscname) + 1, 1, fid);
-+ fwrite(&dummy, sizeof(dummy), 1, fid);
-+ fwrite(&tmp16, sizeof(tmp16), 1, fid);
-+ fwrite(mapname, strlen(mapname) + 1, 1, fid);
-+ fwrite(&nLevels , sizeof(nLevels), 1, fid);
-+ for(int i = 1; i <= nLevels; i++)
-+ {
-+ char str[40];
-+ sprintf(str,"Level %i", i);
-+ fwrite(str, strlen(str) + 1, 1, fid);
-+ fwrite(str, strlen(str) + 1, 1, fid);
-+ fwrite(copyright, strlen(copyright) + 1, 1, fid);
-+ fwrite(&i,sizeof(i), 1, fid);
-+ }
-+
-+ // --------------------------------------------------------------
-+ // write dummy tile table
-+ tileTableStart = HEADER_BLOCK_SIZE;
-+ fseeko(fid, tileTableStart, SEEK_SET);
-+ fwrite(tileTable, sizeof(jnx_tile_t), tilesTotal, fid);
-+
-+ // --------------------------------------------------------------
-+ // read tiles from input files and write jpeg coded tiles to output file
-+ printf("\n\nStart conversion:\n");
-+ for(int l = 0; l < nLevels; l++)
-+ {
-+ level_t& level = levels[l];
-+
-+ std::list<file_t *>::iterator f;
-+ for(f = level.files.begin(); f != level.files.end(); f++)
-+ {
-+ file_t& file = *(*f);
-+
-+ uint32_t xoff = 0;
-+ uint32_t yoff = 0;
-+
-+ uint32_t xsize = level.tileSize;
-+ uint32_t ysize = level.tileSize;
-+
-+ while(yoff < file.height)
-+ {
-+ if(ysize > (file.height - yoff))
-+ {
-+ ysize = file.height - yoff;
-+ }
-+
-+ xsize = level.tileSize;
-+ xoff = 0;
-+
-+ while(xoff < file.width)
-+ {
-+ if(xsize > (file.width - xoff))
-+ {
-+ xsize = (file.width - xoff);
-+ }
-+
-+ // //
-+ if(!readTile(xoff, yoff, xsize, ysize, file, tileBuf32Bit))
-+ {
-+ fprintf(stderr,"\nError reading tiles from map file\n");
-+ exit(-1);
-+ }
-+
-+ jnx_tile_t& tile = tileTable[tileCnt++];
-+ if(pj_is_latlong(file.pj))
-+ {
-+
-+ double u1 = file.lon1 + xoff * file.xscale;
-+ double v1 = file.lat1 + yoff * file.yscale;
-+ double u2 = file.lon1 + (xoff + xsize) * file.xscale;
-+ double v2 = file.lat1 + (yoff + ysize) * file.yscale;
-+
-+
-+ tile.left = (int32_t)(u1 * 0x7FFFFFFF / 180);
-+ tile.top = (int32_t)(v1 * 0x7FFFFFFF / 180);
-+ tile.right = (int32_t)(u2 * 0x7FFFFFFF / 180);
-+ tile.bottom = (int32_t)(v2 * 0x7FFFFFFF / 180);
-+
-+ }
-+ else
-+ {
-+ double u1 = file.xref1 + xoff * file.xscale;
-+ double v1 = file.yref1 + yoff * file.yscale;
-+ double u2 = file.xref1 + (xoff + xsize) * file.xscale;
-+ double v2 = file.yref1 + (yoff + ysize) * file.yscale;
-+
-+ pj_transform(file.pj,wgs84,1,0,&u1,&v1,0);
-+ pj_transform(file.pj,wgs84,1,0,&u2,&v2,0);
-+
-+ tile.left = (int32_t)((u1 * RAD_TO_DEG) * 0x7FFFFFFF / 180);
-+ tile.top = (int32_t)((v1 * RAD_TO_DEG) * 0x7FFFFFFF / 180);
-+ tile.right = (int32_t)((u2 * RAD_TO_DEG) * 0x7FFFFFFF / 180);
-+ tile.bottom = (int32_t)((v2 * RAD_TO_DEG) * 0x7FFFFFFF / 180);
-+ }
-+
-+ tile.width = xsize;
-+ tile.height = ysize;
-+ tile.offset = (uint32_t)(ftello(fid) & 0x0FFFFFFFF);
-+ tile.size = writeTile(xsize, ysize, tileBuf32Bit, fid, quality, subsampling);
-+
-+ printProgress(tileCnt, tilesTotal);
-+ // //
-+ xoff += xsize;
-+ }
-+
-+ yoff += ysize;
-+ }
-+ }
-+ }
-+
-+ // terminate output file
-+ fwrite("BirdsEye", 8, 1, fid);
-+
-+ // write final tile table
-+ fseeko(fid, tileTableStart, SEEK_SET);
-+ fwrite(tileTable, sizeof(jnx_tile_t), tilesTotal, fid);
-+ // done
-+ fclose(fid);
-+
-+ // clean up
-+ pj_free(wgs84);
-+ GDALDestroyDriverManager();
-+ if (copyright_buf)
-+ free(copyright_buf);
-+ if (subscname_buf)
-+ free(subscname_buf);
-+ if (mapname_buf)
-+ free(mapname_buf);
-+ printf("\n\n");
-+ return 0;
-+}
diff --git a/gis/qmapshack/rgb2pct.patch b/gis/qmapshack/rgb2pct.patch
deleted file mode 100644
index 92c5df8776..0000000000
--- a/gis/qmapshack/rgb2pct.patch
+++ /dev/null
@@ -1,971 +0,0 @@
-From 763cfc149566325cce9e4690cb7b5f986048f86a Mon Sep 17 00:00:00 2001
-From: Oliver Eichler <oliver.eichler@dspsolutions.de>
-Date: Thu, 12 Sep 2019 20:32:06 +0200
-Subject: [PATCH] [QMS-3] Add qmt_rgb2pct from former sub-repo
-
----
- src/qmt_rgb2pct/CApp.cpp | 280 +++++++++++++++++++++++
- src/qmt_rgb2pct/CApp.h | 55 +++++
- src/qmt_rgb2pct/CMakeLists.txt | 117 ++++++++++
- src/qmt_rgb2pct/README.md | 5 +
- src/qmt_rgb2pct/locale/qmt_rgb2pct.ts | 126 ++++++++++
- src/qmt_rgb2pct/locale/qmt_rgb2pct_de.ts | 127 ++++++++++
- src/qmt_rgb2pct/main.cpp | 155 +++++++++++++
- src/qmt_rgb2pct/version.h | 33 +++
- 8 files changed, 898 insertions(+)
- create mode 100644 src/qmt_rgb2pct/CApp.cpp
- create mode 100644 src/qmt_rgb2pct/CApp.h
- create mode 100644 src/qmt_rgb2pct/CMakeLists.txt
- create mode 100644 src/qmt_rgb2pct/README.md
- create mode 100644 src/qmt_rgb2pct/locale/qmt_rgb2pct.ts
- create mode 100644 src/qmt_rgb2pct/locale/qmt_rgb2pct_de.ts
- create mode 100644 src/qmt_rgb2pct/main.cpp
- create mode 100644 src/qmt_rgb2pct/version.h
-
-diff --git a/src/qmt_rgb2pct/CApp.cpp b/src/qmt_rgb2pct/CApp.cpp
-new file mode 100644
-index 00000000..993ed759
---- /dev/null
-+++ b/src/qmt_rgb2pct/CApp.cpp
-@@ -0,0 +1,280 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CApp.h"
-+
-+#include <gdal_alg.h>
-+#include <gdal_priv.h>
-+#include <iostream>
-+
-+const GDALColorEntry CApp::noColor = {255,255,255,0};
-+
-+void printStdoutQString(const QString& str)
-+{
-+ QByteArray array = str.toUtf8();
-+ printf("%s", array.data());
-+ printf("\n");
-+}
-+
-+void printStderrQString(const QString& str)
-+{
-+ QByteArray array = str.toUtf8();
-+ fprintf(stderr, "%s", array.data());
-+ fprintf(stderr, "\n");
-+}
-+
-+
-+
-+CApp::CApp(qint32 ncolors, const QString& pctFilename, const QString &sctFilename, const QString &srcFilename, const QString &tarFilename)
-+ : ncolors(ncolors)
-+ , pctFilename(pctFilename)
-+ , sctFilename(sctFilename)
-+ , srcFilename(srcFilename)
-+ , tarFilename(tarFilename)
-+{
-+ GDALAllRegister();
-+}
-+
-+qint32 CApp::exec()
-+{
-+ qint32 res = 0;
-+ GDALColorTable * ct = nullptr;
-+ GDALDataset * dsSrc = nullptr;
-+ try
-+ {
-+ dsSrc = (GDALDataset*)GDALOpenShared(srcFilename.toUtf8(),GA_ReadOnly);
-+ if(dsSrc == nullptr)
-+ {
-+ throw tr("Failed to open source file.");
-+ }
-+
-+ if(dsSrc->GetRasterCount() < 3 || dsSrc->GetRasterCount() > 4)
-+ {
-+ throw tr("Raster band count of source file must be either 3 or 4.");
-+ }
-+
-+ if(QFile(tarFilename).exists())
-+ {
-+ QFile::remove(tarFilename);
-+ }
-+
-+ ct = createColorTable(ncolors, pctFilename, dsSrc);
-+ saveColorTable(ct, sctFilename);
-+ ditherMap(dsSrc, tarFilename, ct);
-+ }
-+ catch(const QString& msg)
-+ {
-+ printStderrQString(msg);
-+ res = -1;
-+ }
-+
-+
-+ GDALClose(dsSrc);
-+ delete ct;
-+ return res;
-+}
-+
-+GDALColorTable * CApp::createColorTable(qint32 ncolors, const QString& pctFilename, GDALDataset * dataset)
-+{
-+ GDALColorTable * ct = nullptr;
-+ try
-+ {
-+ if(pctFilename.isEmpty())
-+ {
-+ ct = (GDALColorTable*)GDALCreateColorTable(GPI_RGB);
-+
-+ printStdoutQString(tr("Calculate optimal color table from source file"));
-+
-+ int ok = GDALComputeMedianCutPCT(dataset->GetRasterBand(1),
-+ dataset->GetRasterBand(2),
-+ dataset->GetRasterBand(3),
-+ nullptr,
-+ ncolors,
-+ ct,
-+ GDALTermProgress,
-+ 0
-+ );
-+
-+ if(ok != CE_None)
-+ {
-+ throw tr("Failed to create color table.");
-+ }
-+ }
-+ else
-+ {
-+ GDALDataset * dsPct = (GDALDataset*)GDALOpenShared(pctFilename.toUtf8(),GA_ReadOnly);
-+ if(dsPct == nullptr)
-+ {
-+ throw tr("Failed to open file with palette.");
-+ }
-+
-+ GDALRasterBand * band = (GDALRasterBand*)dsPct->GetRasterBand(1);
-+
-+ if((dsPct->GetRasterCount() != 1) || (band->GetColorInterpretation() != GCI_PaletteIndex))
-+ {
-+ GDALClose(dsPct);
-+ throw tr("Palette file does not have a single band with a color table");
-+ }
-+
-+ int ok = 0;
-+ band->GetNoDataValue(&ok);
-+
-+ if(ok || band->GetColorTable()->GetColorEntryCount() > 255)
-+ {
-+ GDALClose(dsPct);
-+ throw tr("The color table must not contain a \"no data\" value and it's size must not exceed 255 colors.");
-+ }
-+
-+ ct = dsPct->GetRasterBand(1)->GetColorTable()->Clone();
-+ }
-+ }
-+ catch(const QString& msg)
-+ {
-+ delete ct;
-+ throw msg;
-+ }
-+ return ct;
-+}
-+
-+void CApp::saveColorTable(GDALColorTable * ct, QString& sctFilename)
-+{
-+ if(sctFilename.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ if(!sctFilename.endsWith(".vrt"))
-+ {
-+ sctFilename += ".vrt";
-+ }
-+
-+ QByteArray buf = sctFilename.toUtf8();
-+ printStdoutQString(tr("Save color table to: %1").arg(buf.data()));
-+
-+ GDALDriverManager * drvman = GetGDALDriverManager();
-+ GDALDriver * driver = drvman->GetDriverByName("VRT");
-+ GDALDataset * dataset = driver->Create(sctFilename.toUtf8(), 1, 1, 1, GDT_Byte, {});
-+
-+ dataset->GetRasterBand(1)->SetColorInterpretation(GCI_PaletteIndex);
-+ dataset->GetRasterBand(1)->SetColorTable(ct);
-+
-+ dataset->FlushCache();
-+ GDALClose(dataset);
-+}
-+
-+void CApp::ditherMap(GDALDataset * dsSrc, const QString& tarFilename, GDALColorTable *ct)
-+{
-+ if(tarFilename.isEmpty())
-+ {
-+ return;
-+ }
-+
-+ qint32 xsize = dsSrc->GetRasterBand(1)->GetXSize();
-+ qint32 ysize = dsSrc->GetRasterBand(1)->GetYSize();
-+
-+ GDALDriverManager * drvman = nullptr;
-+ GDALDriver * driver = nullptr;
-+ GDALDataset * dataset = nullptr;
-+
-+ try
-+ {
-+ const char * cargs[] = {"TILED=YES","COMPRESS=LZW", 0};
-+ drvman = GetGDALDriverManager();
-+ driver = drvman->GetDriverByName("GTiff");
-+ dataset = driver->Create(tarFilename.toUtf8(), xsize, ysize, 1, GDT_Byte, (char**)cargs);
-+
-+ if(dataset == nullptr)
-+ {
-+ throw tr("Failed to create target file.");
-+ }
-+
-+ dataset->GetRasterBand(1)->SetColorTable(ct);
-+ dataset->GetRasterBand(1)->SetNoDataValue(ct->GetColorEntryCount());
-+ dataset->SetProjection(dsSrc->GetProjectionRef());
-+
-+ double adfGeoTransform[6] = {0};
-+ dsSrc->GetGeoTransform(adfGeoTransform);
-+ dataset->SetGeoTransform(adfGeoTransform);
-+
-+ printStdoutQString(tr("Dither source file to target file"));
-+ int res = GDALDitherRGB2PCT(dsSrc->GetRasterBand(1),
-+ dsSrc->GetRasterBand(2),
-+ dsSrc->GetRasterBand(3),
-+ dataset->GetRasterBand(1),
-+ ct,
-+ GDALTermProgress,
-+ 0
-+ );
-+ if(res != CE_None)
-+ {
-+ throw tr("Failed to dither file.");
-+ }
-+
-+ if(dsSrc->GetRasterCount() == 3)
-+ {
-+ return;
-+ }
-+
-+ GDALRasterBand * alpha = dsSrc->GetRasterBand(4);
-+ GDALRasterBand * band = dataset->GetRasterBand(1);
-+
-+ QByteArray buffer1(xsize, 0);
-+ QByteArray buffer2(xsize, 0);
-+
-+ quint8 nodata = band->GetNoDataValue();
-+ printStdoutQString(tr("Apply alpha channel as no data value to target file"));
-+ for(int y = 0; y < ysize; y++)
-+ {
-+ GDALTermProgress(double(xsize * y)/(xsize*ysize),0,0);
-+ res = alpha->RasterIO(GF_Read, 0, y, xsize, 1, buffer1.data(), xsize, 1, GDT_Byte, 0, 0);
-+ if(res != CE_None)
-+ {
-+ throw tr("Failed to read from alpha channel.");
-+ }
-+
-+ res = band->RasterIO(GF_Read, 0, y, xsize, 1, buffer2.data(), xsize, 1, GDT_Byte, 0, 0);
-+ if(res != CE_None)
-+ {
-+ throw tr("Failed to read from target file.");
-+ }
-+
-+ for(int x = 0; x < xsize; x++)
-+ {
-+ if(buffer1[x] != char(0xFF))
-+ {
-+ buffer2[x] = nodata;
-+ }
-+ }
-+
-+ res = band->RasterIO(GF_Write, 0, y, xsize, 1, buffer2.data(), xsize, 1, GDT_Byte, 0, 0);
-+ if(res != CE_None)
-+ {
-+ throw tr("Failed to write to target file.");
-+ }
-+ }
-+ GDALTermProgress(1.0,0,0);
-+ }
-+ catch(const QString& msg)
-+ {
-+ GDALClose(dataset);
-+ throw msg;
-+ }
-+
-+ dataset->FlushCache();
-+ GDALClose(dataset);
-+}
-diff --git a/src/qmt_rgb2pct/CApp.h b/src/qmt_rgb2pct/CApp.h
-new file mode 100644
-index 00000000..e2e0f7ca
---- /dev/null
-+++ b/src/qmt_rgb2pct/CApp.h
-@@ -0,0 +1,55 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef CAPP_H
-+#define CAPP_H
-+
-+#include <QtCore>
-+#include <gdal.h>
-+
-+class GDALColorTable;
-+class GDALDataset;
-+
-+class CApp
-+{
-+ Q_DECLARE_TR_FUNCTIONS(CApp)
-+public:
-+ CApp(qint32 ncolors, const QString& pctFilename, const QString& sctFilename, const QString& srcFilename, const QString& tarFilename);
-+ virtual ~CApp() = default;
-+
-+ qint32 exec();
-+
-+private:
-+ static GDALColorTable * createColorTable(qint32 ncolors, const QString& pctFilename, GDALDataset *dataset);
-+ static void saveColorTable(GDALColorTable *ct, QString &sctFilename);
-+ static void ditherMap(GDALDataset * dsSrc, const QString& tarFilename, GDALColorTable *ct);
-+
-+ qint32 ncolors = 0;
-+ QString pctFilename;
-+ QString sctFilename;
-+ QString srcFilename;
-+ QString tarFilename;
-+
-+ static const GDALColorEntry noColor;
-+};
-+
-+void printStdoutQString(const QString& str);
-+void printStderrQString(const QString& str);
-+
-+#endif //CAPP_H
-+
-diff --git a/src/qmt_rgb2pct/CMakeLists.txt b/src/qmt_rgb2pct/CMakeLists.txt
-new file mode 100644
-index 00000000..c763595e
---- /dev/null
-+++ b/src/qmt_rgb2pct/CMakeLists.txt
-@@ -0,0 +1,117 @@
-+# Prevent custom commands/targets outputs to be deleted by make clean
-+# We need this to prevent .ts files from being deleted with make clean, when
-+# UPDATE_TRANSLATIONS=ON
-+# WARNING: Only works with Makefile generator.
-+set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM TRUE)
-+# Find includes in corresponding build directories
-+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-+# Instruct CMake to run moc automatically when needed.
-+set(CMAKE_AUTOMOC ON)
-+
-+###############################################################################################
-+# Setup application name and version tags
-+###############################################################################################
-+
-+set(APPLICATION_NAME qmt_rgb2pct)
-+set(RGB2PCT_VERSION_MAJOR 1)
-+set(RGB2PCT_VERSION_MINOR 0)
-+set(RGB2PCT_VERSION_PATCH 0)
-+
-+add_definitions(
-+ -DVER_MAJOR=${RGB2PCT_VERSION_MAJOR}
-+ -DVER_MINOR=${RGB2PCT_VERSION_MINOR}
-+ -DVER_STEP=${RGB2PCT_VERSION_PATCH}
-+ -DVER_TWEAK=${VERSION_SUFFIX}
-+ -DAPPLICATION_NAME=${APPLICATION_NAME}
-+)
-+
-+###############################################################################################
-+# All source files needed to compile
-+###############################################################################################
-+set( SRCS
-+ main.cpp
-+ CApp.cpp
-+)
-+
-+set( HDRS
-+ version.h
-+ CApp.h
-+)
-+
-+set( UIS
-+)
-+
-+set( RCS
-+)
-+
-+###############################################################################################
-+# Some Qt magic
-+###############################################################################################
-+
-+qt5_wrap_ui(UI_HDRS ${UIS})
-+qt5_add_resources(RC_SRCS ${RCS})
-+
-+###############################################################################################
-+# Translation related stuff
-+###############################################################################################
-+translate_ts(${APPLICATION_NAME}_QM_FILES
-+ UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
-+ UPDATE_OPTIONS "-I${CMAKE_CURRENT_SOURCE_DIR}" ${KEEP_OLD_TRANSLATIONS}
-+ SOURCES ${SRCS} ${HDRS} ${UIS}
-+ TEMPLATE ${APPLICATION_NAME}
-+ TRANSLATION_DIR "locale"
-+)
-+
-+###############################################################################################
-+# Build source file and include paths lists
-+###############################################################################################
-+set(MAININP
-+ ${SRCS}
-+ ${HDRS}
-+ ${UI_HDRS}
-+ ${RC_SRCS}
-+ ${${APPLICATION_NAME}_QM_FILES}
-+ ${${APPLICATION_NAME}_DESKTOP_FILES}
-+)
-+
-+include_directories(
-+ SYSTEM # this prevents warnings from non-QMS headers
-+ ${CMAKE_BINARY_DIR}
-+ ${GDAL_INCLUDE_DIRS}
-+ ${PROJ4_INCLUDE_DIRS}
-+)
-+
-+if(APPLE)
-+ INCLUDE_DIRECTORIES(/System/Library/Frameworks/Foundation.framework)
-+ INCLUDE_DIRECTORIES(/System/Library/Frameworks/DiskArbitration.framework)
-+endif(APPLE)
-+
-+
-+###############################################################################################
-+# Build the executable and define necessary libraries.
-+###############################################################################################
-+add_executable(${APPLICATION_NAME} WIN32 ${MAININP})
-+
-+target_link_libraries(${APPLICATION_NAME}
-+ Qt5::Core
-+ ${GDAL_LIBRARIES}
-+ ${PROJ4_LIBRARIES}
-+)
-+
-+if(APPLE)
-+ target_link_libraries(${APPLICATION_NAME}
-+ ${Foundation_LIBRARY}
-+ ${DiskArbitration_LIBRARY}
-+ )
-+endif(APPLE)
-+
-+
-+###############################################################################################
-+# Install target related stuff
-+###############################################################################################
-+install(TARGETS ${APPLICATION_NAME} DESTINATION ${BIN_INSTALL_DIR})
-+
-+if (UNIX AND NOT WIN32 AND NOT APPLE)
-+ install(FILES ${${APPLICATION_NAME}_QM_FILES} DESTINATION ${DATA_INSTALL_PREFIX}/${APPLICATION_NAME}/translations)
-+ install(FILES ${${APPLICATION_NAME}_DESKTOP_FILES} DESTINATION ${XDG_APPS_DIR})
-+endif (UNIX AND NOT WIN32 AND NOT APPLE)
-diff --git a/src/qmt_rgb2pct/README.md b/src/qmt_rgb2pct/README.md
-new file mode 100644
-index 00000000..21e6c750
---- /dev/null
-+++ b/src/qmt_rgb2pct/README.md
-@@ -0,0 +1,5 @@
-+This is a sub-project of QMapShack and it's not supposed to compile on it's own. Please refere to
-+
-+https://bitbucket.org/maproom/qmapshack/overview
-+
-+to check out and compile this project.
-\ No newline at end of file
-diff --git a/src/qmt_rgb2pct/locale/qmt_rgb2pct.ts b/src/qmt_rgb2pct/locale/qmt_rgb2pct.ts
-new file mode 100644
-index 00000000..02904577
---- /dev/null
-+++ b/src/qmt_rgb2pct/locale/qmt_rgb2pct.ts
-@@ -0,0 +1,126 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!DOCTYPE TS>
-+<TS version="2.1">
-+<context>
-+ <name>CApp</name>
-+ <message>
-+ <location filename="../CApp.cpp" line="63"/>
-+ <source>Failed to open source file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="68"/>
-+ <source>Raster band count of source file must be either 3 or 4.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="101"/>
-+ <source>Calculate optimal color table from source file</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="115"/>
-+ <source>Failed to create color table.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="123"/>
-+ <source>Failed to open file with palette.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="131"/>
-+ <source>Palette file does not have a single band with a color table</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="140"/>
-+ <source>The color table must not contain a &quot;no data&quot; value and it&apos;s size must not exceed 255 colors.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="167"/>
-+ <source>Save color table to: %1</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="203"/>
-+ <source>Failed to create target file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="214"/>
-+ <source>Dither source file to target file</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="225"/>
-+ <source>Failed to dither file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="240"/>
-+ <source>Apply alpha channel as no data value to target file</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="247"/>
-+ <source>Failed to read from alpha channel.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="253"/>
-+ <source>Failed to read from target file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="267"/>
-+ <source>Failed to write to target file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+<context>
-+ <name>main</name>
-+ <message>
-+ <location filename="../main.cpp" line="96"/>
-+ <source>
-+Convert a map file with RGBA color coding to a color palette coding.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="99"/>
-+ <source>Source file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="100"/>
-+ <source>Target file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="104"/>
-+ <source>Number of colors. (default: 255)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="107"/>
-+ <source>Input palette file for color table (*.vrt)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="110"/>
-+ <source>Save color table to palette file (*.vrt)</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="120"/>
-+ <source>There must be a source and destination file.</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="143"/>
-+ <source>--ncolors must be an integer value less than 256</source>
-+ <translation type="unfinished"></translation>
-+ </message>
-+</context>
-+</TS>
-diff --git a/src/qmt_rgb2pct/locale/qmt_rgb2pct_de.ts b/src/qmt_rgb2pct/locale/qmt_rgb2pct_de.ts
-new file mode 100644
-index 00000000..9622b8d9
---- /dev/null
-+++ b/src/qmt_rgb2pct/locale/qmt_rgb2pct_de.ts
-@@ -0,0 +1,127 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!DOCTYPE TS>
-+<TS version="2.1" language="de_DE">
-+<context>
-+ <name>CApp</name>
-+ <message>
-+ <location filename="../CApp.cpp" line="63"/>
-+ <source>Failed to open source file.</source>
-+ <translation>Konnte Quelldatei nicht öffnen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="68"/>
-+ <source>Raster band count of source file must be either 3 or 4.</source>
-+ <translation>Die Anzahl der Rasterbänder muss entweder 3 oder 4 sein.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="101"/>
-+ <source>Calculate optimal color table from source file</source>
-+ <translation>Berechne die optimale Farbtabelle für die Quelldatei</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="115"/>
-+ <source>Failed to create color table.</source>
-+ <translation>Konnte die Farbtabelle nicht erstellen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="123"/>
-+ <source>Failed to open file with palette.</source>
-+ <translation>Konnte die Datei mit der Palette nicht öffnen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="131"/>
-+ <source>Palette file does not have a single band with a color table</source>
-+ <translation>Die Datei mit der Palette hat kein einzelnes Band mit einer Farbtabelle</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="140"/>
-+ <source>The color table must not contain a &quot;no data&quot; value and it&apos;s size must not exceed 255 colors.</source>
-+ <translation>Die Farbtabelle darf keinen Eintrag für &quot;no data&quot; haben und ihre Größe darf nicht 255 Farben überschreiten.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="167"/>
-+ <source>Save color table to: %1</source>
-+ <translation>Speichere Farbtabelle in: %1</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="203"/>
-+ <source>Failed to create target file.</source>
-+ <translation>Konnte Zieldatei nicht erstellen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="214"/>
-+ <source>Dither source file to target file</source>
-+ <translation>Wandle Quelldatei in Zieldatei um</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="225"/>
-+ <source>Failed to dither file.</source>
-+ <translation>Konnte die Datei nicht umwandeln.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="240"/>
-+ <source>Apply alpha channel as no data value to target file</source>
-+ <translation>Wandle für die Zieldatei den Alphakanal in &quot;no data&quot; Werte um </translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="247"/>
-+ <source>Failed to read from alpha channel.</source>
-+ <translation>Konnte den Alphakanal nicht lesen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="253"/>
-+ <source>Failed to read from target file.</source>
-+ <translation>Konnte die Zieldatei nicht lesen.</translation>
-+ </message>
-+ <message>
-+ <location filename="../CApp.cpp" line="267"/>
-+ <source>Failed to write to target file.</source>
-+ <translation>Konnte die Zieldatei nicht schreiben.</translation>
-+ </message>
-+</context>
-+<context>
-+ <name>main</name>
-+ <message>
-+ <location filename="../main.cpp" line="96"/>
-+ <source>
-+Convert a map file with RGBA color coding to a color palette coding.</source>
-+ <translation>
-+Konvertiert eine Kartendatei mit RGBA Farbschema in eine Kartendatei mit Farbtabelle.</translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="99"/>
-+ <source>Source file.</source>
-+ <translation>Quelldatei.</translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="100"/>
-+ <source>Target file.</source>
-+ <translation>Zieldatei.</translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="104"/>
-+ <source>Number of colors. (default: 255)</source>
-+ <translation>Anzahl an Farben (Vorgabe: 255)</translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="107"/>
-+ <source>Input palette file for color table (*.vrt)</source>
-+ <translation>Datei mit Palette als Vorgabe für die Farbtabelle (*.vrt) </translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="110"/>
-+ <source>Save color table to palette file (*.vrt)</source>
-+ <translation>Farbtabelle in Datei mit Palette sichern (*.vrt)</translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="120"/>
-+ <source>There must be a source and destination file.</source>
-+ <translation>Es muss eine Quell- und eine Zieldatei angegeben werden.</translation>
-+ </message>
-+ <message>
-+ <location filename="../main.cpp" line="143"/>
-+ <source>--ncolors must be an integer value less than 256</source>
-+ <translation>--ncolors muss eine ganze Zahl kleiner 256 sein</translation>
-+ </message>
-+</context>
-+</TS>
-diff --git a/src/qmt_rgb2pct/main.cpp b/src/qmt_rgb2pct/main.cpp
-new file mode 100644
-index 00000000..4ff9a9ae
---- /dev/null
-+++ b/src/qmt_rgb2pct/main.cpp
-@@ -0,0 +1,155 @@
-+/**********************************************************************************************
-+ Copyright (C) 2018 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#include "CApp.h"
-+#include "version.h"
-+#include <QtCore>
-+
-+#ifdef Q_OS_MACOS
-+static QDir getApplicationDir(QString subdir)
-+{
-+ QDir appDir(QCoreApplication::applicationDirPath());
-+ appDir.cdUp();
-+ appDir.cd(subdir);
-+ return appDir;
-+}
-+#endif
-+static void prepareTranslator(QString translationPath, QString translationPrefix)
-+{
-+ QString locale = QLocale::system().name();
-+ QDir dir(translationPath);
-+ if(!QFile::exists(dir.absoluteFilePath(translationPrefix + locale)))
-+ {
-+ locale = locale.left(2);
-+ }
-+
-+ QCoreApplication* app = (QCoreApplication*) QCoreApplication::instance();
-+ QTranslator *qtTranslator = new QTranslator(app);
-+
-+ if (qtTranslator->load(translationPrefix + locale, translationPath))
-+ {
-+ app->installTranslator(qtTranslator);
-+ }
-+}
-+
-+static void loadTranslations()
-+{
-+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(Q_OS_CYGWIN)
-+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-+ QString translationPath = QCoreApplication::applicationDirPath();
-+ translationPath.replace(QRegExp("bin$"), "share/" APP_STR "/translations");
-+ prepareTranslator(resourceDir, "qt_");
-+ prepareTranslator(translationPath, APP_STR "_");
-+#endif
-+
-+#ifdef Q_OS_OSX
-+ // os x
-+ static QString relTranslationDir = "Resources/translations"; // app
-+ QString translationPath = getApplicationDir(relTranslationDir).absolutePath();
-+ prepareTranslator(translationPath, "qt_");
-+ prepareTranslator(translationPath, APP_STR "_");
-+#endif
-+
-+#ifdef Q_OS_WIN
-+ QString apppath = QCoreApplication::applicationDirPath();
-+ apppath = apppath.replace("/", "\\");
-+ QString appResourceDir = QString("%1\\translations").arg(apppath).toUtf8();
-+ prepareTranslator(appResourceDir, "qtbase_");
-+ prepareTranslator(appResourceDir, APP_STR "_");
-+#endif
-+
-+}
-+
-+int main(int argc, char ** argv)
-+{
-+ QCoreApplication app(argc, argv);
-+ QCoreApplication::setApplicationName(APP_STR);
-+ QCoreApplication::setApplicationVersion(VER_STR);
-+ if(QString(VER_SUFFIX).isEmpty())
-+ {
-+ QCoreApplication::setApplicationVersion(VER_STR);
-+ }
-+ else
-+ {
-+ QCoreApplication::setApplicationVersion(VER_STR "." VER_SUFFIX);
-+ }
-+
-+
-+ loadTranslations();
-+
-+ QCommandLineParser parser;
-+ parser.setApplicationDescription(QCoreApplication::translate("main", "\nConvert a map file with RGBA color coding to a color palette coding."));
-+ parser.addHelpOption();
-+ parser.addVersionOption();
-+ parser.addPositionalArgument("source", QCoreApplication::translate("main", "Source file."));
-+ parser.addPositionalArgument("target", QCoreApplication::translate("main", "Target file."));
-+
-+ parser.addOptions({
-+ {
-+ {"n","ncolors"}, QCoreApplication::translate("main", "Number of colors. (default: 255)"), "number", "255"
-+ },
-+ {
-+ {"p","pct"}, QCoreApplication::translate("main", "Input palette file for color table (*.vrt)"), "filename", ""
-+ },
-+ {
-+ {"s","sct"}, QCoreApplication::translate("main", "Save color table to palette file (*.vrt)"), "filename", ""
-+ },
-+ });
-+
-+ // Process the actual command line arguments given by the user
-+ parser.process(app);
-+
-+ if(parser.positionalArguments().count() == 1 && parser.value("sct").isEmpty())
-+ {
-+ printStderrQString("");
-+ printStderrQString(QCoreApplication::translate("main","There must be a source and destination file."));
-+ printStderrQString("");
-+ parser.showHelp(-1);
-+ }
-+
-+ if(parser.positionalArguments().isEmpty())
-+ {
-+ parser.showHelp(-1);
-+ }
-+
-+ QString srcFilename = parser.positionalArguments()[0];
-+ QString tarFilename;
-+ if(parser.positionalArguments().count() > 1)
-+ {
-+ tarFilename = parser.positionalArguments()[1];
-+ }
-+
-+
-+ bool ok = false;
-+ const qint32 ncolors = parser.value("ncolors").toInt(&ok);
-+ if(!ok || ncolors > 255)
-+ {
-+ printStderrQString("");
-+ printStderrQString(QCoreApplication::translate("main","--ncolors must be an integer value less than 256"));
-+ printStderrQString("");
-+ parser.showHelp(-1);
-+ }
-+
-+ QString pctFilename = parser.value("pct");
-+ QString sctFilename = parser.value("sct");
-+
-+ CApp theApp(ncolors, pctFilename, sctFilename, srcFilename, tarFilename);
-+ return theApp.exec();
-+}
-+
-+
-diff --git a/src/qmt_rgb2pct/version.h b/src/qmt_rgb2pct/version.h
-new file mode 100644
-index 00000000..60f94f71
---- /dev/null
-+++ b/src/qmt_rgb2pct/version.h
-@@ -0,0 +1,33 @@
-+/**********************************************************************************************
-+ Copyright (C) 2017 Oliver Eichler oliver.eichler@gmx.de
-+
-+ This program is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or
-+ (at your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ GNU General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+**********************************************************************************************/
-+
-+#ifndef VERSION_H
-+#define VERSION_H
-+
-+#ifndef _MKSTR_1
-+#define _MKSTR_1(x) #x
-+#define _MKSTR(x) _MKSTR_1(x)
-+#endif
-+
-+#define VER_STR _MKSTR(VER_MAJOR) "." _MKSTR (VER_MINOR) "." _MKSTR (VER_STEP)
-+#define VER_SUFFIX _MKSTR(VER_TWEAK)
-+#define APP_STR _MKSTR(APPLICATION_NAME)
-+#define WHAT_STR _MKSTR(APPLICATION_NAME) ", Version " VER_STR
-+
-+#endif //VERSION_H
-+
diff --git a/gis/qmapshack/splash.png b/gis/qmapshack/splash.png
deleted file mode 100644
index 8a58d5d28e..0000000000
--- a/gis/qmapshack/splash.png
+++ /dev/null
Binary files differ
diff --git a/gis/rasterio/README b/gis/rasterio/README
index 87e9c97595..b9559ff4d1 100644
--- a/gis/rasterio/README
+++ b/gis/rasterio/README
@@ -1,9 +1,11 @@
-Fast and direct geospatial raster I/O for Python programmers who use Numpy.
+Fast and direct geospatial raster I/O for Python programmers who use
+Numpy.
-This package is aimed at developers who want little more than to read raster
-images into Numpy arrays or buffers, operate on them in Python (or Cython), and
-write the results out to new GeoTIFF files.
+This package is aimed at developers who want little more than to read
+raster images into Numpy arrays or buffers, operate on them in Python
+(or Cython), and write the results out to new GeoTIFF files.
-Rasterio employs GDAL under the hood for file I/O and raster formatting.
+Rasterio employs GDAL under the hood for file I/O and raster
+formatting.
Optional dependencies: boto3.
diff --git a/gis/rasterio/rasterio.SlackBuild b/gis/rasterio/rasterio.SlackBuild
index f4e7b1e963..1e607ae709 100644
--- a/gis/rasterio/rasterio.SlackBuild
+++ b/gis/rasterio/rasterio.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for rasterio
-# Copyright 2013-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,10 +24,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=rasterio
-VERSION=${VERSION:-1.0.28}
+VERSION=${VERSION:-1.2.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -71,10 +81,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
-fi
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -89,4 +96,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/rasterio/rasterio.info b/gis/rasterio/rasterio.info
index db325fa81e..5d25597e44 100644
--- a/gis/rasterio/rasterio.info
+++ b/gis/rasterio/rasterio.info
@@ -1,10 +1,10 @@
PRGNAM="rasterio"
-VERSION="1.0.28"
+VERSION="1.2.6"
HOMEPAGE="https://github.com/mapbox/rasterio"
-DOWNLOAD="https://github.com/mapbox/rasterio/archive/1.0.28/rasterio-1.0.28.tar.gz"
-MD5SUM="d1edffd303e09b9a05f7a9a6325fb778"
+DOWNLOAD="https://github.com/mapbox/rasterio/archive/1.2.6/rasterio-1.2.6.tar.gz"
+MD5SUM="6c8eac345f3268d9edde10820c8cfcef"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="affine attrs click-plugins cligj enum34 gdal numpy snuggs"
+REQUIRES="affine click-plugins cligj gdal snuggs python3-attrs"
MAINTAINER="Benjamin Trigona-Harany"
EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/readosm/readosm.SlackBuild b/gis/readosm/readosm.SlackBuild
index c468a767ba..f455417a54 100644
--- a/gis/readosm/readosm.SlackBuild
+++ b/gis/readosm/readosm.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ReadOSM
# Copyright 2012-2015 Alexander Bruy <alexander.bruy@gmail.com>
@@ -21,26 +21,36 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=readosm
VERSION=${VERSION:-1.0.0d}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -89,8 +99,10 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/lib*/*.la
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/routino/README b/gis/routino/README
index 71eea0b991..7a5bd9378e 100644
--- a/gis/routino/README
+++ b/gis/routino/README
@@ -1,4 +1,5 @@
-Routino is an application for finding a route between two points using the
-dataset of topographical information collected by http://www.OpenStreetMap.org
+Routino is an application for finding a route between two points
+using the dataset of topographical information collected by
+http://www.OpenStreetMap.org
NOTE: only the x86_64 architecture is supported.
diff --git a/gis/routino/routino.SlackBuild b/gis/routino/routino.SlackBuild
index 50519ef0fc..6219aaa6c3 100644
--- a/gis/routino/routino.SlackBuild
+++ b/gis/routino/routino.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for routino
@@ -24,10 +24,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=routino
VERSION=${VERSION:-3.1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -86,4 +96,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/saga-gis/README b/gis/saga-gis/README
index 9fba69678b..f5bf96ff4e 100644
--- a/gis/saga-gis/README
+++ b/gis/saga-gis/README
@@ -1,16 +1,29 @@
-System for Automated Geoscientific Analyses (SAGA) is a Geographic Information
-System software with immense capabilities for geodata processing and analysis.
+System for Automated Geoscientific Analyses (SAGA) is a Geographic
+Information System software with immense capabilities for geodata
+processing and analysis.
-SAGA supports the implementation of new functions with an effective API.
-Functions are organised as modules in framework independent Module Libraries
-and can be accessed via SAGA's Graphical User Interface or various scripting
-environments (shell scripts, Python, R and so on).
+SAGA supports the implementation of new functions with an effective
+API. Functions are organised as modules in framework independent
+Module Libraries and can be accessed via SAGA's Graphical User
+Interface or various scripting environments (shell scripts, Python,
+R and so on).
-SAGA can use these optional dependencies: libharu, postgresql and qhull. SAGA
-currently does not build when vigra is installed.
+SAGA can use these optional autodetected dependencies enabled if they
+are found in the system:
+libharu, OpenMP, OpenCV, qhull, vigra, pdal, postgresql/postgis,
+libLAS, proj, hdf5. Previous issues given with OpenCV version 4 or
+greater and vigra seem solved in last versions of SAGA.
-To enable opencv, set OPENCV=ON. By default OpenCV is disabled since SAGA does
-not build when OpenCV version 4 or greater is installed.
-
-If SAGA fails to run after an upgrade, uninstall old versions of SAGA before
-compilation.
+WARNINGS:
+1) Unlike earlier versions of SAGA, the build of last versions
+ requires wxGTK3 => 3.1 that is not available in Slackbuilds.org at
+ the moment. If you want to build this version of SAGA you have to
+ install the package wxWidgets (also available in Slackbuilds.org).
+ If you have both wxGTK3 and wxWidgets installed in your system,
+ make sure that wxWidgets is installed after wxGTK.
+2) SAGA requires an ODBC driver in the system. It works both with
+ iODBC (installed with the libiodbc package (included in Slackware
+ 15.0) and unixODBC (installed from the SBo's slackbuild). The build
+ first searches for unixODBC then for iODBC.
+3) unixODBC is a required dependency in 32 bit systems since the
+ libiodbc headers cause a build failure during the compilation.
diff --git a/gis/saga-gis/doinst.sh b/gis/saga-gis/doinst.sh
new file mode 100644
index 0000000000..aea0f894eb
--- /dev/null
+++ b/gis/saga-gis/doinst.sh
@@ -0,0 +1,13 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/gis/saga-gis/saga-gis.SlackBuild b/gis/saga-gis/saga-gis.SlackBuild
index bc0f5f2a40..62a6841dd0 100644
--- a/gis/saga-gis/saga-gis.SlackBuild
+++ b/gis/saga-gis/saga-gis.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for saga-gis
-# Copyright 2014-2019 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2014-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +23,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=saga
-PKGNAM=${PRGNAM}-gis
-VERSION=${VERSION:-7.3.0}
-BUILD=${BUILD:-2}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=saga-gis
+VERSION=${VERSION:-9.4.0}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=saga
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +41,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -44,26 +53,64 @@ OUTPUT=${OUTPUT:-/tmp}
# issues with -O2 causing build failures
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS=""
- LIBDIRSUFFIX=""
fi
set -e
+# unixODBC is needed in 32 bit systems instead of libiodbc released
+# with Slackware 15.0. The slackbuild stops if unixODBC is not installed
+if [[ "$ARCH" = "i586" || "$ARCH" = "i686" ]] ; then
+ if ! [ -f /usr/lib/libodbc.so ] ; then
+ echo "";
+ echo "";
+ echo "";
+ echo "******************** WARNING *********************";
+ echo " This script cannot be executed in 32 bit systems ";
+ echo " with iODBC as default ODBC library installed. ";
+ echo " The current process will be stopped. ";
+ echo " Please install the unixODBC package from the ";
+ echo " slackbuild available in the SBo repository. ";
+ echo "**************************************************";
+ exit 1;
+ fi
+fi
+
+# if both unixODBCand and libiodbc are installed, SAGA set the
+# first as default driver ODBC. This flag should prevent possible
+# compilation failures since cmake does not find the correct
+# path of unixODBC headers
+ODBC=""
+if pkg-config --exists odbc; then
+ ODBC="-DODBC_INCLUDE_DIR=/usr/include/unixodbc "
+fi
+
+# Look if the system has PDAL installed
+if pkg-config --exists pdal; then
+ WITHPDAL=""
+else
+ WITHPDAL="-DWITH_TOOLS_PDAL=OFF "
+fi
+
+if [ -d /usr/share/cmake-3.29 ]; then
+ # This prevents some cmake warnings in current
+ CMAKE_POLICY="-DCMAKE_POLICY_DEFAULT_CMP0153=OLD "
+else
+ CMAKE_POLICY=""
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION/saga-gis
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -71,41 +118,41 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-if [ "$OPENCV" != "ON" ] ; then
- sed -i "s/CVFOUND=1/true/g" configure
-fi
-
-sed -i "s/isinf/std::isinf/g" src/saga_core/saga_gui/wksp_map_layer.cpp
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-PYTHON=python3 \
-./configure \
- --build=$ARCH \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --enable-python \
- --disable-odbc \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ $ODBC \
+ $WITHPDAL \
+ $CMAKE_POLICY \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install/strip DESTDIR=$PKG
+cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# DCMAKE_INSTALL_MANDIR is not applied by the process we move files manually from /usr/share
+mv $PKG/usr/share/man $PKG/usr/
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog NEWS README \
- $PKG/usr/doc/$PKGNAM-$VERSION
-cat $CWD/$PKGNAM.SlackBuild > $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.SlackBuild
+mv $PKG/usr/share/metainfo $PKG/usr/share/appdata
+
+# fix some bad perms in doc files that have to install
+chmod 644 readme.md src/*.txt
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a readme.md src/gpl.txt src/lgpl.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/saga-gis/saga-gis.info b/gis/saga-gis/saga-gis.info
index c8eecee857..7336a02902 100644
--- a/gis/saga-gis/saga-gis.info
+++ b/gis/saga-gis/saga-gis.info
@@ -1,10 +1,10 @@
PRGNAM="saga-gis"
-VERSION="7.3.0"
+VERSION="9.4.0"
HOMEPAGE="http://www.saga-gis.org"
-DOWNLOAD="https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/SAGA%20-%207.3.0/saga-7.3.0.tar.gz"
-MD5SUM="2383eb43f12da743c5ac52ecc8dfd302"
+DOWNLOAD="https://sourceforge.net/projects/saga-gis/files/SAGA%20-%209/SAGA%20-%209.4.0/saga-9.4.0.tar.gz"
+MD5SUM="51c55b07450e343ac08cc9a1bd26014d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gdal python3 wxGTK3"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+REQUIRES="wxWidgets"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/spatialite-tools/0001-fix-autotools.patch.gz b/gis/spatialite-tools/0001-fix-autotools.patch.gz
new file mode 100644
index 0000000000..68d1284410
--- /dev/null
+++ b/gis/spatialite-tools/0001-fix-autotools.patch.gz
Binary files differ
diff --git a/gis/spatialite-tools/README b/gis/spatialite-tools/README
index c64fbee3da..088cb7e79b 100644
--- a/gis/spatialite-tools/README
+++ b/gis/spatialite-tools/README
@@ -8,10 +8,10 @@ spatialite-tools is a collection of open source Command Line Interface
* exif_loader: an import tool for EXIF or EXIF-GPS (JPEG) pictures
* spatialite_osm_raw: a tool importing OSM files (raw format tables,
strictly corresponding to XML input)
- * spatialite_osm_filter: a tool allowing to re-export spatially selected
- OSM files form a raw-format DB
+ * spatialite_osm_filter: a tool allowing to re-export spatially
+ selected OSM files form a raw-format DB
* spatialite_osm_map: a tool importing map layers from an OSM file
* spatialite_osm_net: a tool creating a road network from an OSM file
- * spatialite_network: a tool creating a VirtualNetwork (supporting shortest
- path / routing SQL queries)
+ * spatialite_network: a tool creating a VirtualNetwork (supporting
+ shortest path / routing SQL queries)
* spatialite_gml: a tool importing GML files
diff --git a/gis/spatialite-tools/spatialite-tools.SlackBuild b/gis/spatialite-tools/spatialite-tools.SlackBuild
index 6bc47164fe..461c1aba75 100644
--- a/gis/spatialite-tools/spatialite-tools.SlackBuild
+++ b/gis/spatialite-tools/spatialite-tools.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for spatialite-tools
# Copyright 2012-2015 Alexander Bruy <alexander.bruy@gmail.com>
@@ -21,26 +21,36 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=spatialite-tools
-VERSION=${VERSION:-4.2.0}
+VERSION=${VERSION:-4.3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -61,6 +71,7 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
+zcat $CWD/0001-fix-autotools.patch.gz | patch -p1
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -68,6 +79,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+autoreconf -vif
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-ldl" \
@@ -93,4 +106,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/spatialite-tools/spatialite-tools.info b/gis/spatialite-tools/spatialite-tools.info
index df2eceed66..2aa5373e0f 100644
--- a/gis/spatialite-tools/spatialite-tools.info
+++ b/gis/spatialite-tools/spatialite-tools.info
@@ -1,8 +1,8 @@
PRGNAM="spatialite-tools"
-VERSION="4.2.0"
+VERSION="4.3.0"
HOMEPAGE="https://www.gaia-gis.it/fossil/spatialite-tools/index"
-DOWNLOAD="http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.2.0.tar.gz"
-MD5SUM="e00aeccec0cc8bf1e6fc725b1eabd2d2"
+DOWNLOAD="http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz"
+MD5SUM="83cb7b1f6c6b20fe5475586f1fb77088"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libspatialite readosm"
diff --git a/gis/spatialite_gui/README b/gis/spatialite_gui/README
deleted file mode 100644
index 811e6c53a1..0000000000
--- a/gis/spatialite_gui/README
+++ /dev/null
@@ -1,2 +0,0 @@
-spatialite-gui is an open source Graphical User Interface (GUI) tool supporting
-SpatiaLite.
diff --git a/gis/spatialite_gui/spatialite_gui.info b/gis/spatialite_gui/spatialite_gui.info
deleted file mode 100644
index 02b1dff5a2..0000000000
--- a/gis/spatialite_gui/spatialite_gui.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="spatialite_gui"
-VERSION="1.7.1"
-HOMEPAGE="https://www.gaia-gis.it/fossil/spatialite_gui/index"
-DOWNLOAD="http://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/spatialite_gui-1.7.1.tar.gz"
-MD5SUM="c917f40810607784528b4db58cd36efb"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="libspatialite freexl libgaiagraphics wxPython"
-MAINTAINER="Alexander Bruy"
-EMAIL="alexander.bruy@gmail.com"
diff --git a/gis/survex/README b/gis/survex/README
new file mode 100644
index 0000000000..f1a3ea5a5f
--- /dev/null
+++ b/gis/survex/README
@@ -0,0 +1,11 @@
+Survex is a Free and Open Source software package to assist surveying
+and mapping cave systems.
+
+By default this slackbuild installs a sample dataset into the
+installation directory tree. If you do not need this passe to the
+script the environment variable SAMPLE=no as following:
+
+SAMPLE=no ./survex.SlackBuild
+
+Note: the Graphical Interface User is launched by the command aven or
+the Desktop entry "Aven Cave Surveying Tool".
diff --git a/gis/survex/doinst.sh b/gis/survex/doinst.sh
new file mode 100644
index 0000000000..aea0f894eb
--- /dev/null
+++ b/gis/survex/doinst.sh
@@ -0,0 +1,13 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/gis/pyproj/slack-desc b/gis/survex/slack-desc
index b7fe3654f8..712f6021ec 100644
--- a/gis/pyproj/slack-desc
+++ b/gis/survex/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-pyproj: pyproj (Python interface to the PROJ.4 library)
-pyproj:
-pyproj: pyproj can convert from geographic (longitude,latitude) to native
-pyproj: map projection (x,y) coordinates and vice versa, or from one map
-pyproj: projection coordinate system directly to another.
-pyproj:
-pyproj: Homepage: http://code.google.com/p/pyproj/
-pyproj:
-pyproj:
-pyproj:
-pyproj:
+survex: survex (software package for mapping caves)
+survex:
+survex: Survex is a Free and Open Source software package to assist
+survex: surveying and mapping cave systems.
+survex:
+survex:
+survex:
+survex:
+survex: Home page: https://survex.com
+survex:
+survex:
diff --git a/gis/CreateCloudMap/CreateCloudMap.SlackBuild b/gis/survex/survex.SlackBuild
index a9c7a9ac2f..942934e8a2 100644
--- a/gis/CreateCloudMap/CreateCloudMap.SlackBuild
+++ b/gis/survex/survex.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
-# Slackware build script for CreateCloudMap
+# Slackware build script for surved
-# Copyright 2014-2019 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2022-2024 Giancarlo Dessì, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=CreateCloudMap
-VERSION=${VERSION:-0.9.13}
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=survex
+VERSION=${VERSION:-1.4.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -62,6 +69,9 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
+if [ "${SAMPLE:-yes}" = "yes" ]; then
+ tar xvf $CWD/sample.tar.gz
+fi
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,13 +79,42 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python setup.py install --root=$PKG
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE PKG-INFO README.rst $PKG/usr/doc/$PRGNAM-$VERSION
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+find $PKG -name perllocal.pod \
+ -o -name ".packlist" \
+ -o -name "*.bs" \
+ | xargs rm -f
+
+if [ "${SAMPLE:-yes}" = "yes" ]; then
+ mkdir $PKG/usr/share/survex/sample
+ cp -a loser/* $PKG/usr/share/survex/sample
+fi
+
+mkdir -p $PKG/usr/doc
+cp -a $PKG/usr/share/doc/survex $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/doc
+cp -a AUTHORS COPYING ChangeLog NEWS OLDNEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -83,4 +122,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/survex/survex.info b/gis/survex/survex.info
new file mode 100644
index 0000000000..190dd5c38f
--- /dev/null
+++ b/gis/survex/survex.info
@@ -0,0 +1,12 @@
+PRGNAM="survex"
+VERSION="1.4.7"
+HOMEPAGE="https://survex.com"
+DOWNLOAD="https://survex.com/software/1.4.7/survex-1.4.7.tar.gz \
+ https://survex.com/software/sample.tar.gz"
+MD5SUM="fb4b5ba8b0c571ab4ab4d9e634f0f954 \
+ 75f0d39e52fefb886b39ea664ef76c80"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="proj wxGTK3"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/tangogps/README b/gis/tangogps/README
index a2feaaad64..b44fdedcf8 100644
--- a/gis/tangogps/README
+++ b/gis/tangogps/README
@@ -1,10 +1,10 @@
-tangogps is an easy to use, fast, and lightweight mapping application
-for use with or without GPS. By default, tangoGPS uses map data from
-the Openstreetmap project. Additionally, a variety of other repositories
-can be easily added. The maps are downloaded and cached for offline use
-while you drag or zoom the map. Furthermore, you can conveniently pre-cache
-areas with tangoGPS.
+tangogps is an easy to use, fast, and lightweight mapping application
+for use with or without GPS. By default, tangoGPS uses map data
+from the Openstreetmap project. Additionally, a variety of other
+repositories can be easily added. The maps are downloaded and cached
+for offline use while you drag or zoom the map. Furthermore, you can
+conveniently pre-cache areas with tangoGPS.
-If connected to a GPS, your current position and track are shown on the map,
-and you can log positional data for further processing, e.g. for geocoding
-photos or uploading streets to Openstreetmap.
+If connected to a GPS, your current position and track are shown
+on the map, and you can log positional data for further processing,
+e.g. for geocoding photos or uploading streets to Openstreetmap.
diff --git a/gis/tangogps/tangogps.SlackBuild b/gis/tangogps/tangogps.SlackBuild
index d310c96556..c63df60df3 100644
--- a/gis/tangogps/tangogps.SlackBuild
+++ b/gis/tangogps/tangogps.SlackBuild
@@ -1,12 +1,15 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for tangogps
# Written by <pedro@gepasi.org>
# This script is hereby put in the public domain
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=tangogps
VERSION=${VERSION:-0.99.4}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -16,7 +19,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -57,7 +67,7 @@ sed -i "s|^#include\ <glib/.*||" src/map_management.c
sed -i "s|^#include\ <curl/types\.h>||" \
src/tile_management.c src/util.h src/friends.c
-LDFLAGS="-lm" \
+LDFLAGS="-Wl,--allow-multiple-definition,-lm" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -76,4 +86,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/therion/README b/gis/therion/README
new file mode 100644
index 0000000000..c7be4893b4
--- /dev/null
+++ b/gis/therion/README
@@ -0,0 +1,68 @@
+Therion is a complete platform which processes survey data and
+generates maps or 3D models of caves. This suite may be useful for
+professional or amateur cavers and researchers in geology or
+speleology fields.
+
+The package includes the following components:
+- therion: the basic executable program that works as a command-line
+ compiler and processes input files, which are - including 2D maps -
+ in text format, to create files with 2D maps or 3D model. 2D maps
+ can be generated in PDF or SVG formats or other formats handled by
+ GIS platforms (DXF, ESRI, KML) or Aven (Survex format). 3D models
+ can be generated in the native format (handled by the component
+ Loch) or other formats (Compass, 3DMF, VRML, Survex, ecc.) handled
+ by appropriate viewers.
+- xtherion: the executable program that launches the GUI (Graphical
+ User Interface). Xtherion works as text editor, map editor, and
+ compiler (instead of therion). This component is not essential:
+ output files can be generated by therion preparing the input files
+ with external programs as text or maps editors.
+- Loch: a 3D model viewer that supports high-resolution rendering to
+ file and stereo view using 3D-glasses. This component is not
+ essential: output 3D models can be displayed with other external
+ viewers.
+- thbook.pdf: the Therion Book, it contains the documentation to use
+ Therion, generated with pdfTEX during the build process. It will be
+ installed in /usr/doc/therion-[VERSION]. This component is not
+ essential: a copy of the book (in basic size format) is also
+ available in the project homepage.
+
+The build of the optional components is enabled by default. You can
+exclude one or more of them by passing to the script the respective
+environment variables:
+
+- LOCH=no This disables the build of the native 3D viewer Loch. In
+ this case wxWidgets and VTK are not required.
+- GUI=no This disables the build of Xtherion.
+- BOOK=no This disables the build of thbook.pdf.
+
+WARNINGS
+
+Note that the platform works only with some standards, interpreters or
+programs (like METAPOST, TEX, tcl/tk, ImageMagick, ecc.) that are
+available in a full installation of Slackware, and some extensions of
+these (like LCDF Typetools, Bwidget, and tkImg) that are available in
+Slackbuilds.org. Without these dependencies Therion fails during the
+package build (almost) or in runtime for some features (e.g. tkImg,
+that is not detected by the build process).
+
+Since version 6.1.7, Therion no longer includes an internal {fmt}
+library, so this library is a required dependency. In Slackware 15.0,
+this library must be installed by the slackbuild available in
+Slackbuilds.org whereas in Slackware current it must be installed
+from the package released with the official current.
+
+Since version 6.1.8, the build of LOCH fails if wxGTK3 is installed
+instead of wxWidgets 3.2.2.1, so wxWidgets is strictly required. If
+both wxGTK3 and wxWidgets are installed, the build process will use
+wxWidgets, so these libraries can coexist. Other libraries based on
+wxWidgets (like wxPython3 or wxPython4 for example) are not tested.
+
+After the installation, a full and extended integrated behavior,
+optimized with the custom configuration, requires to set or uncomment
+appropriate values in the initialization files in /etc/therion.
+
+Sample data can be downloaded from the project homepage. They can be
+used to practice about Therion.
+
+See the thbook.pdf for more information.
diff --git a/gis/therion/doinst.sh b/gis/therion/doinst.sh
new file mode 100644
index 0000000000..00ecebd85c
--- /dev/null
+++ b/gis/therion/doinst.sh
@@ -0,0 +1,29 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/therion/therion.ini.new
+config etc/therion/xtherion.ini.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/gis/cartopy/slack-desc b/gis/therion/slack-desc
index c119c95060..59129ed4b3 100644
--- a/gis/cartopy/slack-desc
+++ b/gis/therion/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-cartopy: cartopy (cartographic tools for Python)
-cartopy:
-cartopy: Cartopy is a Python package designed to make drawing maps for data
-cartopy: analysis and visualisation as easy as possible.
-cartopy:
-cartopy:
-cartopy:
-cartopy:
-cartopy:
-cartopy:
-cartopy:
+therion: therion (Cave surveying software)
+therion:
+therion: Therion is a complete package which processes survey data and
+therion: generates maps or 3D models of caves.
+therion:
+therion:
+therion:
+therion:
+therion: https://therion.speleo.sk/
+therion:
+therion:
diff --git a/gis/therion/therion.SlackBuild b/gis/therion/therion.SlackBuild
new file mode 100644
index 0000000000..f5290f8530
--- /dev/null
+++ b/gis/therion/therion.SlackBuild
@@ -0,0 +1,163 @@
+#!/bin/bash
+
+# Slackware build script for therion
+
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=therion
+VERSION=${VERSION:-6.2.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+# Features enabled by default
+BUILDLOCH="" ; [ "${LOCH:-yes}" = "no" ] && BUILDLOCH=" -DBUILD_LOCH=OFF"
+BUILDBOOK=" -DTHBOOK_FORMAT=3" ; [ "${BOOK:-yes}" = "no" ] && BUILDBOOK=" -DBUILD_THBOOK=OFF"
+BUILDX=""; [ "${GUI:-yes}" = "no" ] && BUILDX=" -DBUILD_XTHERION=OFF"
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+mkdir -p build
+cd build
+ cmake -Wno-dev \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc/therion \
+ $BUILDLOCH \
+ $BUILDBOOK \
+ $BUILDX \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make -j 10
+ make install/strip DESTDIR=$PKG
+cd ..
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES COPYING README CONTRIBUTING.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# make installs documentation generated by the build into two directories in /usr/share/doc
+# we move this documentation in /usr/doc/therion-x.y.z
+if [ "$BOOK" != "no" ] ; then
+ mv $PKG/usr/share/doc/$PRGNAM/thbook.pdf $PKG/usr/doc/$PRGNAM-$VERSION
+ rm -rf $PKG/usr/share/doc/$PRGNAM
+ if [ "$LOCH" == "no" ] ; then
+ rm -rf $PKG/usr/share
+ fi
+fi
+if [ "$LOCH" != "no" ] ; then
+ mv $PKG/usr/share/doc/therion-viewer $PKG/usr/doc/$PRGNAM-$VERSION
+ rm -rf $PKG/usr/share/doc
+fi
+
+#Make and install a copy of the application icon in PNG format
+mkdir -p $PKG/usr/share/icons/hicolor/32x32/apps
+magick $TMP/$PRGNAM-$VERSION/therion.ico $PKG/usr/share/icons/hicolor/32x32/apps/therion.png
+
+#Create a desktop entry
+mkdir -p $PKG/usr/share/applications
+cat << EOF > $PKG/usr/share/applications/therion.desktop
+[Desktop Entry]
+Type=Application
+Name=Therion
+GenericName=Cave survey software
+GenericName[de]=Höhlenstudienprogramm
+GenericName[es]=Programa de estudio de las cuevas
+GenericName[fr]=Programme d'étude des grottes
+GenericName[it]=Programma di studio delle grotte
+GenericName[pt]=Programa de estudo de caverna
+Comment=Process data from speleological surveys and generate maps and 3D models of caves
+Comment[de]=Verarbeiten Sie speläologische Daten und erstellen Sie Höhlenkarten und 3D-Modelle
+Comment[es]=Procese datos de estudios espeleológicos y genere mapas y modelos 3D de cuevas
+Comment[fr]=Traiter données des relevés spéléologiques et générer cartes et modèles 3D de grottes
+Comment[it]=Elabora dati di rilievi speleologici e genera mappe e modelli 3D delle grotte
+Comment[pt]=Processar dados de levantamentos espeleológicos e gerar mapas e modelos 3D de cavernas
+Exec=xtherion
+Icon=/usr/share/icons/hicolor/32x32/apps/therion.png
+Terminal=false
+Categories=Education;Science;Geology;
+StartupNotify=true
+MimeType=text/x-th;text/x-th2;
+
+EOF
+
+# remove *.ini files, leave only *.ini.new
+rm -f $PKG/etc/therion/*.ini
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/therion/therion.info b/gis/therion/therion.info
new file mode 100644
index 0000000000..3cbeac70f3
--- /dev/null
+++ b/gis/therion/therion.info
@@ -0,0 +1,10 @@
+PRGNAM="therion"
+VERSION="6.2.1"
+HOMEPAGE="https://therion.speleo.sk/"
+DOWNLOAD="https://github.com/therion/therion/archive/v6.2.1/therion-6.2.1.tar.gz"
+MD5SUM="cb3b9c2472bfeda939661ce7d71e651d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="bwidget Catch2 fmt lcdf-typetools proj tkimg VTK wxWidgets"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/gis/udig/README b/gis/udig/README
deleted file mode 100644
index 1ec38dd0d4..0000000000
--- a/gis/udig/README
+++ /dev/null
@@ -1,11 +0,0 @@
-uDig is an open source desktop and internet GIS application framework. The
-project goal is to provide a complete Java solution for desktop GIS data
-access, editing and viewing.
-
-uDig aims to be:
-- User friendly, providing a familiar graphical environment for GIS users;
-- Desktop located, running as a thick client
-- Internet oriented, consuming standard (WMS, WFS, WPS) and de facto (GeoRSS,
- KML, tiles) geospatial web services; and, GIS ready, providing the
- framework on which complex analytical capabilities can be built, and gradually
- subsuming those capabilities into the main application.
diff --git a/gis/udig/doinst.sh b/gis/udig/doinst.sh
deleted file mode 100644
index 5fb28930db..0000000000
--- a/gis/udig/doinst.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
-fi
diff --git a/gis/udig/slack-desc b/gis/udig/slack-desc
deleted file mode 100644
index 9e9f96ac9b..0000000000
--- a/gis/udig/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.
-# Line up the first '|' above the ':' following the base package name, and
-# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-udig: udig (desktop GIS)
-udig:
-udig: uDig is an open source desktop GIS application framework that can be
-udig: used as a standalone viewer and editor for spatial data. uDig
-udig: supports PostGIS, shapefiles and other sources.
-udig:
-udig: Homepage: http://udig.refractions.net/
-udig:
-udig:
-udig:
-udig:
diff --git a/gis/udig/udig.SlackBuild b/gis/udig/udig.SlackBuild
deleted file mode 100644
index fbc7033dde..0000000000
--- a/gis/udig/udig.SlackBuild
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/sh
-#
-# SlackBuild for uDig
-#
-# Copyright 2012 Benjamin Trigona-Harany
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-PRGNAM=udig
-VERSION=${VERSION:-1.4.0}
-BUILD=${BUILD:-2}
-TAG=${TAG:-_SBo}
-
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-if [ "$ARCH" = "x86_64" ]; then
- LIBDIRSUFFIX="64"
- ZIPSUFFIX="x86_64"
- GDALDIR="amd64"
-else
- LIBDIRSUFFIX=""
- ZIPSUFFIX="x86"
- GDALDIR="i386"
-fi
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM
-cd $TMP
-unzip $CWD/$PRGNAM-$VERSION.linux.gtk.$ZIPSUFFIX.zip
-cd $PRGNAM
-chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# the GDAL libs need to be extracted from the JRE directory and placed in the LD_LIBRARY_PATH
-# at uDig runtime
-mkdir -p $PKG/usr/share/$PRGNAM
-cp -a jre/lib/${GDALDIR}/libgdaljni.so{,.1} $PKG/usr/share/$PRGNAM
-sed -i '2i\
-export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/bin/share/udig
-' udig.sh
-
-mkdir -p $PKG/usr/share/$PRGNAM
-cp -a configuration dropins features libcairo-swt.so p2 plugins *.sh udig_internal* $PKG/usr/share/$PRGNAM
-
-# gdal_data doesn't come with x86
-if [ "$ARCH" = "x86_64" ]; then
- cp -a gdal_data $PKG/usr/share/$PRGNAM
-fi
-
-mkdir -p $PKG/usr/bin
-ln -s /usr/share/$PRGNAM/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
-
-mkdir -p $PKG/usr/share/applications
-cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-
-mkdir -p $PKG/usr/share/pixmaps/
-cp -a icon.xpm $PKG/usr/share/pixmaps/udig.xpm
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE.txt epl-v10.html notice.html readme/* udig-$VERSION.html $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/gis/udig/udig.desktop b/gis/udig/udig.desktop
deleted file mode 100644
index 0919cc2c13..0000000000
--- a/gis/udig/udig.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=uDig
-GenericName=Desktop Internet GIS
-Comment=Java-based GIS data viewer and editor
-Exec=/usr/bin/udig
-StartupNotify=true
-Icon=udig
-Type=Application
-Categories=Education;Science;Geoscience;Geography;
diff --git a/gis/udig/udig.info b/gis/udig/udig.info
deleted file mode 100644
index 81d2104b5b..0000000000
--- a/gis/udig/udig.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="udig"
-VERSION="1.4.0"
-HOMEPAGE="http://udig.refractions.net"
-DOWNLOAD="http://udig.refractions.net/files/downloads/udig-1.4.0.linux.gtk.x86.zip"
-MD5SUM="116b7f577ba08b1e2b7d0100588f5259"
-DOWNLOAD_x86_64="http://udig.refractions.net/files/downloads/udig-1.4.0.linux.gtk.x86_64.zip"
-MD5SUM_x86_64="b401a3fc48b33888dcf894104b4f903e"
-REQUIRES="jai-imageio"
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
diff --git a/gis/viking/viking.SlackBuild b/gis/viking/viking.SlackBuild
index 8ca0b8437e..20cff729d7 100644
--- a/gis/viking/viking.SlackBuild
+++ b/gis/viking/viking.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for viking.
@@ -24,10 +24,13 @@
#
# Maintained by David Spencer <baildon.research@googlemail.com>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=viking
VERSION=${VERSION:-1.6.2}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -84,7 +94,7 @@ if [ ${GEOCACHES:-no} = "yes" ]; then
OPT_GEOCACHES="--enable-geocaches"
fi
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -117,4 +127,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/viking/viking.info b/gis/viking/viking.info
index 5acc1d403a..a1079f69da 100644
--- a/gis/viking/viking.info
+++ b/gis/viking/viking.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://downloads.sourceforge.net/viking/viking-1.6.2.tar.bz2"
MD5SUM="288cf8c6043ff4d04523595457fd5ed0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gpsd libgexiv2"
+REQUIRES="gpsd"
MAINTAINER="David Spencer"
EMAIL="baildon.research@googlemail.com"
diff --git a/gis/whitebox-tools/README b/gis/whitebox-tools/README
new file mode 100644
index 0000000000..73328ae946
--- /dev/null
+++ b/gis/whitebox-tools/README
@@ -0,0 +1,21 @@
+WhiteboxTools is an advanced geospatial data analysis platform
+developed by Prof. John Lindsay at the University of Guelph's
+Geomorphometry and Hydrogeomatics Research Group. WhiteboxTools can be
+used to perform common geographical information systems (GIS) analysis
+operations, such as cost-distance analysis, distance buffering, and
+raster reclassification. Remote sensing and image processing tasks
+include image enhancement (e.g. panchromatic sharpening, contrast
+adjustments), image mosaicing, numerous filtering operations,
+simple classification (k-means), and common image transformations.
+WhiteboxTools also contains advanced tooling for spatial hydrological
+analysis (e.g. flow-accumulation, watershed delineation, stream
+network analysis, sink removal), terrain analysis (e.g. common terrain
+indices such as slope, curvatures, wetness index, hillshading;
+hypsometric analysis; multi-scale topographic position analysis),
+and LiDAR data processing. LiDAR point clouds can be interrogated
+(LidarInfo, LidarHistogram), segmented, tiled and joined, analyized
+for outliers, interpolated to rasters (DEMs, intensity images), and
+ground-points can be classified or filtered. WhiteboxTools is not
+a cartographic or spatial data visualization package; instead it is
+meant to serve as an analytical backend for other data visualization
+software, mainly GIS.
diff --git a/gis/whitebox-tools/slack-desc b/gis/whitebox-tools/slack-desc
new file mode 100644
index 0000000000..7ce96e6c15
--- /dev/null
+++ b/gis/whitebox-tools/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+whitebox-tools: whitebox-tools (advanced geospatial data analysis platform)
+whitebox-tools:
+whitebox-tools: WhiteboxTools is an advanced geospatial data analysis platform
+whitebox-tools: developed by Prof. John Lindsay at the University of Guelph's
+whitebox-tools: Geomorphometry and Hydrogeomatics Research Group. WhiteboxTools can
+whitebox-tools: be used to perform common geographical information systems (GIS)
+whitebox-tools: analysis operations. It is not a cartographic or spatial data
+whitebox-tools: visualization package; instead it is meant to serve as an analytical
+whitebox-tools: backend for other data visualization software, mainly GIS.
+whitebox-tools:
+whitebox-tools:
diff --git a/gis/whitebox-tools/whitebox-tools.SlackBuild b/gis/whitebox-tools/whitebox-tools.SlackBuild
new file mode 100644
index 0000000000..4648b0d44f
--- /dev/null
+++ b/gis/whitebox-tools/whitebox-tools.SlackBuild
@@ -0,0 +1,166 @@
+#!/bin/bash
+
+# Slackware build script for whitebox-tools
+
+# Copyright 2019-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=whitebox-tools
+BINNAM=`echo $PRGNAM | tr - _`
+VERSION=${VERSION:-1.5.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+
+ if [ "$ARCH" = "i586" ]; then
+ if rustc -Vv | grep host | grep i686 > /dev/null ; then
+ ARCH=i686
+ fi
+ fi
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ CARGOTARGET="--target i586-unknown-linux-gnu"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ CARGOTARGET="--target i686-unknown-linux-gnu"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ CARGOTARGET="--target x86_64-unknown-linux-gnu"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ CARGOTARGET=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+# build offline
+# configuration tells cargo to use the configured directory
+# for dependencies intead of downloading from crates.io
+mkdir .cargo
+cat << EOF >> .cargo/config
+[source.crates-io]
+registry = 'https://github.com/rust-lang/crates.io-index'
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$(pwd)/vendor'
+EOF
+
+# deps and versions come from Cargo.lock
+mkdir vendor
+(
+ cd vendor
+
+ grep -h -A 3 "\[\[package\]\]" $(find ../ -maxdepth 1 -mindepth 1 -name Cargo.lock | tr '\n' ' ') | \
+ sed 's/[[:space:]]*=[[:space:]]*/=/g;s/^--//;s/^\[\[/--\n[[/' | \
+ awk 'BEGIN { RS = "--\n" ; FS="\n" } { print $2, $3, $4 }' | sed 's/"//g;s/name=//;s/ version=/=/' | \
+ grep crates\.io-index | sed 's/ source=.*$//' | sort -u | while read -r dep ; do
+
+ ver="$(printf "%s\n" "$dep" | cut -d= -f2)"
+ dep="$(printf "%s\n" "$dep" | cut -d= -f1)"
+
+ tar xvf $CWD/$dep-$ver.crate
+
+ touch $dep-$ver/.cargo-ok
+
+ # generate checksum
+ {
+ printf "{\n"
+ printf ' "files": {\n'
+
+ (
+ cd $dep-$ver
+ find . -type f -print0 | xargs -0 sha256sum | sed -n '/\.cargo-checksum\.json/!p' | sed 's/\.\///;s/^\([^ ]*\)[[:space:]][[:space:]]*\(.*\)$/"\2":"\1",/'
+ ) | sed '$ s/,$//'
+
+ printf " },\n"
+ printf ' "package": "'
+
+ sha256sum "$CWD/$dep-$ver.crate" | cut -f1 -d' ' | sed 's/$/"/'
+
+ printf "}\n"
+ } | python -c "import sys, json; data = sys.stdin.read(); print json.dumps(json.loads(data), sort_keys=True, indent=4, separators=(',', ' : '))" > $dep-$ver/.cargo-checksum.json
+ done
+)
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CARGO_HOME=.cargo \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+cargo build --offline --release $CARGOTARGET
+
+mkdir -p $PKG/usr/bin/
+
+find target -name $BINNAM -exec install -m 755 {} $PKG/usr/bin/$BINNAM \;
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a -r \
+ LICENSE.txt README.md readme.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/gis/whitebox-tools/whitebox-tools.info b/gis/whitebox-tools/whitebox-tools.info
new file mode 100644
index 0000000000..7750b688ed
--- /dev/null
+++ b/gis/whitebox-tools/whitebox-tools.info
@@ -0,0 +1,204 @@
+PRGNAM="whitebox-tools"
+VERSION="1.5.0"
+HOMEPAGE="https://github.com/jblindsay/whitebox-tools"
+DOWNLOAD="https://github.com/jblindsay/whitebox-tools/archive/1.5.0/whitebox-tools-1.5.0.tar.gz \
+ https://static.crates.io/crates/adler/adler-0.2.3.crate \
+ https://static.crates.io/crates/adler32/adler32-1.2.0.crate \
+ https://static.crates.io/crates/alga/alga-0.9.3.crate \
+ https://static.crates.io/crates/alloc-no-stdlib/alloc-no-stdlib-2.0.1.crate \
+ https://static.crates.io/crates/alloc-stdlib/alloc-stdlib-0.2.1.crate \
+ https://static.crates.io/crates/approx/approx-0.3.2.crate \
+ https://static.crates.io/crates/autocfg/autocfg-0.1.7.crate \
+ https://static.crates.io/crates/autocfg/autocfg-1.0.1.crate \
+ https://static.crates.io/crates/bitflags/bitflags-1.2.1.crate \
+ https://static.crates.io/crates/brotli/brotli-3.3.0.crate \
+ https://static.crates.io/crates/brotli-decompressor/brotli-decompressor-2.3.1.crate \
+ https://static.crates.io/crates/byteorder/byteorder-1.4.2.crate \
+ https://static.crates.io/crates/bzip2/bzip2-0.3.3.crate \
+ https://static.crates.io/crates/bzip2-sys/bzip2-sys-0.1.10+1.0.8.crate \
+ https://static.crates.io/crates/cc/cc-1.0.66.crate \
+ https://static.crates.io/crates/cfg-if/cfg-if-1.0.0.crate \
+ https://static.crates.io/crates/chrono/chrono-0.4.19.crate \
+ https://static.crates.io/crates/cloudabi/cloudabi-0.0.3.crate \
+ https://static.crates.io/crates/const_fn/const_fn-0.4.5.crate \
+ https://static.crates.io/crates/crc32fast/crc32fast-1.2.1.crate \
+ https://static.crates.io/crates/crossbeam-channel/crossbeam-channel-0.5.0.crate \
+ https://static.crates.io/crates/crossbeam-deque/crossbeam-deque-0.8.0.crate \
+ https://static.crates.io/crates/crossbeam-epoch/crossbeam-epoch-0.9.1.crate \
+ https://static.crates.io/crates/crossbeam-utils/crossbeam-utils-0.8.1.crate \
+ https://static.crates.io/crates/either/either-1.6.1.crate \
+ https://static.crates.io/crates/flate2/flate2-1.0.20.crate \
+ https://static.crates.io/crates/fuchsia-cprng/fuchsia-cprng-0.1.1.crate \
+ https://static.crates.io/crates/generic-array/generic-array-0.12.3.crate \
+ https://static.crates.io/crates/getrandom/getrandom-0.1.16.crate \
+ https://static.crates.io/crates/hermit-abi/hermit-abi-0.1.18.crate \
+ https://static.crates.io/crates/itoa/itoa-0.4.7.crate \
+ https://static.crates.io/crates/kdtree/kdtree-0.6.0.crate \
+ https://static.crates.io/crates/lazy_static/lazy_static-1.4.0.crate \
+ https://static.crates.io/crates/libc/libc-0.2.86.crate \
+ https://static.crates.io/crates/libm/libm-0.2.1.crate \
+ https://static.crates.io/crates/lzw/lzw-0.10.0.crate \
+ https://static.crates.io/crates/matrixmultiply/matrixmultiply-0.2.4.crate \
+ https://static.crates.io/crates/memoffset/memoffset-0.6.1.crate \
+ https://static.crates.io/crates/miniz_oxide/miniz_oxide-0.3.7.crate \
+ https://static.crates.io/crates/miniz_oxide/miniz_oxide-0.4.3.crate \
+ https://static.crates.io/crates/msdos_time/msdos_time-0.1.6.crate \
+ https://static.crates.io/crates/nalgebra/nalgebra-0.18.1.crate \
+ https://static.crates.io/crates/num-complex/num-complex-0.2.4.crate \
+ https://static.crates.io/crates/num-integer/num-integer-0.1.44.crate \
+ https://static.crates.io/crates/num-rational/num-rational-0.2.4.crate \
+ https://static.crates.io/crates/num-traits/num-traits-0.2.14.crate \
+ https://static.crates.io/crates/num_cpus/num_cpus-1.13.0.crate \
+ https://static.crates.io/crates/pdqselect/pdqselect-0.1.0.crate \
+ https://static.crates.io/crates/pest/pest-2.1.3.crate \
+ https://static.crates.io/crates/pkg-config/pkg-config-0.3.19.crate \
+ https://static.crates.io/crates/podio/podio-0.1.7.crate \
+ https://static.crates.io/crates/ppv-lite86/ppv-lite86-0.2.10.crate \
+ https://static.crates.io/crates/proc-macro2/proc-macro2-1.0.24.crate \
+ https://static.crates.io/crates/quote/quote-1.0.8.crate \
+ https://static.crates.io/crates/rand/rand-0.3.23.crate \
+ https://static.crates.io/crates/rand/rand-0.4.6.crate \
+ https://static.crates.io/crates/rand/rand-0.6.5.crate \
+ https://static.crates.io/crates/rand/rand-0.7.3.crate \
+ https://static.crates.io/crates/rand_chacha/rand_chacha-0.1.1.crate \
+ https://static.crates.io/crates/rand_chacha/rand_chacha-0.2.2.crate \
+ https://static.crates.io/crates/rand_core/rand_core-0.3.1.crate \
+ https://static.crates.io/crates/rand_core/rand_core-0.4.2.crate \
+ https://static.crates.io/crates/rand_core/rand_core-0.5.1.crate \
+ https://static.crates.io/crates/rand_distr/rand_distr-0.2.2.crate \
+ https://static.crates.io/crates/rand_hc/rand_hc-0.1.0.crate \
+ https://static.crates.io/crates/rand_hc/rand_hc-0.2.0.crate \
+ https://static.crates.io/crates/rand_isaac/rand_isaac-0.1.1.crate \
+ https://static.crates.io/crates/rand_jitter/rand_jitter-0.1.4.crate \
+ https://static.crates.io/crates/rand_os/rand_os-0.1.3.crate \
+ https://static.crates.io/crates/rand_pcg/rand_pcg-0.1.2.crate \
+ https://static.crates.io/crates/rand_pcg/rand_pcg-0.2.1.crate \
+ https://static.crates.io/crates/rand_xorshift/rand_xorshift-0.1.1.crate \
+ https://static.crates.io/crates/rawpointer/rawpointer-0.2.1.crate \
+ https://static.crates.io/crates/rayon/rayon-1.5.0.crate \
+ https://static.crates.io/crates/rayon-core/rayon-core-1.9.0.crate \
+ https://static.crates.io/crates/rdrand/rdrand-0.4.0.crate \
+ https://static.crates.io/crates/rstar/rstar-0.7.1.crate \
+ https://static.crates.io/crates/rustc_version/rustc_version-0.3.3.crate \
+ https://static.crates.io/crates/ryu/ryu-1.0.5.crate \
+ https://static.crates.io/crates/scopeguard/scopeguard-1.1.0.crate \
+ https://static.crates.io/crates/semver/semver-0.11.0.crate \
+ https://static.crates.io/crates/semver-parser/semver-parser-0.10.2.crate \
+ https://static.crates.io/crates/serde/serde-1.0.123.crate \
+ https://static.crates.io/crates/serde_derive/serde_derive-1.0.123.crate \
+ https://static.crates.io/crates/serde_json/serde_json-1.0.64.crate \
+ https://static.crates.io/crates/statrs/statrs-0.9.0.crate \
+ https://static.crates.io/crates/syn/syn-1.0.60.crate \
+ https://static.crates.io/crates/time/time-0.1.44.crate \
+ https://static.crates.io/crates/typenum/typenum-1.12.0.crate \
+ https://static.crates.io/crates/ucd-trie/ucd-trie-0.1.3.crate \
+ https://static.crates.io/crates/unicode-xid/unicode-xid-0.2.1.crate \
+ https://static.crates.io/crates/wasi/wasi-0.9.0+wasi-snapshot-preview1.crate \
+ https://static.crates.io/crates/wasi/wasi-0.10.0+wasi-snapshot-preview1.crate \
+ https://static.crates.io/crates/winapi/winapi-0.3.9.crate \
+ https://static.crates.io/crates/winapi-i686-pc-windows-gnu/winapi-i686-pc-windows-gnu-0.4.0.crate \
+ https://static.crates.io/crates/winapi-x86_64-pc-windows-gnu/winapi-x86_64-pc-windows-gnu-0.4.0.crate \
+ https://static.crates.io/crates/zip/zip-0.3.3.crate"
+MD5SUM="58e6a008c05b16aca79fb6a79f4679f6 \
+ c9d0c8f38c6686e47c29fe9b409c25c2 \
+ d5898ddb1e496ff0ac50b79829311e76 \
+ 1f6ec6a2e7b169d66d6db72cac5f413b \
+ 0a15f45e4be162bae1d3862c5914ef65 \
+ 90cccf8d60bcf15d3a82624791b4c818 \
+ 711b149cf4767597fc265983750f4da3 \
+ 898079c1c795b5aa847169137918c7bc \
+ c6443ec8d007c729ba5482008d0c864d \
+ 6799c26a7eacaf8e58d3e45c6c5add89 \
+ 4a7c879f56227b39214534910f842c3d \
+ 9fa41e9d738f538d8b97c56387b43369 \
+ c0c854d9b92b342470c85564612651fb \
+ e0bf3b40b2d51cb52f40647b368efb50 \
+ 5ea2a4ba48acaacc6f161853f2843997 \
+ b3ebb5d4433417e998d982d46334a6f4 \
+ 74634128440dbc3766bda76fdf0aaa05 \
+ 1581b390d17f6e73a43ffc8a7b009e57 \
+ 1c8b50f8528dd37df7d984e0e4b61bd5 \
+ 9dfc93061fe28cb086419887d4d3f5ee \
+ e5b87a7cd8e16e7f46ee58f0e75c026a \
+ 8248cc4466ea3a77b9c2666ed4fc7963 \
+ e38f9483da311ab0e0811a12201dfa1a \
+ 9ae7be25dee514b764ee2f73c2a90791 \
+ 9e1f73325eeb9647ee68eeaa4bff975c \
+ b4e2b229c362ad0dd313ff631816d5db \
+ 7881509413936dc7382f9314f632787e \
+ 27260b46db6b9ac40318143d70a80ba3 \
+ 916a6c827f4f0f64b7652bebf67d82e1 \
+ 15d3113e5507c411419fa64f6b9d5349 \
+ 2c4bc5c16b345ce4d4bbf977577fab35 \
+ 4379362bf1be77d47a45c7223a01eead \
+ 412752575d11aefd8c262075407f5cc1 \
+ fba3b040a55c01be7376d3dd5c4d4920 \
+ 04f84e88732a1057a37b5d01c23eac1d \
+ 5b23904f9579d1efd0e914257517eeb5 \
+ 7d95c53a33d0c550267b89a19899a6fa \
+ 0affb9ab3799eec15c6381eae808dcaa \
+ a7a8c0f9d8d00f65fabad79005560dfa \
+ db1ea84c5ee1938888b78e4050dd5cfd \
+ c291ac2f4465c030c058a7c1bc595783 \
+ c24b5fe087abe69f7548a9e6c8789d61 \
+ e7be05acf53dc7d372d012d7ac673073 \
+ 25a9c25700c416af66082afbd9187bb7 \
+ a8ec1126ef06244ac1e3773981a005f1 \
+ 99e024622d98dc28a8a5f37afccaf20a \
+ c0e036fd990d0c9cae11b5876a5cb572 \
+ c36d452e37c73b1e99f40bae18cddfdb \
+ 899e132d3e99c2d79d0784d61ee8895f \
+ 37cf6acd1c3259eefeba636e4cc9b365 \
+ 448bc61aee07661464d98da7660e9a1d \
+ 284d2ece16c067ac0a2dc88361461a78 \
+ a4ff7abd41c57dfd24bbd4b50edb848f \
+ 0736e4f76f4f8f0a29563b0608ca3974 \
+ ddd3199850a8a6a8db642923ed603a99 \
+ 7c547f7b390ef6b68f99e4055658c0ec \
+ 9e99a37f8c37bb953732ef46ac2b12a1 \
+ 793627c8c18012ad77cb3e81fa4c2195 \
+ 66d1cb32dce999907409f636f004b884 \
+ 3ab5a79607a4d260bf61cd99dc82ab05 \
+ 0a80ed36a125ac3cdfa09f8707055873 \
+ 8cab41822d03dfa674870315308fa392 \
+ 35ddcd36701a1a6711cc3aec85909f41 \
+ a0f55fda89c0f97784edb18f4c253a49 \
+ caa57442578f90341a6ab7bf94d4fde9 \
+ 28b1e6d15e1ba8cf3a2e953ce7fcd3de \
+ b269356e8646f3184a0e8d52a58cee69 \
+ 74b15f1928431937f14ed91fdc12b542 \
+ 2255d3d9a603e177985602a7df1c5bbc \
+ 5acfdc8656212bce8df1bcc43db34c3d \
+ f9e08a49715c401602243230b28d86f0 \
+ 7b0715affe44616a992f113ad7ab7d50 \
+ 7826deb76941fc36c2391951bd65ba47 \
+ d4a05ab09e96ee8767f7409721bf65b8 \
+ e4e9750df83fa662872061952e155d9a \
+ 21235a4cec107822e39c144242a95bf1 \
+ c8d655d206cbe48b84a22544d6fc6d15 \
+ 57d8084d93aec796d98691e654c5e0f6 \
+ 93aeba00993f0ed8c474864e455cf584 \
+ a69721c73263cd2040e1a5f120b03a6f \
+ b4a0a98a54439a5a37952c8879187ee3 \
+ d2cc4e584ed64165fc56d2c9081eb3ee \
+ 42408be0352a76b14f1e77a6b8858a77 \
+ e16bb0d9c46839fbf5d1a69673b00c4c \
+ 6ec70075835fed0250bc4407f32d5928 \
+ a48bad155fe3ba9bfb2e7c1920bb0d2d \
+ 9503719444b058de7c3032aa7dc2b6f8 \
+ c72a927acc4cc7695ae9c73c19964a6f \
+ c6c50e4feea5f4cc4e1fb3c7e88606a5 \
+ 55927226b06f62ccbd2890269d68c2fd \
+ 6cae4969689ecc3b4b4c31a9fb9539a6 \
+ a51c43692084979295641a7ffba4b297 \
+ 6e23e0eee42b1ba9ec61a6db7ec2dc08 \
+ a312b55a428f827a91097d1d8497b02b \
+ 0498c4a11448bfc35dc7bb2caa64c753 \
+ db96b50050277bf05a3c68534bbb9586 \
+ 09de9d01e7331ff3da11f58be8bef0df \
+ 0ac2781d3a2021cdabd68fb7e38589aa"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Benjamin Trigona-Harany"
+EMAIL="slackbuilds@jaxartes.net"
diff --git a/gis/xplanet/README b/gis/xplanet/README
index 641dae6637..5b6e8de9e7 100644
--- a/gis/xplanet/README
+++ b/gis/xplanet/README
@@ -1,8 +1,8 @@
-Xplanet renders planetary and solar system images. It can be used to create
-computer wallpapers or single images. Xplanet can show city names, overlay
-cloud maps or display which regions of Earth are day or night. Xplanet can
-be used to produce projected maps based on several projections, such as
-mollweide, which show the whole earth at once, or mercator, which is
-rectangular and is suitable for filling the screen.
+Xplanet renders planetary and solar system images. It can be used to
+create computer wallpapers or single images. Xplanet can show city
+names, overlay cloud maps or display which regions of Earth are day or
+night. Xplanet can be used to produce projected maps based on several
+projections, such as mollweide, which show the whole earth at once, or
+mercator, which is rectangular and is suitable for filling the screen.
See /usr/share/xplanet for maps, config files, scripts, and so on.
diff --git a/gis/xplanet/xplanet.SlackBuild b/gis/xplanet/xplanet.SlackBuild
index 1b1c7599f1..9d7bc4e376 100644
--- a/gis/xplanet/xplanet.SlackBuild
+++ b/gis/xplanet/xplanet.SlackBuild
@@ -1,13 +1,15 @@
-#!/bin/sh
+#!/bin/bash
# Written by Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# Based on http://slackbuilds.org/template.SlackBuild
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=xplanet
VERSION=${VERSION:-1.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -20,6 +22,11 @@ if [ -z "$ARCH" ]; then
esac
fi
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -83,4 +90,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE