astrophysics - transform sf from equatorial to galactic coordinates

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

astrophysics - transform sf from equatorial to galactic coordinates

Eugene Hickey
Hi
Does anyone know of a way to transform an sf from equatorial (RA, DEC) into galactic (b, l) coordinates please?


Thanks
Eugene

This email originated from TU Dublin. If you received this email in error, please delete it from your system. Please note that if you are not the named addressee, disclosing, copying, distributing or taking any action based on the contents of this email or attachments is prohibited.

Is � OT Baile �tha Cliath a th�inig an r�omhphost seo. M� fuair t� an r�omhphost seo tr� earr�id, scrios de do ch�ras � le do thoil. Tabhair ar aird, mura t� an seola� ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon ch�ipe�il, aon d�ileadh n� ar aon ghn�omh a dh�anfar bunaithe ar an �bhar at� sa r�omhphost n� sna hiat�in seo.

        [[alternative HTML version deleted]]


_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: astrophysics - transform sf from equatorial to galactic coordinates

Barry Rowlingson-3
Eugene,

I don't think this can be done using the PROJ library that does most
coordinate transformations for sf objects. The `astrolibR` package has
functions for converting coordinates on various astronomical systems

 https://cran.r-project.org/web/packages/astrolibR/astrolibR.pdf

but you have to feed it vectors of RA and declination rather than entire
spatial objects. This isn't much of a problem if you are dealing with
points (extract coords with st_coordinates, convert, make a new geometry)
but for lines of polygons you need to extract all the vertex points,
convert them, then rebuild the features.

You might also have problems if you have lines or polygons going across the
cosmic coordinate equivalent of the -180/+180 longitude line...

 Having another look, it *might* be possible to do this with PROJ by
constructing an appropriate spherical rotated coordinate system,  and you
might even be able to convert degrees to RA hours with a +units parameter...

Barry



On Sat, Mar 21, 2020 at 6:06 PM Eugene Hickey <[hidden email]>
wrote:

> Hi
> Does anyone know of a way to transform an sf from equatorial (RA, DEC)
> into galactic (b, l) coordinates please?
>
>
> Thanks
> Eugene
>
> This email originated from TU Dublin. If you received this email in error,
> please delete it from your system. Please note that if you are not the
> named addressee, disclosing, copying, distributing or taking any action
> based on the contents of this email or attachments is prohibited.
>
> Is ó OT Baile Átha Cliath a tháinig an ríomhphost seo. Má fuair tú an
> ríomhphost seo trí earráid, scrios de do chóras é le do thoil. Tabhair ar
> aird, mura tú an seolaí ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon
> chóipeáil, aon dáileadh nó ar aon ghníomh a dhéanfar bunaithe ar an ábhar
> atá sa ríomhphost nó sna hiatáin seo.
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo