Wiki » Historique » Version 26

Sylvain Grellet, 17/05/2018 16:37

1 23 Sylvain Grellet
h1. Configuring Enterprise Architect for the EPOS Borehole Model
2 23 Sylvain Grellet
3 23 Sylvain Grellet
h2. ## Collecting EPOS model
4 23 Sylvain Grellet
5 25 Sylvain Grellet
Using a subversion client (need to have one which has commandLine, https://sliksvn.com/download/), do a SVN Checkout using the following URL "https://forge.brgm.fr/svnrepository/epos/trunk/"
6 23 Sylvain Grellet
7 23 Sylvain Grellet
h2. ## Collecting the standards
8 23 Sylvain Grellet
9 23 Sylvain Grellet
Do a SVN checkout for the following packages
10 23 Sylvain Grellet
* HollowWorld --> https://www.seegrid.csiro.au/subversion/HollowWorld/branches/release_4
11 23 Sylvain Grellet
* ISOTC211 --> https://www.seegrid.csiro.au/mirrors/iso-harmonized-model
12 26 Sylvain Grellet
* GWML2 (GroundWaterML2) --> https://xp-dev.com/svn/gwml2/model
13 23 Sylvain Grellet
14 23 Sylvain Grellet
h2. ## Version control Setting Set-up in EA
15 23 Sylvain Grellet
16 23 Sylvain Grellet
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.
17 23 Sylvain Grellet
# In configuration Details – Type, select Subversion. Set the 'VC Time-Out Value' to 150 seconds.
18 23 Sylvain Grellet
# 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.
19 23 Sylvain Grellet
# 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.
20 23 Sylvain Grellet
# 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.
21 26 Sylvain Grellet
# Type 'gwml' in the Unique ID field. Select the path where the gwml model resides (at the root of the svn checkout folder). Click 'Save' and click on the 'New' button.
22 23 Sylvain Grellet
23 23 Sylvain Grellet
h2. ## Getting the packages
24 23 Sylvain Grellet
25 23 Sylvain Grellet
In EA, in Project viewer, right-click on model, --> Package control --> Get Package. 
26 23 Sylvain Grellet
# 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. 
27 23 Sylvain Grellet
# For Epos select file EPOS_GIM.xml
28 26 Sylvain Grellet
# For GWML2 select file GWML2.xml
29 23 Sylvain Grellet
30 23 Sylvain Grellet
h2. ## Getting the packages content
31 23 Sylvain Grellet
32 23 Sylvain Grellet
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.
33 23 Sylvain Grellet
34 23 Sylvain Grellet
h2. ## Extra-ressources
35 23 Sylvain Grellet
36 23 Sylvain Grellet
Most of this content was stolen from : http://external.opengis.org/twiki_public/HydrologyDWG/Uml_for_gwml2
37 23 Sylvain Grellet
If more details are required, please visit https://www.seegrid.csiro.au/wiki/CGIModel/ConfiguringEnterpriseArchitectForGeoSciML
38 23 Sylvain Grellet
39 23 Sylvain Grellet
40 1 Mickael Beaufils
h1. About WFS App Schema for BoreholeView
41 1 Mickael Beaufils
42 13 Agnes Tellez Arenas
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=*
43 12 Agnes Tellez Arenas
44 4 Mickael Beaufils
h2. # Trusted environment
45 1 Mickael Beaufils
46 4 Mickael Beaufils
This app schema has been successfully set up with those versions of GeoServer:
47 4 Mickael Beaufils
- BRGM ressource-rec: GeoServer 2.8.0
48 4 Mickael Beaufils
- BRGM epos-rec: GeoServer 2.9.2
49 1 Mickael Beaufils
50 1 Mickael Beaufils
51 4 Mickael Beaufils
h2. # Link to resources
52 1 Mickael Beaufils
53 4 Mickael Beaufils
Several content are offered in https://forge.brgm.fr/svnrepository/epos/trunk/tools/geoserver/
54 1 Mickael Beaufils
55 4 Mickael Beaufils
56 4 Mickael Beaufils
57 4 Mickael Beaufils
h1. # Tips for configuration of App-schema
58 4 Mickael Beaufils
59 4 Mickael Beaufils
h2. ## workspace
60 4 Mickael Beaufils
61 4 Mickael Beaufils
The content of workspaces (the gsmlp folder) should be put in your geoserver/data/workspaces.
62 4 Mickael Beaufils
63 22 Mickael Beaufils
h2. ## DB part (for xsd version 1.0.0)
64 1 Mickael Beaufils
65 6 Mickael Beaufils
App schema provided in SVN is actually set up for one table called "borehole_eu" with those columns:
66 1 Mickael Beaufils
67 21 Mickael Beaufils
 CREATE TABLE epos.borehole_eu
68 21 Mickael Beaufils
(
69 6 Mickael Beaufils
  boreholeid character varying NOT NULL,
70 9 Mickael Beaufils
  gmlidentifier character varying,
71 9 Mickael Beaufils
  name character varying,
72 1 Mickael Beaufils
  gsmlpidentifier character varying,
73 21 Mickael Beaufils
  description text,
74 1 Mickael Beaufils
  purpose_href character varying(255),
75 21 Mickael Beaufils
  purpose character varying(255),
76 21 Mickael Beaufils
  boreholeuse text,
77 1 Mickael Beaufils
  boreholeuse_href character varying(255),
78 1 Mickael Beaufils
  status_href character varying(255),
79 6 Mickael Beaufils
  status character varying(30),
80 6 Mickael Beaufils
  drillingmethod_href character varying(255),
81 21 Mickael Beaufils
  drillingmethod text,
82 21 Mickael Beaufils
  operator text,
83 1 Mickael Beaufils
  driller character varying(50),
84 1 Mickael Beaufils
  drillstartdate date,
85 6 Mickael Beaufils
  drillenddate date,
86 6 Mickael Beaufils
  startpoint_href character varying(255),
87 1 Mickael Beaufils
  startpoint character varying(30),
88 1 Mickael Beaufils
  inclinationtype_href character varying(255),
89 1 Mickael Beaufils
  inclinationtype character varying(30),
90 21 Mickael Beaufils
  boreholematerialcustodian text,
91 6 Mickael Beaufils
  boreholelength_m real,
92 6 Mickael Beaufils
  elevation_m real,
93 6 Mickael Beaufils
  elevation_srs character varying,
94 6 Mickael Beaufils
  source character varying,
95 1 Mickael Beaufils
  parentborehole_uri character varying,
96 1 Mickael Beaufils
  metadata_uri character varying,
97 21 Mickael Beaufils
  genericsymbolizer character varying(255),
98 1 Mickael Beaufils
  cored boolean,
99 9 Mickael Beaufils
  accesstophysicaldrillcore boolean,
100 9 Mickael Beaufils
  detaileddescription character varying(255),
101 9 Mickael Beaufils
  detaileddescription_href character varying(255),
102 9 Mickael Beaufils
  geophysicallogs character varying(255),
103 9 Mickael Beaufils
  geophysicallogs_href character varying(255),
104 9 Mickael Beaufils
  geologicaldescription character varying(255),
105 9 Mickael Beaufils
  geologicaldescription_href character varying(255),
106 9 Mickael Beaufils
  groundwaterlevel character varying(255),
107 9 Mickael Beaufils
  groundwaterlevel_href character varying(255),
108 9 Mickael Beaufils
  groundwaterchemistry character varying(255),
109 1 Mickael Beaufils
  groundwaterchemistry_href character varying(255),
110 1 Mickael Beaufils
  rockgeochemistry character varying(255),
111 1 Mickael Beaufils
  rockgeochemistry_href character varying(255),
112 9 Mickael Beaufils
  poregaschemistry character varying(255),
113 9 Mickael Beaufils
  poregaschemistry_href character varying(255),
114 9 Mickael Beaufils
  geotechnicalinfo character varying(255),
115 9 Mickael Beaufils
  geotechnicalinfo_href character varying(255),
116 9 Mickael Beaufils
  location_wgs84 geometry,
117 21 Mickael Beaufils
  positionalaccuracy text,
118 21 Mickael Beaufils
  CONSTRAINT pk_borehole_eu_06_on_boreholeid PRIMARY KEY (boreholeid)
119 21 Mickael Beaufils
)
120 4 Mickael Beaufils
121 4 Mickael Beaufils
h2. ## app-schema.properties
122 8 Mickael Beaufils
123 8 Mickael Beaufils
The datastore part from gsmlp_BoreholeView.xml is linked to a app-schema.properties file.
124 1 Mickael Beaufils
125 1 Mickael Beaufils
This file actually indicate how app-schema should connect to your database.
126 15 Agnes Tellez Arenas
It should be put in geoserver/WEB-INF/classes.
127 19 Mickael Beaufils
128 19 Mickael Beaufils
h2. ## GML namespace and workspace
129 19 Mickael Beaufils
130 19 Mickael Beaufils
If GML namespace is not appearing in your BoreholeView response(replaced by null, e.g. null:name).
131 19 Mickael Beaufils
132 1 Mickael Beaufils
- Check in your GeoServer that gml namespace and workspace are properly set and attached to GML v3.2.
133 20 Mickael Beaufils
134 19 Mickael Beaufils
- Check in your "BoreholeView.xml" mapping that reference to GML is also pointing v3.2.
135 1 Mickael Beaufils
136 16 Agnes Tellez Arenas
h1. About WMS for BoreholeView
137 18 Agnes Tellez Arenas
138 1 Mickael Beaufils
* 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())
139 17 Agnes Tellez Arenas
<pre>
140 17 Agnes Tellez Arenas
CREATE TABLE epos.borehole_sld
141 17 Agnes Tellez Arenas
(
142 17 Agnes Tellez Arenas
  pk_rule serial NOT NULL,
143 17 Agnes Tellez Arenas
  name character varying(500),
144 17 Agnes Tellez Arenas
  filtre_purpose_href character varying(500),
145 17 Agnes Tellez Arenas
  filtre_length_greater integer,
146 17 Agnes Tellez Arenas
  filter_length_lessequal integer,
147 17 Agnes Tellez Arenas
  style1_symbol character varying(100),
148 17 Agnes Tellez Arenas
  style1_size numeric,
149 17 Agnes Tellez Arenas
  style1_color character varying(11),
150 17 Agnes Tellez Arenas
  style2_symbol character varying(100),
151 17 Agnes Tellez Arenas
  style2_size numeric,
152 17 Agnes Tellez Arenas
  style2_color character(11),
153 17 Agnes Tellez Arenas
  CONSTRAINT sldpk PRIMARY KEY (pk_rule)
154 17 Agnes Tellez Arenas
)
155 18 Agnes Tellez Arenas
</pre>
156 17 Agnes Tellez Arenas
* 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.
157 16 Agnes Tellez Arenas
<pre>
158 1 Mickael Beaufils
-- select * from epos.insert_borehole_sld();
159 1 Mickael Beaufils
-- REFRESH MATERIALIZED VIEW  epos.borehole_eu_06_sld;
160 1 Mickael Beaufils
</pre>
161 17 Agnes Tellez Arenas
* 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).
162 17 Agnes Tellez Arenas
<pre>
163 17 Agnes Tellez Arenas
CREATE MATERIALIZED VIEW epos.borehole_eu_06_sld AS 
164 17 Agnes Tellez Arenas
 SELECT borehole_eu_06.location_wgs84::geometry(Point,4326) AS geom,
