/* -*-c++-*- */
/* osgEarth - Geospatial SDK for OpenSceneGraph
* Copyright 2020 Pelican Mapping
* http://osgearth.org
*
* osgEarth is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
#ifndef OSGEARTH_WMS_H
#define OSGEARTH_WMS_H
#include
#include
#include
#include
#include
#include
namespace osgEarth {
class WMSImageLayer;
namespace Util {
class XmlElement;
}
}
/**
* WMS (OGC Web Map Service)
* https://www.opengeospatial.org/standards/wms
*/
//! WMS namespace contains WMS support classes used to the Layers
namespace osgEarth { namespace WMS
{
class WMSImageLayerOptions;
/**
* WMS style definition
*/
class OSGEARTH_EXPORT Style : public osg::Referenced
{
public:
//! Constructs a new style
Style();
Style(const std::string& name, const std::string& title);
//! DTOR
virtual ~Style() { }
/**
*Gets the name of the style
*/
const std::string& getName() const {return _name;}
/**
*Sets the name of the style
*/
void setName(const std::string &name) {_name = name;}
/**
*Gets the title of the style
*/
const std::string& getTitle() const {return _title;}
/**
*Sets the title of the style
*/
void setTitle(const std::string &title) {_title = title;}
protected:
std::string _name;
std::string _title;
};
/**
* WMS server layer definition (unrelated to an osgEarth layer)
*/
class OSGEARTH_EXPORT Layer : public osg::Referenced
{
public:
Layer();
/** dtor */
virtual ~Layer() { }
/**
*Gets the name of the layer
*/
const std::string& getName() const {return _name;}
/**
*Sets the name of the layer
*/
void setName(const std::string &name) {_name = name;}
/**
*Gets the title of the layer
*/
const std::string& getTitle() const {return _title;}
/**
*Sets the title of the layer
*/
void setTitle(const std::string &title) {_title = title;}
/**
*Gets the abstract of the layer
*/
const std::string& getAbstract() const {return _abstract;}
/**
*Sets the abstract of the layer
*/
void setAbstract(const std::string &abstract) {_abstract = abstract;}
/**
*Gets the lat lon extents of the layer
*/
void getLatLonExtents(double &minLon, double &minLat, double &maxLon, double &maxLat) const;
/**
*Sets the lat lon extents of the layer
*/
void setLatLonExtents(double minLon, double minLat, double maxLon, double maxLat);
/**
*Gets the extents of the layer
*/
void getExtents(double &minX, double &minY, double &maxX, double &maxY) const;
/**
*Sets the extents of the layer
*/
void setExtents(double minX, double minY, double maxX, double maxY);
/**A list of Styles*/
typedef std::vector