[Qgis-user] ogr2ogr - how to use -s_srs, -t_srs and -a_srs
Andre Joost
andre+joost at nurfuerspam.de
Sun Aug 6 05:30:40 PDT 2017
Am 06.08.2017 um 11:07 schrieb Erik Josefsson:
>
> It seems I need an interpreter of the output from ogrinfo that can
> translate that rather complex output into a simple EPSG-code.
gdalsrsinfo has an easier output, but will not reveal EPSG codes either.
One reason is because many EPSG codes share basically the same
projection parameters. As an example, EPSG:4258 (ETRS89) and EPSG:4619
(SWEREF99) are identical. QGIS makes an educated guess, but still does
not know which one you want.
The other way is easy to implement: gdalsrsinfo EPSG:4619 has a unique
output of
PROJ.4 : '+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '
OGC WKT :
GEOGCS["SWEREF99",
DATUM["SWEREF99",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6619"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4619"]]
It even adds the EPSG code as last line to the WKT definition (which
ESRI software does not do).
HTH,
André Joost
More information about the Qgis-user
mailing list