Categories
Sylwebaeth

NaPTAN in Welsh: list of transport points now in Cymraeg

Do you take a keen interest in bus stops, railway stations, ferry ports, and other transport ‘nodes’?

Perhaps you are building a transport app or service, or looking into the provision and accessibility of transport in an area. Or perhaps you’re just a curious person.

What is NaPTAN?

If you’re still reading then let me tell you about NaPTAN which is a huge list of transport access points. The list includes bus stops, railway stations, tram stops, metro, underground, air and ferry, and includes locality information.

NaPTAN stands for National Public Transport Access Nodes, although it covers Wales, England, and Scotland. It is held by the Department for Transport of the UK government, who collect the data from various authorities, and publish it all as open data under the Open Government Licence (OGL).

Ble mae’r Gymraeg?

Just recently we’ve been alerted to a change in NaPTAN. The news is that it now includes place names in Welsh. Previously these were patchy or non-existent.

Check out the XML version of the data. You can download the data from the NaPTAN site or via the API. Look for the xml:lang=”cy” attribute, where “cy” or “CY” is the ISO 639-1 language code for Cymraeg. Here’s an example:

<StopPoint CreationDateTime="2000-01-01T00:00:00" ModificationDateTime="2024-05-02T09:51:14" Modification="revise" RevisionNumber="5" Status="active">
<AtcoCode>5810AWC51266</AtcoCode>
<NaptanCode>swajgpd</NaptanCode>
<Descriptor>
<CommonName>Morriston Library</CommonName>
<ShortCommonName>Library</ShortCommonName>
<Landmark>Morriston Library</Landmark>
<Street>Pentrepoeth Road</Street>
<Crossing>Treharne Road</Crossing>
<Indicator>o/s</Indicator>
</Descriptor>
<AlternativeDescriptors>
<Descriptor CreationDateTime="2024-05-02T09:51:15" ModificationDateTime="2024-05-02T09:51:15" Modification="new">
<CommonName xml:lang="CY">Llyfrgell Treforys</CommonName>
</Descriptor>
</AlternativeDescriptors>
<Place>
<NptgLocalityRef>E0054717</NptgLocalityRef>
<LocalityCentre>true</LocalityCentre>
<Location>
<Translation>
<GridType>UKOS</GridType>
<Easting>266970</Easting>
<Northing>198253</Northing>
<Longitude>-3.924981045</Longitude>
<Latitude>51.667255647</Latitude>
</Translation>
</Location>
</Place>
<StopClassification>
<StopType>BCT</StopType>
<OnStreet>
<Bus>
<BusStopType>MKD</BusStopType>
<TimingStatus>OTH</TimingStatus>
<MarkedPoint>
<Bearing>
<CompassPoint>NW</CompassPoint>
</Bearing>
</MarkedPoint>
</Bus>
</OnStreet>
</StopClassification>
<AdministrativeAreaRef>056</AdministrativeAreaRef>
<PlusbusZones>
<PlusbusZoneRef CreationDateTime="2000-01-01T00:00:00" ModificationDateTime="2012-07-06T00:00:00" Modification="new" RevisionNumber="0" Status="active">SWANSEA</PlusbusZoneRef>
</PlusbusZones>
</StopPoint>

At the time of writing there’s a total of 24633 data fields that include Welsh-language data. Most of these are names of nodes. At a glance these range from “Canolfan Iechyd Blaendulais” (bus stop) to “Gorsaf reilffordd Penarlag” (railway station) and brand names which transcend language like “Tesco” (several bus stops).

You’ll also see “gd” or “GD” language code for Scottish Gaelic data.

It currently seems as though coverage for Welsh-language names varies by local authority area.

By all means let us know if you do anything with the data.

Difference in the CSV

For some reason the CSV version on offer does not include names marked as being in Welsh. Its CommonName field usually gives the name used in English (but there are some exceptions). Hopefully the CSV will be updated by DfT to include all the names and other data in Welsh, in the appropriate fields.

Feedback

It’s worth noting that this looks to be a work in progress and that the names and the precise locations of stops may be subject to review or change. If you have any feedback on the data itself then you should send it to feedbacktraveline@tfw.wales

Diolch

Thanks to our contacts at Transport for Wales and Welsh Government who’ve brought this change to our attention, and for all their support and work towards Welsh-language mapping services.

Categories
Guides

How to use Mapio Cymru as a Welsh-language base map on your system

A couple of people have asked me how to use Mapio Cymru as a base map on their websites, apps, and other systems. This is a good way of providing visitors to your website with a map of Wales in the Welsh language.

In other words you can show our map tiles, which are the PNG images available through openstreetmap.cymru.

Then you can do whatever your system allows such as panning, zooming, and perhaps putting pins, shapes, images and other things on the map.

Embed

