Wiki » Historique » Version 23

« Précédent - Version 23/28 (diff) - Suivant » - Version actuelle
Sylvain Grellet, 20/02/2018 11:02


Configuring Enterprise Architect for the EPOS Borehole Model

## Collecting EPOS model

Using a subversion client, do a SVN Checkout using the following URL "https://forge.brgm.fr/svnrepository/epos/trunk/"

## Collecting the standards

Do a SVN checkout for the following packages

## Version control Setting Set-up in EA

In EA, create a new empty project. In Project viewer, right-click on model, --> Package control --> then Version control Setting. Create new configurations by clicking on the new button.
  1. In configuration Details – Type, select Subversion. Set the 'VC Time-Out Value' to 150 seconds.
  2. Type 'EposGIM' in the Unique ID field. Select the path where the EPOS model model resides ('model' folder of the svn checkout folder). Click 'Save' and click on the 'New' button.
  3. Type 'hollowworld' in the Unique ID field. Select the path where the hollowworld model resides (at the root of the svn checkout folder). Click 'Save' and click on the 'New' button.
  4. Type 'isotc211' in the Unique ID field. Select the path where the isotc211 model resides (at the root of the svn checkout folder). Click 'Save' and click on the 'New' button.

## Getting the packages

In EA, in Project viewer, right-click on model, --> Package control --> Get Package.
  1. For HollowWorld (select file HollowWorld.xml). If you configured your ISO TC211 models files correctly in the previous steps, the get package for isotc211 is done automatically through HollowWorld.
  2. For Epos select file EPOS_GIM.xml

## Getting the packages content

In EA, in Project viewer, right-click on Model, --> Package control --> Get All Latest. In some instance, it was found that a "Get Latest" on each package was required to fully update the model to its latest version. Please verify the the model is up to date before doing any edits.

## Extra-ressources

Most of this content was stolen from : http://external.opengis.org/twiki_public/HydrologyDWG/Uml_for_gwml2
If more details are required, please visit https://www.seegrid.csiro.au/wiki/CGIModel/ConfiguringEnterpriseArchitectForGeoSciML

About WFS App Schema for BoreholeView

https://epos.brgm-rec.fr/geoserver/ows?service=wfs&version=2.0.0&request=GetFeature&TYPENAMES=gsmlp:BoreholeView&OUTPUTFORMAT=text/xml;%20subtype=gml/3.2&count=1&resolveDepth=*

# Trusted environment

This app schema has been successfully set up with those versions of GeoServer:
- BRGM ressource-rec: GeoServer 2.8.0
- BRGM epos-rec: GeoServer 2.9.2

# Link to resources

Several content are offered in https://forge.brgm.fr/svnrepository/epos/trunk/tools/geoserver/

# Tips for configuration of App-schema

## workspace

The content of workspaces (the gsmlp folder) should be put in your geoserver/data/workspaces.

## DB part (for xsd version 1.0.0)

App schema provided in SVN is actually set up for one table called "borehole_eu" with those columns:

CREATE TABLE epos.borehole_eu
(
boreholeid character varying NOT NULL,
gmlidentifier character varying,
name character varying,
gsmlpidentifier character varying,
description text,
purpose_href character varying(255),
purpose character varying(255),
boreholeuse text,
boreholeuse_href character varying(255),
status_href character varying(255),
status character varying(30),
drillingmethod_href character varying(255),
drillingmethod text,
operator text,
driller character varying(50),
drillstartdate date,
drillenddate date,
startpoint_href character varying(255),
startpoint character varying(30),
inclinationtype_href character varying(255),
inclinationtype character varying(30),
boreholematerialcustodian text,
boreholelength_m real,
elevation_m real,
elevation_srs character varying,
source character varying,
parentborehole_uri character varying,
metadata_uri character varying,
genericsymbolizer character varying(255),
cored boolean,
accesstophysicaldrillcore boolean,
detaileddescription character varying(255),
detaileddescription_href character varying(255),
geophysicallogs character varying(255),
geophysicallogs_href character varying(255),
geologicaldescription character varying(255),
geologicaldescription_href character varying(255),
groundwaterlevel character varying(255),
groundwaterlevel_href character varying(255),
groundwaterchemistry character varying(255),
groundwaterchemistry_href character varying(255),
rockgeochemistry character varying(255),
rockgeochemistry_href character varying(255),
poregaschemistry character varying(255),
poregaschemistry_href character varying(255),
geotechnicalinfo character varying(255),
geotechnicalinfo_href character varying(255),
location_wgs84 geometry,
positionalaccuracy text,
CONSTRAINT pk_borehole_eu_06_on_boreholeid PRIMARY KEY (boreholeid)
)

