You are here

GRASS Label Import

Introduction

The p.in.labels program is a simple import tool for converting XYZ files to GRASS label files. The Z column of the XYZ file is read as the GRASS label. The program reads the XYZ file from either standard input (stdin) or an existing ASCII file.

The standard GRASS label options are available including size, fontsize, offset, color, justification, and rotation.

Example

To import the following XYZ labels from labels.txt  into GRASS

572353.90 5406935.12 Label 1
579691.25 5423610.90 Label 2
601036.25 5421076.18 Station 5 — data description
601303.06 5435750.87 23

use the following command:

p.in.labels input=labels.txt output=label_file fontsize=8

d.labels labels=label_file

Building Source

  1. Download the source tarball p.in.labels here Download
  2. Extract the tar file in the GRASS(v.6) source tree in the misc directory
  3. Change to the p.in.labels directory
  4. Run make to build the program

ToDo

  • Add column field separator option
  • Read size and rotation options from input file or stream
  • Probably more …
Categories: