r.in.poly(1)

πŸ’– r.in.poly β€” the GRASS GIS manual, but make it a group chat πŸ’–

okay bestie, so r.in.poly is the GRASS GIS tool that turns your lil ASCII files full of polygons, lines and points into actual raster maps. it's giving import, it's giving raster. let's go ✨


✨ NAME ✨

r.in.poly β€” creates raster maps from ASCII polygon/line/point data files. no cap, that's literally the whole job πŸŽ€


πŸ”‘ KEYWORDS πŸ”‘

raster, import


🌸 SYNOPSIS 🌸

r.in.poly
r.in.poly --help
r.in.poly input=name output=name  [title=phrase]   [type=string]
[null=integer]   [rows=integer]   [--overwrite]  [--help]  [--verbose]
[--quiet]  [--ui]

🫢 Flags:

  • --overwrite β€” allow output files to overwrite existing files (she's bold, she's fearless πŸ’…)
  • --help β€” print usage summary
  • --verbose β€” verbose module output (she talks a LOT and we love that)
  • --quiet β€” quiet module output (she's in her silent era 🀫)
  • --ui β€” force launching GUI dialog

πŸ¦‹ Parameters:

  • input=name [required] β€” name of input file; or - to read from stdin
  • output=name [required] β€” name for output raster map
  • title=phrase β€” title for resultant raster map
  • type=string β€” type of raster map to be created. storage type for resultant raster map. options: CELL, FCELL, DCELL. default: CELL
    • CELL: Integer
    • FCELL: Single precision floating point
    • DCELL: Double precision floating point
  • null=integer β€” integer representing NULL value data cell
  • rows=integer β€” number of rows to hold in memory. default: 4096

🌈 DESCRIPTION 🌈

so basically, r.in.poly lets you create GRASS binary raster maps out of ASCII files sitting in your current directory, and those files can hold polygon features, linear features, and point features. iconic versatility honestly ✨

the input file is an ASCII text file containing the polygon, linear, and point feature definitions. the format of this file is described in the INPUT FORMAT section below β€” keep scrolling bestie πŸ‘‡

the number of raster rows to hold in memory is per default 4096. this parameter lets users with less memory (or more) on their system control how much memory r.in.poly uses. usually the default value is fine, so like... don't overthink it πŸ’–


πŸ“ NOTES πŸ“

the data will be imported using the current region settings to set the new raster map's bounds and resolution. any features falling outside the current region will be cropped β€” yes, cropped, gone, bye πŸ‘‹ so watch out. the region settings are controlled with the g.region module.

the format is a simplified version of the standard GRASS vector ASCII format used by v.in.ascii.

polygons are filled, i.e. they define an area. no hollow shapes here, she's full, she's solid, she ate πŸ”₯

πŸŽ€ Input Format πŸŽ€

the input format for the input file consists of sections describing either polygonal areas, linear features, or point features. the basic format is:

A                      <for polygonal areas>
    easting northing
    .
    .
    .
=   cat# label
L                      <for linear features>
    easting northing
    .
    .
    .
=   cat# label
P                      <for single cell point features>
    easting northing
=   cat# label

okay so let's break it down:

the A signals the beginning of a filled polygon. it must appear in the first column β€” first column only, she's strict about that πŸ’…

the L signals the beginning of a linear feature. it also must appear in the first column.

the P signals the beginning of a single cell point feature. again, it must appear in the first column.

the coordinates of the vertices of the polygon, or the coordinates defining the linear or point feature, follow β€” and they must have a space in the first column and at least one space between the easting and the northing. spacing matters, bestie, don't skip leg day 🦡

to give meaning to the features, the = indicates that the feature currently being processed has category value cat# (which must be an integer) and a label (which may be more than one word, or which may be omitted).


⭐ EXAMPLE ⭐

an area described by four points:

A
  591316.80   4926455.50
  591410.25   4926482.40
  591434.60   4926393.60
  591341.20   4926368.70
= 42 stadium

look at her. four points. one stadium. 42 as the category. chef's kiss πŸ‘‘πŸŸοΈ


πŸ’œ SEE ALSO πŸ’œ

r.colors, d.rast.edit, g.region, r.in.xyz, r.patch, v.in.ascii, wxGUI vector digitizer


πŸ‘‘ AUTHOR πŸ‘‘

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory


🧚 SOURCE CODE 🧚

available at: r.in.poly source code (history)

accessed: Saturday Jan 17 05:40:48 2026

main index | raster index | topics index | keywords index | graphical index | full index


and that's the whole page, bestie 🫢 this was GRASS GIS 8.4.2, documented in the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team β€” and the source says it was accessed Saturday Jan 17 05:40:48 2026. slay, read responsibly, and go make some polygons πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from