anoved / gpxtruder

Make 3D-printable elevation models of GPX tracks.
http://gpxtruder.xyz/
MIT License
69 stars 23 forks source link

Elevation issues with longlat projection #33

Closed anoved closed 9 years ago

anoved commented 9 years ago

Using a custom lon-lat projection (+proj=longlat +datum=WGS84 +no_defs) results in super high elevation extrusions, even with constant height elevation set to 1. My first guess is it is treating the elevation values as degrees (eg whatever xy unit is used in the projection specification).

anoved commented 9 years ago

Gpex.Extrude.fit() assumes the xy scale factor (calculated from bed dimensions and projected extent by ScaleBounds()) should be applied to z values. This assumption works for the default GOOGLE web-Mercator projection as well as UTM option, since both express xy in meters. Not so for custom projections that use other units.