Loading...
Searching...
No Matches
MD_DataIdentification.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file terralib/metadata/iso19115/MD_DataIdentification.h
22
23 \brief Information required to identify a dataset.
24 */
25
26#ifndef __TERRALIB_METADATA_INTERNAL_ISO19115_MD_DATAIDENTIFICATION_H
27#define __TERRALIB_METADATA_INTERNAL_ISO19115_MD_DATAIDENTIFICATION_H
28
29// TerraLib
30#include "../../geometry/Envelope.h"
31#include "../Config.h"
32#include "CodeList.h"
33#include "MD_Identification.h"
34
35// STL
36#include <vector>
37#include <string>
38
39namespace te
40{
41 namespace md
42 {
43 class CI_Citation;
44
45 /*!
46 \class MD_DataIdentification
47
48 \brief Information required to identify a dataset.
49
50 \note Only the mandatory elements for the core metadata are implemented.
51 */
53 {
54 public:
55
56 /*!
57 \brief Constructor.
58 \param citation Pointer to the citation to the resource. Class takes ownership. Do not pass null.
59 \param abstract Brief narrative summary of the resource.
60 \param status The development phase of the resource.
61 \param lang A language used within the dataset. using standard ISO three-letter codes. Do not pass empty.
62 */
63 MD_DataIdentification(CI_Citation* cite, const std::string& abstract, MD_ProgressCode status, const std::string& lang);
64
65 //! Destructor.
67
68 /** @name Accessor methods
69 * Methods used to get or set properties.
70 */
71 //@{
72
73 /*!
74 \brief Adds a language used within the dataset.
75 \param lang Language description using standard ISO three-letter codes. Do not pass empty string.
76 */
77 void addLanguage(const std::string& lang);
78
79 //! Returns the set of languages associated to the dataset.
80 const std::vector<std::string>& getLanguages() const;
81
82 //! Adds a character coding standard in the dataset.
84
85 //! Returns a character coding standard in the dataset.
86 const std::vector<MD_CharacterSetCode>& getCharsetCodes() const;
87
88 //! Adds a theme of the dataset.
90
91 //! Return the themes associated to the dataset.
92 const std::vector<MD_TopicCategoryCode>& getTopicCategories() const;
93
94 /*!
95 \brief Adds the spatial description of the dataset.
96 \param llx Westernmost coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees.
97 \param lly Southernmost coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees.
98 \param urx Easternmost coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees.
99 \param lly Northernmost coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees.
100 \param isInside True if the bounding polygon encompasses an area covered by the data or false if an area where data is not present. Default true.
101 */
102 void addGeographicBBoxExt(const double& llx, const double& lly,
103 const double& urx, const double& ury,
104 bool isInside=true);
105
106 /*!
107 \brief Adds the spatial description of the dataset.
108 \param bbx Pointer to the enclosing boounding box. Do not pass null.
109 \param isInside True if the bounding polygon encompasses an area covered by the data or false if an area where data is not present. Default true.
110 */
111 void addGeographicBBoxExt(const te::gm::Envelope* bb, bool isInside=true);
112
113 //! Returns the set of extents for the dataset.
115
116 //! Returns true if the bounding polygon encompasses an area covered by the data or false if is an area where data is not present.
117 bool dataIsCovered() const;
118
119 //! Sets the spatial representation type.
121
122 //! Returns the spatial representation type.
124
125 /*!
126 \brief Sets resource scale.
127 The scale of a map or other cartographic object expressed as a fraction or ratio which relates unit distance on the map or other cartographic object to distance, measured in the same units, on the ground.
128 \param d The scale denominator. Do not pass <= 0;
129 */
130 void setScale(long d);
131
132 //! Returns the scale information. If equal to 0 the denominator is not valid.
133 long getScale() const;
134
135 //@}
136
138
139 private:
140
141 std::vector<std::string> m_language;
142 std::vector<MD_CharacterSetCode> m_charSet;
143 std::vector<MD_TopicCategoryCode> m_topicCategory;
147 long m_scale;
148 };
149 } // end namespace md
150} // end namespace te
151
152#endif // __TERRALIB_METADATA_INTERNAL_ISO19115_MD_DATAIDENTIFICATION_H
153
Identification information contains information to uniquely identify the data.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Provides a standardized method for citing a resource (dataset, feature, source, publication,...
Definition: CI_Citation.h:54
Information required to identify a dataset.
MD_Identification * clone() const
Gets a copy of this object.
void addGeographicBBoxExt(const double &llx, const double &lly, const double &urx, const double &ury, bool isInside=true)
Adds the spatial description of the dataset.
std::vector< MD_CharacterSetCode > m_charSet
const std::vector< std::string > & getLanguages() const
Returns the set of languages associated to the dataset.
void addTopicCategory(MD_TopicCategoryCode code)
Adds a theme of the dataset.
MD_DataIdentification(CI_Citation *cite, const std::string &abstract, MD_ProgressCode status, const std::string &lang)
Constructor.
const std::vector< MD_TopicCategoryCode > & getTopicCategories() const
Return the themes associated to the dataset.
void setScale(long d)
Sets resource scale. The scale of a map or other cartographic object expressed as a fraction or ratio...
std::vector< std::string > m_language
void setSpatialRepType(te::md::MD_SpatialRepresentationTypeCode code)
Sets the spatial representation type.
const std::vector< MD_CharacterSetCode > & getCharsetCodes() const
Returns a character coding standard in the dataset.
void addLanguage(const std::string &lang)
Adds a language used within the dataset.
std::vector< MD_TopicCategoryCode > m_topicCategory
long getScale() const
Returns the scale information. If equal to 0 the denominator is not valid.
bool dataIsCovered() const
Returns true if the bounding polygon encompasses an area covered by the data or false if is an area w...
te::md::MD_SpatialRepresentationTypeCode getSpatialRepTypeCode() const
Returns the spatial representation type.
te::md::MD_SpatialRepresentationTypeCode m_spatialRepresentationType
void addGeographicBBoxExt(const te::gm::Envelope *bb, bool isInside=true)
Adds the spatial description of the dataset.
const te::gm::Envelope & getExtent() const
Returns the set of extents for the dataset.
void addCharacterSet(MD_CharacterSetCode code)
Adds a character coding standard in the dataset.
Identification information contains information to uniquely identify the data.
MD_TopicCategoryCode
high-level geographic data thematic classification to assist in the grouping and search of available ...
Definition: CodeList.h:541
MD_ProgressCode
status of the dataset or progress of a review
Definition: CodeList.h:460
MD_SpatialRepresentationTypeCode
Definition: CodeList.h:524
MD_CharacterSetCode
name of the character coding standard used in the resource
Definition: CodeList.h:205
TerraLib.
#define TEMDEXPORT
Definition: Config.h:61