Git Product home page Git Product logo

contrib-space's Introduction

INSTRUCTIONS

This is the old SWI-Prolog space package as a core package. New users should use the add-on from https://github.com/JanWielemaker/space. This version will be dropped in the near future.

Make sure you have at least SWI-Prolog 5.7.13. This is necessary for non-deterministic C++ predicates.

Install spatialindex. (Use spatialindex release >= 1.3.3 or the current source in the Trac repository at http://trac.gispython.org/spatialindex.) Install GEOS. The space package has been tested with version 3.1.1.

An outline of the installation procedure (please let me know where it fails with your setup) is listed below:

Install GEOS

Debian/Ubuntu systems can install the package libgeos++-dev using

$ sudo apt-get install libgeos++-dev

The fragment below describes installation from source.

$ svn checkout http://svn.osgeo.org/geos/trunk geos-svn
$ cd geos-svn/trunk
$ ./autogen.sh
$ ./configure --prefix=[...]
$ make
$ sudo make install

Install spatialindex

$ git clone http://github.com/libspatialindex/libspatialindex
$ cd libspatialindex
$ ./autogen.sh
$ ./configure --prefix=[...]
$ make
$ sudo make install

Download the development version of SWI-Prolog

$ git clone git://www.swi-prolog.org/home/pl/git/pl-devel.git

Install SWI-Prolog and the space package

$ cp build.templ build
[add space to variable EXTRA_PKGS]
$ ./prepare
$ ./build

run the tests and the demo

$ cd packages/space
$ pl -s demo_space.pl

Mac OS X

On Mac OS X you might have to help ./configure a bit by telling it how to call the preprocessor. This should work:

CXXCPP="g++ -E" ./configure

Also, since 'pl' is a reserved command, Prolog should be called with 'swipl'.

If the compilation finished without errors the demo script will prompt you with instructions.

If it does not work, please contact me.

Willem Robert van Hage [email protected]

Ubuntu/Debian

This explains getting the prerequisites on Ubuntu/Debian. Tested on Ubuntu Jaunty (9.04, 64-bits). Install the following packages (in addition to what you need to build SWI-Prolog in the first place):

$ sudo apt-get install libtool subversion libgeos++-dev

Fetch and install spatialindex using the instructions above.

Windows

To compile the space package as part of SWI-Prolog by running "/pl-devel/src/make.cmd" you need to put "space" in the list of packages in the PKGS variable in "/pl-devel/src/rules.mk".

Problems with local installations of GEOS and spatialindex

If you install spatialindex or geos in a local directory, for example your home directory, using a prefix (with ./configure --prefix=$PREFIX), make sure that the directory where the spatialindex library or geos library was installed, e.g. /usr/local/lib, is in the environment variables LD_LIBRARY_PATH and LIBRARY_PATH. Make sure that the directory where the spatialindex header files were installed, e.g. /usr/local/include, is in the environment variable CPLUS_INCLUDE_PATH. Usually, this will work correctly automatically.

On unixlike systems using bash, for example, you could add this to your .bashrc or .bash_profile before running ./configure --prefix=$PREFIX:

export PREFIX=/home/yourself
export CPLUS_INCLUDE_PATH=$PREFIX/include
export LIBRARY_PATH=$PREFIX/lib
export LD_LIBRARY_PATH=$PREFIX/lib

contrib-space's People

Contributors

wrvhage avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.