OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimDemUtil.h
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: Ken Melero
9 // Orginally written by Jamie Moyers (jmoyers@geeks.com)
10 // Adapted from the package KDEM.
11 // Description: This class provides some simple utilities for DEMs.
12 //
13 //********************************************************************
14 // $Id$
15 
16 #ifndef ossimDemUtil_HEADER
17 #define ossimDemUtil_HEADER 1
18 
19 #include <ossim/base/ossimIosFwd.h>
20 #include <string>
21 #include <memory>
22 
23 class ossimFilename;
24 
26 {
27 public:
28 
47  static bool isUsgsDem(const ossimFilename& file);
48 
49  static bool isUsgsDem(std::shared_ptr<ossim::istream> str, const std::string& connectionString);
50 
55  static bool getRecord(ossim::istream& s, std::string& strbuf, long reclength = 1024);
56 
60  static bool getRecord(ossim::istream& s, char* buf, long reclength = 1024);
61 
62  static long getLong(char* const strbuf, // string to extract long from
63  long const startpos, // starting position of field
64  long const width); // width of field
65 
66  static bool getDouble(std::string const& strbuf, // string to extract double from
67  long const startpos, // starting position of field
68  long const width, // width of field
69  double& val); // value extracted from field.
70 
71 private:
72 
73  ossimDemUtil();
74 };
75 
76 #endif /* #ifndef ossimDemUtil_HEADER */
static long getLong(char *const strbuf, long const startpos, long const width)
static bool isUsgsDem(const ossimFilename &file)
Does basic sanity checks to see if file is a dem.
static bool getDouble(std::string const &strbuf, long const startpos, long const width, double &val)
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
static bool getRecord(ossim::istream &s, std::string &strbuf, long reclength=1024)
Reads a single record from a DEM.