## app-schema.properties

The datastore part from gsmlp_BoreholeView.xml is linked to a app-schema.properties file.

This file actually indicate how app-schema should connect to your database.
It should be put in geoserver/WEB-INF/classes.

## GML namespace and workspace

If GML namespace is not appearing in your BoreholeView response(replaced by null, e.g. null:name).

- Check in your GeoServer that gml namespace and workspace are properly set and attached to GML v3.2.

- Check in your "BoreholeView.xml" mapping that reference to GML is also pointing v3.2.

About WMS for BoreholeView

  • Creation of a table epos.borehole_sld for translating the SLD rules (from https://forge.brgm.fr/svnrepository/epos/trunk/sld/): this operation is not automatic... (see function epos.insert_borehole_sld())
    CREATE TABLE epos.borehole_sld
    (
      pk_rule serial NOT NULL,
      name character varying(500),
      filtre_purpose_href character varying(500),
      filtre_length_greater integer,
      filter_length_lessequal integer,
      style1_symbol character varying(100),
      style1_size numeric,
      style1_color character varying(11),
      style2_symbol character varying(100),
      style2_size numeric,
      style2_color character(11),
      CONSTRAINT sldpk PRIMARY KEY (pk_rule)
    )
    
  • if the SLD is updated, the table has to be updated as well. The best to do so is to update the function epos.insert_borehole_sld() which contains everything to create the SLD table. THen to refresh the materialized view.
    -- select * from epos.insert_borehole_sld();
    -- REFRESH MATERIALIZED VIEW  epos.borehole_eu_06_sld;
    
  • Creation of a materialized view borehole_eu_06_sld joining the data and SLD rules. The Mapfile does only contain one Style (CLASS) rule, using the values from the database (performaces are better that way).
    CREATE MATERIALIZED VIEW epos.borehole_eu_06_sld AS 
     SELECT borehole_eu_06.location_wgs84::geometry(Point,4326) AS geom,
        borehole_eu_06.boreholeid,
        borehole_eu_06.purpose_href,
        borehole_eu_06.purpose,
        borehole_eu_06.status,
        borehole_eu_06.operator,
        borehole_eu_06.driller,
        borehole_eu_06.drillstartdate,
        borehole_eu_06.drillenddate,
        borehole_eu_06.startpoint,
        borehole_eu_06.inclinationtype,
        borehole_eu_06.boreholematerialcustodian,
        borehole_eu_06.elevation_m,
        borehole_eu_06.boreholelength_m,
        sld.name,
        sld.style1_symbol,
        sld.style1_color,
        sld.style1_size,
        sld.style2_symbol,
        sld.style2_color,
        sld.style2_size
       FROM epos.borehole_eu_06,
        epos.borehole_sld sld
      WHERE borehole_eu_06.purpose_href::text = sld.filtre_purpose_href::text AND borehole_eu_06.boreholelength_m > sld.filtre_length_greater::double precision AND borehole_eu_06.boreholelength_m <= sld.filter_length_lessequal::double precision
    WITH DATA;
    
    

HOW TO - détail de mise en place WFS NRZ (Natural Risk Zones) sur données Pangeo (Europe)

howToWFSpangeoGeoserver