cuspatial icon indicating copy to clipboard operation
cuspatial copied to clipboard

[DOC] `lonlat_to_cartesian` clarification

Open isVoid opened this issue 3 years ago • 4 comments

During reviewing https://github.com/rapidsai/cuspatial/pull/514, I realized that the documentation of lonlat_to_cartesian may be lacking, or the naming of the method is too general.

AFAIK, converting lonlat to cartesian coordinates involves projections and can get very, very complicated. The projection method here seems most close to the equirectangular projection with the exception that the choice of standard parallel seems dynamic (midpoint(lat, origin_lat)). I think more documentation related to this to point out the API's behavior is desired.

isVoid avatar May 05 '22 19:05 isVoid

Offline summary: this algorithm is a flavor of sinusoidal projection and is near Cartesian around equator and prime meridian. This is why all lonlats were normalized around origin_lon and origin_lat prior to conversion.

It should also be mentioned that all points are assumed to be highly localized to exploit the property sinusoidal projection.

The proposal is:

  • Rename the method to sinusoidal_projection
  • Mentions in the docstring that this can be used to approximately convert the latitude and longitude to cartesian coordinates given that all points are with proximity to origin.

isVoid avatar May 05 '22 21:05 isVoid

Another option is to rename to something like coordinate_transformation and take a parameter to select the desired projection. What do other libraries do? Are there many popular projections? (yes) For reference Proj

harrism avatar May 10 '22 02:05 harrism

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] avatar Jun 09 '22 02:06 github-actions[bot]

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

github-actions[bot] avatar Sep 07 '22 02:09 github-actions[bot]