{"id":4513,"date":"2020-03-11T12:00:59","date_gmt":"2020-03-11T12:00:59","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf3\/?page_id=4513"},"modified":"2020-03-12T15:41:10","modified_gmt":"2020-03-12T15:41:10","slug":"proj","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/libraries\/proj\/","title":{"rendered":"PROJ"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"https:\/\/proj.org\/\">PROJ<\/a> is a generic coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another. This includes cartographic projections as well as geodetic transformations. PROJ includes command line applications for easy conversion of coordinates from text files or directly from user input. PROJ also exposes an application programming interface (API).<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no restrictions on access to the PROJ libraries on CSF. The software is released under a <a href=\"https:\/\/proj.org\/about.html#license\">MIT\/X-like license<\/a>. All usage must adhere to this license.<\/p>\n<h2>Set up procedure<\/h2>\n<p>We now recommend loading modulefiles within your jobscript so that you have a full record of how the job was run. See the example jobscript below for how to do this. Alternatively, you may load modulefiles on the login node and let the job <abbr title=\"add '#$ -V' to your jobscript\">inherit these settings<\/abbr>.<\/p>\n<p>Load <strong>one<\/strong> of the following modulefiles to set up your environment:<\/p>\n<pre>\r\nmodule load libs\/gcc\/proj\/6.3.1\r\nmodule load libs\/gcc\/proj\/5.2.0\r\n<\/pre>\n<h2>Datumgrid Data Files<\/h2>\n<p>In PROJ 6.3.1 the <code>proj-datumgrid-1.8.zip<\/code> (2018-09-15) file has been downloaded and unpacked in the installation area. The data directory is given by the environment variable <code>$PROJ_LIB<\/code> after loading the modulefile.<\/p>\n<p>In PROJ 5.2.0 the default <em>NAD<\/em> datafiles are present in the install area. The data directory is given by the environment variable <code>$PROJ_LIB<\/code> after loading the modulefile.<\/p>\n<h2>Compiling an PROJ-capable application<\/h2>\n<p>You will mostly use the PROJ installation on CSF3 when compiling your own software. This allows you to add PROJ functionality to your own apps. There are some tools you can also run to process existing data files (see below).<\/p>\n<p>The modulefiles will set an environment variable named <code>${PROJDIR}<\/code> which can then be used in your compilation process (e.g., in a Makefile or directly on the command-line) to access the header and library files:<\/p>\n<ul>\n<li>To inform the compiler of the header file directory use:\n<pre>gcc -I${PROJDIR}\/include ....<\/pre>\n<\/li>\n<li>To inform the compiler of the library files use:\n<pre>gcc ... -L${PROJDIR}\/lib -lproj<\/pre>\n<\/li>\n<li>In a Makefile ensure you use <code>${PROJDIR}<\/code> rather than <code>$PROJDIR<\/code>.<\/li>\n<\/ul>\n<p>An example compilation command could be<\/p>\n<pre>\r\ngcc -I${PROJDIR}\/include example_proj.c -o example_proj -L${PROJDIR}\/lib -lproj\r\n<\/pre>\n<h2>Running an PROJ-capable application<\/h2>\n<p>You must load the PROJ modulefile before running your PROJ-capable application (unless you have statically linked your code against the PROJ libraries). <\/p>\n<p>Please do not run PROJ-capable applications on the login node. Jobs should be submitted to the compute nodes via batch.<\/p>\n<h3>Serial batch job submission<\/h3>\n<p>Create a batch submission script (which will load the modulefile in the jobscript), for example:<\/p>\n<pre>\r\n#!\/bin\/bash --login\r\n#$ -cwd             # Job will run from the current directory\r\n                    # NO -V line - we load modulefiles in the jobscript\r\n\r\n# Load the serial (non-MPI) modulefile\r\nmodule load libs\/gcc\/proj\/6.3.1\r\n\r\n# Run my application I compiled earlier\r\n.\/<em>myprojapp<\/em> <em>arg1<\/em> ...\r\n<\/pre>\n<p>Submit the jobscript using: <\/p>\n<pre>qsub <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your jobscript.<\/p>\n<h3>PROJ Tools<\/h3>\n<p>The PROJ <code>bin<\/code> directory is added to your path so that you can access the <code>proj...<\/code> tools. Use <code>ls ${PROJBIN}<\/code> to see all binary tools:<\/p>\n<pre>\r\n# PROJ tools - must be used in batch jobs, as above\r\ncct  cs2cs  geod  gie  invgeod  invproj  proj  projinfo\r\n<\/pre>\n<h2>Further info<\/h2>\n<p>See the PROJ website for <a href=\"https:\/\/proj.org\/\">full documentation<\/a>.<\/p>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview PROJ is a generic coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another. This includes cartographic projections as well as geodetic transformations. PROJ includes command line applications for easy conversion of coordinates from text files or directly from user input. PROJ also exposes an application programming interface (API). Restrictions on use There are no restrictions on access to the PROJ libraries on CSF. The software is released under.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/libraries\/proj\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":140,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4513","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/4513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/comments?post=4513"}],"version-history":[{"count":4,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/4513\/revisions"}],"predecessor-version":[{"id":4532,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/4513\/revisions\/4532"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/140"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/media?parent=4513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}