| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
| TransformationError | |||
| _SRS | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
log = logging.getLogger(__name__)
|
|||
_proj_initalized = False
|
|||
_srs_cache =
|
|||
|
|||
Generates points that form a linestring around a given bbox. @param bbox: bbox to generate linestring for @param n: the number of points to generate around the bbox >>> generate_envelope_points((10.0, 5.0, 20.0, 15.0), 4) [(10.0, 5.0), (20.0, 5.0), (20.0, 15.0), (10.0, 15.0)] >>> generate_envelope_points((10.0, 5.0, 20.0, 15.0), 8) ... #doctest: +NORMALIZE_WHITESPACE [(10.0, 5.0), (15.0, 5.0), (20.0, 5.0), (20.0, 10.0), (20.0, 15.0), (15.0, 15.0), (10.0, 15.0), (10.0, 10.0)] |
Calculates the bbox of a list of points. >>> calculate_bbox([(-5, 20), (3, 8), (99, 0)]) (-5, 0, 99, 20) @param points: list of points [(x0, y0), (x1, y2), ...] @returns: bbox of the input points. |
Compares two bbox and checks if they are equal, or nearly equal. >>> src_bbox = (939258.20356824622, 6887893.4928338043, ... 1095801.2374962866, 7044436.5267618448) >>> dst_bbox = (939258.20260000182, 6887893.4908000007, ... 1095801.2365000017, 7044436.5247000009) >>> bbox_equals(src_bbox, dst_bbox, 61.1, 61.1) True >>> bbox_equals(src_bbox, dst_bbox, 0.0001) False
|
Create a transformation function that transforms linear between two cartesian coordinate systems. >>> transf = make_lin_transf((7, 50, 8, 51), (0, 0, 500, 400)) >>> transf((7.5, 50.5)) (250.0, 200.0) >>> transf((7.0, 50.0)) (0.0, 400.0) >>> transf = make_lin_transf((7, 50, 8, 51), (200, 300, 700, 700)) >>> transf((7.5, 50.5)) (450.0, 500.0)
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 2 10:24:51 2010 | http://epydoc.sourceforge.net |