11 if (
"meters" == element.text() )
15 else if (
"feet" == element.text() )
19 else if (
"nautical miles" == element.text() )
23 else if (
"degrees" == element.text() )
27 else if (
"unknown" == element.text() )
33 QgsDebugMsg(
"Unknown map unit type " + element.text() );
42 QDomNode xminNode = element.namedItem(
"xmin" );
43 QDomNode yminNode = element.namedItem(
"ymin" );
44 QDomNode xmaxNode = element.namedItem(
"xmax" );
45 QDomNode ymaxNode = element.namedItem(
"ymax" );
47 QDomElement exElement = xminNode.toElement();
48 double xmin = exElement.text().toDouble();
51 exElement = yminNode.toElement();
52 double ymin = exElement.text().toDouble();
55 exElement = xmaxNode.toElement();
56 double xmax = exElement.text().toDouble();
59 exElement = ymaxNode.toElement();
60 double ymax = exElement.text().toDouble();
74 unitsString =
"meters";
80 unitsString =
"nautical miles";
83 unitsString =
"degrees";
87 unitsString =
"unknown";
91 QDomElement unitsNode = doc.createElement(
"units" );
92 unitsNode.appendChild( doc.createTextNode( unitsString ) );
98 QDomElement xMin = doc.createElement(
"xmin" );
99 QDomElement yMin = doc.createElement(
"ymin" );
100 QDomElement xMax = doc.createElement(
"xmax" );
101 QDomElement yMax = doc.createElement(
"ymax" );
108 xMin.appendChild( xMinText );
109 yMin.appendChild( yMinText );
110 xMax.appendChild( xMaxText );
111 yMax.appendChild( yMaxText );
113 QDomElement extentNode = doc.createElement(
"extent" );
114 extentNode.appendChild( xMin );
115 extentNode.appendChild( yMin );
116 extentNode.appendChild( xMax );
117 extentNode.appendChild( yMax );