Esempio n. 1
0
bool ossimGmlSupportData::configureBounds(
   ossimRefPtr<ossimXmlNode> node0, const ossimImageGeometry* geom )
{
   bool success = true;
   const ossimString BLANK = "";

   ossimString upperCornerString;         
   ossimString lowerCornerString;
   getGeoBounds( geom, upperCornerString, lowerCornerString );

   ossimString path = "boundedBy";
   ossimRefPtr<ossimXmlNode> node1 = node0->addChildNode( path, BLANK );

   path = "Envelope";
   ossimRefPtr<ossimXmlNode> node1a = node1->addChildNode( path, BLANK );

   ossimRefPtr<ossimXmlAttribute> attr( 0 );
   ossimString name;

   attr = new ossimXmlAttribute();
   name = "srsName";
   attr->setNameValue( name, m_srsNameStringGeo );
   node1a->addAttribute( attr );

   attr = new ossimXmlAttribute();
   name = "axisLabels";
   attr->setNameValue( name, m_axisLabelsStringGeo );
   node1a->addAttribute( attr );

   attr = new ossimXmlAttribute();
   name = "uomLabels";
   attr->setNameValue( name, m_uomLabelsStringGeo );
   node1a->addAttribute( attr );

   attr = new ossimXmlAttribute();
   name = "srsDimension";
   attr->setNameValue( name, m_srsDimensionString );
   node1a->addAttribute( attr );

   path = "lowerCorner";
   ossimRefPtr<ossimXmlNode> node1a1 =
      node1a->addChildNode( path, lowerCornerString );

   path = "upperCorner";
   ossimRefPtr<ossimXmlNode> node1a2 =
      node1a->addChildNode( path, upperCornerString );

   return success;
}
Esempio n. 2
0
bool ossimGmlSupportData::configureGmljp2V1( 
   ossimRefPtr<ossimXmlNode> node0, const ossimImageGeometry* geom )
{
   bool success = true;
   const ossimString BLANK = "";

   ossimString gridHighString;
   ossimString gridLowString;
   getLimits( geom, gridHighString, gridLowString );

   configureBounds( node0, geom );

   ossimString path = "rectifiedGridDomain";
   ossimRefPtr<ossimXmlNode> node2 = node0->addChildNode( path, BLANK );

   path = "RectifiedGrid";
   ossimRefPtr<ossimXmlNode> node2a = node2->addChildNode( path, BLANK );

   ossimRefPtr<ossimXmlAttribute> attr1 = new ossimXmlAttribute();
   ossimString name = "dimension";
   ossimString value = "2";
   attr1->setNameValue( name, value );
   node2a->addAttribute( attr1 );

   path = "limit";
   ossimRefPtr<ossimXmlNode> node2a1 = node2a->addChildNode( path, BLANK );

   path = "GridEnvelope"; 
   ossimRefPtr<ossimXmlNode> node2a1a = node2a1->addChildNode( path, BLANK );

   path = "low";
   ossimRefPtr<ossimXmlNode> node2a1a1 = node2a1a->addChildNode( path, gridLowString );

   path = "high";
   ossimRefPtr<ossimXmlNode> node2a1a2 = node2a1a->addChildNode( path, gridHighString );

   return success;
}
Esempio n. 3
0
bool ossimGmlSupportData::configureGmljp2V2( 
   ossimRefPtr<ossimXmlNode> node0, const ossimImageGeometry* geom )
{
   bool success = true;
   const ossimString BLANK = "";

   ossimRefPtr<ossimXmlAttribute> attr(0);
   ossimString name;
   ossimString value;

   ossimString gridHighString;
   ossimString gridLowString;
   getLimits( geom, gridHighString, gridLowString );

   configureBounds( node0, geom );

   ossimString path = "domainSet";
   ossimRefPtr<ossimXmlNode> node2 =
      node0->addChildNode( path, BLANK );

   path = "rangeSet";
   ossimRefPtr<ossimXmlNode> node3 =
      node0->addChildNode( path, BLANK );

   path = "File";
   ossimRefPtr<ossimXmlNode> node3a =
      node3->addChildNode( path, BLANK );

   path = "rangeParameters";
   ossimRefPtr<ossimXmlNode> node3a1 =
      node3a->addChildNode( path, BLANK );

   path = "fileName";
   ossimRefPtr<ossimXmlNode> node3a2 =
      node3a->addChildNode( path, "gmljp2://codestream" );

   path = "fileStructure";
   ossimRefPtr<ossimXmlNode> node3a3 =
      node3a->addChildNode( path, "inapplicable" );

   path = "gmlcov:rangeType";
   ossimRefPtr<ossimXmlNode> node4 =
      node0->addChildNode( path, BLANK );

   path = "gmljp2:featureMember";
   ossimRefPtr<ossimXmlNode> node5 =
      node0->addChildNode( path, BLANK );

   path = "gmljp2:GMLJP2RectifiedGridCoverage";
   ossimRefPtr<ossimXmlNode> node5a =
      node5->addChildNode( path, BLANK );

   attr  = new ossimXmlAttribute();
   name  = "gml:id";
   value = "CodeStream_0";
   attr->setNameValue( name, value );
   node5a->addAttribute( attr );

   path = "domainSet";
   ossimRefPtr<ossimXmlNode> node5a1 =
      node5a->addChildNode( path, BLANK );

   path = "RectifiedGrid";
   ossimRefPtr<ossimXmlNode> node5a1a =
      node5a1->addChildNode( path, BLANK );

   attr  = new ossimXmlAttribute();
   name  = "gml:id";
   value = "RG0001";
   attr->setNameValue( name, value );
   node5a1a->addAttribute( attr );

   attr  = new ossimXmlAttribute();
   name  = "dimension";
   value = "2";
   attr->setNameValue( name, value );
   node5a1a->addAttribute( attr );

   attr  = new ossimXmlAttribute();
   name  = "srsName";
   attr->setNameValue( name, m_srsNameStringMap );
   node5a1a->addAttribute( attr );

   path = "limits";
   ossimRefPtr<ossimXmlNode> node5a1a1 =
      node5a1a->addChildNode( path, BLANK );

   path = "GridEnvelope";
   ossimRefPtr<ossimXmlNode> node5a1a1a =
      node5a1a1->addChildNode( path, BLANK );

   path = "low";
   ossimRefPtr<ossimXmlNode> node5a1a1a1 =
      node5a1a1a->addChildNode( path, gridLowString );

   path = "high";
   ossimRefPtr<ossimXmlNode> node5a1a1a2 =
      node5a1a1a->addChildNode( path, gridHighString );

   path = "axisLabels";
   ossimRefPtr<ossimXmlNode> node5a1a2 =
      node5a1a->addChildNode( path, 
                              m_mapProj->isGeographic() ? 
                              m_axisLabelsStringGeo : m_axisLabelsStringMap );

   path = "origin";
   ossimRefPtr<ossimXmlNode> node5a1a3 =
      node5a1a->addChildNode( path, BLANK );

   path = "Point";
   ossimRefPtr<ossimXmlNode> node5a1a3a =
      node5a1a3->addChildNode( path, BLANK );

   attr  = new ossimXmlAttribute();
   name  = "gml:id";
   value = "P0001";
   attr->setNameValue( name, value );
   node5a1a3a->addAttribute( attr );

   attr  = new ossimXmlAttribute();
   name  = "srsName";
   attr->setNameValue( name, m_srsNameStringMap );
   node5a1a3a->addAttribute( attr );

   ossimString originString;
   ossimString offsetVector1String;
   ossimString offsetVector2String;
   getOrigin( geom, originString, 
              offsetVector1String, 
              offsetVector2String );

   path = "pos";
   ossimRefPtr<ossimXmlNode> node5a1a3a1 =
      node5a1a3a->addChildNode( path, originString );

   path = "offsetVector";
   ossimRefPtr<ossimXmlNode> node5a1a4 =
      node5a1a->addChildNode( path, offsetVector1String );

   attr  = new ossimXmlAttribute();
   name  = "srsName";
   attr->setNameValue( name, 
                       m_mapProj->isGeographic() ? 
                       m_srsNameStringGeo : m_srsNameStringMap );
   node5a1a4->addAttribute( attr );

   path = "offsetVector";
   ossimRefPtr<ossimXmlNode> node5a1a5 =
      node5a1a->addChildNode( path, offsetVector2String );

   attr  = new ossimXmlAttribute();
   name  = "srsName";
   attr->setNameValue( name, 
                       m_mapProj->isGeographic() ? 
                       m_srsNameStringGeo : m_srsNameStringMap );
   node5a1a5->addAttribute( attr );

   path = "rangeSet";
   ossimRefPtr<ossimXmlNode> node5a2 =
      node5a->addChildNode( path, BLANK );

   path = "File";
   ossimRefPtr<ossimXmlNode> node5a2a =
      node5a2->addChildNode( path, BLANK );

   path = "rangeParameters";
   ossimRefPtr<ossimXmlNode> node5a2a1 =
      node5a2a->addChildNode( path, BLANK );

   path = "fileName";
   ossimRefPtr<ossimXmlNode> node5a2a2 =
      node5a2a->addChildNode( path, "gmljp2://codestream" );

   path = "fileStructure";
   ossimRefPtr<ossimXmlNode> node5a2a3 =
      node5a2a->addChildNode( path, "inapplicable" );

   return success;
}