27 #include "../../../core/translator/Translator.h" 28 #include "../../../metadata/iso19115/CI_Citation.h" 29 #include "../../../metadata/iso19115/CI_ResponsibleParty.h" 30 #include "../../../metadata/iso19115/MD_Format.h" 31 #include "../../../metadata/iso19115/MD_Metadata.h" 32 #include "../../../metadata/iso19115/MD_Distribution.h" 33 #include "../../../srs/Config.h" 34 #include "../../../xml/AbstractWriter.h" 35 #include "../../../xml/Reader.h" 42 #include <boost/format.hpp> 50 writer.
writeAttribute(
"xmlns:gco",
"http://www.isotc211.org/2005/gco");
51 writer.
writeAttribute(
"xmlns:gmd",
"http://www.isotc211.org/2005/gmd");
53 writer.
writeAttribute(
"xmlns:gts",
"http://www.isotc211.org/2005/gts");
54 writer.
writeAttribute(
"xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance");
82 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_CharacterSetCode");
96 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode");
109 const boost::ptr_vector<te::md::CI_ResponsibleParty>& mycontacts = md->
getContacts();
110 if (!mycontacts.empty())
112 for (boost::ptr_vector<te::md::CI_ResponsibleParty>::const_iterator it = mycontacts.begin();
113 it != mycontacts.end(); ++it)
171 scode= boost::str(boost::format(
"urn:ogc:def:crs:EPSG::%d") % md->
getReferenceSystem());
186 for (boost::ptr_vector<te::md::MD_Identification>::const_iterator itd = ids.begin();
187 itd != ids.end(); ++itd)
200 const boost::ptr_vector<te::md::MD_Format>& fmts = dist->
getFormats();
204 for (boost::ptr_vector<te::md::MD_Format>::const_iterator itf = fmts.begin(); itf != fmts.end(); ++itf)
210 if (!itf->m_name.empty())
222 if (!itf->m_version.empty())
236 if (!dist->
getURL().empty())
264 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode");
328 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#CI_RoleCode");
355 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_ProgressCode");
362 const boost::ptr_vector<te::md::CI_ResponsibleParty>& ctcs =
id.getPointsOfContact();
366 for (boost::ptr_vector<te::md::CI_ResponsibleParty>::const_iterator it = ctcs.begin();
367 it != ctcs.end(); ++it)
377 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_SpatialRepresentationTypeCode");
386 const std::vector<std::string>& mlang = did->
getLanguages();
389 for(
const std::string& lang: mlang)
392 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#LanguageCode");
404 const std::vector<te::md::MD_CharacterSetCode>& mchars = did->
getCharsetCodes();
410 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_CharacterSetCode");
428 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_TopicCategoryCode");
538 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#CI_DateTypeCode");
const std::string & getOrganizationName() const
Returns the individual name.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
const boost::gregorian::date & getDate() const
Returns the citation date.
virtual void writeStartElement(const std::string &qName)=0
Information about the distributor of and the options for obtaining the resource.
const std::vector< MD_CharacterSetCode > & getCharsetCodes() const
Returns a character coding standard in the dataset.
virtual void writeValue(const std::string &value)=0
const boost::ptr_vector< MD_Format > & getFormats() const
Gets the distribution formats.
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
const std::vector< std::string > & getLanguages() const
Returns the set of languages associated to the dataset.
const std::vector< MD_TopicCategoryCode > & getTopicCategories() const
Return the themes associated to the dataset.
long getScale() const
Returns the scale information. If equal to 0 the denominator is not valid.
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
This class models a XML writer object.
Provides a standardized method for citing a resource (dataset, feature, source, publication, etc.)
te::md::MD_SpatialRepresentationTypeCode getSpatialRepTypeCode() const
Returns the spatial representation type.
const std::string & getTitle() const
Returns the citation title.
const std::string & getPositionName() const
Returns the position name.
const std::string & getIndividualName() const
Returns the individual name.
CI_RoleCode getRoleCode() const
Returns the responsible party role.
An Envelope defines a 2D rectangular region.
Information required to identify a dataset.
const te::gm::Envelope & getExtent() const
Returns the set of extents for the dataset.
TEMDEXPORT void Save(const te::md::MD_Metadata *md, te::xml::AbstractWriter &writer)
virtual void writeAttribute(const std::string &attName, const std::string &value)=0
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
CI_DateTypeCode getDateType() const
Returns the citation date type.
virtual void writeEndElement(const std::string &qName)=0
Contains the identify of person(s), and/or position, and/or organization(s) associated with the resou...
virtual void writeStartDocument(const std::string &encoding, const std::string &standalone)=0
Identification information contains information to uniquely identify the data.
const std::string & getURL() const
Gets an online resource.
MD_CharacterSetCode
name of the character coding standard used in the resource
MD_TopicCategoryCode
high-level geographic data thematic classification to assist in the grouping and search of available ...
bool isValid() const
It tells if the rectangle is valid or not.