SAGA API Version 9.14
Loading...
Searching...
No Matches
mapping.cpp
Go to the documentation of this file.
1
3// //
4// SAGA //
5// //
6// System for Automated Geoscientific Analyses //
7// //
8// Application Programming Interface //
9// //
10// Library: SAGA_API //
11// //
12//-------------------------------------------------------//
13// //
14// mapping.cpp //
15// //
16// Copyright (C) 2026 by //
17// Olaf Conrad //
18// //
19//-------------------------------------------------------//
20// //
21// This file is part of 'SAGA - System for Automated //
22// Geoscientific Analyses'. SAGA is free software; you //
23// can redistribute it and/or modify it under the terms //
24// of the GNU General Public License as published by the //
25// Free Software Foundation, either version 2 of the //
26// License, or (at your option) any later version. //
27// //
28// SAGA is distributed in the hope that it will be //
29// useful, but WITHOUT ANY WARRANTY; without even the //
30// implied warranty of MERCHANTABILITY or FITNESS FOR A //
31// PARTICULAR PURPOSE. See the GNU General Public //
32// License for more details. //
33// //
34// You should have received a copy of the GNU General //
35// Public License along with this program; if not, see //
36// <http://www.gnu.org/licenses/>. //
37// //
38//-------------------------------------------------------//
39// //
40// contact: Olaf Conrad //
41// Institute of Geography //
42// University of Hamburg //
43// Germany //
44// //
45// e-mail: oconrad@saga-gis.org //
46// //
48
49//---------------------------------------------------------
50#include "../dc_helper.h"
51
52#include "map_dc.h"
53#include "map_layer.h"
54#include "map_classify.h"
55#include "map_legend.h"
56
57#include "mapping.h"
58
59
61// //
62// //
63// //
65
66//---------------------------------------------------------
68{
69 m_pDC = new wxMemoryDC(); m_pBitmap = new wxBitmap;
70}
71
72//---------------------------------------------------------
73CMap_Canvas::CMap_Canvas(int Width, int Height, int Background)
74{
75 m_pDC = new wxMemoryDC(); m_pBitmap = new wxBitmap;
76
77 Create(Width, Height, Background);
78}
79
80//---------------------------------------------------------
82{
83 delete(m_pDC); delete(m_pBitmap);
84}
85
86
88// //
90
91//---------------------------------------------------------
92bool CMap_Canvas::Create(int Width, int Height, int Background)
93{
94 m_pDC->SelectObject(wxNullBitmap);
95
96 if( Width > 0 && Height > 0 && m_pBitmap->Create(Width, Height) )
97 {
98 m_pDC->SelectObject(*m_pBitmap);
99 m_pDC->SetBackground(wxBrush(Background < 0 ? *wxWHITE : wxColour(SG_GET_R(Background), SG_GET_G(Background), SG_GET_B(Background))));
100 m_pDC->Clear();
101
102 return( true );
103 }
104
105 return( false );
106}
107
108//---------------------------------------------------------
110{
111 m_pDC->Clear();
112
113 return( true );
114}
115
116
118// //
120
121//---------------------------------------------------------
122bool CMap_Canvas::Save(const char *File) { return( Save(CSG_String(File)) ); }
123bool CMap_Canvas::Save(const wchar_t *File) { return( Save(CSG_String(File)) ); }
125{
126 if( m_pBitmap->IsOk() )
127 {
128 if( SG_File_Cmp_Extension(File, "jpg") && !wxImage::FindHandler(wxBITMAP_TYPE_JPEG) ) { wxImage::AddHandler(new wxJPEGHandler); }
129 if( SG_File_Cmp_Extension(File, "png") && !wxImage::FindHandler(wxBITMAP_TYPE_PNG ) ) { wxImage::AddHandler(new wxPNGHandler ); }
130 if( SG_File_Cmp_Extension(File, "tif") && !wxImage::FindHandler(wxBITMAP_TYPE_TIF ) ) { wxImage::AddHandler(new wxTIFFHandler); }
131 if( SG_File_Cmp_Extension(File, "gif") && !wxImage::FindHandler(wxBITMAP_TYPE_GIF ) ) { wxImage::AddHandler(new wxGIFHandler ); }
132
133 m_pDC->SelectObject(wxNullBitmap);
134 wxImage Image = m_pBitmap->ConvertToImage();
135 m_pDC->SelectObject(*m_pBitmap);
136
137 return( Image.SaveFile(File.wx_str()) );
138 }
139
140 return( false );
141}
142
143
145// //
147
148//---------------------------------------------------------
149bool CMap_Canvas::Draw_Map(CMap &Map, int x, int y, int Frame)
150{
151 return( Map.Draw(*this, x, y, Frame) );
152}
153
154//---------------------------------------------------------
155bool CMap_Canvas::Draw_ScaleBar(CMap &Map, int x, int y, int Width, int Height, int Style)
156{
157 double w = Width * Map.Get_Extent().Get_XRange() / Map.Get_Width();
158
159 SG_DC_Draw_Scale(*m_pDC, wxRect(x, y, Width, Height), 0., w, SG_DC_SCALE_HORIZONTAL, 5, Style);
160
161 return( true );
162}
163
164//---------------------------------------------------------
165bool CMap_Canvas::Draw_Legend(CMap_Layer &Layer, int x, int y, double Zoom)
166{
167 return( Layer.Draw_Legend(*this, x, y, Zoom) );
168}
169
170
172// //
173// //
174// //
176
177//---------------------------------------------------------
179{
180 m_pDC = new CSG_Map_DC();
181}
182
183//---------------------------------------------------------
184CMap::CMap(const CSG_Rect &rWorld, int Width, int Height, double Scale, int Background, bool bAlpha)
185{
186 m_pDC = new CSG_Map_DC();
187
188 Create(rWorld, Width, Height, Scale, Background, bAlpha);
189}
190
191//---------------------------------------------------------
193{
194 delete(m_pDC);
195}
196
197//---------------------------------------------------------
198bool CMap::Create(const CSG_Rect &rWorld, int Width, int Height, double Scale, int Background, bool bAlpha)
199{
200 return( m_pDC->Create(rWorld, wxRect(0, 0, Width, Height), Scale, Background, bAlpha) );
201}
202
203//---------------------------------------------------------
204bool CMap::Clear(void)
205{
206 return( m_pDC->Create(m_pDC->rWorld(), m_pDC->rDC(), m_pDC->Scale(), m_pDC->Get_Background(), m_pDC->has_Alpha()) );
207}
208
209//---------------------------------------------------------
210const CSG_Rect & CMap::Get_Extent(void) const { return( m_pDC->rWorld() ); }
211
212//---------------------------------------------------------
213int CMap::Get_Width (void) const { return( m_pDC->DC_Width ()); }
214int CMap::Get_Height(void) const { return( m_pDC->DC_Height()); }
215
216
218// //
220
221//---------------------------------------------------------
222bool CMap::Draw(CMap_Canvas &Canvas, int x, int y, int Frame)
223{
224 wxDC &dc = *Canvas.m_pDC;
225
226 dc.DrawBitmap(m_pDC->Get_Bitmap(), x, y);
227
228 if( Frame > 5 )
229 {
230 wxRect rMap(x, y, m_pDC->DC_Width(), m_pDC->DC_Height());
231 CSG_Rect rWorld = m_pDC->rWorld(); int Width = Frame; bool bUseDCFont = false; bool bScaleBar = false;
232
233 SG_DC_Draw_Edge(dc, SG_DC_EDGE_STYLE_SIMPLE, rMap.GetLeft(), rMap.GetTop(), rMap.GetRight(), rMap.GetBottom());
234
235 wxRect rFrame(rMap); rFrame.Inflate(Width);
236
237 SG_DC_Draw_Scale(dc, wxRect(rMap .GetLeft(), rFrame.GetTop(), rMap.GetWidth (), Width),
238 rWorld.Get_XMin(), rWorld.Get_XMax(), true, true, false, "", bUseDCFont
239 );
240
241 SG_DC_Draw_Scale(dc, wxRect(rFrame.GetLeft(), rMap .GetTop(), Width, rMap.GetHeight()),
242 rWorld.Get_YMin(), rWorld.Get_YMax(), false, false, false, "", bUseDCFont
243 );
244
245 if( bScaleBar == false )
246 {
247 SG_DC_Draw_Scale(dc, wxRect(rMap.GetLeft (), rMap.GetBottom(), rMap.GetWidth (), Width),
248 rWorld.Get_XMin(), rWorld.Get_XMax(), true, true, true, "", bUseDCFont
249 );
250
251 SG_DC_Draw_Scale(dc, wxRect(rMap.GetRight(), rMap.GetTop (), Width, rMap.GetHeight()),
252 rWorld.Get_YMin(), rWorld.Get_YMax(), false, false, true, "", bUseDCFont
253 );
254 }
255 else
256 {
257 SG_DC_Draw_Scale(dc, wxRect(rMap.GetLeft (), rMap.GetBottom(), rMap.GetWidth (), Width),
258 0., rWorld.Get_XRange(), true, true, true, "", bUseDCFont
259 );
260
261 SG_DC_Draw_Scale(dc, wxRect(rMap.GetRight(), rMap.GetTop (), Width, rMap.GetHeight()),
262 0., rWorld.Get_YRange(), false, false, true, "", bUseDCFont
263 );
264 }
265
266 SG_DC_Draw_Edge(dc, SG_DC_EDGE_STYLE_SIMPLE, rFrame.GetLeft(), rFrame.GetTop(), rFrame.GetRight(), rFrame.GetBottom());
267 }
268
269 return( true );
270}
271
272//---------------------------------------------------------
274{
275 return( Layer.Draw(*this) );
276}
277
278//---------------------------------------------------------
279bool CMap::Save(const char *File) { return( Save(CSG_String(File)) ); }
280bool CMap::Save(const wchar_t *File) { return( Save(CSG_String(File)) ); }
281bool CMap::Save(const CSG_String &File)
282{
283 wxImage Image;
284
285 if( m_pDC->Get_Image(Image) )
286 {
287 if( SG_File_Cmp_Extension(File, "jpg") && !wxImage::FindHandler(wxBITMAP_TYPE_JPEG) ) { wxImage::AddHandler(new wxJPEGHandler); }
288 if( SG_File_Cmp_Extension(File, "png") && !wxImage::FindHandler(wxBITMAP_TYPE_PNG ) ) { wxImage::AddHandler(new wxPNGHandler ); }
289 if( SG_File_Cmp_Extension(File, "tif") && !wxImage::FindHandler(wxBITMAP_TYPE_TIF ) ) { wxImage::AddHandler(new wxTIFFHandler); }
290 if( SG_File_Cmp_Extension(File, "gif") && !wxImage::FindHandler(wxBITMAP_TYPE_GIF ) ) { wxImage::AddHandler(new wxGIFHandler ); }
291
292 return( Image.SaveFile(File.wx_str()) );
293 }
294
295 return( false );
296}
297
298
300// //
301// //
302// //
304
305//---------------------------------------------------------
308
309//---------------------------------------------------------
312
313//---------------------------------------------------------
314const SG_Char * CMap_Base_Layer::List_Parameters(bool bDescription, bool bConstraints, bool bValue) const
315{
316 static CSG_String Listing; Listing.Printf("\n___\n%s\n___\n", Get_Name().c_str());
317
318 Listing += Get_Parameters().Get_Parameter_Listing(false, bDescription, bConstraints, bValue);
319
320 return( Listing.c_str() );
321}
322
323//---------------------------------------------------------
324bool CMap_Base_Layer::Set_Parameter(const SG_Char *ID, const char *Value) { return( Set_Parameter(ID, CSG_String(Value)) ); }
325bool CMap_Base_Layer::Set_Parameter(const SG_Char *ID, const wchar_t *Value) { return( Set_Parameter(ID, CSG_String(Value)) ); }
327{
328 return( Get_Parameters().Set_Parameter(ID, Value) );
329}
330
331//---------------------------------------------------------
332bool CMap_Base_Layer::Set_Parameter(const SG_Char *ID, int Value)
333{
334 return( Get_Parameters().Set_Parameter(ID, Value) );
335}
336
337//---------------------------------------------------------
338bool CMap_Base_Layer::Set_Parameter(const SG_Char *ID, double Value)
339{
340 return( Get_Parameters().Set_Parameter(ID, Value) );
341}
342
343//---------------------------------------------------------
345{
346 return( Get_Parameters().Set_Parameter(ID, Value) );
347}
348
349//---------------------------------------------------------
351{
352 return( On_Draw(*Map.m_pDC) );
353}
354
355
357// //
358// //
359// //
361
362//---------------------------------------------------------
364{
365 m_pLayer = NULL; m_pClassify = new CSG_Map_Classify();
366}
367
368//---------------------------------------------------------
370{
371 m_pLayer = NULL; m_pClassify = new CSG_Map_Classify();
372
373 Create(Layer);
374}
375
376//---------------------------------------------------------
378{
379 Destroy(); delete(m_pClassify);
380}
381
382//---------------------------------------------------------
384{
385 Destroy();
386
387 switch( Layer.Get_ObjectType() )
388 {
389 case SG_DATAOBJECT_TYPE_Grid : m_pLayer = new CSG_Map_Grid (Layer.asGrid ()); return( true );
390 case SG_DATAOBJECT_TYPE_Grids : m_pLayer = new CSG_Map_Grids (Layer.asGrids ()); return( true );
391 case SG_DATAOBJECT_TYPE_PointCloud: m_pLayer = new CSG_Map_PointCloud (Layer.asPointCloud()); return( true );
392 case SG_DATAOBJECT_TYPE_TIN : m_pLayer = new CSG_Map_TIN (Layer.asTIN ()); return( true );
394 switch( Layer.asShapes()->Get_Type() )
395 {
396 case SHAPE_TYPE_Point : m_pLayer = new CSG_Map_Shapes_Point (Layer.asShapes ()); return( true );
397 case SHAPE_TYPE_Points : m_pLayer = new CSG_Map_Shapes_Points (Layer.asShapes ()); return( true );
398 case SHAPE_TYPE_Line : m_pLayer = new CSG_Map_Shapes_Line (Layer.asShapes ()); return( true );
399 case SHAPE_TYPE_Polygon : m_pLayer = new CSG_Map_Shapes_Polygon(Layer.asShapes ()); return( true );
400
401 default : return( false );
402 }
403
404 default : return( false );
405 }
406}
407
408//---------------------------------------------------------
410{
411 if( m_pLayer )
412 {
413 delete( m_pLayer );
414
415 m_pLayer = NULL;
416 }
417
418 return( true );
419}
420
421//---------------------------------------------------------
423{
424 static CSG_Parameters Dummy;
425
426 return( m_pLayer ? m_pLayer->Get_Parameters() : Dummy );
427}
428
429//---------------------------------------------------------
431{
432 return( m_pLayer && m_pLayer->Parameters_Changed() && m_pLayer->Draw(dc_Map) );
433}
434
435//---------------------------------------------------------
437{
438 if( m_pLayer && m_pLayer->Get_Object() )
439 {
440 if( m_pLayer->Get_Object()->asShapes() )
441 {
442 return( SG_Get_ShapeType_Name(m_pLayer->Get_Object()->asShapes()->Get_Type()) + ": " + m_pLayer->Get_Object()->Get_Name() );
443 }
444
445 return( SG_Get_DataObject_Name(m_pLayer->Get_ObjectType()) + ": " + m_pLayer->Get_Object()->Get_Name() );
446 }
447
448 return( _TL("have no layer") );
449}
450
451
453// //
455
456//---------------------------------------------------------
457bool CMap_Layer::_Classify_Initialize(const SG_Char *_Field, const SG_Char *_Normalize)
458{
459 if( m_pLayer && m_pLayer->Get_Object() )
460 {
461 if( m_pLayer->Get_Object()->asTable(true) )
462 {
463 Get_Parameters().Set_Parameter("CLASSIFIED_FIELD" , _Field ); int Field = -1; Get_Parameters()["CLASSIFIED_FIELD" ].asChoice()->Get_Data(Field );
464 Get_Parameters().Set_Parameter("CLASSIFIED_NORMALIZE", _Normalize); int Normalize = -1; Get_Parameters()["CLASSIFIED_NORMALIZE"].asChoice()->Get_Data(Normalize);
465
466 return( m_pClassify->Create(m_pLayer->Get_Object()->asTable(true), Field, Normalize) );
467 }
468 else
469 {
470 return( m_pClassify->Create(m_pLayer->Get_Object()) );
471 }
472 }
473
474 return( false );
475}
476
477//---------------------------------------------------------
478bool CMap_Layer::_Classify_Finalize(int ColorsID)
479{
480 CSG_Colors Colors(0, ColorsID); if( ColorsID < 0 ) { Colors.Create(*Get_Parameters()["STRETCH_COLORS"].asColors()); }
481
482 return( m_pLayer && m_pLayer->Get_Object() && m_pClassify->Set_LUT(*Get_Parameters()["CLASSIFIED_LUT"].asTable(), Colors, 0) && Set_Parameter(SG_T("COLOR_SYMBOLS"), 1) );
483}
484
485//---------------------------------------------------------
486bool CMap_Layer::Classify_Unique (int maxCount , int ColorsID, const SG_Char *Field ) { return( _Classify_Initialize(Field, NULL ) && m_pClassify->Classify_Unique (maxCount ) && _Classify_Finalize(ColorsID) ); }
487bool CMap_Layer::Classify_Equal (int Count, double Minimum, double Maximum, int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_Equal (Count, Minimum, Maximum) && _Classify_Finalize(ColorsID) ); }
488bool CMap_Layer::Classify_Equal (int Count , int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_Equal (Count ) && _Classify_Finalize(ColorsID) ); }
489bool CMap_Layer::Classify_Defined (double Interval, double Offset , int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_Defined (Interval, Offset ) && _Classify_Finalize(ColorsID) ); }
490bool CMap_Layer::Classify_Defined (double Interval , int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_Defined (Interval ) && _Classify_Finalize(ColorsID) ); }
491bool CMap_Layer::Classify_Quantile (int Count, bool bHistogram , int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_Quantile (Count, bHistogram ) && _Classify_Finalize(ColorsID) ); }
492bool CMap_Layer::Classify_Geometric(int Count, bool bIncreasing , int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_Geometric(Count, bIncreasing ) && _Classify_Finalize(ColorsID) ); }
493bool CMap_Layer::Classify_Natural (int Count , int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_Natural (Count ) && _Classify_Finalize(ColorsID) ); }
494bool CMap_Layer::Classify_StdDev (double StdDev, double StdDev_Max , int ColorsID, const SG_Char *Field, const SG_Char *Normalize) { return( _Classify_Initialize(Field, Normalize) && m_pClassify->Classify_StdDev (StdDev, StdDev_Max ) && _Classify_Finalize(ColorsID) ); }
495
496//---------------------------------------------------------
497bool CMap_Layer::Draw_Legend(CMap_Canvas &Canvas, int x, int y, double Zoom)
498{
499 if( m_pLayer && m_pLayer->Get_Object() )
500 {
501 m_pLayer->Get_Legend()->Draw(*Canvas.m_pDC, Zoom, 1., wxPoint(x, y));
502
503 return( true );
504 }
505
506
507 return( false );
508}
509
510
512// //
513// //
514// //
516
517//---------------------------------------------------------
522
523//---------------------------------------------------------
530
531//---------------------------------------------------------
533{
534 delete(m_pLayer);
535}
536
537//---------------------------------------------------------
539{
541
542 return( m_Projection.is_Okay() );
543}
544
545//---------------------------------------------------------
547{
548 return( m_pLayer->Get_Parameters() );
549}
550
551//---------------------------------------------------------
553{
554 return( m_pLayer->Parameters_Changed() && m_pLayer->Draw(dc_Map, m_Projection) );
555}
556
557//---------------------------------------------------------
559{
560 return( "Graticule" );
561}
562
563
565// //
566// //
567// //
569
570//---------------------------------------------------------
575
576//---------------------------------------------------------
583
584//---------------------------------------------------------
586{
587 delete(m_pLayer);
588}
589
590//---------------------------------------------------------
592{
594
595 return( m_Projection.is_Okay() );
596}
597
598//---------------------------------------------------------
600{
601 return( m_pLayer->Get_Parameters() );
602}
603
604//---------------------------------------------------------
606{
607 return( m_pLayer->Parameters_Changed() && m_pLayer->Draw(dc_Map, m_Projection) );
608}
609
610//---------------------------------------------------------
612{
613 return( "Base Map" );
614}
615
616
618// //
619// //
620// //
622
623//---------------------------------------------------------
#define SG_GET_B(rgb)
Definition api_core.h:1350
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Extension(const CSG_String &File, const CSG_String &Extension)
#define SG_GET_G(rgb)
Definition api_core.h:1349
#define SG_T(s)
Definition api_core.h:537
#define SG_GET_R(rgb)
Definition api_core.h:1348
#define SG_Char
Definition api_core.h:536
#define _TL(s)
Definition api_core.h:1619
virtual ~CMap_Base_Layer(void)
Definition mapping.cpp:310
CMap_Base_Layer(void)
Definition mapping.cpp:306
const SG_Char * List_Parameters(bool bDescription=true, bool bConstraints=true, bool bValue=true) const
Definition mapping.cpp:314
virtual CSG_String Get_Name(void) const =0
virtual bool On_Draw(class CSG_Map_DC &dc_Map)=0
bool Draw(CMap &Map)
Definition mapping.cpp:350
virtual CSG_Parameters & Get_Parameters(void) const =0
bool Set_Parameter(const SG_Char *ID, const char *Value)
Definition mapping.cpp:324
virtual bool On_Draw(class CSG_Map_DC &dc_Map)
Definition mapping.cpp:605
class CSG_Map_BaseMap * m_pLayer
Definition mapping.h:263
CSG_Projection m_Projection
Definition mapping.h:265
CMap_BaseMap(void)
Definition mapping.cpp:571
virtual CSG_String Get_Name(void) const
Definition mapping.cpp:611
virtual ~CMap_BaseMap(void)
Definition mapping.cpp:585
virtual CSG_Parameters & Get_Parameters(void) const
Definition mapping.cpp:599
bool Create(const CSG_Projection &Projection)
Definition mapping.cpp:591
bool Draw_Legend(class CMap_Layer &Layer, int x=0, int y=0, double Zoom=1.)
Definition mapping.cpp:165
friend class CMap
Definition mapping.h:94
bool Save(const char *File)
Definition mapping.cpp:122
bool Draw_Map(class CMap &Map, int x=0, int y=0, int Frame=0)
Definition mapping.cpp:149
bool Create(int Width, int Height, int Background=-1)
Definition mapping.cpp:92
bool Clear(void)
Definition mapping.cpp:109
CMap_Canvas(void)
Definition mapping.cpp:67
friend class CMap_Layer
Definition mapping.h:94
virtual ~CMap_Canvas(void)
Definition mapping.cpp:81
bool Draw_ScaleBar(class CMap &Map, int x=0, int y=0, int Width=400, int Height=30, int Style=0x18)
Definition mapping.cpp:155
class CSG_Map_Graticule * m_pLayer
Definition mapping.h:237
virtual CSG_Parameters & Get_Parameters(void) const
Definition mapping.cpp:546
CMap_Graticule(void)
Definition mapping.cpp:518
virtual CSG_String Get_Name(void) const
Definition mapping.cpp:558
virtual bool On_Draw(class CSG_Map_DC &dc_Map)
Definition mapping.cpp:552
bool Create(const CSG_Projection &Projection)
Definition mapping.cpp:538
CSG_Projection m_Projection
Definition mapping.h:239
virtual ~CMap_Graticule(void)
Definition mapping.cpp:532
virtual CSG_String Get_Name(void) const
Definition mapping.cpp:436
bool Draw_Legend(CMap_Canvas &Canvas, int x, int y, double Zoom=1.)
Definition mapping.cpp:497
bool Classify_Unique(int maxCount=1024, int ColorsID=-1, const SG_Char *Field=NULL)
Definition mapping.cpp:486
bool Classify_Equal(int Count, double Minimum, double Maximum, int ColorsID=-1, const SG_Char *Field=NULL, const SG_Char *Normalize=NULL)
Definition mapping.cpp:487
virtual bool On_Draw(class CSG_Map_DC &dc_Map)
Definition mapping.cpp:430
bool Destroy(void)
Definition mapping.cpp:409
bool Classify_Geometric(int Count=10, bool bIncreasing=true, int ColorsID=-1, const SG_Char *Field=NULL, const SG_Char *Normalize=NULL)
Definition mapping.cpp:492
bool Classify_Quantile(int Count=10, bool bHistogram=true, int ColorsID=-1, const SG_Char *Field=NULL, const SG_Char *Normalize=NULL)
Definition mapping.cpp:491
CMap_Layer(void)
Definition mapping.cpp:363
bool Classify_Defined(double Interval, double Offset, int ColorsID=-1, const SG_Char *Field=NULL, const SG_Char *Normalize=NULL)
Definition mapping.cpp:489
bool Classify_Natural(int Count=10, int ColorsID=-1, const SG_Char *Field=NULL, const SG_Char *Normalize=NULL)
Definition mapping.cpp:493
bool Classify_StdDev(double StdDev, double StdDev_Max=4., int ColorsID=-1, const SG_Char *Field=NULL, const SG_Char *Normalize=NULL)
Definition mapping.cpp:494
virtual CSG_Parameters & Get_Parameters(void) const
Definition mapping.cpp:422
bool Create(CSG_Data_Object &Layer)
Definition mapping.cpp:383
virtual ~CMap_Layer(void)
Definition mapping.cpp:377
friend class CMap_Base_Layer
Definition mapping.h:136
bool Clear(void)
Definition mapping.cpp:204
bool Draw(CMap_Canvas &Canvas, int x, int y, int Frame=0)
Definition mapping.cpp:222
bool Save(const char *File)
Definition mapping.cpp:279
bool Create(const CSG_Rect &rWorld, int Width, int Height, double Scale=1., int Background=-1, bool bAlpha=false)
Definition mapping.cpp:198
CMap(void)
Definition mapping.cpp:178
int Get_Width(void) const
Definition mapping.cpp:213
virtual ~CMap(void)
Definition mapping.cpp:192
int Get_Height(void) const
Definition mapping.cpp:214
const CSG_Rect & Get_Extent(void) const
Definition mapping.cpp:210
class CSG_PointCloud * asPointCloud(bool bPolymorph=false) const
class CSG_TIN * asTIN(bool bPolymorph=false) const
class CSG_Shapes * asShapes(bool bPolymorph=false) const
class CSG_Grids * asGrids(bool bPolymorph=false) const
virtual TSG_Data_Object_Type Get_ObjectType(void) const =0
Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking.
class CSG_Grid * asGrid(bool bPolymorph=false) const
class CSG_Table * asTable(bool bPolymorph=false) const
bool Create(CSG_Data_Object *pObject)
CSG_Data_Object * Get_Object(void) const
Definition map_layer.h:96
bool Get_Parameter_Listing(CSG_Table &Listing) const
bool Set_Parameter(const CSG_String &ID, CSG_Parameter *pValue)
double Get_YRange(void) const
Definition geo_tools.h:511
double Get_XMax(void) const
Definition geo_tools.h:506
double Get_XRange(void) const
Definition geo_tools.h:510
double Get_XMin(void) const
Definition geo_tools.h:505
double Get_YMin(void) const
Definition geo_tools.h:507
double Get_YMax(void) const
Definition geo_tools.h:508
virtual TSG_Shape_Type Get_Type(void) const
Definition shapes.h:814
const SG_Char * c_str(void) const
int Printf(const char *Format,...)
const class wxString & wx_str(void) const
Definition api_core.h:595
CSG_String SG_Get_DataObject_Name(TSG_Data_Object_Type Type)
@ SG_DATAOBJECT_TYPE_PointCloud
Definition dataobject.h:123
@ SG_DATAOBJECT_TYPE_Grids
Definition dataobject.h:119
@ SG_DATAOBJECT_TYPE_TIN
Definition dataobject.h:122
@ SG_DATAOBJECT_TYPE_Shapes
Definition dataobject.h:121
@ SG_DATAOBJECT_TYPE_Grid
Definition dataobject.h:118
void SG_DC_Draw_Scale(wxDC &dc, const wxRect &r, double zMin, double zMax, int Orientation, int Tick, int Style, const wxString &Unit, bool bUseDCFont)
void SG_DC_Draw_Edge(wxDC &dc, int Edge_Style, int ax, int ay, int bx, int by)
#define SG_DC_SCALE_HORIZONTAL
Definition dc_helper.h:167
@ SG_DC_EDGE_STYLE_SIMPLE
Definition dc_helper.h:98
CSG_String SG_Get_ShapeType_Name(TSG_Shape_Type Type)
Definition shapes.cpp:65
@ SHAPE_TYPE_Polygon
Definition shapes.h:105
@ SHAPE_TYPE_Line
Definition shapes.h:104
@ SHAPE_TYPE_Points
Definition shapes.h:103
@ SHAPE_TYPE_Point
Definition shapes.h:102