58 QString srcAuthId = layer->
crs().
authid();
61 if ( srcAuthId == dstAuthId )
66 QHash< QString, Entry >::const_iterator ctIt =
mEntries.find( layer->
id() );
67 if ( ctIt !=
mEntries.constEnd() && ctIt->srcAuthId == srcAuthId && ctIt->destAuthId == dstAuthId )
81 QDomElement layerCoordTransformInfoElem = parentNode.firstChildElement(
"layer_coordinate_transform_info" );
82 if ( !layerCoordTransformInfoElem.isNull() )
84 QDomNodeList layerCoordinateTransformList = layerCoordTransformInfoElem.elementsByTagName(
"layer_coordinate_transform" );
85 QDomElement layerCoordTransformElem;
86 for (
int i = 0; i < layerCoordinateTransformList.size(); ++i )
88 layerCoordTransformElem = layerCoordinateTransformList.at( i ).toElement();
89 QString layerId = layerCoordTransformElem.attribute(
"layerid" );
90 if ( layerId.isEmpty() )
96 layerCoordTransformElem.attribute(
"srcAuthId" ),
97 layerCoordTransformElem.attribute(
"destAuthId" ),
98 layerCoordTransformElem.attribute(
"srcDatumTransform",
"-1" ).toInt(),
99 layerCoordTransformElem.attribute(
"destDatumTransform",
"-1" ).toInt()
108 QDomElement layerCoordTransformInfo = theDoc.createElement(
"layer_coordinate_transform_info" );
110 for ( QHash< QString, Entry >::const_iterator coordIt =
mEntries.constBegin(); coordIt !=
mEntries.constEnd(); ++coordIt )
112 QDomElement layerCoordTransformElem = theDoc.createElement(
"layer_coordinate_transform" );
113 layerCoordTransformElem.setAttribute(
"layerid", coordIt.key() );
114 layerCoordTransformElem.setAttribute(
"srcAuthId", coordIt->srcAuthId );
115 layerCoordTransformElem.setAttribute(
"destAuthId", coordIt->destAuthId );
116 layerCoordTransformElem.setAttribute(
"srcDatumTransform", QString::number( coordIt->srcDatumTransform ) );
117 layerCoordTransformElem.setAttribute(
"destDatumTransform", QString::number( coordIt->destDatumTransform ) );
118 layerCoordTransformInfo.appendChild( layerCoordTransformElem );
120 parentNode.appendChild( layerCoordTransformInfo );