[winGRASS] Importing ArcView shape files & GRASS's file system

Glynn Clements glynn.clements at virgin.net
Fri Jun 20 21:26:42 EDT 2003


Andrew Callan wrote:

> I'm an intern for the City of South Bend who uses ArcView but I will be
> using GRASS for SIPA who I will be interning with next semester and my
> boss now was also intrigued by the package so he has me playing with it
> and my question seems to be on a popular topic, when I tried to import
> an ArcView shape file everything appeared to work, no error message or
> anything, but I could not locate the the file by the name I specified
> the output to be anywhere.  Any insights into winGRASS's file system
> would also be appreciated, obviously I can put the .shp file to be
> imported in my cygwin folder and give an absolute file path to it but if
> I want it to show up in the g.list listing what folders specifically
> does it need to be in, I think I ended up putting it in about 4
> different folders and then it worked.....Links to any tutorials and
> either of these topics would be greatly appreciated as a response if any
> are available.

You shouldn't need to know anything about how GRASS' data is stored
internally. Normally, when you import the file, you provide a pathname
to the file and a name for the new map. The chosen map name will be
used for all GRASS operations. The file to be imported can reside
anywhere.

For the record, the files are stored in subdirectories of the database
path which is specified in the GRASS startup screen. The layout is:

	DATABASE/LOCATION/MAPSET/COMPONENT/MAPNAME

where:

DATABASE is the root of the GRASS database.

LOCATION is the location name (e.g. "spearfish").

MAPSET is the mapset (all locations have a PERMANENT mapset, plus as
many other mapsets as you wish; the PERMANENT mapset should be
considered read-only, and should never be selected as the current
mapset in the startup screen).

These three values are specified in the startup screen. The others
are:

COMPONENT corresponds to the type of data. Most maps consist of
several components; e.g. a raster map typically has a header in the
"cellhd" directory, the raster data in either the "cell" (integer) or
"fcell" (floating-point) directories, a colour table in the "colr"
directory, etc.

MAPNAME is the name of the map. The various data files which comprise
a map all have the same name as the map.

E.g. if the database path was /opt/grass-data, for the "soils" raster
map in the spearfish dataset, the header (containing the geographic
region and resolution) would be in the file:

	/opt/grass-data/spearfish/PERMANENT/cellhd/soils

the actual raster data would be in

	/opt/grass-data/spearfish/PERMANENT/cell/soils

and so on.

However, you shouldn't normally have to manipulate these files
directly. Doing so may have undesirable consequences. E.g. if you
generate a reclass map, then delete or rename the base map manually,
the reclass map will no longer work; OTOH, if you try to delete the
base map with g.remove, it will tell you about any other maps which
depend upon it.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-windows mailing list