Wiki » Historique » Version 24

Sylvain Grellet, 22/02/2018 10:47

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