Skip to content

mbasa/GeoFuse

Repository files navigation

Prerequisites

To Install

  • download the source code and build a WAR file using Maven
  mvn clean install
  • copy the created WAR file into tomcat_dir/webapps directory
  • start tomcat

Configure PostgreSQL

  • create a database and install PostGIS
  createdb geofuse
  psql -c "CREATE EXTENSION postgis" geofuse
  psql -c "CREATE EXTENSION postgis_topology" geofuse
  • create the schemas that will contain the dummy and metadata tables found in createtabs.sql
  psql -f createtabs.sql geofuse
  • create the deltemp function that will delete the temporary files
  psql -f deltemp.sql geofuse
  • add map layers (polygons/lines/points) which will later be used for thematics. it will be best to place the table into the created "geodata" schema.

Configure GeoServer

  • Create a Workspace named geofuse alt text

  • Create a new PostGIS DataStore alt text

  • Name the new Store as geofuse and set the database parameter to the geofuse database created. Set the schema parameter to geodata alt text

  • Create a new SQL View Layer alt text

  • Set the layer name as geolink and the SQL Statement as

  select a.*,the_geom from %linktab% a,%maptab% b where a.col0 = b.%mapcol%
  • Set the View Parameters to the values below and erase the values of the Validation regular expression (正規表現を検証)
  linktab = geodata.dummy
  maptab  = geodata.mapdummy
  mapcol  = mapcol

alt text

  • Press the Refresh button to update the Columns list. Change the SRID of the the_geom column to 4326 and press the Save Button. alt text

  • After Pressing the Save button, set the Bounding Box Parameters to -180 -90 180 90 in the main layer creation page and then Save. alt text

  • Create another SQL View Layer using the procedure set above. Set the layer name as geolink_pt and the SQL Statement as below

  select * from %linktab%
  • Set the View Parameters to the values below and erase the values of the Validation regular expression (正規表現を検証)
  linktab = geodata.dummy_pt
  • Press the Refresh button to update the Columns list. Change the Geometry Type to Point and the SRID of the the_geom column to 4326 and press the Save Button. alt text

  • After Pressing the Save button, set the Bounding Box Parameters to -180 -90 180 90 in the main layer creation page and then Save.

Populate the MapLinker table in PostgreSQL

Insert the following for each map layer that will be used to create thematic

  • link colunm (i.e. 'prefocode)
  • Map table name with schema (i.e. 'geodata.prefectures')
  • created geoserver view name (i.e. 'geofuse:geolink')
  • type of layer (i.e. 'polygon'))
    insert into geofuse.maplinker values ('prefcode', 'geodata.prefecture', 'geofuse:geolink', 'polygon');

To View Geofuse

In your browser, go to http://localhost:8080/geofuse/

NOTE: This application will try to get only metric (numeric) fields to display in the Thematic attribute list. For numeric ID fileds (i.e. Prefecture-ID,Country-ID,etc.), add a suffix "-ID" to the fieldname so that it will not show in the attribute list.

To Customize:

  tomcat_dir/webapps/GeoFuse/classes/properties/
      database.propertiess
      thematic.properties

Adding new postgis table

Adding new background layer for printing

Adding new colorscheme

/webapps/geothematics/WEB-INF/classes/properties/thematic.properties

NOTE: the ColorNames and Colors should have equal number of items, otherwise no color choices will appear in the Colors list of the web page.

License

Released under GPL.