Difference between revisions of "GeoView"
Line 7: | Line 7: | ||
I would like to see my ancestors all around the world on a map. And if possible, I would like to see them moving during time periods. | I would like to see my ancestors all around the world on a map. And if possible, I would like to see them moving during time periods. | ||
− | Geoview is divided in two parts : | + | ==Geoview is divided in two parts : == |
=== The html rendering engine === | === The html rendering engine === | ||
− | |||
− | |||
− | |||
− | |||
How to do this easily and with the minimum of software to install ? | How to do this easily and with the minimum of software to install ? | ||
− | + | ==== The html kits ==== | |
− | + | The Html rendering machine is used to show internet and local sites inside of GRAMPS. We need to be connected to the network. You probably also need a broadband connection to have a smooth result. Try eg Google maps in your browser to see if your internet connection is sufficiently fast. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == The html kits == | ||
− | The | ||
GRAMPS can use two different kind of engines, webkit or gtkmozembed, to view HTML pages. If they are not installed, you'll never see GeoView appearing among your views. If you are looking on how to install these, see [[GeoView#How_to_get_the_HTML_kits_.3F| below]] | GRAMPS can use two different kind of engines, webkit or gtkmozembed, to view HTML pages. If they are not installed, you'll never see GeoView appearing among your views. If you are looking on how to install these, see [[GeoView#How_to_get_the_HTML_kits_.3F| below]] | ||
Line 44: | Line 20: | ||
For this, you can disallow Geoview in the Internet Maps preferences tab. | For this, you can disallow Geoview in the Internet Maps preferences tab. | ||
− | === WebKit === | + | ===== WebKit ===== |
Be aware, WebKit is always in development. | Be aware, WebKit is always in development. | ||
Line 51: | Line 27: | ||
*http://blogs.gnome.org/epiphany/2008/04/01/the-future-of-epiphany/ | *http://blogs.gnome.org/epiphany/2008/04/01/the-future-of-epiphany/ | ||
− | + | WebKit uses the libsoup library for the proxy. | |
− | WebKit uses the libsoup library | ||
− | === Gecko ( GtkMozEmbed ) === | + | ===== Gecko ( GtkMozEmbed ) ===== |
What will gtkmozembed be in the future ? | What will gtkmozembed be in the future ? | ||
The embedding API of Gecko (GtkMozEmbed) has been unmaintained and stagnant for a long time. | The embedding API of Gecko (GtkMozEmbed) has been unmaintained and stagnant for a long time. | ||
− | + | ||
− | GtkMozEmbed is proxy aware. I | + | GtkMozEmbed is proxy aware. I implemented this and I use the http_proxy environment variable. |
Authentication is allowed. The http_proxy format used is : | Authentication is allowed. The http_proxy format used is : | ||
http://[user:password@]proxy:port/ | http://[user:password@]proxy:port/ | ||
− | |||
− | == Supported longitude/latitude formats == | + | ==== The proxies ==== |
+ | Most people don't need a proxy. The majority of us are connected directly to internet. In this case, forget all this. | ||
+ | |||
+ | You need a proxy only if you installed one or if you depend on some internet providers. | ||
+ | |||
+ | You need to set the environment variable http_proxy or use your desktop proxy configuration. | ||
+ | |||
+ | ==== How to get the HTML kits ? ==== | ||
+ | It depends on the distribution you're working on ! They are listed in reverse order. | ||
+ | |||
+ | python-webkitgtk is also called pywebkitgtk | ||
+ | |||
+ | ===== ubuntu ===== | ||
+ | ====== webkit ====== | ||
+ | |||
+ | aptitude install python-webkit. | ||
+ | |||
+ | ====== gecko ====== | ||
+ | If you want gtkmozembed on ubuntu, | ||
+ | you must install : python-gnome2-extras or python-gtkmozembed depending on you distrib version. | ||
+ | |||
+ | aptitude install python-gnome2-extras | ||
+ | |||
+ | or | ||
+ | |||
+ | aptitude install python-gtkmozembed | ||
+ | |||
+ | ===== suse ===== | ||
+ | ====== webkit ====== | ||
+ | * libwebkit-1_0 | ||
+ | |||
+ | I didn't test GeoView on suse or opensuse. I need some feedback. | ||
+ | |||
+ | I found on example in : | ||
+ | ftp5.gwdg.de/pub/opensuse/repositories/home:/bmotmans/openSUSE_<VERSION>/<ARCH>/ | ||
+ | |||
+ | Replace <VERSION> by the fedora version you use. ie : Factory, 10.3, 1.0, ... | ||
+ | |||
+ | Replace <ARCH> by i586, x86_64, ... | ||
+ | |||
+ | * pywebkit | ||
+ | |||
+ | http://packages.opensuse-community.org/index.jsp?searchTerm=pywebkit | ||
+ | |||
+ | ====== gecko ====== | ||
+ | ===== mandriva ===== | ||
+ | ====== webkit ====== | ||
+ | for 2009.0 and 2009.1: | ||
+ | Use the package manager and install python-webkitgtk | ||
+ | ====== gecko ====== | ||
+ | Seems not to work. Causes segmentation fault. | ||
+ | |||
+ | ===== fedora ===== | ||
+ | ====== webkit ====== | ||
+ | You must use : WebKit-gtk | ||
+ | |||
+ | yum install WebKit-gtk pywebkitgtk | ||
+ | |||
+ | ====== gecko ====== | ||
+ | |||
+ | ===== debian ===== | ||
+ | ====== webkit ====== | ||
+ | This is the same packager for ubuntu and debian, so go to the ubuntu paragraph. | ||
+ | ====== gecko ====== | ||
+ | install the python-gtkmozembed package. | ||
+ | ===== windows XP/Vista ===== | ||
+ | ====== webkit ====== | ||
+ | |||
+ | * WebKitGTK is the port of the portable web rendering engine WebKit to the GTK+ platform on Windows. This zip file contains webkitgtk itself and all needed dynamic link libraryes (DLL). You will need [http://www.7-zip.org 7zip] to extract its contents | ||
+ | ''This file is highly experimental and all functions may not work as expected!'' | ||
+ | ** [http://www.gramps-project.org/wiki/images/d/d2/WebKitGTK-1.1.16.zip WebKitGTK-1.1.16.zip] | ||
+ | |||
+ | |||
+ | * PyWebKitGtk provide Python bindings to WebKitGTK | ||
+ | ** [http://www.gramps-project.org/wiki/images/4/4d/PyWebKitGTK-1.1.7.win32-py2.6.zip PyWebKitGTK-1.1.7.win32-py2.6.msi] | ||
+ | |||
+ | ===== MAC/OS X ===== | ||
+ | ====== webkit ====== | ||
+ | This is standard on MAC. Can someone confirm this. | ||
+ | Is there a python-webkit package on MAC ? | ||
+ | ====== gecko ====== | ||
+ | === The Geographic part === | ||
+ | |||
+ | ===== In GRAMPS 3.1.x ===== | ||
+ | it is present as an experimental view you can activate. For GeoView to work you need to: | ||
+ | # change the GRAMPS configuration file to list the view in the list of views | ||
+ | # install the required backend so you can see webpages inside of GRAMPS. | ||
+ | # set the GeoView Preferences | ||
+ | # use the appropriate latidude and longitude format in your data (Note: the [[Place completion tool]] can look up latitude and longitude of the places defined in GRAMPS.) | ||
+ | |||
+ | The first is simple to achieve. Start a text editor and go to your gramps home directory, and open the keys.ini file. Scoll down to the interface section, and look for the ''data-views'' variable. On a clean install of GRAMPS, this variable is normally: | ||
+ | data-views=GrampletView,PersonView,RelationshipView,FamilyListView,PedigreeView,EventView,SourceView,PlaceView,MediaView,RepositoryView,NoteView | ||
+ | To add GeoView, just add it to the back, so your configuration reads: | ||
+ | data-views=GrampletView,PersonView,RelationshipView,FamilyListView,PedigreeView,EventView,SourceView,PlaceView,MediaView,RepositoryView,NoteView,GeoView | ||
+ | |||
+ | That's it. | ||
+ | |||
+ | To install the backend, scroll down to [[GeoView#How_to_get_the_HTML_kits_.3F|the installation section]]. | ||
+ | |||
+ | Finally, you need to set the Geoview Preferences: | ||
+ | |||
+ | [[Image:GeoViewPreferences.png]]. | ||
+ | |||
+ | ===== In GRAMPS 3.2 ===== | ||
+ | You don't need to set the providers. The first one is always OpenStreetMap and the alternate is GoogleMaps. | ||
+ | |||
+ | |||
+ | ==== Supported longitude/latitude formats ==== | ||
When you create/modify a place, the possible formats used for longitude/latitude are : | When you create/modify a place, the possible formats used for longitude/latitude are : | ||
Line 86: | Line 167: | ||
i.e. ±DDMMSS.SS±DDDMMSS.SS | i.e. ±DDMMSS.SS±DDDMMSS.SS | ||
− | == The maps providers == | + | ==== The maps providers ==== |
There are a lot of providers. Some are free. | There are a lot of providers. Some are free. | ||
Line 99: | Line 180: | ||
Then you have Googlemaps, Yahoo! maps, Microsoft maps, ... | Then you have Googlemaps, Yahoo! maps, Microsoft maps, ... | ||
− | == mapstraction == | + | ==== mapstraction ==== |
Like you can see, it's impossible to implement all providers maps. For this reason, some people created an api over all these providers api. | Like you can see, it's impossible to implement all providers maps. For this reason, some people created an api over all these providers api. | ||
Line 111: | Line 192: | ||
During testing with a places database for France ( > 35000 markers ), I set the limit to 20 markers which permit to create 1760 pages without problems. So we can say we have an unlimited number of markers. Only the file system space will limit us. | During testing with a places database for France ( > 35000 markers ), I set the limit to 20 markers which permit to create 1760 pages without problems. So we can say we have an unlimited number of markers. Only the file system space will limit us. | ||
− | == The provider Key == | + | ==== The provider Key ==== |
GRAMPS is not a web site. Keys are mostly only for web sites. | GRAMPS is not a web site. Keys are mostly only for web sites. | ||
In GeoView, I use a specific functionality : we are working on a local file instead of an url, so we normally don't need a key. | In GeoView, I use a specific functionality : we are working on a local file instead of an url, so we normally don't need a key. | ||
Line 120: | Line 201: | ||
We hope it is understood that our choice of maps is limited even if mapstraction can do more. | We hope it is understood that our choice of maps is limited even if mapstraction can do more. | ||
− | === Constraint === | + | ===== Constraint ===== |
We have no key, so we have a restricted access : About 10,000 to 15,000 requests by IP per day depending on the provider. | We have no key, so we have a restricted access : About 10,000 to 15,000 requests by IP per day depending on the provider. | ||
Line 127: | Line 208: | ||
I think it is sufficient for the lambda genealogist. | I think it is sufficient for the lambda genealogist. | ||
− | == | + | ==== Creating new places from GeoView ==== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == Creating new places from GeoView == | ||
You center the map for the place you want to create. | You center the map for the place you want to create. | ||
You can use the double click for that. | You can use the double click for that. | ||
When you are sure the position is OK, click on the "+" button in the tools bar. | When you are sure the position is OK, click on the "+" button in the tools bar. | ||
Now, the place editor is opened. Enter all the field necessary for this new place then click on the OK button. That's all. | Now, the place editor is opened. Enter all the field necessary for this new place then click on the OK button. That's all. | ||
− | == Associate a new position to an already existing place == | + | ==== Associate a new position to an already existing place ==== |
You center the map for the place you want to modify like for creating a new place. | You center the map for the place you want to modify like for creating a new place. | ||
When you are sure the position is OK, click on the "map" button in the tools near the "+" button described above. | When you are sure the position is OK, click on the "map" button in the tools near the "+" button described above. | ||
Line 226: | Line 219: | ||
You can use this method to modify the position you used in a prior creation. | You can use this method to modify the position you used in a prior creation. | ||
− | == | + | ====Results==== |
− | |||
− | |||
− | == | ||
<gallery> | <gallery> | ||
Line 238: | Line 228: | ||
</gallery> | </gallery> | ||
− | == If you get a crash when starting gramps == | + | ==== If you get a crash when starting gramps ==== |
It's probably a webkit problem. | It's probably a webkit problem. | ||
So, you have two possibilities : | So, you have two possibilities : | ||
− | === Remove webkit rendering engine only === | + | ===== Remove webkit rendering engine only ===== |
Remove webkit and install gtkmozembed (gecko) is not already installed | Remove webkit and install gtkmozembed (gecko) is not already installed | ||
You'll have the gecko rendering. | You'll have the gecko rendering. | ||
− | === Remove all rendering engines === | + | ===== Remove all rendering engines ===== |
Remove python-webkit and python-gtkmozembed. You'll never see geoview. | Remove python-webkit and python-gtkmozembed. You'll never see geoview. | ||
+ | == ... == | ||
+ | Your modifications are welcomed ... | ||
+ | |||
[[Category:GEPS|G]] | [[Category:GEPS|G]] |
Revision as of 16:54, 1 February 2010
Work in progress.
All we need to understand and test GeoView.
Contents
- 1 Why GeoView or Geography ?
- 2 Geoview is divided in two parts :
- 2.1 The html rendering engine
- 2.2 The Geographic part
- 2.2.1 In GRAMPS 3.1.x
- 2.2.2 In GRAMPS 3.2
- 2.2.3 Supported longitude/latitude formats
- 2.2.4 The maps providers
- 2.2.5 mapstraction
- 2.2.6 The provider Key
- 2.2.7 Creating new places from GeoView
- 2.2.8 Associate a new position to an already existing place
- 2.2.9 Results
- 2.2.10 If you get a crash when starting gramps
- 3 ...
Why GeoView or Geography ?
I would like to see my ancestors all around the world on a map. And if possible, I would like to see them moving during time periods.
Geoview is divided in two parts :
The html rendering engine
How to do this easily and with the minimum of software to install ?
The html kits
The Html rendering machine is used to show internet and local sites inside of GRAMPS. We need to be connected to the network. You probably also need a broadband connection to have a smooth result. Try eg Google maps in your browser to see if your internet connection is sufficiently fast.
GRAMPS can use two different kind of engines, webkit or gtkmozembed, to view HTML pages. If they are not installed, you'll never see GeoView appearing among your views. If you are looking on how to install these, see below
If both two kits are installed, webkit will be used.
Even if you have a HTML kit installed, you can always say : I don't mind ! I don't want to see the GeoView. For this, you can disallow Geoview in the Internet Maps preferences tab.
WebKit
Be aware, WebKit is always in development.
More and more projects are integrating webkit ... Eg, epiphany states:
WebKit uses the libsoup library for the proxy.
Gecko ( GtkMozEmbed )
What will gtkmozembed be in the future ?
The embedding API of Gecko (GtkMozEmbed) has been unmaintained and stagnant for a long time.
GtkMozEmbed is proxy aware. I implemented this and I use the http_proxy environment variable. Authentication is allowed. The http_proxy format used is :
http://[user:password@]proxy:port/
The proxies
Most people don't need a proxy. The majority of us are connected directly to internet. In this case, forget all this.
You need a proxy only if you installed one or if you depend on some internet providers.
You need to set the environment variable http_proxy or use your desktop proxy configuration.
How to get the HTML kits ?
It depends on the distribution you're working on ! They are listed in reverse order.
python-webkitgtk is also called pywebkitgtk
ubuntu
webkit
aptitude install python-webkit.
gecko
If you want gtkmozembed on ubuntu, you must install : python-gnome2-extras or python-gtkmozembed depending on you distrib version.
aptitude install python-gnome2-extras
or
aptitude install python-gtkmozembed
suse
webkit
- libwebkit-1_0
I didn't test GeoView on suse or opensuse. I need some feedback.
I found on example in : ftp5.gwdg.de/pub/opensuse/repositories/home:/bmotmans/openSUSE_<VERSION>/<ARCH>/
Replace <VERSION> by the fedora version you use. ie : Factory, 10.3, 1.0, ...
Replace <ARCH> by i586, x86_64, ...
- pywebkit
http://packages.opensuse-community.org/index.jsp?searchTerm=pywebkit
gecko
mandriva
webkit
for 2009.0 and 2009.1: Use the package manager and install python-webkitgtk
gecko
Seems not to work. Causes segmentation fault.
fedora
webkit
You must use : WebKit-gtk
yum install WebKit-gtk pywebkitgtk
gecko
debian
webkit
This is the same packager for ubuntu and debian, so go to the ubuntu paragraph.
gecko
install the python-gtkmozembed package.
windows XP/Vista
webkit
- WebKitGTK is the port of the portable web rendering engine WebKit to the GTK+ platform on Windows. This zip file contains webkitgtk itself and all needed dynamic link libraryes (DLL). You will need 7zip to extract its contents
This file is highly experimental and all functions may not work as expected!
- PyWebKitGtk provide Python bindings to WebKitGTK
MAC/OS X
webkit
This is standard on MAC. Can someone confirm this. Is there a python-webkit package on MAC ?
gecko
The Geographic part
In GRAMPS 3.1.x
it is present as an experimental view you can activate. For GeoView to work you need to:
- change the GRAMPS configuration file to list the view in the list of views
- install the required backend so you can see webpages inside of GRAMPS.
- set the GeoView Preferences
- use the appropriate latidude and longitude format in your data (Note: the Place completion tool can look up latitude and longitude of the places defined in GRAMPS.)
The first is simple to achieve. Start a text editor and go to your gramps home directory, and open the keys.ini file. Scoll down to the interface section, and look for the data-views variable. On a clean install of GRAMPS, this variable is normally:
data-views=GrampletView,PersonView,RelationshipView,FamilyListView,PedigreeView,EventView,SourceView,PlaceView,MediaView,RepositoryView,NoteView
To add GeoView, just add it to the back, so your configuration reads:
data-views=GrampletView,PersonView,RelationshipView,FamilyListView,PedigreeView,EventView,SourceView,PlaceView,MediaView,RepositoryView,NoteView,GeoView
That's it.
To install the backend, scroll down to the installation section.
Finally, you need to set the Geoview Preferences:
In GRAMPS 3.2
You don't need to set the providers. The first one is always OpenStreetMap and the alternate is GoogleMaps.
Supported longitude/latitude formats
When you create/modify a place, the possible formats used for longitude/latitude are :
'D.D4' : degree notation, 4 decimals eg +12.0154 , -124.3647 'D.D8' : degree notation, 8 decimals (precision like ISO-DMS) eg +12.01543265 , -124.36473268 'DEG' : degree, minutes, seconds notation eg 50°52'21.92"N , 124°52'21.92"E ° has UTF-8 code c2b00a or N 50º52'21.92" , E 124º52'21.92" º has UTF-8 code c2ba0a The character for seconds can be either one double quote " or two single quote ' 'DEG-:' : degree, minutes, seconds notation with : eg -50:52:21.92 , 124:52:21.92 'ISO-D' : ISO 6709 degree notation i.e. ±DD.DDDD±DDD.DDDD 'ISO-DM' : ISO 6709 degree, minutes notation i.e. ±DDMM.MMM±DDDMM.MMM 'ISO-DMS' : ISO 6709 degree, minutes, seconds notation i.e. ±DDMMSS.SS±DDDMMSS.SS
The maps providers
There are a lot of providers. Some are free.
By default, the provider GRAMPS uses is OSM ( OpenStreetMap ). As a free project, we find it our duty to first and foremost support another free initiative.
OpenStreetMap depends on the community and the maps are very light depending on the country. Nevertheless, the community made an extraordinary job and the quality is improving rapidly. And you can help make it better! We can say OpenStreetMap is and will be the map GRAMPS uses per default.
Openlayers is free too and uses by default OSM map. A lot of private or non free maps depends on OpenLayers.
The most interesting is the IGN ( Institut Géographique National Français )[1] which offers an old map of France ( about 1780 ) but this provider needs a key. I'll speak about keys later.
Then you have Googlemaps, Yahoo! maps, Microsoft maps, ...
mapstraction
Like you can see, it's impossible to implement all providers maps. For this reason, some people created an api over all these providers api.
With only a few modification, you can use the map you want. And better! you can switch between the maps keeping the zoom and the centered position.
For performances issues, I can confirm it takes approximately 30 seconds to view 1000 markers for openstreetmap or google. If you have 2000 markers, this time is about 2 times 30 seconds.
For this, I limit one HTML page to 200 markers. If you have more than this limit, GRAMPS creates the necessary pages to see all your markers.
During testing with a places database for France ( > 35000 markers ), I set the limit to 20 markers which permit to create 1760 pages without problems. So we can say we have an unlimited number of markers. Only the file system space will limit us.
The provider Key
GRAMPS is not a web site. Keys are mostly only for web sites. In GeoView, I use a specific functionality : we are working on a local file instead of an url, so we normally don't need a key.
However, some providers like IGN need a key even in those cases. So we can't use them. Why ?
- To require a key would be too complex for the normal GRAMPS user
- We need a key from the provider
We hope it is understood that our choice of maps is limited even if mapstraction can do more.
Constraint
We have no key, so we have a restricted access : About 10,000 to 15,000 requests by IP per day depending on the provider.
What is a request ? As I understand with the IGN ( OpenLayers ), a request is a tile ( an image ). You need several tiles for a view.
I think it is sufficient for the lambda genealogist.
Creating new places from GeoView
You center the map for the place you want to create. You can use the double click for that. When you are sure the position is OK, click on the "+" button in the tools bar. Now, the place editor is opened. Enter all the field necessary for this new place then click on the OK button. That's all.
Associate a new position to an already existing place
You center the map for the place you want to modify like for creating a new place. When you are sure the position is OK, click on the "map" button in the tools near the "+" button described above. A places list is opened. Choose the place you want to modify then click on the OK button.
You can use this method to modify the position you used in a prior creation.
Results
If you get a crash when starting gramps
It's probably a webkit problem. So, you have two possibilities :
Remove webkit rendering engine only
Remove webkit and install gtkmozembed (gecko) is not already installed You'll have the gecko rendering.
Remove all rendering engines
Remove python-webkit and python-gtkmozembed. You'll never see geoview.
...
Your modifications are welcomed ...