Extension talk:GeoData

Jump to navigation Jump to search

About this board

Special:Nearby not working

1
Antonkarpp (talkcontribs)

Now I have the following problem: I have the Near Near feature, i.e. GeoData. I have written Geodata nearby and true position LocalSettings.php together and came to my wiki nearby function. But now when the king "show nearby articles," it says, "There's a problem with Nearby. Try updating the location." What to do?

Reply to "Special:Nearby not working"

Labelling secondary coordinates

3
Le Deluge (talkcontribs)

Hi guys. I've been playing around with the API on en.wiki. and have a question. By default any secondary coordinates in the API output get labelled with the name of the article, which isn't necessarily very helpful. However WIWOSM is managing to extract the HTML anchor names for secondary coordinates on eg a list article of listed buildings in a county or the junctions on a motorway. I can't see how to do that via the API, am I missing something or is WIWOSM doing something clever that isn't available to mere mortals (short of parsing the list article directly)? TIA Le Deluge (talk) 14:58, 24 March 2020 (UTC)

TheDJ (talkcontribs)

Wiwosm uses screenscraping, it doesnt use this extension. Ive been looking into this a bit to see how to bring everything together, increase consistency and reliability, but its a big set of work that needs to happen in all prts of map support.

Le Deluge (talkcontribs)

OK, no worries. Looking at the UK, the biggest one seems to be the lists of listed buildings which use a template which presumably has scope to be helpful, also the lists of place names and to a lesser extent eg junctions on motorway articles. In principle I guess you could templatify those and it would cover the vast majority of secondary coords in the UK, even if you'd need something cleverer to do absolutely every point. As an aside, congrats and thanks to everyone who's worked on these APIs, they've come a long way since I last looked at them years ago.

Reply to "Labelling secondary coordinates"
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 ''
end

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
	end
	return result or ''
end
Silkwood (talkcontribs)

Thanks so much.

I'll give it a try.


أحمد (talkcontribs)

I think Extension:Maps should opt to change the name of its function to something more relevant to its function, and clear the way for using both extensions simultanously.

46.69.103.27 (talkcontribs)

That would be handy!

Reply to "GeoData does not work"
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?

أحمد (talkcontribs)

From the documentation, I assume that the data can be accessed through the API only. I think that being able to access it by using a parser function would be great, and would eliminate the need for the double storage of the data in another retrieval system, such as SMW. Of course integration between the two would be magnificent, but let's hope for little.

Reply to "Magic Words?"
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?"

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

3
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.

Thanks

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

1
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

2
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.

89.183.111.96 (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"?

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