# geom

Manipulation of geometric/geographical data.

## Geometric data transformation

Data type

 `transform_point_type`(*pts[, as_geom]) Transform iterable to shapely.geometry.Point type, or the other way round. `get_coordinates_as_array`(geom_obj[, unique]) Get an array of coordinates of the input geometry object.

Coordinate system

 `wgs84_to_osgb36`(longitudes, latitudes[, ...]) Convert latitude and longitude (WGS84) to British national grid (OSGB36). `osgb36_to_wgs84`(eastings, northings[, as_array]) Convert British national grid (OSGB36) to latitude and longitude (WGS84).

Dimension / Projection

 `drop_axis`(geom[, axis, as_array]) Drop an axis from a given 3D geometry object. `project_point_to_line`(point, line[, ...]) Find the projected point from a known point to a line.

## Geometric data computation

Distance

 `calc_distance_on_unit_sphere`(pt1, pt2[, ...]) Calculate distance between two points. `calc_hypotenuse_distance`(pt1, pt2) Calculate hypotenuse given two points (the right-angled triangle, given its side and perpendicular). `find_closest_point`(pt, ref_pts[, as_geom]) Find the closest point of the given point to a list of points. `find_closest_points`(pts, ref_pts[, k, ...]) Find the closest points from a list of reference points (applicable for vectorized computation). `find_shortest_path`(points_sequence[, ...]) Find the shortest path through a sequence of points.

Locating

 `get_midpoint`(x1, y1, x2, y2[, as_geom]) Get the midpoint between two points (applicable for vectorized computation). `get_geometric_midpoint`(pt1, pt2[, as_geom]) Get the midpoint between two points. `get_geometric_midpoint_calc`(pt1, pt2[, as_geom]) Get the midpoint between two points by pure calculation. `get_rectangle_centroid`(rectangle[, as_geom]) Get coordinates of the centroid of a rectangle `get_square_vertices`(ctr_x, ctr_y, side_length) Get the four vertices of a square given its centre and side length. `get_square_vertices_calc`(ctr_x, ctr_y, ...) Get the four vertices of a square given its centre and side length (by elementary calculation).

## Geometric data sketching

 `sketch_square`(ctr_x, ctr_y, side_length[, ...]) Sketch a square given its centre point, four vertices and rotation angle (in degree).