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 is input.
  • extent=string β€” Output vector map extent.
    • Options: input, region
    • Default: input
    • input: extent of input map
    • region: extent of current region
  • 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
  • epsg=integer β€” EPSG projection code.
    • Options: 1-1000000
  • datum_trans=integer β€” Index number of datum transform parameters. -1 lists the available datum transform parameters.
    • Options: -1-100

🌈 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