GRASS GIS provides converters for importing ESRI shapefiles, e00 files, and many other GIS formats as well. The key GRASS modules for importing vector formats are v.in.ogr (for ESRI Shapefiles, MapInfo files, SDTS, TIGER, etc.) and v.in.e00 for e00 format. For raster data, there is r.in.gdal. The GRASS data structure requires that each data layer have its CRS exactly defined. This is done by maintaining data layers within a 'Location'. Each Location has a strictly defined projection, and datum, and all the data layers (raster and vector) within that location should already be either created in or projected to that CRS. GRASS does not do 'on-the-fly' reprojection to avoid often encountered in other GIS software with datum mismatches. Consequently, data layers in one location are not visible from other locations. However, GRASS does supply a collection of tools for projecting vector and raster layers from one location to another. Use of these tools is explained in the projectionintro. This is the syntax for v.in.ogr in its most basic form. The dsn parameter corresponds to the directory path of the vector you are trying to import. You can enter a full or relative path. The output paramter, aptly enough, is the name of your output Grass vector. The layer parameter is the name of the input vector, be it shapefile, MapInfo file, or what have you. Shapefiles can only hold one type of data (point, line, polygon) per shapefile. You can't export a GRASS vector map with both points and areas to a single shapefile. You'll have to do it in two passes to two different files with v.out.ogr and different 'type=' parameters. Export lines from GRASS vector map to Shapefile format (generates /tmp/testogr.shp and related files): Export areas from GRASS vector map to Shapefile format (generates /tmp/testogr.shp and related files): The trick is to convert the raster coverage to vector areas to take advantage of GRASS's rich vector attribute/database tie-ins. You can use r.in.gdal for the import. You can link data instead of importing them, use r.external, v.external, r.external.out, and v.external.out. Projection of all data must be consistent. Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 22, 2016 @ 9:02 pm