pkascii2ogr(1)

NAME
pkascii2ogr - program to create vector points or polygons from text file

SYNOPSIS
\FCpkascii2ogr\F[]
[\FC-i\F[] input] [\FC-o\F[] output] [\FC-f\F[] OGRformat] [\FC-x\F[] col] [\FC-y\F[] col] [\FC-line\F[]] [\FC-n\F[] fieldname] [\FC-ot\F[] type] [\FC-fs\F[] separator]

DESCRIPTION
pkascii2ogr creates a vector dataset (points or single polygon) from an ASCII textfile. A better alternative is to use . Specify the position of the vertices (x and y) in the columns defined by the options (\FC-x\F[] \FC-y\F[]), starting from 0. The default is to use the first (\FC-dx\F[] 0) and second (\FC-dx\F[] 1) columns for x and y respectvely. Specify the names and types of the remaining columns in your input file via the option pairs \FC-n\F[] and \FC-ot\F[] respectively. The default field separator is space.

OPTIONS

\FC-i\F[] filename, \FC--input\F[] filename
    input ASCII file

\FC-o\F[] filename, \FC--output\F[] filename
    Output file

\FC-f\F[] OGRformat, \FC--f\F[] OGRformat
    Output sample file format

\FC-x\F[] col, \FC--x\F[] col
    column number of x (0)

\FC-y\F[] col, \FC--y\F[] col
    column number of y (1)

\FC-l\F[], \FC--line\F[]
    create OGRPolygon as geometry instead of points. Fields are taken from first point and polygon is automatically closed (no need to repeat first point at last line). (false: use OGRPoint)

\FC-n\F[] fieldname, \FC--name\F[] fieldname
    Field names for the columns in the input ascii file

\FC-ot\F[] type, \FC--otype\F[] type
    Field type (Real, Integer, String) for each of the fields as defined by name

\FC-a_srs\F[] EPSG:number, \FC--a_srs\F[] EPSG:number
    Override the projection for the output file, use epsg: or Wkt string

\FC-fs\F[] separator, \FC--fs\F[] separator
    field separator.

\FC-v\F[] n, \FC--verbose\F[] n
    verbose (0)

EXAMPLE
Create a vector shape file (\FCoutput.shp\F[]) from input ASCII file (\FCinput.txt\F[]). The coordinates x (longitude) and y (latitude) can be found in \FCinput.txt\F[] as columns 3 and 2 respectively (columns start counting from 0). The remaining 2 columns in \FCinput.txt\F[] are used as fields (attributes) of type integer: id (column 0) and label (column 3). The projection is set to lat lon (epsg:4326).

\FC
pkascii2ogr -i input.txt -o output.shp -x 2 -x 1 -n id -ot Integer -n label -ot Integer -a_srs epsg:4326
      \F[]

SEE ALSO
pkascii2img(1)