openModeller  Version 1.5.0
DelimitedTextOccurrences Class Reference

#include <DelimitedTextOccurrences.hh>

Inheritance diagram for DelimitedTextOccurrences:
Inheritance graph
Collaboration diagram for DelimitedTextOccurrences:
Collaboration graph

Public Member Functions

 DelimitedTextOccurrences (const char *source, const char *coordSystem)
 
 ~DelimitedTextOccurrences ()
 
bool load ()
 
- Public Member Functions inherited from OccurrencesReader
virtual ~OccurrencesReader ()
 
virtual OccurrencesPtr getPresences (const char *groupId)
 
virtual OccurrencesPtr getAbsences (const char *groupId)
 
void printOccurrences (const std::string &msg="")
 

Static Public Member Functions

static OccurrencesReaderCreateOccurrencesReaderCallback (const char *source, const char *coordSystem)
 

Private Attributes

bool _loaded
 

Additional Inherited Members

- Protected Types inherited from OccurrencesReader
typedef std::vector
< OccurrencesPtr
LstOccurrences
 
- Protected Member Functions inherited from OccurrencesReader
int _addOccurrence (const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, Scalar abundance, int num_attributes, Scalar *attributes)
 
 OccurrencesReader ()
 
- Protected Attributes inherited from OccurrencesReader
LstOccurrences _presences
 
LstOccurrences _absences
 
char * _source
 
char * _coord_system
 

Detailed Description

Declaration of DelimitedTextOccurrences class.

Author
Mauro E S Muņoz (mauro.nosp@m.@cri.nosp@m.a.org.nosp@m..br)
Date
2003-02-25
Author
Alexandre Copertino Jardim alexc.nosp@m.j@dp.nosp@m.i.inp.nosp@m.e.br
Date
2006-03-21
Id:
DelimitedTextOccurrences.hh 4277 2008-05-02 18:41:38Z rdg

LICENSE INFORMATION

Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html Read occurrences data of one or more group from an ASCII file. The file is read and stored as a linked list of objects from the Occurrences class. Allows navigation through the list.

Format:

Lines beginning with '#' are ignored!

The file must have 5 columns separated by TAB.

  • Column 1 : Unique identifier for the occurrence.
  • Columns 2 : Label (a group identifier, usually the scientific name).
  • Column 3 : longitude (-180.0 <= lat <= 180.0).
  • Column 4 : latitude: (-90.0 <= long <= 90.0).
  • Column 5 : Abundance (integer).

Definition at line 58 of file DelimitedTextOccurrences.hh.

Constructor & Destructor Documentation

DelimitedTextOccurrences::DelimitedTextOccurrences ( const char *  source,
const char *  coordSystem 
)

Constructor.

Parameters
sourceSource of occurrences (such as a file name, Terralib path or TAPIR URL).
coordSystemDefault coordinate system in WKT.

Definition at line 67 of file DelimitedTextOccurrences.cpp.

References OccurrencesReader::_coord_system, _loaded, and OccurrencesReader::_source.

Referenced by CreateOccurrencesReaderCallback().

DelimitedTextOccurrences::~DelimitedTextOccurrences ( )

Destructor.

Definition at line 79 of file DelimitedTextOccurrences.cpp.

Member Function Documentation

OccurrencesReader * DelimitedTextOccurrences::CreateOccurrencesReaderCallback ( const char *  source,
const char *  coordSystem 
)
static

Return a new instance of this class.

Definition at line 59 of file DelimitedTextOccurrences.cpp.

References DelimitedTextOccurrences().

Referenced by OccurrencesFactory::instance().

Here is the call graph for this function:

bool DelimitedTextOccurrences::load ( )
virtual

Read occurrences from a file.

Implements OccurrencesReader.

Definition at line 87 of file DelimitedTextOccurrences.cpp.

References OccurrencesReader::_addOccurrence(), _loaded, OccurrencesReader::_source, Log::debug(), error, Log::error(), and Log::instance().

Here is the call graph for this function:

Member Data Documentation

bool DelimitedTextOccurrences::_loaded
private

Definition at line 85 of file DelimitedTextOccurrences.hh.

Referenced by DelimitedTextOccurrences(), and load().


The documentation for this class was generated from the following files: