Page MenuHomePhabricator

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

Description

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

Example:

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

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"
}
</mapframe>

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

https://gerrit.wikimedia.org/r/314611

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

https://gerrit.wikimedia.org/r/314611

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