Changes between Version 1 and Version 2 of CLC Join


Ignore:
Timestamp:
May 27, 2010 5:08:35 PM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TabularUnified CLC Join

    v1 v2  
    11= This page describes the join of ccm21.catchments with the clc = 
     2 
     3{{{ 
     4-- Un essai sur la Bretagne pour voir 
     5DROP TABLE IF EXISTS clc.clipped_bretagne; 
     6CREATE TABLE clc.clipped_bretagne AS 
     7SELECT intersected.clcgid, intersected.gid, clipped_geom 
     8FROM (SELECT clc.gid as clcgid, c.gid, ST_Intersection(clc.the_geom, c.the_geom) AS clipped_geom 
     9        FROM  clc.clc00_v2_europe clc INNER JOIN ccm21.catchments c 
     10        ON  ST_Intersects (c.the_geom,clc.the_geom) 
     11        WHERE c.wso_id IN (SELECT wso_id FROM france.wso WHERE area='Bretagne') 
     12        AND substring(code_00 from 1 for 1)='1')  AS intersected;--3721 lines    
     13ALTER TABLE clc.clipped_bretagne add column id serial PRIMARY KEY; 
     14-- ajout dans la table geometry_columns pour référencement rapide sous Qgis 
     15INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") 
     16SELECT '', 'clc', 'clipped_bretagne', 'the_geom', ST_CoordDim(clipped_geom), ST_SRID(clipped_geom), GeometryType(clipped_geom) 
     17FROM clc.clipped_bretagne  LIMIT 1; 
     18}}}