Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geogig-dev] geogig serve Postgresql storage through web API

Hi Sebastian,

First, make sure you are using version 1.0-RC3 of GeoGig. You can get it from the website or from GitHub:

http://geogig.org/
https://github.com/locationtech/geogig/releases

To setup a PostgreSQL backed repository, you first need to create the database and user that will own your GeoGig repositories in PostgreSQL. GeoGig won't create the database or user for you.

Once you have the database created, you can initialize the repository like this:

geogig --repo 'postgresql://localhost/geogig/myrepo?user=user&password=password' init

The --repo option has to come before the init command. And putting the PostgreSQL URI in single quotes will make sure all the special characters are handled correctly.

Once that is done, you can use the exact same format for the serve command:

geogig --repo 'postgresql://localhost/geogig/myrepo?user=user&password=password' serve

That should setup your GeoGig server. To verify, sent a GET request to http://localhost:8182/repos. It should return a success response with some XML in it similar to this:

<?xml version='1.0' encoding='UTF-8'?>
<repos>
    <repo>
        <name>myrepo</name>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="" href="http://localhost:8182/repos/testrepo.xml">http://localhost:8182/repos/testrepo.xml" type="application/xml"/>
    </repo>
</repos>

​Hope that helps,​


Erik Merkle
Software Engineer | Boundless

On Tue, Aug 30, 2016 at 5:40 AM, <Schmidt.Sebastian2@xxxxxx> wrote:
Hi everyone,

after having attended FOSS4G's excellent workshop on Geogig I'd like to do some experiments on my own regarding PostgreSQL object storage.

Initialization of the repo was fine:
geogig init --repo postgresql://localhost/geogig/myrepo?user=user&password=secret

import of data as well:
geogig shp import my/shapefile.shp --repo postgresql://localhost/geogig/myrepo?user=user&password=secret

But currently I fail to start a server serving that repo through the web API:

geogig serve "postgresql://localhost/geogig/myrepo?user=user&password=secret"

ends up in a message saying:

File does not exist or is not a directory: postgresql:/localhost/geogig/myrepo?user=user&password=secret

I also tried to pass the value through the --repo postgresql:... parameter, but that does not help either: The server starts up but does not find any repo.

Any hints on that one?

Kind regards,
Sebastian

_______________________________________________
geogig-dev mailing list
geogig-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geogig-dev


Back to the top