NAME
v.in.shape - Read an ArcView Shapefile
(GRASS Vector Program)
SYNOPSIS
v.in.shape
v.in.shape[.pg] [-l][-r][-p] in=name [mapset=name]
[verbose=debug level] [logfile=name]
[snapdist=snap distance]
[sliver=min. angle] [scale=orig.
scale] [attribute=attribute category]
[label=category label]
DESCRIPTION
The v.in.shape program is designed to import ArcView Shapefiles.
v.in.shape will be run non-interactively if the user specifies
program arguments on the command line. Alternately, the user can simply type:
v.in.shape or v.in.shape.pg
on the command line without program arguments. In this
case, the user will be prompted for parameter values using the standard
GRASS user interface described in the manual entry for parser.
FEATURES
Grass files created have the name extracted from the basename
of the shapefile.
The import filter attempts to correct some common errors
that are frequently met with in shapefiles.
OPTIONS
Flags:
- -l
- List the fields contained in the DBF file associated with the
input shapefile, then exit.
- -r
- Create a reject lines file. During import some lines are not
imported for a variety of reasons.
- -p
- Dump the fields of the shapefile from DBF to a postgres table.
*NOTE: This option is only available with v.in.shape.pg
Parameters:
- input=filename
- Name of input shape file. Provide a full path name or the name
of a file in the current directory. Any of the full pathname, basename,
or prefix only will suffice.
- verbose=integer
- Number between 0 (no trace of what's happening) and 9 (very verbose log).
Name of file where log info will be written. By default log info are directed to
stderr.
- snapdist=fp-number
- A grid resolution can be defined within which adjacent vertices will snap.
Note:The vertices do not snap to the grid. All
the vertices inside a grid cell snap to one of their number (usually the
first). This value defaults to 1.0e-10 ground units. In fact, it
will never allow a value that is less.
- sliver=fp-number
- A minimum angle can be defined for one link to subtend others at
a given node. If the angle between two lines is less than this, they will
be treated as colinear. This can be useful as the module now has features
which attempt to correct some common topological errors that occur in the
immediate vicinity of nodes. If you can be confident that true angles
between adjacent arcs radiating from the same node cannot be less than a
certain value, you can specify that value here, and some errors may be
automatically corrected. This defaults to .0001 degrees. In fact it will
never allow a value that is less.
- scale=integer
- This sets an original scale that will be specified in the header of the
vector map file produced. It can be edited later with v.digit.
The value defaults to 1:2400
- attribute=name
- Name of the input field to use as the category number in dig_att.
Defaults to using the record ID number as a category value if no value
is assigned or a non-numeric field is given. If the field is floating-point
the value is rounded to the nearest integer.
- label=name
- Name of the input field to use as the category label in dig_cats. Only
writes out results if a meaningful category field is given, otherwise no action
is taken. If the same attribute is re-assigned a new category, the value is
over-written.
BUGS AND CAVEAT
There is no support for projection.
Multipatch data is not yet supported. Point data (sites)
also is not handled by this module. New module s.in.shape imports
site data.
Resource hog. The filtration process uses a lot of memory
in large files. The size of files that can be imported sufficiently depends
on the resources of the local system, but performance degrades rapidly
when you go into swap. On a system with 128MB physical RAM, files of up
to 4000 polygons are typically imported easily.
Area and perimeter fields in input data may no longer
be quite correct if the lines have been adjusted to correct topology problems.
SEE ALSO
m.in.e00,
g.mapsets,
g.region,
v.digit,
v.proj,
s.in.shape,
v.support,
v.to.rast,
v.out.shape
AUTHORS
Frank Warmerdam (warmerda@home.com)
Based on Shapelib (http://gdal.velocet.ca/projects/shapelib/).
Markus Neteler
added category support
David Gray
preprocessing to provide correct handling of polygon
edges, labels and correction of some topological errors. Also some new
options q.v.