---
name: "pkdumpogr"
section: "1"
platform: "linux"
package: "pktools"
version: "2.6.7.6+ds-6+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pkdumpogr"
---

# pkdumpogr(1)

dump ogr file to text file or standard output

## NAME

pkdumpogr - dump ogr file to text file or standard output

## SYNOPSIS

FC**pkdumpogr**F\[0\]  FC**-i**F\[0\] *input.txt* \[FC**-o**F\[0\] *output*\] \[*options*\]

## DESCRIPTION

**pkdumpogr** dumps the content of a vector dataset to (standard) output (screen or filename). The default is to dump all the attributes. Individual attributes can be selected with the option FC**-n**F\[0\]. The X and Y positions can be printed with the option FC**-pos**F\[0\]. Use the option FC**-transpose**F\[0\] to transpose the output (only in combination with the option FC**-n**F\[0\] attribute).

## OPTIONS

- FC**-i**F\[0\] *filename*, FC**--input**F\[0\] *filename*

  Input shape file

- FC**-o**F\[0\] *filename*, FC**--output**F\[0\] *filename*

  Output ASCII file

- FC**-ln**F\[0\] *layername*, FC**--lname**F\[0\] *layername*

  Layer name(s) in sample (leave empty to select all)

- FC**-n**F\[0\] *attribute*, FC**--name**F\[0\] *attribute*

  names of the attributes to select. Each attribute is stored in a separate band. Default is ALL: write all attributes

- FC**-pos**F\[0\], FC**--pos**F\[0\]

  include position (x and y)

- FC**-t**F\[0\], FC**--transpose**F\[0\]

  transpose output (does not work for FC**-n**F\[0\] ALL)

- FC**-v**F\[0\] *level*, FC**--verbose**F\[0\] *level*

  verbose (Default: 0)

## EXAMPLE

Dump the attributes label and description for the vector dataset *sample.sqlite* to standard output (screen)

```
FC
pkdumpogr -i sample.sqlite -n label -n description
0 2 noforest
1 2 noforest
2 2 noforest
3 2 noforest
4 2 noforest
5 2 noforest
6 2 noforest
7 2 noforest
8 2 noforest
9 2 noforest
10 1 forest
11 2 noforest
      F[0]
```

Similar to previous example, but transpose output (does not work without explicitly defining options FC**-n**F\[0\] for attributes)

```
FC
pkdumpogr -i sample.sqlite -n label -n description -t
0 2 2 2 2 2 2 2 2 2 2 1 2
1 noforest noforest noforest noforest noforest noforest noforest noforest noforest noforest forest noforest
      F[0]
```

Dump the entire content of vector dataset *input.sqlite* to standard output

```
FC
pkdumpogr -i input.sqlite
      F[0]
```

Dump only ATTRIBUTE of vector dataset *input.sqlite* including x and y position and output to ASCII file *output.txt*

```
FC
pkdumpogr -i input.sqlite -o output.txt -n ATTRIBUTE -pos
      F[0]
```

## SEE ALSO

[**pkascii2img**(1)](/pkascii2img/1.md)
