[Mapbender-commits] r9569 - trunk/documents/presentations/FOSS4G2016
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Sep 2 02:57:52 PDT 2016
Author: astrid_emde
Date: 2016-09-02 02:57:52 -0700 (Fri, 02 Sep 2016)
New Revision: 9569
Modified:
trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_digitizer.txt
trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_searchrouter.txt
Log:
fixed
Modified: trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_digitizer.txt
===================================================================
--- trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_digitizer.txt 2016-08-31 15:21:04 UTC (rev 9568)
+++ trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_digitizer.txt 2016-09-02 09:57:52 UTC (rev 9569)
@@ -1,55 +1,44 @@
--- DROP VIEW public.view_planet_osm_point;
+#----------------------------
+# add a connection to your osm_local database to mapbender
+# read more about database connections http://doc.mapbender3.org/en/book/database.html
+#----------------------------
+## in config.yml
+ osm_local:
+ driver: %database2_driver%
+ host: %database2_host%
+ port: %database2_port%
+ dbname: %database2_name%
+ path: %database2_path%
+ user: %database2_user%
+ password: %database2_password%
+ charset: UTF8
-CREATE OR REPLACE VIEW public.view_planet_osm_point AS
- SELECT planet_osm_point.osm_id,
- planet_osm_point.gid,
- planet_osm_point."addr:housenumber" AS housenumber,
- planet_osm_point.amenity,
- planet_osm_point.barrier,
- planet_osm_point.bicycle,
- planet_osm_point.brand,
- planet_osm_point.building,
- planet_osm_point.capital,
- planet_osm_point.disused,
- planet_osm_point.highway,
- planet_osm_point.historic,
- planet_osm_point.man_made,
- planet_osm_point.name,
- planet_osm_point.power,
- planet_osm_point.public_transport,
- planet_osm_point.railway,
- planet_osm_point.ref AS location,
- planet_osm_point.religion,
- planet_osm_point.shop,
- planet_osm_point.tourism,
- planet_osm_point."tower:type" AS towertype,
- planet_osm_point.z_order,
- planet_osm_point.way AS geom
- FROM planet_osm_point
- WHERE planet_osm_point.amenity = 'post_box'::text
+# in parameters.yml
-ALTER TABLE public.view_planet_osm_point
- OWNER TO "user";
+ # database connection to PostgreSQL database osm_local
+ database2_driver: pdo_pgsql
+ database2_host: localhost
+ database2_port: 5432
+ database2_name: osm_local
+ database2_path: ~
+ database2_user: user
+ database2_password: user
-#-------------UNIQUE ID------------------------------------
-ALTER TABLE public.planet_osm_point ADD COLUMN gid integer;
-ALTER TABLE public.planet_osm_point ALTER COLUMN gid SET NOT NULL;
-ALTER TABLE public.planet_osm_point ALTER COLUMN gid SET DEFAULT nextval('planet_osm_point_gid_seq'::regclass);
-
-planet_osm_point_gid_seq: start value auf 9570 setzen
-#---------------------------------------------------------
-
+#----------------------------
+# digitizer configuration
+#----------------------------
poi:
label: point digitizing
maxResults: 500
featureType:
connection: osm_local
- table: view_planet_osm_point
+ table: planet_osm_point
uniqueId: gid
geomType: point
geomField: geom
srid: 4326
+ filter: amenity = 'post_box'
openFormAfterEdit: true
zoomScaleDenominator: 500
allowEditData: true
Modified: trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_searchrouter.txt
===================================================================
--- trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_searchrouter.txt 2016-08-31 15:21:04 UTC (rev 9568)
+++ trunk/documents/presentations/FOSS4G2016/FOSS4G2016_Mapbender3_Workshop_searchrouter.txt 2016-09-02 09:57:52 UTC (rev 9569)
@@ -1,44 +1,41 @@
--- View: public.view_planet_osm_point
+----------------------------
+-- Create view on table planet_osm_point and refer only to the post boxes
+----------------------------
--- DROP VIEW public.view_planet_osm_point;
-
-CREATE OR REPLACE VIEW public.view_planet_osm_point AS
- SELECT planet_osm_point.osm_id,
- planet_osm_point.gid,
- planet_osm_point."addr:housenumber" AS housenumber,
- planet_osm_point.amenity,
- planet_osm_point.barrier,
- planet_osm_point.bicycle,
- planet_osm_point.brand,
- planet_osm_point.building,
- planet_osm_point.capital,
- planet_osm_point.disused,
- planet_osm_point.highway,
- planet_osm_point.historic,
- planet_osm_point.man_made,
- planet_osm_point.name,
- planet_osm_point.power,
- planet_osm_point.public_transport,
- planet_osm_point.railway,
- planet_osm_point.ref AS location,
- planet_osm_point.religion,
- planet_osm_point.shop,
- planet_osm_point.tourism,
- planet_osm_point."tower:type" AS towertype,
- planet_osm_point.z_order,
- planet_osm_point.way AS geom
+CREATE OR REPLACE VIEW view_planet_osm_point AS
+ SELECT osm_id,
+ gid,
+ "addr:housenumber" AS housenumber,
+ amenity,
+ barrier,
+ bicycle,
+ brand,
+ building,
+ capital,
+ disused,
+ highway,
+ historic,
+ man_made,
+ name,
+ power,
+ public_transport,
+ railway,
+ ref AS location,
+ religion,
+ shop,
+ tourism,
+ "tower:type" AS towertype,
+ z_order,
+ way AS geom
FROM planet_osm_point
- WHERE planet_osm_point.amenity = 'post_box'::text
+ WHERE amenity = 'post_box'::text
-ALTER TABLE public.view_planet_osm_point
- OWNER TO "user";
-
#---------------------------------------------------------
class: Mapbender\CoreBundle\Component\SQLSearchEngine
class_options:
connection: osm_local
- relation: public.view_planet_osm_point
+ relation: view_planet_osm_point
attributes:
- osm_id
- amenity
More information about the Mapbender_commits
mailing list