Changes between Version 23 and Version 24 of CLC download and load


Ignore:
Timestamp:
Jun 1, 2010 9:33:41 AM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CLC download and load

    v23 v24  
    1616   - Input Datasets : clc00_v2_code_111, clc00_v2_code_112,... 
    1717   - Output Dataset : change the directory if it's necessary and change the name of the shape file : clc00_v2_Europe_Merge.shp 
    18  
     18{{{ 
     19#!sql 
     20--- In sql editor  
     21CREATE SCHEMA CLC; 
     22}}} 
    1923{{{ 
    2024-- REM se placer dans le répertoire ou sont les données 
     
    2529 
    2630 
    27 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -c -g the_geom -I clc00_v2_code_111.shp clc00_v2_europe> clc00_v2_europe_111.sql 
    28 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_112.shp clc00_v2_europe> clc00_v2_europe_112.sql 
     31C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -c -g the_geom -I clc00_v2_code_111.shp clc.clc00_v2_europe> clc00_v2_europe_111.sql 
     32C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_112.shp clc.clc00_v2_europe> clc00_v2_europe_112.sql 
    2933 
    30 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_121.shp clc00_v2_europe> clc00_v2_europe_121.sql 
    31 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_122.shp clc00_v2_europe> clc00_v2_europe_122.sql 
    32 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_123.shp clc00_v2_europe> clc00_v2_europe_123.sql 
    33 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_124.shp clc00_v2_europe> clc00_v2_europe_124.sql 
     34C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_121.shp clc.clc00_v2_europe> clc00_v2_europe_121.sql 
     35C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_122.shp clc.clc00_v2_europe> clc00_v2_europe_122.sql 
     36C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_123.shp clc.clc00_v2_europe> clc00_v2_europe_123.sql 
     37C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_124.shp clc.clc00_v2_europe> clc00_v2_europe_124.sql 
    3438 
    35 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_131.shp clc00_v2_europe> clc00_v2_europe_131.sql 
    36 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_132.shp clc00_v2_europe> clc00_v2_europe_132.sql 
    37 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_133.shp clc00_v2_europe> clc00_v2_europe_133.sql 
     39C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_131.shp clc.clc00_v2_europe> clc00_v2_europe_131.sql 
     40C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_132.shp clc.clc00_v2_europe> clc00_v2_europe_132.sql 
     41C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_133.shp clc.clc00_v2_europe> clc00_v2_europe_133.sql 
    3842 
    39 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_141.shp clc00_v2_europe> clc00_v2_europe_141.sql 
    40 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_142.shp clc00_v2_europe> clc00_v2_europe_142.sql 
     43C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_141.shp clc.clc00_v2_europe> clc00_v2_europe_141.sql 
     44C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_142.shp clc.clc00_v2_europe> clc00_v2_europe_142.sql 
    4145 
    42 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_211.shp clc00_v2_europe> clc00_v2_europe_211.sql 
    43 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_212.shp clc00_v2_europe> clc00_v2_europe_212.sql 
    44 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_213.shp clc00_v2_europe> clc00_v2_europe_213.sql 
     46C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_211.shp clc.clc00_v2_europe> clc00_v2_europe_211.sql 
     47C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_212.shp clc.clc00_v2_europe> clc00_v2_europe_212.sql 
     48C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_213.shp clc.clc00_v2_europe> clc00_v2_europe_213.sql 
    4549 
    46 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_221.shp clc00_v2_europe> clc00_v2_europe_221.sql 
    47 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_222.shp clc00_v2_europe> clc00_v2_europe_222.sql 
    48 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_223.shp clc00_v2_europe> clc00_v2_europe_223.sql 
    49 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_231.shp clc00_v2_europe> clc00_v2_europe_231.sql 
     50C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_221.shp clc.clc00_v2_europe> clc00_v2_europe_221.sql 
     51C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_222.shp clc.clc00_v2_europe> clc00_v2_europe_222.sql 
     52C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_223.shp clc.clc00_v2_europe> clc00_v2_europe_223.sql 
     53C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_231.shp clc.clc00_v2_europe> clc00_v2_europe_231.sql 
    5054 
    51 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_241.shp clc00_v2_europe> clc00_v2_europe_241.sql 
    52 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_242.shp clc00_v2_europe> clc00_v2_europe_242.sql 
    53 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_243.shp clc00_v2_europe> clc00_v2_europe_243.sql 
    54 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_244.shp clc00_v2_europe> clc00_v2_europe_244.sql 
     55C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_241.shp clc.clc00_v2_europe> clc00_v2_europe_241.sql 
     56C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_242.shp clc.clc00_v2_europe> clc00_v2_europe_242.sql 
     57C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_243.shp clc.clc00_v2_europe> clc00_v2_europe_243.sql 
     58C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_244.shp clc.clc00_v2_europe> clc00_v2_europe_244.sql 
    5559 
    56 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_311.shp clc00_v2_europe> clc00_v2_europe_311.sql 
    57 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_312.shp clc00_v2_europe> clc00_v2_europe_312.sql 
    58 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_313.shp clc00_v2_europe> clc00_v2_europe_313.sql 
     60C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_311.shp clc.clc00_v2_europe> clc00_v2_europe_311.sql 
     61C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_312.shp clc.clc00_v2_europe> clc00_v2_europe_312.sql 
     62C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_313.shp clc.clc00_v2_europe> clc00_v2_europe_313.sql 
    5963 
    60 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_321.shp clc00_v2_europe> clc00_v2_europe_321.sql 
    61 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_322.shp clc00_v2_europe> clc00_v2_europe_322.sql 
    62 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_323.shp clc00_v2_europe> clc00_v2_europe_323.sql 
    63 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_324.shp clc00_v2_europe> clc00_v2_europe_324.sql 
     64C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_321.shp clc.clc00_v2_europe> clc00_v2_europe_321.sql 
     65C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_322.shp clc.clc00_v2_europe> clc00_v2_europe_322.sql 
     66C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_323.shp clc.clc00_v2_europe> clc00_v2_europe_323.sql 
     67C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_324.shp clc.clc00_v2_europe> clc00_v2_europe_324.sql 
    6468 
    65 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_331.shp clc00_v2_europe> clc00_v2_europe_331.sql 
    66 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_332.shp clc00_v2_europe> clc00_v2_europe_332.sql 
    67 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_333.shp clc00_v2_europe> clc00_v2_europe_333.sql 
    68 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_334.shp clc00_v2_europe> clc00_v2_europe_334.sql 
    69 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_335.shp clc00_v2_europe> clc00_v2_europe_335.sql 
     69C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_331.shp clc.clc00_v2_europe> clc00_v2_europe_331.sql 
     70C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_332.shp clc.clc00_v2_europe> clc00_v2_europe_332.sql 
     71C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_333.shp clc.clc00_v2_europe> clc00_v2_europe_333.sql 
     72C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_334.shp clc.clc00_v2_europe> clc00_v2_europe_334.sql 
     73C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_335.shp clc.clc00_v2_europe> clc00_v2_europe_335.sql 
    7074 
    71 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_411.shp clc00_v2_europe> clc00_v2_europe_411.sql 
    72 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_412.shp clc00_v2_europe> clc00_v2_europe_412.sql 
     75C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_411.shp clc.clc00_v2_europe> clc00_v2_europe_411.sql 
     76C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_412.shp clc.clc00_v2_europe> clc00_v2_europe_412.sql 
    7377 
    74 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_411.shp clc00_v2_europe> clc00_v2_europe_421.sql 
    75 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_412.shp clc00_v2_europe> clc00_v2_europe_422.sql 
    76 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_423.shp clc00_v2_europe> clc00_v2_europe_423.sql 
     78C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_411.shp clc.clc00_v2_europe> clc00_v2_europe_421.sql 
     79C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_412.shp clc.clc00_v2_europe> clc00_v2_europe_422.sql 
     80C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_423.shp clc.clc00_v2_europe> clc00_v2_europe_423.sql 
    7781 
    78 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_511.shp clc00_v2_europe> clc00_v2_europe_511.sql 
    79 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_512.shp clc00_v2_europe> clc00_v2_europe_512.sql 
     82C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_511.shp clc.clc00_v2_europe> clc00_v2_europe_511.sql 
     83C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_512.shp clc.clc00_v2_europe> clc00_v2_europe_512.sql 
    8084 
    81 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_521.shp clc00_v2_europe> clc00_v2_europe_521.sql 
    82 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_522.shp clc00_v2_europe> clc00_v2_europe_522.sql 
    83 C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_523.shp clc00_v2_europe> clc00_v2_europe_523.sql 
     85C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_521.shp clc.clc00_v2_europe> clc00_v2_europe_521.sql 
     86C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_522.shp clc.clc00_v2_europe> clc00_v2_europe_522.sql 
     87C:\"Program Files"\PostgreSQL\8.4\bin\shp2pgsql -s 3035 -a -g the_geom clc00_v2_code_523.shp clc.clc00_v2_europe> clc00_v2_europe_523.sql 
    8488}}} 
    8589 
     
    153157{{{ 
    154158#!sql 
    155 --- In sql editor  
    156 CREATE SCHEMA CLC; 
    157 ALTER TABLE clc00_v2_europe SET SCHEMA CLC; 
    158 --select SRID (the_geom) FROM clc.clc00_v2_europe; --3035 
    159 select count (*) from clc.clc00_v2_europe-- 2 070 962 
     159--select SRID (the_geom) FROM clc.clc.clc00_v2_europe; --3035 
     160select count (*) from clc.clc.clc00_v2_europe-- 2 070 962 
    160161}}} 
    161162 
     
    163164NO USE ! IT's ALREADY 3035 
    164165~~ 
    165 ALTER TABLE clc.clc00_v2_europe DROP CONSTRAINT enforce_srid_the_geom; 
    166 UPDATE clc.clc00_v2_europe SET the_geom = ST_transform(the_geom, 3035);  
    167 ALTER TABLE clc.clc00_v2_europe ADD CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035); 
     166ALTER TABLE clc.clc.clc00_v2_europe DROP CONSTRAINT enforce_srid_the_geom; 
     167UPDATE clc.clc.clc00_v2_europe SET the_geom = ST_transform(the_geom, 3035);  
     168ALTER TABLE clc.clc.clc00_v2_europe ADD CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 3035); 
    168169~~ 
    169170