progenetix/progenetix-web

Geodata: Enable geographic search

Closed this issue · 1 comments

All biosamples and publications are tagged with a geographic location object, where the geojson object is indexed as a geospatial index in the backend MongoDB collection. This allowas e.g. for $geonear queries, showing all samples from a geographic region.

		"geo" : {
			"label" : "Antalya, Turkey",
			"precision" : "city",
			"city" : "Antalya",
			"country" : "Turkey",
			"latitude" : 36.91,
			"longitude" : 30.7,
			"geojson" : {
				"type" : "Point",
				"coordinates" : [
					30.7,
					36.91
				]
			},
			"ISO-3166-alpha3" : "TUR"
		}

Also, we provide a service for accessing locations by the city name:

... which e.g. can be used to autofill parameters.

To implement

  • geographic query (Samples, Publications) which sends geolatitude, geolongitude, geodistance as query parameters
  • lat & long should be derived from a selected city; geodistance is an integer (radius around point in meters => probably km in form * 1000

Closing since implemented; improvements/fixes will be addressed separately.