-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support for (storing) altitude #134
Comments
We would also very much like that! So +1 |
This would be https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1
Currently, when I do this: // Create a GeoJSON LineString
lineString := orb.LineString{}
// Iterate through each result and add coordinates to the LineString
for _, result := range results {
coordinate := orb.Point{result.Location.Lng, result.Location.Lat} // I want to add the 3rd value here; elevation
lineString = append(lineString, coordinate)
} I am not able to append the |
The Point type is defined as a I think you could maintain a fork, or Some, solvable issues that come to mind:
I'm not sure I agree with this. |
I am also interested being able to add altitude to a GeoJSON point. I've scoured multiple available go libraries and haven't been able to find an implementation that supports this. I recognize that orb is a 2d library, that this is out of scope for 2d functionality, and I agree with @paulmach 's assessment about the performance implications. That said, it seems a little silly to maintain a fork or start a new library just to get this feature. All I want to do is create a |
I ended up using "https://github.com/twpayne/go-geom" |
i think this will work if you want just carrying around information |
Hi Paul,
We work with 3D geographical data and are currently transitioning part of our backend to go. However, since the Point type has a fixed size we can't use it without forking. Although the altitude would just be passively carried around in all your algorithms, support for it would be nice IMO (and the GeoJSON spec allows it). What are your thoughts on either redefining the Point to [3]float64 or a slice? Would this break anything? Altitude could conditionally be marshaled whether it's non-zero.
The text was updated successfully, but these errors were encountered: