Page MenuHomePhabricator

Geoshape service should return map mask polygon with holes
Closed, ResolvedPublic


We have the Geoshape service that allows to draw a polygon representing the outlines of a geographical object by its Wikidata ID.


<mapframe text="Alaska" width=300 height=300 zoom=3 longitude=-152.58 latitude=64.01>
  "type": "ExternalData",
  "service": "geoshape",
  "ids": "Q797"

To better highlight an area, It would be great to support a invert=true (property name TBD) to draw the outline as a hole in a polygon that covers the entire map (commonly referred as map mask).
Such mask polygon is : [[3600,-180],[3600,180],[-3600,180],[-3600,-180],[3600,-180]].

The GeoJSON would look like this:

<mapframe text="Alaska" width=300 height=300 zoom=3 longitude=-152.58 latitude=64.01>
  "type": "ExternalData",
  "service": "geomask",
  "ids": "Q797"


Related Gerrit Patches:
mediawiki/extensions/Kartographer : masterAdded geomask backend support

Event Timeline

JGirault created this task.Sep 25 2016, 2:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 25 2016, 2:22 PM
JGirault updated the task description. (Show Details)Sep 25 2016, 2:26 PM

Change 314611 had a related patch set uploaded (by Yurik):
WIP: Added geomask backend support

Change 314611 merged by jenkins-bot:
Added geomask backend support

Yurik added a subscriber: Yurik.Oct 28 2016, 8:21 PM

This is done with "geomask" external service, same params as "geoshape".

Yurik closed this task as Resolved.Oct 28 2016, 8:21 PM
Yurik claimed this task.
Yurik updated the task description. (Show Details)Oct 28 2016, 8:22 PM
Wrh2 added a subscriber: Wrh2.Nov 15 2016, 4:05 AM