[Mapbender-commits] r9977 - in trunk/mapbender/resources/db: . pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Oct 12 05:40:08 PDT 2018


Author: armin11
Date: 2018-10-12 05:40:08 -0700 (Fri, 12 Oct 2018)
New Revision: 9977

Modified:
   trunk/mapbender/resources/db/install_geoportal_mb28.sh
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.8_pgsql_UTF-8.sql
Log:
Some enhancement and fixes

Modified: trunk/mapbender/resources/db/install_geoportal_mb28.sh
===================================================================
--- trunk/mapbender/resources/db/install_geoportal_mb28.sh	2018-10-11 16:04:00 UTC (rev 9976)
+++ trunk/mapbender/resources/db/install_geoportal_mb28.sh	2018-10-12 12:40:08 UTC (rev 9977)
@@ -19,6 +19,12 @@
 ############################################################
 # 
 ############################################################
+use_ssl="false"
+domain_name="www.geoportal.test.de"
+not_proxy_hosts="localhost,127.0.0.1"
+############################################################
+# 
+############################################################
 mapbender_guest_user_id="2"
 mapbender_guest_group_id="22"
 mapbender_subadmin_group_id="21"
@@ -460,6 +466,24 @@
 su - postgres -c "psql -q -p $mapbender_database_port -d $mapbender_database_name -c 'GRANT SELECT, INSERT, UPDATE, DELETE ON DATABASE $mapbender_database_name TO $mapbender_database_user'"
 
 #####################
+# add precise coordinate transformation to proj and postgis extension
+#####################
+wget http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/BETA2007.gsb
+cp BETA2007.gsb /usr/share/proj/
+cp /usr/share/proj/epsg /usr/share/proj/epsg_backup_geoportal
+sed -i "s/<31466> +proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +datum=potsdam +units=m +no_defs  <>/<31466> +proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs  <>/g" /usr/share/proj/epsg
+sed -i "s/<31467> +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +datum=potsdam +units=m +no_defs  <>/<31467> +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs  <>/g" /usr/share/proj/epsg
+sed -i "s/<31468> +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +datum=potsdam +units=m +no_defs  <>/<31468> +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs  <>/g" /usr/share/proj/epsg
+sed -i "s/<31469> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +datum=potsdam +units=m +no_defs  <>/<31469> +proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs  <>/g" /usr/share/proj/epsg
+#####################
+cat << EOF > ${installation_folder}geoportal_database_proj_adaption.sql
+UPDATE spatial_ref_sys SET proj4text='+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs' WHERE srid = 31466;
+UPDATE spatial_ref_sys SET proj4text='+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs' WHERE srid = 31467;
+UPDATE spatial_ref_sys SET proj4text='+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs' WHERE srid = 31468;
+UPDATE spatial_ref_sys SET proj4text='+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +datum=potsdam +ellps=bessel +nadgrids=@BETA2007.gsb,null +units=m +no_defs' WHERE srid = 31469;
+EOF
+sudo -u postgres psql -q -d mapbender -f ${installation_folder}geoportal_database_proj_adaption.sql
+#####################
 fi # end of installation of the mapbender database
 
 if [ $configure_mapbender = 'true' ]; then
@@ -481,17 +505,23 @@
     chown -R www-data:www-data ${installation_folder}mapbender/metadata/ 
     #####################
     echo -n 'adopt mapbender.conf ... '
+    #####################
     # alter connection type to use curl
+    #####################
     sed -i "s/define(\"CONNECTION\", \"http\");/#define(\"CONNECTION\", \"http\");/g" ${installation_folder}mapbender/conf/mapbender.conf
     sed -i "s/#define(\"CONNECTION\", \"curl\");/define(\"CONNECTION\", \"curl\");/g" ${installation_folder}mapbender/conf/mapbender.conf
-
+    #####################
+    # define proxy settings
+    #####################
     # sed -i "s///g" ${installation_folder}mapbender/conf/mapbender.conf
