11 #include "vtdata/RoadMap.h"
12 #include "vtdata/Selectable.h"
21 enum VisualIntersectionType {
49 void Translate(
const DPoint2 &offset);
51 void EnforceLinkEndpoints();
56 VisualIntersectionType GetVisual() {
return m_iVisual; }
57 void SetVisual(VisualIntersectionType v) { m_iVisual = v; }
59 void DetermineVisualFromLinks();
67 VisualIntersectionType m_iVisual;
81 bool WithinExtent(
const DRECT &target);
82 bool WithinExtent(
const DPoint2 &target);
85 bool InBounds(
const DRECT &bound);
87 bool PartiallyInBounds(
const DRECT &bound);
90 bool Draw(wxDC *pDC,
vtScaledView *pView,
bool bShowDirection =
false,
91 bool bShowWidth =
false);
93 void ComputeDisplayedLinkWidth(
const DPoint2 &ToMeters);
98 virtual void SetFlag(
int flag,
bool value);
111 bool m_bSidesComputed;
127 void AddElementsFromDLG(
vtDLGFile *pDlg);
130 bool ApplyCFCC(
LinkEdit *pR,
const char *str);
131 void AddElementsFromSHP(
const wxString &filename,
const vtProjection &proj,
132 bool progress_callback(
int) = NULL);
135 void AddElementsFromOGR(
class OGRDataSource *datasource,
136 bool progress_callback(
int) = NULL);
137 LinkEdit *AddRoadSegment(
class OGRLineString *pLineString);
140 bool ImportFromOSM(
const char *fname,
bool progress_callback(
int) = NULL);
144 int MergeRedundantNodes(
bool bDegrees,
bool progress_callback(
int) = NULL);
146 int RemoveDegenerateLinks();
148 int RemoveUnnecessaryNodes();
150 int CleanLinkPoints();
154 int DeleteDanglingLinks();
156 int FixOverlappedLinks(
bool bDegrees);
158 int FixExtraneousParallels();
165 void GuessIntersectionTypes();
168 DRECT* DeleteSelected(
int &nBounds);
173 bool SelectLink(
DPoint2 point,
float error,
DRECT &bound);
175 int SelectLinks(
DRECT bound,
bool bval);
178 bool SelectAndExtendLink(
DPoint2 point,
float error,
DRECT &bound);
181 bool SelectHwyNum(
int num);
184 bool CrossSelectLinks(
DRECT bound,
bool bval);
186 void InvertSelection();
189 bool SelectNode(
const DPoint2 &point,
float epsilon,
DRECT &bound);
191 int SelectNodes(
DRECT bound,
bool bval);
194 int NumSelectedNodes();
196 int NumSelectedLinks();
198 DRECT *DeSelectAll(
int &numRegions);
201 void ApplyDLGAttributes(
int road_type,
int &lanes, SurfaceType &stype,
int &priority);
202 bool extract_road_attributes(
const char *strEntity,
int &lanes,
203 SurfaceType &stype,
int &priority);
205 bool attribute_filter_roads(
DLGLine *pLine,
int &lanes, SurfaceType &stype,
int &priority);
206 bool AppendFromOGRLayer(OGRLayer *pLayer);
207 void AddLinkFromLineString(OGRLineString *pLineString);
210 void DeleteSingleLink(
LinkEdit *pLink);