-
Notifications
You must be signed in to change notification settings - Fork 15
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
Length for tg_line? #5
Comments
You're right that this should be a relatively simple change. Most of the code is already there but just needs to be exposed to the API. I'll dig a little deep and see what I can do. |
tidwall
added a commit
that referenced
this issue
Oct 4, 2023
This commit exposes the following methods: - tg_line_length - tg_ring_perimeter - tg_ring_area See #5
The method is now available. |
Thank you! Looks fantastic :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I absolutely appreciate this may not be the way you want to go with
tg
, but I figure it can't hurt to ask: would you be interested in exposing a function to calculate the length of atg_line
?It looks like there's already an internal
length
function for calculating the Pythagoras distance between 2 points, and a function to calculate a ring's perimeter as part of the Polsby-Popper score calculation, so this doesn't appear to be a huge stretch in terms of extra code, but I understand this may not be an API overhead you want to take on.For full disclosure, I'm asking for this with the hope of it getting incorporated into
sqlite-tg
as it's a much lighter-weight alternative to using Spatialite and the GeoJSON conversion, intersection, and bounding box functions are super useful for the work I'm doing.The text was updated successfully, but these errors were encountered: