OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2019-03-27 12:56:09

grums
Member
Registered: 2019-03-27
Posts: 4

Elevation: How many (if any) decimal digits

In a map (made with Map Composer) of part of Andalucía I noticed many points having Elevation data with ridiculous accuracy: 5-8 decimals.
Not only are the decimals irrelevant, they also take up screen space when using the map on a GPS unit.
Is it up to the community to manually edit those points, or is it possible/legal/desirable for someboy close to the data to run some sort of cleanup batch job doing the same thing?
Regards, Ole

Offline

#2 2019-03-27 13:16:50

GerdP
Member
Registered: 2015-12-18
Posts: 827

Re: Elevation: How many (if any) decimal digits

Normally, ele values in OSM are without decimals. Can you give an example where you find those values? Maybe a link to an  OSM object?
Another question is why Map Composer creates a map containing those values. I think it uses mkgmap and therefore you might edit the style rules to use rounded values.

Offline

#3 2019-03-27 13:29:41

grums
Member
Registered: 2019-03-27
Posts: 4

Re: Elevation: How many (if any) decimal digits

Hi, thank you for a very fast reply!

The example map covers (-5.2,36.4)-(-3.6,36.9) (Marbella-Malaga-Nerja), I find (some of?) the points like this:

winstrings -n 6 mijas-nerja.img | egrep -i "[0-9]\.[0-9]*m"
PUERTO DE LA BOLINA (781.236903106M)
N (907.903166677M)
PUERTO COLORADO (459.092955612M)
EZ (565.274191203M)
PUERTO PEREDA (441.634729407M)
N (556.025746447M)
AS BLANCAS (765.338059483M)
PUERTO DE LA ALIZADA (449.143996191M)
PUERTO DE LA SABANILLA (590.998394741M)
PUERTO DE LOS LADRONES (851.317751139M)
PUERTO DEL MONTE (776.499587959M)
PUERTO BALLESTEROS (935.285164627M)
PUERTO DE LA CRUZ (95.4709986092M)
PUERTO DE LAS EMPEDRADAS (983.830563311M)
NEZ (673.0197007M)
PUERTO DE LOS PESCADORES (312.12899285M)
O (925.23728995M)
PUERTO DEL VIENTO (1075.61039557M)
PUERTO DE LAS ABEJAS (829.132700302M)

The first (Puerto de la Bolina) is: https://www.openstreetmap.org/node/5832707336.

And of course you're right about my Map Composer rendering rules - I'll look there next.

Regards

PS: Actually, the OpenFietsMap (based on OSM data) from garmin.openstreetmap.nl also includes all the decimals...

Last edited by grums (2019-03-27 13:32:48)

Offline

#4 2019-03-27 13:56:22

GerdP
Member
Registered: 2015-12-18
Posts: 827

Re: Elevation: How many (if any) decimal digits

Probably all mapped by the same user, see https://www.openstreetmap.org/changeset/61665082
I've commented that cs.

Offline

#5 2019-03-27 14:16:27

grums
Member
Registered: 2019-03-27
Posts: 4

Re: Elevation: How many (if any) decimal digits

Right: 174 points he made...
The OSM wiki states: elevations should usually be specified in integer metres - can't that be enforced in the editors - and doesn't it justify a general cleaning process?

Offline

#6 2019-03-27 14:55:35

GerdP
Member
Registered: 2015-12-18
Posts: 827

Re: Elevation: How many (if any) decimal digits

Reg. this special cs I'd like to wait for a reaction from the mapper.
Reg. editors: I've also opened a ticket for JOSM: https://josm.openstreetmap.de/ticket/17530
A general cleaning process is typically not easy to do, automatic edits have to be discussed and are rarely allowed.

Offline

#7 2019-03-27 17:20:37

alester
Member
Registered: 2011-09-21
Posts: 242

Re: Elevation: How many (if any) decimal digits

That supposed precision is absurd. At the 9th decimal place, you're talking about nanometers. I could see some survey-grade equipment providing centimeter or millimeter precision, but anything beyond that is pure fantasy for an elevation and entirely unnecessary for pretty much any purpose. At the nanometer level, the slightest movement of the measuring equipment would significantly change the reading, so it simply isn't realistic outside of a controlled environment.

Offline

#8 2019-04-26 12:29:39

grums
Member
Registered: 2019-03-27
Posts: 4

Re: Elevation: How many (if any) decimal digits

I managed to circumvent the problem (for small clips at least) by osmosis-transforming (--tag-transform) my .osm.pbf file:

<?xml version="1.0"?>
<translations>
  <translation>
    <name>ele-nodecimals</name>
    <description>strip decimals from elevation values</description>
    <match mode="or">
      <tag k="ele" match_id="m" v="(.*)\..*"/>
    </match>
    <output>
      <copy-unmatched/>
      <tag from_match="m" k="ele" v="{1}"/>
    </output>
  </translation>
</translations>

Regards, grums

Offline

Board footer

Powered by FluxBB