GEPS 025: Geography

From Gramps
Jump to: navigation, search

Geography is now Finished and included in Gramps 3.3.

Why

Why we need to find another solution ?

The bad things we currently had :

  1. Bad integration of webkit and gtkmozembed in hpaned => sidebar and bottombar removed
  2. Hard to communicate between the two parts : the html renderer and gramps
  3. Sometimes some console messages due to the asynchronysme of these two parts
  4. If we have no network, the maps can't be shown.
  5. It depends on :
    1. mapstraction : We need to have developers with javascript knowledge
    2. html and javascript : We need to have developers with javascript and html knowledge
    3. The renderer : webkit or gtkmozembed : The renderer works asynchronously and has no interface with python. We use a subtlety to communicate between the two environments : we change the title of the page and push all information available to gramps.
  6. Depending on the distribution and the version we can have crashes.

The replacement

  1. No more html and javascript.
  2. We can now use sidebar and bottombar without problems.
  3. I totally rewrote the code and dispatch it in several classes.
  4. I create a maps directory in the src directory with all map classes and all common stuff for plugins
  5. In the plugins/view, I have one module per type of map ( like pedigreeview, fanchartview )
  6. We can use the map even without network ( need many place in the filesystem for tiles )

For the map provider, I had two choices :

gmapcatcher

Totally in python : many problem when I tried to integrate it in gramps. We must rewrite several modules.

No translation available. All must be done : use of _()

We have no marker methods like in googlemaps or openstreetmap, so the bubbles and tips are not available : need to be implemented.

The gmapcatcher license is GPL v2

osmgpsmap

Based on gmapcatcher and totally rewritten in C.

The python interface is available for windows and a majority of distributions :

  1. ubuntu : osmgpsmap deb package
  2. fedora : osm-gps-map rpm package
  3. ...

We have no marker methods like in googlemaps or openstreetmap, so the bubbles and tips are not available : need to be implemented.

The osmgpsmap license is GPL v3

osmgpsmap compilation

If you don't have an osmgpsmap version >= 0.7.0, the view will not be displayed.

If you want do install osmgpsmap :

Debian before squeeze and/or Ubuntu before maverick ( < 10.10 )

You need to install : sudo aptitude install dbhelper libtool libgtk2.0-dev libsoup2.4-dev python-gobject-dev python-gtk2-dev libcairo2-dev python-all-dev gnome-common gtk-doc-tools dpkg-dev

Download from : https://launchpad.net/ubuntu/+source/osm-gps-map/0.7.2-1ubuntu3

  1. osm-gps-map_0.7.2.orig.tar.gz
  2. osm-gps-map_0.7.2-1ubuntu3.debian.tar.gz
  3. osm-gps-map_0.7.2-1ubuntu3.dsc

On Lucid (default is 0.5 ) nothing to do except :

  1. dpkg-source -x osm-gps-map_0.7.2-1ubuntu3.dsc
  2. cd osm-gps-map-0.7.2
  3. sudo dpkg-buildpackage -b
  4. cd ..
  5. dpkg -i libosmgpsmap2_0.7.2-1ubuntu3_amd64.deb # I am on a 64 bits architecture.
  6. dpkg -i python-osmgpsmap_0.7.2-1ubuntu3_amd64.deb

On karmic (default is 0.2 ) before to do the same as Lucid, you need to modify two files :

  1. debian/control
  2. configure.ac

You need to replace 1.12 by 1.11 for gtk-doc-tools. The two lines are :

  1. debian/control: , gtk-doc-tools (>= 1.11)
  2. configure.ac:GTK_DOC_CHECK([1.11])
  3. then you launch the same commands as for Lucid.

Others distribution

You can add information for this here.

The GEPS 025 to try it

geography is now in trunk and in 3.3.

I have currently a dozen of available maps.

new functionality

I added an animate function in geoperson.

If one person has several markers, we can see the moves starting at the first event year until the last event year.

The animation is based on years and not on distances, so if someone makes two moves the same year at 1000 kms, we'll see the two moves in 200ms. The time between two moves is 100ms.

If the person stay at the same place for 20 years, the pointer stay at the same place 2 secondes ( 20 * 100ms ).

TODO

What does not work :

  1. For the moment, we have the same functionalities as before. If you don't agree, comment.

USAGE

button 1 ( left button )

  1. marker selection.
  2. display the place name when over a marker in the status bar.
  3. valid the region selection

button 2 ( middle button )

  1. when pressed : start the region selection
  2. when released, end the region selection. You must use the button 1 to validate the selected region.

button 3 ( right button )

  1. show the menu popup. You cant hide or show the crosshair, lock the zoom, change the default map, add a place and link a place at the mouse position, center the map at the mouse position. When centering the map, the zoom used is defined in the geography preferences.

We have also specific menu entry depending on the map view.

person map view

  1. animate : if the active person has several related events, you can see a virtual move between those markers. The move is related to years or distance and can be modified in the person map preferences. If the distance between to markers is greater than a value in tenth of degree, we show moves depending on distance instead of years. In these case, the number of steps between these two markers can be modified. You can modify the animation speed between steps.

Filters

The person map view and the family map view are not connected to filters. They only depend on the active person and the history.

Adding or Linking to a place

When you add a place or try to link a place to the position of the mouse, you'll get a place selection in a region. You'll see on the map a circle in which you may choose markers place names. You can adjust the circle size with the cursor. Depending on the diameter of this circle, a list is created. If the place has already some filled fields, you'll see these values in a green color row. If you agree, you double click on this row. if you don't agree, you can choose another row.

NEXT

Possibility to connect a GPS

Possibility to show tracks

...

Please, comments