[gdal-dev] Command line text input (a WKT) to OGR e.g. to transform a coordinate using ogr2ogr?

Stefan Keller sfkeller at gmail.com
Tue Feb 4 22:20:13 PST 2020


Hi,

I'd like to transform a single coordinate e.g. from SRS 4326 to local
Swiss EPSG 2056 without creating a file before hand - just like an
calculator.

Is this possible in a command line shell (like Win cmd/powershell,
bash) e.g. in the following (not yet functional) form:

echo "POINT(10.1989 45.9461)" | ogr2ogr -f CSV ?stdout ?stdin -s_srs
EPSG:4326 -t_srs EPSG:2056 ...?
echo "POINT(10.1989 45.9461)" | ogr2ogr -f CSV ?stdout ?stdin -s_srs
EPSG:4326 -t_srs EPSG:2056 -sql "select OGR_GEOM_WKT from input" ...?

:Stefan


More information about the gdal-dev mailing list