Re: [Talk-GB] OSM UK's first tile layer

2020-11-06 Thread Adrian via Talk-GB
The test will be, if Rob is able to produce example areas processed with the OS 
look-up table transformation, do the misalignments go away?

Sorry for a rather long and technical message.

I've done some more investigation and testing. QGIS reckons EPSG:27700 is the 
OS look-up table transformation, while JOSM thinks it is the Helmert 
transformation. The ultimate authority is the EPSG registry 
https://epsg.org/crs_27700/OSGB-1936-British-National-Grid.html . Unfortunately 
that page is not entirely clear. But there is a reference to the OSTN15 grid 
file in a footnote, so I think EPSG:27700 is intended to be the look-up table 
transformation. So, apologies for saying previously that EPSG:27700 is the 
Helmert transformation.

The work to incorporate a large number of projections into JOSM was done nearly 
five years ago. It is based on proj4. Both proj4 and proj5 have EPSG:27700 as 
the Helmert transformation (based on looking at the strings, and on the 
behaviour of JOSM). proj6 and proj7 have EPSG:27700 as the most basic 
transformation, which gives misalignments of over 100m (based on looking at the 
strings). By 'string', I mean the line of text that begins +proj=. Some file 
formats for geographic information (GIS files), can accommodate a range of 
projections. Most of these declare the projection near the beginning of the 
file. The Land Registry open data are such files and they declare EPSG:27700. 
If you process them with proj, or an app that uses proj, you are not going to 
get the right results unless you can override the declaration.

The strange thing is that QGIS also uses proj. The developers of QGIS must have 
altered the definition of EPSG:27700 from the one built-in to proj. But I 
haven't discovered exactly what has been done.

I set about loading some of the Land Registry open data into JOSM, with the 
look-up table transformation. With the opendata plugin, JOSM can read a range 
of GIS file formats. Unfortunately that does not include .gml, the format of 
the Land Registry files. The Land Registry suggest using QGIS, so I did. JOSM 
and QGIS have four formats in common, KML, geoJSON, Esri shapefile .shp, and 
MapInfo file .mif. I am a complete newbie to QGIS, but it is a nightmare! The 
option to disable projection handling (No CRS) does not work properly. (This 
would give a means of overriding the declaration in the file.) With three of 
the four formats for the output file, KML, .shp and .mif, QGIS simplified the 
polygons, weeding out nearly half of the nodes. QGIS gave no warning of this, 
and I could not find an option to turn off this behaviour. (There is an option 
to turn off this behaviour for rendering. Perhaps it would have turned it off 
for output too. But why were geoJSON files unaffected?) When writing a .mif 
file in EPSG:27700 projection, QGIS wrote the most basic transformation as the 
projection, without giving a warning. QGIS did this because the .mif format has 
limitations on the projection definitions that it can handle. Perhaps the 
latest version of QGIS is a bit buggy and I should have used the LTS version.

I tried doing the transformation in QGIS, then loaded the output file into 
JOSM. All four file formats worked, and gave the same results (apart from the 
loss of nodes with three of the formats). So if you're using QGIS, I'd 
recommend doing it this way and using geoJSON. It doesn't even need the 
opendata plugin. If you want to do just the file format conversion in QGIS, and 
do the transformation in JOSM, it's more tricky. The KML and geoJSON formats 
are ruled out because they must by definition contain WGS 84 lats and longs. So 
you are stuck with the loss of nodes. The .shp format gives up to 5m 
misalignment because QGIS declares EPSG:27700 in the file and the opendata 
plugin provides no means for overriding the EPSG:27700 and using the custom 
projection I described previously. The .mif format works (in terms of getting 
no misalignment) if you do a simple hack. Open the .mif file in a text editor 
and change the fourth line from CoordSys Earth Projection 8, 79, "m", -2, 49, 
0.9996012717, 40, -10 to CoordSys Nonearth Units "m" Bounds (0.0, 0.0) 
(130.0, 130.0) ensuring that none of the spaces are omitted. This means 
that no projection is defined in the file and the opendata plugin will then ask 
you which projection you want to use. You simply choose the custom projection, 
provided that you have previously set it up. (You may need to scroll down to 
see the Okay button.) The transformation in JOSM gives essentially the same 
results as the transformation in QGIS.

For the newbie, here's how to do the transformation in QGIS. Launch QGIS. 
Create a new project. Then Layer > Add Layer > Add Vector Layer and open the 
.gml file you have downloaded from the Land Registry open data. Accept the 
suggested CRS of EPSG:27700 and close the Data Source Manager dialog. Then 
Layer > Save As > choose Format GeoJSON, filename as 

Re: [Talk-GB] Multi-lingual tagging in Wales

