v.import(1)
π v.import β the GRASS GIS manual, but make it cute π
okay bestie, welcome to v.import(1), a page straight out of the GRASS GIS User's Manual. sit down, grab a boba, we're importing vector data today π¦
β¨ NAME β¨
v.import β imports vector data into a GRASS vector map using the OGR library, and reprojects on the fly. no cap. it's giving "just let me handle the CRS for you" energy.
πΈ KEYWORDS πΈ
vector, import, projection
π SYNOPSIS π
v.import
v.import --help
v.import [-flo] input=string [layer=string[,string,...]]
[output=name] [extent=string] [encoding=string] [snap=float]
[epsg=integer] [datum_trans=integer] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
π Flags
-fβ Lists all the supported OGR formats, then dips. π-lβ Lists the OGR layers that are actually available in the data source, then exits. icon behavior.-oβ Overrides the projection check (aka: use the current project's CRS instead). This means you're assuming the dataset has the same coordinate reference system (CRS) as the current project. big assumption, be careful π«Ά--overwriteβ Lets output files overwrite files that already exist.--helpβ Prints the usage summary. classic.--verboseβ Verbose module output, for when you want the full tea β--quietβ Quiet module output. shhh π€«--uiβ Forces the GUI dialog to launch.
π Parameters
input=string[required] β Name of the OGR datasource to be imported. yes this one is mandatory, no skipping πlayer=string[,string,...]β OGR layer name. If you don't give one, literally all the available layers get imported.output=nameβ Name for the output vector map. Default isinput.extent=stringβ Output vector map extent.- Options:
input,region - Default:
input input: extent of input mapregion: extent of current region
- Options:
encoding=stringβ Encoding value for attribute data.snap=floatβ Snapping threshold for boundaries, in map units. A suitable threshold gets estimated during import.- Default:
-1
- Default:
epsg=integerβ EPSG projection code.- Options:
1-1000000
- Options:
datum_trans=integerβ Index number of datum transform parameters.-1lists the available datum transform parameters.- Options:
-1-100
- Options:
π DESCRIPTION π
So here's the whole vibe: v.import imports vector data from files and database connections that the OGR library supports, straight into the current project (which used to be called a location, iykyk) and mapset.
If the coordinate reference system (CRS) of the input does not match the CRS of the project, the input gets reprojected into the current project. But if the input map's CRS does match the project's CRS? Then it just gets imported directly. easy peasy β¨
π¦ Supported Vector Formats
v.import rides on the OGR library, which supports a whole roster of vector data formats β including ESRI Shapefile, Mapinfo File, UK .NTF, SDTS, TIGER, IHO S-57 (ENC), DGN, GML, GPX, AVCBin, REC, Memory, OGDI, and PostgreSQL β depending on what your local OGR installation has going on. For the details, go look at the OGR web site.
The OGR (Simple Features Library) is part of the GDAL library, which means GDAL has to be installed for v.import to work at all. periodt.
The actual list of supported formats on your machine can be printed with the -f flag. π
π NOTES π
v.import checks the CRS metadata of the dataset you're importing against the CRS of the current project. If they're not identical, it hits you with a related error message. not mean, just honest π
To override this CRS check β i.e. to use the current project's CRS β by assuming the dataset has the same CRS as the current project, you can use the -o flag. This is also lowkey useful when the geodata you're importing doesn't contain any CRS metadata at all. But bestie, listen: the user must be sure that the CRS is identical in order to avoid introducing data errors. fr fr.
π§ Topology cleaning
When you're importing polygons, non-topological polygons get converted to topological areas. If the input polygons contain errors β unexpected overlapping areas, small gaps between polygons, or warnings about being unable to calculate centroids β you might need to repeat the import using a snap value, as suggested in the output messages. The default value of snap=-1 means that no snapping will be done.
The snap threshold defines the maximal distance from one vertex to another vertex, in map units (for latitude-longitude projects, that's in degrees). If there's no other vertex within the snap distance, no snapping happens. And heads up: a too large value can severely damage area topology, beyond repair. π like, un-fixable. be so serious with this number.
Post-processing: snapped boundaries may need to be cleaned with v.clean, using its tools break,rmdupl,rmsa. For the details, go read the v.clean manual page. π«Ά
β EXAMPLE β
# import SHAPE file at full extent and reproject to current project CRS
v.import input=research_area.shp output=research_area extent=input
look at her go π₯
π SEE ALSO π
v.clean, v.in.lines, v.in.ogr, v.proj
πΈ AUTHORS πΈ
Markus Metz
Improvements: Martin Landa, Anna Petrasova
π SOURCE CODE π
Available at: v.import source code (history)
Accessed: Saturday Jan 17 05:41:53 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
and that's the whole page, bestie π this was GRASS 8.4.2, page v.import(1), last touched Saturday Jan 17 05:41:53 2026. go import something iconic πβ¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms