Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elevations in feet are ignored #213

Open
1ec5 opened this issue Jul 1, 2023 · 1 comment
Open

Elevations in feet are ignored #213

1ec5 opened this issue Jul 1, 2023 · 1 comment

Comments

@1ec5
Copy link

1ec5 commented Jul 1, 2023

If ele is expressed in feet using the usual units, it looks like the tag is dropped because it isn’t an integer or floating point number. (I’m only doing code inspection, so I could be wrong about this.)

ele is actually documented to be only in meters, but it is tagged in feet pretty commonly in practice, and this proposal would formalize that practice. Regardless, I just wanted to make sure you were aware that ele was being parsed this way, in case it was merely an oversight, since OSM2World does have code to parse other tags with support for units. If this is intentional and you believe ele should not contain units, I would welcome your feedback on the proposal’s talk page. Thanks!

/**
* parses a decimal value (e.g. "5", "0", "3.56" or "-12.30")
*
* @return the parsed value as a floating point number; null if value is null or has syntax errors.
*/
public static final @Nullable Double parseOsmDecimal(@Nullable String value, boolean allowNegative) {

@tordanik
Copy link
Owner

tordanik commented Jul 4, 2023

Hi, thank you for making me aware of this proposal. For OSM2World, different units for elevation values are not a problem as long as these units are explicit and well-defined. (Different standards for what elevation 0 means are a problem, as are incorrect elevation values even if they're signposted "on the ground" – but that's not directly affected by this proposal either way.)

If the proposal is approved, I have no problem with updating OSM2World to use the same value parsing logic which already exists for keys such as height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants