Page MenuHomePhabricator

WIWOSM wikidata not being updated for Q123 requests
Open, Needs TriagePublic

Description

In itwiki we have noticed that WIWOSM doesn't work with some locations, example:

the map works correctly for https://it.wikipedia.org/wiki/Milano:

For https://it.wikipedia.org/wiki/Troms_og_Finnmark OSM object is missing and so map is positioned at 0,0 coordinates:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper changed the task status from Open to Stalled.Sep 14 2017, 9:01 PM

@Rotpunkt: Could you please answer the last comment?

Hi, yes, it's still an issue.

If you click on:
https://tools.wmflabs.org/wiwosm/osm-on-ol/kml-on-ol.php?lang=it&title=Pergola%20(Italia)

the map will show coordinates 0,0 instead of Pergola position.

Aklapper changed the task status from Stalled to Open.Sep 15 2017, 3:16 PM

I'm not entirely sure who maintains this service, but maybe @akosiaris knows?

The list of maintainers of the service can be found on the tools page: http://tools.wmflabs.org/admin/tools (search for wiwosm). From what I understand, for an object to be shown by this service, it has to be tagged appropriately in the OSM data. That might not be the case for Pergola.

Hmm, @Yurik might have tried to fix this on OSM some 10 months ago. Maybe the data that WIWOSM is using is not updating ?

I'm not entirely sure who maintains this service, but maybe @akosiaris knows?

I see the maintainer have been added already (thanks @TheDJ) and https://grafana.wikimedia.org/dashboard/db/openstreetmap?orgId=1 show that the server(labsdb1007) powering WIWOSM is up to date with planet openstreetmap, so I don't think I can add anything more useful here. I 'll remove myself from the subscribers.

Aklapper renamed this task from WIWOSM doesn't work with some locations to WIWOSM doesn't work with some locations (coordinates are zero).Mar 30 2018, 11:26 PM
Pikne renamed this task from WIWOSM doesn't work with some locations (coordinates are zero) to WIWOSM not being updated.Mar 17 2020, 8:04 AM
Pikne added a project: Tools.
Pikne updated the task description. (Show Details)
Pikne subscribed.

Seems correct now

It seems WIWOSM was updated about year ago, after not being updated for a couple of years. So now examples older than that work. Newer objects however are still not available in WIWOSM (I updated task description with an example).

Previously @Kolossos explained here that due to queries being slow and breaking down database wasn't updated after 2016.

Queries are slow? @TheDJ Are these the Geodata queries you talked about?

Newer objects however are still not available in WIWOSM (I updated task description with an example).

I see, thank you for clarification

Nux renamed this task from WIWOSM not being updated to WIWOSM wikidata not being updated for Q123 requests.Oct 4 2022, 10:39 PM

Hi. Anybody know what objects WIWOSM is using? Hints and speculations are welcome, because I could use some clues.

Specifically what are those big numbers (because definitely not lon,lat):

obraz.png (818×1 px, 433 KB)

{
	"0": [
		[1264965.92,5464638.47],
		[1265115.22,5464594.23],
...
}

Not sure if open layers used in WIWOSM were modified to support this coordinates? Or is this something that old OL supported?...

I made a test proxy for Wikimedia Maps @Kolossos mentioned in Community_Wishlist_Survey_2019/Maps/OSM_map_problem_on_dewiki. The results of displaying Alaska on WIWOSM are not exactly correct ;-)

obraz.png (130×204 px, 3 KB)

The same Alaska features from Wikimedia Maps works fine in new OL though. So not sure what happens here.

The large number are from Google -Mercator projection (Projection-Number 900913)
WGS84 is Projection Number 4326. It comes from the history that Openlayers was a clone of Google Maps.
With the used coordinate system the browser doesn't have to re-project and is so a little bit faster.
Explaination in PostGIS: https://postgis.net/workshops/postgis-intro/projection.html

Nowadays you should be able to use WGS84 in Openlayers.

In the file https://github.com/wikiosm/osm-on-ol/blob/main/kml-on-ol.php in line 189 & line 190.
I believe you can find a way how to handle projections in old Openlayer.
I hope nowadays are the browsers and the computers fast enough for retransformation of coordinates in the browser, maybe also in the past it was never a real problem beside IE 6.0 ...

@Kolossos Yes, sorry I didn't respond. I will just have to read more about those projections or maybe do more tests... Or start a rewrite to new OpenLayers like we talked before...

I did try to do various transforms, but it just doesn't make sense to me why this doesn't work.
https://github.com/wikiosm/osm-on-ol/blob/main/kml-on-ol-test.php#L356

This and other things just didn't seemed to worked:

var gformat = new OpenLayers.Format.GeoJSON({
        'internalProjection': map.baseLayer.projection,
        'externalProjection': new OpenLayers.Projection("EPSG:3857")
});

I just wasn't able to transform Wikimedia data to display correctly on OSM. Not sure why this doesn't work.

This is what I thought to be true, but not sure if I understand correctly:

const feats = gformat.readFeatures(geojsonObject, {
  featureProjection: "EPSG:3857"
});
  • So 'externalProjection': new OpenLayers.Projection("EPSG:3857") should work too...
  • But also doesn't make sense to me if internalProjection is EPSG:900913 which is a synonym for EPSG:3857.

@Nux: I believe we did nasty stuff.
Look for the following line:

gg = '{"type":"FeatureCollection", "features":[{"geometry": ' +	  response.responseText + '}]}';

So we ask for the core of the geoJSON and put it in response.responseText than we make a frame with FeatureCollection, etc. around.

I believe you can replace the line by:

gg = response.responseText ;

Sorry for that.