GRASS LOCATIONのインポート

提供: OSGeo.JP Wiki
2009年8月18日 (火) 14:21時点におけるKayama (トーク | 投稿記録)による版

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索

Importing data into a GRASS LOCATION

This Section gives an example how to import raster and vector data into the alaska GRASS LOCATION provided by the QGIS alaska dataset. Therefore we use a landcover raster map landcover.img and a vector GML File lakes.gml from the QGIS alaska dataset #label_sampledata</A>. <P>

  1. Start QGIS and make sure the GRASS plugin is loaded.
  2. In the GRASS toolbar, click the grass_open_mapsetOpen MAPSET icon to bring up the MAPSET wizard.
  3. Select as GRASS database the folder grassdata in the QGIS alaska dataset, as LOCATION alaska, as MAPSET demo and click OK.
  4. Now click the grass_toolsOpen GRASS tools icon. The GRASS Toolbox (see Section 9.9) dialog appears.
  5. To import the raster map landcover.img, click the module r.in.gdal in the Modules Tree tab. This GRASS module allows to import GDAL supported raster files into a GRASS LOCATION. The module dialog for r.in.gdal appears.
  6. Browse to the folder raster in the QGIS alaska dataset and select the file landcover.img.
  7. As raster output name define landcover_grass and click Run. In the Output tab you see the currently running GRASS command r.in.gdal -o input=/path/to/landcover.img output=landcover_grass.
  8. When it says Succesfully finished click View output. The landcover_grass raster layer is now imported into GRASS and will be visualized in the QGIS canvas.
  9. To import the vector GML file lakes.gml, click the module v.in.ogr in the Modules Tree tab. This GRASS module allows to import OGR supported vector files into a GRASS LOCATION. The module dialog for v.in.ogr appears.
  10. Browse to the folder gml in the QGIS alaska dataset and select the file lakes.gml as OGR file.
  11. As vector output name define lakes_grass and click Run. You don't have to care about the other options in this example. In the Output tab you see the currently running GRASS command v.in.ogr -o dsn=/path/to/lakes.gml output=lakes_grass.
  12. When it says Succesfully finished click View output. The lakes_grass vector layer is now imported into GRASS and will be visualized in the QGIS canvas.
<P>