spatial.overlap — Point Placement in Overlaps¶
The spatial.overlap module provides methods for
placing points and measures in overlapping geometries.
New in version 0.1.0.
- autocnet.spatial.overlap.place_points_in_image(image, identifier='autocnet', cam_type='csm', size=71, distribute_points_kwargs={}, ncg=None, **kwargs)[source]¶
Place points into an image and then attempt to place measures into all overlapping images. This function is funcitonally identical to place_point_in_overlap except it works on individual images.
- Parameters
image (obj) – An autocnet Images model object
identifier (str) – The tag used to distiguish points laid down by this function.
cam_type (str) – options: {“csm”, “isis”} Pick what kind of camera model implementation to use
size (int) – The size of the window used to extractor features to find an interesting feature to which the point is shifted.
distribute_points_kwargs (dict) – kwargs to pass to autocnet.cg.cg.distribute_points_in_geom
ncg (obj) – An autocnet.graph.network NetworkCandidateGraph instance representing the network to apply this function to
See also
autocnet.cg.cg.distribute_points_in_geomfor the possible arguments to pass through using
disribute_points_kwargs.autocnet.graph.network.NetworkCandidateGraphfor associated properties and functionalities of the
NetworkCandidateGraph
- autocnet.spatial.overlap.place_points_in_overlap(overlap, identifier='autocnet', cam_type='csm', size=71, distribute_points_kwargs={}, point_type=2, ncg=None, use_cache=False, **kwargs)[source]¶
Place points into an overlap geometry by back-projecing using sensor models. The DEM specified in the config file will be used to calculate point elevations.
- Parameters
overlap (obj) – An autocnet.io.db.model Overlay model instance.
identifier (str) – The tag used to distiguish points laid down by this function.
cam_type (str) – options: {“csm”, “isis”} Pick what kind of camera model implementation to use.
size (int) – The amount of pixel around a points initial location to search for an interesting feature to which to shift the point.
distribute_points_kwargs (dict) – kwargs to pass to autocnet.cg.cg.distribute_points_in_geom
point_type (int) – The type of point being placed. Default is pointtype=2, corresponding to free points.
ncg (obj) – An autocnet.graph.network NetworkCandidateGraph instance representing the network to apply this function to
use_cache (bool) – If False (default) this func opens a database session and writes points and measures directly to the respective tables. If True, this method writes messages to the point_insert (defined in ncg.config) redis queue for asynchronous (higher performance) inserts.
- Returns
points – The list of points seeded in the overlap
- Return type
list of Points
See also
autocnet.io.db.model.Overlayfor associated properties of the Overlay object
autocnet.cg.cg.distribute_points_in_geomfor the possible arguments to pass through using
disribute_points_kwargs.autocnet.model.io.db.PointTypefor the point type options.
autocnet.graph.network.NetworkCandidateGraphfor associated properties and functionalities of the
NetworkCandidateGraph
- autocnet.spatial.overlap.place_points_in_overlaps(size_threshold=0.0007, distribute_points_kwargs={}, cam_type='csm', point_type=2, ncg=None)[source]¶
Place points in all of the overlap geometries by back-projecing using sensor models.
- Parameters
nodes (dict-link) – A dict like object with a shared key with the intersection field of the database Overlay table and a cg node object as the value. This could be a NetworkCandidateGraph or some other dict-like object.
Session (obj) – The session object from the NetworkCandidateGraph
size_threshold (float) – overlaps with area <= this threshold are ignored
cam_type (str) – Either ‘csm’ (default) or ‘isis’. The type of sensor model to use.
point_type (int) – Either 2 (free;default) or 3 (constrained). Point type 3 should be used for ground.