SAGA API  v9.5
parameter.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 // parameter.cpp //
15 // //
16 // Copyright (C) 2005 by Olaf Conrad //
17 // //
18 //-------------------------------------------------------//
19 // //
20 // This file is part of 'SAGA - System for Automated //
21 // Geoscientific Analyses'. //
22 // //
23 // This library is free software; you can redistribute //
24 // it and/or modify it under the terms of the GNU Lesser //
25 // General Public License as published by the Free //
26 // Software Foundation, either version 2.1 of the //
27 // License, or (at your option) any later version. //
28 // //
29 // This library is distributed in the hope that it will //
30 // be useful, but WITHOUT ANY WARRANTY; without even the //
31 // implied warranty of MERCHANTABILITY or FITNESS FOR A //
32 // PARTICULAR PURPOSE. See the GNU Lesser General Public //
33 // License for more details. //
34 // //
35 // You should have received a copy of the GNU Lesser //
36 // General Public License along with this program; if //
37 // not, see <http://www.gnu.org/licenses/>. //
38 // //
39 //-------------------------------------------------------//
40 // //
41 // contact: Olaf Conrad //
42 // Institute of Geography //
43 // University of Goettingen //
44 // Germany //
45 // //
46 // e-mail: oconrad@saga-gis.org //
47 // //
49 
50 //---------------------------------------------------------
51 #include "parameters.h"
52 #include "data_manager.h"
53 #include "tool.h"
54 #include "tool_library.h"
55 
56 
58 // //
59 // //
60 // //
62 
63 //---------------------------------------------------------
64 CSG_Parameter::CSG_Parameter(CSG_Parameters *pParameters, CSG_Parameter *pParent, const CSG_String &Identifier, const CSG_String &Name, const CSG_String &Description, int Constraint)
65 {
66  m_pParameters = pParameters;
67  m_pParent = pParent;
68  m_Identifier = Identifier;
69  m_Name = Name;
70  m_Description = Description;
71  m_Constraint = Constraint;
72 
73  m_bEnabled = true;
74 
75  //-----------------------------------------------------
76  m_nChildren = 0;
77  m_Children = NULL;
78 
79  if( m_pParent )
80  {
81  m_pParent->_Add_Child(this);
82  }
83 }
84 
85 //---------------------------------------------------------
87 {
88  if( m_Children )
89  {
90  SG_Free(m_Children);
91  }
92 }
93 
94 
96 // //
98 
99 //---------------------------------------------------------
101 {
102  return( m_pParameters );
103 }
104 
105 //---------------------------------------------------------
107 {
108  return( m_pParent );
109 }
110 
111 //---------------------------------------------------------
113 {
114  return( m_pParameters ? m_pParameters->Get_Manager() : NULL );
115 }
116 
117 
119 // //
121 
122 //---------------------------------------------------------
124 {
126 }
127 
128 //---------------------------------------------------------
130 {
132 }
133 
134 
136 // //
138 
139 //---------------------------------------------------------
141 {
142  if( bDoUse )
143  {
144  m_Constraint &= ~PARAMETER_NOT_FOR_GUI;
145  }
146  else
147  {
148  m_Constraint |= PARAMETER_NOT_FOR_GUI;
149  }
150 }
151 
152 //---------------------------------------------------------
154 {
155  if( bDoUse )
156  {
157  m_Constraint &= ~PARAMETER_NOT_FOR_CMD;
158  }
159  else
160  {
161  m_Constraint |= PARAMETER_NOT_FOR_CMD;
162  }
163 }
164 
165 //---------------------------------------------------------
167 {
168  return( !(m_Constraint & PARAMETER_NOT_FOR_GUI) && (Get_Parent() == NULL || Get_Parent()->do_UseInGUI()) );
169 }
170 
171 //---------------------------------------------------------
173 {
174  return( !(m_Constraint & PARAMETER_NOT_FOR_CMD) && (Get_Parent() == NULL || Get_Parent()->do_UseInCMD()) );
175 }
176 
177 //---------------------------------------------------------
179 {
180  if( bIgnore )
181  {
182  m_Constraint &= ~PARAMETER_IGNORE_PROJECTION;
183  }
184  else
185  {
186  m_Constraint |= PARAMETER_IGNORE_PROJECTION;
187  }
188 }
189 
190 
192 // //
194 
195 //---------------------------------------------------------
196 bool CSG_Parameter::Set_Enabled(bool bEnabled)
197 {
198  if( m_bEnabled != bEnabled )
199  {
200  m_bEnabled = bEnabled;
201 
202  return( !bEnabled );
203  }
204 
205  return( bEnabled );
206 }
207 
208 //---------------------------------------------------------
209 bool CSG_Parameter::is_Enabled(bool bCheckEnv) const
210 {
211  if( bCheckEnv )
212  {
213  if( !do_UseInGUI() && m_pParameters->has_GUI() )
214  {
215  return( false );
216  }
217 
218  if( !do_UseInCMD() && !m_pParameters->has_GUI() )
219  {
220  return( false );
221  }
222  }
223 
224  return( m_bEnabled && (m_pParent == NULL || m_pParent->is_Enabled()) );
225 }
226 
227 //---------------------------------------------------------
229 {
230  for(int i=0; i<Get_Children_Count(); i++)
231  {
232  Get_Child(i)->Set_Enabled(bEnabled);
233  }
234 
235  return( true );
236 }
237 
238 //---------------------------------------------------------
239 bool CSG_Parameter::is_Option(void) const
240 {
241  if( !is_Information() )
242  {
243  switch( Get_Type() )
244  {
245  case PARAMETER_TYPE_Bool :
246  case PARAMETER_TYPE_Int :
247  case PARAMETER_TYPE_Double :
248  case PARAMETER_TYPE_Degree :
249  case PARAMETER_TYPE_Date :
250  case PARAMETER_TYPE_Range :
252  case PARAMETER_TYPE_Choice :
254  case PARAMETER_TYPE_String :
255  case PARAMETER_TYPE_Text :
257  case PARAMETER_TYPE_Font :
258  case PARAMETER_TYPE_Color :
259  case PARAMETER_TYPE_Colors :
265  return( true );
266 
267  default:
268  return( false );
269  }
270  }
271 
272  return( false );
273 }
274 
275 //---------------------------------------------------------
277 {
278  switch( Get_Type() )
279  {
281  case PARAMETER_TYPE_Grid :
282  case PARAMETER_TYPE_Grids :
283  case PARAMETER_TYPE_Table :
284  case PARAMETER_TYPE_Shapes :
285  case PARAMETER_TYPE_TIN :
287  return( true );
288 
289  default:
290  return( false );
291  }
292 }
293 
294 //---------------------------------------------------------
296 {
297  switch( Get_Type() )
298  {
305  return( true );
306 
307  default:
308  return( false );
309  }
310 }
311 
312 //---------------------------------------------------------
314 {
315  return( Get_Type() == PARAMETER_TYPE_Parameters );
316 }
317 
318 //---------------------------------------------------------
320 {
321  switch( Get_Type() )
322  {
324  case PARAMETER_TYPE_Node :
326  return( false );
327 
328  case PARAMETER_TYPE_String :
329  return( ((CSG_Parameter_String *)this)->is_Password() == false );
330 
331  default:
332  return( !is_Information() );
333  }
334 }
335 
336 //---------------------------------------------------------
338 {
339  if( pParameter && pParameter->Get_Type() == Get_Type() )
340  {
341  switch( Get_Type() )
342  {
343  //-------------------------------------------------
345  case PARAMETER_TYPE_Choice :
346  {
347  bool bResult = pParameter->asChoice()->Get_Count() == asChoice()->Get_Count();
348 
349  for(int i=0; bResult && i<asChoice()->Get_Count(); i++)
350  {
351  bResult = SG_STR_CMP(pParameter->asChoice()->Get_Item(i), asChoice()->Get_Item(i)) == 0;
352  }
353 
354  return( bResult );
355  }
356 
357  //-------------------------------------------------
359  {
360  bool bResult = pParameter->asChoices()->Get_Item_Count() == asChoices()->Get_Item_Count();
361 
362  for(int i=0; bResult && i<asChoices()->Get_Item_Count(); i++)
363  {
364  bResult = SG_STR_CMP(pParameter->asChoices()->Get_Item(i), asChoices()->Get_Item(i)) == 0;
365  }
366 
367  return( bResult );
368  }
369 
370  //-------------------------------------------------
371  case PARAMETER_TYPE_FixedTable : return( pParameter->asTable()->is_Compatible(asTable()) );
372 
373  //-------------------------------------------------
375  {
376  bool bResult = pParameter->asParameters()->Get_Count() == asParameters()->Get_Count();
377 
378  for(int i=0; bResult && i<asParameters()->Get_Count(); i++)
379  {
380  bResult = pParameter->asParameters()->Get_Parameter(i)->is_Compatible(asParameters()->Get_Parameter(i));
381  }
382 
383  return( bResult );
384  }
385 
386  //-------------------------------------------------
387  default:
388  return( true );
389  }
390  }
391 
392  return( false );
393 }
394 
395 //---------------------------------------------------------
397 {
398  if( pParameter && pParameter->Get_Type() == Get_Type() )
399  {
400  switch( Get_Type() )
401  {
402  case PARAMETER_TYPE_Node : return( true );
403 
404  //-------------------------------------------------
405  case PARAMETER_TYPE_Bool : return( pParameter->asBool () == asBool () );
408  case PARAMETER_TYPE_Choice :
409  case PARAMETER_TYPE_Color :
410  case PARAMETER_TYPE_Int : return( pParameter->asInt () == asInt () );
411  case PARAMETER_TYPE_Date :
412  case PARAMETER_TYPE_Degree :
413  case PARAMETER_TYPE_Double : return( pParameter->asDouble() == asDouble() );
414 
416  case PARAMETER_TYPE_Font :
417  case PARAMETER_TYPE_Text :
419  case PARAMETER_TYPE_String : return( SG_STR_CMP(pParameter->asString(), asString()) == 0 );
420 
421  case PARAMETER_TYPE_Range : return( pParameter->asRange()->Get_Min() == asRange()->Get_Min()
422  && pParameter->asRange()->Get_Max() == asRange()->Get_Max() );
423 
424  case PARAMETER_TYPE_Grid_System : return( pParameter->asGrid_System()->is_Equal(*asGrid_System()) );
425 
426  //-------------------------------------------------
428  {
429  bool bResult = pParameter->asChoices()->Get_Selection_Count() == asChoices()->Get_Selection_Count();
430 
431  for(int i=0; bResult && i<asChoices()->Get_Selection_Count(); i++)
432  {
433  bResult = pParameter->asChoices()->Get_Selection_Index(i) == asChoices()->Get_Selection_Index(i);
434  }
435 
436  return( bResult );
437  }
438 
439  //-------------------------------------------------
440  case PARAMETER_TYPE_Colors :
441  {
442  bool bResult = pParameter->asColors()->Get_Count() == asColors()->Get_Count();
443 
444  for(int i=0; bResult && i<asColors()->Get_Count(); i++)
445  {
446  bResult = pParameter->asColors()->Get_Color(i) == asColors()->Get_Color(i);
447  }
448 
449  return( bResult );
450  }
451 
452  //-------------------------------------------------
454  {
455  bool bResult = pParameter->asTable()->is_Compatible(asTable()) && pParameter->asTable()->Get_Count() == asTable()->Get_Count();
456 
457  for(int i=0; bResult && i<asTable()->Get_Count(); i++)
458  {
459  CSG_Table_Record *pA = pParameter->asTable()->Get_Record(i), *pB = asTable()->Get_Record(i);
460 
461  for(int j=0; bResult && j<asTable()->Get_Field_Count(); j++)
462  {
463  bResult = SG_STR_CMP(pA->asString(j), pB->asString(j)) == 0;
464  }
465  }
466 
467  return( bResult );
468  }
469 
470  //-------------------------------------------------
472  case PARAMETER_TYPE_Grid :
473  case PARAMETER_TYPE_Grids :
474  case PARAMETER_TYPE_Table :
475  case PARAMETER_TYPE_Shapes :
476  case PARAMETER_TYPE_TIN :
477  case PARAMETER_TYPE_PointCloud : return( pParameter->asDataObject() == asDataObject() );
478 
479  //-------------------------------------------------
486  {
487  bool bResult = pParameter->asList()->Get_Item_Count() == asList()->Get_Item_Count();
488 
489  for(int i=0; bResult && i<asList()->Get_Item_Count(); i++)
490  {
491  bResult = pParameter->asList()->Get_Item(i) == asList()->Get_Item(i);
492  }
493 
494  return( bResult );
495  }
496 
497  //-------------------------------------------------
499  {
500  bool bResult = pParameter->asParameters()->Get_Count() == asParameters()->Get_Count();
501 
502  for(int i=0; bResult && i<asParameters()->Get_Count(); i++)
503  {
504  bResult = pParameter->asParameters()->Get_Parameter(i)->is_Value_Equal(asParameters()->Get_Parameter(i));
505  }
506 
507  return( bResult );
508  }
509 
510  //-------------------------------------------------
511  default: break;
512  }
513  }
514 
515  return( false );
516 }
517 
518 //---------------------------------------------------------
520 {
521  switch( Get_Type() )
522  {
523  default : return( SG_DATAOBJECT_TYPE_Undefined );
524  case PARAMETER_TYPE_Grid :
526  case PARAMETER_TYPE_Grids :
528  case PARAMETER_TYPE_Table :
530  case PARAMETER_TYPE_Shapes :
532  case PARAMETER_TYPE_TIN :
538  }
539 }
540 
541 
543 // //
545 
546 //---------------------------------------------------------
548 {
549  return( m_Identifier );
550 }
551 
552 //---------------------------------------------------------
553 bool CSG_Parameter::Cmp_Identifier(const CSG_String &Identifier) const
554 {
555  return( !m_Identifier.Cmp(Identifier) || !m_Identifier.Cmp(Identifier + ".Default") );
556 }
557 
558 //---------------------------------------------------------
562 //---------------------------------------------------------
564 {
566 
567  if( ID.Length() > 0 )
568  {
569  ID += "_";
570  }
571 
572  ID += Get_Identifier();
573 
574  ID.Replace(".", "_");
575  ID.Replace("|", "_");
576  ID.Replace(" ", "_");
577 
578  return( ID );
579 }
580 
581 //---------------------------------------------------------
583 {
584  m_Name = Name;
585 
586  return( true );
587 }
588 
589 const SG_Char * CSG_Parameter::Get_Name(void) const
590 {
591  return( m_Name );
592 }
593 
594 //---------------------------------------------------------
596 {
597  m_Description = Description;
598 
599  return( true );
600 }
601 
603 {
604  return( m_Description );
605 }
606 
607 //---------------------------------------------------------
609 {
610  return( Get_Description(Flags, SG_T("\n")) );
611 }
612 
613 //---------------------------------------------------------
614 CSG_String CSG_Parameter::Get_Description(int Flags, const SG_Char *Separator) const
615 {
616  #define SEPARATE if( !s.is_Empty() ) { s.Append(Separator); }
617 
618  if( !Separator || !Separator[0] )
619  {
620  return( Get_Description(Flags) );
621  }
622 
623  CSG_String s;
624 
625  //-----------------------------------------------------
626  if( (Flags & PARAMETER_DESCRIPTION_NAME) != 0 )
627  {
628  SEPARATE; s += CSG_String::Format("%s", Get_Name());
629  }
630 
631  //-----------------------------------------------------
632  if( (Flags & PARAMETER_DESCRIPTION_TYPE) != 0 )
633  {
634  SEPARATE;
635 
637  {
638  s += CSG_String::Format("%s %s", Get_Type_Name().c_str(), SG_Get_DataObject_Name(Get_DataObject_Type()).c_str());
639  }
640  else
641  {
642  s += CSG_String::Format("%s", Get_Type_Name().c_str());
643  }
644 
645  if( is_DataObject() || is_DataObject_List() )
646  {
647  s += CSG_String::Format(", %s", is_Input() ? _TL("input") : _TL("output"));
648 
649  if( is_Optional() )
650  {
651  s += CSG_String::Format(", %s", _TL("optional"));
652  }
653  }
654 
655  if( do_UseInGUI() != do_UseInCMD() )
656  {
657  if( m_pParameters->has_GUI() || do_UseInGUI() )
658  {
659  s += CSG_String::Format("\n[%s]", do_UseInGUI() ? SG_T("GUI") : SG_T("CMD"));
660  }
661  }
662  }
663 
664  //-----------------------------------------------------
665  if( (Flags & PARAMETER_DESCRIPTION_OPTIONAL) != 0 && is_Optional() )
666  {
667  SEPARATE; s += CSG_String::Format("%s", _TL("optional"));
668  }
669 
670  //-----------------------------------------------------
671  if( (Flags & PARAMETER_DESCRIPTION_PROPERTIES) != 0 )
672  {
673  switch( Get_Type() )
674  {
675  default:
676  break;
677 
679  SEPARATE; s += CSG_String::Format("%s:", _TL("Available Choices"));
680 
681  for(int i=0; i<asChoice()->Get_Count(); i++)
682  {
683  s += CSG_String::Format("%s[%d] %s", Separator, i, asChoice()->Get_Item(i));
684  }
685  break;
686 
687  case PARAMETER_TYPE_Choice :
688  if( do_UseInCMD() || asChoice()->Get_Count() < 32 )
689  {
690  SEPARATE; s += CSG_String::Format("%s:", _TL("Available Choices"));
691 
692  for(int i=0; i<asChoice()->Get_Count(); i++)
693  {
694  s += CSG_String::Format("%s[%d] %s", Separator, i, asChoice()->Get_Item(i));
695  }
696  }
697  else
698  {
699  SEPARATE; s += CSG_String::Format("%d %s:", asChoice()->Get_Count(), _TL("Choices"));
700  }
701  break;
702 
704  if( do_UseInCMD() || asChoices()->Get_Item_Count() < 32 )
705  {
706  SEPARATE; s += CSG_String::Format("%s:", _TL("Available Choices"));
707 
708  for(int i=0; i<asChoices()->Get_Item_Count(); i++)
709  {
710  s += CSG_String::Format("%s[%d] %s", Separator, i, asChoices()->Get_Item(i).c_str());
711  }
712  }
713  else
714  {
715  SEPARATE; s += CSG_String::Format("%d %s:", asChoices()->Get_Item_Count(), _TL("Choices"));
716  }
717  break;
718 
719  case PARAMETER_TYPE_Int :
720  if( asValue()->has_Minimum() )
721  {
722  SEPARATE; s += CSG_String::Format("%s: %d", _TL("Minimum"), (int)asValue()->Get_Minimum());
723  }
724 
725  if( asValue()->has_Maximum() )
726  {
727  SEPARATE; s += CSG_String::Format("%s: %d", _TL("Maximum"), (int)asValue()->Get_Maximum());
728  }
729  break;
730 
731  case PARAMETER_TYPE_Double :
732  case PARAMETER_TYPE_Degree :
733 // case PARAMETER_TYPE_Range :
734  if( asValue()->has_Minimum() )
735  {
736  SEPARATE; s += CSG_String::Format("%s: %f", _TL("Minimum"), asValue()->Get_Minimum());
737  }
738 
739  if( asValue()->has_Maximum() )
740  {
741  SEPARATE; s += CSG_String::Format("%s: %f", _TL("Maximum"), asValue()->Get_Maximum());
742  }
743  break;
744 
746  SEPARATE; s += CSG_String::Format("%d %s:%s", asTable()->Get_Field_Count(), _TL("Fields"), Separator);
747 
748  for(int i=0; i<asTable()->Get_Field_Count(); i++)
749  {
750  s += CSG_String::Format("- %d. [%s] %s%s", i + 1, SG_Data_Type_Get_Name(asTable()->Get_Field_Type(i)).c_str(), asTable()->Get_Field_Name(i), Separator);
751  }
752  break;
753 
755  SEPARATE; s += CSG_String::Format("%d %s", asParameters()->Get_Count(), _TL("Parameters"));
756 
757  if( do_UseInCMD() )
758  {
759  s += CSG_String::Format(":%s", Separator);
760 
761  for(int i=0; i<asParameters()->Get_Count(); i++)
762  {
763  s += CSG_String::Format("- %d. %s%s", i + 1, asParameters()->Get_Parameter(i)->Get_Description(Flags, Separator).c_str(), Separator);
764  }
765  }
766  break;
767  }
768 
769  if( !m_Default.is_Empty() )
770  {
771  SEPARATE; s += CSG_String::Format("%s: %s", _TL("Default"), m_Default.c_str());
772  }
773  }
774 
775  //-----------------------------------------------------
776  if( (Flags & PARAMETER_DESCRIPTION_TEXT) != 0 && m_Description.Length() > 0 )
777  {
778  SEPARATE; s += m_Description;
779  }
780 
781  //-----------------------------------------------------
782  #undef SEPARATE
783 
784  return( s );
785 }
786 
787 
789 // //
791 
792 //---------------------------------------------------------
797 
798 //---------------------------------------------------------
800 {
801  switch( _Set_Value(Value) )
802  {
804  return( false );
805 
807  has_Changed();
808  }
809 
810  return( true );
811 }
812 
813 //---------------------------------------------------------
814 bool CSG_Parameter::Set_Value(double Value)
815 {
816  switch( _Set_Value(Value) )
817  {
819  return( false );
820 
822  has_Changed();
823  }
824 
825  return( true );
826 }
827 
828 //---------------------------------------------------------
829 bool CSG_Parameter::Set_Value(const char *Value) { return( Set_Value(CSG_String(Value)) ); }
830 bool CSG_Parameter::Set_Value(const wchar_t *Value) { return( Set_Value(CSG_String(Value)) ); }
832 {
833  switch( _Set_Value(Value) )
834  {
836  return( false );
837 
839  has_Changed();
840  }
841 
842  return( true );
843 }
844 
845 //---------------------------------------------------------
846 bool CSG_Parameter::Set_Value(void *Value)
847 {
848  switch( _Set_Value(Value) )
849  {
851  return( false );
852 
854  has_Changed();
855  }
856 
857  return( true );
858 }
859 
860 //---------------------------------------------------------
862 {
863  if( Value )
864  {
865  switch( Value->Get_Type() )
866  {
867  default:
868  break;
869 
872  return( Set_Value(Value->asInt()) );
873  }
874  }
875 
876  return( Assign(Value) );
877 }
878 
879 //---------------------------------------------------------
881 {
882  return( false );
883 }
884 
885 //---------------------------------------------------------
886 bool CSG_Parameter::has_Changed(int Check_Flags)
887 {
888  _Set_String();
889 
890  return( m_pParameters && m_pParameters->_On_Parameter_Changed(this, Check_Flags) );
891 }
892 
893 //---------------------------------------------------------
895 {
896  // nop
897 }
898 
899 
901 // //
903 
904 //---------------------------------------------------------
906 {
907  m_Default.Printf("%d", Value);
908 
909  return( true );
910 }
911 
912 //---------------------------------------------------------
913 bool CSG_Parameter::Set_Default(double Value)
914 {
915  m_Default.Printf("%f", Value);
916 
917  return( true );
918 }
919 
920 //---------------------------------------------------------
922 {
923  m_Default = Value;
924 
925  return( true );
926 }
927 
928 //---------------------------------------------------------
930 {
931  return( m_Default );
932 }
933 
934 //---------------------------------------------------------
936 {
937  return( m_Default.Cmp(asString()) == 0 );
938 }
939 
940 //---------------------------------------------------------
942 {
943  return( Set_Value(m_Default) );
944 }
945 
946 
948 // //
950 
951 //---------------------------------------------------------
952 bool CSG_Parameter::Check(bool bSilent)
953 {
955  {
956  return( asParameters()->DataObjects_Check(bSilent) );
957  }
958 
959  //-----------------------------------------------------
961  {
962  if( m_pParameters->Get_Manager() )
963  {
964  bool bExists = false; CSG_Data_Manager &Manager = *m_pParameters->Get_Manager();
965 
966  for(size_t i=0; !bExists && i<Manager.Grid ().Count(); i++)
967  {
968  bExists = Manager.Grid (i).Get_System() == *asGrid_System();
969  }
970 
971  for(size_t i=0; !bExists && i<Manager.Grids().Count(); i++)
972  {
973  bExists = Manager.Grids(i).Get_System() == *asGrid_System();
974  }
975 
976  if( bExists == false )
977  {
978  Set_Value((void *)NULL);
979  }
980  }
981 
982  return( true ); // ( false );
983  }
984 
985  //-----------------------------------------------------
986  if( is_DataObject() )
987  {
988  if( is_Input() || (is_Output() && asDataObject() != DATAOBJECT_CREATE) )
989  {
990  if( m_pParameters->Get_Manager() && !m_pParameters->Get_Manager()->Exists(asDataObject()) )
991  {
993  }
994  }
995 
996  return( is_Optional() || !is_Enabled() || asDataObject() );
997  }
998 
999  //-----------------------------------------------------
1000  else if( is_DataObject_List() )
1001  {
1002  for(int j=asList()->Get_Item_Count()-1; j>=0; j--)
1003  {
1004  CSG_Data_Object *pDataObject = asList()->Get_Item(j);
1005 
1006  if( !pDataObject || (m_pParameters->Get_Manager() && !m_pParameters->Get_Manager()->Exists(pDataObject)) )
1007  {
1008  asList()->Del_Item(j, false);
1009  }
1010  }
1011 
1012  _Set_String();
1013 
1014  asList()->Update_Data();
1015 
1016  return( is_Optional() || !is_Enabled() || is_Output() || asList()->Get_Item_Count() > 0 );
1017  }
1018 
1019  //-----------------------------------------------------
1020  return( true );
1021 }
1022 
1023 
1025 // //
1027 
1028 //---------------------------------------------------------
1029 int CSG_Parameter::_asInt (void) const { return( 0 ); }
1030 double CSG_Parameter::_asDouble (void) const { return( 0. ); }
1031 void * CSG_Parameter::_asPointer (void) const { return( NULL ); }
1032 const SG_Char * CSG_Parameter::_asString (void) const { return( m_String ); }
1033 
1034 //---------------------------------------------------------
1036 const SG_Char * CSG_Parameter::asFont (void) const { return( Get_Type() != PARAMETER_TYPE_Font ? NULL : (const SG_Char *)asPointer() ); }
1039 
1040 //---------------------------------------------------------
1042 CSG_Grid * CSG_Parameter::asGrid (void) const { CSG_Data_Object *pObject = asDataObject(); return( !pObject || pObject == DATAOBJECT_CREATE || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grid ? NULL : (CSG_Grid *)pObject ); }
1043 CSG_Grids * CSG_Parameter::asGrids (void) const { CSG_Data_Object *pObject = asDataObject(); return( !pObject || pObject == DATAOBJECT_CREATE || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids ? NULL : (CSG_Grids *)pObject ); }
1044 CSG_TIN * CSG_Parameter::asTIN (void) const { CSG_Data_Object *pObject = asDataObject(); return( !pObject || pObject == DATAOBJECT_CREATE || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_TIN ? NULL : (CSG_TIN *)pObject ); }
1045 CSG_PointCloud * CSG_Parameter::asPointCloud (void) const { CSG_Data_Object *pObject = asDataObject(); return( !pObject || pObject == DATAOBJECT_CREATE || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_PointCloud ? NULL : (CSG_PointCloud *)pObject ); }
1046 
1047 //---------------------------------------------------------
1049 {
1050  CSG_Data_Object *pObject = asDataObject();
1051 
1052  if( pObject && pObject != DATAOBJECT_CREATE
1053  && (pObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_Shapes
1054  || pObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_PointCloud) )
1055  {
1056  return( (CSG_Shapes *)pObject );
1057  }
1058 
1059  return( NULL );
1060 }
1061 
1062 //---------------------------------------------------------
1064 {
1065  switch( Get_Type() )
1066  {
1067  default: {
1068  CSG_Data_Object *pObject = asDataObject();
1069 
1070  if( pObject && pObject != DATAOBJECT_CREATE
1071  && (pObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_Table
1072  || pObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_Shapes
1073  || pObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_TIN
1074  || pObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_PointCloud) )
1075  {
1076  return( (CSG_Table *)pObject );
1077  }
1078  } break;
1079 
1080  case PARAMETER_TYPE_Grids :
1081  return( asGrids() ? asGrids()->Get_Attributes_Ptr() : NULL );
1082 
1084  return( (CSG_Table *)asPointer() );
1085  }
1086 
1087  return( NULL );
1088 }
1089 
1090 //---------------------------------------------------------
1092 {
1098  {
1099  return( (CSG_Parameter_Value *)this );
1100  }
1101 
1102  return( NULL );
1103 }
1104 
1108  && Get_Type() != PARAMETER_TYPE_Data_Type ? NULL : (CSG_Parameter_Choice *)this ); }
1113 
1114 //---------------------------------------------------------
1115 CSG_Parameter_List * CSG_Parameter::asList (void) const { return( !is_DataObject_List() ? NULL : (CSG_Parameter_List *)this ); }
1122 
1123 
1125 // //
1127 
1128 //---------------------------------------------------------
1129 void CSG_Parameter::_Add_Child(CSG_Parameter *pChild)
1130 {
1131  m_Children = (CSG_Parameter **)SG_Realloc(m_Children, (m_nChildren + 1) * sizeof(CSG_Parameter *));
1132  m_Children[m_nChildren++] = pChild;
1133 }
1134 
1135 
1137 // //
1139 
1140 //---------------------------------------------------------
1142 {
1143  if( pSource && Get_Type() == pSource->Get_Type() )
1144  {
1145  m_bEnabled = pSource->m_bEnabled;
1146  m_Default = pSource->m_Default;
1147 
1148  if( _Assign(pSource) )
1149  {
1150  _Set_String();
1151 
1152  return( true );
1153  }
1154  }
1155 
1156  return( false );
1157 }
1158 
1160 {
1161  return( true );
1162 }
1163 
1164 //---------------------------------------------------------
1165 bool CSG_Parameter::Serialize(CSG_MetaData &MetaData, bool bSave)
1166 {
1167  if( bSave )
1168  {
1170  {
1171  return( true );
1172  }
1173 
1174  CSG_MetaData &Child = *MetaData.Add_Child(
1175  is_Option () ? "OPTION" :
1176  is_DataObject () ? "DATA" :
1177  is_DataObject_List() ? "DATA_LIST" : "PARAMETER"
1178  );
1179 
1180  Child.Add_Property("type" , Get_Type_Identifier ());
1181  Child.Add_Property("id" , Get_Identifier ());
1182  Child.Add_Property("name" , Get_Name ());
1183  Child.Add_Property("parms", Get_Parameters()->Get_Identifier());
1184 
1185  _Serialize(Child, bSave);
1186 
1187  return( true );
1188  }
1189  else if( MetaData.Cmp_Property("type", Get_Type_Identifier())
1190  && MetaData.Cmp_Property("id" , Get_Identifier ())
1191  && _Serialize(MetaData, bSave) )
1192  {
1193  _Set_String();
1194 
1195  return( true );
1196  }
1197 
1198  return( false );
1199 }
1200 
1201 bool CSG_Parameter::_Serialize(CSG_MetaData &Entry, bool bSave)
1202 {
1203  Entry.Set_Content("-");
1204 
1205  return( true );
1206 }
1207 
1208 
1210 // //
1211 // Coordinate System Reference Picker //
1212 // //
1214 
1215 //---------------------------------------------------------
1217 {
1218  // nop...
1219 }
1220 
1221 //---------------------------------------------------------
1223 {
1224  m_pParameters = &Parameters;
1225 
1226  Parameters.Add_String(ParentID, "CRS_STRING", _TL("Coordinate System Definition"),
1227  _TL("Supported formats comprise PROJ and WKT strings, object codes (e.g. \"EPSG:4326\")."), ""
1228  )->Set_UseInGUI(false);
1229 
1230  return( true );
1231 }
1232 
1233 
1235 // //
1237 
1238 //---------------------------------------------------------
1240 {
1241  if( !m_pParameters || !m_pParameters->has_GUI() || m_pCRS )
1242  {
1243  return( false );
1244  }
1245 
1246  m_pCRS = SG_Get_Tool_Library_Manager().Create_Tool("pj_proj4", 15, true); // CCRS_Picker
1247 
1248  if( !m_pCRS )
1249  {
1250  return( false );
1251  }
1252 
1253  m_pCRS->Set_Parameter("CRS_STRING", (*m_pParameters)["CRS_STRING"].asString());
1254 
1255  m_pParameters->Add_Parameters((*m_pParameters)("CRS_STRING")->Get_Parent(),
1256  "CRS_PICKER", _TL("Coordinate Reference System"), _TL("")
1257  )->asParameters()->Create(*m_pCRS->Get_Parameters());
1258 
1259  return( true );
1260 }
1261 
1262 //---------------------------------------------------------
1264 {
1265  if( m_pCRS )
1266  {
1267  m_pParameters->Del_Parameter("CRS_PICKER");
1268 
1270 
1271  m_pCRS = NULL;
1272 
1273  return( true );
1274  }
1275 
1276  return( false );
1277 }
1278 
1279 
1281 // //
1283 
1284 //---------------------------------------------------------
1286 {
1287  if( pParameter->Cmp_Identifier("CRS_PICKER") )
1288  {
1289  pParameters->Set_Parameter("CRS_STRING", (*pParameter->asParameters())("CRS_WKT")->asString());
1290  }
1291 
1292  return( true );
1293 }
1294 
1295 //---------------------------------------------------------
1297 {
1298  return( true );
1299 }
1300 
1301 
1303 // //
1305 
1306 //---------------------------------------------------------
1307 bool CSG_Parameters_CRSPicker::Get_CRS(CSG_Projection &Projection, bool bMessage) const
1308 {
1309  if( Projection.Create((*m_pParameters)["CRS_STRING"].asString()) )
1310  {
1311  if( bMessage )
1312  {
1313  SG_UI_Msg_Add_Execution(CSG_String::Format("\n%s: %s\n", _TL("CRS"), Projection.Get_PROJ().c_str()), false);
1314  }
1315 
1316  return( true );
1317  }
1318 
1319  if( bMessage )
1320  {
1321  SG_UI_Msg_Add_Execution(CSG_String::Format("\n%s: %s\n", _TL("Warning"), _TL("undefined coordinate reference system")), false);
1322  }
1323 
1324  return( false );
1325 }
1326 
1327 
1329 // //
1330 // Grid Target Selector //
1331 // //
1333 
1334 //---------------------------------------------------------
1336 {
1337  m_pParameters = NULL;
1338 }
1339 
1340 //---------------------------------------------------------
1341 bool CSG_Parameters_Grid_Target::Create(CSG_Parameters *pParameters, bool bAddDefaultGrid, CSG_Parameter *pParent, const CSG_String &Prefix)
1342 {
1343  return( Create(pParameters, bAddDefaultGrid, pParent ? pParent->Get_Identifier() : SG_T(""), Prefix) );
1344 }
1345 
1346 bool CSG_Parameters_Grid_Target::Create(CSG_Parameters *pParameters, bool bAddDefaultGrid, const CSG_String &ParentID, const CSG_String &Prefix)
1347 {
1348  if( pParameters == NULL )
1349  {
1350  return( false );
1351  }
1352 
1353  m_pParameters = pParameters;
1354  m_Prefix = Prefix;
1355 
1356  //-----------------------------------------------------
1357  CSG_String TargetID(m_Prefix + "DEFINITION");
1358 
1359  m_pParameters->Add_Choice(
1360  ParentID, TargetID, _TL("Target Grid System"),
1361  _TL(""),
1362  CSG_String::Format("%s|%s",
1363  _TL("user defined"),
1364  _TL("grid or grid system")
1365  ), 0
1366  );
1367 
1368  //-----------------------------------------------------
1369  m_pParameters->Add_Double(TargetID, m_Prefix + "USER_SIZE", _TL("Cellsize"), _TL(""), 1., 0., true);
1370  m_pParameters->Add_Double(TargetID, m_Prefix + "USER_XMIN", _TL("West" ), _TL(""), 0.);
1371  m_pParameters->Add_Double(TargetID, m_Prefix + "USER_XMAX", _TL("East" ), _TL(""), 100.);
1372  m_pParameters->Add_Double(TargetID, m_Prefix + "USER_YMIN", _TL("South" ), _TL(""), 0.);
1373  m_pParameters->Add_Double(TargetID, m_Prefix + "USER_YMAX", _TL("North" ), _TL(""), 100.);
1374  m_pParameters->Add_Int (TargetID, m_Prefix + "USER_COLS", _TL("Columns" ), _TL("Number of cells in East-West direction." ), 101, 1, true);
1375  m_pParameters->Add_Int (TargetID, m_Prefix + "USER_ROWS", _TL("Rows" ), _TL("Number of cells in North-South direction."), 101, 1, true);
1376  m_pParameters->Add_Choice(TargetID, m_Prefix + "USER_FITS", _TL("Fit" ), _TL(""),
1377  CSG_String::Format("%s|%s",
1378  _TL("nodes"),
1379  _TL("cells")
1380  ), 0
1381  );
1382 
1383  //-----------------------------------------------------
1384  m_pParameters->Add_Grid_System(TargetID, m_Prefix + "SYSTEM", _TL("Grid System"), _TL(""));
1385 
1386  m_pParameters->Add_Grid(m_Prefix + "SYSTEM", m_Prefix + "TEMPLATE", _TL("Target System"),
1387  _TL("use this grid's system for output grids"), PARAMETER_INPUT_OPTIONAL, false
1388  )->Set_UseInGUI(false);
1389 
1390  //-----------------------------------------------------
1391  if( bAddDefaultGrid )
1392  {
1393  Add_Grid(m_Prefix + "OUT_GRID", _TL("Target Grid"), false);
1394  }
1395 
1396  return( true );
1397 }
1398 
1399 
1401 // //
1403 
1404 //---------------------------------------------------------
1406 {
1407  return( pParameter && pParameters && m_pParameters && m_pParameters->Cmp_Identifier(pParameters->Get_Identifier())
1408  && On_Parameter_Changed(pParameters, pParameter, m_Prefix)
1409  );
1410 }
1411 
1412 //---------------------------------------------------------
1414 {
1415  if( !pParameters || !pParameter )
1416  {
1417  return( false );
1418  }
1419 
1420  if( !pParameter->Cmp_Identifier(Prefix + "USER_SIZE")
1421  && !pParameter->Cmp_Identifier(Prefix + "USER_XMIN")
1422  && !pParameter->Cmp_Identifier(Prefix + "USER_XMAX")
1423  && !pParameter->Cmp_Identifier(Prefix + "USER_YMIN")
1424  && !pParameter->Cmp_Identifier(Prefix + "USER_YMAX")
1425  && !pParameter->Cmp_Identifier(Prefix + "USER_ROWS")
1426  && !pParameter->Cmp_Identifier(Prefix + "USER_COLS")
1427  && !pParameter->Cmp_Identifier(Prefix + "USER_FITS") )
1428  {
1429  return( true );
1430  }
1431 
1432  CSG_Parameter *pSize = (*pParameters)(Prefix + "USER_SIZE");
1433  CSG_Parameter *pXMin = (*pParameters)(Prefix + "USER_XMIN");
1434  CSG_Parameter *pXMax = (*pParameters)(Prefix + "USER_XMAX");
1435  CSG_Parameter *pYMin = (*pParameters)(Prefix + "USER_YMIN");
1436  CSG_Parameter *pYMax = (*pParameters)(Prefix + "USER_YMAX");
1437  CSG_Parameter *pRows = (*pParameters)(Prefix + "USER_ROWS");
1438  CSG_Parameter *pCols = (*pParameters)(Prefix + "USER_COLS");
1439  CSG_Parameter *pFits = (*pParameters)(Prefix + "USER_FITS");
1440 
1441  double Size = pSize->asDouble();
1442 
1443  double xMin = pXMin->asDouble(), xMax = pXMax->asDouble();
1444  double yMin = pYMin->asDouble(), yMax = pYMax->asDouble();
1445 
1446  //-----------------------------------------------------
1447  bool bChanged = true;
1448 
1449  if( pParameter->Cmp_Identifier(pFits->Get_Identifier()) )
1450  {
1451  if( pFits->asInt() == 0 ) // fit cells >> fit nodes
1452  {
1453  xMin += 0.5 * Size; xMax -= 0.5 * Size;
1454  yMin += 0.5 * Size; yMax -= 0.5 * Size;
1455  }
1456  }
1457  else
1458  {
1459  if( pFits->asInt() == 1 ) // fit cells >> fit nodes
1460  {
1461  xMin += 0.5 * Size; xMax -= 0.5 * Size;
1462  yMin += 0.5 * Size; yMax -= 0.5 * Size;
1463  }
1464 
1465  if( pParameter->Cmp_Identifier(pSize->Get_Identifier()) && Size > 0. )
1466  {
1467  xMax = xMin + Size * (int)(0.5 + (xMax - xMin) / Size);
1468  yMax = yMin + Size * (int)(0.5 + (yMax - yMin) / Size);
1469  }
1470  else if( pParameter->Cmp_Identifier(pCols->Get_Identifier()) && pCols->asInt() > 0 )
1471  {
1472  xMax = xMin + Size * (pCols->asInt() - 1);
1473  }
1474  else if( pParameter->Cmp_Identifier(pXMin->Get_Identifier()) )
1475  {
1476  xMax = xMin + Size * (xMin > xMax ? (pCols->asInt() - 1) : (int)(0.5 + (xMax - xMin) / Size));
1477  }
1478  else if( pParameter->Cmp_Identifier(pXMax->Get_Identifier()) )
1479  {
1480  xMin = xMax - Size * (xMin > xMax ? (pCols->asInt() - 1) : (int)(0.5 + (xMax - xMin) / Size));
1481  }
1482  else if( pParameter->Cmp_Identifier(pRows->Get_Identifier()) && pRows->asInt() > 0 )
1483  {
1484  yMax = yMin + Size * (pRows->asInt() - 1);
1485  }
1486  else if( pParameter->Cmp_Identifier(pYMin->Get_Identifier()) )
1487  {
1488  yMax = yMin + Size * (yMin > yMax ? (pRows->asInt() - 1) : (int)(0.5 + (yMax - yMin) / Size));
1489  }
1490  else if( pParameter->Cmp_Identifier(pYMax->Get_Identifier()) )
1491  {
1492  yMin = yMax - Size * (yMin > yMax ? (pRows->asInt() - 1) : (int)(0.5 + (yMax - yMin) / Size));
1493  }
1494  else
1495  {
1496  bChanged = false; // none of the relevant parameters did change so far
1497  }
1498  }
1499 
1500  //-----------------------------------------------------
1501  if( bChanged )
1502  {
1503  pCols->Set_Value(1 + (int)((xMax - xMin) / Size));
1504  pRows->Set_Value(1 + (int)((yMax - yMin) / Size));
1505 
1506  if( pFits->asInt() == 1 )
1507  {
1508  xMin -= 0.5 * Size; xMax += 0.5 * Size;
1509  yMin -= 0.5 * Size; yMax += 0.5 * Size;
1510  }
1511 
1512  pXMin->Set_Value(xMin);
1513  pXMax->Set_Value(xMax);
1514  pYMin->Set_Value(yMin);
1515  pYMax->Set_Value(yMax);
1516 
1517  return( true );
1518  }
1519 
1520  //-----------------------------------------------------
1521  CSG_Parameter *pZSize = (*pParameters)(Prefix + "USER_ZSIZE");
1522  CSG_Parameter *pZMin = (*pParameters)(Prefix + "USER_ZMIN" );
1523  CSG_Parameter *pZMax = (*pParameters)(Prefix + "USER_ZMAX" );
1524  CSG_Parameter *pZNum = (*pParameters)(Prefix + "USER_ZNUM" );
1525 
1526  if( pZSize && pZMin && pZMax && pZNum )
1527  {
1528  double zSize = pZSize->asDouble(), zMin = pZMin ->asDouble(), zMax = pZMax ->asDouble();
1529 
1530  bChanged = true;
1531 
1532  if ( pParameter->Cmp_Identifier(pZSize->Get_Identifier()) && zSize > 0. )
1533  {
1534  zMax = zMin + zSize * (int)(0.5 + (zMax - zMin) / zSize);
1535  }
1536  else if( pParameter->Cmp_Identifier(pZNum->Get_Identifier()) && pZNum->asInt() > 0 )
1537  {
1538  zMax = zMin + zSize * pZNum->asInt();
1539  }
1540  else if( pParameter->Cmp_Identifier(pZMin->Get_Identifier()) )
1541  {
1542  zMax = zMin + zSize * (zMin > zMax ? pZNum->asInt() : (int)(0.5 + (zMax - zMin) / zSize));
1543  }
1544  else if( pParameter->Cmp_Identifier(pZMax->Get_Identifier()) )
1545  {
1546  zMin = zMax - zSize * (zMin > zMax ? pZNum->asInt() : (int)(0.5 + (zMax - zMin) / zSize));
1547  }
1548  else
1549  {
1550  bChanged = false;
1551  }
1552 
1553  if( bChanged )
1554  {
1555  pZNum->Set_Value(1 + (int)((zMax - zMin) / zSize));
1556 
1557  pZMin->Set_Value(zMin);
1558  pZMax->Set_Value(zMax);
1559  }
1560  }
1561 
1562  return( true );
1563 }
1564 
1565 //---------------------------------------------------------
1567 {
1568  return( pParameter && pParameters && m_pParameters && m_pParameters->Get_Identifier().Cmp(pParameters->Get_Identifier()) == 0
1569  && On_Parameters_Enable(pParameters, pParameter, m_Prefix)
1570  );
1571 }
1572 
1573 //---------------------------------------------------------
1575 {
1576  if( !pParameter || !pParameters || !(pParameter = (*pParameters)(Prefix + "DEFINITION")) )
1577  {
1578  return( false );
1579  }
1580 
1581  pParameters->Set_Enabled(Prefix + "SYSTEM" , pParameter->asInt() == 1);
1582  pParameters->Set_Enabled(Prefix + "TEMPLATE" , pParameter->asInt() == 1);
1583 
1584  pParameters->Set_Enabled(Prefix + "USER_SIZE", pParameter->asInt() == 0);
1585  pParameters->Set_Enabled(Prefix + "USER_XMIN", pParameter->asInt() == 0);
1586  pParameters->Set_Enabled(Prefix + "USER_XMAX", pParameter->asInt() == 0);
1587  pParameters->Set_Enabled(Prefix + "USER_YMIN", pParameter->asInt() == 0);
1588  pParameters->Set_Enabled(Prefix + "USER_YMAX", pParameter->asInt() == 0);
1589  pParameters->Set_Enabled(Prefix + "USER_ROWS", pParameter->asInt() == 0);
1590  pParameters->Set_Enabled(Prefix + "USER_COLS", pParameter->asInt() == 0);
1591  pParameters->Set_Enabled(Prefix + "USER_FITS", pParameter->asInt() == 0);
1592  pParameters->Set_Enabled(Prefix + "USER_OPTS", pParameter->asInt() == 0);
1593  pParameters->Set_Enabled(Prefix + "USER_Z" , pParameter->asInt() == 0);
1594 
1595  return( true );
1596 }
1597 
1598 
1600 // //
1602 
1603 //---------------------------------------------------------
1612 bool CSG_Parameters_Grid_Target::Set_User_Defined(CSG_Parameters *pParameters, const TSG_Rect &Extent, int Rows, int Rounding)
1613 {
1614  if( !m_pParameters->Get_Tool() || !m_pParameters->Get_Tool()->has_GUI() ) // no cancel button, so set parameters directly
1615  {
1616  pParameters = m_pParameters;
1617  }
1618 
1619  if( !m_pParameters || !pParameters || m_pParameters->Get_Identifier().Cmp(pParameters->Get_Identifier()) )
1620  {
1621  return( false );
1622  }
1623 
1624  if( Rows < 1 && (Rows = (*m_pParameters)(m_Prefix + "USER_ROWS")->asInt()) < 1 )
1625  {
1626  Rows = 100;
1627  }
1628 
1629  //-----------------------------------------------------
1630  CSG_Rect r(Extent);
1631 
1632  if( r.Get_XRange() == 0. && r.Get_YRange() == 0. )
1633  {
1634  r.Inflate(0.5 * Rows, false); // assume cellsize = 1.
1635  }
1636  else if( r.Get_XRange() == 0. )
1637  {
1638  double d = 0.5 * r.Get_YRange() / Rows; r.xMin -= d; r.xMax += d; // inflate by half cellsize
1639  }
1640  else if( r.Get_YRange() == 0. )
1641  {
1642  double d = 0.5 * r.Get_XRange() / Rows; r.yMin -= d; r.yMax += d; // inflate by half cellsize
1643  }
1644 
1645  //-----------------------------------------------------
1646  double Size = r.Get_YRange() / (Rows - 1);
1647 
1648  int Cols = 1 + (int)(0.5 + r.Get_XRange() / Size);
1649 
1650  if( Rounding > 0 )
1651  {
1652  Size = SG_Get_Rounded_To_SignificantFigures(Size, Rounding);
1653 
1654  r.xMin = r.Get_XCenter() - Size * Cols / 2.;
1655  r.yMin = r.Get_YCenter() - Size * Rows / 2.;
1656  r.yMax = r.Get_YMin () + Size * (Rows - 1);
1657  }
1658 
1659  r.xMax = r.Get_XMin() + Size * (Cols - 1);
1660 
1661  //-----------------------------------------------------
1662  if( (*pParameters)(m_Prefix + "USER_FITS")->asInt() == 1 ) // fit to cells
1663  {
1664  r.Inflate(0.5 * Size, false);
1665  }
1666 
1667  bool bCallback = pParameters->Set_Callback(false);
1668 
1669  pParameters->Set_Parameter(m_Prefix + "USER_SIZE", Size );
1670  pParameters->Set_Parameter(m_Prefix + "USER_XMIN", r.Get_XMin());
1671  pParameters->Set_Parameter(m_Prefix + "USER_XMAX", r.Get_XMax());
1672  pParameters->Set_Parameter(m_Prefix + "USER_YMIN", r.Get_YMin());
1673  pParameters->Set_Parameter(m_Prefix + "USER_YMAX", r.Get_YMax());
1674  pParameters->Set_Parameter(m_Prefix + "USER_COLS", Cols );
1675  pParameters->Set_Parameter(m_Prefix + "USER_ROWS", Rows );
1676 
1677  pParameters->Set_Callback(bCallback);
1678 
1679  return( true );
1680 }
1681 
1682 //---------------------------------------------------------
1687 bool CSG_Parameters_Grid_Target::Set_User_Defined(CSG_Parameters *pParameters, CSG_Shapes *pPoints, int Scale, int Rounding)
1688 {
1689  if( !pPoints || pPoints->Get_Count() <= 0 || pPoints->Get_Extent().Get_Area() <= 0. )
1690  {
1691  return( false );
1692  }
1693 
1694  CSG_Rect r(pPoints->Get_Extent());
1695 
1696  double Size = sqrt(r.Get_Area() / pPoints->Get_Count()) / (Scale > 1 ? Scale : 1); // edge length of a square given as average area per point (cell size)
1697 
1698  if( Rounding > 0 )
1699  {
1700  Size = SG_Get_Rounded_To_SignificantFigures(Size, Rounding);
1701 
1702  r.xMin = Size * floor(r.xMin / Size);
1703  r.xMax = Size * ceil (r.xMax / Size);
1704  r.yMin = Size * floor(r.yMin / Size);
1705  r.yMax = Size * ceil (r.yMax / Size);
1706  }
1707 
1708  int Rows = 1 + (int)(0.5 + r.Get_YRange() / Size);
1709 
1710  return( Set_User_Defined(pParameters, r, Rows, 0) );
1711 }
1712 
1713 //---------------------------------------------------------
1718 {
1719  return( System.is_Valid() && Set_User_Defined(pParameters, System.Get_Extent(), System.Get_NY(), 0) );
1720 }
1721 
1722 //---------------------------------------------------------
1726 bool CSG_Parameters_Grid_Target::Set_User_Defined(CSG_Parameters *pParameters, double xMin, double yMin, double Cellsize, int nx, int ny)
1727 {
1728  return( Set_User_Defined(pParameters, CSG_Grid_System(Cellsize, xMin, yMin, nx, ny)) );
1729 }
1730 
1731 //---------------------------------------------------------
1735 bool CSG_Parameters_Grid_Target::Set_User_Defined_ZLevels(CSG_Parameters *pParameters, double zMin, double zMax, int nLevels, int Rounding)
1736 {
1737  if( !m_pParameters->Get_Tool()->has_GUI() ) // no cancel button, so set parameters directly
1738  {
1739  pParameters = m_pParameters;
1740  }
1741 
1742  if( !m_pParameters || !pParameters || m_pParameters->Get_Identifier().Cmp(pParameters->Get_Identifier()) )
1743  {
1744  return( false );
1745  }
1746 
1747  if( nLevels < 1 )
1748  {
1749  nLevels = 100;
1750  }
1751 
1752  //-----------------------------------------------------
1753  if( zMin > zMax )
1754  {
1755  double z = zMin; zMin = zMax; zMax = z;
1756  }
1757 
1758  if( zMax - zMin <= 0. )
1759  {
1760  zMin -= 0.5 * nLevels;
1761  zMax += 0.5 * nLevels; // assume cellsize = 1.
1762  }
1763 
1764  //-----------------------------------------------------
1765  double Size = (zMax - zMin) / (nLevels - 1.);
1766 
1767  if( Rounding > 0 )
1768  {
1769  Size = SG_Get_Rounded_To_SignificantFigures(Size, Rounding);
1770 
1771  zMin = Size * floor(zMin / Size);
1772  zMax = Size * ceil (zMax / Size);
1773  }
1774 
1775  //-----------------------------------------------------
1776  if( (*pParameters)(m_Prefix + "USER_FITS")->asInt() == 1 )
1777  {
1778  zMin -= 0.5 * Size;
1779  zMax += 0.5 * Size;
1780  }
1781 
1782  bool bCallback = pParameters->Set_Callback(false);
1783 
1784  pParameters->Set_Parameter(m_Prefix + "USER_ZSIZE", Size );
1785  pParameters->Set_Parameter(m_Prefix + "USER_ZMIN" , zMin );
1786  pParameters->Set_Parameter(m_Prefix + "USER_ZMAX" , zMax );
1787  pParameters->Set_Parameter(m_Prefix + "USER_ZNUM" , nLevels);
1788 
1789  pParameters->Set_Callback(bCallback);
1790 
1791  return( true );
1792 }
1793 
1794 
1796 // //
1798 
1799 //---------------------------------------------------------
1800 bool CSG_Parameters_Grid_Target::Add_Grid(const CSG_String &Identifier, const CSG_String &Name, bool bOptional)
1801 {
1802  if( !m_pParameters || Identifier.Length() == 0 || (*m_pParameters)(Identifier) != NULL )
1803  {
1804  return( false );
1805  }
1806 
1807  CSG_Parameter *pTarget = (*m_pParameters)(m_Prefix + "DEFINITION");
1808  CSG_Parameter *pSystem = NULL;
1809 
1810  for(int i=0; i<pTarget->Get_Children_Count() && !pSystem; i++)
1811  {
1812  if( pTarget->Get_Child(i)->Get_Type() == PARAMETER_TYPE_Grid_System )
1813  {
1814  pSystem = pTarget->Get_Child(i);
1815  }
1816  }
1817 
1818  m_pParameters->Add_Grid(pSystem ? pSystem->Get_Identifier() : SG_T(""), Identifier, Name, _TL(""), bOptional ? PARAMETER_OUTPUT_OPTIONAL : PARAMETER_OUTPUT, false);
1819 
1820  if( bOptional && m_pParameters->Get_Tool()->has_GUI() )
1821  {
1822  CSG_Parameter *pNode = (*m_pParameters)(m_Prefix + "USER_OPTS");
1823 
1824  if( !pNode )
1825  {
1826  pNode = m_pParameters->Add_Node(pTarget->Get_Identifier(), m_Prefix + "USER_OPTS", _TL("Optional Target Grids"), _TL(""));
1827  }
1828 
1829  m_pParameters->Add_Bool(pNode->Get_Identifier(), Identifier + "_CREATE", Name, _TL(""), false);
1830  }
1831 
1832  return( true );
1833 }
1834 
1835 //---------------------------------------------------------
1836 bool CSG_Parameters_Grid_Target::Add_Grids(const CSG_String &Identifier, const CSG_String &Name, bool bOptional, bool bZLevels)
1837 {
1838  if( !m_pParameters || Identifier.Length() == 0 || (*m_pParameters)(Identifier) != NULL )
1839  {
1840  return( false );
1841  }
1842 
1843  CSG_Parameter *pTarget = (*m_pParameters)(m_Prefix + "DEFINITION");
1844  CSG_Parameter *pSystem = NULL;
1845 
1846  for(int i=0; i<pTarget->Get_Children_Count() && !pSystem; i++)
1847  {
1848  if( pTarget->Get_Child(i)->Get_Type() == PARAMETER_TYPE_Grid_System )
1849  {
1850  pSystem = pTarget->Get_Child(i);
1851  }
1852  }
1853 
1854  m_pParameters->Add_Grids(pSystem ? pSystem->Get_Identifier() : SG_T(""), Identifier, Name, _TL(""), bOptional ? PARAMETER_OUTPUT_OPTIONAL : PARAMETER_OUTPUT, false);
1855 
1856  if( bOptional && m_pParameters->Get_Tool()->has_GUI() )
1857  {
1858  CSG_Parameter *pNode = (*m_pParameters)(m_Prefix + "USER_OPTS");
1859 
1860  if( !pNode )
1861  {
1862  pNode = m_pParameters->Add_Node(pTarget->Get_Identifier(), m_Prefix + "USER_OPTS", _TL("Optional Target Grids"), _TL(""));
1863  }
1864 
1865  m_pParameters->Add_Bool(pNode->Get_Identifier(), Identifier + "_CREATE", Name, _TL(""), false);
1866  }
1867 
1868  if( bZLevels )
1869  {
1870  pTarget = m_pParameters->Add_Node(pTarget, "USER_Z", _TL("Z Levels"), _TL(""));
1871 
1872  m_pParameters->Add_Double(pTarget, m_Prefix + "USER_ZSIZE", _TL("Cellsize"), _TL(""), 1., 0., true);
1873  m_pParameters->Add_Double(pTarget, m_Prefix + "USER_ZMIN" , _TL("Bottom" ), _TL(""), 0.);
1874  m_pParameters->Add_Double(pTarget, m_Prefix + "USER_ZMAX" , _TL("Top" ), _TL(""), 100.);
1875  m_pParameters->Add_Int (pTarget, m_Prefix + "USER_ZNUM" , _TL("Levels" ), _TL(""), 101, 1, true);
1876  }
1877 
1878  return( true );
1879 }
1880 
1881 
1883 // //
1885 
1886 //---------------------------------------------------------
1888 {
1889  return( Get_System(m_pParameters) );
1890 }
1891 
1892 //---------------------------------------------------------
1894 {
1895  CSG_Grid_System System;
1896 
1897  if( pParameters && (*pParameters)(m_Prefix + "DEFINITION") )
1898  {
1899  if( (*pParameters)(m_Prefix + "DEFINITION")->asInt() == 0 ) // user defined
1900  {
1901  if( (*pParameters)(m_Prefix + "USER_SIZE")
1902  && (*pParameters)(m_Prefix + "USER_XMIN")
1903  && (*pParameters)(m_Prefix + "USER_YMIN")
1904  && (*pParameters)(m_Prefix + "USER_XMAX")
1905  && (*pParameters)(m_Prefix + "USER_YMAX")
1906  && (*pParameters)(m_Prefix + "USER_FITS") )
1907  {
1908  double Size = (*pParameters)(m_Prefix + "USER_SIZE")->asDouble();
1909 
1910  CSG_Rect r(
1911  (*pParameters)(m_Prefix + "USER_XMIN")->asDouble(),
1912  (*pParameters)(m_Prefix + "USER_YMIN")->asDouble(),
1913  (*pParameters)(m_Prefix + "USER_XMAX")->asDouble(),
1914  (*pParameters)(m_Prefix + "USER_YMAX")->asDouble()
1915  );
1916 
1917  if( (*pParameters)(m_Prefix + "USER_FITS")->asInt() == 1 )
1918  {
1919  r.Deflate(0.5 * Size, false);
1920  }
1921 
1922  System.Assign(Size, r);
1923  }
1924  }
1925  else if( (*pParameters)(m_Prefix + "SYSTEM") )
1926  {
1927  CSG_Parameter *pParameter = (*pParameters)(m_Prefix + "SYSTEM");
1928 
1929  if( pParameter->asGrid_System() )
1930  {
1931  System.Assign(*pParameter->asGrid_System());
1932  }
1933  }
1934  }
1935 
1936  return( System );
1937 }
1938 
1939 //---------------------------------------------------------
1941 {
1942  if( !m_pParameters )
1943  {
1944  return( NULL );
1945  }
1946 
1947  CSG_Parameter *pParameter = (*m_pParameters)(Identifier);
1948 
1949  if( !pParameter || pParameter->Get_Type() != PARAMETER_TYPE_Grid )
1950  {
1951  return( NULL );
1952  }
1953 
1954  CSG_Grid_System System(Get_System());
1955 
1956  if( !System.is_Valid() )
1957  {
1958  return( NULL );
1959  }
1960 
1961 // CSG_Parameter *pSystem = (*m_pParameters)(m_Prefix + "SYSTEM");
1962 //
1963 // if( pSystem->asGrid_System() && !pSystem->asGrid_System()->is_Equal(System) )
1964 // {
1965 // pSystem->asGrid_System()->Assign(System);
1966 // }
1967 
1968  CSG_Grid *pGrid = NULL;
1969 
1970  if( (*m_pParameters)(m_Prefix + "DEFINITION")->asInt() == 0 && m_pParameters->Get_Tool()->has_GUI() )
1971  {
1972  if( (*m_pParameters)(Identifier + "_CREATE") == NULL
1973  || (*m_pParameters)(Identifier + "_CREATE")->asBool() )
1974  {
1975  pGrid = SG_Create_Grid(System, Type);
1976  }
1977  }
1978  else
1979  {
1980  pGrid = pParameter->asGrid();
1981 
1982  if( pParameter->asDataObject() == DATAOBJECT_CREATE || (!pGrid && !pParameter->is_Optional()) )
1983  {
1984  pGrid = SG_Create_Grid(System, Type);
1985  }
1986  else if( pGrid && (pGrid->Get_Type() != Type || !pGrid->Get_System().is_Equal(System)) )
1987  {
1988  pGrid->Create(System, Type);
1989  }
1990  }
1991 
1992  if( pGrid && pGrid != pParameter->asGrid() )
1993  {
1994  pParameter->Set_Value(pGrid);
1995  }
1996 
1997  return( pGrid );
1998 }
1999 
2000 
2002 // //
2004 
2005 //---------------------------------------------------------
2007 {
2008  return( Get_Grid(m_Prefix + "OUT_GRID", Type) );
2009 }
2010 
2011 //---------------------------------------------------------
2013 {
2014  if( !m_pParameters )
2015  {
2016  return( NULL );
2017  }
2018 
2019  CSG_Parameter *pParameter = (*m_pParameters)(Identifier);
2020 
2021  if( !pParameter || pParameter->Get_Type() != PARAMETER_TYPE_Grids )
2022  {
2023  return( NULL );
2024  }
2025 
2026  CSG_Grid_System System(Get_System());
2027 
2028  if( !System.is_Valid() )
2029  {
2030  return( NULL );
2031  }
2032 
2033  CSG_Grids *pGrids = NULL;
2034 
2035  if( (*m_pParameters)(m_Prefix + "DEFINITION")->asInt() == 0 && m_pParameters->Get_Tool()->has_GUI() )
2036  {
2037  if( (*m_pParameters)(Identifier + "_CREATE") == NULL
2038  || (*m_pParameters)(Identifier + "_CREATE")->asBool() )
2039  {
2040  pGrids = SG_Create_Grids(System, 0, 0., Type);
2041  }
2042  }
2043  else
2044  {
2045  pGrids = pParameter->asGrids();
2046 
2047  if( pParameter->asPointer() == DATAOBJECT_CREATE || (!pGrids && !pParameter->is_Optional()) )
2048  {
2049  pGrids = SG_Create_Grids(System, 0, 0., Type);
2050  }
2051  else if( pGrids && (pGrids->Get_Type() != Type || !pGrids->Get_System().is_Equal(System)) )
2052  {
2053  pGrids->Create(System, 0, 0., Type);
2054  }
2055  }
2056 
2057  if( pGrids && pGrids != pParameter->asGrids() )
2058  {
2059  pParameter->Set_Value(pGrids);
2060  }
2061 
2062  //-----------------------------------------------------
2063  if( pGrids
2064  && (*m_pParameters)(m_Prefix + "USER_ZSIZE")
2065  && (*m_pParameters)(m_Prefix + "USER_ZMIN" )
2066  && (*m_pParameters)(m_Prefix + "USER_ZNUM" ) )
2067  {
2068  int nz = (*m_pParameters)(m_Prefix + "USER_ZNUM" )->asInt ();
2069  double z = (*m_pParameters)(m_Prefix + "USER_ZMIN" )->asDouble();
2070  double dz = (*m_pParameters)(m_Prefix + "USER_ZSIZE")->asDouble();
2071 
2072  pGrids->Del_Grids();
2073 
2074  for(int iz=0; iz<nz; iz++, z+=dz)
2075  {
2076  pGrids->Add_Grid(z);
2077  }
2078  }
2079 
2080  return( pGrids );
2081 }
2082 
2083 //---------------------------------------------------------
2085 {
2086  return( Get_Grids(m_Prefix + "OUT_GRIDS", Type) );
2087 }
2088 
2089 
2091 // //
2092 // //
2093 // //
2095 
2096 //---------------------------------------------------------
CSG_Parameter::asColors
CSG_Colors * asColors(void) const
Definition: parameter.cpp:1035
CSG_Grid::Get_Type
TSG_Data_Type Get_Type(void) const
Definition: grid.h:519
CSG_Parameter::asGridsList
class CSG_Parameter_Grids_List * asGridsList(void) const
Definition: parameter.cpp:1117
CSG_Rect
Definition: geo_tools.h:471
CSG_Parameter_Date
Definition: parameters.h:572
CSG_Parameter::Set_Value
virtual bool Set_Value(int Value)
Definition: parameter.cpp:799
CSG_Parameter::asPointer
void * asPointer(void) const
Definition: parameters.h:286
PARAMETER_TYPE_Double
@ PARAMETER_TYPE_Double
Definition: parameters.h:127
CSG_Parameter_Choices::Get_Selection_Count
int Get_Selection_Count(void) const
Definition: parameters.h:763
CSG_Parameters::Get_Parameter
CSG_Parameter * Get_Parameter(int i) const
Definition: parameters.h:1752
PARAMETER_TYPE_FilePath
@ PARAMETER_TYPE_FilePath
Definition: parameters.h:136
CSG_Parameters_Grid_Target::Add_Grid
bool Add_Grid(const CSG_String &ID, const CSG_String &Name, bool bOptional)
Definition: parameter.cpp:1800
PARAMETER_TYPE_Degree
@ PARAMETER_TYPE_Degree
Definition: parameters.h:128
CSG_Rect::Deflate
CSG_Rect & Deflate(double d, bool bPercent=true)
Definition: geo_classes.cpp:818
SG_T
#define SG_T(s)
Definition: api_core.h:537
CSG_Parameters_CRSPicker::On_Parameters_Enable
static bool On_Parameters_Enable(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
Definition: parameter.cpp:1296
CSG_String::Printf
int Printf(const char *Format,...)
Definition: api_string.cpp:308
CSG_Parameters::Add_Grid_System
CSG_Parameter * Add_Grid_System(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, CSG_Grid_System *pInit=NULL)
Definition: parameters.cpp:642
_TL
#define _TL(s)
Definition: api_core.h:1489
CSG_Parameter::asShapesList
class CSG_Parameter_Shapes_List * asShapesList(void) const
Definition: parameter.cpp:1119
PARAMETER_TYPE_Table_Fields
@ PARAMETER_TYPE_Table_Fields
Definition: parameters.h:145
CSG_String::Length
size_t Length(void) const
Definition: api_string.cpp:172
CSG_Parameter::m_String
CSG_String m_String
Definition: parameters.h:331
CSG_Parameter_Range::Get_Max
double Get_Max(void) const
Definition: parameter_data.cpp:832
CSG_Parameter::Get_Identifier
const SG_Char * Get_Identifier(void) const
Definition: parameter.cpp:547
CSG_Parameter::asInt
int asInt(void) const
Definition: parameters.h:282
CSG_Parameters::Get_Manager
class CSG_Data_Manager * Get_Manager(void) const
Definition: parameters.h:1715
PARAMETER_TYPE_Node
@ PARAMETER_TYPE_Node
Definition: parameters.h:123
CSG_Parameter::asString
const SG_Char * asString(void) const
Definition: parameters.h:285
CSG_Parameter::Get_Type_Name
CSG_String Get_Type_Name(void) const
Definition: parameter.cpp:129
CSG_Parameter::asTable
CSG_Table * asTable(void) const
Definition: parameter.cpp:1063
CSG_Table_Record
Definition: table.h:130
CSG_MetaData::Set_Content
void Set_Content(const CSG_String &Content)
Definition: metadata.h:139
data_manager.h
CSG_Parameter_Table_List
Definition: parameters.h:1470
CSG_Rect::Get_XMax
double Get_XMax(void) const
Definition: geo_tools.h:503
PARAMETER_TYPE_Grids_List
@ PARAMETER_TYPE_Grids_List
Definition: parameters.h:155
CSG_Parameter::asTINList
class CSG_Parameter_TIN_List * asTINList(void) const
Definition: parameter.cpp:1120
PARAMETER_TYPE_String
@ PARAMETER_TYPE_String
Definition: parameters.h:134
CSG_Parameter::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter.cpp:1159
CSG_Grid_System
Definition: grid.h:200
CSG_Parameter::asDate
class CSG_Parameter_Date * asDate(void) const
Definition: parameter.cpp:1105
SG_Get_DataObject_Name
CSG_String SG_Get_DataObject_Name(TSG_Data_Object_Type Type)
Definition: dataobject.cpp:86
CSG_Table::Get_Record
virtual CSG_Table_Record * Get_Record(sLong Index) const
Definition: table.h:394
PARAMETER_TYPE_Int
@ PARAMETER_TYPE_Int
Definition: parameters.h:126
CSG_Grid::Create
bool Create(const CSG_Grid &Grid)
Definition: grid.cpp:230
CSG_Parameter_List::Get_Item
CSG_Data_Object * Get_Item(int Index) const
Definition: parameters.h:1373
SG_Get_Rounded_To_SignificantFigures
double SG_Get_Rounded_To_SignificantFigures(double Value, int Decimals)
Definition: mat_tools.cpp:107
SG_UI_Msg_Add_Execution
void SG_UI_Msg_Add_Execution(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
Definition: api_callback.cpp:530
CSG_Parameters::Add_Node
CSG_Parameter * Add_Node(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:440
CSG_Parameter::is_Input
bool is_Input(void) const
Definition: parameters.h:232
CSG_Parameter_Choices
Definition: parameters.h:748
CSG_Parameter::is_Compatible
bool is_Compatible(CSG_Parameter *pParameter) const
Definition: parameter.cpp:337
PARAMETER_TYPE_TIN
@ PARAMETER_TYPE_TIN
Definition: parameters.h:152
CSG_Parameter_Data_Object_Output
Definition: parameters.h:1170
CSG_Parameters::Add_String
CSG_Parameter * Add_String(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &String, bool bLongText=false, bool bPassword=false)
Definition: parameters.cpp:558
CSG_Parameter::Get_Description
const SG_Char * Get_Description(void) const
Definition: parameter.cpp:602
CSG_Parameters::Add_Double
CSG_Parameter * Add_Double(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
Definition: parameters.cpp:475
CSG_Parameters_Grid_Target::Set_User_Defined
bool Set_User_Defined(CSG_Parameters *pParameters, const TSG_Rect &Extent, int Rows=0, int Rounding=2)
Definition: parameter.cpp:1612
CSG_Parameters::Cmp_Identifier
bool Cmp_Identifier(const CSG_String &Identifier) const
Definition: parameters.cpp:331
CSG_Parameter::asTIN
CSG_TIN * asTIN(void) const
Definition: parameter.cpp:1044
CSG_Parameter_Choices::Get_Item_Count
int Get_Item_Count(void) const
Definition: parameters.h:759
SSG_Rect::xMax
double xMax
Definition: geo_tools.h:465
SG_DATAOBJECT_TYPE_Grids
@ SG_DATAOBJECT_TYPE_Grids
Definition: dataobject.h:119
CSG_Grids::Get_Type
TSG_Data_Type Get_Type(void) const
Definition: grids.h:169
CSG_Parameter::do_UseInCMD
bool do_UseInCMD(void) const
Definition: parameter.cpp:172
PARAMETER_TYPE_FixedTable
@ PARAMETER_TYPE_FixedTable
Definition: parameters.h:141
CSG_Parameters_Grid_Target::Create
bool Create(CSG_Parameters *pParameters, bool bAddDefaultGrid, CSG_Parameter *pParent, const CSG_String &Prefix="")
Definition: parameter.cpp:1341
CSG_Table::Get_Field_Count
int Get_Field_Count(void) const
Definition: table.h:356
CSG_Data_Manager::Exists
bool Exists(CSG_Data_Object *pObject) const
Definition: data_manager.cpp:278
CSG_Parameter::_asString
virtual const SG_Char * _asString(void) const
Definition: parameter.cpp:1032
CSG_Parameter::_asDouble
virtual double _asDouble(void) const
Definition: parameter.cpp:1030
SG_Free
SAGA_API_DLL_EXPORT void SG_Free(void *memblock)
Definition: api_memory.cpp:83
CSG_Data_Object::Get_ObjectType
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.
CSG_Parameter::asDataObject
CSG_Data_Object * asDataObject(void) const
Definition: parameter.cpp:1041
CSG_Parameter::Assign
bool Assign(CSG_Parameter *pSource)
Definition: parameter.cpp:1141
CSG_Parameter_Value
Definition: parameters.h:435
SG_STR_CMP
#define SG_STR_CMP(s1, s2)
Definition: api_core.h:544
CSG_Rect::Get_Area
double Get_Area(void) const
Definition: geo_tools.h:510
PARAMETER_TYPE_PointCloud
@ PARAMETER_TYPE_PointCloud
Definition: parameters.h:147
CSG_Parameter::CSG_Parameter
CSG_Parameter(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter.cpp:64
CSG_Parameter::asValue
class CSG_Parameter_Value * asValue(void) const
Definition: parameter.cpp:1091
CSG_Parameter::Set_Description
bool Set_Description(const CSG_String &Description)
Definition: parameter.cpp:595
CSG_String::Replace
size_t Replace(const CSG_String &sOld, const CSG_String &sNew, bool bReplaceAll=true)
Definition: api_string.cpp:563
CSG_Parameter::Get_Parameters
CSG_Parameters * Get_Parameters(void) const
Definition: parameter.cpp:100
CSG_Tool_Library_Manager::Delete_Tool
bool Delete_Tool(CSG_Tool *pTool) const
Definition: tool_library.cpp:725
CSG_Parameters_CRSPicker::Get_CRS
bool Get_CRS(CSG_Projection &Projection, bool bMessage=false) const
Definition: parameter.cpp:1307
CSG_Parameter::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter.cpp:793
CSG_Grid::Get_System
const CSG_Grid_System & Get_System(void) const
Definition: grid.h:531
CSG_String::Cmp
int Cmp(const CSG_String &String) const
Definition: api_string.cpp:515
tool.h
PARAMETER_INPUT_OPTIONAL
#define PARAMETER_INPUT_OPTIONAL
Definition: parameters.h:102
SSG_Rect::xMin
double xMin
Definition: geo_tools.h:465
SG_Parameter_Type_Get_Name
CSG_String SG_Parameter_Type_Get_Name(TSG_Parameter_Type Type)
Definition: parameter_data.cpp:64
PARAMETER_TYPE_Shapes_List
@ PARAMETER_TYPE_Shapes_List
Definition: parameters.h:157
SSG_Rect
Definition: geo_tools.h:464
CSG_Parameter::asGridList
class CSG_Parameter_Grid_List * asGridList(void) const
Definition: parameter.cpp:1116
PARAMETER_TYPE_Grids
@ PARAMETER_TYPE_Grids
Definition: parameters.h:149
CSG_Parameters::has_GUI
bool has_GUI(void) const
Definition: parameters.cpp:311
CSG_Parameter::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const =0
CSG_Parameter::Serialize
bool Serialize(CSG_MetaData &MetaData, bool bSave)
Definition: parameter.cpp:1165
CSG_Tool::Set_Parameter
bool Set_Parameter(const CSG_String &ID, CSG_Parameter *pValue)
Definition: tool.cpp:1140
CSG_Table::is_Compatible
bool is_Compatible(const CSG_Table &Table, bool bExactMatch=false) const
Definition: table.cpp:430
CSG_Parameter::asGrid
CSG_Grid * asGrid(void) const
Definition: parameter.cpp:1042
CSG_Parameter::is_DataObject_List
bool is_DataObject_List(void) const
Definition: parameter.cpp:295
CSG_Parameter::Set_UseInCMD
void Set_UseInCMD(bool bDoUse=false)
Definition: parameter.cpp:153
PARAMETER_TYPE_Choices
@ PARAMETER_TYPE_Choices
Definition: parameters.h:133
CSG_Parameter::ignore_Projection
bool ignore_Projection(void) const
Definition: parameters.h:251
PARAMETER_TYPE_Data_Type
@ PARAMETER_TYPE_Data_Type
Definition: parameters.h:131
CSG_TIN
Definition: tin.h:222
CSG_Grids::Create
virtual bool Create(const CSG_Grids &Grids)
Definition: grids.cpp:271
PARAMETER_TYPE_Colors
@ PARAMETER_TYPE_Colors
Definition: parameters.h:140
CSG_Parameters_Grid_Target::On_Parameter_Changed
bool On_Parameter_Changed(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
Definition: parameter.cpp:1405
CSG_Rect::Get_XRange
double Get_XRange(void) const
Definition: geo_tools.h:507
CSG_Colors::Get_Count
int Get_Count(void) const
Definition: api_core.h:1354
CSG_Table_Record::asString
const SG_Char * asString(int Field, int Decimals=-99) const
Definition: table_record.cpp:461
CSG_Data_Object
Definition: dataobject.h:180
CSG_Parameter
Definition: parameters.h:207
CSG_Rect::Get_YMin
double Get_YMin(void) const
Definition: geo_tools.h:504
PARAMETER_TYPE_Undefined
@ PARAMETER_TYPE_Undefined
Definition: parameters.h:165
CSG_Grids::Get_System
const CSG_Grid_System & Get_System(void) const
Definition: grids.h:181
CSG_Parameter::_asInt
virtual int _asInt(void) const
Definition: parameter.cpp:1029
PARAMETER_TYPE_Table
@ PARAMETER_TYPE_Table
Definition: parameters.h:150
PARAMETER_TYPE_Bool
@ PARAMETER_TYPE_Bool
Definition: parameters.h:125
CSG_Colors::Get_Color
long Get_Color(int Index) const
Definition: api_core.h:1366
CSG_Parameter_List::Update_Data
virtual bool Update_Data(void)
Definition: parameters.h:1375
CSG_Parameters::Get_Count
int Get_Count(void) const
Definition: parameters.h:1725
SG_PARAMETER_DATA_SET_CHANGED
#define SG_PARAMETER_DATA_SET_CHANGED
Definition: parameters.h:196
DATAOBJECT_CREATE
#define DATAOBJECT_CREATE
Definition: dataobject.h:130
CSG_Parameter::asPointCloud
CSG_PointCloud * asPointCloud(void) const
Definition: parameter.cpp:1045
CSG_Tool::Get_Parameters
CSG_Parameters * Get_Parameters(void)
Definition: tool.h:180
CSG_Grid_System::is_Equal
bool is_Equal(const CSG_Grid_System &System) const
Definition: grid_system.cpp:317
PARAMETER_TYPE_Table_Field
@ PARAMETER_TYPE_Table_Field
Definition: parameters.h:144
CSG_Parameter::asShapes
CSG_Shapes * asShapes(void) const
Definition: parameter.cpp:1048
CSG_Parameter::is_Enabled
bool is_Enabled(bool bCheckEnv=true) const
Definition: parameter.cpp:209
PARAMETER_DESCRIPTION_OPTIONAL
#define PARAMETER_DESCRIPTION_OPTIONAL
Definition: parameters.h:108
CSG_Parameter::Set_Default
bool Set_Default(int Value)
Definition: parameter.cpp:905
CSG_Parameter_List::Del_Item
virtual bool Del_Item(CSG_Data_Object *pItem, bool bUpdateData=true)
Definition: parameter_data.cpp:3044
PARAMETER_TYPE_Choice
@ PARAMETER_TYPE_Choice
Definition: parameters.h:132
CSG_Parameter::_Serialize
virtual bool _Serialize(CSG_MetaData &MetaData, bool bSave)
Definition: parameter.cpp:1201
CSG_Parameter_File_Name
Definition: parameters.h:854
CSG_Parameters_Grid_Target::Get_Grid
CSG_Grid * Get_Grid(const CSG_String &ID, TSG_Data_Type Type=SG_DATATYPE_Float)
Definition: parameter.cpp:1940
CSG_Tool_Library_Manager::Create_Tool
CSG_Tool * Create_Tool(const CSG_String &Library, int Index, bool bWithGUI=false) const
Definition: tool_library.cpp:696
SG_Parameter_Type_Get_Identifier
CSG_String SG_Parameter_Type_Get_Identifier(TSG_Parameter_Type Type)
Definition: parameter_data.cpp:114
CSG_Parameter::asParameters
class CSG_Parameters * asParameters(void) const
Definition: parameter.cpp:1038
CSG_Parameters_Grid_Target::Set_User_Defined_ZLevels
bool Set_User_Defined_ZLevels(CSG_Parameters *pParameters, double zMin, double zMax, int nLevels, int Rounding=2)
Definition: parameter.cpp:1735
CSG_Parameters::Get_Tool
class CSG_Tool * Get_Tool(void) const
Definition: parameters.h:1712
CSG_Parameter::Set_Name
bool Set_Name(const CSG_String &Name)
Definition: parameter.cpp:582
CSG_Parameters::Set_Enabled
void Set_Enabled(bool bEnabled=true)
Definition: parameters.cpp:405
CSG_Parameter_Grids_List
Definition: parameters.h:1444
CSG_Parameter_Choice::Get_Count
int Get_Count(void) const
Definition: parameters.h:683
SG_Get_Tool_Library_Manager
CSG_Tool_Library_Manager & SG_Get_Tool_Library_Manager(void)
Definition: tool_library.cpp:286
CSG_MetaData::Add_Property
bool Add_Property(const CSG_String &Name, const CSG_String &Value)
Definition: metadata.cpp:559
CSG_Parameter::asDataType
class CSG_Parameter_Data_Type * asDataType(void) const
Definition: parameter.cpp:1106
CSG_Parameter::_asPointer
virtual void * _asPointer(void) const
Definition: parameter.cpp:1031
CSG_Parameter::Get_Child
CSG_Parameter * Get_Child(int iChild) const
Definition: parameters.h:256
PARAMETER_DESCRIPTION_TYPE
#define PARAMETER_DESCRIPTION_TYPE
Definition: parameters.h:107
CSG_Parameter_Grid_List
Definition: parameters.h:1409
CSG_Parameter::~CSG_Parameter
virtual ~CSG_Parameter(void)
Definition: parameter.cpp:86
CSG_Parameter::is_Serializable
bool is_Serializable(void) const
Definition: parameter.cpp:319
CSG_Table::Get_Count
sLong Get_Count(void) const
Definition: table.h:392
CSG_Parameters_Grid_Target::Add_Grids
bool Add_Grids(const CSG_String &ID, const CSG_String &Name, bool bOptional, bool bZLevels=false)
Definition: parameter.cpp:1836
CSG_Parameters::Add_Int
CSG_Parameter * Add_Int(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value=0, int Minimum=0, bool bMinimum=false, int Maximum=0, bool bMaximum=false)
Definition: parameters.cpp:470
CSG_Grid_System::Assign
bool Assign(const CSG_Grid_System &System)
Definition: grid_system.cpp:240
CSG_Parameters_Grid_Target::Get_Grids
CSG_Grids * Get_Grids(const CSG_String &ID, TSG_Data_Type Type=SG_DATATYPE_Float)
Definition: parameter.cpp:2012
SG_PARAMETER_DATA_SET_FALSE
#define SG_PARAMETER_DATA_SET_FALSE
Definition: parameters.h:194
PARAMETER_TYPE_Grid
@ PARAMETER_TYPE_Grid
Definition: parameters.h:148
CSG_Parameters_Grid_Target::CSG_Parameters_Grid_Target
CSG_Parameters_Grid_Target(void)
Definition: parameter.cpp:1335
CSG_Parameter::Get_CmdID
CSG_String Get_CmdID(void) const
Definition: parameter.cpp:563
CSG_Parameter::asPointCloudList
class CSG_Parameter_PointCloud_List * asPointCloudList(void) const
Definition: parameter.cpp:1121
CSG_Parameter_Range
Definition: parameters.h:611
PARAMETER_IGNORE_PROJECTION
#define PARAMETER_IGNORE_PROJECTION
Definition: parameters.h:98
PARAMETER_TYPE_Date
@ PARAMETER_TYPE_Date
Definition: parameters.h:129
CSG_Parameter::Toggle_Value
virtual bool Toggle_Value(void)
Definition: parameter.cpp:880
CSG_Parameters::Add_Parameters
CSG_Parameter * Add_Parameters(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:960
PARAMETER_TYPE_Grid_List
@ PARAMETER_TYPE_Grid_List
Definition: parameters.h:154
SG_Data_Type_Get_Name
CSG_String SG_Data_Type_Get_Name(TSG_Data_Type Type, bool bShort)
Definition: api_core.cpp:122
CSG_Parameter::_Set_String
virtual void _Set_String(void)
Definition: parameter.cpp:894
CSG_Parameters::Add_Grids
CSG_Parameter * Add_Grids(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent=true, TSG_Data_Type Preferred_Type=SG_DATATYPE_Undefined)
Definition: parameters.cpp:725
CSG_Parameter::is_Optional
bool is_Optional(void) const
Definition: parameters.h:234
SSG_Rect::yMax
double yMax
Definition: geo_tools.h:465
SG_DATAOBJECT_TYPE_TIN
@ SG_DATAOBJECT_TYPE_TIN
Definition: dataobject.h:122
CSG_Parameters::Create
bool Create(const CSG_Parameters &Parameters)
Definition: parameters.cpp:124
CSG_Parameters::Add_Grid
CSG_Parameter * Add_Grid(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent=true, TSG_Data_Type Preferred_Type=SG_DATATYPE_Undefined)
Definition: parameters.cpp:655
SG_DATAOBJECT_TYPE_Grid
@ SG_DATAOBJECT_TYPE_Grid
Definition: dataobject.h:118
CSG_Parameter::is_Value_Equal
bool is_Value_Equal(CSG_Parameter *pParameter) const
Definition: parameter.cpp:396
CSG_Shapes::Get_Extent
virtual const CSG_Rect & Get_Extent(void)
Definition: shapes.h:813
CSG_Parameter::asFilePath
class CSG_Parameter_File_Name * asFilePath(void) const
Definition: parameter.cpp:1111
CSG_Parameters::Del_Parameter
bool Del_Parameter(int i)
Definition: parameters.cpp:1248
CSG_Grid_System::Get_NY
int Get_NY(void) const
Definition: grid.h:235
CSG_Parameter::is_Output
bool is_Output(void) const
Definition: parameters.h:233
parameters.h
CSG_Projection::Get_PROJ
const CSG_String & Get_PROJ(void) const
Definition: geo_tools.h:884
SG_Create_Grids
CSG_Grids * SG_Create_Grids(void)
Definition: grids.cpp:65
CSG_String::Format
static CSG_String Format(const char *Format,...)
Definition: api_string.cpp:270
CSG_Parameter_List::Get_Item_Count
int Get_Item_Count(void) const
Definition: parameters.h:1372
CSG_Parameter_Shapes_List
Definition: parameters.h:1493
CSG_Projection
Definition: geo_tools.h:824
CSG_Parameters::Get_Identifier
const CSG_String & Get_Identifier(void) const
Definition: parameters.h:1729
CSG_Tool::has_GUI
bool has_GUI(void) const
Definition: tool.cpp:239
CSG_Table
Definition: table.h:283
CSG_Parameters_CRSPicker::Activate_GUI
bool Activate_GUI(bool bReset=false)
Definition: parameter.cpp:1239
CSG_MetaData::Cmp_Property
bool Cmp_Property(const CSG_String &Name, const CSG_String &String, bool bNoCase=false) const
Definition: metadata.cpp:671
SG_DATAOBJECT_TYPE_Shapes
@ SG_DATAOBJECT_TYPE_Shapes
Definition: dataobject.h:121
PARAMETER_NOT_FOR_GUI
#define PARAMETER_NOT_FOR_GUI
Definition: parameters.h:99
SG_DATAOBJECT_TYPE_Undefined
@ SG_DATAOBJECT_TYPE_Undefined
Definition: dataobject.h:124
CSG_Parameter::Get_Default
const CSG_String & Get_Default(void) const
Definition: parameter.cpp:929
CSG_Parameter::Get_Children_Count
int Get_Children_Count(void) const
Definition: parameters.h:255
CSG_Parameter_Choice::Get_Item
const SG_Char * Get_Item(int Index) const
Definition: parameter_data.cpp:992
CSG_Parameter::Get_Parent
CSG_Parameter * Get_Parent(void) const
Definition: parameter.cpp:106
CSG_Parameter::is_DataObject
bool is_DataObject(void) const
Definition: parameter.cpp:276
CSG_Grid_System::Get_Extent
const CSG_Rect & Get_Extent(bool bCells=false) const
Definition: grid.h:238
PARAMETER_NOT_FOR_CMD
#define PARAMETER_NOT_FOR_CMD
Definition: parameters.h:100
SG_Char
#define SG_Char
Definition: api_core.h:536
TSG_Data_Object_Type
TSG_Data_Object_Type
Definition: dataobject.h:117
CSG_String
Definition: api_core.h:563
CSG_Parameter::asTableFields
class CSG_Parameter_Table_Fields * asTableFields(void) const
Definition: parameter.cpp:1112
CSG_Parameter::Set_Children_Enabled
bool Set_Children_Enabled(bool bEnabled=true)
Definition: parameter.cpp:228
CSG_Parameter::asChoice
class CSG_Parameter_Choice * asChoice(void) const
Definition: parameter.cpp:1107
SG_DATAOBJECT_TYPE_Table
@ SG_DATAOBJECT_TYPE_Table
Definition: dataobject.h:120
CSG_Data_Manager
Definition: data_manager.h:129
CSG_MetaData
Definition: metadata.h:88
CSG_Parameter_Table_Fields
Definition: parameters.h:1097
CSG_Parameter::Check
bool Check(bool bSilent=true)
Definition: parameter.cpp:952
CSG_Parameter_String
Definition: parameters.h:800
CSG_String::is_Empty
bool is_Empty(void) const
Definition: api_string.cpp:178
PARAMETER_DESCRIPTION_TEXT
#define PARAMETER_DESCRIPTION_TEXT
Definition: parameters.h:110
CSG_Parameter::has_Changed
bool has_Changed(int Check_Flags=PARAMETER_CHECK_ALL)
Definition: parameter.cpp:886
CSG_Parameter::asDouble
double asDouble(void) const
Definition: parameters.h:284
PARAMETER_TYPE_Grid_System
@ PARAMETER_TYPE_Grid_System
Definition: parameters.h:143
SSG_Rect::yMin
double yMin
Definition: geo_tools.h:465
PARAMETER_TYPE_PointCloud_List
@ PARAMETER_TYPE_PointCloud_List
Definition: parameters.h:159
CSG_Rect::Get_XCenter
double Get_XCenter(void) const
Definition: geo_tools.h:517
CSG_Rect::Get_YMax
double Get_YMax(void) const
Definition: geo_tools.h:505
CSG_Rect::Get_XMin
double Get_XMin(void) const
Definition: geo_tools.h:502
PARAMETER_TYPE_Table_List
@ PARAMETER_TYPE_Table_List
Definition: parameters.h:156
CSG_Parameter::asRange
class CSG_Parameter_Range * asRange(void) const
Definition: parameter.cpp:1110
CSG_Rect::Inflate
CSG_Rect & Inflate(double d, bool bPercent=true)
Definition: geo_classes.cpp:808
CSG_Parameter_Choices::Get_Selection_Index
int Get_Selection_Index(int i) const
Definition: parameters.h:766
CSG_Parameter::Get_Manager
class CSG_Data_Manager * Get_Manager(void) const
Definition: parameter.cpp:112
CSG_Grid
Definition: grid.h:473
CSG_Parameter::asTableList
class CSG_Parameter_Table_List * asTableList(void) const
Definition: parameter.cpp:1118
CSG_Data_Manager::Grids
CSG_Data_Collection & Grids(void) const
Definition: data_manager.h:139
CSG_Parameter::do_UseInGUI
bool do_UseInGUI(void) const
Definition: parameter.cpp:166
CSG_Rect::Get_YCenter
double Get_YCenter(void) const
Definition: geo_tools.h:518
PARAMETER_TYPE_DataObject_Output
@ PARAMETER_TYPE_DataObject_Output
Definition: parameters.h:161
CSG_Parameters::Set_Parameter
bool Set_Parameter(const CSG_String &ID, CSG_Parameter *pValue)
Definition: parameters.cpp:1405
CSG_Parameter_Choice
Definition: parameters.h:660
CSG_Parameter_Choices::Get_Item
const CSG_String & Get_Item(int i) const
Definition: parameters.h:760
PARAMETER_DESCRIPTION_PROPERTIES
#define PARAMETER_DESCRIPTION_PROPERTIES
Definition: parameters.h:109
CSG_Parameter::Set_Enabled
bool Set_Enabled(bool bEnabled=true)
Definition: parameter.cpp:196
CSG_Shapes
Definition: shapes.h:775
CSG_String::c_str
const SG_Char * c_str(void) const
Definition: api_string.cpp:236
tool_library.h
CSG_Grids::Add_Grid
bool Add_Grid(double Z)
Definition: grids.cpp:658
CSG_PointCloud
Definition: pointcloud.h:105
CSG_Parameter::Set_UseInGUI
void Set_UseInGUI(bool bDoUse=false)
Definition: parameter.cpp:140
CSG_Parameter_PointCloud_List
Definition: parameters.h:1547
CSG_Parameters_CRSPicker::On_Parameter_Changed
static bool On_Parameter_Changed(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
Definition: parameter.cpp:1285
CSG_Parameter_TIN_List
Definition: parameters.h:1524
SG_Create_Grid
CSG_Grid * SG_Create_Grid(void)
Definition: grid.cpp:72
CSG_Parameters
Definition: parameters.h:1690
TSG_Data_Type
TSG_Data_Type
Definition: api_core.h:993
CSG_Parameter::Get_DataObject_Type
TSG_Data_Object_Type Get_DataObject_Type(void) const
Definition: parameter.cpp:519
CSG_Parameter_Range::Get_Min
double Get_Min(void) const
Definition: parameter_data.cpp:814
SG_Realloc
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
Definition: api_memory.cpp:77
CSG_MetaData::Add_Child
CSG_MetaData * Add_Child(void)
Definition: metadata.cpp:166
CSG_Parameter::Cmp_Identifier
bool Cmp_Identifier(const CSG_String &Identifier) const
Definition: parameter.cpp:553
CSG_Parameter::is_Parameters
bool is_Parameters(void) const
Definition: parameter.cpp:313
CSG_Parameter::asGrids
CSG_Grids * asGrids(void) const
Definition: parameter.cpp:1043
CSG_Parameter_List
Definition: parameters.h:1364
CSG_Parameter::asGrid_System
CSG_Grid_System * asGrid_System(void) const
Definition: parameter.cpp:1037
CSG_Data_Manager::Grid
CSG_Data_Collection & Grid(void) const
Definition: data_manager.h:138
CSG_Parameter::Get_Name
const SG_Char * Get_Name(void) const
Definition: parameter.cpp:589
CSG_Parameter::asFont
const SG_Char * asFont(void) const
Definition: parameter.cpp:1036
CSG_Parameter::is_Default
virtual bool is_Default(void) const
Definition: parameter.cpp:935
PARAMETER_TYPE_Range
@ PARAMETER_TYPE_Range
Definition: parameters.h:130
CSG_Parameter::is_Option
bool is_Option(void) const
Definition: parameter.cpp:239
CSG_Projection::Create
bool Create(const CSG_Projection &Projection)
Definition: projections.cpp:96
PARAMETER_OUTPUT
#define PARAMETER_OUTPUT
Definition: parameters.h:95
CSG_Grids
Definition: grids.h:119
PARAMETER_TYPE_TIN_List
@ PARAMETER_TYPE_TIN_List
Definition: parameters.h:158
PARAMETER_TYPE_Parameters
@ PARAMETER_TYPE_Parameters
Definition: parameters.h:163
CSG_Parameters_CRSPicker::Deactivate_GUI
bool Deactivate_GUI(void)
Definition: parameter.cpp:1263
SEPARATE
#define SEPARATE
PARAMETER_TYPE_Font
@ PARAMETER_TYPE_Font
Definition: parameters.h:138
CSG_Parameters_CRSPicker::Create
bool Create(CSG_Parameters &Parameters, const CSG_String &ParentID="")
Definition: parameter.cpp:1222
CSG_Parameter::asList
class CSG_Parameter_List * asList(void) const
Definition: parameter.cpp:1115
PARAMETER_TYPE_Color
@ PARAMETER_TYPE_Color
Definition: parameters.h:139
PARAMETER_TYPE_Shapes
@ PARAMETER_TYPE_Shapes
Definition: parameters.h:151
CSG_Parameter::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter.cpp:941
CSG_Parameters_Grid_Target::On_Parameters_Enable
bool On_Parameters_Enable(CSG_Parameters *pParameters, CSG_Parameter *pParameter)
Definition: parameter.cpp:1566
CSG_Rect::Get_YRange
double Get_YRange(void) const
Definition: geo_tools.h:508
SG_DATAOBJECT_TYPE_PointCloud
@ SG_DATAOBJECT_TYPE_PointCloud
Definition: dataobject.h:123
CSG_Parameters::Set_Callback
bool Set_Callback(bool bActive=true)
Definition: parameters.cpp:1363
CSG_Parameter::asChoices
class CSG_Parameter_Choices * asChoices(void) const
Definition: parameter.cpp:1109
CSG_Parameter::is_Information
bool is_Information(void) const
Definition: parameters.h:235
PARAMETER_DESCRIPTION_NAME
#define PARAMETER_DESCRIPTION_NAME
Definition: parameters.h:106
CSG_Parameters_CRSPicker::CSG_Parameters_CRSPicker
CSG_Parameters_CRSPicker(void)
Definition: parameter.cpp:1216
CSG_Parameters::Add_Bool
CSG_Parameter * Add_Bool(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool Value=false)
Definition: parameters.cpp:465
CSG_Grid_System::is_Valid
bool is_Valid(void) const
Definition: grid_system.cpp:258
CSG_Parameters_Grid_Target::Get_System
CSG_Grid_System Get_System(void) const
Definition: parameter.cpp:1887
CSG_Parameter::Get_Type_Identifier
CSG_String Get_Type_Identifier(void) const
Definition: parameter.cpp:123
CSG_Parameter_Data_Type
Definition: parameters.h:718
CSG_Colors
Definition: api_core.h:1338
CSG_Grids::Del_Grids
bool Del_Grids(bool bDetach=false)
Definition: grids.cpp:823
CSG_Parameter::asBool
bool asBool(void) const
Definition: parameters.h:281
PARAMETER_OUTPUT_OPTIONAL
#define PARAMETER_OUTPUT_OPTIONAL
Definition: parameters.h:103
DATAOBJECT_NOTSET
#define DATAOBJECT_NOTSET
Definition: dataobject.h:129
PARAMETER_TYPE_Text
@ PARAMETER_TYPE_Text
Definition: parameters.h:135
CSG_Parameters::Add_Choice
CSG_Parameter * Add_Choice(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items, int Default=0)
Definition: parameters.cpp:533