[pktools] 104/375: comment in pkeditogr.cc how to change fields with ogr2ogr using -sql option

Bas Couwenberg sebastic at xs4all.nl
Wed Dec 3 21:54:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch upstream-master
in repository pktools.

commit a9cdfaef4b42ac71d9c8e99938ed19568d157bfb
Author: Pieter Kempeneers <kempenep at gmail.com>
Date:   Wed May 8 18:08:15 2013 +0200

    comment in pkeditogr.cc how to change fields with ogr2ogr using -sql option
---
 src/apps/pkeditogr.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/apps/pkeditogr.cc b/src/apps/pkeditogr.cc
index 6e8f8a5..123139a 100644
--- a/src/apps/pkeditogr.cc
+++ b/src/apps/pkeditogr.cc
@@ -33,6 +33,8 @@ int main(int argc, char *argv[])
   Optionpk<string> like_opt("like", "like", "substring(s) to be found in select field. If multiple substrings are provided, feature will be selected if one of them is found (default) or all of them are found (stringent option is set)");
   Optionpk<bool> stringent_opt("st", "stringent", "all substring(s) in like option must be found in order to select feature)",false);
   Optionpk<string> field_opt("f", "field", "output field names (number must exactly match input fields)");
+  //renaming fields can also be done via ogr2ogr using the -sql option:
+  //ogr2ogr outdataset indataset -sql "SELECT src_field1 AS dst_field1, src_field2 AS dst_field2 FROM sourcelayer"
   Optionpk<long int> setfeature_opt("sf", "sf", "id of feature(s) to set (start from 0)");
   Optionpk<string> setname_opt("sn", "sn", "name(s) of field(s) to set");
   Optionpk<string> setvalue_opt("sv", "sv", "value(s) of field(s) to set");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git



More information about the Pkg-grass-devel mailing list