GRASS LOCATIONのインポート
提供: OSGeo.JP Wiki
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>
- Start QGIS and make sure the GRASS plugin is loaded.
- In the GRASS toolbar, click the grass_open_mapsetOpen MAPSET icon to bring up the MAPSET wizard.
- Select as GRASS database the folder grassdata in the QGIS alaska dataset, as LOCATION alaska, as MAPSET demo and click OK.
- Now click the grass_toolsOpen GRASS tools icon. The GRASS Toolbox (see Section 9.9) dialog appears.
- 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.
- Browse to the folder raster in the QGIS alaska dataset and select the file landcover.img.
- 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.
- 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.
- 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.
- Browse to the folder gml in the QGIS alaska dataset and select the file lakes.gml as OGR file.
- 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.
- 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.