Umasoft
Main Page
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
TerrainSDK
vtdata
UtilityMap.h
1
//
2
// UtilityMap.h
3
//
4
// High-level representation of a utility network, currently supporting
5
// power networks (poles and lines).
6
//
7
// Copyright (c) 2001-2008 Virtual Terrain Project
8
// Free for all uses, see license.txt for details.
9
//
10
11
#ifndef UTILITYH
12
#define UTILITYH
13
14
#include "
MathTypes.h
"
15
#include "
Projections.h
"
16
22
struct
vtPole
23
{
24
int
m_type;
25
DPoint2
m_p;
26
};
27
28
#define LF_UNDERGROUND 1
29
35
class
vtLine
:
public
DLine2
36
{
37
public
:
38
int
m_flags;
39
vtPole
*m_src, *m_dst;
40
};
41
45
class
vtUtilityMap
46
{
47
public
:
48
vtUtilityMap
();
49
~
vtUtilityMap
();
50
51
void
GetPoleExtents(
DRECT
&rect);
52
bool
ImportFromSHP(
const
char
*filename,
const
vtProjection
&proj);
53
// bool ReadXML(const char *pathname, bool progress_callback(int));
54
55
protected
:
56
bool
ImportPolesFromSHP(
const
char
*fname);
57
bool
ImportLinesFromSHP(
const
char
*fname);
58
vtPole
*ClosestPole(
const
DPoint2
&p);
59
60
vtArray<vtPole *>
m_Poles;
61
vtArray<vtLine *>
m_Lines;
62
63
vtProjection
m_proj;
64
};
65
66
#endif // UTILITYH
Generated on Fri Jun 7 2013 16:07:52 for Umasoft by
1.8.4