Loading...
Searching...
No Matches
Utils.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3
4 This file is part of the TerraLib - a Framework for building GIS enabled applications.
5
6 TerraLib is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License,
9 or (at your option) any later version.
10
11 TerraLib is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with TerraLib. See COPYING. If not, write to
18 TerraLib Team at <terralib-team@terralib.org>.
19 */
20
21/*!
22 \file terralib/ws/core/Utils.h
23
24 \brief Utils of WS Core Runtime Library.
25
26 \author Emerson Moraes
27 */
28
29
30#include "../../maptools/Enums.h"
31#include "Config.h"
32
33#include <string>
34
35namespace te
36{
37 namespace ws
38 {
39 namespace core
40 {
41
42 /*!
43 * \brief This function gets an ImageType Enum according to an image format string (e.g. image/png).
44 *
45 * \param format (e.g. image/png).
46 *
47 * \return An ImageType according to specified format.
48 */
50
51
52 /*!
53 * \brief This function gets true for EPSGs that has inverted axis-order. Otherwise false.
54 * This implementation is using the MapServer's rule to define if the EPSG has inverted axis-order
55 * or not. If the EPSG code number is between 4000 and 5000, the axis-order of such EPSG is inverted.
56 *
57 * \param epsg An EPSG in the following format EPSG:XXXX (e.g.: EPSG:4326)
58 *
59 * \return true if the EPSG axis-order is inverted. Otherwise false.
60 */
61 TEWSCOREEXPORT bool IsInvertedEPSG(const std::string& epsg);
62
63 /*!
64 * \brief This function gets the size of a file, using C runtime stat struct that works on
65 * Windows, Mac and Linux.
66 *
67 * \param filename absolute name of a file.
68 *
69 * \return filesize of long type.
70 */
71 TEWSCOREEXPORT long GetFileSize(const std::string& filename);
72
73 }
74 }
75}
ImageType
This enum specifies the possible input and output image formats supported by the canvas API.
Definition: Enums.h:39
TEWSCOREEXPORT long GetFileSize(const std::string &filename)
This function gets the size of a file, using C runtime stat struct that works on Windows,...
TEWSCOREEXPORT te::map::ImageType FormatToImageType(const std::string &format)
This function gets an ImageType Enum according to an image format string (e.g. image/png).
TEWSCOREEXPORT bool IsInvertedEPSG(const std::string &epsg)
This function gets true for EPSGs that has inverted axis-order. Otherwise false. This implementation ...
TerraLib.
#define TEWSCOREEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:62
Proxy configuration file for TerraView (see terraview_config.h).