Changes between Version 10 and Version 11 of CookBook join ROE_CCM


Ignore:
Timestamp:
Mar 15, 2010 10:19:39 PM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBook join ROE_CCM

    v10 v11  
    1919== We have to reproject our data == 
    2020== Select only the dams within France == 
     21=== Extract the data within the french boundaries === 
    2122this is ticket #45 
     23==== With !ArcGis ==== 
     24Use the french limits (see ["French boundaries"]) in RGF93[[BR]] 
     25In __!QuantumGis__, connect the ROE database and add the obstacle_referentiel layer[[BR]] 
     26Clic right on the layer "Sauvegarder comme shapefile" with Fichiers de type : Shapefiles (*.shp), Codage=UTF-8 > ok 
     27and choose "Système de coordonnées de référence" = RGF93/Lambert93 (because the french boundary layer is in this system).[[BR]] 
     28In __!ArcGis__, add the two layers :[[BR]] 
     29- ROE_EDA.shape[[BR]] 
     30- GEOFLADept_FR_Corse_AV_L93\DEPARTEMENT.shp[[BR]] 
     31Use Analysis Tools > Extract > Clip[[BR]] 
     32Input Features : ROE_EDA[[BR]] 
     33Clip Features : DEPARTEMENT[[BR]] 
     34 
     35If you want you can choose a "XY Tolerance", because some points in the ROE are in France but they are at the limit. 
     36(maybe 300meters?).[[BR]] 
     37 
     38==== With QGis ==== 
     39You have to reproject the data  
     40{{{ 
     41C:\OSGeo4W\bin\ogr2ogr -- help 
     42}}} 
     43gets : 
     44 
     45{{{ 
     46Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-gt n] 
     47               [-select field_list] [-where restricted_where] 
     48               [-sql <sql statement>] 
     49               [-spat xmin ymin xmax ymax] [-preserve_fid] [-fid FID] 
     50               [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def] 
     51               [-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...] 
     52               dst_datasource_name src_datasource_name 
     53               [-lco NAME=VALUE] [-nln name] [-nlt type] [layer [layer ...]] 
     54 
     55 -f format_name: output file format name, possible values are: 
     56     -f "ESRI Shapefile" 
     57     -f "MapInfo File" 
     58     -f "TIGER" 
     59     -f "S57" 
     60     -f "DGN" 
     61     -f "Memory" 
     62     -f "BNA" 
     63     -f "CSV" 
     64     -f "GML" 
     65     -f "GPX" 
     66     -f "KML" 
     67     -f "GeoJSON" 
     68     -f "Interlis 1" 
     69     -f "Interlis 2" 
     70     -f "GMT" 
     71     -f "SQLite" 
     72     -f "ODBC" 
     73     -f "PostgreSQL" 
     74     -f "MySQL" 
     75 -append: Append to existing layer instead of creating new if it exists 
     76 -overwrite: delete the output layer and recreate it empty 
     77 -update: Open existing output datasource in update mode 
     78 -select field_list: Comma-delimited list of fields from input layer to 
     79                     copy to the new layer (defaults to all) 
     80 -where restricted_where: Attribute query (like SQL WHERE) 
     81 -sql statement: Execute given SQL statement and save result. 
     82 -skipfailures: skip features or layers that fail to convert 
     83 -gt n: group n features per transaction (default 200) 
     84 -spat xmin ymin xmax ymax: spatial query extents 
     85 -dsco NAME=VALUE: Dataset creation option (format specific) 
     86 -lco  NAME=VALUE: Layer creation option (format specific) 
     87 -nln name: Assign an alternate name to the new layer 
     88 -nlt type: Force a geometry type for new layer.  One of NONE, GEOMETRY, 
     89      POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT, MULTILINE, 
     90      MULTIPOLYGON, or MULTILINESTRING.  Add "25D" for 3D layers. 
     91      Default is type of source layer. 
     92 -a_srs srs_def: Assign an output SRS 
     93 -t_srs srs_def: Reproject/transform to this SRS on output 
     94 -s_srs srs_def: Override source SRS 
     95 
     96 Srs_def can be a full WKT definition (hard to escape properly), 
     97 or a well known definition (ie. EPSG:4326) or a file with a WKT 
     98 definition. 
     99}}} 
     100write ogr2ogr -f formatdst_datasource_name src_datasource_name -a_srs <actual projection> -t_srs <reprojected data> 
     101Launch in ''' OSGeo4W command shell ''' 
     102{{{ 
     103CD C:\Documents and Settings\cedric\Mes documents\Migrateur\eda\couches_SIG\france 
     104C:\OSGeo4W\bin\ogr2ogr DEPARTEMENT_3035.shp DEPARTEMENT.shp -s_srs "EPSG:2154" -t_srs "EPSG:3035" 
     105}}} 
     106The shape file DEPARTEMENT_3035.shp is created with right projection 
     107Connect the ROE database and add this newly projected obstacle_referential layer [[BR]] 
     108Process  
     109Add the file GEOFLADept_FR_Corse_AV_L93\DEPARTEMENT.shp (layer>add a vector layer) [[BR]] 
     110Tools > Geoprocessing tools > Clip 
    22111== Build a view allowing to know the score of the different dams == 
    23112this is ticket #46