Developer guide



This page is specially written for those who want to develop on Gisgraphy. Gisgraphy is a Java framework.

Get the source code

All the source code is available on Github :

A little bit of technical detail...

  • Spring services / Hibernate mapping with a custom Hibernate dialect.
  • Lucene schema.
  • Uses PostgreSQL / PostGIS.
  • Built using Maven2.
  • Automatic synchronisation between PostgreSQL and Solr.
  • High test coverage (more than 1500 tests as of when this page was written).
  • Event based design.
  • UTF-8 used throughout.
  • Gisgraphy has it's own Maven repository with all the dependencies.
  • Designed with DSL (Domain Specific Language).
  • Designed with the DDD paradigm.
  • Tested to avoid memory leaks
  • Test are run for each release to see if performance is good

Build

Gisgraphy is based on Maven 2; you simply need to be familiar with it. To ease the build, a dedicated Maven repository is available.

Checkout the following projects :

cd to the tools directory, and run

./setupall.sh

If you are not on Linux, simply run the mvn command in eclipseall.sh and installall.sh. You have to Install PostgreSQL, PostGIS, and set up a Gisgraphy database as you would do for a common Gisgraphy installation. Then run:

mvn clean test

If you want to code or compile / build Gisgraphy without having PostgreSQL installed, commenting out dbunit-maven-plugin and hibernate-3-maven plugin to be able to run mvn clean install locally.

IDE / Eclipse

We use Eclipse to develop in, but you can use NetBeans or any other IDE. To set up Gisgraphy in Eclipse (You need the maven plugin):

  • Go to File ->Import-> existing project into workspace
  • right click->Maven->Add Maven Nature.
  • right click->Maven->update projects.
  • right click->Refresh.

And do that for all the project list bellow except for the 'tools' project

License

Just a short reminder about license. Gisgraphy is developed under the LGPL license. This license is more flexible than the GPL license (which is copy left, that's to say, you must give all the sources you modify and all the projects or libraries that use a GPL license). With LGPL you can use Gisgraphy for commercial use, modify it in any way. You must give all the sources you modify but you are not obliged to re-distribute sources of the project that use Gisgraphy.

See the attributions page to learn more on data licenses.