Changes between Version 81 and Version 82 of CLC Join
- Timestamp:
- Jun 4, 2010 5:08:06 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CLC Join
v81 v82 928 928 [[Image(source:data/Docs/trac/clc/clipped.png,600px)]] [[BR]] 929 929 {{{ 930 #!sql 930 931 CREATE TABLE clc.remaining_catchment AS( 931 932 SELECT * FROM ccm21.catchments where gid in( … … 934 935 935 936 ); 936 }}} 937 938 939 937 ALTER TABLE clc.remaining_catchment add CONSTRAINT c_pk_id_remaining_catchment PRIMARY KEY (gid); 938 alter table clc.remaining_catchment add CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2); 939 alter table clc.remaining_catchment add CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL); 940 alter table clc.remaining_catchment add CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 3035); 941 }}} 942 943 944 Using ST_intersection has suppressed the polygons outside catchment 940 945 [[Image(source:data/Docs/trac/clc/clipped_and_catchment.png,600px)]] [[BR]] 946 Remaining catchmentsis the table of the catchment not already processed 941 947 [[Image(source:data/Docs/trac/clc/remaining_catchment.png,600px)]] [[BR]] 948 It is a little bit too large to process as one unit 942 949 [[Image(source:data/Docs/trac/clc/remaining_catchment2.png,600px)]] [[BR]] 950 {{{ 951 #!sql 952 -- remaining catchments intersecting with france in a table for Qgis 953 CREATE TABLE clc.remaining_catchment_france AS( 954 SELECT * FROM clc.remaining_catchment WHERE wso1_id IN ( 955 SELECT wso1_id FROM clc.remaining_catchment crc JOIN france.departement fd 956 ON ST_Intersects(crc.the_geom,fd.the_geom)) 957 ); 958 ALTER TABLE clc.remaining_catchment_france add CONSTRAINT c_pk_id_remaining_catchment_france PRIMARY KEY (gid); 959 alter table clc.remaining_catchment_france add CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2); 960 alter table clc.remaining_catchment_france add CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL); 961 alter table clc.remaining_catchment_france add CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 3035); 962 }}} 963 943 964 {{{ 944 965 #!html