'\" -*- coding: us-ascii -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH pkascii2ogr 1 "02 January 2019" "" "" .SH NAME pkascii2ogr \- program to create vector points or polygons from text file .SH SYNOPSIS 'nh .fi .ad l \fBpkascii2ogr\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [\fB-i\fR \fIinput\fR] [\fB-o\fR \fIoutput\fR] [\fB-f\fR \fIOGRformat\fR] [\fB-x\fR \fIcol\fR] [\fB-y\fR \fIcol\fR] [\fB-line\fR] [\fB-n\fR \fIfieldname\fR] [\fB-ot\fR \fItype\fR] [\fB-fs\fR \fIseparator\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBpkascii2ogr\fR creates a vector dataset (points or single polygon) from an ASCII textfile. A better alternative is to use .URL http://www.gdal.org/drv_vrt.html "virtual vector datasets" \&. Specify the position of the vertices (x and y) in the columns defined by the options (\*(T<\fB\-x\fR\*(T> \*(T<\fB\-y\fR\*(T>), starting from 0. The default is to use the first (\*(T<\fB\-dx\fR\*(T> 0) and second (\*(T<\fB\-dx\fR\*(T> 1) columns for x and y respectvely. Specify the names and types of the remaining columns in your input file via the option pairs \*(T<\fB\-n\fR\*(T> and \*(T<\fB\-ot\fR\*(T> respectively. The default field separator is space. .SH OPTIONS .TP \*(T<\fB\-i\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-input\fR\*(T> \fIfilename\fR input ASCII file .TP \*(T<\fB\-o\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-output\fR\*(T> \fIfilename\fR Output file .TP \*(T<\fB\-f\fR\*(T> \fIOGRformat\fR, \*(T<\fB\-\-f\fR\*(T> \fIOGRformat\fR Output sample file format .TP \*(T<\fB\-x\fR\*(T> \fIcol\fR, \*(T<\fB\-\-x\fR\*(T> \fIcol\fR column number of x (0) .TP \*(T<\fB\-y\fR\*(T> \fIcol\fR, \*(T<\fB\-\-y\fR\*(T> \fIcol\fR column number of y (1) .TP \*(T<\fB\-l\fR\*(T>, \*(T<\fB\-\-line\fR\*(T> 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) .TP \*(T<\fB\-n\fR\*(T> \fIfieldname\fR, \*(T<\fB\-\-name\fR\*(T> \fIfieldname\fR Field names for the columns in the input ascii file .TP \*(T<\fB\-ot\fR\*(T> \fItype\fR, \*(T<\fB\-\-otype\fR\*(T> \fItype\fR Field type (Real, Integer, String) for each of the fields as defined by name .TP \*(T<\fB\-a_srs\fR\*(T> \fIEPSG:number\fR, \*(T<\fB\-\-a_srs\fR\*(T> \fIEPSG:number\fR Override the projection for the output file, use epsg: or Wkt string .TP \*(T<\fB\-fs\fR\*(T> \fIseparator\fR, \*(T<\fB\-\-fs\fR\*(T> \fIseparator\fR field separator. .TP \*(T<\fB\-v\fR\*(T> \fIn\fR, \*(T<\fB\-\-verbose\fR\*(T> \fIn\fR verbose (0) .SH EXAMPLE Create a vector shape file (\*(T<\fIoutput.shp\fR\*(T>) from input ASCII file (\*(T<\fIinput.txt\fR\*(T>). The coordinates x (longitude) and y (latitude) can be found in \*(T<\fIinput.txt\fR\*(T> as columns 3 and 2 respectively (columns start counting from 0). The remaining 2 columns in \*(T<\fIinput.txt\fR\*(T> are used as fields (attributes) of type integer: id (column 0) and label (column 3). The projection is set to lat lon (epsg:4326). .PP .nf \*(T< \fBpkascii2ogr\fR \fB\-i\fR \fIinput.txt\fR \fB\-o\fR \fIoutput.shp\fR \fB\-x\fR \fI2\fR \fB\-x\fR \fI1\fR \fB\-n\fR \fIid\fR \fB\-ot\fR \fIInteger\fR \fB\-n\fR \fIlabel\fR \fB\-ot\fR \fIInteger\fR \fB\-a_srs\fR \fIepsg:4326\fR \*(T> .fi .SH "SEE ALSO" \fBpkascii2img\fR(1)