| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
_SRS
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
proj_init = {'EPSG:900913': lambda: Proj('+proj=merc +a=637813This class represents a Spatial Reference System. |
|||
|
|||
| is_latlong | |||
|
is_axis_order_ne Returns True if the axis order is North, then East
(i.e.
|
|||
|
is_axis_order_en Returns True if the axis order is East then North
(i.e.
|
|||
|
Inherited from |
|||
|
|||
srs_code code.
|
>>> srs1 = SRS(4326) >>> srs2 = SRS(900913) >>> [str(round(x, 5)) for x in srs1.transform_to(srs2, (8.22, 53.15))] ['915046.21432', '7010792.20171'] >>> srs1.transform_to(srs1, (8.25, 53.5)) (8.25, 53.5) >>> [(str(round(x, 5)), str(round(y, 5))) for x, y in ... srs1.transform_to(srs2, [(8.2, 53.1), (8.22, 53.15), (8.3, 53.2)])] ... #doctest: +NORMALIZE_WHITESPACE [('912819.8245', '7001516.67745'), ('915046.21432', '7010792.20171'), ('923951.77358', '7020078.53264')]
|
>>> ['%.3f' % x for x in ... SRS(4326).transform_bbox_to(SRS(900913), (-180.0, -90.0, 180.0, 90.0))] ['-20037508.343', '-147730762.670', '20037508.343', '147730758.195'] >>> ['%.5f' % x for x in ... SRS(4326).transform_bbox_to(SRS(900913), (8.2, 53.1, 8.3, 53.2))] ['912819.82450', '7001516.67745', '923951.77358', '7020078.53264'] >>> SRS(4326).transform_bbox_to(SRS(4326), (8.25, 53.0, 8.5, 53.75)) (8.25, 53.0, 8.5, 53.75)
|
Align bbox to reasonable values to prevent errors in transformations. E.g. transformations from EPSG:4326 with lat=90 or -90 will fail, so we subtract a tiny delta. At the moment only EPSG:4326 bbox will be modifyed. >>> SRS(4326).align_bbox((-180, -90, 180, 90)) (-180, -89.999999990000006, 180, 89.999999990000006) |
>>> print(SRS(4326)) SRS EPSG:4326 ('+units=m +init=epsg:4326 ')
|
>>> repr(SRS(4326)) "SRS('EPSG:4326')"
|
|
|||
proj_initThis class represents a Spatial Reference System.
|
|
|||
is_latlong>>> SRS(4326).is_latlong True >>> SRS(31466).is_latlong False
|
is_axis_order_neReturns >>> SRS(4326).is_axis_order_ne True >>> SRS('CRS:84').is_axis_order_ne False >>> SRS(31468).is_axis_order_ne True >>> SRS(31463).is_axis_order_ne False >>> SRS(25831).is_axis_order_ne False
|
is_axis_order_enReturnsTrue if the axis order is East then North
(i.e. x/y or lon/lat).
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 2 10:24:53 2010 | http://epydoc.sourceforge.net |