2020-11-06 Thread Christopher Jones
A default to English is perhaps a little tone deaf. 

As Andy wisely suggests, seeking a consensus among (ideally local) mappers is 
the way forward here. 

—
Chris

> On 31 Oct 2020, at 18:19, Jez Nicholson  wrote:
> 
> I like it.
> 
> + "in the event of dispute... the default language is English."? 
> .although I'm not sure how to define dispute'.
> 
> On Sat, 31 Oct 2020, 11:07 Ben Proctor,  wrote:
> Thanks Chris (and everyone else) for your very helpful contributions. 
> 
> I've tried to synthesise the discussion on this thread and would like to 
> propose the following for the Wales section of the Multilingual Tagging page 
> on the OSM Wiki. 
> 
> This would be a slight change from the current entry
> 
> BEGINS/---
> 
> In Wales many, but by no means all, places and features are named differently 
> in Welsh and English. 
> 
> Instances where the name is different in Welsh and English
> 
> The name tag should contain the name widely used by the local population. 
> 
> This should be either the name used in English or the name used in Welsh but 
> not both.
> 
> If the name included in the name: tag is that used in English, name:cy can be 
> added to show the alternate name (cy is the two letter ISO639-1 language code 
> for the Welsh language).
> 
> If it is the name included in the name: tag is the name used in Welsh, 
> name:en can be added to show the alternate name (en is the two letter 
> ISO639-1 language code for the English language).
> 
> Examples:
> 
> name: Welshpool
> name:cy Y Trallwng
> 
> name: Biwmares
> name:en Beaumaris
> 
> It should not be necessary to add both name:en and name:cy though it is not 
> harmful to do so.
> 
> Instances where the name is the same in Welsh and English
> 
> The name: tag should contain the name.
> 
> It is not, in principle, necessary to add either a name:cy or a name:en 
> (since there is only one name in both languages). 
> 
> However
> 
> Multi-lingual tagging in Wales is currently patchy. Adding a name:cy tag even 
> though this will duplicate the information in the name: tag would help other 
> mappers distinguish between cases where multi-lingual tagging has not yet 
> been applied and cases where the name is the same in Welsh and English.
> 
> Example:
> name: Caernarfon 
> name:cy Caernarfon
> 
> ---/ENDS
> 
> 
> I *think* this largely synthesises the discussion so far. I'd welcome more 
> comments on this.
> 
> 
> On Wed, Oct 21, 2020 at 4:40 PM Christopher Jones  wrote:
> Hi Ben,
> 
> Personally, I don’t see the point of 
> 
> name: Swansea
> name:en Swansea
> name:cy Abertawe
> 
> It's stating the obvious that if name:cy is not the same as name: for a place 
> in Wales, the name attribute is the English, and visa versa. It’s a little 
> close to “tagging for the renderer” for my taste. That said it costs little 
> to duplicate it in practice, so rock on if that’s what you want to do!
> 
> Regarding what should be in the name tag, we have a set of flawed options…
> 
> You initially suggested using a “widely” known by rule, this by its nature 
> favours the English names. The majority of the Welsh population are primary 
> English speakers, and despite a huge amount of time and money being spent on 
> welsh language laws and education provision that’s not about to change in any 
> of our lifetimes, even the welsh governments hugely ambitious target is for 
> 1M welsh speakers by 2050, that still less than a third of the population.
> 
> • always use the name that is used in Welsh 
> 
> In Gwynedd where 65% of the population identify as able to speak welsh, this 
> might make some sense, in Blaenau Gwent where its 7.8%, this makes no sense. 
> (Figures from the 2011 census) 
> 
> • use the Welsh name and English name together separated by a hyphen 
> (which is the practice in some other countries)
> 
> I’m going to refer you to 
> https://lists.openstreetmap.org/pipermail/talk-gb/2017-August/020478.html 
> where I made my argument against this (tl;dr - its ugly, confusing and there 
> are much better ways of achieving the aim (ie localised renders)) 
> 
> • use the name on local signage
> 
> I’m going to assume you mean to use the first name on the local signage 
> because the vast majority of signage has both English and welsh names (where 
> they both exist), indeed its been a legal requirement for them to do so for 
> quite some time. The major issue with this is since the Welsh Language 
> Measure of 2011 councils have a duty to ensure "that the Welsh language is 
> treated no less favourably than the English language” this ensures that on 
> any sign made in the last 10 years Welsh is first regardless of local usage.
> 
> So we end up with the status quo….
> 
> • use the name that is used by the "local population" (which is what 
> the wiki currently suggests)
> 
> This too has issues, the main one being its hard to verify, it relies on 
> local mappers being able to reach a consensus.
> 
> To me, this 

Re: [Talk-GB] Multi-lingual tagging in Wales

2020-11-06 Thread Christopher Jones
This looks good to me!

Thanks!

—
Chris

> On 31 Oct 2020, at 11:03, Ben Proctor  wrote:
> 
> Thanks Chris (and everyone else) for your very helpful contributions. 
> 
> I've tried to synthesise the discussion on this thread and would like to 
> propose the following for the Wales section of the Multilingual Tagging page 
> on the OSM Wiki. 
> 
> This would be a slight change from the current entry
> 
> BEGINS/---
> 
> In Wales many, but by no means all, places and features are named differently 
> in Welsh and English. 
> 
> Instances where the name is different in Welsh and English
> 
> The name tag should contain the name widely used by the local population. 
> 
> This should be either the name used in English or the name used in Welsh but 
> not both.
> 
> If the name included in the name: tag is that used in English, name:cy can be 
> added to show the alternate name (cy is the two letter ISO639-1 language code 
> for the Welsh language).
> 
> If it is the name included in the name: tag is the name used in Welsh, 
> name:en can be added to show the alternate name (en is the two letter 
> ISO639-1 language code for the English language).
> 
> Examples:
> 
> name: Welshpool
> name:cy Y Trallwng
> 
> name: Biwmares
> name:en Beaumaris
> 
> It should not be necessary to add both name:en and name:cy though it is not 
> harmful to do so.
> 
> Instances where the name is the same in Welsh and English
> 
> The name: tag should contain the name.
> 
> It is not, in principle, necessary to add either a name:cy or a name:en 
> (since there is only one name in both languages). 
> 
> However
> 
> Multi-lingual tagging in Wales is currently patchy. Adding a name:cy tag even 
> though this will duplicate the information in the name: tag would help other 
> mappers distinguish between cases where multi-lingual tagging has not yet 
> been applied and cases where the name is the same in Welsh and English.
> 
> Example:
> name: Caernarfon 
> name:cy Caernarfon
> 
> ---/ENDS
> 
> 
> I *think* this largely synthesises the discussion so far. I'd welcome more 
> comments on this.
> 
> 
> On Wed, Oct 21, 2020 at 4:40 PM Christopher Jones  wrote:
> Hi Ben,
> 
> Personally, I don’t see the point of 
> 
> name: Swansea
> name:en Swansea
> name:cy Abertawe
> 
> It's stating the obvious that if name:cy is not the same as name: for a place 
> in Wales, the name attribute is the English, and visa versa. It’s a little 
> close to “tagging for the renderer” for my taste. That said it costs little 
> to duplicate it in practice, so rock on if that’s what you want to do!
> 
> Regarding what should be in the name tag, we have a set of flawed options…
> 
> You initially suggested using a “widely” known by rule, this by its nature 
> favours the English names. The majority of the Welsh population are primary 
> English speakers, and despite a huge amount of time and money being spent on 
> welsh language laws and education provision that’s not about to change in any 
> of our lifetimes, even the welsh governments hugely ambitious target is for 
> 1M welsh speakers by 2050, that still less than a third of the population.
> 
> • always use the name that is used in Welsh 
> 
> In Gwynedd where 65% of the population identify as able to speak welsh, this 
> might make some sense, in Blaenau Gwent where its 7.8%, this makes no sense. 
> (Figures from the 2011 census) 
> 
> • use the Welsh name and English name together separated by a hyphen 
> (which is the practice in some other countries)
> 
> I’m going to refer you to 
> https://lists.openstreetmap.org/pipermail/talk-gb/2017-August/020478.html 
> where I made my argument against this (tl;dr - its ugly, confusing and there 
> are much better ways of achieving the aim (ie localised renders)) 
> 
> • use the name on local signage
> 
> I’m going to assume you mean to use the first name on the local signage 
> because the vast majority of signage has both English and welsh names (where 
> they both exist), indeed its been a legal requirement for them to do so for 
> quite some time. The major issue with this is since the Welsh Language 
> Measure of 2011 councils have a duty to ensure "that the Welsh language is 
> treated no less favourably than the English language” this ensures that on 
> any sign made in the last 10 years Welsh is first regardless of local usage.
> 
> So we end up with the status quo….
> 
> • use the name that is used by the "local population" (which is what 
> the wiki currently suggests)
> 
> This too has issues, the main one being its hard to verify, it relies on 
> local mappers being able to reach a consensus.
> 
> To me, this remains the pragmatic option!
> 
> Thanks for reading! 
> 
> And Ben, thanks for taking on the welsh render!
> 
> —
> Chris - not a Welsh speaker, but ran cyOSM, the first multilingual OSM render 
> many moons ago.
> 
> 
> > On 21 Oct 2020, at 12:10, Ben Proctor  wrote:
> > 
> > Thanks to everyone who has chipped in