165 17 Agnes Tellez Arenas
    borehole_eu_06.boreholeid,
166 17 Agnes Tellez Arenas
    borehole_eu_06.purpose_href,
167 17 Agnes Tellez Arenas
    borehole_eu_06.purpose,
168 17 Agnes Tellez Arenas
    borehole_eu_06.status,
169 17 Agnes Tellez Arenas
    borehole_eu_06.operator,
170 17 Agnes Tellez Arenas
    borehole_eu_06.driller,
171 17 Agnes Tellez Arenas
    borehole_eu_06.drillstartdate,
172 17 Agnes Tellez Arenas
    borehole_eu_06.drillenddate,
173 17 Agnes Tellez Arenas
    borehole_eu_06.startpoint,
174 17 Agnes Tellez Arenas
    borehole_eu_06.inclinationtype,
175 17 Agnes Tellez Arenas
    borehole_eu_06.boreholematerialcustodian,
176 17 Agnes Tellez Arenas
    borehole_eu_06.elevation_m,
177 17 Agnes Tellez Arenas
    borehole_eu_06.boreholelength_m,
178 17 Agnes Tellez Arenas
    sld.name,
179 17 Agnes Tellez Arenas
    sld.style1_symbol,
180 17 Agnes Tellez Arenas
    sld.style1_color,
181 17 Agnes Tellez Arenas
    sld.style1_size,
182 17 Agnes Tellez Arenas
    sld.style2_symbol,
183 17 Agnes Tellez Arenas
    sld.style2_color,
184 17 Agnes Tellez Arenas
    sld.style2_size
185 17 Agnes Tellez Arenas
   FROM epos.borehole_eu_06,
186 17 Agnes Tellez Arenas
    epos.borehole_sld sld
187 17 Agnes Tellez Arenas
  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
188 17 Agnes Tellez Arenas
WITH DATA;
189 17 Agnes Tellez Arenas
190 16 Agnes Tellez Arenas
</pre>
191 15 Agnes Tellez Arenas
192 15 Agnes Tellez Arenas
h1. HOW TO - détail de mise en place WFS NRZ (Natural Risk Zones) sur données Pangeo (Europe)
193 15 Agnes Tellez Arenas
194 1 Mickael Beaufils
[[howToWFSpangeoGeoserver]]