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

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

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

Yurik claimed this task.