|
RAVE
|
Classes | |
| class | interface |
| Object for interfacing with PROJ.4. More... | |
| class | usgs |
| PROJ 4.7.0 and higher interface (requires Proj.py, _proj.so) More... | |
Functions | |
| init () | |
| Initializer. | |
| register (id, pcs) | |
| Adds a projection to the registry. | |
| keys () | |
| Returns a list of keys in the registry. | |
| items () | |
| Returns a list of tuples containing key:item pairs in the registry where the key is the projection identifier and the item is its usgs object. | |
| pcs (Id) | |
| Object factory. | |
| define (id, description, definition) | |
| Register utility function for pre-defined projection definitions in PROJECTIONS. | |
| add (id, description, definition, filename=PROJECTION_REGISTRY) | |
| Adds a projection to the registry. | |
| remove (id, filename=PROJECTION_REGISTRY) | |
| Removes a projection from the registry. | |
| write (filename=PROJECTION_REGISTRY) | |
| Writes the contents of the registry to file. | |
| describe (id) | |
| Prints the identifier, description, and PROJ.4 definition to stdout. | |
Variables | |
| bool | got_projregistry = True |
| PROJECTIONS = os.path.join(RAVECONFIG, '*projection_registry.xml') | |
| There's only one official projection registry, but this module allows greater flexibility as long as files use the same naming convention. | |
| int | initialized = 0 |
| dict | _registry = {} |
| Empty registry to be filled. | |
Copyright (C) 1998 - Swedish Meteorological and Hydrological Institute (SMHI) This file is part of RAVE. RAVE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. RAVE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with RAVE. If not, see <http://www.gnu.org/licenses/>.
| Lib.rave_projection.add | ( | id, | |
| description, | |||
| definition, | |||
| filename = PROJECTION_REGISTRY ) |
Adds a projection to the registry.
This is a bit overworked, but it bridges the gap between old and new interfaces. If a previous instance of a projection with the same identifier exists, it is overwritten.
| id | String containing the identifier of the new projection |
| description | String containing a description of the new projection |
| definition | PROJ.4 string containing the new projection's definition |
| filename | Full path to the XML file containing the projection registry |
| Lib.rave_projection.define | ( | id, | |
| description, | |||
| definition ) |
Register utility function for pre-defined projection definitions in PROJECTIONS.
| id | string containing this projection's identifier |
| description | string containing a free-text description of this projection |
| definition | PROJ.4 string containing the projection definition |
| Lib.rave_projection.describe | ( | id | ) |
Prints the identifier, description, and PROJ.4 definition to stdout.
| id | The projection's string identifier |
| Lib.rave_projection.init | ( | ) |
Initializer.
| Lib.rave_projection.items | ( | ) |
Returns a list of tuples containing key:item pairs in the registry where the key is the projection identifier and the item is its usgs object.
| Lib.rave_projection.keys | ( | ) |
Returns a list of keys in the registry.
| Lib.rave_projection.pcs | ( | Id | ) |
Object factory.
PCS = Projection Coordinate System
| Id | Projection identifier (string) |
| Lib.rave_projection.register | ( | id, | |
| pcs ) |
Adds a projection to the registry.
| id | Projection identifier (string) |
| pcs | Projection object as returned by the usgs class |
| Lib.rave_projection.remove | ( | id, | |
| filename = PROJECTION_REGISTRY ) |
Removes a projection from the registry.
| id | String containing the identifier of the projection to remove |
| filename | Full path to the XML file containing the projection registry |
| Lib.rave_projection.write | ( | filename = PROJECTION_REGISTRY | ) |
Writes the contents of the registry to file.
This is a bit overworked, but it bridges the gap between old and new interfaces.
| filename | Complete path of the XML file to which to write the contents of the registry. |
|
protected |
Empty registry to be filled.
| Lib.rave_projection.PROJECTIONS = os.path.join(RAVECONFIG, '*projection_registry.xml') |
There's only one official projection registry, but this module allows greater flexibility as long as files use the same naming convention.