Before we press ahead, everything that follows is aimed at somebody who is comfortable coding, maintaining a system, or using GIS software.

If you DON’T want to work directly with the base map it’s possible to embed Mapio Cymru on a website. This is probably the fastest and simplest method. It’s very similar to how you would embed video players etc (using an iframe).

Go to openstreetmap.cymru and click Rhannu/Share for details on how to do this. You can get an HTML embed code or alternatively a direct link to a specific view of the map.

Which systems?

The rest of this blog post will describe how to use Mapio Cymru as a base map, for people who want to be a bit more technical.

There are quite a few systems that offer to set a base map of your choice, such as things that run Leaflet.js, e.g. Overpass Turbo.

For example there are a few WordPress plugins that allow you to show maps on your website – such as Leaflet Maps Marker, WP Go Maps, and others.

If you have the skills you could create a website from scratch with Leaflet.js and use Mapio Cymru as a base map. Unfortunately the details on how to do this go beyond this little guide today, but there are guides on the web!

There is also desktop software that uses base maps of your choice such as QGIS.

For those interested Mapio Cymru’s CORS headers now allow direct use of tiles. Please note that some content management systems may show a security warning about cross-site scripting.

The all-important settings

Use the address below as the base map:

https://openstreetmap.cymru/osm_tiles/{z}/{x}/{y}.png

Also if you have to give levels of zoom, put 3 as the minimum and 16 as the maximum.

Here is an attribution or credit you should give, to fulfil the open licensing conditions of OpenStreetMap data. Here’s the HTML version:

Defnyddiwch <a href=”https://www.openstreetmap.cymru” target=”_blank”>openstreetmap.cymru</a>. Data ar y map &#x24BD Cyfranwyr <a href=”https://openstreetmap.org” target=”_blank”>osm.org</a>

Alternatively here’s the plain text version:

Defnyddiwch openstreetmap.cymru. Data ar y map © Cyfranwyr osm.org

Get in touch

If you have managed to get the map on your website or system, please leave a comment with the method you used – and a link to the specific page on your website if possible.

Terms

Please be respectful and reasonable with your use of the Mapio Cymru server. Get in touch if you want to discuss ‘heavy’ use, especially if you are an organisation, service, or project of significant size.

We’ll have to review how things go if demand grows.

Categories
Guides

Command-line tools for you to create an OpenStreetMap-derived base map in the Welsh language

All the custom code which we use for the Mapio Cymru Welsh-language map server is now available in a repository.

This will be of particular interest if you want to provision your own server which produces map tiles in the Welsh language (or perhaps a different language of your preference). All code is licensed under GPL, allowing you to run it for any purpose, modify it, and redistribute it.

Please note that a basic knowledge of how to use the Linux command line is assumed.

The main tool is a Lua script called cartonamecy2name.lua which is run when importing data. It determines the name to be stored in the database, for any given entity on the map. OSM data is the main source for Mapio Cymru, particularly the name:cy and name tags, and also Wikidata name information via OSM’s wikidata tag. In editing these sources we also refer to open data from the Welsh Language Commissioner.

Many more details are given in the README file in the repository, including step-by-step instructions for use.

If you just want to use a Welsh-language map which already exists, ignore the above and head to openstreetmap.cymru!

Categories
Events

Mapio Cymru at FOSS4G: Using Switch2OSM tools to build a map in Welsh

It was a pleasure to take part in the FOSS4G conference today in Cardiff.

Here’s the recording of my talk about provisioning the Mapio Cymru server along with the slides.

This presentation will be of interest to people who want to advance mapping in lesser-resourced languages around the world. Then again, anybody with an interest in the overall growth of OpenStreetMap would do well to pay attention to the multilingual aspects of the project – in my view.

Thanks to the organisers and all participants for an insightful day at FOSS4G!

Categories
Events

Mapio Cymru talk at the FOSS4G conference

If you’re interested in the server software and data aspects of Mapio Cymru and OpenStreetMap, come to my talk at FOSS4G.

FOSS4G is the international Free and Open Source Software Conference for Geospatial. This year it is happening on Thursday 17th November simultaneously over several physical sites around Wales, Scotland, and England – including Cardiff where I will be.

As Mapio Cymru we’ve shared our learnings and enthusiasm at several events and organised a few of our own events, variously through the medium of Welsh and English. This time my talk will be through the medium of English. I am going to focus on the more technical side – what happens on the servers, plus some context about the Welsh language situation for those who might need it.

I’ll be discussing how we’ve built a map of Wales in Welsh, what technical and other challenges we’ve overcome, what the next steps will be, and share our overall vision for bringing mapping in Welsh to all.

Hopefully somebody out there will be inspired to contribute to mapping in the Welsh language or OpenStreetMap as a wider project, or start their own initiative – perhaps for another lesser-resourced language.

