51 LstOccurrences::iterator ocs =
_presences.begin();
52 LstOccurrences::iterator end =
_presences.end();
54 while ( ocs != end ) {
58 if ( ! strcasecmp( groupId, oc->label() ) ) {
83 LstOccurrences::iterator ocs =
_absences.begin();
84 LstOccurrences::iterator end =
_absences.end();
86 while ( ocs != end ) {
90 if ( ! strcasecmp( groupId, oc->label() ) ) {
109 printf(
"%s", msg.c_str() );
111 printf(
"\nPresences" );
113 LstOccurrences::const_iterator ocs =
_presences.begin();
114 LstOccurrences::const_iterator end =
_presences.end();
116 while ( ocs != end ) {
118 (*ocs)->dump(
"\n****************" );
122 printf(
"\nAbsences" );
127 while ( ocs != end ) {
129 (*ocs)->dump(
"\n****************" );
139 int num_attributes,
Scalar *attributes )
141 if ( abundance > 0 ) {
143 _addPresence(
id, groupId, lg, lt, error, abundance, num_attributes, attributes );
147 _addAbsence(
id, groupId, lg, lt, error, num_attributes, attributes );
158 int num_attributes,
Scalar *attributes )
166 LstOccurrences::const_reverse_iterator ocs =
_presences.rbegin();
167 LstOccurrences::const_reverse_iterator end =
_presences.rend();
168 while ( ocs != end ) {
172 if ( ! strcasecmp( group->label(), groupId ) ) {
174 group->createOccurrence(
id, lg, lt, error, abundance, num_attributes, attributes );
183 newgroup->
createOccurrence(
id, lg, lt, error, abundance, num_attributes, attributes );
201 LstOccurrences::const_reverse_iterator ocs =
_absences.rbegin();
202 LstOccurrences::const_reverse_iterator end =
_absences.rend();
203 while ( ocs != end ) {
207 if ( ! strcasecmp( group->label(), groupId ) ) {
209 group->createOccurrence(
id, lg, lt, error, 0.0, num_attributes, attributes );
218 newgroup->
createOccurrence(
id, lg, lt, error, 0.0, num_attributes, attributes );
LstOccurrences _presences
void createOccurrence(const std::string &id, Coord longitude, Coord latitude, Scalar error, Scalar abundance, int num_attributes=0, Scalar *attributes=0, int num_env=0, Scalar *env=0)
double Scalar
Type of map values.
virtual OccurrencesPtr getAbsences(const char *groupId)
int _addOccurrence(const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, Scalar abundance, int num_attributes, Scalar *attributes)
void printOccurrences(const std::string &msg="")
virtual OccurrencesPtr getPresences(const char *groupId)
int _addPresence(const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, Scalar abundance, int num_attributes, Scalar *attributes)
int _addAbsence(const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, int num_attributes, Scalar *attributes)
double Coord
Type of map coordinates.