dsp-api icon indicating copy to clipboard operation
dsp-api copied to clipboard

Change from geonames.org to OpenStreetMap

Open lrosenth opened this issue 6 years ago • 6 comments

Since geonames.org costs us a licence and most open source projects are using OpenStreetMap, I suggest changing the geolocation things in Knora to OSM. In addition, we can use https://leafletjs.com for rendering maps (a very widely used solution for mapping within the web browser...)

lrosenth avatar Jan 23 '19 18:01 lrosenth

Since this is a breaking change, we need to check whether anyone is using Geoname values in Knora.

benjamingeer avatar Jan 23 '19 19:01 benjamingeer

Also, how to transform Geonames into OSM? I suppose that there are a few projects on Salsah.org that use Geonames?

subotic avatar Jan 24 '19 08:01 subotic

At least, in Lausanne, we don't use Geonames. Mainly because we found it was bugged in Salsah 1.5.

Using OSM is (I think) in line with Open Data policy. But I didn't know until now that they had a placenames database very similar to Geonames. Being able to use Leaflet in the future would be great.

mrivoal avatar Jan 24 '19 08:01 mrivoal

To m yknowledge, https://histhub.ch is developing an ontology and API for (historical) geolocations. There will be workshop on February 1st in Bern: https://histhub.ch/ankuendigung-histhub-day/

Anyone going there?

tobiasschweizer avatar Jan 24 '19 09:01 tobiasschweizer

Also, how to transform Geonames into OSM? I suppose that there are a few projects on Salsah.org that use Geonames?

Yes, we do (on Salsah.org). We make use of it in our chronology objects. I expect it to be around 700 entries. I can't give you the exact number right now because of an error that salsah is throwing when I try to query it (Extended Search, Project: "Webern", Ressource-Typ: "Chronologie", Merkmalfeld: "Ort (GeoNames)" "EXIST"):

TypeError: localdata.ele.seldiv is undefined

This refers to jquery.geonames.js, line 359:

value: function(options) {
			var $this = $(this);
			var localdata = $this.data('localdata');
			var val;
			if ((localdata.settings.new_entry_allowed !== undefined) && (localdata.settings.new_entry_allowed))
			{
				val = 'gnid:' + $this.find('.geonames_field').data('geonameId');
			}
			else {
/* here it breaks */	val = localdata.ele.seldiv[localdata.ele.seldiv.length - 1].find('select').val();
				if ((val == 0) && (localdata.ele.seldiv.length > 1)) {
					val = localdata.ele.seldiv[localdata.ele.seldiv.length - 2].find('select').val();
				}
			}
			return val;
		},

musicEnfanthen avatar Jan 24 '19 10:01 musicEnfanthen

Also, how to transform Geonames into OSM? I suppose that there are a few projects on Salsah.org that use Geonames?

The SGV uses the geonames a lot and they have their own interface, developed by an external web-design office. I don't know if something about the location is hardcoded there. It should still work after a change from gn:id to osm:id, because we store the id in a hierarchical list. Then it should still work. Anyway there will be some time; the SGV data will be transferred as one of the last projects, I suppose.

kilchenmann avatar Jan 24 '19 22:01 kilchenmann