File: raster_info.cpp

package info (click to toggle)
mapnik 0.5.1-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,136 kB
  • ctags: 14,550
  • sloc: cpp: 68,887; python: 24,895; xml: 1,534; makefile: 503; sh: 79
file content (74 lines) | stat: -rw-r--r-- 2,004 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*****************************************************************************
 * 
 * This file is part of Mapnik (c++ mapping toolkit)
 *
 * Copyright (C) 2006 Artem Pavlenko
 *
 * This library 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.1 of the License, or (at your option) any later version.
 *
 * This library 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 library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 *****************************************************************************/
//$Id: raster_info.cc 17 2005-03-08 23:58:43Z pavlenko $

#include "raster_info.hpp"

raster_info::raster_info(const std::string& file,const std::string& format,const mapnik::Envelope<double>& extent,int srid)
    :file_(file),
     format_(format),
     extent_(extent),
     srid_(srid) {}

raster_info::raster_info(const raster_info& rhs)
    :file_(rhs.file_),
     format_(rhs.format_),
     extent_(rhs.extent_),
     srid_(rhs.srid_) {}

void raster_info::swap(raster_info& other) throw()
{
    file_=other.file_;
    format_=other.format_;
    extent_=other.extent_;
    srid_=other.srid_;
}


raster_info& raster_info::operator=(const raster_info& rhs)
{
    raster_info tmp(rhs);
    swap(tmp);
    return *this;
}


const Envelope<double>& raster_info::envelope() const
{
    return extent_;
}


const std::string& raster_info::file() const
{
    return file_;
}

const std::string& raster_info::format() const
{
    return format_;
}

const int raster_info::srid() const
{
    return srid_;
}