{"id":4503,"date":"2020-03-10T15:29:35","date_gmt":"2020-03-10T15:29:35","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf3\/?page_id=4503"},"modified":"2020-03-11T12:04:55","modified_gmt":"2020-03-11T12:04:55","slug":"geos","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/libraries\/geos\/","title":{"rendered":"GEOS"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"https:\/\/trac.osgeo.org\/geos\/\">GEOS<\/a> (Geometry Engine, Open Source) is a C++ port of the \u200bJTS Topology Suite (JTS). It aims to contain the complete functionality of JTS in C++. This includes all the \u200bOpenGIS Simple Features for SQL spatial predicate functions and spatial operators, as well as specific JTS enhanced functions. GEOS provides spatial functionality to many other projects and products.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no restrictions on access to the GEOS libraries on CSF. The software is released under the <a href=\"http:\/\/www.gnu.org\/licenses\/old-licenses\/lgpl-2.1.html\">GNU Lesser General Public License<\/a> (LGPL). 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\/geos\/3.8.0               # Uses system default GCC 4.8.5 compiler\r\n<\/pre>\n<h2>Compiling an GEOS-capable application<\/h2>\n<p>You will mostly use the GEOS installation on CSF3 when compiling your own software. This allows you to add GEOS functionality to your own apps.<\/p>\n<p>The modulefiles will set an environment variable named <code>${GEOSDIR}<\/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${GEOSDIR}\/include ....<\/pre>\n<\/li>\n<li>To inform the compiler of the library files use:\n<pre>gcc ... -L${GEOSDIR}\/lib -lgeos<\/pre>\n<\/li>\n<li>In a Makefile ensure you use <code>${GEOSDIR}<\/code> rather than <code>$GEOSDIR<\/code>.<\/li>\n<li>The <code>geos-config<\/code> application will be added to your <code>PATH<\/code> environment variable &#8211; some applications may run this to determine where the GEOS files are installed.<\/li>\n<\/ul>\n<p>An example compilation command could be<\/p>\n<pre>\r\ngcc -I${GEOSDIR}\/include example_geos.c -o example_geos -L${GEOSDIR}\/lib -lgeos\r\n<\/pre>\n<h2>Running an GEOS-capable application<\/h2>\n<p>You must load the GEOS modulefile before running your GEOS-capable application (unless you have statically linked your code against the GEOS libraries). <\/p>\n<p>Please do not run GEOS-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\/geos\/3.8.0\r\n\r\n# Run my application I compiled earlier\r\n.\/<em>mygeosapp<\/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<h2>Further info<\/h2>\n<p>See the GEOS website for <a href=\"https:\/\/trac.osgeo.org\/geos\/\">full documentation<\/a>.<\/p>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview GEOS (Geometry Engine, Open Source) is a C++ port of the \u200bJTS Topology Suite (JTS). It aims to contain the complete functionality of JTS in C++. This includes all the \u200bOpenGIS Simple Features for SQL spatial predicate functions and spatial operators, as well as specific JTS enhanced functions. GEOS provides spatial functionality to many other projects and products. Restrictions on use There are no restrictions on access to the GEOS libraries on CSF. The.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/libraries\/geos\/\">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-4503","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/4503","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=4503"}],"version-history":[{"count":3,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/4503\/revisions"}],"predecessor-version":[{"id":4507,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/4503\/revisions\/4507"}],"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=4503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}