Extension talk:GeoData

Jump to navigation Jump to search

About this board

Silkwood (talkcontribs)

This is my site installation

Product Version
MediaWiki 1.32.0
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1
ICU 60.2
Elasticsearch 5.6.16

this is the LocalSettings.php configuration

wfLoadExtension( 'GeoData' );

$wgGeoDataBackend = 'elastic';

and this is the (partial) output of update.php script

...geo_tags table already exists.

...geo_killlist doesn't exist.

...coordinates are already DECIMAL in geo_tags.

When I try the new GeoData parser function (taken from Extension Page example):{{#coordinates:primary|26|04|N|178|46|E|}}

I get this Fatal error

Fatal error: The format of the coordinate could not be determined. Parsing failed.

What am I missed?

Any help is greatly appreciated

Tibloc (talkcontribs)

Do you have the 'Maps' extension installed? If so, this will cause the error.

8aee338606f2cbabecae7cc046897290 (talkcontribs)

Yeah, they both provide the #coordinates parser function:

  • Extension:GeoData ...adds a new parser function, {{#coordinates:}}, that saves coordinates to the database.
  • Extension:Maps ...provides the #coordinates parser function which allows conversion between all supported coordinate formats.

If you don't care about the GeoData part of this, you can edit Module:Coordinates on your own wiki, find the part that says this:

local function coord_wrapper(in_args)
	-- Calls the parser function {{#coordinates:}}.
	return mw.getCurrentFrame():callParserFunction('#coordinates', in_args) or ''

and replace it with this:

local function coord_wrapper(in_args)
	-- Calls the parser function {{#coordinates:}}.
	local result = mw.getCurrentFrame():callParserFunction('#coordinates', in_args)
	if string.find(result, "The format of the coordinate could not be determined") ~= nil then
		-- We wanted the #coordinates parser function from Extension:GeoData, 
		-- but we got the one from Extension:Maps instead :(
		result = nil
	return result or ''
Silkwood (talkcontribs)

Thanks so much.

I'll give it a try.

Reply to "GeoData does not work"
ErkDemon (talkcontribs)

Is there no support for height data? I work in a museum and tourist information point that's ''underneath'' a major railway station terminus forecourt. People walk out of the station building into the outdoor cab rank, and latitude/longitude would tell them that they were inside the museum. Location data should be able to tell them that the "invisible" museum is twenty feet straight down, below their feet, and they they need to scout about for a way down.

Similarly, the station is built into the side of a steep hill, and we get a steady stream of lost people coming in from the road outside looking for it, who don't realise that the station is a couple of storeys up the the air, above the brickwork in front of them.

I appreciate that altitude isn't as important as lat/long, but it seems odd to have no way of entering the data for the cases where it matters.

Reply to "Altitude data?"
ErkDemon (talkcontribs)

If "#coordinates:" gives us an easy way to write primary coordinates into the database from a template on a page, then what's the corresponding way for page templates to read the information out again elsewhere on the page?

Presumably there's some way to do this, perhaps some "Magic Words", like LAT and LONG that would let us access this info from elsewhere in the page in a standardised format, but I'm having trouble finding any info on how to do this.

Can someone confirm that this data can be accessed from within the page?

Reply to "Magic Words?"

MobileFrontend Nearby + GeoData does not work with unverified websites in Chrome 50+

RFlan (talkcontribs)

SSL is required in order for Chrome to allow a website to ask for a user's location.

Naramoksu (talkcontribs)

I have similar problem.

From MW 1.29, Nearby did not worked. there was a parsing error at #coordinates.

  • current version of my private wiki : 1.30.0
  • I'm using SSL

I think semanticmediawiki Maps have something to do with parsing error. After I remove SMW maps, a parsing error was not happened and Nearby worked.

Any one who have idea to fix this, let me know.


Vedmaka (talkcontribs)

I can confirm that GeoData conflicts with Maps extension - both define `cooridnates` parser-function and it seems like the one from Maps overrides the one from GeoData

Reply to "MobileFrontend Nearby + GeoData does not work with unverified websites in Chrome 50+"

How to convert from MySQL to ElasticSearch

Clarkcj12 (talkcontribs)

If you install it without elasticsearch to use the MySQL backend is there a way to convert it to use ElasticSearch if you later install ElasticSearch?

Reply to "How to convert from MySQL to ElasticSearch"

1.29.0 version GeoData.php file missing

Summary by Naramoksu

1.30.0 I found GeoData.php

Naramoksu (talkcontribs)

I downloaded and installed GeoData 1.29.0 version but it make problem. I found the source file does not have GeoData.php file in GeoData folder.

Naramoksu (talkcontribs)

I do not found GeoData.php file at the 1.29.1 version also. (talkcontribs)

Is prop=coordinates function disabled in wikipedia?

The example links return only piageid, ns and title!

Reply to "coordinates"

Does gsglobe= work for any value other than "earth"?

Gapfall (talkcontribs)
Reply to "Does gsglobe= work for any value other than "earth"?"

Confusion on Database, dimension, precision

Jc3s5h (talkcontribs)

The page contains the passage "This extension adds a new parser function, {{#coordinates:}}, that saves coordinates to the database. Function's input format is made as compatible as possible with GeoHack"

I don't understand what database is being referred to. Does it mean WikiData? Does adding coordinates to a Wikipedia article add the coordinates to WikiData? (That seems unlikely.)

Also, there is a conflict between WIkiData and this page. WikiData Wikibase/DataModel has a precision field. It is not defined exactly what this represents, but the normal interpretation by a person with a technical background would be the uncertainty in the measurement process that produced the latitude and longitude. The DataModel used to have a dimension field, but that was deleted in March. This page has a dimension parameter.

The problem is that depending on the object and measurement method, we could have a large object with a point within it that has been precisely determined (e.g. the Washington Monument) or we could have a tiny object who's position has not been precisely determined (e.g. the Airy transit circle at the Royal Observatory, Greenwich).

Reply to "Confusion on Database, dimension, precision"
Gborgonovo (talkcontribs)

I have Extension:Maps, Extension:MobileFrontend, etc. etc. installed. Is it possible to center a map on the user position showing pages around it? Thank you.

Reply to "Map center on user position"