At the time of writing this I’ve just heard that the allocation of tickets for the Cardiff branch of the event is now running low. If you’re unable to get a ticket you can still watch the recording afterwards.

Categories
Milestones

New experimental map from Mapio Cymru to help you share more place names in Welsh

Mapio Cymru now has an experimental map you can browse, as a counterpart to the main map.

This map currently looks fairly similar to the main map, but it’s running on a separate server which I’ve provisioned for it:

pwlltywod.mapio.cymru

Look closely and you’ll see that all the place names are subtly different.

Why do this? The main purpose is to spot gaps in the data for names in Welsh. There are a few means by which a name can find its way to the main map. The map takes data from OpenStreetMap and Wikidata, and then processes it. We at the Mapio Cymru project wanted to convey the data source of each name on a map, but separately from the main map.

At the moment there are four potential sources noted in the experimental map’s key:

  • From the name:cy field (OpenStreetMap)
  • From the name field (OpenStreetMap) – while not labelled as being in Welsh the name looks as if it could be in Welsh, according to certain criteria. I need to blog about these criteria soon.
  • From Wikidata
  • No suitable name found (at the moment)

Please note that this key could change in future. Please refer to the map and its own key for details.

You won’t be able to do all the things that you can do with the main map, like search and easy embedding.

What you can do is browse the experimental map to find deficiencies and then edit OSM to enter names, in instances where the data is incomplete.

Your changes will appear on the main map and the experimental map.

Ultimately the place name you enter could then appear in a multitude of apps and projects, thanks to its licensing status as open data. I am very glad to offer this resource as a means of helping anybody who wants to share place names in Welsh. Thanks again to the Welsh Government for supporting this work.

The experimental map server is called the Pwll Tywod, or sand pit. This is denoted by the sandy coloured border. Our use of this term is to convey that we are playing with how it appears. Please excuse any occasional tech glitches you might see on the experimental map – but that’s the point.

Categories
Sylwebaeth

(Cymraeg) Enwau Cymraeg am adeiladau Gradd I o Fôn i Fynwy – eich cyfraniad plîs!

This entry is only available in Cymraeg.

Categories
Milestones

Decolonising Welsh mapping: uncovering Wikidata’s place names in Welsh

Recently Mapio Cymru as a project has been working with the National Library of Wales to uncover the place names in Welsh that are in Wikidata, and improve them.

Now there are hundreds of names from Wikidata on the map along with the names from OpenStreetMap (OSM).

Here’s Jason Evans from the library to elaborate on the work and its importance:

[…]

Combining Wikidata with OSM allows us to build on the work of Mapio Cymru which has been developing a map of Wales using only Welsh language data held in the OSM database. By aligning and combining this with Wikidata the map can begin to grow further, offering more information to users through the medium of Welsh.

And this is important. Many places in Wales, be they towns, villages, hills or beaches have two names, or sometimes more. The names in Welsh are almost always the original place names, ancient in origin and steeped in history. These names are usually descriptive or refer to long lost saints, chieftains or fortresses. The English versions of place names are sometimes meaningless mutations of the Welsh originals or names imposed by medieval invaders or Victorian ‘modernisers’. Even today historic properties are renamed in English by their new owners and Welsh names are dropped from websites and maps in favour of English alternatives deemed to be ‘more easy to pronounce’.

This project aims to decolonise mapping in Wales, not by erasing English place names from the record but giving users the option to view and explore a modern map of Wales solely through the medium of Welsh – a service that didn’t really exist until the launch of Mapio Cymru.

So the first challenge with this project is actually to encourage communities to contribute their local Welsh place names to OSM or Wikidata so that they can be included in the map, and this is done through a series of discussions, workshops and editing events. […]

Read the whole article on the National Library’s blog.

Categories
Sylwebaeth

What’s wrong with what3words? A video

The always pre-revenue what3words company has been buying up advertisement slots again, and there’s been some pretty unquestioning – might I say gushing – press coverage lately too.

I found this very interesting video which lists several of the serious weaknesses of the company and system.

A particularly big no-no for the Mapio Cymru team is the lack of open licensing of the data and software, mentioned in the video – and as a result the lack of peer review of the system.

The confusion inherent in converting from one language system to another is a cause for concern too.

See also: Rescuers question what3words’ use in emergencies (BBC)

Categories
Guides Events

VIDEO: Gweithdy Mapio Cymru, Eisteddfod AmGen 2021

This post is a video recording of our event Gweithdy Mapio Cymru held at Eisteddfod AmGen 2021.

The video is entirely through the medium of Welsh.

In the video we discuss:

Diolch o galon i Eisteddfod AmGen a’r Lle Hanes am y croeso, ac wrth gwrs i bawb a gymerodd rhan yn y gweithdy!