Changes between Version 17 and Version 18 of BDCarthage2011 into eda2.0_RHT


Ignore:
Timestamp:
Sep 28, 2011 4:47:11 PM (14 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BDCarthage2011 into eda2.0_RHT

    v17 v18  
    131131C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -c -g the_geom -W LATIN1 -I clip_troncon.shp clip_troncon > clip_troncon.sql  
    132132C:\"Program Files"\PostgreSQL\8.4\bin\psql -d eda2.0_RHT -h localhost -U postgres -p 5432 -f clip_troncon.sql  
    133 alter table clip_troncon set schema rht; 
    134133 
     134Alter table clip_troncon set schema rht; 
     135DROP TABLE IF EXISTS bd_carthage2011.troncon_bv;    
     136CREATE TABLE  bd_carthage2011.troncon_bv AS 
     137    select bdc.* from bd_carthage2011.troncon_hydrographique bdc, rht.clip_troncon as clip where st_contains(clip.the_geom,bdc.the_geom)=true; 
     138ALTER TABLE bd_carthage2011.troncon_bv ADD CONSTRAINT pk_id_bdcarth_bv PRIMARY KEY  (gid); 
     139INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") 
     140SELECT '', 'bd_carthage2011', 'troncon_bv', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom) 
     141FROM bd_carthage2011.troncon_bv LIMIT 1; 
    135142 
     143DROP TABLE IF EXISTS rht.rht_bv;    
     144CREATE TABLE  rht.rht_bv AS 
     145    SELECT r.* FROM rht.rht r, rht.clip_troncon as clip where st_contains(clip.the_geom,r.the_geom)=true; 
     146ALTER TABLE rht.rht_bv ADD CONSTRAINT pk_id_drain_rht_bv PRIMARY KEY  (id_drain); 
     147INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") 
     148SELECT '', 'rht', 'rht_bv', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom) 
     149FROM rht.rht_bv LIMIT 1; 
    136150 
    137151}}}