r.in.poly(1grass)

πŸŽ€ r.in.poly β€” NAME πŸŽ€

okay so bestie, meet r.in.poly, a whole icon from the GRASS User's Manual πŸ’… she makes raster maps out of ASCII polygon / line / point data files, and honestly? she eats every single time ✨


πŸ”‘ KEYWORDS πŸ”‘

raster, import πŸ¦‹


🌈 SYNOPSIS 🌈

here's the whole vibe, verbatim, no notes:

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 β€” let the output files just bulldoze whatever's already there. existing files? gone. permission granted to overwrite 🫢
  • --help β€” prints the usage summary, aka the "what does this do again" button πŸ™ˆ
  • --verbose β€” verbose module output, she will yap (affectionately) πŸ’¬
  • --quiet β€” quiet module output. shhh. no talking. only vibes 🀫
  • --ui β€” forces the GUI dialog to launch, for when you want the pretty window instead of the terminal πŸͺŸβœ¨

🧚 Parameters 🧚

  • input=name [required] β€” name of the input file, or - to read from stdin (yes bestie, you can pipe it in, main character behavior) πŸ’œ
  • output=name [required] β€” the name for the output raster map, choose wisely, this is her name forever πŸ‘‘
  • title=phrase β€” a title for the resultant raster map πŸ“
  • type=string β€” the type of raster map to be created. more specifically: the storage type for the resultant raster map.
    • Options: CELL, FCELL, DCELL
    • Default: CELL
    • CELL: Integer πŸ”’
    • FCELL: Single precision floating point 🌸
    • DCELL: Double precision floating point ✨
  • null=integer β€” the integer that represents NULL value data cell. so like, the "nobody's home" number πŸ•³οΈ
  • rows=integer β€” number of rows to hold in memory
    • Default: 4096 πŸ’Ύ

πŸ’– DESCRIPTION πŸ’–

r.in.poly lets you create GRASS binary raster maps from ASCII files sitting in the current directory that contain polygon, linear, and point features. that's her whole thing. she's very good at it 🫢

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 β€” yes, keep scrolling, it's right there 🌸

The number of raster rows to hold in memory is per default 4096. this parameter is literally here so that users with less memory (or more, no judgment, we love a beefy machine πŸ’») on their system can control how much memory r.in.poly uses. usually the default value is fine. it's fine. everything's fine ✨


πŸ“ 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. the region settings are controlled with the g.region module β€” that's the girl who runs the boundaries around here πŸ‘‘

The format is a simplified version of the standard GRASS vector ASCII format used by v.in.ascii. so like, v.in.ascii's chill younger sister πŸ¦‹

Polygons are filled, i.e. they define an area. she does not do outlines, she does the whole thing πŸ’…

πŸ“„ 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

The A signals the beginning of a filled polygon. It must appear in the first column. 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. πŸ‘€ first column. always. no negotiating.

The coordinates of the vertices of the polygon, or the coordinates defining the linear or point feature follow, and must have a space in the first column and at least one space between the easting and the northing. yes, the whitespace is load-bearing 🌸

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). so the label is optional, she's flexible like that πŸ’–


πŸ“ 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

four points and a stadium. iconic. no cap 🏟️✨


πŸ‘€ 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 🫑 thank you for your service king


🌟 SOURCE CODE 🌟

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

Latest change: Friday Mar 07 07:39:48 2025 in commit: e1e37d87e78212dfcf4c97aaf32c54042adbd2b0 πŸ•°οΈ

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index


okay that's the whole page bestie, you're officially the moment πŸ’…

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual

GRASS 8.5.0 β€” r.in.poly(1grass) πŸŽ€ go make some maps, you've got this, fr fr πŸ’–βœ¨

πŸ“¦ where this page comes from