wiki:GPSphotos

Version 16 (modified by jorrit, 8 years ago) (diff)

--

Set up GPSphoto server on CentOS

  • Install a bare web server
  • Add the Epel repository
    yum install epel-release
    
  • install spatiallite if you chose SQLite as the backend DB:
    yum install libspatialite
    
  • Install postgresql server and postgis if Postgres is the backend DB, see the PostgresQL / Postgis section below
  • In order for GPSphoto to work you also need the following packages:
    yum install mod_wsgi python-webob python-pillow python2-boto
    
  • To make sure exif data is kept with the images install piexif (attached) Does not seem to be needed
    yum install piexif-1.0.7-1.noarch.rpm
    
  • For KML export functionality install simplekml (attached)
    yum install simplekml-1.3.0-1.noarch.rpm
    
  • For cookie management in WSGI install the following:
    yum install python2-cookies
    

PostgresQL / PostGIS

Get the latest postgres / postgis by install the Yum repo from https://yum.postgresql.org/repopackages.php and install the following packages:

yum install postgresql95-server postgresql95 postgresql95-contrib postgis2_95 postgis2_95-utils\
 postgis2_95-client python-psycopg2 python-psycopg2-doc ogr_fdw95 pgrouting_95

Edit /etc/sysconfig/pgsql/postgresql-9.5 to contain the following content:

PGPORT=5440

Initialize the database and start and enable it:

/usr/pgsql-9.5/bin/postgresql95-setup initdb
systemctl enable postgresql-9.5.service 
systemctl start postgresql-9.5

Make sure the path is updated by creating /var/lib/pgsql/.pgsql_profile with the content:

export PATH=/usr/pgsql-9.5/bin:$PATH

Create the DB schema:

sudo -i postgres
createdb mapserver
createuser mapserver
psql mapserver
> alter user mapserver with password <password>
> CREATE EXTENSION postgis;
> CREATE EXTENSION postgis_topology;
> CREATE EXTENSION ogr_fdw;

To verify the install do:

SELECT postgis_full_version();

Useful tools

print detailed exif information of image:

identify -verbose P1100818.JPG

Load the gpsphoto table

psql -f gpsphoto/table.sql -d mapserver

Attachments (9)