Changes between Version 32 and Version 33 of WRBD


Ignore:
Timestamp:
Dec 3, 2010 10:36:33 AM (14 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WRBD

    v32 v33  
    248248}}} 
    249249 
     250{{{ 
     251DROP TABLE IF EXISTS wrbd.station_ccm_500; 
     252CREATE TABLE wrbd.station_ccm_500 as ( 
     253        SELECT distinct on (st_id ) st_id , gid, wso1_id, min(distance) as distance, the_geom FROM ( 
     254               SELECT st_id, gid , wso1_id, CAST(distance(r.the_geom, s.the_geom) as  decimal(15,1)) as distance,s.the_geom  
     255               FROM wrbd.station_st As s 
     256               INNER JOIN  ccm21.riversegments r ON ST_DWithin(r.the_geom, s.the_geom,500) 
     257               WHERE s.the_geom IS NOT NULL 
     258               ORDER BY st_id) AS sub  
     259        GROUP BY st_id, gid, wso1_id,  distance,the_geom 
     260); 
     261alter table wrbd.station_ccm_500 add column id serial; 
     262-- mise à jour de la table geometry_columns 
     263INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") 
     264SELECT '', 'wrbd', 'station_ccm_500', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom) 
     265FROM wrbd.station_ccm_500 LIMIT 1; 
     266}}} 
    250267 
    251268{{{