Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workspace Rennes Métropole #562

Merged
merged 1 commit into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions geoserver-workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ Here you can find some GeoServer data-dir configurations with (near) out-of-the-

* [pci_basic](pci_basic/README.md) : a basic style
* [pci_qgis](pci_qgis/README.md) : a port of the QGIS plugin cadastre style
* [ref_cad](ref_cad/README.md) : a rich cadastral background proposed by Rennes Métropole

55 changes: 55 additions & 0 deletions geoserver-workspace/ref_cad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Cadastrapp - Fond de plan cadastral de Rennes Métropole

Voici un espace de travail complet tel qu'il est utilisé par Rennes Métropole afin de disposer d'un fond de plan cadastral complet.

L'espace de travail exposera les couches suivantes :

* Cadastre : Communes (`ref_cad:commune`)
* Cadastre : Sections (`ref_cad:section`)
* Cadastre : Parcelles (`ref_cad:parcelle`)
* Cadastre : Bâtiments (`ref_cad:batiment`)

Et les 2 agrégats suivants :

* Cadastre Rennes Métropole (`ref_cad:cadastre`)
* Cadastre Rennes Métropole (N&B) (`ref_cad:cadastre_nb`)

Ce sont les agrégats qu'il conviendra de tuiler / mettre en cache.


