Man page - pkascii2ogr(1)
Packages contains this manual
- pkfssvm(1)
- pkstatogr(1)
- pkfilterdem(1)
- pkextractimg(1)
- pkkalman(1)
- pksetmask(1)
- pksvm(1)
- pkascii2img(1)
- pkdsm2shadow(1)
- pkascii2ogr(1)
- pkpolygonize(1)
- pkfillnodata(1)
- pkextractogr(1)
- pksieve(1)
- pkdumpogr(1)
- pkstat(1)
- pkannogr(1)
- pkegcs(1)
- pkfilterascii(1)
- pkreclassogr(1)
- pksvmogr(1)
- pkgetmask(1)
- pkdiff(1)
- pkfsann(1)
- pkregann(1)
- pkcreatect(1)
- pkcomposite(1)
- pkstatascii(1)
- pkdumpimg(1)
- pkstatprofile(1)
- pkinfo(1)
- pkcrop(1)
- pkoptsvm(1)
- pkann(1)
- pkreclass(1)
- pkfilter(1)
apt-get install pktools
Manual
pkascii2ogr
NAMESYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLE
SEE ALSO
NAME
pkascii2ogr - program to create vector points or polygons from text file
SYNOPSIS
pkascii2ogr [ -i input ] [ -o output ] [ -f OGRformat ] [ -x col ] [ -y col ] [ -line ] [ -n fieldname ] [ -ot type ] [ -fs separator ]
DESCRIPTION
pkascii2ogr creates a vector dataset (points or single polygon) from an ASCII textfile. A better alternative is to use virtual vector datasets ⟨ http://www.gdal.org/drv_vrt.html⟩ . Specify the position of the vertices (x and y) in the columns defined by the options ( -x -y ), starting from 0. The default is to use the first ( -dx 0) and second ( -dx 1) columns for x and y respectvely. Specify the names and types of the remaining columns in your input file via the option pairs -n and -ot respectively. The default field separator is space.
OPTIONS
-i filename , --input filename
input ASCII file
-o filename , --output filename
Output file
-f OGRformat , --f OGRformat
Output sample file format
-x col , --x col
column number of x (0)
-y col , --y col
column number of y (1)
-l , --line
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)
-n fieldname , --name fieldname
Field names for the columns in the input ascii file
-ot type , --otype type
Field type (Real, Integer, String) for each of the fields as defined by name
-a_srs EPSG:number , --a_srs EPSG:number
Override the projection for the output file, use epsg: or Wkt string
-fs separator , --fs separator
field separator.
-v n , --verbose n
verbose (0)
EXAMPLE
Create a vector shape file ( output.shp ) from input ASCII file ( input.txt ). The coordinates x (longitude) and y (latitude) can be found in input.txt as columns 3 and 2 respectively (columns start counting from 0). The remaining 2 columns in input.txt are used as fields (attributes) of type integer: id (column 0) and label (column 3). The projection is set to lat lon (epsg:4326).
pkascii2ogr -i input.txt -o output.shp -x 2 -x 1 -n id -ot Integer -n label -ot Integer -a_srs epsg:4326
SEE ALSO
pkascii2img (1)