I'm trying to create a custom CRS with proj4. I need to displace coordinates by adding 10 meters east and 20 meters north from EPSG:32719.
How can I do that with PROJ.4?
The EPSG:32719 is a UTM Zone 19 south setup with:
$ grep -B1 '<32719>' /usr/share/proj/epsg
# WGS 84 / UTM zone 19S
<32719> +proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs <>
which is a shortcut defined in /usr/share/proj/epsg
. For the background you can refer to the PROJ.4 description. If you use the full parameter set for the Transverse Mercator projection, you could use x_0 and y_0 to shift the things a little bit more to your needs. With the full parameter set EPSG:32719 is defined as:
+proj=tmerc +ellps=WGS84 +lat_0=0 +lon_0=-69 +k=0.9996 \
+x_0=500000 +y_0=10000000 +units=m +no_defs
and x_0 and y_0 are used to define false easting and ~ northing to prevent negative values in mapping. You could add your offset to +x_0=500010 / +y_0=10000020 ...
To test your setup you could use under LINUX:
$ echo -69 -40 | proj +proj=tmerc +ellps=WGS84 \
+lat_0=0 +lon_0=-69 +k=0.9996 \
+x_0=500000 +y_0=10000000 +units=m +no_defs
which gives you:
500000.00 5572242.78
or
$ echo -69 -40 | proj +proj=utm +zone=19 +south\
+datum=WGS84 +units=m +no_defs
the same values
500000.00 5572242.78
and
$ echo -69 -40 | proj +proj=tmerc +ellps=WGS84 \
+lat_0=0 +lon_0=-69 +k=0.9996 \
+x_0=500010 +y_0=10000020 +units=m +no_defs
for the shifted coordinates
500010.00 5572262.78
. @ADD Where to get the infos...
Proj.4 uses a very condensed setup form (I like this), but you can get the infos from spatialreference.org in the WKT form
PROJCS["WGS 84 / UTM zone 19S",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]],
UNIT["metre",1,AUTHORITY["EPSG","9001"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-69],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",10000000],
AUTHORITY["EPSG","32719"],
AXIS["Easting",EAST],AXIS["Northing",NORTH]]
Translation of the parameter to the proj.4 terms in detail:
+ellps=WGS84 is the ellipsoid WGS84 which is also a shortcut
+k_0=0.9996 (alias scale_factor)typical areal correction
factor for transverse mercator
+lat_0=0 (latitude_of_origin) allways 0 for UTM
+lon_0=-69 (central_meridian)
+x_0=500000 (false_easting)
+y_0=1000000 (false_northing)
Environment Debian 8, BASH and PROJ.4