#include <ogr_spatialref.h>
Public Member Functions | |
OGR_SRSNode (const char *=NULL) | |
int | GetChildCount () const |
OGR_SRSNode * | GetChild (int) |
OGR_SRSNode * | GetNode (const char *) |
void | InsertChild (OGR_SRSNode *, int) |
void | AddChild (OGR_SRSNode *) |
int | FindChild (const char *) const |
void | DestroyChild (int) |
void | StripNodes (const char *) |
const char * | GetValue () const |
void | SetValue (const char *) |
void | MakeValueSafe () |
OGR_SRSNode * | Clone () const |
OGRErr | importFromWkt (char **) |
OGRErr | exportToWkt (char **) const |
OGRErr | applyRemapper (const char *pszNode, char **papszSrcValues, char **papszDstValues, int nStepSize=1, int bChildOfHit=FALSE) |
Normally application code just interacts with the OGRSpatialReference object, which uses the OGR_SRSNode to implement it's data structure; however, this class is user accessable for detailed access to components of an SRS definition.
|
Constructor.
|
|
Add passed node as a child of target node. Note that ownership of the passed node is assumed by the node on which the method is invoked ... use the Clone() method if the original is to be preserved. New children are always added at the end of the list.
|
|
Remap node values matching list. Remap the value of this node or any of it's children if it matches one of the values in the source list to the corresponding value from the destination list. If the pszNode value is set, only do so if the parent node matches that value. Even if a replacement occurs, searching continues.
|
|
Make a duplicate of this node, and it's children.
|
|
Remove a child node, and it's subtree. Note that removing a child node will result in children after it being renumbered down one.
|
|
Convert this tree of nodes into WKT format. Note that the returned WKT string should be freed with OGRFree() or CPLFree() when no longer needed. It is the responsibility of the caller.
|
|
Find the index of the child matching the given string. Note that the node value must match pszValue with the exception of case. The comparison is case insensitive.
|
|
Fetch requested child.
|
|
Get number of children nodes.
|
|
Find named node in tree. This method does a pre-order traversal of the node tree searching for a node with this exact value (case insensitive), and returns it. Leaf nodes are not considered, under the assumption that they are just attribute value nodes. If a node appears more than once in the tree (such as UNIT for instance), the first encountered will be returned. Use GetNode() on a subtree to be more specific.
|
|
Fetch value string for this node.
|
|
Import from WKT string. This method will wipe the existing children and value of this node, and reassign them based on the contents of the passed WKT string. Only as much of the input string as needed to construct this node, and it's children is consumed from the input string, and the input string pointer is then updated to point to the remaining (unused) input.
|
|
Insert the passed node as a child of target node, at the indicated position. Note that ownership of the passed node is assumed by the node on which the method is invoked ... use the Clone() method if the original is to be preserved. All existing children at location iChild and beyond are push down one space to make space for the new child.
|
|
Massage value string, stripping special characters so it will be a database safe string. The operation is also applies to all subnodes of the current node. |
|
Set the node value.
|
|
Strip child nodes matching name. Removes any decendent nodes of this node that match the given name. Of course children of removed nodes are also discarded.
|