3liz / QgisCadastrePlugin

A QGIS plugin which helps users to import the french land registry ('cadastre') data into a database. It is meant to ease the use of the data in QGIS by providing search tools and appropriate layer symbology.
GNU General Public License v2.0
61 stars 41 forks source link

edigeo_create_table_parcelle_info_simple.sql #138

Closed oznerol2 closed 5 years ago

oznerol2 commented 6 years ago

Bonjour,

il semblerait que le champ de geo_commune de la table geo_commune ne contienne que 9 caractères et non 10?

INSERT INTO [PREFIXE]parcelle_info SELECT gp.ogc_fid AS ogc_fid, geo_parcelle, gp.idu AS idu, gp.tex AS tex, gp.geo_section AS geo_section, c.tex2 AS nomcommune, c.idu AS codecommune, Cast(ST_Area(gp.geom) AS integer) AS surface_geo, gp.lot AS lot, gp.geom AS geom FROM [PREFIXE]geo_parcelle gp INNER JOIN [PREFIXE]geo_commune c --LCH 9 characters vs 10 ON c.geo_commune = SUBSTRING(gp.geo_parcelle,1,9)

mdouchin commented 6 years ago

Normalement, il contient 10 caractères

4 (année) +2 (département) +1 (direction) +3 (code commune à 3 chiffres) = 10

MaelREBOUX commented 5 years ago

Bonjour @oznerol2

Puis-je fermer ce ticket ?