Skip to content

Rewrite Geometry Functions With Latest Refractors #880

Description

@hongyuchen1030

Proposed new feature or change:

Summary

As discussed thoroughly in #785, many of the geometry functions were implemented before multiple refactors and changes to data structures, and they have not been updated to align with the current implementation. A rewrite is needed to significantly improve performance.

Affected Geometry Functions

The following geometry functions are in need of a rewrite:

  • _pole_point_inside_polygon
  • extreme_gca_latitude
  • _insert_pt_in_latlonbox
  • _get_cartesian_face_edge_nodes
  • _get_lonlat_rad_face_edge_nodes

Key Issues

To improve performance, we need to eliminate any unnecessary coordinate conversion calls, such as _xyz_to_lonlat_rad.

One proposed solution is to provide both the latlon_rad and cartesian points in the function call to avoid needing conversions. For example:

def _point_within_gca(pt_latlon,
                      pt_xyz,
                      gca_a_latlon,
                      gca_a_xyz,
                      gca_b_latlon,
                      gca_b_xyz,
                      is_directed=False):

Request

A new API design is required for these geometry functions to address the issues mentioned and enhance performance.

Metadata

Metadata

Labels

improvementImprovements on existing features or infrastructurenew featureNew user-facing functionalityscalabilityRelated to scalability & performance efforts

Type

No type

Projects

Status
✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions