Talk:Les Etablissements "Tourisme & Handicap"

From OpenStreetMap Wiki
Jump to navigation Jump to search

Some considerations

Data assessment

  • As far as I see in the test umap, dataset geocoding quality isn't high, but allows manual (crowd) editing;
  • Aiming at automatic import, I'd try a new geocoding, nominatim based; we have to keep in mind that usable results are strongly dependant on current OSM addresses and T&H dataset addresses. UPDATE: looking at Etablissements_Tourisme_et_Handicap_mars_2015.xlsx, 2.300 out of 5.000 rows have ADRESSE without house number hence not allowing geocoding
  • Dataset contains some other useful infos on handicap type (auditif ; visuel ; moteur ; mental) to be considered for further tagging

--Cascafico (talk) 21:28, 11 March 2016 (UTC)

Import Alternatives

I think there are two alternatives for manual import.

  • single osm file and JOSM conflation plugin
  • umap with region based layers and Level0/JOSM editing

depending on how wide is the working group and its knowledge about editing tools --Cascafico (talk) 14:52, 19 March 2016 (UTC)

Tagging

Preliminary steps for tagging T&H dataset (Etablissements_Tourisme_et_Handicap_mars_2015.xlsx) columns and values:

  • convert appprox. 60 LATITUDE and LONGITUDE fields from Degree-Minute-second to decimal Degree notation (there are some Excel macros around)
  • save T&H excel dataset in cvs format
  • import csv in Quantum GIS

This approach is intended for keeping all data fields (T&H and OSM) in the same table, reproducing output files inside the same QGIS project.

Tagging mode 1

CATEGORIE and ETABLISSEM

Here's a draft for automatic mapping CATEGORIE, ETABLISSEM and HANDICAPS fields in a new one OSMTAGS, using QGIS field calculator syntax. This is aimed at generating an umap popup with OSM tags ready to copy&paste in Level0 text editor. Multiple tags are "\n" separated. AFAIK, to correctly display newlines, umap csv import doesn't work, while geojson and kml do.

CASE
  WHEN "CATEGORIE" = 'Activités sportives et de loisir' THEN CASE
            WHEN  "ETABLISSEM"  ILIKE 'Arboretum%' THEN 'arboretum=yes'
            WHEN  "ETABLISSEM"  ILIKE '%questre%' THEN 'leisure=horse_riding'
            WHEN  "ETABLISSEM"  ILIKE '%nautique%' THEN 'club=sport\nsport=sail'            
            WHEN  "ETABLISSEM"  ILIKE '%aquatique%' THEN 'leisure=swimming_pool' 
            WHEN  "ETABLISSEM"  ILIKE 'Piscine %' THEN 'leisure=swimming_pool' 
            WHEN  "ETABLISSEM"  ILIKE 'Arboretum%' THEN 'leisure=yes\narboretum=yes'
            ELSE 'leisure=sports_centre'
            END
  WHEN "CATEGORIE" = 'Café; bar; brasserie'  THEN CASE
            WHEN "ETABLISSEM"  LIKE '%Bar%' THEN 'amenity=bar'
            WHEN "ETABLISSEM"  LIKE '%Café%' THEN 'amenity=cafe'
            WHEN "ETABLISSEM"  LIKE '%Brasserie%' THEN 'amenity=restaurant'
	    ELSE 'amenity=bar'
            END
  WHEN "CATEGORIE" = 'Camping'   THEN 'tourism=camp_site'
  WHEN "CATEGORIE" = 'Centres d''accueil pour enfants -  jeunes' THEN 'social_facility=group_home'
  WHEN "CATEGORIE" = 'Chambre d''hôtes'  THEN 'tourism=guest_house'
  WHEN "CATEGORIE" = 'Gîte d''étape' THEN 'tourism=hostel'
  WHEN "CATEGORIE" = 'Hébergement collectif'  THEN 'tourism=hostel'
  WHEN "CATEGORIE" = 'Hôtel' THEN 'tourism=hotel'
  WHEN "CATEGORIE" = 'Hôtel-restaurant' THEN 'tourism=hotel\namenity=restaurant'
  WHEN "CATEGORIE" = 'Lieu de visite' THEN CASE
            WHEN  "ETABLISSEM"  LIKE 'Musée%' THEN 'tourism=museum'
            WHEN  "ETABLISSEM"  LIKE 'Château%' THEN 'tourism=attraction\nhistoric=castle'
            WHEN  "ETABLISSEM"  LIKE 'Cave%' THEN 'craft=winery'
            WHEN  "ETABLISSEM"  ILIKE 'Abbaye %' THEN 'amenity=place_of_worship\nhistoric=yes'
            WHEN  "ETABLISSEM"  ILIKE 'Aquarium%' THEN 'tourism=aquarium'
            WHEN  "ETABLISSEM"  ILIKE 'Arboretum%' THEN 'tourism=attraction\narboretum=yes'
            ELSE 'tourism=attraction'
            END
  WHEN "CATEGORIE" = 'Loisirs' THEN CASE
            WHEN  "ETABLISSEM"  ILIKE '%pique%nique%' THEN 'tourism=picnic_site'
            WHEN  "ETABLISSEM"  ILIKE 'Arboretum%' THEN 'leisure=yes\narboretum=yes'
            WHEN  "ETABLISSEM"  ILIKE 'Aquarium%' THEN 'tourism=aquarium'
            WHEN  "ETABLISSEM"  ILIKE 'Atelier%' THEN 'shop=yes'
            WHEN  "ETABLISSEM"  ILIKE 'Bateau %' THEN 'tourism=attraction\nhistoric=ship'
            WHEN  "ETABLISSEM"  ILIKE 'Cinéma %' THEN 'amenity=cinema'
            WHEN  "ETABLISSEM"  ILIKE 'Piscine %' THEN 'leisure=swimming_pool'
            WHEN  "ETABLISSEM"  ILIKE 'Plage %' THEN 'natural=beach' 
            WHEN  "ETABLISSEM"  ILIKE 'Salle de spectacles %' THEN 'amenity=theatre'
            WHEN  "ETABLISSEM"  ILIKE 'Théâtre %' THEN 'amenity=theatre'
            WHEN  "ETABLISSEM"  ILIKE 'Zoo%' THEN 'tourism=zoo'
            ELSE 'leisure=yes'
            END
  WHEN "CATEGORIE" = 'Meublé de tourisme' THEN 'tourism=chalet'
  WHEN "CATEGORIE" = 'Office de tourisme' THEN 'tourism=information\ninformation=office'
  WHEN "CATEGORIE" = 'Palais des Congrès' THEN 'amenity=conference_centre'
  WHEN "CATEGORIE" = 'Restaurant' THEN 'amenity=restaurant'
  WHEN "CATEGORIE" = 'Résidence de tourisme' THEN'tourism=apartment'
  WHEN "CATEGORIE" = 'Structure diverse' THEN 'amenity=yes'
  WHEN "CATEGORIE" = 'Village de vacances'  THEN 'tourism=resort'
 ELSE 'note=fixme'
END

Appending wheelchair if any:

CASE 
   WHEN "HANDICAPS" ILIKE '%moteur%' THEN concat("OSMTAGS",'\nwheelchair=yes')
   ELSE "OSMTAGS"
END

Some more specific OSM tags cannot be assigned automatically, ie: 'Lieu de visite' can be a tourism=museum or an educational path; generic tourism=attraction should be used, manual editing could follow. Often ETABLISSEMENT field helps and, of course, local knowlegde.

ogr2osm approach

Here's a draft for ogr2geo translation file:

# coding=utf-8
def translateName(rawname):
    '''
    A general purpose name expander.
    '''
    suffixlookup = {
    'mme':'madame',
    'Rd':'Road',
    'St':'Street',
    'Pl':'Place',
    'E':'East',
    'S':'South',
    'N':'North',
    'W':'West'}
	
    newName = ''
    for partName in rawname.split():
        newName = newName + ' ' + suffixlookup.get(partName,partName)

    return newName.strip()

    
def filterTags(attrs):
    if not attrs:
        return
    tags = {}
    
    if 'CATEGORIE' in attrs:
        if attrs['CATEGORIE'].strip() == u'Meublé de tourisme':
            tags['tourism'] = 'chalet'
        elif attrs['CATEGORIE'].strip() == 'Lieu de visite':
            tags['tourism'] = 'attraction'
        elif attrs['CATEGORIE'].strip() == 'Office de tourisme':
            tags['tourism'] = 'information'
            tags['information'] = 'office'
        if attrs['CATEGORIE'].strip() == u'Activités sportives et de loisir':
            if attrs['ETABLISSEM'].find("Arboretum") == 0:
                tags['leisure'] = 'park'
                tags['arboretum'] = 'yes'
            if attrs['ETABLISSEM'].find("questre") > 0:
                tags['leisure'] = 'horse_riding'
            if attrs['ETABLISSEM'].lower().find(" nautique") > 0:
                tags['club'] = 'sport'
                tags['sport'] = 'sail'
            if attrs['ETABLISSEM'].lower().find("aquatique") > 0:
                tags['leisure'] = 'swimming_pool'
            if attrs['ETABLISSEM'].lower().find("piscine") > 0:
                tags['leisure'] = 'swimming_pool'
			else:  
			    tags['leisure'] = 'yes'
        if attrs['CATEGORIE'].strip() == u'Café; bar; brasserie':
            if attrs['ETABLISSEM'].find("Bar") > -1:
                tags['amenity'] = 'bar'
            if attrs['ETABLISSEM'].find("Café") > -1:
                tags['amenity'] = 'cafe'
            if attrs['ETABLISSEM'].find("Brasserie") > -1:
                tags['amenity'] = 'restaurant'
			else:  
			    tags['amenity'] = 'bar'
        if attrs['CATEGORIE'].strip() == 'Camping':
            tags['tourism'] = 'camp_site'
        if attrs['CATEGORIE'].strip() == 'Centres d\'accueil pour enfants -  jeunes':
            tags['social_facility'] = 'group_home'
        if attrs['CATEGORIE'].strip() == u'Chambre d\'hôtes':
            tags['tourism'] = 'guest_house'
        if attrs['CATEGORIE'].strip() == u'Gîte d\'étape':
            tags['tourism'] = 'hostel' # maybe 'motel' but not necessarily motoristic
        if attrs['CATEGORIE'].strip() == u'Hébergement collectif':
            tags['tourism'] = 'hostel'
        if attrs['CATEGORIE'].strip() == u'Hôtel':
            tags['tourism'] = 'hotel'
        if attrs['CATEGORIE'].strip() == u'Hôtel-restaurant':
            tags['tourism'] = 'hotel'
            tags['amenity'] = 'restaurant'
        if attrs['CATEGORIE'].strip() == 'Lieu de visite':
            if attrs['ETABLISSEM'].lower().find("musée ") == 0:
                tags['tourism'] = 'museum'
            if attrs['ETABLISSEM'].lower().find("château ") == 0:
                tags['tourism'] = 'attraction'
                tags['historic'] = 'castle'
            if attrs['ETABLISSEM'].lower().find("cave ") == 0:
                tags['craft'] = 'vwinery'
            if attrs['ETABLISSEM'].lower().find("abbaye ") == 0:
                tags['amenity'] = 'place_of_worship'
                tags['historic'] = 'yes'
			if attrs['ETABLISSEM'].lower().find("aquarium") > -1:
                tags['tourism'] = 'aquarium'
			if attrs['ETABLISSEM'].lower().find("arboretum") > -1:
                tags['tourism'] = 'attraction'
                tags['arboretum'] = 'yes'
			else:  
                tags['tourism'] = 'attraction'			
        if attrs['CATEGORIE'].strip() == 'Loisirs':
            if attrs['ETABLISSEM'].lower().find("pique nique") > -1:
                tags['tourism'] = 'picnic_site'
            if attrs['ETABLISSEM'].lower().find("arboretum") > -1:
                tags['tourism'] = 'attraction'
                tags['arboretum'] = 'yes'
            if attrs['ETABLISSEM'].lower().find("aquarium") > -1:
                tags['tourism'] = 'aquarium'
            if attrs['ETABLISSEM'].lower().find("atelier") > -1:
                tags['shop'] = 'yes'
			if attrs['ETABLISSEM'].lower().find("bateau") > -1:
                tags['tourism'] = 'attraction'
                tags['historic'] = 'ship'
			if attrs['ETABLISSEM'].lower().find("cinéma") > -1:
                tags['amenity'] = 'cinema'
			if attrs['ETABLISSEM'].lower().find("piscine") > -1:
                tags['leisure'] = 'swimming_pool'
			if attrs['ETABLISSEM'].lower().find("plage ") > -1:
                tags['natural'] = 'beach'
			if attrs['ETABLISSEM'].lower().find("Salle de spectacles ") > -1:
                tags['amenity'] = 'theatre' # should be more generic ie: conference room
			if attrs['ETABLISSEM'].lower().find("théâtre ") > -1:
                tags['amenity'] = 'theatre'
			if attrs['ETABLISSEM'].lower().find("zoo ") > -1:
                tags['tourism'] = 'zoo'
			else:  
                tags['leisure'] = 'yes'			
        if attrs['CATEGORIE'].strip() == u'Palais des Congrès':
            tags['amenity'] = 'conference_centre'
        if attrs['CATEGORIE'].strip() == 'Restaurant':
            tags['amenity'] = 'restaurant'
        if attrs['CATEGORIE'].strip() == u'Résidence de tourisme':
            tags['tourism'] = 'apartment'
        if attrs['CATEGORIE'].strip() == 'Structure diverse':
            tags['amenity'] = 'yes'
        if attrs['CATEGORIE'].strip() == 'Village de vacances':
            tags['tourism'] = 'resort'
# starting handicap tags section
			if attrs['handicaps'].tolower().find("moteur") > -1:
            tags['wheelchair'] = 'yes'

# following part TODO
        elif attrs['CATEGORIE'].strip() == 'Ministry of Transportation':
            if translated and (translated == '#1 Highway' or translated == 'Golden Ears Bridge'):
                tags['highway'] = 'motorway'
            else:
                tags['highway'] = 'primary'
 
# general tags
       tags['source'] = 'Tourisme et Handicap'
        tags['name'] = attrs['ETABLISSEM']
    return tags

Tagging mode 2

ETABLISSEM

Splitting the 5k nodes dataset in different shp files upon field CATEGORIE, allows better tag definitions, based on field ETABLISSEM. For example,

  • CATEGORIE 'Hôtel-restaurant' generates tags: tourism=hotel and amenity=restaurant;
  • CATEGORIE 'Activités sportives et de loisir' can generate tags:
    • leisure=swimming_pool and sport=swimming, based on string "aquatique",
    • leisure=horse_riding, based on string "equestre".

Besides lighter layers for crowd support umap (TODO link).

This tagging mode requires more work on ETABLISSMENT for writing proper QGIS Field calculator queries.

TELEPHONE and FAX

OSM standard suggests +<nationcode> <area code> <number>; dataset seems not to adhere.

5.180 out of 5.201 telephone numbers do have leading zero, hence they can be easily standardized with Qgis field calculator; regular expression:

regexp_replace("TELEPHONE" ,'^[0]+','+33 (0) ') regexp_replace("FAX" ,'^[0]+','+33 (0) ')

Using umap

TODO