![](https://public.sig.rennesmetropole.fr/geoserver/ref_cad/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=ref_cad%3Acadastre&exceptions=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A3948&STYLES=&WIDTH=301&HEIGHT=251&BBOX=1348271.3605096072%2C7208053.914425999%2C1348629.2579826668%2C7208352.162320215) ![](https://public.sig.rennesmetropole.fr/geoserver/ref_cad/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=ref_cad%3Acadastre_nb&exceptions=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A3948&STYLES=&WIDTH=301&HEIGHT=251&BBOX=1348271.3605096072%2C7208053.914425999%2C1348629.2579826668%2C7208352.162320215)

Pour augmenter la lisibilité cartographique du plan cadastral, Rennes Métropole calcule 4 couches de données à partir des données cadastrales :

* `rm_comm_lin` : topologie de lignes pour afficher correctement les limites communales avec un style en pointillés
* `rm_sectio_lin` : topologie de lignes pour afficher correctement les limites de sections avec un style en pointillés
* `rm_suf_lin` : topologie de lignes pour afficher correctement les limites de subdivisions fiscales intra parcellaire avec un style en pointillés
* `rm_parc_rejetee` : couche de points calculés au centre de gravité des parcelles qui figurent au plan mais n'ont pas d'équivalent dans la matrice foncière.


Le répertoire `couches_rm/` contient les traitements FME ou SQL pour créer ces 4 surcouches.

Enfin, pour de bonnes performances, toutes les couches GeoServer utilisent une connexion JNDI vers la pbase de données PostGIS. Pour créer cette connexion (également appelé pool de connexion) il faut ajouter le bloc suivant dans le fichier `/var/lib/tomcat9/conf/context.xml`

```
<Resource name="jdbc/bdu"
auth="Container"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://{host}:5432/{db_name}"
username="{pg_role_name}" password="{pg_role_password}"
maxActive="20"
initialSize="0"
minIdle="0"
maxIdle="8"
maxWait="10000"
timeBetweenEvictionRunsMillis="30000"
minEvictableIdleTimeMillis="60000"
testWhileIdle="true"
validationQuery="SELECT 1"
maxAge="600000"
rollbackOnReturn="true"
/>
```

Penser à adapter manuellement le fichier `bdu.cadastre_qgis/datastore.xml` à l'organisation de votre base de données.
100 changes: 100 additions & 0 deletions geoserver-workspace/ref_cad/bdu.cadastre_qgis/batiment/featuretype.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<featureType>
<id>FeatureTypeInfoImpl--8165de6:16ccbdcefde:671f</id>
<name>batiment</name>
<nativeName>batiment</nativeName>
<namespace>
<id>NamespaceInfoImpl-d47db26:147ed8b249c:-7ffd</id>
</namespace>
<title>Cadastre : Bâtiments</title>
<abstract>Cette couche de polygones contient les bâtiments qui figurent sur le plan cadastral.&#xd;
&#xd;
Les bâtiments sont figurés par leur emprise au sol.&#xd;
Il est possible de distinguer les bâtiments légers et les bâtiments en dur.</abstract>
<keywords>
<string>features</string>
<string>batiment</string>
</keywords>
<metadataLinks>
<metadataLink>
<type>text/html</type>
<metadataType>ISO19115:2003</metadataType>
<content>https://portail.sig.rennesmetropole.fr/geonetwork/srv/fre/catalog.search#/metadata/ca06a7f1-1704-4177-9826-5d40cdf08175</content>
</metadataLink>
<metadataLink>
<type>text/xml</type>
<metadataType>ISO19115:2003</metadataType>
<content>https://portail.sig.rennesmetropole.fr/geonetwork/srv/fre/xml.metadata.get?uuid=ca06a7f1-1704-4177-9826-5d40cdf08175</content>
</metadataLink>
</metadataLinks>
<nativeCRS class="projected">PROJCS[&quot;RGF93 / CC48&quot;,
GEOGCS[&quot;RGF93&quot;,
DATUM[&quot;Reseau Geodesique Francais 1993&quot;,
SPHEROID[&quot;GRS 1980&quot;, 6378137.0, 298.257222101, AUTHORITY[&quot;EPSG&quot;,&quot;7019&quot;]],
TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
AUTHORITY[&quot;EPSG&quot;,&quot;6171&quot;]],
PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
UNIT[&quot;degree&quot;, 0.017453292519943295],
AXIS[&quot;Geodetic longitude&quot;, EAST],
AXIS[&quot;Geodetic latitude&quot;, NORTH],
AUTHORITY[&quot;EPSG&quot;,&quot;4171&quot;]],
PROJECTION[&quot;Lambert_Conformal_Conic_2SP&quot;, AUTHORITY[&quot;EPSG&quot;,&quot;9802&quot;]],
PARAMETER[&quot;central_meridian&quot;, 3.0],
PARAMETER[&quot;latitude_of_origin&quot;, 48.0],
PARAMETER[&quot;standard_parallel_1&quot;, 48.75],
PARAMETER[&quot;false_easting&quot;, 1700000.0],
PARAMETER[&quot;false_northing&quot;, 7200000.0],
PARAMETER[&quot;scale_factor&quot;, 1.0],
PARAMETER[&quot;standard_parallel_2&quot;, 47.25],
UNIT[&quot;m&quot;, 1.0],
AXIS[&quot;Easting&quot;, EAST],
AXIS[&quot;Northing&quot;, NORTH],
AUTHORITY[&quot;EPSG&quot;,&quot;3948&quot;]]</nativeCRS>
<srs>EPSG:3948</srs>
<nativeBoundingBox>
<minx>1330663.62</minx>
<maxx>1367376.37</maxx>
<miny>7203736.19</miny>
<maxy>7245432.17</maxy>
<crs class="projected">EPSG:3948</crs>
</nativeBoundingBox>
<latLonBoundingBox>
<minx>-1.9820838459837513</minx>
<maxx>-1.4555576005340813</maxx>
<miny>47.92701009442865</miny>
<maxy>48.32151897876393</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<enabled>true</enabled>
<metadata>
<entry key="JDBC_VIRTUAL_TABLE">
<virtualTable>
<name>batiment</name>
<sql>SELECT &#xd;
object_rid,&#xd;
lot,&#xd;
geo_batiment,&#xd;
geo_dur,&#xd;
geom&#xd;
FROM cadastre_qgis.geo_batiment
</sql>
<escapeSql>false</escapeSql>
<geometry>
<name>geom</name>
<type>MultiPolygon</type>
<srid>3948</srid>
</geometry>
</virtualTable>
</entry>
<entry key="cacheAgeMax">86400</entry>
<entry key="cachingEnabled">true</entry>
</metadata>
<store class="dataStore">
<id>DataStoreInfoImpl-27ef7aa:16b20f027ab:-7525</id>
</store>
<maxFeatures>0</maxFeatures>
<numDecimals>0</numDecimals>
<overridingServiceSRS>false</overridingServiceSRS>
<skipNumberMatched>false</skipNumberMatched>
<circularArcPresent>false</circularArcPresent>
</featureType>
15 changes: 15 additions & 0 deletions geoserver-workspace/ref_cad/bdu.cadastre_qgis/batiment/layer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<layer>
<name>batiment</name>
<id>LayerInfoImpl--8165de6:16ccbdcefde:6720</id>
<type>VECTOR</type>
<defaultStyle>
<id>StyleInfoImpl--8165de6:16ccd8c835c:-7e4c</id>
</defaultStyle>
<resource class="featureType">
<id>FeatureTypeInfoImpl--8165de6:16ccbdcefde:671f</id>
</resource>
<attribution>
<logoWidth>0</logoWidth>
<logoHeight>0</logoHeight>
</attribution>
</layer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<featureType>
<id>FeatureTypeInfoImpl--8165de6:16ccbdcefde:4bf0</id>
<name>commune</name>
<nativeName>commune</nativeName>
<namespace>
<id>NamespaceInfoImpl-d47db26:147ed8b249c:-7ffd</id>
</namespace>
<title>Cadastre : Communes</title>
<abstract>Cette couche de polygones contient les limites administratives des communes qui figurent au plan cadastral. Cette couche permet d&apos;identifier les 43 communes de l&apos;agglomération rennaise.&#xd;
&#xd;
Il s&apos;agit des limites communales telles que fournies en EDIGEO par la DGFiP. Il existe donc des recouvrements ou des trous entre communes.&#xd;
Il est donc préférable d&apos;utiliser la couche &quot;Limites communales référentielles de Rennes Métropole&quot;.</abstract>
<keywords>
<string>features</string>
<string>commune</string>
</keywords>
<metadataLinks>
<metadataLink>
<type>text/html</type>
<metadataType>ISO19115:2003</metadataType>
<content>https://portail.sig.rennesmetropole.fr/geonetwork/srv/fre/catalog.search#/metadata/6db35b05-e8bc-4339-a49b-828da0d3fd9f</content>
</metadataLink>
<metadataLink>
<type>text/xml</type>
<metadataType>ISO19115:2003</metadataType>
<content>https://portail.sig.rennesmetropole.fr/geonetwork/srv/fre/xml.metadata.get?uuid=6db35b05-e8bc-4339-a49b-828da0d3fd9f</content>
</metadataLink>
</metadataLinks>
<nativeCRS class="projected">PROJCS[&quot;RGF93 / CC48&quot;,
GEOGCS[&quot;RGF93&quot;,
DATUM[&quot;Reseau Geodesique Francais 1993&quot;,
SPHEROID[&quot;GRS 1980&quot;, 6378137.0, 298.257222101, AUTHORITY[&quot;EPSG&quot;,&quot;7019&quot;]],
TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
AUTHORITY[&quot;EPSG&quot;,&quot;6171&quot;]],
PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
UNIT[&quot;degree&quot;, 0.017453292519943295],
AXIS[&quot;Geodetic longitude&quot;, EAST],
AXIS[&quot;Geodetic latitude&quot;, NORTH],
AUTHORITY[&quot;EPSG&quot;,&quot;4171&quot;]],
PROJECTION[&quot;Lambert_Conformal_Conic_2SP&quot;, AUTHORITY[&quot;EPSG&quot;,&quot;9802&quot;]],
PARAMETER[&quot;central_meridian&quot;, 3.0],
PARAMETER[&quot;latitude_of_origin&quot;, 48.0],
PARAMETER[&quot;standard_parallel_1&quot;, 48.75],
PARAMETER[&quot;false_easting&quot;, 1700000.0],
PARAMETER[&quot;false_northing&quot;, 7200000.0],
PARAMETER[&quot;scale_factor&quot;, 1.0],
PARAMETER[&quot;standard_parallel_2&quot;, 47.25],
UNIT[&quot;m&quot;, 1.0],
AXIS[&quot;Easting&quot;, EAST],
AXIS[&quot;Northing&quot;, NORTH],
AUTHORITY[&quot;EPSG&quot;,&quot;3948&quot;]]</nativeCRS>
<srs>EPSG:3948</srs>
<nativeBoundingBox>
<minx>1330480.79</minx>
<maxx>1367764.47</maxx>
<miny>7203359.51</miny>
<maxy>7245689.87</maxy>
<crs class="projected">EPSG:3948</crs>
</nativeBoundingBox>
<latLonBoundingBox>
<minx>-1.9847676697277132</minx>
<maxx>-1.4500795551081656</maxx>
<miny>47.92352358319282</miny>
<maxy>48.32403569744555</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<enabled>true</enabled>
<metadata>
<entry key="JDBC_VIRTUAL_TABLE">
<virtualTable>
<name>commune</name>
<sql>SELECT * FROM cadastre_qgis.geo_commune
</sql>
<escapeSql>false</escapeSql>
<geometry>
<name>geom</name>
<type>MultiPolygon</type>
<srid>3948</srid>
</geometry>
</virtualTable>
</entry>
<entry key="cacheAgeMax">86400</entry>
<entry key="cachingEnabled">true</entry>
</metadata>
<store class="dataStore">
<id>DataStoreInfoImpl-27ef7aa:16b20f027ab:-7525</id>
</store>
<maxFeatures>0</maxFeatures>
<numDecimals>0</numDecimals>
<overridingServiceSRS>false</overridingServiceSRS>
<skipNumberMatched>false</skipNumberMatched>
<circularArcPresent>false</circularArcPresent>
</featureType>
15 changes: 15 additions & 0 deletions geoserver-workspace/ref_cad/bdu.cadastre_qgis/commune/layer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<layer>
<name>commune</name>
<id>LayerInfoImpl--8165de6:16ccbdcefde:4bf1</id>
<type>VECTOR</type>
<defaultStyle>
<id>StyleInfoImpl--8165de6:16ccbdcefde:6df3</id>
</defaultStyle>
<resource class="featureType">
<id>FeatureTypeInfoImpl--8165de6:16ccbdcefde:4bf0</id>
</resource>
<attribution>
<logoWidth>0</logoWidth>
<logoHeight>0</logoHeight>
</attribution>
</layer>
23 changes: 23 additions & 0 deletions geoserver-workspace/ref_cad/bdu.cadastre_qgis/datastore.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<dataStore>
<id>DataStoreInfoImpl-27ef7aa:16b20f027ab:-7525</id>
<name>bdu.cadastre_qgis</name>
<description>bdu.cadastre_qgis</description>
<type>PostGIS (JNDI)</type>
<enabled>true</enabled>
<workspace>
<id>WorkspaceInfoImpl-d47db26:147ed8b249c:-7ffe</id>
</workspace>
<connectionParameters>
<entry key="dbtype">postgis</entry>
<entry key="encode functions">false</entry>
<entry key="jndiReferenceName">java:comp/env/jdbc/bdu</entry>
<entry key="Support on the fly geometry simplification">true</entry>
<entry key="namespace">https://mongeorchestra.fr/ref_cad</entry>
<entry key="schema">cadastre_qgis</entry>
<entry key="Loose bbox">true</entry>
<entry key="Expose primary keys">false</entry>
<entry key="preparedStatements">false</entry>
<entry key="Estimated extends">true</entry>
</connectionParameters>
<__default>false</__default>
</dataStore>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<featureType>
<id>FeatureTypeInfoImpl-27ef7aa:16b227faaf5:33ca</id>
<name>geo_batiment</name>
<nativeName>geo_batiment</nativeName>
<namespace>
<id>NamespaceInfoImpl-d47db26:147ed8b249c:-7ffd</id>
</namespace>
<title>geo_batiment</title>
<abstract>geo_batiment&#xd;
Bâtiments du cadastre&#xd;
&#xd;
Couche utilisée par les aggrégats cadastre et cadastre_nb.&#xd;
Ne devrait pas être visible.</abstract>
<keywords>
<string>geo_batiment</string>
<string>features</string>
</keywords>
<nativeCRS class="projected">PROJCS[&quot;RGF93 / CC48&quot;,
GEOGCS[&quot;RGF93&quot;,
DATUM[&quot;Reseau Geodesique Francais 1993&quot;,
SPHEROID[&quot;GRS 1980&quot;, 6378137.0, 298.257222101, AUTHORITY[&quot;EPSG&quot;,&quot;7019&quot;]],
TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
AUTHORITY[&quot;EPSG&quot;,&quot;6171&quot;]],
PRIMEM[&quot;Greenwich&quot;, 0.0, AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
UNIT[&quot;degree&quot;, 0.017453292519943295],
AXIS[&quot;Geodetic longitude&quot;, EAST],
AXIS[&quot;Geodetic latitude&quot;, NORTH],
AUTHORITY[&quot;EPSG&quot;,&quot;4171&quot;]],
PROJECTION[&quot;Lambert_Conformal_Conic_2SP&quot;, AUTHORITY[&quot;EPSG&quot;,&quot;9802&quot;]],
PARAMETER[&quot;central_meridian&quot;, 3.0],
PARAMETER[&quot;latitude_of_origin&quot;, 48.0],
PARAMETER[&quot;standard_parallel_1&quot;, 48.75],
PARAMETER[&quot;false_easting&quot;, 1700000.0],
PARAMETER[&quot;false_northing&quot;, 7200000.0],
PARAMETER[&quot;scale_factor&quot;, 1.0],
PARAMETER[&quot;standard_parallel_2&quot;, 47.25],
UNIT[&quot;m&quot;, 1.0],
AXIS[&quot;Easting&quot;, EAST],
AXIS[&quot;Northing&quot;, NORTH],
AUTHORITY[&quot;EPSG&quot;,&quot;3948&quot;]]</nativeCRS>
<srs>EPSG:3948</srs>
<nativeBoundingBox>
<minx>1330547.0</minx>
<maxx>1367540.75</maxx>
<miny>7203583.0</miny>
<maxy>7245331.5</maxy>
<crs class="projected">EPSG:3948</crs>
</nativeBoundingBox>
<latLonBoundingBox>
<minx>-1.9835649314787318</minx>
<maxx>-1.4532421987448043</maxx>
<miny>47.925567810095814</miny>
<maxy>48.32070110437251</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<enabled>true</enabled>
<advertised>false</advertised>
<metadata>
<entry key="cacheAgeMax">2592000</entry>
<entry key="cachingEnabled">true</entry>
</metadata>
<store class="dataStore">
<id>DataStoreInfoImpl-27ef7aa:16b20f027ab:-7525</id>
</store>
<maxFeatures>0</maxFeatures>
<numDecimals>0</numDecimals>
<overridingServiceSRS>false</overridingServiceSRS>
<skipNumberMatched>false</skipNumberMatched>
<circularArcPresent>false</circularArcPresent>
</featureType>
Loading