-
     if [ $use_proxy = 'true' ]; then
 	    sed -i "s/define(\"CONNECTION_PROXY\", \"\");/define(\"CONNECTION_PROXY\", \"$http_proxy_host\");/g" ${installation_folder}mapbender/conf/mapbender.conf
 	    sed -i "s/define(\"CONNECTION_PROXY\", \"\");/define(\"CONNECTION_PORT\", \"$http_proxy_port\");/g" ${installation_folder}mapbender/conf/mapbender.conf
+	    sed -i "s/define(\"NOT_PROXY_HOSTS\", \"<ip>,<ip>,<ip>\");/define(\"NOT_PROXY_HOSTS\", \"localhost,127.0.0.1\");/g" ${installation_folder}mapbender/conf/mapbender.conf
     fi
-
+    #####################
+    # set database connection
+    #####################
     sed -i "s/%%DBSERVER%%/localhost/g" ${installation_folder}mapbender/conf/mapbender.conf
     sed -i "s/%%DBPORT%%/$mapbender_database_port/g" ${installation_folder}mapbender/conf/mapbender.conf
     sed -i "s/%%DBNAME%%/$mapbender_database_name/g" ${installation_folder}mapbender/conf/mapbender.conf
@@ -499,12 +529,23 @@
     sed -i "s/%%DBPASSWORD%%/$mapbender_database_password/g" ${installation_folder}mapbender/conf/mapbender.conf
     # maybe problematic!:
     sed -i "s#/data/#$installation_folder#g" ${installation_folder}mapbender/conf/mapbender.conf
-    #special users & groups
+    #####################
+    # special users & groups
+    #####################
     sed -i "s/#define(\"PUBLIC_USER\", \"\");/#define(\"PUBLIC_USER\", \"${mapbender_guest_user_id}\");/g" ${installation_folder}mapbender/conf/mapbender.conf
     sed -i "s/#define(\"REGISTRATING_GROUP\",36);/define(\"REGISTRATING_GROUP\",${mapbender_subadmin_group_id});/g" ${installation_folder}mapbender/conf/mapbender.conf
     sed -i "s/#define(\"PORTAL_ADMIN_USER_ID\",\"1\");/define(\"PORTAL_ADMIN_USER_ID\",\"1\");/g" ${installation_folder}mapbender/conf/mapbender.conf
     sed -i "s/#define(\"CATALOGUE_MAINTENANCE_USER\",\"1\");/define(\"CATALOGUE_MAINTENANCE_USER\",\"1\");/g" ${installation_folder}mapbender/conf/mapbender.conf
     #####################
+    # metadata management
+    #####################
+    sed -i "s/define(\"MD_OVERWRITE\", true);/define(\"MD_OVERWRITE\", false);/g" ${installation_folder}mapbender/conf/mapbender.conf
+    #####################
+    # default language
+    #####################
+    sed -i "s/define(\"USE_I18N\", false);/define(\"USE_I18N\", true);/g" ${installation_folder}mapbender/conf/mapbender.conf
+    sed -i "s/define(\"LANGUAGE\", \"en\");/define(\"LANGUAGE\", \"de\");/g" ${installation_folder}mapbender/conf/mapbender.conf
+
     # alter group id for subadministrators in monitoring tool - use group_id 21 - this is the subadmin mb_group_id
 cat << EOF > ${installation_folder}mapbender/tools/monitorCapabilities.sh
 . /etc/profile

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.8_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.8_pgsql_UTF-8.sql	2018-10-11 16:04:00 UTC (rev 9976)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.8_pgsql_UTF-8.sql	2018-10-12 12:40:08 UTC (rev 9977)
@@ -125,3 +125,11 @@
 
 RETURN 'urls exchanged';
 
+END;
+$BODY$
+  LANGUAGE plpgsql VOLATILE STRICT
+  COST 100;
+ALTER FUNCTION f_simple_alter_service_operation_url(character varying, character varying, character varying)
+  OWNER TO postgres;
+
+



More information about the Mapbender_commits mailing list