mediawiki api - Filter Wikipedia geosearch per region -


i saw wikipedia api (called mediawiki geodata) search wiki pages around fixed coordinates. example call is

https://it.wikipedia.org/w/api.php?action=query&list=geosearch&gsradius=10000&gscoord=37.786971|-122.399677 

i saw geodata, in extra parameters, has concept of region, accepting iso 3166-2 region code.

how can search elements, filtering per region code? example, if searching around coordinates near border between 2 regions, able filter elements of 1 region?

short answer: can't.

longer answer: lack 2 features filed in issue tracker you, i.e.

for now, you'll have client-side: figure out coordinates of each region , filter those; or search region in wikidata statements , fetch corresponding articles in language desired. developer help import country data in wikidata ;-).

(expanded maxsem's answer, hence wiki.)


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -