Proj4: Difference between revisions

From SCECpedia
Jump to navigationJump to search
Maechlin (talk | contribs)
Maechlin (talk | contribs)
No edit summary
Line 4: Line 4:
Converting WGS84 to UTM Zone 11 using cs2cs
Converting WGS84 to UTM Zone 11 using cs2cs


* cs2cs -v +proj=latlong +datum=WGS84 +to +proj=utm +zone=11 +datum=WGS84
* cs2cs -v +proj=latlong +datum=WGS84 +ellps=WGS84 +to +proj=utm +zone=11 +datum=WGS84 +ellps=WGS84"
<pre>
<pre>
-bash-4.2$ cs2cs -v +proj=latlong +datum=WGS84 +to +proj=utm +zone=11 +datum=WGS84
-bash-4.2$ cs2cs -v +proj=latlong +datum=WGS84 +to +proj=utm +zone=11 +datum=WGS84
Line 22: Line 22:
== Online Implementation ==
== Online Implementation ==
*[https://mygeodata.cloud/cs2cs/ CS2CS Online]
*[https://mygeodata.cloud/cs2cs/ CS2CS Online]


== FAQ ==
== FAQ ==
Line 38: Line 39:


== Online Documentation ==
== Online Documentation ==
*[http://gmt.soest.hawaii.edu/projects/gmt/wiki/PROJ4 Proj4 and GMT]
*[http://hypocenter.usc.edu/research/ucvm/17.3.0/docs/developers_api_data_structures.html UCVM-P Example Strings]
*[http://hypocenter.usc.edu/research/ucvm/17.3.0/docs/developers_api_data_structures.html UCVM-P Example Strings]
*[https://en.wikibooks.org/wiki/PROJ.4 Proj4 wikibooks]
*[https://en.wikibooks.org/wiki/PROJ.4 Proj4 wikibooks]

Revision as of 17:10, 9 October 2017

Coordinate system conversions are needed for several SCEC projects.

Example Conversions

Converting WGS84 to UTM Zone 11 using cs2cs

  • cs2cs -v +proj=latlong +datum=WGS84 +ellps=WGS84 +to +proj=utm +zone=11 +datum=WGS84 +ellps=WGS84"
-bash-4.2$ cs2cs -v +proj=latlong +datum=WGS84 +to +proj=utm +zone=11 +datum=WGS84
# ---- From Coordinate System ----
#Lat/long (Geodetic alias)
#	
# +proj=latlong +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
# ---- To Coordinate System ----
#Universal Transverse Mercator (UTM)
#	Cyl, Sph
#	zone= south
# +proj=utm +zone=11 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
-118.00 34.00
407650.40	3762606.66 0.00

Online Implementation


FAQ

  • Online FAQ
  • what is the third return parameter in UTM values
    • input lat/long can include elevation. Third returned UTM param is elevation. When no lat/lon elevation used, utm return elev is 0.0
  • What is the +no_defs parameters?

Building Proj4

  • Proj4 built on Centos using the ./configure make, make install. Since we are building on a shared cluster, we needed to ./configure --prefix=/user/scec-00/maechlin/workspace/proj4 (installation path to local directory)
  • Installation of proj4 on Mac (high sierra) failed.
  • Installation of current proj4 on USC HPC succeeded.
  • Didn't try installing pyproj on Mac. It can use either installed proj4, or try to build its own
  • Used conda install pyproj on Anaconda 2 instance on USC HPC

Online Documentation

Downloads and Documentation

Related Entries