I think I got the point. The contour lines are plotted only when the tag
contour type is present. I just have to learn more about the render.xml
files.
Today I found a python script on their git repository to make contour
lines, but it cannot be correct, because they are not adding this new tag.
Maybe it is an old version. The following is only part of the script.
for way in ways:
nds=way.findall('nd')
newWay = etree.Element("way",id=str(wayid))
# create nodes in the output tree
for nd in nds:
ref=nd.get('ref')
try:
newNode = etree.Element("node",id=str(nodeid), lon=nodeList[ref].get('lon'),
\
lat=nodeList[ref].get('lat'))
except:
newNode = etree.Element("node",id=str(nodeid), lon="0",\
lat=nodeList[ref].get('lat')) # Srtm2Osm bug on lon="0"
newNd= etree.Element("nd",ref=str(nodeid))
nodeid+=1
outRoot.append(newNode)
newWay.append(newNd)
newTag= etree.Element("tag",k="contour", v="elevation")
newWay.append(newTag)
tags=way.findall('tag')
for tag in tags:
if tag.get('k')=='ele':
ele=tag.get('v')
#pdb.set_trace()
newTag= etree.Element("tag",k="ele", v=ele)
newWay.append(newTag)
#pdb.set_trace()
# Add a 'name' tag to render elevation on 100m lines
if int(ele) % 100 == 0:
newTag= etree.Element("tag",k="name", v=ele)
newWay.append(newTag)
outRoot.append(newWay)
wayid+=1
Now that the contour lines are there (with your tips) I realized that the
elevation information for routes calculated with OsmAnd are not present for
tracks in Fernando de Noronha. I am thinking that some tag is missing again
...
--
You received this message because you are subscribed to the Google Groups
"Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.