Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/wiki-place: Extract geocoordinates from Wikipedia article #26

Open
Amgine0 opened this issue Feb 21, 2018 · 2 comments
Open

tools/wiki-place: Extract geocoordinates from Wikipedia article #26

Amgine0 opened this issue Feb 21, 2018 · 2 comments

Comments

@Amgine0
Copy link

Amgine0 commented Feb 21, 2018

Most en.WP place articles include coordinates in a machine-readable format:

<span id="coordinates">
    <a href="/wiki/Geographic_coordinate_system" title="Geographic coordinate system">Coordinates</a>: <span class="plainlinks nourlexpansion"><a class="external text" href="//tools.wmflabs.org/geohack/geohack.php?pagename=%C3%98stfold&amp;params=59_20_00_N_11_20_00_E_source:itwiki_region:NO_type:adm1st">
        <span class="geo-default">
            <span class="geo-dms" title="Maps, aerial photos, and other data for this location">
                <span class="latitude">59°20′00″N</span> 
                <span class="longitude">11°20′00″E</span>
            </span>
        </span>
        <span class="geo-multi-punct"> / </span>
        <span class="geo-nondefault">
            <span class="geo-dec" title="Maps, aerial photos, and other data for this location">59.33333°N 11.33333°E</span>
            <span style="display:none"> / 
                <span class="geo">59.33333; 11.33333</span>
            </span>
        </span>
    </a>
</span>

These are added using the {{coord}} template if you are parsing the wikitax. In this example: {{coord|59|20|00|N|11|20|00|E|source:itwiki_region:NO_type:adm1st|display=title}} from https://en.wikipedia.org/wiki/%C3%98stfold

@fisharebest
Copy link
Member

That looks very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants