User:Arjunaraoc/Adding Telugu place names to mandal admin centres

From OpenStreetMap Wiki
Jump to navigation Jump to search

Last update date: 22 November 2019‎

Adding Telugu place names to mandal admin centres need to be done by the following steps

0.use osm-wikidata website to match as many places as possible

0.1 Add wikidata to admin_centres not having wikidata

Match based on the fist five characters to get qid. For match failures, investigate and add wikidata manually

0.2 Get map data of all mandals admin_centres without wikidata

Download the data as districtwdup.osm file

Use osmcsvappender to append wikidata tags. $python osmcsvappender.pyc --cmdln "districtwdup.osm" "districtwd.csv" "/home/arjun/Desktop/osmcsvappender/" "," '"' "[['place','*']]" "['node']" "['name:te']" "osmfullid" "True" This generates a new .osm file of name districtwdup_osmcsvappender_<run-number>.osm

Upload the result using josm.


1) Extract mandals with admin_centres not having name:te values

If you see only node number and no name, investigate in open streetmap as the node may be part of a way. Separate the node from the ways.

If you do not see Wikidata IDs for any node, add them after getting the same from wikidata.

Rerun the query after edits.

Export the data into a spreadsheet with sheetname osm

2) Extract places and their wikidata, osmlinks

PREFIX osmt: <https://wiki.openstreetmap.org/wiki/Key:>

if required before running.

Sort on osmlinks to see mostly mandal_centres.

If the wikidata itemLabel of admin centres as additional information in parenthesis, edit in wikidata to remove them and update the description as required. We use the Label for Telugu to update in OSM.

After any changes, obtain the osm, wd ids again from queries.

Export the data into a spreadsheet with sheetname wd

3) Create the required name:te data

  1. In sheet name osd, populate osmfullid field as concatenaton of "n" and osmid
  2. In sheet name osd, populate name:te field as VLOOKUP of qid in sheet wd.
  3. If there are #N/A in the result investigate in Wikidata, Telugu Wikipedia, Openstreetmap to make necessary changes.

Sometimes,the wikidata used for a node might have been redirected to another, hence there won't be match. Update the wikidataid in openSteetmap.

There may be two different QIDs for same admin_centre. You need to merge them and update the final QID in OSM.

After update in openstreetmap, wait for 15 minutes (needed for sophox.org service sync), to get corrected data. If it is overpass turbo, wait for a minute or so to get corrected data.

Select the columns osmfullid and name:te and paste in a new spreadsheet. Export the spreadsheet as district-name-te.csv

When there are no matches(possibly from wrongly tagged wikidata in OSM, multiple entries in wikidata which need to be merged etc, no wikidata entry), investigate and update wikidata, name:te manually, suitably editing wikidata, openstreetmap as required.


4) Get map data of all mandals admin_centres without name:te


5) Run osmcsvappender as follows python osmcsvappender.pyc --cmdln "district.osm" "district-name-te.csv" "/home/arjun/Desktop/osmcsvappender/" "," '"' "[['place','*']]" "['node']" "['name:te']" "osmfullid" "True" This generates a new .osm file of name district_osmcsvappender_<run-number>.osm


6. Update the changed data into OSM

Open the district_osmcsvappender_<run-number>.osm in JOSM.

Verify some sample changes. If found to be fine, upload the data with comment "added name:te to admin_centres #osmcsvappender" souce as "wikidata"

7. Check the update



Time estimate

Can take about 5 minutes for a node based on initial work


Example Result