table of contents
other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
m.proj(1grass) | Grass User's Manual | m.proj(1grass) |
NAME¶
m.proj - Convert coordinates from one projection to another (cs2cs frontend).KEYWORDS¶
miscellaneous, projectionSYNOPSIS¶
m.projFlags:¶
- -i
-
- -o
-
- -d
-
- -g
-
- -v
-
- --verbose
-
- --quiet
-
Parameters:¶
- input=filename
-
- output=filename
-
- fs=character
-
- proj_in=string
-
- proj_out=string
-
DESCRIPTION¶
This program allows a user to convert coordinates from one projection to another. Coordinates can be read from one file, converted, and results written to another file. Alternatively, if the input and/or output options are omitted, eastings and northings may be passed to the program directly from stdin and results sent directly to stdout. In this way m.proj can be used as a simple frontend to the PROJ.4 cs2cs utility. The -i or -o flags make the task especially easy for the common problem of converting to or from lat/long WGS84. Note: This program does not transform GRASS maps, it is designed to determine the equivalent coordinate values of an individual position or list of positions. Use v.proj or r.proj to reproject GRASS maps.NOTES¶
cs2cs expects input data to formatted as "x y", so if working with latitude-longitude data be sure to send the x value first, i.e., "longitude latitude". Output data will be exported using the same convention. cs2cs will treat a third data column as a z value (elevation) and will modify the value accordingly. This usually translates into small but real differences in that data column. cs2cs does not expect the input stream to contain column headings, only numbers. If your data file has lines you wish to have passed through without being processed, they must start with the '#' character. If sending m.proj data from stdin, be aware that the data is first stored to a temporary file before being processed with cs2cs. It is therefore not advisable to send m.proj data from an open data stream. The module will stop listening for incoming data after 2 seconds of inactivity. You may use the projection parameters gleaned from m.proj's verbose mode ( -v) with cs2cs directly in this case. Custom projection parameters can be used via the proj_in and proj_out options. Full documentation of the projection parameter format may be found on the PROJ.4 website. Using these options will fully override the default parameters the module would normally use. By using the -v verbose flag, the user can see exactly what projection parameters will be used in the conversion as well as some other informative messages. If output is to lat/long, it will be formatted using PROJ.4's Degree:Minute:Second (DMS) convention of DDDdMM'SSS.SS"H. This can be handy if you wish to quickly convert lat/long decimal degree data into its DMS equivalent.EXAMPLES¶
To convert a WGS84 long/lat coordinate to the current map projection using the -i flag to set projection parameters automaticlly:+zone=32 +unfact=1.0" proj_out="+proj=tmerc +name=tmerc \
+a=6377397.155 +es=0.0066743720 +lat_0=0.0 +lon_0=9.0 +k=1.0 \
+x_0=3500000.0" input=utm.coord.txt output=new.gk.coord.txt
Another custom parameter usage example:¶
+y_0=250000 +k=1.000035" proj_out="+proj=ll +datum=wgs84" input=wpt.txt
+y_0=250000 +k=1.000035" proj_out="+proj=ll +datum=wgs84" input=wpt.txt
REFERENCES¶
[1] Evenden, G.I. (1990) Cartographic projection procedures for the UNIX environment - a user's manual. USGS Open-File Report 90-284 (OF90-284.pdf) See also there: Interim Report and 2nd Interim Report on Release 4, Evenden 1994). [2] PROJ.4 Cartographic Projection LibrarySEE ALSO¶
v.proj, r.proj, g.proj, g.setproj, i.rectify, v.in.ascii, v.out.asciiAUTHOR¶
M. Hamish Bowman, Dept. Marine Science, Otago University, New ZealandGRASS 6.4.4 |