Changes between Version 28 and Version 29 of Cookbook CCM21_France


Ignore:
Timestamp:
Jul 27, 2010 3:24:03 PM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Cookbook CCM21_France

    v28 v29  
    112112CREATE INDEX index_riversegments_france ON ccm21.riversegments_france 
    113113  USING GIST ( the_geom GIST_GEOMETRY_OPS );  
     114}}} 
    114115 
     116{{{ 
     117-- creating a table for catchments france 
     118DROP TABLE IF EXISTS ccm21.catchments_france;    
     119CREATE TABLE  ccm21.catchments_france AS 
     120SELECT * FROM ccm21.catchments 
     121WHERE wso_id IN (SELECT wso_id FROM france.wso WHERE area='france');  
     122                
     123ALTER TABLE ccm21.catchments_france ADD CONSTRAINT c_pk_gid_catchments_france PRIMARY KEY  (gid); 
     124INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") 
     125SELECT '', 'ccm21', 'catchments_france', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom) 
     126FROM ccm21.catchments_france LIMIT 1; 
     127 
     128alter table ccm21.catchments_france add CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2); 
     129alter table ccm21.catchments_france add    CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL); 
     130alter table ccm21.catchments_france add  CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 3035); 
     131CREATE INDEX index_catchments_france ON ccm21.catchments_france 
     132  USING GIST ( the_geom GIST_GEOMETRY_OPS );  
     133CREATE INDEX indexcatchmentsfrance_wso1_id 
     134  ON ccm21.catchments 
     135  USING btree 
     136  (wso1_id); 
    115137}}}