-
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
Add spoint_deg() and spoly_deg() functions? #22
Comments
@esabol Sure, I will check and incorporate it. I know about akorotkov repo but I'm not sure that it still alive. Anyway, if someone wants to create a ready-to-merge PR, it will make the process faster (assign yourself on the Issue first to avoid conflicts). There are a lot of other pending PR. I plan to review and incorporate some other pending PR in our branch. |
Maybe we can use set_sphere_output to implement this functions? @esabol |
@stepan-neretin7 set_sphere_output is used to configure how objects are displayed in user console. spoint_deg and spoly_deg construct new objects. Users may use radians and degrees to construct different objects in the same query. Of course, user may use textual representation of coordinates in degrees by adding 'd' suffix but it is not comfortable because user have to format a string. |
The typical use-case is that you have a database table with two columns containing longitudes and latitudes in degrees. I think most everyone stores longitudes and latitudes in degrees. Fortunately, PostgreSQL has a select * from sometable where spoint(radians(ra),radians(dec))
@ scircle(spoint(radians(10),radians(10)),radians(1)) Well, adding all those select * from sometable where spoint_deg(ra,dec) @ scircle_deg(spoint_deg(10,10),1)) which is both more succinct and probably faster. |
[ISSUE #22] Created spoint_deg, scircle_deg, spoly_deg functions.
PR #38 has been merged, addressing this issue. Closing. |
All of the database tables we use have the spherical positions stored as degrees, not radians. Adding spoint_deg() and spoly_deg() would be useful for this use-case. There's a 5-year-old PR that implements this here:
akorotkov/pgsphere#6
It just needed a little clean up, but nobody followed through. Would you consider incorporating this functionality here?
The text was updated successfully, but these errors were encountered: