Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From 164c9d435f4d167b To 028b99927b4cfbb3
2018-07-29
| ||
17:00 | updating the internal HTML documentation check-in: a5c0047ccc user: sandro tags: trunk | |
15:35 | VirtualPG integration - aligning to recent changes in rasterlite2 check-in: 028b99927b user: sandro tags: trunk | |
2017-08-24
| ||
16:04 | implementing dynamic styles check-in: 161086f290 user: sandro tags: trunk | |
2017-08-05
| ||
16:08 | implementing HtmlHep.cpp and helpgen.c check-in: 7943b510a1 user: sandro tags: trunk | |
2017-08-02
| ||
16:27 | Map Panel: several enhancements check-in: 164c9d435f user: sandro tags: trunk | |
2017-07-16
| ||
16:24 | implementing Raster Pixel Identify check-in: 15e5b8f5f9 user: sandro tags: trunk | |
Changes to BlobExplorer.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 72 73 74 75 76 77 78 79 80 81 82 83 84 85 ... 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 .... 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 |
/* / BlobExplorer.cpp / a dialog to explore a BLOB value / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ unsigned int width; unsigned int height; unsigned char sample_type; unsigned char pixel_type; unsigned char num_bands; if (BlobType == GAIA_GEOMETRY_BLOB) Geometry = gaiaFromSpatiaLiteBlobWkb(Blob, BlobSize); else if (BlobType == GAIA_GPB_BLOB) Geometry = gaiaFromGeoPackageGeometryBlob(Blob, BlobSize); else if (BlobType == GAIA_XML_BLOB) { #ifdef ENABLE_LIBXML2 // only if LIBXML2 is enabled ................................................................................ if (wxPropertySheetDialog::Create(parent, wxID_ANY, wxT("BLOB explorer")) == false) return false; wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *hexadecimal = CreateHexadecimalPage(book); book->AddPage(hexadecimal, wxT("Hexadecimal dump"), true); if (BlobType == GAIA_GEOMETRY_BLOB || BlobType == GAIA_GPB_BLOB) { wxPanel *geometry = CreateGeometryPage(book); book->AddPage(geometry, wxT("Geometry explorer"), false); wxPanel *wkt = CreateWKTPage(book); book->AddPage(wkt, wxT("WKT"), false); wxPanel *ewkt = CreateEWKTPage(book); book->AddPage(ewkt, wxT("EWKT"), false); ................................................................................ // switch (event.GetSelection()) { case 0: UpdateHexadecimalPage(); break; case 1: if (BlobType == GAIA_GEOMETRY_BLOB || BlobType == GAIA_GPB_BLOB) UpdateGeometryPage(); else if (BlobType == GAIA_XML_BLOB) UpdateXmlDocumentPage(); else UpdateImagePage(); break; case 2: |
| > > | > | > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 ... 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 .... 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 |
/* / BlobExplorer.cpp / a dialog to explore a BLOB value / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ unsigned int width; unsigned int height; unsigned char sample_type; unsigned char pixel_type; unsigned char num_bands; if (BlobType == GAIA_GEOMETRY_BLOB) Geometry = gaiaFromSpatiaLiteBlobWkb(Blob, BlobSize); else if (BlobType == GAIA_TINYPOINT_BLOB) Geometry = gaiaFromSpatiaLiteBlobWkb(Blob, BlobSize); else if (BlobType == GAIA_GPB_BLOB) Geometry = gaiaFromGeoPackageGeometryBlob(Blob, BlobSize); else if (BlobType == GAIA_XML_BLOB) { #ifdef ENABLE_LIBXML2 // only if LIBXML2 is enabled ................................................................................ if (wxPropertySheetDialog::Create(parent, wxID_ANY, wxT("BLOB explorer")) == false) return false; wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *hexadecimal = CreateHexadecimalPage(book); book->AddPage(hexadecimal, wxT("Hexadecimal dump"), true); if (BlobType == GAIA_GEOMETRY_BLOB || BlobType == GAIA_TINYPOINT_BLOB || BlobType == GAIA_GPB_BLOB) { wxPanel *geometry = CreateGeometryPage(book); book->AddPage(geometry, wxT("Geometry explorer"), false); wxPanel *wkt = CreateWKTPage(book); book->AddPage(wkt, wxT("WKT"), false); wxPanel *ewkt = CreateEWKTPage(book); book->AddPage(ewkt, wxT("EWKT"), false); ................................................................................ // switch (event.GetSelection()) { case 0: UpdateHexadecimalPage(); break; case 1: if (BlobType == GAIA_GEOMETRY_BLOB || BlobType == GAIA_TINYPOINT_BLOB || BlobType == GAIA_GPB_BLOB) UpdateGeometryPage(); else if (BlobType == GAIA_XML_BLOB) UpdateXmlDocumentPage(); else UpdateImagePage(); break; case 2: |
Changes to Classdef.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 29 30 31 32 33 34 35 36 37 38 39 40 41 42 .. 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 ... 149 150 151 152 153 154 155 156 157 158 159 160 161 162 ... 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 ... 438 439 440 441 442 443 444 445 446 447 448 449 450 451 ... 759 760 761 762 763 764 765 766 767 768 769 770 771 772 ... 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 .... 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 .... 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 .... 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 .... 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 .... 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 .... 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 .... 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 .... 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 .... 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 .... 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 .... 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 .... 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 .... 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 .... 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 .... 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 .... 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 .... 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 .... 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 .... 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 .... 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 .... 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 .... 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 .... 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 .... 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 .... 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 .... 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 .... 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 .... 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 .... 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 .... 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 ..... 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 ..... 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 ..... 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 ..... 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 ..... 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 ..... 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 ..... 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 ..... 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 ..... 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 ..... 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 ..... 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 ..... 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 ..... 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 |
/* / Classdef.h / class definitions for spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "wx/grid.h" #include "wx/listctrl.h" #include "wx/textctrl.h" #include "wx/propdlg.h" #include "wx/generic/propdlg.h" #include "wx/timer.h" #include "wx/string.h" #include "config.h" #ifdef SPATIALITE_AMALGAMATION #include <spatialite/sqlite3.h> #else #include <sqlite3.h> ................................................................................ #include <spatialite/gaiaexif.h> #include <spatialite/gaiageo.h> #include <spatialite.h> #include <spatialite/gg_wfs.h> #include <spatialite/geopackage.h> #include <freexl.h> #include <rasterlite2/rasterlite2.h> #include <rasterlite2/rl2wms.h> #include "rasterlite2/rl2graphics.h" // // functions for QSORT / BSEARCH // int cmp_prenodes_code(const void *p1, const void *p2); int cmp_prenodes_id(const void *p1, const void *p2); int cmp_nodes2_code(const void *p1, const void *p2); int cmp_nodes2_id(const void *p1, const void *p2); int cmp_nodes1_code(const void *p1, const void *p2); int cmp_nodes1_id(const void *p1, const void *p2); // // functions for threaded queries // int SqlProgressCallback(void *arg); #if defined(__WIN32) && !defined(__MINGW32__) DWORD WINAPI DoExecuteSqlThread(void *arg); #else ................................................................................ ID_Exif, ID_GpsPics, ID_LoadXml, ID_Srids, ID_Charset, ID_Help, ID_Attach, ID_SqlLog, ID_DbStatus, ID_CheckGeom, ID_SaneGeom, ID_WFS, ID_DXF, ID_AddLayer, ................................................................................ Tree_MapRemoveAll, Tree_MapShowAll, Tree_MapHideAll, Tree_MapConfigure, Tree_MapVisible, Tree_MapFullExtent, Tree_MapLayerFullExtent, Tree_MapLayerConfigure, Tree_MapLayerInfo, Tree_QuickStyleEdit, Tree_MapRemoveLayer, Tree_MapDeleteItem, Grid_Clear, Grid_All, Grid_Column, Grid_Row, Grid_Copy, Grid_Blob, Grid_Delete, ................................................................................ ID_NET_FROM_TO, ID_NET_TO_FROM, ID_NET_NAME_ENABLE, ID_NET_NAME, ID_NET_A_STAR, ID_NET_DATA, ID_NET_VIRTUAL, ID_EXIF_PATH, ID_EXIF_FOLDER, ID_EXIF_METADATA, ID_EXIF_GPS_ONLY, ID_GPS_PICS_PATH, ID_GPS_PICS_FOLDER, ID_GPS_PICS_TABLE, ................................................................................ ID_RASTER_KEYWORD_REMOVE, ID_RASTER_KEYWORD, ID_RASTER_KEYWORD_GRID, ID_SYMBOLIZER_NAME, ID_SYMBOLIZER_TITLE, ID_SYMBOLIZER_ABSTRACT, ID_SYMBOLIZER_OPACITY, ID_SYMBOLIZER_RED, ID_SYMBOLIZER_GREEN, ID_SYMBOLIZER_BLUE, ID_SYMBOLIZER_GRAY, ID_SYMBOLIZER_CONTRAST, ID_SYMBOLIZER_GAMMA, ID_SYMBOLIZER_MAP, ................................................................................ ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y, ID_SYMBOLIZER_FACE_SEED_FILL_COLOR, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_HEX, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_BTN, ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_HEX, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_BTN, ID_WMS_URL, ID_WMS_CATALOG, ID_WMS_RESET, ID_WMS_SERVER, ID_WMS_VERSION, ID_WMS_CRS, ID_WMS_STYLE, ................................................................................ ID_RASTER_STYLE, ID_RASTER_OK, ID_VECTOR_LAYER, ID_VECTOR_TYPE, ID_VECTOR_UUID, ID_VECTOR_STYLE, ID_VECTOR_OK, ID_TOPOGEO_LAYER, ID_TOPOGEO_SRID, ID_TOPOGEO_STYLE, ID_TOPOGEO_FACE, ID_TOPOGEO_EDGE, ID_TOPOGEO_NODE, ID_TOPOGEO_FACE_SEED, ................................................................................ ID_QUICK_STYLE_APPLY, ID_QUICK_STYLE_EXPORT, ID_QUICK_STYLE_COPY, ID_PANE_POINT, ID_PANE_LINE, ID_PANE_POLYGON, ID_PANE_TEXT, ID_PAINT_MAP_STEP, ID_PAINT_MAP_THREAD_FINISHED }; enum { // tree item data types MY_ROOT_NODE = 0, MY_ROOT_USERDATA, MY_ROOT_ISOMETADATA, MY_ROOT_TOPOLOGIES, MY_ROOT_NETWORKS, MY_ROOT_RASTER, MY_ROOT_VECTOR, MY_ROOT_WMS, MY_ROOT_STYLING, MY_ROOT_METADATA, MY_ROOT_INTERNAL, MY_ROOT_RTREE, MY_TABLE, MY_VTABLE, MY_VIEW, ................................................................................ MY_FOREIGN_KEY, MY_FOREIGN_KEY_FLD, MY_INT_VARIANT, MY_DBL_VARIANT, MY_TXT_VARIANT, MY_BLOB_VARIANT, MY_NULL_VARIANT, MY_UNDEFINED }; enum { // control IDs for timers ID_AUTO_SAVE_TIMER = 20000, ID_DB_STATUS_TIMER, ................................................................................ int Type; // the object type int SubType; // the object sub-type wxString DbAlias; // the DB alias [Attached DB] wxString MainName; // the object name [usually: table name] wxString ColName; // the column name [optional] wxString PathOrURL; // the Path or request URL [optional] bool Restricted; // not editable public: MyObject(int type); MyObject(int type, wxString & dbAlias); MyObject(int type, wxString & dbAlias, wxString & name, bool restricted = false); MyObject(int type, wxString & dbAlias, wxString & name, wxString & column); MyObject(int type, wxString & dbAlias, wxString & name, wxString & column, wxString & path_or_url); virtual ~ MyObject() {; } int GetType() { return Type; } ................................................................................ { return ColName; } wxString & GetPathOrURL() { return PathOrURL; } bool IsTable(); bool IsView(); bool IsTemporary(); bool IsEditable(); bool IsAttachedDB(); bool IsRootAttached(); bool IsAttached(); ................................................................................ bool IsIndex(); bool IsIndexColumn(); bool IsTrigger(); bool IsPrimaryKey(); bool IsPrimaryKeyColumn(); bool IsForeignKey(); bool IsForeignKeyColumn(); }; class MyColumnInfo { // // a class to store a DB column // ................................................................................ wxTreeItemId RootTopologies; wxTreeItemId RootNetworks; wxTreeItemId RootRasterCoverages; wxTreeItemId RootVectorCoverages; wxTreeItemId RootStyling; wxTreeItemId RootWMS; wxTreeItemId RootIsoMetadata; TopoGeoList Topologies; TopoNetList Networks; RasterCoverageList RasterCoverages; VectorCoverageList VectorCoverages; WmsLayerList WmsLayers; TopoGeoList AltTopologies; TopoNetList AltNetworks; ................................................................................ wxString CurrentVectorCoverageName; wxString CurrentWmsLayerURL; wxString CurrentWmsLayerName; void ExpandTable(wxTreeItemId & item); void ExpandView(wxTreeItemId & item); void ExpandAttachedTable(wxTreeItemId & item); void ExpandAttachedView(wxTreeItemId & item); // context menus void DoRootRasterCoveragesContextMenu(wxPoint & pt); void DoRootVectorCoveragesContextMenu(wxPoint & pt); void DoRootWmsLayersContextMenu(wxPoint & pt); void DoRootTopoGeoContextMenu(wxPoint & pt); void DoRootTopoNetContextMenu(wxPoint & pt); void DoRootStylingContextMenu(wxPoint & pt); void DoRootOthersContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedDbContextMenu(wxPoint & pt, MyObject * obj); void DoRootAttachedContextMenu(wxPoint & pt, MyObject * obj); void DoGenericAttachedContextMenu(wxPoint & pt, wxString & title); void DoTopoGeoContextMenu(wxPoint & pt, wxString & name); void DoTopoNetContextMenu(wxPoint & pt, wxString & name); void DoRasterCoverageContextMenu(wxPoint & pt, wxString & name); ................................................................................ void DoAttachedPrimaryKeyContextMenu(wxPoint & pt, MyObject * obj); void DoMainPrimaryKeyColumnContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedPrimaryKeyColumnContextMenu(wxPoint & pt, MyObject * obj); void DoMainForeignKeyContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedForeignKeyContextMenu(wxPoint & pt, MyObject * obj); void DoMainForeignKeyColumnContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedForeignKeyColumnContextMenu(wxPoint & pt, MyObject * obj); public: MyTableTree() {; } MyTableTree(MyFrame * parent, wxWindowID id = wxID_ANY); virtual ~ MyTableTree(); void SetPath(wxString & path) ................................................................................ wxTreeItemId & GetRootNode(wxString & tableName, bool * restricted, bool * tile_data); wxTreeItemId & GetAltRootNode(wxString & tableName, RootNodes * nodes, bool * tile_data); void AddTable(wxString & tableName, bool virtualTable, bool geometry); void AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry); void AddGeoPackageTable(wxString & tableName); void AddGeoPackageTable(wxString & dbAlias, wxString & tableName, RootNodes * nodes); void AddGeoPackageVirtualTable(wxString & tableName); void AddGeoPackageVirtualTable(wxString & dbAlias, wxString & tableName, RootNodes * nodes); void AddFdoOgrTable(wxString & tableName); ................................................................................ wxTreeItemId & AddAttached(wxString & dbAlias, wxString & path); void AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry, RootNodes * list); void AddView(wxString & viewName, bool geometry); void AddView(wxString & dbAlias, wxString & viewName, bool geometry); void AddView(wxString & dbAlias, wxString & viewName, bool geometry, RootNodes * list); void ExpandRoot() { Expand(Root); Expand(RootUserData); CollapseAllChildren(RootTopologies); CollapseAllChildren(RootNetworks); CollapseAllChildren(RootRasterCoverages); CollapseAllChildren(RootVectorCoverages); CollapseAllChildren(RootStyling); CollapseAllChildren(RootWMS); CollapseAllChildren(RootIsoMetadata); Collapse(RootMetadata); Collapse(RootInternal); Collapse(RootSpatialIndex); } void AddTopology(TopoGeoSet * topology) { ................................................................................ { AltRasterCoverages.Flush(); } void DeleteAltVectorCoverages(void) { AltVectorCoverages.Flush(); } sqlite3 *GetSQLiteHandle(); void OnSelChanged(wxTreeEvent & event); void OnRightClick(wxTreeEvent & event); void OnCmdQueryViewComposer(wxCommandEvent & event); void OnCmdCloneTable(wxCommandEvent & event); void OnCmdNewTable(wxCommandEvent & event); void OnCmdNewView(wxCommandEvent & event); ................................................................................ void OnCmdDumpCsv(wxCommandEvent & event); void OnCmdDumpHtml(wxCommandEvent & event); void OnCmdDumpDif(wxCommandEvent & event); void OnCmdDumpSylk(wxCommandEvent & event); void OnCmdDumpDbf(wxCommandEvent & event); void OnCmdDumpPostGIS(wxCommandEvent & event); void OnCmdEdit(wxCommandEvent & event); bool DropRenameAux1(MyObject * obj, class GeomColsList * geometries, bool * autoincrement); void DropRenameAux2(MyObject * obj, GeomColsList * geometries, wxString & aliasTable, wxString & new_column, wxString & renameSql, wxString & dropSql, wxString & disableSpatialIdxSql, wxString & dropSpatialIdxSql, ................................................................................ void AddEntity(sqlite3_int64 rowid, int severity, bool CanFix, wxString & error, wxString & geosMsg); MalformedGeom *GetFirst() { return First; } }; class SanitizeAllGeometriesDialog:public wxDialog { // // a dialog supporting Sanitize All Geometries // private: ................................................................................ class TableViewItem { // // an ancillary class wrapping Tables and Views // private: wxString Name; bool View; bool Virtual; bool Geometry; bool GeoPackageGeometry; bool GeoPackageVirtualGeometry; bool FdoOgrGeometry; bool FdoOgrVirtualGeometry; TableViewItem *Next; public: TableViewItem(wxString & name, bool is_view, bool is_virtual); ~TableViewItem() {; } wxString & GetName() { return Name; } bool IsView() { ................................................................................ { FdoOgrVirtualGeometry = true; } bool IsFdoOgrVirtualGeometry() { return FdoOgrVirtualGeometry; } void SetNext(TableViewItem * next) { Next = next; } TableViewItem *GetNext() { return Next; ................................................................................ TableViewItem * First; TableViewItem *Last; int Count; TableViewItem **Sorted; public: TableViewList(); ~TableViewList(); void Add(wxString & name, bool isView, bool isVirtual); void PrepareSorted(); void SetGeometry(wxString & name); void SetGeoPackageGeometry(wxString & name); void SetGeoPackageVirtualGeometry(wxString & name); void SetFdoOgrGeometry(wxString & name); void SetFdoOgrVirtualGeometry(wxString & name); ................................................................................ void AddGeoTable(wxString & db_prefix, wxString & table_name, int type); MyAttachedTable *FindGeoTable(wxString & db_prefix, wxString & name); MyAttachedDB *GetFirst() { return First; } }; class MyFrame:public wxFrame { // // the main GUI frame // private: ................................................................................ wxBitmap *BtnSqlLog; // button icon for SQL LOG wxBitmap *BtnDbStatus; // button icon for DB STATUS wxBitmap *BtnCheckGeom; // button icon for CheckGeom wxBitmap *BtnSaneGeom; // button icon for SaneGeom wxBitmap *BtnWFS; // button icon for WFS wxBitmap *BtnDXF; // button icon for DXF wxBitmap *BtnMap; // button icon for Map Panel rl2WmsCachePtr WmsCache; // internal WMS Cache bool ReadOnlyConnection; // AutoSave timer int AutoSaveInterval; int LastTotalChanges; wxTimer *TimerAutoSave; gaiaGeomCollPtr GeomFromPoint(gaiaPointPtr pt, int srid); ................................................................................ rl2PixelPtr ParseNoData(wxString & NoData, int SampleType, int PixelType, int NumBands); char *GetNum(const char *start, const char *end); bool IsValidSqliteFile(wxString & path); void DoUpdateRL2MaxThreads(); void DoAutoDetachDatabases(); CurrentSqlFilters SqlFilters; public: MyFrame(const wxString & title, const wxPoint & pos, const wxSize & size); virtual ~ MyFrame(); enum VectorTypes { VECTOR_UNKNOWN = 0, VECTOR_GEOTABLE, ................................................................................ bool CreateDB(); void CloseDB(); void InitializeSpatialMetadata(); void AutoFDOStart(); void AutoFDOStop(); void AutoGPKGStart(); void AutoGPKGStop(); void InitTableTree(); void LoadHistory(); bool HasHistory(); void ListAttached(); void AutoFDOStart(wxString & dbAlias, MyAttachedDB * db); void AutoFDOStop(wxString & dbAlias); void AutoGPKGStart(wxString & dbAlias, MyAttachedDB * db); ................................................................................ wxString & charset, char decimal_point, bool date_time); void ExportResultSetAsSylk(wxString & path, wxString & sql, wxString & charset, bool date_time); void ExportResultSetAsDbf(wxString & path, wxString & sql, wxString & charset); void GetHelp(wxString & html); wxString *GetColumnNames(wxString & table, int *columns); void SetLastDirectory(wxString & path) { LastDirectory = path; } wxString & GetLastDirectory() { ................................................................................ MyResultSetView *GetRsView() { return RsView; } wxString *GetTables(int *cnt); wxString *GetTableColumns(wxString & dbPrefix, wxString & table, int *cnt); wxString *GetTableGeometries(wxString & dbPrefix, wxString & table, int *cnt); void BuildNetwork(wxString & table, wxString & from, wxString & to, bool isNoGeometry, wxString & geometry, wxString & name, bool cost_length, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, bool aStarSupported, wxString & dataTableName, wxString & virtualTableName); void BuildNetwork(wxString & table, wxString & from, wxString & to, wxString & name, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, wxString & dataTableName, wxString & virtualTableName); bool CreateNetwork(class Network * net, wxString & table, wxString & from, wxString & to, wxString & geometry, wxString & name, bool aStarSupported, double aStarCoeff, wxString & dataTableName, wxString & virtualTableName); bool CreateNetwork(class Network * net, wxString & table, wxString & from, wxString & to, wxString & name, wxString & dataTableName, wxString & virtualTableName); void ImportExifPhotos(wxString & path, bool folder, bool metadata, bool gps_only); void ImportGpsPhotos(wxString & path, bool folder, wxString & table, wxString & geometry, bool update_statistics, bool spatial_index); void ImportXmlDocuments(wxString & path, bool folder, wxString & suffix, wxString & table, wxString & pkName, ................................................................................ wxString & xmlColumn, wxString & inPathColumn, wxString & schemaColumn, wxString & parseErrColumn, wxString & validateErrColumn, int compressed, const char *schemaURI, bool isInternaleSchemaUri); void ImportDXFfiles(wxString & path, bool folder, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append); void OutputNetNode(unsigned char *auxbuf, int *size, int ind, bool node_code, int max_node_length, class NetNode * pN, int endian_arch, bool aStarSupported); bool CheckExifTables(); int ExifLoadDir(wxString & path, bool gps_only, bool metadata); int ExifLoadFile(wxString & path, bool gps_only, bool metadata); bool UpdateExifTables(unsigned char *blob, int sz, gaiaExifTagListPtr tag_list, bool metadata, wxString & path); bool CheckGpsPicsTable(wxString & table, wxString & geometry, bool rtree); ................................................................................ double *miny, double *maxx, double *maxy); void DoRegisterWMS(); void DoCreateTopoGeo(); void DoCreateTopoNet(); void MapPanelClosing(); void OnQuit(wxCommandEvent & event); void OnClose(wxCloseEvent & event); void OnAbout(wxCommandEvent & event); void OnConnect(wxCommandEvent & event); void OnConnectReadOnly(wxCommandEvent & event); void OnCreateNew(wxCommandEvent & event); void OnDisconnect(wxCommandEvent & event); void OnMemoryDbLoad(wxCommandEvent & event); void OnMemoryDbNew(wxCommandEvent & event); void OnMemoryDbClock(wxCommandEvent & event); void OnMemoryDbSave(wxCommandEvent & event); void OnVacuum(wxCommandEvent & event); void OnMapPanel(wxCommandEvent & event); void OnSqlScript(wxCommandEvent & event); void OnQueryViewComposer(wxCommandEvent & event); void OnCharset(wxCommandEvent & event); void OnLoadShp(wxCommandEvent & event); void OnLoadTxt(wxCommandEvent & event); void OnLoadDbf(wxCommandEvent & event); ................................................................................ wxString dbPrefix; wxString inTable; public: CloneTableDialog() { MainFrame = NULL; } CloneTableDialog(MyFrame * parent, wxString & dbPrefx, wxString & inTable) { Create(parent, dbPrefix, inTable); } bool Create(MyFrame * parent, wxString & dbPrefix, wxString & inTable); virtual ~ CloneTableDialog() {; } ................................................................................ public: LoadXLDialog() {; } LoadXLDialog(MyFrame * parent, wxString & path, wxString & table); bool Create(MyFrame * parent, wxString & path, wxString & table); virtual ~ LoadXLDialog() {; } void CreateControls(); wxString & GetTable() { return Table; } int GetWorksheetIndex() ................................................................................ wxString OneWayToFrom; // the OneWay To-From column wxString OneWayFromTo; // the OneWay From-To column bool NameEnabled; // Name column supported wxString NameColumn; // the Name column name bool AStarSupported; // A* algorithm supported wxString DataTable; // name of the binary data table wxString VirtualTable; // name of the VirtualNetwork table public: NetworkDialog() {; } NetworkDialog(MyFrame * parent); bool Create(MyFrame * parent); virtual ~ NetworkDialog() ................................................................................ wxString & GetDataTable() { return DataTable; } wxString & GetVirtualTable() { return VirtualTable; } void OnTable(wxCommandEvent & event); void OnDirection(wxCommandEvent & event); void OnCost(wxCommandEvent & event); void OnOneWay(wxCommandEvent & event); void OnNameEnabled(wxCommandEvent & event); void OnNoGeometry(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class ExifDialog:public wxDialog { // // a dialog preparing an IMPORT EXIF PHOTOS ................................................................................ int blob_size, wxWindow * panel, wxWindowID id, const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize, long style = 0); virtual ~ MyHexList(); virtual wxString OnGetItemText(long item, long column) const; }; class NetNodePre { // // a class to store a temporary node for Network // private: sqlite3_int64 Id; wxString Code; NetNodePre *Next; public: NetNodePre(sqlite3_int64 id); NetNodePre(const char *code); ~NetNodePre() {; } sqlite3_int64 GetId() { return Id; } wxString & GetCode() { return Code; } void SetNext(NetNodePre * next) { Next = next; } NetNodePre *GetNext() { return Next; } }; class NetNode { // // a class to store a final node for Network // private: int InternalIndex; sqlite3_int64 Id; wxString Code; double X; double Y; class NetArcRef *First; class NetArcRef *Last; NetNode *Next; public: NetNode(sqlite3_int64 id); NetNode(wxString & code); ~NetNode(); int GetInternalIndex() { return InternalIndex; } void SetInternalIndex(int idx) { InternalIndex = idx; } sqlite3_int64 GetId() { return Id; } wxString & GetCode() { return Code; } double GetX() { return X; } void SetX(double x) { X = x; } double GetY() { return Y; } void SetY(double y) { Y = y; } void AddOutcoming(class NetArc * pA); NetArcRef *GetFirst() { return First; } NetArc **PrepareOutcomings(int *count); void SetNext(NetNode * next) { Next = next; } NetNode *GetNext() { return Next; } }; class NetArc { // // a class to store an arc for Network // private: sqlite3_int64 RowId; NetNode *From; NetNode *To; double Cost; NetArc *Next; public: NetArc(sqlite3_int64 rowid, NetNode * from, NetNode * to, double cost); ~NetArc() {; } sqlite3_int64 GetRowId() { return RowId; } NetNode *GetFrom() { return From; } NetNode *GetTo() { return To; } double GetCost() { return Cost; } void SetNext(NetArc * next) { Next = next; } NetArc *GetNext() { return Next; } }; class NetArcRef { // // a class to store a reference to an arc for Network // private: NetArc * Reference; NetArcRef *Next; public: NetArcRef(NetArc * arc) { Reference = arc; Next = NULL; } ~NetArcRef() {; } NetArc *GetReference() { return Reference; } void SetNext(NetArcRef * next) { Next = next; } NetArcRef *GetNext() { return Next; } }; class Network { // // a class representing a Network // private: NetNodePre * FirstPre; NetNodePre *LastPre; int NumPreNodes; NetNodePre **SortedPreNodes; NetArc *FirstArc; NetArc *LastArc; NetNode *FirstNode; NetNode *LastNode; int NumNodes; NetNode **SortedNodes; bool Error; bool NodeCode; int MaxCodeLength; public: Network(); ~Network(); void CleanPreNodes(); void InsertNode(sqlite3_int64 id); void InsertNode(const char *code); void AddNode(sqlite3_int64 id); void AddNode(wxString & code); NetNode *ProcessNode(sqlite3_int64 id, double x, double y, NetNode ** pOther); NetNode *ProcessNode(wxString & code, double x, double y, NetNode ** pOther); NetNode *ProcessNode(sqlite3_int64 id, NetNode ** pOther); NetNode *ProcessNode(wxString & code, NetNode ** pOther); void Sort(); NetNode *Find(sqlite3_int64 id); NetNode *Find(wxString & code); NetNode *GetSortedNode(sqlite3_int64 x); void AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost); void AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost); void AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double cost); void AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double cost); void InitNodes(); void SetError() { Error = true; } bool IsError() { return Error; } void SetNodeCode(bool mode) { NodeCode = mode; } bool IsNodeCode() { return NodeCode; } int GetNumNodes() { return NumNodes; } int GetMaxCodeLength() { return MaxCodeLength; } }; class AutoFDOTable { private: char *Name; AutoFDOTable *Next; public: AutoFDOTable(const char *name, const int len) ................................................................................ {; } virtual ~ WmsServersDialog() { if (List != NULL) delete[]List; } bool Create(WmsDialog * parent, MyFrame * grandparent); void CreateControls(); wxString & GetURL() { return URL; } void OnUrlSelected(wxCommandEvent & event); void OnOk(wxCommandEvent & event); ................................................................................ unsigned char ParseHex(const char *byte); void DoConfigureWmsLayer(); void DoConfigureMapLayer(); public: WmsLayerConfigDialog() {; } virtual ~ WmsLayerConfigDialog() { if (Version != NULL) free(Version); if (MaxVersion != NULL) free(MaxVersion); if (RefSys != NULL) free(RefSys); if (Style != NULL) free(Style); if (ImageFormat != NULL) free(ImageFormat); if (BgColor != NULL) free(BgColor); } bool Create(MyFrame * parent, wxString url, wxString layer); bool Create(MyMapPanel * parent, MapLayer * layer); void CreateControls(); void LoadData(); void InitData(); void FindMaxVersion(); void PopulateRefSys(wxComboBox * crsList); ................................................................................ bool ConfigChanged() { return IsConfigChanged; } void OnOk(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class TopologyLayerConfigDialog:public wxDialog { // // a dialog for configuring a TopoGeo Layer // private: ................................................................................ void UpdateXmlStyle(); const char *GetXmlStyle() { return XmlStyle; } const unsigned char *CloneXmlStyle(); }; class QuickStyleVectorDialog:public wxPropertySheetDialog { // // a dialog for configuring a Quick Style (Vector) // private: ................................................................................ void OnCmdColorHalo2Picker(wxCommandEvent & event); void OnCmdIsRepeatedChanged(wxCommandEvent & event); void OnCmdIsAlignedChanged(wxCommandEvent & event); void OnCmdGeneralizeLineChanged(wxCommandEvent & event); void OnFont1Changed(wxCommandEvent & event); void OnFont2Changed(wxCommandEvent & event); }; class QuickStyleTopologyDialog:public wxPropertySheetDialog { // // a dialog for configuring a Quick Style (Topology) // private: ................................................................................ CachedFrame *CachedLinks; CachedFrame *CachedFaces; CachedFrame *CachedEdgeSeeds; CachedFrame *CachedLinkSeeds; CachedFrame *CachedFaceSeeds; QuickStyleObj *QuickStyle; QuickStyleTopologyObj *QuickStyleTopology; MapLayer *Prev; MapLayer *Next; public: MapLayer(LayerListItem * layer); ~MapLayer(); int GetType() { ................................................................................ QuickStyleObj *GetQuickStyle() { return QuickStyle; } QuickStyleTopologyObj *GetQuickStyleTopology() { return QuickStyleTopology; } QuickStyleObj *CloneQuickStyle() { return QuickStyle->Clone(); } QuickStyleTopologyObj *CloneQuickStyleTopology() { return QuickStyleTopology->Clone(); } bool UpdateQuickStyle(QuickStyleObj * style); bool UpdateQuickStyle(QuickStyleTopologyObj * style); WmsLayerSettings *GetWmsConfig() { return WmsConfig; } RasterLayerConfig *GetRasterConfig() { return RasterConfig; ................................................................................ private: MyMapPanel * MapPanel; bool Changed; wxTreeItemId Root; // the root node wxImageList *Images; // the images list wxTreeItemId CurrentItem; // the tree item holding the current context menu wxTreeItemId DraggedItem; // the tree item to be moved public: MyLayerTree() {; } MyLayerTree(MyMapPanel * parent, wxWindowID id = wxID_ANY); virtual ~ MyLayerTree(); void FlushAll() ................................................................................ void OnCmdRemoveAll(wxCommandEvent & event); void OnCmdShowAll(wxCommandEvent & event); void OnCmdHideAll(wxCommandEvent & event); void OnCmdMapConfigure(wxCommandEvent & event); void OnCmdVisible(wxCommandEvent & event); void OnCmdMapFullExtent(wxCommandEvent & event); void OnCmdMapLayerFullExtent(wxCommandEvent & event); void OnCmdRemoveLayer(wxCommandEvent & event); void OnCmdDeleteItem(wxCommandEvent & event); void OnCmdLayerInfo(wxCommandEvent & event); void OnCmdMapLayerConfigure(wxCommandEvent & event); void OnCmdQuickStyleEdit(wxCommandEvent & event); void OnDragStart(wxTreeEvent & event); void OnDragEnd(wxTreeEvent & event); ................................................................................ if (UnusedThreads != NULL) delete[]UnusedThreads; UnusedThreads = NULL; NumThreads = 0; } void PrepareThreadsPool(int count); int FindUnusedThread(); void ReleaseThread(int index, SingleLayerPainter * lyr); }; class MyMapView:public wxPanel { // // a panel used to show the Map // ................................................................................ { return MapSRID; } void EnableMultiThreading(bool mode) { MultiThreadingEnabled = mode; } double GetMapMinX() { return MapMinX; } double GetMapMinY() { return MapMinY; ................................................................................ { return GeoMaxX; } double GetGeoMaxY() { return GeoMaxY; } MapLayer *GetFirstLayer() { return FirstLayer; } bool IsMultiThreadingEnabled() { return MultiThreadingEnabled; ................................................................................ { Parent->InitializeSqlFilters(db_prefix, table, read_only, geom_column); } void UpdateMapViewPoint(int fromSrid, int toSrid) { MapView->UpdateMapViewPoint(fromSrid, toSrid); } double GetMapMinX() { return MapView->GetMapMinX(); } double GetMapMinY() { return MapView->GetMapMinY(); |
| > > < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 .. 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 ... 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 ... 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 ... 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 ... 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 ... 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 .... 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 .... 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 .... 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 .... 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 .... 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 .... 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 .... 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 .... 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 .... 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 .... 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 .... 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 .... 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 .... 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 .... 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 .... 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 .... 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 .... 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 .... 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 .... 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 .... 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 .... 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 .... 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 .... 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 .... 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 .... 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 .... 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 .... 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 .... 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 .... 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 .... 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 ..... 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 ..... 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 ..... 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 ..... 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 ..... 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 ..... 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 ..... 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 ..... 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 ..... 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 ..... 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 ..... 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 ..... 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 ..... 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 |
/* / Classdef.h / class definitions for spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "wx/grid.h" #include "wx/listctrl.h" #include "wx/textctrl.h" #include "wx/propdlg.h" #include "wx/generic/propdlg.h" #include "wx/timer.h" #include "wx/string.h" #include "wx/dynlib.h" #include "config.h" #ifdef SPATIALITE_AMALGAMATION #include <spatialite/sqlite3.h> #else #include <sqlite3.h> ................................................................................ #include <spatialite/gaiaexif.h> #include <spatialite/gaiageo.h> #include <spatialite.h> #include <spatialite/gg_wfs.h> #include <spatialite/geopackage.h> #include <freexl.h> #include <virtualpg.h> #include <rasterlite2/rasterlite2.h> #include <rasterlite2/rl2wms.h> #include "rasterlite2/rl2graphics.h" // // functions for threaded queries // int SqlProgressCallback(void *arg); #if defined(__WIN32) && !defined(__MINGW32__) DWORD WINAPI DoExecuteSqlThread(void *arg); #else ................................................................................ ID_Exif, ID_GpsPics, ID_LoadXml, ID_Srids, ID_Charset, ID_Help, ID_Attach, ID_Postgres, ID_SqlLog, ID_DbStatus, ID_CheckGeom, ID_SaneGeom, ID_WFS, ID_DXF, ID_AddLayer, ................................................................................ Tree_MapRemoveAll, Tree_MapShowAll, Tree_MapHideAll, Tree_MapConfigure, Tree_MapVisible, Tree_MapFullExtent, Tree_MapLayerFullExtent, Tree_SqlSample, Tree_UrlSample, Tree_MapLayerConfigure, Tree_MapLayerInfo, Tree_QuickStyleEdit, Tree_MapRemoveLayer, Tree_MapDeleteItem, Tree_CreatePostgreSqlConn, Tree_CloseAllPostgreSqlConns, Tree_ClosePostgreSqlConn, Tree_PostgreSqlDropOrphans, Tree_PostgreSqlInfos, Grid_Clear, Grid_All, Grid_Column, Grid_Row, Grid_Copy, Grid_Blob, Grid_Delete, ................................................................................ ID_NET_FROM_TO, ID_NET_TO_FROM, ID_NET_NAME_ENABLE, ID_NET_NAME, ID_NET_A_STAR, ID_NET_DATA, ID_NET_VIRTUAL, ID_NET_OVERWRITE, ID_EXIF_PATH, ID_EXIF_FOLDER, ID_EXIF_METADATA, ID_EXIF_GPS_ONLY, ID_GPS_PICS_PATH, ID_GPS_PICS_FOLDER, ID_GPS_PICS_TABLE, ................................................................................ ID_RASTER_KEYWORD_REMOVE, ID_RASTER_KEYWORD, ID_RASTER_KEYWORD_GRID, ID_SYMBOLIZER_NAME, ID_SYMBOLIZER_TITLE, ID_SYMBOLIZER_ABSTRACT, ID_SYMBOLIZER_OPACITY, ID_SYMBOLIZER_BAND_MODE, ID_SYMBOLIZER_RED, ID_SYMBOLIZER_GREEN, ID_SYMBOLIZER_BLUE, ID_SYMBOLIZER_GRAY, ID_SYMBOLIZER_CONTRAST, ID_SYMBOLIZER_GAMMA, ID_SYMBOLIZER_MAP, ................................................................................ ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y, ID_SYMBOLIZER_FACE_SEED_FILL_COLOR, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_HEX, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_BTN, ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_HEX, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_BTN, ID_SYMBOLIZER_COLOR_MAP_MODE, ID_SYMBOLIZER_MIN_COLOR, ID_SYMBOLIZER_MIN_PICKER_HEX, ID_SYMBOLIZER_MIN_PICKER_BTN, ID_SYMBOLIZER_MAX_COLOR, ID_SYMBOLIZER_MAX_PICKER_HEX, ID_SYMBOLIZER_MAX_PICKER_BTN, ID_WMS_URL, ID_WMS_CATALOG, ID_WMS_RESET, ID_WMS_SERVER, ID_WMS_VERSION, ID_WMS_CRS, ID_WMS_STYLE, ................................................................................ ID_RASTER_STYLE, ID_RASTER_OK, ID_VECTOR_LAYER, ID_VECTOR_TYPE, ID_VECTOR_UUID, ID_VECTOR_STYLE, ID_VECTOR_OK, ID_VECTOR_COPY, ID_MIME_TYPE, ID_IMAGE_QUALITY, ID_SQL_SAMPLE, ID_TOPOGEO_LAYER, ID_TOPOGEO_SRID, ID_TOPOGEO_STYLE, ID_TOPOGEO_FACE, ID_TOPOGEO_EDGE, ID_TOPOGEO_NODE, ID_TOPOGEO_FACE_SEED, ................................................................................ ID_QUICK_STYLE_APPLY, ID_QUICK_STYLE_EXPORT, ID_QUICK_STYLE_COPY, ID_PANE_POINT, ID_PANE_LINE, ID_PANE_POLYGON, ID_PANE_TEXT, ID_PANE_CONTRAST_ENHANCEMENT, ID_PANE_CHANNEL_SELECTION, ID_PANE_COLOR_MAP, ID_PAINT_MAP_STEP, ID_PAINT_MAP_THREAD_FINISHED, ID_POSTGRES_HOST, ID_POSTGRES_HOSTADDR, ID_POSTGRES_PORT, ID_POSTGRES_DBNAME, ID_POSTGRES_USER, ID_POSTGRES_PASSWORD, ID_POSTGRES_RDONLY, ID_POSTGRES_TEXTDATES }; enum { // tree item data types MY_ROOT_NODE = 0, MY_ROOT_USERDATA, MY_ROOT_ISOMETADATA, MY_ROOT_TOPOLOGIES, MY_ROOT_NETWORKS, MY_ROOT_RASTER, MY_ROOT_VECTOR, MY_ROOT_WMS, MY_ROOT_POSTGRESQL, MY_ROOT_STYLING, MY_ROOT_METADATA, MY_ROOT_INTERNAL, MY_ROOT_RTREE, MY_TABLE, MY_VTABLE, MY_VIEW, ................................................................................ MY_FOREIGN_KEY, MY_FOREIGN_KEY_FLD, MY_INT_VARIANT, MY_DBL_VARIANT, MY_TXT_VARIANT, MY_BLOB_VARIANT, MY_NULL_VARIANT, MY_UNDEFINED, MY_POSTGRES_CONN, MY_POSTGRES_SCHEMA, MY_POSTGRES_TABLE, MY_POSTGRES_VIEW, MY_POSTGIS_VIEW, MY_POSTGRES_COLUMN, MY_POSTGIS_GEOMETRY }; enum { // control IDs for timers ID_AUTO_SAVE_TIMER = 20000, ID_DB_STATUS_TIMER, ................................................................................ int Type; // the object type int SubType; // the object sub-type wxString DbAlias; // the DB alias [Attached DB] wxString MainName; // the object name [usually: table name] wxString ColName; // the column name [optional] wxString PathOrURL; // the Path or request URL [optional] bool Restricted; // not editable // PostgreSQL specific wxString Host; wxString HostAddr; int Port; wxString DbName; wxString User; wxString Schema; wxString Name; wxString Column; wxString VirtName; bool ReadOnly; bool PK; bool Select; bool InsertUpdateDelete; public: MyObject(int type); MyObject(int type, wxString & dbAlias); MyObject(int type, wxString & dbAlias, wxString & name, bool restricted = false); MyObject(int type, wxString & dbAlias, wxString & name, wxString & column); MyObject(int type, wxString & dbAlias, wxString & name, wxString & column, wxString & path_or_url); MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly); MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, wxString & schema); MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, wxString & schema, wxString & name, wxString & virtname, bool readOnly, bool pk, bool select, bool insertUpdateDelete); MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, wxString & schema, wxString & name, wxString & column, wxString & virtname); virtual ~ MyObject() {; } int GetType() { return Type; } ................................................................................ { return ColName; } wxString & GetPathOrURL() { return PathOrURL; } wxString & GetHost() { return Host; } wxString & GetHostAddr() { return HostAddr; } int GetPort() { return Port; } wxString & GetDbName() { return DbName; } wxString & GetUser() { return User; } wxString & GetSchema() { return Schema; } wxString & GetName() { return Name; } wxString & GetColumn() { return Column; } wxString & GetVirtName() { return VirtName; } bool IsReadOnly() { return ReadOnly; } bool HasPK() { return PK; } bool CanSelect() { return Select; } bool CanInsertUpdateDelete() { return InsertUpdateDelete; } bool IsTable(); bool IsView(); bool IsTemporary(); bool IsEditable(); bool IsAttachedDB(); bool IsRootAttached(); bool IsAttached(); ................................................................................ bool IsIndex(); bool IsIndexColumn(); bool IsTrigger(); bool IsPrimaryKey(); bool IsPrimaryKeyColumn(); bool IsForeignKey(); bool IsForeignKeyColumn(); bool IsPostgreSQL(); }; class MyColumnInfo { // // a class to store a DB column // ................................................................................ wxTreeItemId RootTopologies; wxTreeItemId RootNetworks; wxTreeItemId RootRasterCoverages; wxTreeItemId RootVectorCoverages; wxTreeItemId RootStyling; wxTreeItemId RootWMS; wxTreeItemId RootIsoMetadata; wxTreeItemId RootPostgreSQL; TopoGeoList Topologies; TopoNetList Networks; RasterCoverageList RasterCoverages; VectorCoverageList VectorCoverages; WmsLayerList WmsLayers; TopoGeoList AltTopologies; TopoNetList AltNetworks; ................................................................................ wxString CurrentVectorCoverageName; wxString CurrentWmsLayerURL; wxString CurrentWmsLayerName; void ExpandTable(wxTreeItemId & item); void ExpandView(wxTreeItemId & item); void ExpandAttachedTable(wxTreeItemId & item); void ExpandAttachedView(wxTreeItemId & item); void ExpandPostgresTable(wxTreeItemId & item); void ExpandPostGisView(wxTreeItemId & item); // context menus void DoRootRasterCoveragesContextMenu(wxPoint & pt); void DoRootVectorCoveragesContextMenu(wxPoint & pt); void DoRootWmsLayersContextMenu(wxPoint & pt); void DoRootTopoGeoContextMenu(wxPoint & pt); void DoRootTopoNetContextMenu(wxPoint & pt); void DoRootStylingContextMenu(wxPoint & pt); void DoRootPostgreSqlContextMenu(wxPoint & pt); void DoRootOthersContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedDbContextMenu(wxPoint & pt, MyObject * obj); void DoRootAttachedContextMenu(wxPoint & pt, MyObject * obj); void DoGenericAttachedContextMenu(wxPoint & pt, wxString & title); void DoTopoGeoContextMenu(wxPoint & pt, wxString & name); void DoTopoNetContextMenu(wxPoint & pt, wxString & name); void DoRasterCoverageContextMenu(wxPoint & pt, wxString & name); ................................................................................ void DoAttachedPrimaryKeyContextMenu(wxPoint & pt, MyObject * obj); void DoMainPrimaryKeyColumnContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedPrimaryKeyColumnContextMenu(wxPoint & pt, MyObject * obj); void DoMainForeignKeyContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedForeignKeyContextMenu(wxPoint & pt, MyObject * obj); void DoMainForeignKeyColumnContextMenu(wxPoint & pt, MyObject * obj); void DoAttachedForeignKeyColumnContextMenu(wxPoint & pt, MyObject * obj); void DoPostgreSqlContextMenu(wxPoint & pt, MyObject * obj); void DoPostgresConnContextMenu(wxPoint & pt, MyObject * obj); void DoPostgresSchemaContextMenu(wxPoint & pt, MyObject * obj); void DoPostgresTableContextMenu(wxPoint & pt, MyObject * obj); void DoPostgresViewContextMenu(wxPoint & pt, MyObject * obj); void DoPostGisViewContextMenu(wxPoint & pt, MyObject * obj); void DoPostgresColumnContextMenu(wxPoint & pt, MyObject * obj); void DoPostGisGeometryContextMenu(wxPoint & pt, MyObject * obj); public: MyTableTree() {; } MyTableTree(MyFrame * parent, wxWindowID id = wxID_ANY); virtual ~ MyTableTree(); void SetPath(wxString & path) ................................................................................ wxTreeItemId & GetRootNode(wxString & tableName, bool * restricted, bool * tile_data); wxTreeItemId & GetAltRootNode(wxString & tableName, RootNodes * nodes, bool * tile_data); void AddTable(wxString & tableName, bool virtualTable, bool geometry); void AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry); void AddTmpMetadata(wxString & tableName); void AddGeoPackageTable(wxString & tableName); void AddGeoPackageTable(wxString & dbAlias, wxString & tableName, RootNodes * nodes); void AddGeoPackageVirtualTable(wxString & tableName); void AddGeoPackageVirtualTable(wxString & dbAlias, wxString & tableName, RootNodes * nodes); void AddFdoOgrTable(wxString & tableName); ................................................................................ wxTreeItemId & AddAttached(wxString & dbAlias, wxString & path); void AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry, RootNodes * list); void AddView(wxString & viewName, bool geometry); void AddView(wxString & dbAlias, wxString & viewName, bool geometry); void AddView(wxString & dbAlias, wxString & viewName, bool geometry, RootNodes * list); void AddPostgresTable(class MyPostgres * list, wxString & virtName); void ExpandRoot() { Expand(Root); Expand(RootUserData); CollapseAllChildren(RootTopologies); CollapseAllChildren(RootNetworks); CollapseAllChildren(RootRasterCoverages); CollapseAllChildren(RootVectorCoverages); CollapseAllChildren(RootStyling); CollapseAllChildren(RootWMS); CollapseAllChildren(RootPostgreSQL); CollapseAllChildren(RootIsoMetadata); Collapse(RootMetadata); Collapse(RootInternal); Collapse(RootSpatialIndex); } void AddTopology(TopoGeoSet * topology) { ................................................................................ { AltRasterCoverages.Flush(); } void DeleteAltVectorCoverages(void) { AltVectorCoverages.Flush(); } void AddPostgresConnection(int num, class MyPostgresConn * conn, wxTreeItemId & itemId); void AddPostgresSchema(wxTreeItemId & parent, MyPostgresConn * conn, wxString & schema, wxTreeItemId & itemId); void AddPostgresTable(wxTreeItemId & parent, MyPostgresConn * conn, wxString & schema, wxString & table, wxString & virtName); void AddPostgresView(wxTreeItemId & parent, MyPostgresConn * conn, wxString & schema, wxString & view, wxString & virtName); void AddPostGisView(wxTreeItemId & parent, MyPostgresConn * conn, wxString & schema, wxString & table, wxString & geometry, wxString & virtName); sqlite3 *GetSQLiteHandle(); void OnSelChanged(wxTreeEvent & event); void OnRightClick(wxTreeEvent & event); void OnCmdQueryViewComposer(wxCommandEvent & event); void OnCmdCloneTable(wxCommandEvent & event); void OnCmdNewTable(wxCommandEvent & event); void OnCmdNewView(wxCommandEvent & event); ................................................................................ void OnCmdDumpCsv(wxCommandEvent & event); void OnCmdDumpHtml(wxCommandEvent & event); void OnCmdDumpDif(wxCommandEvent & event); void OnCmdDumpSylk(wxCommandEvent & event); void OnCmdDumpDbf(wxCommandEvent & event); void OnCmdDumpPostGIS(wxCommandEvent & event); void OnCmdEdit(wxCommandEvent & event); void OnCmdCreatePostgreSqlConn(wxCommandEvent & event); void OnCmdCloseAllPostgreSqlConns(wxCommandEvent & event); void OnCmdClosePostgreSqlConn(wxCommandEvent & event); void OnCmdPostgreSqlDropOrphans(wxCommandEvent & event); void OnCmdPostgreSqlInfos(wxCommandEvent & event); bool DropRenameAux1(MyObject * obj, class GeomColsList * geometries, bool * autoincrement); void DropRenameAux2(MyObject * obj, GeomColsList * geometries, wxString & aliasTable, wxString & new_column, wxString & renameSql, wxString & dropSql, wxString & disableSpatialIdxSql, wxString & dropSpatialIdxSql, ................................................................................ void AddEntity(sqlite3_int64 rowid, int severity, bool CanFix, wxString & error, wxString & geosMsg); MalformedGeom *GetFirst() { return First; } }; class PostgresConnectionDialog:public wxDialog { // // a dialog for connecting to a PosgreSQL DBMS // private: MyFrame * MainFrame; char *host; char *hostaddr; unsigned int port; char *dbname; char *user; char *password; bool ReadOnly; bool TextDates; public: PostgresConnectionDialog() { host = NULL; hostaddr = NULL; port = 5432; dbname = NULL; user = NULL; password = NULL; ReadOnly = true; TextDates = true; } virtual ~ PostgresConnectionDialog() { if (host != NULL) free(host); if (hostaddr != NULL) free(hostaddr); if (dbname != NULL) free(dbname); if (user != NULL) free(user); if (password != NULL) free(password); } bool Create(MyFrame * parent); void CreateControls(); const char *GetHost() { return host; } const char *GetHostAddr() { return hostaddr; } int GetPort() { return port; } const char *GetDbName() { return dbname; } const char *GetUser() { return user; } const char *GetPassword() { return password; } bool IsReadOnly() { return ReadOnly; } bool IsTextDates() { return TextDates; } void OnOk(wxCommandEvent & event); }; class SanitizeAllGeometriesDialog:public wxDialog { // // a dialog supporting Sanitize All Geometries // private: ................................................................................ class TableViewItem { // // an ancillary class wrapping Tables and Views // private: wxString DbName; wxString Name; bool View; bool Virtual; bool Geometry; bool GeoPackageGeometry; bool GeoPackageVirtualGeometry; bool FdoOgrGeometry; bool FdoOgrVirtualGeometry; TableViewItem *Next; public: TableViewItem(wxString & db, wxString & name); TableViewItem(wxString & name, bool is_view, bool is_virtual); ~TableViewItem() {; } wxString & GetDbName() { return DbName; } wxString & GetName() { return Name; } bool IsView() { ................................................................................ { FdoOgrVirtualGeometry = true; } bool IsFdoOgrVirtualGeometry() { return FdoOgrVirtualGeometry; } bool IsPostgresTable(class MyPostgres * list); bool IsTmpMetadata(); void SetNext(TableViewItem * next) { Next = next; } TableViewItem *GetNext() { return Next; ................................................................................ TableViewItem * First; TableViewItem *Last; int Count; TableViewItem **Sorted; public: TableViewList(); ~TableViewList(); void Add(wxString & db, wxString & name); void Add(wxString & name, bool isView, bool isVirtual); void PrepareSorted(); void SetGeometry(wxString & name); void SetGeoPackageGeometry(wxString & name); void SetGeoPackageVirtualGeometry(wxString & name); void SetFdoOgrGeometry(wxString & name); void SetFdoOgrVirtualGeometry(wxString & name); ................................................................................ void AddGeoTable(wxString & db_prefix, wxString & table_name, int type); MyAttachedTable *FindGeoTable(wxString & db_prefix, wxString & name); MyAttachedDB *GetFirst() { return First; } }; class MyPostgresCol { // // a PostgreSQL Column // private: wxString Name; bool PK; MyPostgresCol *Next; public: MyPostgresCol(wxString & name) { Name = name; PK = false; Next = NULL; } ~MyPostgresCol() {; } wxString & GetName() { return Name; } void SetPK() { PK = true; } bool IsPK() { return PK; } void SetNext(MyPostgresCol * next) { Next = next; } MyPostgresCol *GetNext() { return Next; } }; class MyPostgresColumns { // // a list of PostgreSQL Columns // private: MyPostgresCol * First; MyPostgresCol *Last; public: MyPostgresColumns() { First = NULL; Last = NULL; } ~MyPostgresColumns(); void Add(wxString & name); void SetPK(wxString & name); MyPostgresCol *GetFirst() { return First; } char *BuildWhere(); }; class MyPostGisGeometry { // // a PostGIS Geometry column // private: wxString Name; wxString GeomType; bool MultiType; int Srid; int Dims; MyPostGisGeometry *Next; public: MyPostGisGeometry(wxString & name, wxString & type, int srid, int dims); ~MyPostGisGeometry() {; } wxString & GetName() { return Name; } wxString & GetGeomType() { return GeomType; } bool IsMultiType() { return MultiType; } int GetSrid() { return Srid; } int GetDims() { return Dims; } void SetNext(MyPostGisGeometry * next) { Next = next; } MyPostGisGeometry *GetNext() { return Next; } }; class MyPostgresPK { // // a ProgresSQL PK column // private: wxString Name; MyPostgresPK *Next; public: MyPostgresPK(wxString & name) { Name = name; Next = NULL; } ~MyPostgresPK() {; } wxString & GetName() { return Name; } void SetNext(MyPostgresPK * next) { Next = next; } MyPostgresPK *GetNext() { return Next; } }; class MyPostgresTable { // // a PostgreSQL Table // private: wxString Name; wxString VirtName; wxString PostGisName; bool PkChecked; bool GrantSelect; bool GrantInsertUpdateDelete; MyPostgresPK *FirstPK; MyPostgresPK *LastPK; MyPostGisGeometry *First; MyPostGisGeometry *Last; MyPostgresTable *Next; public: MyPostgresTable(wxString & name); ~MyPostgresTable(); wxString & GetName() { return Name; } void SetVirtName(wxString & name) { VirtName = name; } wxString & GetVirtName() { return VirtName; } void SetPostGisName(wxString & name) { PostGisName = name; } wxString & GetPostGisName() { return PostGisName; } void Add(wxString & geometry, wxString & type, int srid, int dims); void AddPK(wxString & column); MyPostGisGeometry *Find(wxString & column); bool IsPkColumn(wxString & column); bool HasPK(); void SetGrants(bool grantSelect, bool granInsertUpdateDelete) { GrantSelect = grantSelect; GrantInsertUpdateDelete = granInsertUpdateDelete; } bool CanSelect() { return GrantSelect; } bool CanInsertUpdateDelete() { return GrantInsertUpdateDelete; } bool IsPkAlreadyChecked() { return PkChecked; } void SetPkChecked() { PkChecked = true; } MyPostgresPK *GetFirstPK() { return FirstPK; } MyPostGisGeometry *GetFirst() { return First; } void SetNext(MyPostgresTable * next) { Next = next; } MyPostgresTable *GetNext() { return Next; } }; class MyPostgresView { // // a PostgreSQL View // private: wxString Name; wxString VirtName; bool GrantSelect; bool GrantInsertUpdateDelete; MyPostgresView *Next; public: MyPostgresView(wxString & name); ~MyPostgresView() {; } wxString & GetName() { return Name; } void SetVirtName(wxString & name) { VirtName = name; } wxString & GetVirtName() { return VirtName; } void SetGrants(bool grantSelect, bool granInsertUpdateDelete) { GrantSelect = grantSelect; GrantInsertUpdateDelete = granInsertUpdateDelete; } bool CanSelect() { return GrantSelect; } bool CanInsertUpdateDelete() { return GrantInsertUpdateDelete; } void SetNext(MyPostgresView * next) { Next = next; } MyPostgresView *GetNext() { return Next; } }; class MyPostgresSchema { // // a PostgreSQL Schema // private: wxString Name; wxTreeItemId TreeNode; MyPostgresTable *FirstTable; MyPostgresTable *LastTable; MyPostgresTable *CurrentTable; MyPostgresView *FirstView; MyPostgresView *LastView; MyPostgresSchema *Next; public: MyPostgresSchema(wxString & name); ~MyPostgresSchema(); wxString & GetName() { return Name; } void Add(wxString & name, wxString & geometry, wxString & type, int srid, int dims); void Add(wxString & name); void SetTreeNode(wxTreeItemId & node) { TreeNode = node; } wxTreeItemId & GetTreeNode() { return TreeNode; } MyPostgresTable *GetFirstTable() { return FirstTable; } MyPostgresView *GetFirstView() { return FirstView; } void SetNext(MyPostgresSchema * next) { Next = next; } MyPostgresSchema *GetNext() { return Next; } }; class MyPostgresConn { // // a connection to some PosgreSQL DBMS // private: wxString Host; wxString HostAddr; int Port; wxString DbName; wxString User; bool ReadOnly; bool TextDates; wxString ConnectionString; MyPostgresSchema *First; MyPostgresSchema *Last; MyPostgresSchema *Current; MyPostgresConn *Prev; MyPostgresConn *Next; public: MyPostgresConn(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly, bool textDates); ~MyPostgresConn(); wxString & GetHost() { return Host; } wxString & GetHostAddr() { return HostAddr; } int GetPort() { return Port; } wxString & GetDbName() { return DbName; } wxString & GetUser() { return User; } bool IsReadOnly() { return ReadOnly; } bool IsTextDates() { return TextDates; } void SetConnectionString(const char *connection_string) { ConnectionString = wxString::FromUTF8(connection_string); } wxString & GetConnectionString() { return ConnectionString; } MyPostgresSchema *Add(wxString & schema); void Add(wxString & schema, wxString & table, wxString & geometry, wxString & type, int srid, int dims); void Add(wxString & schema, wxString & view); MyPostgresSchema *GetFirst() { return First; } void SetPrev(MyPostgresConn * conn) { Prev = conn; } MyPostgresConn *GetPrev() { return Prev; } void SetNext(MyPostgresConn * conn) { Next = conn; } MyPostgresConn *GetNext() { return Next; } }; class MyPostgres { // // general container for all PostgreSQL connections // private: MyPostgresConn * First; MyPostgresConn *Last; MyPostgresConn *Current; public: MyPostgres() { First = NULL; Last = NULL; Current = NULL; } ~MyPostgres() { Clear(); } void Clear(); MyPostgresConn *Insert(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly, bool textDates); MyPostgresConn *Find(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user); MyPostgresTable *FindTable(class MyFrame * parent, wxString & virtName); MyPostgresTable *FindPostGisView(class MyFrame * parent, wxString & virtName); void Remove(MyPostgresConn * conn); bool CheckUniqueVirtName(wxString & virtName); void MakeUniqueVirtName(wxString & baseName, wxString & uniqueName); MyPostgresConn *GetFirst() { return First; } }; class MyFrame:public wxFrame { // // the main GUI frame // private: ................................................................................ wxBitmap *BtnSqlLog; // button icon for SQL LOG wxBitmap *BtnDbStatus; // button icon for DB STATUS wxBitmap *BtnCheckGeom; // button icon for CheckGeom wxBitmap *BtnSaneGeom; // button icon for SaneGeom wxBitmap *BtnWFS; // button icon for WFS wxBitmap *BtnDXF; // button icon for DXF wxBitmap *BtnMap; // button icon for Map Panel wxBitmap *BtnPostgres; // button icon for PostgreSQL rl2WmsCachePtr WmsCache; // internal WMS Cache bool ReadOnlyConnection; // AutoSave timer int AutoSaveInterval; int LastTotalChanges; wxTimer *TimerAutoSave; gaiaGeomCollPtr GeomFromPoint(gaiaPointPtr pt, int srid); ................................................................................ rl2PixelPtr ParseNoData(wxString & NoData, int SampleType, int PixelType, int NumBands); char *GetNum(const char *start, const char *end); bool IsValidSqliteFile(wxString & path); void DoUpdateRL2MaxThreads(); void DoAutoDetachDatabases(); CurrentSqlFilters SqlFilters; MyPostgres PostgresList; virtualPQ VirtualPQapi; wxDynamicLibrary DynamicLibPQ; wxString PathLibPQ; bool VirtualPQapiOK; void DoInitVirtualPQapi(); void DoLocateLibPQ(wxString & path); void DoLoadLibPQ(wxString & path); bool DoCheckPostgres(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user); bool DoInitPostgres(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly, bool textDates, const char *conninfo); void DoSetUniqueVirtNames(); void DoCreatePostgresTables(); void DoDropPostgresTables(); char *DoCreatePostGisSpatialView(MyPostgresTable * table, char *sql); void DoCreatePostGisSpatialViewTriggers(MyPostgresConn * conn, MyPostgresSchema * schema, MyPostgresTable * table); void GetPQlibVersion(wxString & ver); void DoCreatePostgreSqlNodes(); MyPostgresColumns *DoGetPostgresColumns(MyPostgresTable * table); void DoCheckGrantPermissions(void *pg_conn, wxString & user, MyPostgresSchema * schema, MyPostgresTable * table); void DoCheckGrantPermissions(void *pg_conn, wxString & user, MyPostgresSchema * schema, MyPostgresView * view); public: MyFrame(const wxString & title, const wxPoint & pos, const wxSize & size); virtual ~ MyFrame(); enum VectorTypes { VECTOR_UNKNOWN = 0, VECTOR_GEOTABLE, ................................................................................ bool CreateDB(); void CloseDB(); void InitializeSpatialMetadata(); void AutoFDOStart(); void AutoFDOStop(); void AutoGPKGStart(); void AutoGPKGStop(); void AutoPostgresStop(); bool DoClosePostgreSqlConn(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user); char *DropPostgreSqlOrphans(); void DoInitVirtualPG(); void InitTableTree(); void LoadHistory(); bool HasHistory(); void ListAttached(); void AutoFDOStart(wxString & dbAlias, MyAttachedDB * db); void AutoFDOStop(wxString & dbAlias); void AutoGPKGStart(wxString & dbAlias, MyAttachedDB * db); ................................................................................ wxString & charset, char decimal_point, bool date_time); void ExportResultSetAsSylk(wxString & path, wxString & sql, wxString & charset, bool date_time); void ExportResultSetAsDbf(wxString & path, wxString & sql, wxString & charset); void GetHelp(wxString & html); void FeedZipHtml(unsigned char *zip, int offset, const char *data); wxString *GetColumnNames(wxString & table, int *columns); void SetLastDirectory(wxString & path) { LastDirectory = path; } wxString & GetLastDirectory() { ................................................................................ MyResultSetView *GetRsView() { return RsView; } wxString *GetTables(int *cnt); wxString *GetTableColumns(wxString & dbPrefix, wxString & table, int *cnt); wxString *GetTableGeometries(wxString & dbPrefix, wxString & table, int *cnt); void ImportExifPhotos(wxString & path, bool folder, bool metadata, bool gps_only); void ImportGpsPhotos(wxString & path, bool folder, wxString & table, wxString & geometry, bool update_statistics, bool spatial_index); void ImportXmlDocuments(wxString & path, bool folder, wxString & suffix, wxString & table, wxString & pkName, ................................................................................ wxString & xmlColumn, wxString & inPathColumn, wxString & schemaColumn, wxString & parseErrColumn, wxString & validateErrColumn, int compressed, const char *schemaURI, bool isInternaleSchemaUri); void ImportDXFfiles(wxString & path, bool folder, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append); bool CheckExifTables(); int ExifLoadDir(wxString & path, bool gps_only, bool metadata); int ExifLoadFile(wxString & path, bool gps_only, bool metadata); bool UpdateExifTables(unsigned char *blob, int sz, gaiaExifTagListPtr tag_list, bool metadata, wxString & path); bool CheckGpsPicsTable(wxString & table, wxString & geometry, bool rtree); ................................................................................ double *miny, double *maxx, double *maxy); void DoRegisterWMS(); void DoCreateTopoGeo(); void DoCreateTopoNet(); void MapPanelClosing(); void CreateNetwork(wxString & table, wxString & from, wxString & to, bool isNoGeometry, wxString & geom, bool isNameEnabled, wxString & name, bool isGeomLength, wxString & cost, bool isBidirectional, bool isOneWays, wxString & oneWayFromTo, wxString & oneWayToFrom, bool aStarSupported, wxString & dataTableName, wxString & virtualTableName, bool overwrite); void GetLastRoutingError(wxString & errCause); bool HasPostgreSqlConnections(); void DoPostgreSqlConnection(); bool DoCheckPostGisGeometry(wxString & virtName, wxString & columnName); MyPostgresTable *FindPostgresTable(wxString & virtName) { return PostgresList.FindTable(this, virtName); } MyPostgresTable *FindPostGisView(wxString & virtName) { return PostgresList.FindPostGisView(this, virtName); } void InitPostgresPkColumns(MyPostgresConn * conn, MyPostgresSchema * schema, MyPostgresTable * table); void InitPostgresPks(void *conn, MyPostgresSchema * schema, MyPostgresTable * table); void OnQuit(wxCommandEvent & event); void OnClose(wxCloseEvent & event); void OnAbout(wxCommandEvent & event); void OnConnect(wxCommandEvent & event); void OnConnectReadOnly(wxCommandEvent & event); void OnCreateNew(wxCommandEvent & event); void OnDisconnect(wxCommandEvent & event); void OnMemoryDbLoad(wxCommandEvent & event); void OnMemoryDbNew(wxCommandEvent & event); void OnMemoryDbClock(wxCommandEvent & event); void OnMemoryDbSave(wxCommandEvent & event); void OnVacuum(wxCommandEvent & event); void OnPostgreSQL(wxCommandEvent & event) { DoPostgreSqlConnection(); } void OnMapPanel(wxCommandEvent & event); void OnSqlScript(wxCommandEvent & event); void OnQueryViewComposer(wxCommandEvent & event); void OnCharset(wxCommandEvent & event); void OnLoadShp(wxCommandEvent & event); void OnLoadTxt(wxCommandEvent & event); void OnLoadDbf(wxCommandEvent & event); ................................................................................ wxString dbPrefix; wxString inTable; public: CloneTableDialog() { MainFrame = NULL; } CloneTableDialog(MyFrame * parent, wxString & dbPrefix, wxString & inTable) { Create(parent, dbPrefix, inTable); } bool Create(MyFrame * parent, wxString & dbPrefix, wxString & inTable); virtual ~ CloneTableDialog() {; } ................................................................................ public: LoadXLDialog() {; } LoadXLDialog(MyFrame * parent, wxString & path, wxString & table); bool Create(MyFrame * parent, wxString & path, wxString & table); virtual ~ LoadXLDialog() { if (Worksheets != NULL) delete[]Worksheets; } void CreateControls(); wxString & GetTable() { return Table; } int GetWorksheetIndex() ................................................................................ wxString OneWayToFrom; // the OneWay To-From column wxString OneWayFromTo; // the OneWay From-To column bool NameEnabled; // Name column supported wxString NameColumn; // the Name column name bool AStarSupported; // A* algorithm supported wxString DataTable; // name of the binary data table wxString VirtualTable; // name of the VirtualNetwork table bool Overwrite; // enabled to overwrite existing tables void SetCurrentTable(); public: NetworkDialog() {; } NetworkDialog(MyFrame * parent); bool Create(MyFrame * parent); virtual ~ NetworkDialog() ................................................................................ wxString & GetDataTable() { return DataTable; } wxString & GetVirtualTable() { return VirtualTable; } bool IsOverwriteEnabled() { return Overwrite; } void OnTable(wxCommandEvent & event); void OnDirection(wxCommandEvent & event); void OnCost(wxCommandEvent & event); void OnOneWay(wxCommandEvent & event); void OnNameEnabled(wxCommandEvent & event); void OnNoGeometry(wxCommandEvent & event); void OnOverwrite(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class ExifDialog:public wxDialog { // // a dialog preparing an IMPORT EXIF PHOTOS ................................................................................ int blob_size, wxWindow * panel, wxWindowID id, const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize, long style = 0); virtual ~ MyHexList(); virtual wxString OnGetItemText(long item, long column) const; }; class AutoFDOTable { private: char *Name; AutoFDOTable *Next; public: AutoFDOTable(const char *name, const int len) ................................................................................ {; } virtual ~ WmsServersDialog() { if (List != NULL) delete[]List; } bool Create(MyFrame * grandparent); void CreateControls(); wxString & GetURL() { return URL; } void OnUrlSelected(wxCommandEvent & event); void OnOk(wxCommandEvent & event); ................................................................................ unsigned char ParseHex(const char *byte); void DoConfigureWmsLayer(); void DoConfigureMapLayer(); public: WmsLayerConfigDialog() {; } virtual ~ WmsLayerConfigDialog(); bool Create(MyFrame * parent, wxString url, wxString layer); bool Create(MyMapPanel * parent, MapLayer * layer); void CreateControls(); void LoadData(); void InitData(); void FindMaxVersion(); void PopulateRefSys(wxComboBox * crsList); ................................................................................ bool ConfigChanged() { return IsConfigChanged; } void OnOk(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class VectorSqlSampleDialog:public wxDialog { // // a dialog for configuring an SQL Map Request // based on some Vector Layer // private: MyFrame * MainFrame; MyMapPanel *MapPanel; MapLayer *Layer; wxString DbPrefix; wxString LayerName; char *Style; wxColour BgColor; wxString Sql; void GetButtonBitmap(wxColour & bgcolor, wxBitmap & bmp); void DoUpdateSql(); public: VectorSqlSampleDialog() {; } virtual ~ VectorSqlSampleDialog() { if (Style != NULL) free(Style); } bool Create(MyMapPanel * parent, MapLayer * layer); void CreateControls(); void InitData(); void PopulateStyles(wxComboBox * stlList); void OnStyleChanged(wxCommandEvent & event); void OnMimeTypeChanged(wxCommandEvent & event); void OnQualityChanged(wxCommandEvent & event); void OnTransparentChanged(wxCommandEvent & event); void OnBackgroundChanged(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class RasterSqlSampleDialog:public wxDialog { // // a dialog for configuring an SQL Map Request // based on some Raster Layer // private: MyFrame * MainFrame; MyMapPanel *MapPanel; MapLayer *Layer; wxString DbPrefix; wxString LayerName; char *Style; wxColour BgColor; wxString Sql; void GetButtonBitmap(wxColour & bgcolor, wxBitmap & bmp); void DoUpdateSql(); public: RasterSqlSampleDialog() {; } virtual ~ RasterSqlSampleDialog() { if (Style != NULL) free(Style); } bool Create(MyMapPanel * parent, MapLayer * layer); void CreateControls(); void InitData(); void PopulateStyles(wxComboBox * stlList); void OnStyleChanged(wxCommandEvent & event); void OnMimeTypeChanged(wxCommandEvent & event); void OnQualityChanged(wxCommandEvent & event); void OnTransparentChanged(wxCommandEvent & event); void OnBackgroundChanged(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class WmsSqlSampleDialog:public wxDialog { // // a dialog for configuring an SQL Map Request // based on some WMS Layer // private: MyFrame * MainFrame; MyMapPanel *MapPanel; MapLayer *Layer; bool RequestURL; wxString Url; wxString DbPrefix; wxString LayerName; char *Version; char *MaxVersion; char *Style; char *ImageFormat; char *BgColor; int Transparent; wxString Sql; void GetButtonBitmap(const char *color, wxBitmap & bmp); void ParseBgColor(const char *color, unsigned char *red, unsigned char *green, unsigned char *blue); unsigned char ParseHex(const char *byte); void DoUpdateSql(); void DoUpdateUrl(); int CheckMarker(wxString & url); int DoQueryWmsCoverage(const char *db_prefix, const char *cvg_name, int srid, char **url, int *swap_axes); public: WmsSqlSampleDialog() {; } virtual ~ WmsSqlSampleDialog(); bool Create(MyMapPanel * parent, MapLayer * layer, bool request_url = false); void CreateControls(); void InitData(); void FindMaxVersion(); void PopulateImageFormats(wxComboBox * fmtList); void PopulateStyles(wxComboBox * stlList); void OnStyleChanged(wxCommandEvent & event); void OnMimeTypeChanged(wxCommandEvent & event); void OnVersionChanged(wxCommandEvent & event); void OnTransparentChanged(wxCommandEvent & event); void OnBgColorChanged(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class TopologyLayerConfigDialog:public wxDialog { // // a dialog for configuring a TopoGeo Layer // private: ................................................................................ void UpdateXmlStyle(); const char *GetXmlStyle() { return XmlStyle; } const unsigned char *CloneXmlStyle(); }; class QuickStyleRasterObj { // // a class wrapping a Quick Style - Raster // private: char UUID[64]; bool MinScaleEnabled; bool MaxScaleEnabled; double ScaleMin; double ScaleMax; double Opacity; bool Normalize; bool Histogram; bool Gamma; double GammaValue; bool TripleBand; bool SingleBand; unsigned char RedBand; unsigned char GreenBand; unsigned char BlueBand; unsigned char GrayBand; bool SrtmColorMap; bool TerrainColorMap; bool NdviColorMap; bool ColorRamp; double MinValue; char MinValueColor[8]; double MaxValue; char MaxValueColor[8]; bool ShadedRelief; double ShadedReliefFactor; char *XmlStyle; char *DoCreateRasterXML(); char *DoCreatePredefinedSrtmStyle(char *base_xml); char *DoCreatePredefinedTerrainStyle(char *base_xml); char *DoCreatePredefinedNdviStyle(char *base_xml); public: QuickStyleRasterObj(); ~QuickStyleRasterObj() { if (XmlStyle) sqlite3_free(XmlStyle); } QuickStyleRasterObj *Clone(); bool Compare(QuickStyleRasterObj * style); const char *GetUUID() { return UUID; } void EnableMinScale(bool mode) { MinScaleEnabled = mode; } bool IsMinScaleEnabled() { return MinScaleEnabled; } void EnableMaxScale(bool mode) { MaxScaleEnabled = mode; } bool IsMaxScaleEnabled() { return MaxScaleEnabled; } void SetScaleMin(double x) { ScaleMin = x; } double GetScaleMin() { return ScaleMin; } void SetScaleMax(double x) { ScaleMax = x; } double GetScaleMax() { return ScaleMax; } void SetOpacity(double x) { Opacity = x; } double GetOpacity() { return Opacity; } void SetNormalize(bool mode) { Normalize = mode; } bool IsNormalize() { return Normalize; } void SetHistogram(bool mode) { Histogram = mode; } bool IsHistogram() { return Histogram; } void SetGamma(bool mode) { Gamma = mode; } bool IsGamma() { return Gamma; } void SetGammaValue(double value) { GammaValue = value; } double GetGammaValue() { return GammaValue; } void SetTripleBand(bool mode) { TripleBand = mode; } bool IsTripleBand() { return TripleBand; } void SetSingleBand(bool mode) { SingleBand = mode; } bool IsSingleBand() { return SingleBand; } void SetRedBand(unsigned char red) { RedBand = red; } unsigned char GetRedBand() { return RedBand; } void SetGreenBand(unsigned char green) { GreenBand = green; } unsigned char GetGreenBand() { return GreenBand; } void SetBlueBand(unsigned char blue) { BlueBand = blue; } unsigned char GetBlueBand() { return BlueBand; } void SetGrayBand(unsigned char gray) { GrayBand = gray; } unsigned char GetGrayBand() { return GrayBand; } void SetSrtmColorMap(bool mode) { SrtmColorMap = mode; } bool IsSrtmColorMap() { return SrtmColorMap; } void SetTerrainColorMap(bool mode) { TerrainColorMap = mode; } bool IsTerrainColorMap() { return TerrainColorMap; } void SetNdviColorMap(bool mode) { NdviColorMap = mode; } bool IsNdviColorMap() { return NdviColorMap; } void SetColorRamp(bool mode) { ColorRamp = mode; } bool IsColorRamp() { return ColorRamp; } void SetMinValue(double x) { MinValue = x; } double GetMinValue() { return MinValue; } void SetMinValueColor(const char *x) { strcpy(MinValueColor, x); } const char *GetMinValueColor() { return MinValueColor; } void SetMaxValue(double x) { MaxValue = x; } double GetMaxValue() { return MaxValue; } void SetMaxValueColor(const char *x) { strcpy(MaxValueColor, x); } const char *GetMaxValueColor() { return MaxValueColor; } void SetShadedRelief(bool mode) { ShadedRelief = mode; } bool IsShadedRelief() { return ShadedRelief; } void SetShadedReliefFactor(double x) { ShadedReliefFactor = x; } double GetShadedReliefFactor() { return ShadedReliefFactor; } char *CreateXmlStyle(); void UpdateXmlStyle(); const char *GetXmlStyle() { return XmlStyle; } unsigned char *CloneXmlStyle(); }; class QuickStyleVectorDialog:public wxPropertySheetDialog { // // a dialog for configuring a Quick Style (Vector) // private: ................................................................................ void OnCmdColorHalo2Picker(wxCommandEvent & event); void OnCmdIsRepeatedChanged(wxCommandEvent & event); void OnCmdIsAlignedChanged(wxCommandEvent & event); void OnCmdGeneralizeLineChanged(wxCommandEvent & event); void OnFont1Changed(wxCommandEvent & event); void OnFont2Changed(wxCommandEvent & event); }; class QuickStyleRasterDialog:public wxPropertySheetDialog { // // a dialog for configuring a Quick Style (Raster) // private: MyFrame * MainFrame; MyMapPanel *MapPanel; MapLayer *Layer; wxString DbPrefix; wxString LayerName; bool CanApplyContrastEnhancement; bool IsMultiband; unsigned char NumBands; unsigned char RedBand; unsigned char GreenBand; unsigned char BlueBand; unsigned char GrayBand; bool CanApplyColorMap; bool CanApplyNDVI; double MinPixelValue; double MaxPixelValue; bool CanApplyShadedRelief; QuickStyleRasterObj *Style; bool IsConfigChanged; int PageContrastEnhancementIndex; int PageChannelSelectionIndex; int PageColorMapIndex; wxPanel *CreateMainPage(wxWindow * book); wxPanel *CreateContrastEnhancementPage(wxWindow * book); wxPanel *CreateChannelSelectionPage(wxWindow * book); wxPanel *CreateColorMapPage(wxWindow * book); bool RetrieveMainPage(); bool RetrieveContrastEnhancementPage(bool check = true); bool RetrieveChannelSelectionPage(bool check = true); bool RetrieveColorMapPage(bool check = true); void UpdateMainPage(); void UpdateContrastEnhancementPage(); void UpdateChannelSelectionPage(); void UpdateColorMapPage(); void GetCoverageInfos(); bool UpdateStyle(); public: QuickStyleRasterDialog() {; } virtual ~ QuickStyleRasterDialog() { if (Style != NULL) delete Style; } bool Create(MyMapPanel * parent, MapLayer * layer); void CreateButtons(); bool ConfigChanged() { return IsConfigChanged; } void OnQuit(wxCommandEvent & event); void OnOk(wxCommandEvent & event); void OnApply(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnPageChanging(wxNotebookEvent & event); void OnPageChanged(wxNotebookEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); void OnCmdContrastChanged(wxCommandEvent & event); void OnCmdBandModeChanged(wxCommandEvent & event); void OnCmdColorMapModeChanged(wxCommandEvent & event); void OnCmdColorMinChanged(wxCommandEvent & event); void OnCmdMinColorPicker(wxCommandEvent & event); void OnCmdColorMaxChanged(wxCommandEvent & event); void OnCmdMaxColorPicker(wxCommandEvent & event); void OnShadedChanged(wxCommandEvent & event); }; class QuickStyleTopologyDialog:public wxPropertySheetDialog { // // a dialog for configuring a Quick Style (Topology) // private: ................................................................................ CachedFrame *CachedLinks; CachedFrame *CachedFaces; CachedFrame *CachedEdgeSeeds; CachedFrame *CachedLinkSeeds; CachedFrame *CachedFaceSeeds; QuickStyleObj *QuickStyle; QuickStyleTopologyObj *QuickStyleTopology; QuickStyleRasterObj *QuickStyleRaster; MapLayer *Prev; MapLayer *Next; public: MapLayer(LayerListItem * layer); ~MapLayer(); int GetType() { ................................................................................ QuickStyleObj *GetQuickStyle() { return QuickStyle; } QuickStyleTopologyObj *GetQuickStyleTopology() { return QuickStyleTopology; } QuickStyleRasterObj *GetQuickStyleRaster() { return QuickStyleRaster; } QuickStyleObj *CloneQuickStyle() { return QuickStyle->Clone(); } QuickStyleTopologyObj *CloneQuickStyleTopology() { return QuickStyleTopology->Clone(); } QuickStyleRasterObj *CloneQuickStyleRaster() { return QuickStyleRaster->Clone(); } bool UpdateQuickStyle(QuickStyleObj * style); bool UpdateQuickStyle(QuickStyleTopologyObj * style); bool UpdateQuickStyle(QuickStyleRasterObj * style); WmsLayerSettings *GetWmsConfig() { return WmsConfig; } RasterLayerConfig *GetRasterConfig() { return RasterConfig; ................................................................................ private: MyMapPanel * MapPanel; bool Changed; wxTreeItemId Root; // the root node wxImageList *Images; // the images list wxTreeItemId CurrentItem; // the tree item holding the current context menu wxTreeItemId DraggedItem; // the tree item to be moved void DoWmsSqlSample(MapLayer * lyr); void DoWmsUrlSample(MapLayer * lyr); void DoVectorSqlSample(MapLayer * lyr); void DoRasterSqlSample(MapLayer * lyr); public: MyLayerTree() {; } MyLayerTree(MyMapPanel * parent, wxWindowID id = wxID_ANY); virtual ~ MyLayerTree(); void FlushAll() ................................................................................ void OnCmdRemoveAll(wxCommandEvent & event); void OnCmdShowAll(wxCommandEvent & event); void OnCmdHideAll(wxCommandEvent & event); void OnCmdMapConfigure(wxCommandEvent & event); void OnCmdVisible(wxCommandEvent & event); void OnCmdMapFullExtent(wxCommandEvent & event); void OnCmdMapLayerFullExtent(wxCommandEvent & event); void OnCmdMapSqlSample(wxCommandEvent & event); void OnCmdMapUrlSample(wxCommandEvent & event); void OnCmdRemoveLayer(wxCommandEvent & event); void OnCmdDeleteItem(wxCommandEvent & event); void OnCmdLayerInfo(wxCommandEvent & event); void OnCmdMapLayerConfigure(wxCommandEvent & event); void OnCmdQuickStyleEdit(wxCommandEvent & event); void OnDragStart(wxTreeEvent & event); void OnDragEnd(wxTreeEvent & event); ................................................................................ if (UnusedThreads != NULL) delete[]UnusedThreads; UnusedThreads = NULL; NumThreads = 0; } void PrepareThreadsPool(int count); int FindUnusedThread(); void ReleaseThread(int index); }; class MyMapView:public wxPanel { // // a panel used to show the Map // ................................................................................ { return MapSRID; } void EnableMultiThreading(bool mode) { MultiThreadingEnabled = mode; } int GetImageWidth(); int GetImageHeight(); double GetMapMinX() { return MapMinX; } double GetMapMinY() { return MapMinY; ................................................................................ { return GeoMaxX; } double GetGeoMaxY() { return GeoMaxY; } void DoPrepareBBox(wxString & bbox); void GetBBox(int *srid, double *minx, double *miny, double *maxx, double *maxy); MapLayer *GetFirstLayer() { return FirstLayer; } bool IsMultiThreadingEnabled() { return MultiThreadingEnabled; ................................................................................ { Parent->InitializeSqlFilters(db_prefix, table, read_only, geom_column); } void UpdateMapViewPoint(int fromSrid, int toSrid) { MapView->UpdateMapViewPoint(fromSrid, toSrid); } int GetImageWidth() { return MapView->GetImageWidth(); } int GetImageHeight() { return MapView->GetImageHeight(); } void DoPrepareBBox(wxString & bbox) { MapView->DoPrepareBBox(bbox); } void GetBBox(int *srid, double *minx, double *miny, double *maxx, double *maxy) { MapView->GetBBox(srid, minx, miny, maxx, maxy); } double GetMapMinX() { return MapView->GetMapMinX(); } double GetMapMinY() { return MapView->GetMapMinY(); |
Changes to Dialogs.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 .... 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 .... 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 .... 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 .... 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 .... 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 .... 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 .... 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 |
/* / Dialogs.cpp / various dialog classes / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ sql += wxT(", '::with-foreign-keys::'"); if (WithTriggers->GetValue() == true) sql += wxT(", '::with-triggers::'"); if (Resequence->GetValue() == true) sql += wxT(", '::resequence::'"); if (Append->GetValue() == true) sql += wxT(", '::append::'"); for (int i = 1; i < ignoreCtrl->GetCount(); i++) { if (ignoreCtrl->IsSelected(i) == true) { wxString str = ignoreCtrl->GetString(i); xname = (char *) malloc((str.Len() * 4) + 1); strcpy(xname, str.ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxT(", '::ignore::") + wxString::FromUTF8(xname2) + wxT("'"); free(xname2); } } for (int i = 1; i < castCtrl->GetCount(); i++) { if (castCtrl->IsSelected(i) == true) { wxString str = castCtrl->GetString(i); xname = (char *) malloc((str.Len() * 4) + 1); strcpy(xname, str.ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); ................................................................................ NameEnabled = false; AStarSupported = true; OneWayFromTo = wxT(""); OneWayToFrom = wxT(""); NameColumn = wxT(""); DataTable = wxT(""); VirtualTable = wxT(""); if (wxDialog::Create(parent, wxID_ANY, wxT("Build Network")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void NetworkDialog::CreateControls() { // // creating individual control and setting initial values ................................................................................ wxListBox *tableCtrl = new wxListBox(); tableCtrl->Create(this, ID_NET_TABLE, wxDefaultPosition, size, nTables, tables, wxLB_SINGLE | wxLB_HSCROLL); delete[]tables; tableNameSizer->Add(tableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); size = wxSize(140, 80); wxSize size2 = wxSize(140, 60); wxString table; if (MainFrame->GetCurrentlySelectedTable(table) == true) { // automatically selecting the current table int sel = tableCtrl->FindString(table); if (sel != wxNOT_FOUND) tableCtrl->SetSelection(sel); } // the NodeFrom COLUMN wxBoxSizer *netSizer = new wxBoxSizer(wxHORIZONTAL); row0Sizer->Add(netSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *netBox = new wxStaticBox(this, wxID_STATIC, wxT("Network configuration"), wxDefaultPosition, wxDefaultSize); ................................................................................ // output tables wxBoxSizer *outSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(outSizer, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 0); wxStaticBox *outTablesBox = new wxStaticBox(this, wxID_STATIC, wxT("Output Tables"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *outTablesSizer = new wxStaticBoxSizer(outTablesBox, wxHORIZONTAL); outSizer->Add(outTablesSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dataTableLabel = new wxStaticText(this, wxID_STATIC, wxT("&binary data Table:")); outTablesSizer->Add(dataTableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *dataTableCtrl = new wxTextCtrl(this, ID_NET_DATA, wxT(""), wxDefaultPosition, wxSize(150, 22)); outTablesSizer->Add(dataTableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); outTablesSizer->AddSpacer(15); wxStaticText *virtualTableLabel = new wxStaticText(this, wxID_STATIC, wxT("&VirtualNetwork Table:")); outTablesSizer->Add(virtualTableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *virtualTableCtrl = new wxTextCtrl(this, ID_NET_VIRTUAL, wxT(""), wxDefaultPosition, wxSize(150, 22)); outTablesSizer->Add(virtualTableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); ................................................................................ (wxObjectEventFunction) & NetworkDialog::OnCost); Connect(ID_NET_ONEWAY, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnOneWay); Connect(ID_NET_NAME_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnNameEnabled); Connect(ID_NET_NO_GEOM, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnNoGeometry); } void NetworkDialog::OnTable(wxCommandEvent & WXUNUSED(event)) { // // TABLE selection changed // wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); TableName = tableCtrl->GetStringSelection(); wxTextCtrl *dataTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_DATA); wxString data_table = TableName + wxT("_net_data"); dataTableCtrl->SetValue(data_table); wxTextCtrl *virtualTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_VIRTUAL); wxString net_table = TableName + wxT("_net"); virtualTableCtrl->SetValue(net_table); int n_cols; ................................................................................ aStarSel->Enable(false); costSel->Enable(false); GeomLength = false; costSel->SetSelection(1); costCtrl->Enable(true); } } void NetworkDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); ................................................................................ int i; char **results; int rows; int columns; char *value; wxSpinCtrl *sridNewCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_NEW); wxSpinCtrl *sridOldCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_OLD); wxButton *ok = (wxButton *) FindWindow(wxID_OK); int newSrid = sridNewCtrl->GetValue(); int oldSrid = sridOldCtrl->GetValue(); int inserted = 0; char *sql = sqlite3_mprintf ("SELECT SE_RegisterRasterCoverageSrid( z.coverage_name, %d) FROM " ................................................................................ int i; char **results; int rows; int columns; char *value; wxSpinCtrl *sridNewCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_NEW); wxSpinCtrl *sridOldCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_OLD); wxButton *ok = (wxButton *) FindWindow(wxID_OK); int newSrid = sridNewCtrl->GetValue(); int oldSrid = sridOldCtrl->GetValue(); int inserted = 0; char *sql = sqlite3_mprintf ("SELECT SE_RegisterVectorCoverageSrid( z.coverage_name, %d) FROM " |
| | | > | > > > > > > > > > > > < < < < < < < < | > > | | | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 .... 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 .... 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 .... 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 .... 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 .... 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 .... 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 .... 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 |
/* / Dialogs.cpp / various dialog classes / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ sql += wxT(", '::with-foreign-keys::'"); if (WithTriggers->GetValue() == true) sql += wxT(", '::with-triggers::'"); if (Resequence->GetValue() == true) sql += wxT(", '::resequence::'"); if (Append->GetValue() == true) sql += wxT(", '::append::'"); for (unsigned int i = 1; i < ignoreCtrl->GetCount(); i++) { if (ignoreCtrl->IsSelected(i) == true) { wxString str = ignoreCtrl->GetString(i); xname = (char *) malloc((str.Len() * 4) + 1); strcpy(xname, str.ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxT(", '::ignore::") + wxString::FromUTF8(xname2) + wxT("'"); free(xname2); } } for (unsigned int i = 1; i < castCtrl->GetCount(); i++) { if (castCtrl->IsSelected(i) == true) { wxString str = castCtrl->GetString(i); xname = (char *) malloc((str.Len() * 4) + 1); strcpy(xname, str.ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); ................................................................................ NameEnabled = false; AStarSupported = true; OneWayFromTo = wxT(""); OneWayToFrom = wxT(""); NameColumn = wxT(""); DataTable = wxT(""); VirtualTable = wxT(""); Overwrite = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Create Network")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); wxString table; if (MainFrame->GetCurrentlySelectedTable(table) == true) { // automatically selecting the current table wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); int sel = tableCtrl->FindString(table); if (sel != wxNOT_FOUND) tableCtrl->SetSelection(sel); TableName = table; SetCurrentTable(); } return true; } void NetworkDialog::CreateControls() { // // creating individual control and setting initial values ................................................................................ wxListBox *tableCtrl = new wxListBox(); tableCtrl->Create(this, ID_NET_TABLE, wxDefaultPosition, size, nTables, tables, wxLB_SINGLE | wxLB_HSCROLL); delete[]tables; tableNameSizer->Add(tableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); size = wxSize(140, 80); wxSize size2 = wxSize(140, 60); // the NodeFrom COLUMN wxBoxSizer *netSizer = new wxBoxSizer(wxHORIZONTAL); row0Sizer->Add(netSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *netBox = new wxStaticBox(this, wxID_STATIC, wxT("Network configuration"), wxDefaultPosition, wxDefaultSize); ................................................................................ // output tables wxBoxSizer *outSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(outSizer, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 0); wxStaticBox *outTablesBox = new wxStaticBox(this, wxID_STATIC, wxT("Output Tables"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *outTablesSizer = new wxStaticBoxSizer(outTablesBox, wxVERTICAL); outSizer->Add(outTablesSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *out1Sizer = new wxBoxSizer(wxHORIZONTAL); outTablesSizer->Add(out1Sizer, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 0); wxStaticText *dataTableLabel = new wxStaticText(this, wxID_STATIC, wxT("&binary data Table:")); out1Sizer->Add(dataTableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *dataTableCtrl = new wxTextCtrl(this, ID_NET_DATA, wxT(""), wxDefaultPosition, wxSize(150, 22)); out1Sizer->Add(dataTableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); out1Sizer->AddSpacer(15); wxStaticText *virtualTableLabel = new wxStaticText(this, wxID_STATIC, wxT("&VirtualNetwork Table:")); out1Sizer->Add(virtualTableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *virtualTableCtrl = new wxTextCtrl(this, ID_NET_VIRTUAL, wxT(""), wxDefaultPosition, wxSize(150, 22)); out1Sizer->Add(virtualTableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Overwrite existing output tables wxBoxSizer *out2Sizer = new wxBoxSizer(wxHORIZONTAL); outTablesSizer->Add(out2Sizer, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 0); wxCheckBox *overwrite = new wxCheckBox(this, ID_NET_OVERWRITE, wxT ("&Overwrite existing output tables")); out2Sizer->Add(overwrite, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 1); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); ................................................................................ (wxObjectEventFunction) & NetworkDialog::OnCost); Connect(ID_NET_ONEWAY, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnOneWay); Connect(ID_NET_NAME_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnNameEnabled); Connect(ID_NET_NO_GEOM, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnNoGeometry); Connect(ID_NET_OVERWRITE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnOverwrite); } void NetworkDialog::OnTable(wxCommandEvent & WXUNUSED(event)) { // // TABLE selection changed // wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); TableName = tableCtrl->GetStringSelection(); SetCurrentTable(); } void NetworkDialog::SetCurrentTable() { // // The currently selected Table changed // wxTextCtrl *dataTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_DATA); wxString data_table = TableName + wxT("_net_data"); dataTableCtrl->SetValue(data_table); wxTextCtrl *virtualTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_VIRTUAL); wxString net_table = TableName + wxT("_net"); virtualTableCtrl->SetValue(net_table); int n_cols; ................................................................................ aStarSel->Enable(false); costSel->Enable(false); GeomLength = false; costSel->SetSelection(1); costCtrl->Enable(true); } } void NetworkDialog::OnOverwrite(wxCommandEvent & WXUNUSED(event)) { // // Overwrite check box // if (Overwrite == true) Overwrite = false; else Overwrite = true; } void NetworkDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); ................................................................................ int i; char **results; int rows; int columns; char *value; wxSpinCtrl *sridNewCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_NEW); wxSpinCtrl *sridOldCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_OLD); int newSrid = sridNewCtrl->GetValue(); int oldSrid = sridOldCtrl->GetValue(); int inserted = 0; char *sql = sqlite3_mprintf ("SELECT SE_RegisterRasterCoverageSrid( z.coverage_name, %d) FROM " ................................................................................ int i; char **results; int rows; int columns; char *value; wxSpinCtrl *sridNewCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_NEW); wxSpinCtrl *sridOldCtrl = (wxSpinCtrl *) FindWindow(ID_ADDALL_SRID_OLD); int newSrid = sridNewCtrl->GetValue(); int oldSrid = sridOldCtrl->GetValue(); int inserted = 0; char *sql = sqlite3_mprintf ("SELECT SE_RegisterVectorCoverageSrid( z.coverage_name, %d) FROM " |
Changes to DialogsGraph.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ DialogsGraph.cpp
/ graphics dialog classes
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a-furieri@lqt.it
/
/ Copyright (C) 2010-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ DialogsGraph.cpp
/ graphics dialog classes
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2010-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
Changes to Exif.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 .... 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 |
/* / Exif.cpp / methods related to EXIF import and XmlBLOB import/export / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ goto create_new; else { for (i = 1; i <= rows; i++) { const char *name; bool ok_id = false; bool ok_name = false; bool ok_photo = false; bool ok_width = false; bool ok_height = false; bool ok_timestamp = false; bool pKey = false; bool ok_pk = false; bool err_pk = false; name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; if (strcasecmp(name, "id") == 0) ok_id = true; if (strcasecmp(name, "name") == 0) ok_name = true; if (strcasecmp(name, "photo") == 0) ok_photo = true; if (strcasecmp(name, "width") == 0) ok_width = true; if (strcasecmp(name, "heigth") == 0) ok_height = true; if (strcasecmp(name, "timestamp") == 0) ok_timestamp = true; if (pKey == true) { if (strcasecmp(name, "id") == 0) ok_pk = true; else err_pk = true; } if (ok_id == true && pKey != true) err_pk = true; if (err_pk == true) { err = true; ................................................................................ { // // importing a single EXIF-GPS image into the DB Table // sqlite3_int64 val64; int ret; wxString timestamp; char *errMsg = NULL; double longitude; double latitude; gaiaGeomCollPtr geom; bool ok; unsigned char *geoblob; int geosize; |
| < < < < | < < < |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 .... 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 |
/* / Exif.cpp / methods related to EXIF import and XmlBLOB import/export / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ goto create_new; else { for (i = 1; i <= rows; i++) { const char *name; bool ok_id = false; bool ok_photo = false; bool ok_width = false; bool ok_height = false; bool ok_timestamp = false; bool pKey = false; bool err_pk = false; name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; if (strcasecmp(name, "id") == 0) ok_id = true; if (strcasecmp(name, "photo") == 0) ok_photo = true; if (strcasecmp(name, "width") == 0) ok_width = true; if (strcasecmp(name, "heigth") == 0) ok_height = true; if (strcasecmp(name, "timestamp") == 0) ok_timestamp = true; if (pKey == true) { if (strcasecmp(name, "id") != 0) err_pk = true; } if (ok_id == true && pKey != true) err_pk = true; if (err_pk == true) { err = true; ................................................................................ { // // importing a single EXIF-GPS image into the DB Table // sqlite3_int64 val64; int ret; wxString timestamp; double longitude; double latitude; gaiaGeomCollPtr geom; bool ok; unsigned char *geoblob; int geosize; |
Added HtmlHelp.cpp.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 |
/* / HtmlHelp.cpp / spatialite_gui HTML Help generator / / This code was autogenerated by "helpgen" on xxxxx / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include <zlib.h> void MyFrame::GetHelp(wxString & html_text) { // // return the HTML Help Page from the ZIP compressed data // unsigned char *zip_buf = NULL; int uncompressed_len = 595001; int compressed_len = 67145; uLong inLen = compressed_len; uLong outLen = uncompressed_len; const Bytef *in; Bytef *out; char *html = NULL; // allocating the ZIP compressed buffer zip_buf = (unsigned char *) malloc(uncompressed_len); if (zip_buf == NULL) goto error; // feeding the ZIP compressed buffer FeedZipHtml(zip_buf, 0, "789cecbd6977e338b228f8b9ea5770f29ed725bff6927666f7"); FeedZipHtml(zip_buf, 25, "adcec5ef386da7cb5ddeaeadaccae5e4f1a12448622545aa49"); FeedZipHtml(zip_buf, 50, "ca4bcdbcff3eb100204882142553b25de99a797dd302080462"); FeedZipHtml(zip_buf, 75, "4320108878f3ffec9deeb63f9ded3bbfb48f8f9cb30fef8e0e"); FeedZipHtml(zip_buf, 100, "779d676b1b1bbfbfd8ddd8d86bef71c3cbf5e79b4e3b7283d8"); FeedZipHtml(zip_buf, 125, "4bbc3070fd8d8dfd9367db3fbe1926237ffbcd50b8bded1f7f"); FeedZipHtml(zip_buf, 150, "f8e1cd4824aed30d834404c9db6789b84936b0c76ba73b74a3"); FeedZipHtml(zip_buf, 175, "58246f3fb4dfaffdfccc1926c9784dfc67e25dbd7d26bbaf25"); FeedZipHtml(zip_buf, 200, "b763f18c4649bcc417db176337f1dc232f11cec5ff1c39fd49"); FeedZipHtml(zip_buf, 225, "d0c5b96327127d1189a02b1cdf8b93371bdc1d3f8c935b5f38"); FeedZipHtml(zip_buf, 250, "38909cbc1bc734e40fc32de7ffed867e18bd0adcabdbd70eb6"); FeedZipHtml(zip_buf, 275, "aeb9be37085e75617211bdfebf0ef57ba1fa75fc89903f76f4"); FeedZipHtml(zip_buf, 300, "6f51781dbcfebff89b97190f7f7ab341d3c3746f3608216f3a"); FeedZipHtml(zip_buf, 325, "61efd6e90ca8dfdb67ffd5c7ff9e13d636b7db6e07400dfbce"); FeedZipHtml(zip_buf, 350, "2e2f3f868f36a169e2c3fff8def61bd719c242e1b398f0e003"); FeedZipHtml(zip_buf, 375, "1e2ee3fff8cf4af1f266c3dd7eb3019fe6be8fdc18d687df6f"); FeedZipHtml(zip_buf, 400, "f100e7f4030eb0553ac206c0f1a61301692384770bc70bdc11"); FeedZipHtml(zip_buf, 425, "e0b5029c97ebff587fbed61357c2ff5bd089c7afe7fbdf6a6a"); FeedZipHtml(zip_buf, 450, "2388000f221c7105a4c82ef74a44317c0880c130bff11fce61"); FeedZipHtml(zip_buf, 475, "d00f9d2f6ed0733a13cfef39e198074f449c78c1e0ab0d0785"); FeedZipHtml(zip_buf, 500, "9107221091d77db67dc0ff20e44d120f70715b6f003fecb880"); FeedZipHtml(zip_buf, 525, "b203fabf0ec8034e1e3b6311a1d0048246a8182006914154f0"); FeedZipHtml(zip_buf, 550, "e2521c8ddcc01b4f7c1787732e64a72a48466e32e441f05fb5"); FeedZipHtml(zip_buf, 575, "8017511446f98923310e239af560fff4c2d970cedbedd3b353"); FeedZipHtml(zip_buf, 600, "873ac70e22fcda8d025c65c5d0be0806c9f0b27b95f0f8fcf7"); FeedZipHtml(zip_buf, 625, "460fe8ed22e1278197ac018224696b81db1bc5e980b66f9d7e"); FeedZipHtml(zip_buf, 650, "148e9cbdbd8dbde30b270813977f6df96130f092494f6c203e"); FeedZipHtml(zip_buf, 675, "f11f2b15d37480943c4781119c7e1839ef8e4edf3961e70f20"); FeedZipHtml(zip_buf, 700, "6d15b4e3e765837c09c2600df1d073a3de571a732042d0b3c8"); FeedZipHtml(zip_buf, 725, "803506decc930c47007cc44934e912e5dcc280cec0bb1281e3"); FeedZipHtml(zip_buf, 750, "25b1f3bbf0fdb56f01a83da70d2ad33917e348c4a0afdc29ac"); FeedZipHtml(zip_buf, 775, "3ade6a6ce2775ee046b7334cfdc23675d8495c0f39d14986a2"); FeedZipHtml(zip_buf, 800, "b0ae8da913a2ae2e425c09c6c88bbb7950e2c958898cb80913"); FeedZipHtml(zip_buf, 825, "18281d12c00471ac24e7cbfc780018ee77ce018f725bf13108"); FeedZipHtml(zip_buf, 850, "abeb1544d84d12311a134049e8701fd00a3e02237a6a5caf52"); FeedZipHtml(zip_buf, 875, "9d74c311a22ae6b115286beae7ba32db858d293704ad0d7f47"); FeedZipHtml(zip_buf, 900, "f86ac9bd378ad7d2816077ea8a35f85104312d7796b1c6ff28"); FeedZipHtml(zip_buf, 925, "c3f659e80595b4ff67d997bb93e84a385f8ebc00b69e082101"); FeedZipHtml(zip_buf, 950, "de3cc73da86ab8ff2e1b0ec7b9a071aa3effb9ecf38b49d407"); FeedZipHtml(zip_buf, 975, "04395fce42ff76804c5e03987f95638506a95447cfab187837"); FeedZipHtml(zip_buf, 1000, "f4fda99be078b3a0d392a19bd05eeeb8e37114de782046c291"); FeedZipHtml(zip_buf, 1025, "960af0b4cfca7de88d63e7ca739de377e7d54ab3a0bcd219ac"); FeedZipHtml(zip_buf, 1050, "a3560e6655477a73ab3f4e41f609286f34f605b0770a5908f6"); FeedZipHtml(zip_buf, 1075, "849bc0fe5b3d5a67d6e19c2fb4c9c763d1f5faa8ae849b4c40"); FeedZipHtml(zip_buf, 1100, "be2b9965f3654105d69cc7ed5d21827a75e7e9cd3e8fb456ea"); FeedZipHtml(zip_buf, 1125, "4d505006bca185510fb60b60b7048f47acc2a7e995cd7f8cfd"); FeedZipHtml(zip_buf, 1150, "495cb135ecf4fb20d87ce24a87247bea200a27f07ff0d81085"); FeedZipHtml(zip_buf, 1175, "3e6ba2eac90aba080167b3dd5f3b8613db9e0ba7361c5bfd78"); FeedZipHtml(zip_buf, 1200, "18f4c48d33849ffc299a65f39f78e4ebc2007e38a85810eeb9"); FeedZipHtml(zip_buf, 1225, "38d52ef7a4d988f381be17b8c18256ee4e59061daf2ae6b838"); FeedZipHtml(zip_buf, 1250, "dadbb8d887e1a05bcf39726fc51411f8a717e336e3568c7978"); FeedZipHtml(zip_buf, 1275, "714a70f700eeeab1fabd303f8ee63d1ce9fddee9c6e9c1b983"); FeedZipHtml(zip_buf, 1300, "9b22acb743865ef59083f1b7024e33639e1eeca2de3c73bbdf"); FeedZipHtml(zip_buf, 1325, "dc819861e8c27e822c71dc8976ddee50ac75dc181008a78829"); FeedZipHtml(zip_buf, 1350, "dbfe78b3b0b1e038e7ffbb1d89dc284e4b6de9ceaeebfb1d80"); FeedZipHtml(zip_buf, 1375, "38aeb2ab6f46fe3b6d5a5b29f3117a80715d755a8abc824e30"); FeedZipHtml(zip_buf, 1400, "d9e5fc70cff102546753769c241cc3117e705b31585b7659ab"); FeedZipHtml(zip_buf, 1425, "61870522b90ea36f75463be1ae15835d8faaf4c8ef70b641d6"); FeedZipHtml(zip_buf, 1450, "8dc349547d22c45ebe5765ae929638f2ba6049558ea4f4f6b3"); FeedZipHtml(zip_buf, 1475, "6db47fc1aa7603114ee2549f97f81c8af4fb8f0f9bb904e90c"); FeedZipHtml(zip_buf, 1500, "fe257aa8a55741c2c308c6497f62e5c5bffee6461efa56e254"); FeedZipHtml(zip_buf, 1525, "bf94cd475e0e7238913326f5d4882de18aad674e0794bb801f"); FeedZipHtml(zip_buf, 1550, "369f39b890b1db035d3f78fb6c8bff861da5abfebef67ac910"); FeedZipHtml(zip_buf, 1575, "7a3e7ffebfd8e3f42641f7cff69b2482ffd703d9c4eec1db67"); FeedZipHtml(zip_buf, 1600, "ff78e690dfe9ed33763c3d333d44cfc5f3ee73fefe8737c317"); FeedZipHtml(zip_buf, 1625, "a9d7a511af060eb891f4f07f22092302373420e83dc7ffefd9"); FeedZipHtml(zip_buf, 1650, "f67bf925741d4a70acfd2e6ee1787493eda597fae299ed8bc9"); FeedZipHtml(zip_buf, 1675, "68e4a27cc0273940d065b66df897e4a2df6c74186e3943cfd2"); FeedZipHtml(zip_buf, 1700, "a7e55c855ecf59715e396fbc6d65117bd9ef4cc8b623017b3e"); FeedZipHtml(zip_buf, 1725, "5909a03827518426024c9fbab3705a47b90d5ce031721a3ab1"); FeedZipHtml(zip_buf, 1750, "1cbb88c73cf8891b0d4472d91d4f2a5790765bd422da3483b3"); FeedZipHtml(zip_buf, 1775, "7bf6a1fe3afaa0c26ffc721264db1b83fc3d0cfbf1a81af51d"); FeedZipHtml(zip_buf, 1800, "06f6871f60af39f97074e4787d87bf73bc580de6df3a93406a"); FeedZipHtml(zip_buf, 1825, "2fd12b5d2628983f5e96af32d3dcd822cfce4fffbdfe72f645"); FeedZipHtml(zip_buf, 1850, "f277b32f7220c2b87c8d666b634b440b7ef60592dd3ff3f2a2"); FeedZipHtml(zip_buf, 1875, "0437e8f20566db1b5b221f1e665fa43c74ccbc4cdfeb8055b4"); FeedZipHtml(zip_buf, 1900, "55bece5c87c6167ae4753e1e1f6dcdbe52f9e1ec4bfdc58d0f"); FeedZipHtml(zip_buf, 1925, "d1675b5ca36ac92eee5d18fac20daa57d73effb08f50e1eae0"); FeedZipHtml(zip_buf, 1950, "042522ff16cd1ac05a84debe6b58126ea38923023007b00920"); FeedZipHtml(zip_buf, 1975, "39dc3d3df94d835102ebb19b0c615fb6422bdb9605eff14efb"); FeedZipHtml(zip_buf, 2000, "1713941288c14ad566b8156cb3c3b26007e9dfdd393a7ab7b3"); FeedZipHtml(zip_buf, 2025, "fbebc5b40580edf78715706c5816c0a88f6b60ba14c3cbc4ec"); FeedZipHtml(zip_buf, 2050, "548c223c3bd2442f0558755826e03b7bbfed9ceceeefd55940"); FeedZipHtml(zip_buf, 2075, "3b9a04df4aa1a7d665820e1f9efc5a07ee7301ca3172d1a75c"); FeedZipHtml(zip_buf, 2100, "02bbeeb14cf8cff7f74fdae73b27ed3a6b380dfcdbe9ebc8f4"); FeedZipHtml(zip_buf, 2125, "5ae65a4e4f8e3ed55ecf79824770eb22b8695990a7464615b8"); FeedZipHtml(zip_buf, 2150, "c60e5d8057b62d0be03c282510ef8fe381155c6c5816acfb67"); FeedZipHtml(zip_buf, 2175, "1707d3004d0f240550b96959c0be07e6fd58676397dec03209"); FeedZipHtml(zip_buf, 2200, "94cd4b13bd0c40ca9fe4b4b0e9ec5742ff4ae58276cfec2bd9"); FeedZipHtml(zip_buf, 2225, "3d2b5fc2501aa30efc877dc9652e3de6ec307796b67ebbbb3e"); FeedZipHtml(zip_buf, 2250, "8f8a83b3a998504e412b3a54e3b2966502e3b4584bada82559"); FeedZipHtml(zip_buf, 2275, "5771570f9835fae6313ab876dd18b6904358f940444562669a"); FeedZipHtml(zip_buf, 2300, "819cae3f11484bb96ca4a522af1ea3eea10e786f3c49e498e3"); FeedZipHtml(zip_buf, 2325, "308ebd0e9cc8f04a5cf4f0f61ffbc841c96d4cd7efaff4792e"); FeedZipHtml(zip_buf, 2350, "08cd481a38d5c921c47a29dff26af6c209f42a5b2bb7562f95"); FeedZipHtml(zip_buf, 2375, "fb38e348743d3efd36b966397a934bc6a892b205635bf572f9"); FeedZipHtml(zip_buf, 2400, "6b43934dfd70d5f95344e1e5d8ede538a330646358a3c099d9"); FeedZipHtml(zip_buf, 2425, "70a6bc04877dc70da4bfdaf51d371a4c46d2dba096419a053f"); FeedZipHtml(zip_buf, 2450, "7663bc47422f370396c205ad613fc3b461a4688920ad625b40"); FeedZipHtml(zip_buf, 2475, "1d786d308e0cbab8f67cdfe9c0d2dc5e0f7e9dc41490143ba3"); FeedZipHtml(zip_buf, 2500, "49778837b91e29bacffbe7a7b11387b86211c49348c8c1fe33"); FeedZipHtml(zip_buf, 2525, "f1f0ae8103d5a6b1025e6495b102b655b3027f2d59c199f2df"); FeedZipHtml(zip_buf, 2550, "d441579da1b8b96424663788c27c8df109c5c0a57c32751172"); FeedZipHtml(zip_buf, 2575, "2fb27287865eb1472c129c07b724d8c7e8d73c9b285a8b1bbc"); FeedZipHtml(zip_buf, 2600, "ea63b8ba611489781c06f417f0e22fe2c6dd03e532c2c04ce2"); FeedZipHtml(zip_buf, 2625, "915547ac0fd671e4e79b6ee7e77fedbfc7d15f33783033f0e5"); FeedZipHtml(zip_buf, 2650, "6444303a7de09798998d8440cda8b86ebd16f1eea073de8751"); FeedZipHtml(zip_buf, 2675, "57ecc42713df2f729ad1485cb159640af8752bf7ab6407e397"); FeedZipHtml(zip_buf, 2700, "728e00a001081c9a0880b2ca7fb3d3d005b9019101ccb6b009"); FeedZipHtml(zip_buf, 2725, "30dd454fa094dd18b6f7943d56ec187c4d81d83f84f04174ed"); FeedZipHtml(zip_buf, 2750, "c522335fbeb3e376e2d09f2482dc8d4908322d35489c60570a"); FeedZipHtml(zip_buf, 2775, "eb8bae50c231d4308cbc81078c66405121d2917013f1e1c3e1"); FeedZipHtml(zip_buf, 2800, "9e45a4755bd60cabaf7a5d7db7f7d269c109b9178e561c1c10"); FeedZipHtml(zip_buf, 2825, "ac44752f8ab1f3af363644b07eed7df3c6a2e7b9eb6134d8c0"); FeedZipHtml(zip_buf, 2850, "bf363e041e328eebfbb79793c0fbcf445c7a3d8c16e87b6068"); FeedZipHtml(zip_buf, 2875, "6d1bcd0e373b6933da502be52b3fdefbc7ee5074bf01d71797"); FeedZipHtml(zip_buf, 2900, "6e34b658e0ff3fa7bdffb13ddfee536fad30e7339cd8e96ab0"); FeedZipHtml(zip_buf, 2925, "dc6d43b26548634e1dd026f43bb201cf889c842c479c84e10b"); FeedZipHtml(zip_buf, 2950, "1870cb61bbfc6f5a060d50899b7698b87e2582323dee8825d7"); FeedZipHtml(zip_buf, 2975, "e94e4614f17d251c1307b43c80e8cd64db1d0c2231c0d0a4be"); FeedZipHtml(zip_buf, 3000, "367627db9527c8fda01bf6c48773cb815737b59c49e49bd096"); FeedZipHtml(zip_buf, 3025, "1a2d3f547cb3aa9e84548ed420b79c89088f1b6b026102d678"); FeedZipHtml(zip_buf, 3050, "b63de65f1cfa0514042dbb090ef202e807e2cf4cc3a8508f15"); FeedZipHtml(zip_buf, 3075, "7ee02807827bb2cda3d2c413dace5cffdabd957b0bef54a0d7"); FeedZipHtml(zip_buf, 3100, "5c9a829ecef0c991f6a7751d36911d339c24e6a04a39f29682"); FeedZipHtml(zip_buf, 3125, "db1fecd9bc264501851215da077d3ab78cdaceb6ec241539ef"); FeedZipHtml(zip_buf, 3150, "c4a92107ffd18e9518df666055d3ab15c1c03dd177277e62c2"); FeedZipHtml(zip_buf, 3175, "cfef4dcab812f6e532aed44d337065f9370d31a5eb8c7dd70b"); FeedZipHtml(zip_buf, 3200, "9004fcca0077992c5765788f88d9184f95d05f7256ba47c633"); FeedZipHtml(zip_buf, 3225, "f25596578b6c452b7d546ce54527607bbc07b8cfdc646861ae"); FeedZipHtml(zip_buf, 3250, "6c87d61d7634180a6ccf30ba757044c6952b637f4183038195"); FeedZipHtml(zip_buf, 3275, "cde2e054e8f2988d25d09ac21fdde0d689294810ce36c9d0f1"); FeedZipHtml(zip_buf, 3300, "ddee377e6ca141a83023c1447ceff9a21a2db65e77c10d8ee7"); FeedZipHtml(zip_buf, 3325, "e0808c9b961774fd09310e30a8b802c640d3913aecdf241cc8"); FeedZipHtml(zip_buf, 3350, "bfb2601422eed885982250835881c0e9c86b127129cec4cda3"); FeedZipHtml(zip_buf, 3375, "c619c0588d32a3c39d31a611729ff8c0b9aef1c008a7bd1420"); FeedZipHtml(zip_buf, 3400, "3cecf19ba3727c0998ae8824fcb5e57c2494007a68e3fa0256"); FeedZipHtml(zip_buf, 3425, "d6a7cc2fb591b68f960e45b50ff99929c57a78b4fa8f38fbba"); FeedZipHtml(zip_buf, 3450, "e39c333ed8231283ea8d57a523453a59a0ef2756f08cfd588c"); FeedZipHtml(zip_buf, 3475, "5d0abdcf3882742f74e78cbc04f6121c0774bb8383f9f490a3"); FeedZipHtml(zip_buf, 3500, "cbdb0a1c1c45643f4defdf8c7dafebe1c1523eaca4394570e5"); FeedZipHtml(zip_buf, 3525, "456140fe832b191a4a2172673bedc39da3c3f6fee5c5feee87"); FeedZipHtml(zip_buf, 3550, "f3c3f6a7b7c80737427b9e8c53a4f6f878f844a62722f208f5"); FeedZipHtml(zip_buf, 3575, "fb183a7c851dc8372ed831a0ac6d938426a44d39c467784dfa"); FeedZipHtml(zip_buf, 3600, "281ce3fb84c383f1b7c131d867b61388d9de4246c653b6c9d8"); FeedZipHtml(zip_buf, 3625, "eaef0ac60e3838589a2107221ccbe8f9919a54f1269c920d44"); FeedZipHtml(zip_buf, 3650, "c6407b0f633691c112374ac8e6f062792782e3e185160db3ca"); FeedZipHtml(zip_buf, 3675, "6f4f86ae36e8d99017298f32c3f4480780be8e80c506c462a9"); FeedZipHtml(zip_buf, 3700, "6cecabfb163d2e71a5a3e3a7a48bcc090318507acdd2402b09"); FeedZipHtml(zip_buf, 3725, "3a74db7bb7d6f7d87b8eaa05c7a0217df736ac3ad5eed1ea2a"); FeedZipHtml(zip_buf, 3750, "2892eb302749e42895342903f14024e5e0198d56d03a75aec7"); FeedZipHtml(zip_buf, 3775, "cee5f6617a1825aeedb066c3dd249d579d8cebeafdced1c5fe"); FeedZipHtml(zip_buf, 3800, "9493b8c2ecce683cf43a5e3889a78945b667e302e2eae11b90"); FeedZipHtml(zip_buf, 3825, "95dc60cd480c9c524e420c7a9e6cb3f352090ea180dc92f2c7"); FeedZipHtml(zip_buf, 3850, "c25a3c76538e266838e16c6850c5641470547d2d319946abd2"); FeedZipHtml(zip_buf, 3875, "aecd8b8e8d5a53a4681af4d66e4b902ccb529a11b20b91489f"); FeedZipHtml(zip_buf, 3900, "ff597ab1985fb5a513add92bdeb1d590ae8c95c2740b26a30e"); FeedZipHtml(zip_buf, 3925, "de5df5e108cb17103d6f802e83160c99b9f15c915201a23406"); FeedZipHtml(zip_buf, 3950, "e5cde75e5c47fb7227a6cbc1156d961a2f13c96b15bf621b4c"); FeedZipHtml(zip_buf, 3975, "a61250c7656d2c7944887fd2f7593852f93a83e3369f3168da"); FeedZipHtml(zip_buf, 4000, "00bd8b2022f48d0694cfe6ee2409f1d96297a409361e7c9d23"); FeedZipHtml(zip_buf, 4025, "3d69a41af200a4b3b499018c271220e77cb3036cc5c30fc300"); FeedZipHtml(zip_buf, 4050, "d648e6965a0099ddd0d4f7434e8431c6580bb9f802e242365c"); FeedZipHtml(zip_buf, 4075, "e36e2444502edb077538c4d2c92a155e9dfbfaf3621036330b"); FeedZipHtml(zip_buf, 4100, "e24411666c0293626ea7822adacfcf4317b0bf88988dca7c25"); FeedZipHtml(zip_buf, 4125, "a13d5fc9a33055d5c22e03103aeb792cdfc36901aaff738978"); FeedZipHtml(zip_buf, 4150, "b139176b8572c81774c4cca81f706879c749c73439a5ba2b0f"); FeedZipHtml(zip_buf, 4175, "1cf3e89bbaaed9375676a4f5fa24de94c1c509bbc482bd7201"); FeedZipHtml(zip_buf, 4200, "d1ebc48ed598903d9ac0446161b031c4092ca7cbe2c2c93eb4"); FeedZipHtml(zip_buf, 4225, "7ecc13c3509319c46919e10fbd6d052841530775f587235b87"); FeedZipHtml(zip_buf, 4250, "0d990ea8203cf14237013055f84af4427c379ec277b28763d5"); FeedZipHtml(zip_buf, 4275, "44cb43722dac9593288724dc4d66411368b76a2c718732965c"); FeedZipHtml(zip_buf, 4300, "4d83282c1135b590a87779fda0c6dba64169a4691cd8315846"); FeedZipHtml(zip_buf, 4325, "c71e18dd7ba188839f12e716dded371e50c74b52d73c5d47e3"); FeedZipHtml(zip_buf, 4350, "56b7061fadf5fddb32f1374182ad229e7441cbe0c578865032"); FeedZipHtml(zip_buf, 4375, "d06192c13c8ed5e08e519d98ea51ec0d3b1dcb830ff8b1e5dc"); FeedZipHtml(zip_buf, 4400, "9445b2dd3dca4dbb2d99614392a99b4ae377a76b7b9982bf2e"); FeedZipHtml(zip_buf, 4425, "16d2a80b6d31a6b730a094e73f2f5e35d4cdf5308c85eaccf6"); FeedZipHtml(zip_buf, 4450, "e94d46a7a87155e48cea809df1f2c893de49378053c4da26ee"); FeedZipHtml(zip_buf, 4475, "9b9be5f880692cf8805f178e8f19b0b1245c24ae0d17f0ebc2"); FeedZipHtml(zip_buf, 4500, "719120804152131daab78991aa4559de48d0cf2de7b67459ab"); FeedZipHtml(zip_buf, 4525, "8b5cf238f282ae37863d484bae1d13b71b929c60d6b93dcf0d"); FeedZipHtml(zip_buf, 4550, "b4b79dce31a069753464721db25346deab92c1d813a08447c8"); FeedZipHtml(zip_buf, 4575, "3dd8e53f13b7872f70d427ecc05f77f0ecc59b820eb13419e7"); FeedZipHtml(zip_buf, 4600, "0b00b236f69828f06ffee7d78a7029e1f9c8a2f87fe9fd6921"); FeedZipHtml(zip_buf, 4625, "660a1ae6e5291d1ccb832f9435e3119a1eb8c1ca5053c60f4a"); FeedZipHtml(zip_buf, 4650, "968f7b257068309d05776d2a7777c11ad7a66daf872212191d"); FeedZipHtml(zip_buf, 4675, "2153ef0578d52f198cc3854a97628b6f0e93052fc5aa1eeebe"); FeedZipHtml(zip_buf, 4700, "9a3d318884b01047362c58eda501ae7245b9b00ab904966309"); FeedZipHtml(zip_buf, 4725, "6999e3f8666cf111df8c17ba02d3ea8081f8bc444f43b01533"); FeedZipHtml(zip_buf, 4750, "0161638069b640d3f9e1c08dbc64388a5760655e9c860a8fc3"); FeedZipHtml(zip_buf, 4775, "6bf68469495232ce9e230c5e943ad2b86893daff281cc85343"); FeedZipHtml(zip_buf, 4800, "4bc673ab0b448d60bc29599176ed51204f28a517d37e185a1e"); FeedZipHtml(zip_buf, 4825, "68d0cf0bc5a68ff93aacaa6640267d5453db1c05ca4260ec14"); FeedZipHtml(zip_buf, 4850, "d77234f77eaee882485f242e0a3c6372c7ebac61807cb696e7"); FeedZipHtml(zip_buf, 4875, "40eb87b9fb67ad3652550e3cc221cbc099cf578dd86e2f8da1"); FeedZipHtml(zip_buf, 4900, "2a47bc15d788a9cefd5819562428a123f1841f3b7361062320"); FeedZipHtml(zip_buf, 4925, "fafaf3f2ae9b6548549c2425b803886029c65e9423dcf55176"); FeedZipHtml(zip_buf, 4950, "39ca1fbbc8f60df577a75a8ea18bc5ecc35f17cab9c48d5b25"); FeedZipHtml(zip_buf, 4975, "fc975df4566bd6256f4d5df2e673eb9a379f2f7ed19bcf6bad"); FeedZipHtml(zip_buf, 5000, "1a409975d99bcfabd77d76585cf4d961361abf995dce98c90a"); FeedZipHtml(zip_buf, 5025, "48786de8de33dcd62c9085d755c458ad3893d451cd34eb2226"); FeedZipHtml(zip_buf, 5050, "981959ac45cab7fadb4a5c9e2bfb2d8f3fd970cfb69934c828"); FeedZipHtml(zip_buf, 5075, "7bb282b4ecbe114e69960b46f875b1671798203d58caf5b8b1"); FeedZipHtml(zip_buf, 5100, "b3063a993538fc8346e989b1e00065bcc71b0abc4ecd7a12e4"); FeedZipHtml(zip_buf, 5125, "e5123f37a46fc7211685b812eb4ec5baadcb5ef4aa9b3ff45c"); FeedZipHtml(zip_buf, 5150, "fc27b29c7af0d7c52e053651803c0ac384d390e3bb14450a75"); FeedZipHtml(zip_buf, 5175, "7f3cd51cbc487a3d7175390e2d0784b46da10b81f1279ceed8"); FeedZipHtml(zip_buf, 5200, "bc88bef27486f5dc538bf84eaf59e4a2627754be626c5c2ced"); FeedZipHtml(zip_buf, 5225, "5c0ac65ec272db369f5d7bc12ebb059dc77f73233ba3ca8665"); FeedZipHtml(zip_buf, 5250, "7129858ce24d8b8558149f2145533657f2374570a4b14af392"); FeedZipHtml(zip_buf, 5275, "1931606769d5b20c7e9e1131a552d00052ee7ae7d44c659347"); FeedZipHtml(zip_buf, 5300, "7137856bb93c10c9911b27bf33f8c7b6443cf67ed6abe4b2c4"); FeedZipHtml(zip_buf, 5325, "821584605839299995e5b69e6522ee91818cab678578670407"); FeedZipHtml(zip_buf, 5350, "4d8c0fd36f9a3ab74cad160731acac9b270e7d8f59782eccb7"); FeedZipHtml(zip_buf, 5375, "aa91e0ab1247994034949cab2242c840d53e32c75484aa5e0f"); FeedZipHtml(zip_buf, 5400, "059d1ceab10c64d24cf550b933b9a9874da3e3c34468cb9ddc"); FeedZipHtml(zip_buf, 5425, "78be0762b9b250e49af3d444f42e1cd131428fb212e1fb9a4a"); FeedZipHtml(zip_buf, 5450, "6cdb7a5b512eaba31847d1ea212813bb3dc6221daa71e2b554"); FeedZipHtml(zip_buf, 5475, "ba0a4516b0ab693a5d7dc61137093d39311e37624af1589178"); FeedZipHtml(zip_buf, 5500, "43a9079aa54c821aa0ad1c5a79dbcc7812b39dcf70322604eb"); FeedZipHtml(zip_buf, 5525, "eae12b54d7e94aacf3f2cad982b7b83afb4359cfe624100be5"); FeedZipHtml(zip_buf, 5550, "a9e4774def11722b6f46f6e46053f7892ccaca759bbddfc341"); FeedZipHtml(zip_buf, 5575, "6cf96eb108b45628b2bb9a7d77ac3af728ecbd5f3d1f559935"); FeedZipHtml(zip_buf, 5600, "cfd855d20e7f1dddf5fee707180715f9fc23959e3a007e823d"); FeedZipHtml(zip_buf, 5625, "4e7dc0dfd47ae2ca23124563572c7bafb165cf3fd22ccbeea9"); FeedZipHtml(zip_buf, 5650, "f5542f7b176307abd6bddbd8bae71f69967577f582aa177e0c"); FeedZipHtml(zip_buf, 5675, "4aa572e1c78d2d7cfe916659f8482fa87ae1683145812b1365"); FeedZipHtml(zip_buf, 5700, "9db813dee7011fb66c7b2cf15e73223ff750b3e0c2cbac3150"); FeedZipHtml(zip_buf, 5725, "6b04148959907318742d6fcb09278777be055728997fa4f931"); FeedZipHtml(zip_buf, 5750, "e2c1c266c2c4fbd01aba8398783fb71f3b8f89f9479a1f137d"); FeedZipHtml(zip_buf, 5775, "219219f0f0c98d2c99ce090f9f7a4de161fe91e6c7c32d2c6c"); FeedZipHtml(zip_buf, 5800, "1686c0026c183b5ca1368e1bd31af38f343f4262b9c05975c6"); FeedZipHtml(zip_buf, 5825, "7b37198696645e2c2b948ba22169b9c3587790175ade2c08d9"); FeedZipHtml(zip_buf, 5850, "1dbab6ab3c362e1ac3c6fc23cd8f8b2eae6c16541c79b64a03"); FeedZipHtml(zip_buf, 5875, "84096c6a0a1777196b7e6cf8306b35323eac5fac57eda91fe2"); FeedZipHtml(zip_buf, 5900, "e676d5bb8c350b0e684d35b653ea57b18b7e889bdb47ef32d6"); FeedZipHtml(zip_buf, 5925, "cc6b9fba8152af8a7df343dcdcce7997b1665ef9f42d93bad5"); FeedZipHtml(zip_buf, 5950, "d8293fc4cded9577196b6614d4df24a97bd556f0216e6e33b8"); FeedZipHtml(zip_buf, 5975, "cb5833e3a0d62e80b7d755e20f3d9a93ff3b0d36db0640ebaa"); FeedZipHtml(zip_buf, 6000, "614353bf0a25003d9ad302771a6c8ef5d7b19da96315ff4397"); FeedZipHtml(zip_buf, 6025, "e604e04e83cd818129327057b76b6f14a73e579b7b95ef5af6"); FeedZipHtml(zip_buf, 6050, "f636f68e2f30e85dd6be6ef96130f092494f6c608405fe63e5"); FeedZipHtml(zip_buf, 6075, "117962f7f630401096648bca0d06472eba258f2f5a8e5e6645"); FeedZipHtml(zip_buf, 6100, "d8a642c03496a853f4efdaf0f5bb08a0caded6924f5f5661b7"); FeedZipHtml(zip_buf, 6125, "0b606390557605d0ac17af705e1fcabbc1e4c2fe9c9c427eb7"); FeedZipHtml(zip_buf, 6150, "226342d2442471ad34e895b705f8d8239309d58a6b580422db"); FeedZipHtml(zip_buf, 6175, "92a2fb4861979cb7886fe4477103e88b890d33589b2aa7d3d6"); FeedZipHtml(zip_buf, 6200, "82ff1d4962dd7dc65a34a46ca37b26d69942d75e32f41489d3"); FeedZipHtml(zip_buf, 6225, "e9974092bb6a8c8e2e043e49a8b479aede3827ebeefc21bac9"); FeedZipHtml(zip_buf, 6250, "63ba9b398c3f7b637b6d08ddd4a25b5c993680cb9dcf987fa0"); FeedZipHtml(zip_buf, 6275, "ad8b5f50490cbc6593dfad124b50fa4be3c167d8773609ab98"); FeedZipHtml(zip_buf, 6300, "9269d5794effa64c4aab24ff7ffbaf9fb736375f739f0f27bf"); FeedZipHtml(zip_buf, 6325, "9e9cfe7ec2db55216db66b3cd00aaec2ae8c7a944f4028bb7a"); FeedZipHtml(zip_buf, 6350, "c299d6d304c07af34bab1201c406858d3cca314fc2acf7f9f0"); FeedZipHtml(zip_buf, 6375, "6cad1b8e88adf1be9e0cf4b21d3c3eebf5cb302f9b9e305f17"); FeedZipHtml(zip_buf, 6400, "f3677bef9d5ed8a5612a507ee095a25c36b51cd83e06e209e1"); FeedZipHtml(zip_buf, 6425, "53107e70f89e3155c5e0c1a094c1b9e909db35d9fbe4602ab6"); FeedZipHtml(zip_buf, 6450, "db5ebf94b955db13beebe1bb7df87e3a7bff7b2c4af95bb53d"); FeedZipHtml(zip_buf, 6475, "21bc1ec2ff7db63f9dc3f76fcad5b76a7b42783d84ef7fd40a"); FeedZipHtml(zip_buf, 6500, "5ca7637a33d93ef3053ec48599c42b2ab18069d8f25f700660"); FeedZipHtml(zip_buf, 6525, "83706eec5c0bacfa5449ba83715c453dd9fc44c0fa045c3b38"); FeedZipHtml(zip_buf, 6550, "bb989d88e957262189bcb8e09a14fd5d744a0f0eaaed8996f5"); FeedZipHtml(zip_buf, 6575, "6809f83a9bbedd9c6d95ee36dcf484eeba9bcd96f30577e8ad"); FeedZipHtml(zip_buf, 6600, "e7cf9f7f9d82f803911c7b23d1068458a2d2d3c69633766ffd"); FeedZipHtml(zip_buf, 6625, "904b5fe6d15fc70766c13ee600645476c3898f2907012588f7"); FeedZipHtml(zip_buf, 6650, "57e42a45b837065e9fdfbbe95fc69ce26855ea03f5f31fb0e0"); FeedZipHtml(zip_buf, 6675, "5ccf3fc65bb95f123014733fc55783bfdf8c7cfdab3bc6ecc1"); FeedZipHtml(zip_buf, 6700, "44a00df5bb9eca6cfcd3a3e761abf9dfc73d9ac2c8034844d6"); FeedZipHtml(zip_buf, 6725, "4bd44e1dae61a11d3b690295485628e4df474081358532cc30"); FeedZipHtml(zip_buf, 6750, "85c1f2e531d0282914ee60bd3e335b5b7482a70a3656ff98a2"); FeedZipHtml(zip_buf, 6775, "72394d317f85b7ad46a16f733c19872321d73196c53e56759d"); FeedZipHtml(zip_buf, 6800, "d1ac98e030527c002b5877a82bf384bb942a912b4344025850"); FeedZipHtml(zip_buf, 6825, "6533978547af87a12fe87bed5028962b84ad80472709ca676a"); FeedZipHtml(zip_buf, 6850, "3dd549ad4b8a4b566e4017ff73e42569a64855753a9d29763a"); FeedZipHtml(zip_buf, 6875, "de60a092ca4077ac8971bcf3f1f268ffe4a0fd0b26d3a1a5ae"); FeedZipHtml(zip_buf, 6900, "82c63978b752af96a5f61c6620921b1b66672785613eb973c2"); FeedZipHtml(zip_buf, 6925, "b144592fc4177640a01155510911691e55b8e84e2274ff7971"); FeedZipHtml(zip_buf, 6950, "3c41bf34d36a121b85d380e49c673e53130aa9cf68aa0bf7c3"); FeedZipHtml(zip_buf, 6975, "ae265294aa76582e53dc665792ab53e4acd6e6c5a22687a7af"); FeedZipHtml(zip_buf, 7000, "d3cabc38d31a17e3457279f34825e726f8a1c5b28695501173"); FeedZipHtml(zip_buf, 7025, "d7c00b6283939c92d4ad18625714df7c5ad48df00aa42ac27a"); FeedZipHtml(zip_buf, 7050, "330197f855fb233f9ba134f49955198236f7762d53abaa1d5b"); FeedZipHtml(zip_buf, 7075, "e7537d92a9872553bbe124483e04b1db17ed88d4a335715fa1"); FeedZipHtml(zip_buf, 7100, "536b46ab2f4f302ee3595dcc857479fabccba427f41cb98864"); FeedZipHtml(zip_buf, 7125, "ac9520617aad36ae48f427d883e660ec7b344ecf93453bf048"); FeedZipHtml(zip_buf, 7150, "32f2029d621e63ad0128b370725a4910c447262aa66cccbaea"); FeedZipHtml(zip_buf, 7175, "186d8a80745753b80631517e4db3b254be9c56826554d164e1"); FeedZipHtml(zip_buf, 7200, "ac03f12496d0291aacbc06e91a09ca9787e9c12a30190f95e5"); FeedZipHtml(zip_buf, 7225, "033fc71eb04db67a3092f66eaf8ffa25975ae3e765575a5f80"); FeedZipHtml(zip_buf, 7250, "7b30bf877a2b8f2cf495b4c580df257add7bb9ed2af63a3dd8"); FeedZipHtml(zip_buf, 7275, "4505000ac1e36c6895bd9584e22740ee095dd0544331ed353b"); FeedZipHtml(zip_buf, 7300, "e0030dc64a0f87a553c5614d3dfd2cc86d4e8a4b298e0fec10"); FeedZipHtml(zip_buf, 7325, "764c84951dc075ce4e0f4fdae9ebd2821d18893157684a0b4a"); FeedZipHtml(zip_buf, 7350, "5d503c00463c2881c70a387c95ab1d0a00378ce862f56a849b"); FeedZipHtml(zip_buf, 7375, "665499c5c9cee36396922eab15892a4715ae830d32c6d360f2"); FeedZipHtml(zip_buf, 7400, "13a70e56f5c749fe271e080c6c63b8c7d1824a75e845fb523e"); FeedZipHtml(zip_buf, 7425, "df2de45e912df326a75a02b5a886e62d9e81e063375e233ba4"); FeedZipHtml(zip_buf, 7450, "cf99238fdd6f82e1cfa6b8cf6ecc6a4fa6e2a9f8c499fd41ea"); FeedZipHtml(zip_buf, 7475, "24e5a9c4f669392fccf83e4991b3529921450351446f0adf9c"); FeedZipHtml(zip_buf, 7500, "f8e54325960fb43ccdfeba145999414a58aca41642246296e2"); FeedZipHtml(zip_buf, 7525, "1b87928a7dcd849f4cc5e5e70a647e9e1b9bce9f7f294c7fb6"); FeedZipHtml(zip_buf, 7550, "e0daf9730e6c1f5760fb787e6c8ffe52d83eb6617b340f6f57"); FeedZipHtml(zip_buf, 7575, "a1fbf31df03d8dbbcbe9f1b828f1d94a8a3f6725c6118c60a7"); FeedZipHtml(zip_buf, 7600, "04b6c0313dd9c4b513594c0400aec6c996bd49e20b07e0e8bd"); FeedZipHtml(zip_buf, 7625, "85622e9d661624c662401b9f2a13c8056261b57400e09c9fb0"); FeedZipHtml(zip_buf, 7650, "4042cd5453252d5184a943033a0da0f17e27cca37dfd68f06b"); FeedZipHtml(zip_buf, 7675, "a011ab9ea539b808fad8416f0931e400cc182c18458daaf0cd"); FeedZipHtml(zip_buf, 7700, "0c29b7ee9716c7133ff16cb2d0a372e63280f25d5a6ff02f48"); FeedZipHtml(zip_buf, 7725, "abd7940340adf7adae6be8a08d8a05dd30a99e90b9d1d1f781"); FeedZipHtml(zip_buf, 7750, "b45baf344bc1bcf57c37d2c958e1736f824e833010ab60e427"); FeedZipHtml(zip_buf, 7775, "ec1c08b9d808a57246dd068b6be18940b3cb8ae697d7701e48"); FeedZipHtml(zip_buf, 7800, "892597903a91940f61bd117e2a758d65996cd78bba36af68da"); FeedZipHtml(zip_buf, 7825, "d672ba55db5e779a8d8cb90c27f1ac1b1cfd3ed56f1627625c"); FeedZipHtml(zip_buf, 7850, "3af2576719bb643638bceb8778d3717478b27fd13e3f3c3970"); FeedZipHtml(zip_buf, 7875, "dcf1380a6fbc51eaeb61b49a1b25e671b8415412cb5211d6ce"); FeedZipHtml(zip_buf, 7900, "36e32dbd8b9a860b7408712156d7cfe4e44524b12cf41d7404"); FeedZipHtml(zip_buf, 7925, "b14b8aa78f9d6178ad3c9e24688adde8b52355204c4b417601"); FeedZipHtml(zip_buf, 7950, "f2c9a80f9c063287dcccf523d52758811165ec3633ab4cfe5b"); FeedZipHtml(zip_buf, 7975, "7f1124b25d2f29d4df2c5c98f2f472cac936e6f39e1813ce2c"); FeedZipHtml(zip_buf, 8000, "0cfbbeef8de31269908d7715879b4bf7c62b1707b023ab3b7c"); FeedZipHtml(zip_buf, 8025, "7ff222113f556018b30a810f4a70042fe12f28323b51d72e2e"); FeedZipHtml(zip_buf, 8050, "d0b0e09da316bf6365edf201e2242c9787bf96a44ddd922668"); FeedZipHtml(zip_buf, 8075, "ec00d566d8985eab425c3fc59408508cbc048d2dc5ddd99188"); FeedZipHtml(zip_buf, 8100, "188c7339dc00eb72cb87367c2f3533e73fed7877dff112af5b"); FeedZipHtml(zip_buf, 8125, "2ac64687fbdef99ee4bd31795754ad25efc57df5af2ff77fdd"); FeedZipHtml(zip_buf, 8150, "0d5ba9fa0b386bda6a7715fb3c6de30f48accf4e8f3e1d9c9e"); FeedZipHtml(zip_buf, 8175, "54ede14cb5a76dfc3bdcc6ab843adbe76933af9cf9d148bdde"); FeedZipHtml(zip_buf, 8200, "c96b4afdd366fe57927bbd512791677b0150ecd3cc667eb959"); FeedZipHtml(zip_buf, 8225, "3186ecb2f524fb4bdbf189b4c047be07c2cbb29a5c8728d4b1"); FeedZipHtml(zip_buf, 8250, "130fdd485f3062880ee6408e04ddce766ff4c30956135fa7e2"); FeedZipHtml(zip_buf, 8275, "072f3e86ee158ed8f3fab4a52644728f4654fca1c755dc40a3"); FeedZipHtml(zip_buf, 8300, "fff575cda3b534b2f78f17549ae820f22c19acd2b6f40e7227"); FeedZipHtml(zip_buf, 8325, "12ae9fbb7e8cbd3fcbd3efa02c62446b5e4657a1258cbc8117"); FeedZipHtml(zip_buf, 8350, "d8af99cb24b06e74f845fbf241c23f8f0629ade4b1ad95c700"); FeedZipHtml(zip_buf, 8375, "564921c05c6aaa0b5b61ecb4a4fcd2ded81b0899d79f0a9479"); FeedZipHtml(zip_buf, 8400, "dbb86c046945ae585044308632cb4ff8de52415f9f69a56075"); FeedZipHtml(zip_buf, 8425, "1d7c908693e91b4d7d2dccc1d64914fa32925ec64623a65905"); FeedZipHtml(zip_buf, 8450, "24a0ea3a98838f5e0dbc9a9e9767e2cb8069c28def6da320e3"); FeedZipHtml(zip_buf, 8475, "ab05599391a8c24f104848bbee24061545418c7857cbb7d71e"); FeedZipHtml(zip_buf, 8500, "bf5a93e1dde9bba20ddfcb0d0f4363dd471ab6a5c493c65fb1"); FeedZipHtml(zip_buf, 8525, "4f7016fab78330a839bc845e55369c06bd0e7fb40f3d157b1b"); FeedZipHtml(zip_buf, 8550, "88be69bd0e39145f6b56989c458049a6f46c2b1f24cf77fb2b"); FeedZipHtml(zip_buf, 8575, "5cd6223114af7ea3d27abefa7c4532310b9552a46e1cc3a8e6"); FeedZipHtml(zip_buf, 8600, "6b8b3b5c9b97ebc13696701be0266bd785d9f607a44f66d087"); FeedZipHtml(zip_buf, 8625, "0f760d0bd689895ef7935e7cd28b4f7a7116bdf88bb87107b8"); FeedZipHtml(zip_buf, 8650, "28bb5acc343f208d3283567ca84b58b0521caa653fe9c4279d"); FeedZipHtml(zip_buf, 8675, "f8a41367d189eff0ddd771c7e27e572d2de7a6ca71765bd1c8"); FeedZipHtml(zip_buf, 8700, "4ef72a9fda6d79e33d3e22a037009bb0347e01805e68fa690b"); FeedZipHtml(zip_buf, 8725, "e0953f45298598d832e4d7eb61687cff966282b1de820e907f"); FeedZipHtml(zip_buf, 8750, "fd23517da6070ac7efce1d7ef107f43407aba627076b965355"); FeedZipHtml(zip_buf, 8775, "b7dfed21d97c41b24b23a07a2986c1ca195291cb8b464325ed"); FeedZipHtml(zip_buf, 8800, "92fbcb2785cde5ccb3f78c77255b57062b97106cff2611b6c7"); FeedZipHtml(zip_buf, 8825, "7efc7bba87dbde2d2c1083e91e9b7b9c5c5c6d07b40ca563e8"); FeedZipHtml(zip_buf, 8850, "8437fc321b340f8648e2b373f41d0262cd32e2772f95de0e0f"); FeedZipHtml(zip_buf, 8875, "76ce2d19b7f9f76a9c95e40dba3bc6002e9c57e53030f7028d"); FeedZipHtml(zip_buf, 8900, "32f5b6d6c87a4eda4527fe361e1badbc9eba2f153362bc719d"); FeedZipHtml(zip_buf, 8925, "6124fa6f9f0d93641cbfdad8b8bebe5e1fb89ebb36f0e2752f"); FeedZipHtml(zip_buf, 8950, "d9e8e39b5f1ff6c64e3c7631b50026dbb8f6be79ff87deaf23"); FeedZipHtml(zip_buf, 8975, "fec0e422ecbab8b50917b69f1890c1e9a3ba68141633d5d431"); FeedZipHtml(zip_buf, 9000, "511bdcb4103eab76930d2d86f38d2df3c90265062f24941d97"); FeedZipHtml(zip_buf, 9025, "553a2603c864af00a91dbdaf7f9c53d7e479414fb174fa0009"); FeedZipHtml(zip_buf, 9050, "8ebde0a3e56a8f1bec125aa77802020ae79cf90659888644bc"); FeedZipHtml(zip_buf, 9075, "dfaca572cb8fc93da90b80ef80403fd1531e5ff413aab88b09"); FeedZipHtml(zip_buf, 9100, "29f8d1386ac85e0e5427988c3a22ba23d14c083cca10a5394f"); FeedZipHtml(zip_buf, 9125, "9f6baac9f7a98c7c9f9a20df1c832c8c7cb7f5c8175e8be8d1"); FeedZipHtml(zip_buf, 9150, "d0cfbd29113f68b83bfde61ae49ec50f8e57c3c7237fee4d89"); FeedZipHtml(zip_buf, 9175, "fc414313f47b7cf237198f1f8bfc798125e104ebbdcf0f08ef"); FeedZipHtml(zip_buf, 9200, "94126a32723e9bf8675f4b9e0af78a69999dd2ec3874a9aafc"); FeedZipHtml(zip_buf, 9225, "67a7e7c17138aeccf905dc5e420e687848e4706fbe0b727881"); FeedZipHtml(zip_buf, 9250, "2563054bc7f1432287948ee3474b8ee39ad251420e687848e4"); FeedZipHtml(zip_buf, 9275, "90d2f11726c79d73cf6d72eeb96c1925cc8097441399a6a0e8"); FeedZipHtml(zip_buf, 9300, "cf619f9797c4ceefc2f7d7be05e1754069929d7375d674d92b"); FeedZipHtml(zip_buf, 9325, "f394942e0a478899f26c74d8da72aebf2539e7c34cbe509d2e"); FeedZipHtml(zip_buf, 9350, "11a4b0d1816713c78f77165fcd7ab5f92eb1f15d89e602ecfc"); FeedZipHtml(zip_buf, 9375, "fe6bbb1d02cb5b15986ab4a16d29ce20987be39894ab8325ac"); FeedZipHtml(zip_buf, 9400, "7ccf0d124ad12133d0010094848ec497c09289e87274d7e95a"); FeedZipHtml(zip_buf, 9425, "a6a92df59f2d33080e0b7cf2f6b9764f71020fe9a52adf20e8"); FeedZipHtml(zip_buf, 9450, "62a39cf333cd846a4e14321b9bca6bbc1cf3373df67df2bf84"); FeedZipHtml(zip_buf, 9475, "a204c978099bc131e82df933afb49c00e6a784a3f4a3191195"); FeedZipHtml(zip_buf, 9500, "e6bc295062f1931497bad0c52c70aafbe43213945279f66f2d"); FeedZipHtml(zip_buf, 9525, "ac266fe9ab043dfd4eca227d31b334ca688082ac2f6ef8dcda"); FeedZipHtml(zip_buf, 9550, "16047df333dcafbe9270949d1b8afb0233521a9651ce4bc745"); FeedZipHtml(zip_buf, 9575, "cd6ee4989a0d616618488e2acb98a6b8dcc52d67b153dd27b7"); FeedZipHtml(zip_buf, 9600, "99a094315cc91ea98398a66d94c7854d2cf7e93ce8abd86696"); FeedZipHtml(zip_buf, 9625, "3a5f091696b1cca5ce7cef4c5a63873d2ed962cd68b84add98"); FeedZipHtml(zip_buf, 9650, "db09cdefe61371fba6b5a4996ccb5eecba9631e1bd33e2b40d"); FeedZipHtml(zip_buf, 9675, "1a4f90bba1ef5b18511d7bb199934f567b36cc610891c501e6"); FeedZipHtml(zip_buf, 9700, "744ba403583d1fcb9fb81c354b5df83d80709f0c6d03a984ad"); FeedZipHtml(zip_buf, 9725, "dff50ada351be0d8b36b353f4de8da8cc9bfd08916438cf290"); FeedZipHtml(zip_buf, 9750, "fadda2e52f1d74582921ea7849844962bb29cf857d9507315d"); FeedZipHtml(zip_buf, 9775, "70ccaef7fcae4f4ebd28e3d45b97deeb08c3c96381c567620a"); FeedZipHtml(zip_buf, 9800, "2927471505a9e2a385d68a7e922da1f2fe14fc63058314f7df"); FeedZipHtml(zip_buf, 9825, "1c87946c7c7353ae72375ac274f7c92d993df511b2cc9d2f5d"); FeedZipHtml(zip_buf, 9850, "b61abb7479c799989fae5d2cd72ebffffaaefcd6051a51ac3a"); FeedZipHtml(zip_buf, 9875, "fa0e0e388491d9cce54b93e33ffc3b988e9d0dab6e61de55dd"); FeedZipHtml(zip_buf, 9900, "c2bcd3b73065087c34b7318a0befff32c62a0f662be15b7b85"); FeedZipHtml(zip_buf, 9925, "66e0d6295731cd0cfdf06f6214826d173156e41b1f1282b26e"); FeedZipHtml(zip_buf, 9950, "8f19b054e31a666173d8fd380b5bcb02a77a24b7305936339c"); FeedZipHtml(zip_buf, 9975, "162502aebf9242a87d19338961f515cc0246cf2e6c41b0373e"); FeedZipHtml(zip_buf, 10000, "c1e3b87fc9b250f692c0ca45c705659ebd4298015bb52e5f16"); FeedZipHtml(zip_buf, 10025, "364b61ad4d4e5372edd2f4621e801fb1d6ad8b85cb6a6c8ac7"); FeedZipHtml(zip_buf, 10050, "f91dcb7223302beeea5cb92c613a3b0a96b1c8654e7cefec39"); FeedZipHtml(zip_buf, 10075, "cb7d8b551356efa8c7f94d2f7f4730bb644fb96c59e8449635"); FeedZipHtml(zip_buf, 10100, "2f76554b98efde5970969b962c0bda5df9a5be0c6390cc7139"); FeedZipHtml(zip_buf, 10125, "ebea9fc3f350f39a6569f396e265a9cb5e3e048fee8ec5caaa"); FeedZipHtml(zip_buf, 10150, "99e654dcb3feec066cfa45cef397ba60911ebbfbb862296110"); FeedZipHtml(zip_buf, 10175, "fb6e3737e5ea5eb02c68b6bfdefdca3239e6ce372c2f6c372c"); FeedZipHtml(zip_buf, 10200, "612771bd406541c83f5dd9987aafc2a95ff21ef1effcb66527"); FeedZipHtml(zip_buf, 10225, "b65f99f2efb513ab98d239e3a7cbde21f971576c65a2a8de0d"); FeedZipHtml(zip_buf, 10250, "c84efcfbaf6d1bcee0e79275a3064a5fa665d5509a426f61a9"); FeedZipHtml(zip_buf, 10275, "6a6658349052de4dc8b778a856ba09a5cc0b400e476e90385b"); FeedZipHtml(zip_buf, 10300, "7b0ea1a014414af91671c42dd5ec91aaee1c67cdf8f103e1ad"); FeedZipHtml(zip_buf, 10325, "7736ddbb20cd39f2e26e5e7bc693f1388ce8665adc84588623"); FeedZipHtml(zip_buf, 10350, "d58244d124feeed5e0c56f07366e859f2b243a123ee52ccc0b"); FeedZipHtml(zip_buf, 10375, "f414695faebcc3129c2f3859d7f55d7c21fb1bd7603988dcf1"); FeedZipHtml(zip_buf, 10400, "d0ebc66c09d5567dbf8e7c1ba2e0e7a6549fca16260745cece"); FeedZipHtml(zip_buf, 10425, "f658c5144addc81b1763e156ef55fd22419e6d9f9d9ffe7bfd"); FeedZipHtml(zip_buf, 10450, "6539417e3d3e2282fc2a6e8721d0e3d88dbe4dc6ce11a67976"); FeedZipHtml(zip_buf, 10475, "07c24a0f8513cc3adaf7a23821c1e517cbf2467b200211e11b"); FeedZipHtml(zip_buf, 10500, "699c63a0eedd852f307de02b2eac214087f78c4ff5372e5f91"); FeedZipHtml(zip_buf, 10525, "8b84c1c37453c96da5ff03ad6f2b2f188d2d07fec70c0158ea"); FeedZipHtml(zip_buf, 10550, "83cc9a8110b8deb2d0871f0aec7f6067ff8345b03f0d8ad5e0"); FeedZipHtml(zip_buf, 10575, "8b5fde2f9fd7513b0792cb01be016a9adb99f8fc901ed4abb5"); FeedZipHtml(zip_buf, 10600, "bf755ed00a92219c8470e017eb371844a1d8b7b7ea84306774"); FeedZipHtml(zip_buf, 10625, "edc5ccfee124c1f483bcb9e977fdf8e5d6facd54b6867ee56c"); FeedZipHtml(zip_buf, 10650, "0d8d40e987cfd607b3b1b508ff7d717a62656d6e9a87bdb191"); FeedZipHtml(zip_buf, 10675, "73e8c6f7bd0bca55645812d0f66ff7cabda0adc439650c9e84"); FeedZipHtml(zip_buf, 10700, "0a5b16f654d6280c22d7458be9e2019d227968ae3e9cd0c36b"); FeedZipHtml(zip_buf, 10725, "34b738ffe52bfe46e76da6a4ca9d6d8e050a428d22844da6fe"); FeedZipHtml(zip_buf, 10750, "a5d98d64c9f213ca4fabd7f24ee6e17c17de14bb6e65baee9e"); FeedZipHtml(zip_buf, 10775, "5fd0f0f1100c41a5534a2679415f1a833b7f77f8bb5dcc1299"); FeedZipHtml(zip_buf, 10800, "effed23a11a6bb9c32cf3f2cf3d06799692861f374912de3df"); FeedZipHtml(zip_buf, 10825, "5c07e262fcc783175f89cffa22bc6ff5ccf1eff79421d51440"); FeedZipHtml(zip_buf, 10850, "04833883f2dcf6448f4e48ceafc609c926724eeb2c8c9383c3"); FeedZipHtml(zip_buf, 10875, "0b3250e0a78ee78369b2329523ece8305b5b8ec845283e4446"); FeedZipHtml(zip_buf, 10900, "20bccdc40556d7c47eb96f62c95cd02ee502764535cb031664"); FeedZipHtml(zip_buf, 10925, "98adc403c923e081f60c3cf0fee0bd8d05e0e7120e58c54445"); FeedZipHtml(zip_buf, 10950, "852dbada9fd22c5f006cc416eff74ed3c44ad26ff29eacb869"); FeedZipHtml(zip_buf, 10975, "fb31ae20bf19870125f99e794ffef829cddc54b6097ffcf4b9"); FeedZipHtml(zip_buf, 11000, "aad396ec745cd5e9851ac9daabdece6725b6d1d872fa837ed3"); FeedZipHtml(zip_buf, 11025, "71ec4be37ce48bd9c2d377e276c946d89eba11628fb58e1f76"); FeedZipHtml(zip_buf, 11050, "32ae478ce9aefcdab0802f6f6e73c85ce0d099d63f4bc477f9"); FeedZipHtml(zip_buf, 11075, "139b8da3c701d52a9c1193e1a52a91f3a801964d1d4cce5f67"); FeedZipHtml(zip_buf, 11100, "2df3c8755fbabacedbedd3b3d372b5de56465fdb0b6e6734f8"); FeedZipHtml(zip_buf, 11125, "368edd71e07dcbedf916b59da9d4a26ab3c4785b69e25e5f61"); FeedZipHtml(zip_buf, 11150, "1a28374b4e1bc896455eb8742a192949286bb9dca665567bf0"); FeedZipHtml(zip_buf, 11175, "f70866ec79030f73d40ec389df433703ad26ba123d06d19eab"); FeedZipHtml(zip_buf, 11200, "ddc869d8c2e39288e3cc88b080b778f502e72111110eb09aac"); FeedZipHtml(zip_buf, 11225, "3c4cadac63859a42851927539c47bd3289a98aebe7fdf3535a"); FeedZipHtml(zip_buf, 11250, "570b0e9cb9895c50c2bebfb29edba0caf1aa79cf44a0e63a8d"); FeedZipHtml(zip_buf, 11275, "3eb9f5e2557218fac2951581b056520b8b3a9c7fd8a75ff8d5"); FeedZipHtml(zip_buf, 11300, "cdfb9da30bfa7b8546445ce135f715576ba2124a9867114664"); FeedZipHtml(zip_buf, 11325, "1089b7b49f53a2df0bba3e96558021113d5436c80474031ae8"); FeedZipHtml(zip_buf, 11350, "c777ef4e295ff62c98bc8d3370aecfba55db3726b3b5e524f9"); FeedZipHtml(zip_buf, 11375, "475347a7efaaf7ea46eb6f950975cdedba5df7b072e78bae97"); FeedZipHtml(zip_buf, 11400, "f94b2eac6c8c9c95a2e1bbbed1da4bedc93cc3e9a66a63c860"); FeedZipHtml(zip_buf, 11425, "b2cc2dec1c9fdfe73dac36ac953acab32fec9743af3b442127"); FeedZipHtml(zip_buf, 11450, "2d4c4e6650134012d07ba0f9b3a3301ee4588616076eee9617"); FeedZipHtml(zip_buf, 11475, "fdd9c58e1534c9b63f80837aba60ac54e73b93382d5f575000"); FeedZipHtml(zip_buf, 11500, "6efc4a7bee7ff80996fb9172d9ffb4eaf01f9f337fd193cc9f"); FeedZipHtml(zip_buf, 11525, "10c5b2957f28c5ddc91e1ded2c4f4da9653e366c165b9c6a18"); FeedZipHtml(zip_buf, 11550, "394ce32d9e0165eabc48f6c90b634f7c5919957718bfd8b3e2"); FeedZipHtml(zip_buf, 11575, "051bee0b2dbb43d1fd16db3222231e3209c3eb9459c4fff0d2"); FeedZipHtml(zip_buf, 11600, "53258646150f922ae1675b17f624d9ccdb3590619342c6d0c2"); FeedZipHtml(zip_buf, 11625, "58759ed3bf69db5e756a4d88f6c71a0ff1e1e4d793d3df4f72"); FeedZipHtml(zip_buf, 11650, "d61b15ad577b0f181d576157c698d15f941f5a5b4ce58f7b0f"); FeedZipHtml(zip_buf, 11675, "e363e1c61354fc7632aae67b2566192d8f9f689933f2903058"); FeedZipHtml(zip_buf, 11700, "0ad46ee4a9d6b9a2eae61ae03ef75d0adb90dba407c6a31b24"); FeedZipHtml(zip_buf, 11725, "1e859fc4934e22cba56a4317fecd9b3015d02b284bb4bf9d91"); FeedZipHtml(zip_buf, 11750, "401dbbcae1ad531e08a1a16c1129f8753e9b67b62fef13ed17"); FeedZipHtml(zip_buf, 11775, "5ce40d8cf0be8844d0855f6ee3448c1c3839e80a85c520d832"); FeedZipHtml(zip_buf, 11800, "3c8aa40495dc50eaf5b09c5496e054ec810d4da18ab148ee80"); FeedZipHtml(zip_buf, 11825, "0ee74bc015dcc23f64a03532e078ecc3e9f06bca17bf635881"); FeedZipHtml(zip_buf, 11850, "2e9b18886bc3730da7366d5ef2568e15067867b7a815b237b1"); FeedZipHtml(zip_buf, 11875, "e25ae566b13f1a2796984ad9301f67cffcf1b299bbc90d03f7"); FeedZipHtml(zip_buf, 11900, "82bffdd7cf5b9b9baf333b0263a3feb640d5228c3d412314e7"); FeedZipHtml(zip_buf, 11925, "6427858dadd2096275ae10887c64d70ab25f607c97654f512d"); FeedZipHtml(zip_buf, 11950, "f3127ed6af1743f9f247117f21cac36f14a52768fb924e0118"); FeedZipHtml(zip_buf, 11975, "5a85a6b0d638c693560523fc864ac3c607d45011a023e2c8bb"); FeedZipHtml(zip_buf, 12000, "ecfb2ebf8b51be383324ac9c4b9a1d7b5ebfd4e3e5107dc83b"); FeedZipHtml(zip_buf, 12025, "d4ded07dd81d0965d96ae2c82422c1c1379d1642b8b2ca75c3"); FeedZipHtml(zip_buf, 12050, "5dd867f09b35dffbc64ee9085db2183c1af3d8ad2b2fc45064"); FeedZipHtml(zip_buf, 12075, "f93806adad9e1bf59cd3835d3ebfafe82038f4e4793d2ce7c9"); FeedZipHtml(zip_buf, 12100, "756c6af3702f14b143ae52f4c6ba60d351a1d0241c039d065e"); FeedZipHtml(zip_buf, 12125, "1720a22d6c1a039fc399c6e602c934df89e14a4ce8854cd02c"); FeedZipHtml(zip_buf, 12150, "43674d8af6fec7b6b47491a4445e2ccf9a6a0ca093b42402aa"); FeedZipHtml(zip_buf, 12175, "5684d4a11f5689f571a16058df3e2a2eb497629af5604da4de"); FeedZipHtml(zip_buf, 12200, "13c0a79678dd4c7309274c61856999e41634c522d94d73558f"); FeedZipHtml(zip_buf, 12225, "80765a93780244bfe50b132a63cdd7335d7712132f3241bce4"); FeedZipHtml(zip_buf, 12250, "afca6064bbcb5dba8b09dde80961ddaa9014d9687d05a55a66"); FeedZipHtml(zip_buf, 12275, "28f69e79ff3afbe7cbb6ddd491d4725b4405e3bd58facf4718"); FeedZipHtml(zip_buf, 12300, "dd9184111ed23a725d88e6c1fc86d27e7025fcd0e685512d73"); FeedZipHtml(zip_buf, 12325, "e27d8ecfefd3158067613718f882118b523360ef897cc5bb4e"); FeedZipHtml(zip_buf, 12350, "de38f5d4d84bf12d9dd660f4042272c6982f2856be1c351663"); FeedZipHtml(zip_buf, 12375, "05830cbeb48e0f4f3eae3af0bf9f56565bc73b1ff51f8efa6b"); FeedZipHtml(zip_buf, 12400, "e723ffc51db37f61cfafe562b47f330631b73a48b9a9d409e1"); FeedZipHtml(zip_buf, 12425, "8eb0723936d82a172ec11f3107357463da1f8bb0d342591250"); FeedZipHtml(zip_buf, 12450, "4db2a3836e193a94cb522e956646af677a9b2d69299ffe28d5"); FeedZipHtml(zip_buf, 12475, "568eee134a0f5572dfc26df77be342cb49c20414467aedc280"); FeedZipHtml(zip_buf, 12500, "392d325d39088012f182819ae613da50ac7e25a244dcac5420"); FeedZipHtml(zip_buf, 12525, "e11c5fd2db71404d0f1005045701039d108e41186c1b7918fa"); FeedZipHtml(zip_buf, 12550, "002c80c0d11ff4410512ce05c6ef5bd4286041b6cda9099b93"); FeedZipHtml(zip_buf, 12575, "ac9cdfed8b57dca09d6b979fc092fb8eb674b2005094803de8"); FeedZipHtml(zip_buf, 12600, "e110edeef52a85e27f3b19b672242eb54d0123478c1f68021b"); FeedZipHtml(zip_buf, 12625, "c469f1933d663bdd0d89e8bbf07b1888d5da7719f48565249e"); FeedZipHtml(zip_buf, 12650, "0286aaa0e8fb30ea8aa35fcead24558df746d37f4f60019897"); FeedZipHtml(zip_buf, 12675, "b7c37979d7382f6fc7cccb4b404a31defdbdb5c27138caf87c"); FeedZipHtml(zip_buf, 12700, "93d00d8361a0c07fcf61328583933011aff87c6b1cdf9597d8"); FeedZipHtml(zip_buf, 12725, "4b045d6eb9a05ffbe42f4ed80c857d4306a791a10a5fc81835"); FeedZipHtml(zip_buf, 12750, "03d5f03f38b904a492021afe723aa44bfc4e250c185be220d6"); FeedZipHtml(zip_buf, 12775, "6c0e56222e0096d3ed52dcc5c047ff83b3eb87dd6ff4f6ef7c"); FeedZipHtml(zip_buf, 12800, "02e46fd14142aabc5ab365a4b7ab4753f3b1730847cdea4ee3"); FeedZipHtml(zip_buf, 12825, "b031c186b5e2a7d38451d1b90e2f3c31432d6690b46898294a"); FeedZipHtml(zip_buf, 12850, "293c9d3966618ac3b85a3918ed53b260a49e8405f18219c1d9"); FeedZipHtml(zip_buf, 12875, "52cf2256c84165d20b1468983dbd5168e8424579843bc96ca2"); FeedZipHtml(zip_buf, 12900, "ac3fa912e5b2200703253a3a9470f25ce3240893d766bfb5cd"); FeedZipHtml(zip_buf, 12925, "fc65a0c48f27e272c97833a12d8c73ca1b1e1be991c5b50761"); FeedZipHtml(zip_buf, 12950, "4e56b2d95c906475d86f2afffd5519b051f5319daba63364f3"); FeedZipHtml(zip_buf, 12975, "8cf8ea6133e25d6383233176bd281f1fec26095eb6caeb1bee"); FeedZipHtml(zip_buf, 13000, "e38c5c1f73040873d1df79e0f0851b7889f7a74865baa00672"); FeedZipHtml(zip_buf, 13025, "3d2af480ad6161a6496b1cc6b1d7f16f579c5882689825f80a"); FeedZipHtml(zip_buf, 13050, "659ab94201f515264bea0db4d5f8e84e223e32e045ef48c5bf"); FeedZipHtml(zip_buf, 13075, "63643afad0e140d14de257e9d3157a63017c283081059de8bc"); FeedZipHtml(zip_buf, 13100, "ae6058f4530ffd1e833aa362f829a6947f13506102d3717569"); FeedZipHtml(zip_buf, 13125, "26f3e546e55384fd003fdda5a481253e8e42978742df8ce909"); FeedZipHtml(zip_buf, 13150, "c76aef0af0d68f00028e31c38c1faafd35a9d4378c337e178a"); FeedZipHtml(zip_buf, 13175, "17c2d2912cd38364360441cba6a73e1df958874289600cceb1"); FeedZipHtml(zip_buf, 13200, "8883aca61e366f5dacb35e1bba57f0f98d2b93a47941d7eb09"); FeedZipHtml(zip_buf, 13225, "f63bc6891bd1cb557e24e36d8b80c6d1e44ecfae38663b7330"); FeedZipHtml(zip_buf, 13250, "859d498c9338bb325050740b017cd9f5dd387ee5a822313a80"); FeedZipHtml(zip_buf, 13275, "d84cf22e7f32736a9bbd72bf4b0eeaa48953b343667f54e833"); FeedZipHtml(zip_buf, 13300, "f3cba6cf814cfdb16e0f9a9a1215b55e7d943e17a3f04a9c4b"); FeedZipHtml(zip_buf, 13325, "012af35ada7acdcad0e66bbf19c65b055ef245e462d499f641"); FeedZipHtml(zip_buf, 13350, "3f16d1292aa63e7aa65127be314bafb06ca17f262b6bea760d"); FeedZipHtml(zip_buf, 13375, "b1c5d7d3e485c6a0508ea48b354a793be6d9e45d833917f1de"); FeedZipHtml(zip_buf, 13400, "5892d7dbfe4e24466d3399dd829fbf151fe5e1d79ad7548529"); FeedZipHtml(zip_buf, 13425, "759983d45444dc90f8950fb4b8565dcfc38b5460527afe927d"); FeedZipHtml(zip_buf, 13450, "f9c201061361bb5775e33cdd8c6b60ca54a65ed1a572a0dfd3"); FeedZipHtml(zip_buf, 13475, "a14dbafe9c31235dd6f8d6929df6a42951a1a6eab44b92f3ba"); FeedZipHtml(zip_buf, 13500, "c045148b13909a0ec480b2f11107ea29d7f3bbe89b7ce52083"); FeedZipHtml(zip_buf, 13525, "7b33ba99b60563bdbc33e825d3b6ce14e11d04770ae82dba13"); FeedZipHtml(zip_buf, 13550, "05856dee949d69324990eaa9bca007ff0c7057c1d7904a70c1"); FeedZipHtml(zip_buf, 13575, "80d51908c9d1bc5eb003e6d1bb7185e2bdab6dae1eb2b275ae"); FeedZipHtml(zip_buf, 13600, "387ecd78df9a9aecdfb921be2b71526e88e77b3c14434d5173"); FeedZipHtml(zip_buf, 13625, "b9e6f7203d83a6cc64dadeced1e1c9fe45fbfcf0e420269d7b"); FeedZipHtml(zip_buf, 13650, "767af4e9e0f4245ea5b8290a70894bcd8d0f41772a418a7d1e"); FeedZipHtml(zip_buf, 13675, "08490267122c8c2a0bd1136e9ce474044578e2efb8473c2909"); FeedZipHtml(zip_buf, 13700, "a924001fed509b2e39fd90363e103ecc0492ad65de6b2b5ec4"); FeedZipHtml(zip_buf, 13725, "1f613f0854ee47300de4b95ed4d70f9803a8a36c849eb2116c"); FeedZipHtml(zip_buf, 13750, "5e2a56100ec6b3f9827500e9064ccb4703cb04aa1896144f3a"); FeedZipHtml(zip_buf, 13775, "6b038da5123dc148cf9a8936b2a43d1e106d520df940099402"); FeedZipHtml(zip_buf, 13800, "d804950cfbdc2e39d4fc80e82377ac074a1c095d1394c99ec8"); FeedZipHtml(zip_buf, 13825, "6cc4497b3c20fa1c7f386a1f3e340547d950466124d55b2b5e"); FeedZipHtml(zip_buf, 13850, "698c42d3d55caedb43a3d583547829c152f09aa4da14b567f6"); FeedZipHtml(zip_buf, 13875, "7968f47a780ad0942e82ad214af16c3957918d5c45a7d20322"); FeedZipHtml(zip_buf, 13900, "dac1fee9f17efbfcd3eee9d1d1fe6efbf09e48973dded49191"); FeedZipHtml(zip_buf, 13925, "4ae198d781ac0b283e200aa55bd65aeabcccaac6352323c912"); FeedZipHtml(zip_buf, 13950, "a5309be5cd7552488baf37fa94d7abe1fd2f930d4dce6f18a0"); FeedZipHtml(zip_buf, 13975, "7302318f4eb741a2acadb97131a3b6cac15094ec12483475f3"); FeedZipHtml(zip_buf, 14000, "4258f3ca92e5ee824ccc32a9e4d60724553981b2cbd2fd88d1"); FeedZipHtml(zip_buf, 14025, "1c1234ef1139c732f3cace9d0e803918e6929af90f393578fc"); FeedZipHtml(zip_buf, 14050, "aeae324c7cbc96facb2e300fd99a9186eac96566d3279ca1cc"); FeedZipHtml(zip_buf, 14075, "a64b3e7e7a287a4433233fb7c4abaf2f3ab9da57ce3867268e"); FeedZipHtml(zip_buf, 14100, "ae54a0320b9b7dc59f1ffc923fcfb7e6e3f2351f3ffc351fcf"); FeedZipHtml(zip_buf, 14125, "49e88a557ffe6b2d3b559eff3d5f1ed17f94e51195cea7ef5a"); FeedZipHtml(zip_buf, 14150, "557e2cf2d1c79633a6d0a6337d852d037e6d6f2c33279f193f"); FeedZipHtml(zip_buf, 14175, "9d8dd39a7a3a4b7c78b36624f654af0b9d313fd7ece580954f"); FeedZipHtml(zip_buf, 14200, "f04aa5d2b2d17c9a1f89337e7a8f48bc6d128996bdebf3fc48"); FeedZipHtml(zip_buf, 14225, "9cf1d37b44e29ff3205107e1e8d3418ca66a662ccc6876e57a"); FeedZipHtml(zip_buf, 14250, "5411b214eb967de4787eaccff8e93d627dd420d6473361fdce"); FeedZipHtml(zip_buf, 14275, "79b1ff59b69fed4ea22bd8618bcf56bf7ee79bdc05c6e8965c"); FeedZipHtml(zip_buf, 14300, "35a56d2da78b9c4a58345957f372365fe40cdfdd139fbb92ab"); FeedZipHtml(zip_buf, 14325, "8d836efa8c989bb0bc7ca96ed80f7a2548532db3a1acfe570f"); FeedZipHtml(zip_buf, 14350, "0b61f41e7b0abe9c28bc66a9de7a86b83b12c120195ab2c472"); FeedZipHtml(zip_buf, 14375, "43190a6c6a527a17f8edf19ba413f66ed56be7cce27e7edeef"); FeedZipHtml(zip_buf, 14400, "4b85f1c30fa763111ca07ac2404a9d06337d114de199129615"); FeedZipHtml(zip_buf, 14425, "7662752689e3d1e2fbbe87c1549c5f2d7040dbe0bb6955f3c2"); FeedZipHtml(zip_buf, 14450, "f9266eaf41df29af87c206fc0fc3269f4967683fe7b217c409"); FeedZipHtml(zip_buf, 14475, "d3b2da30d9096426392e85249e12757914e7bafe72fdf9faf3"); FeedZipHtml(zip_buf, 14500, "1c62cd72bd2adad34824c05169b91bd378d50138c348a5b350"); FeedZipHtml(zip_buf, 14525, "392c806ad9cb3c9b9c9631d42a2627bf14beef8de3d0ebe553"); FeedZipHtml(zip_buf, 14550, "4fd5ddd11b1ffd2191d5698d64f66df4aec2515544b17c7a97"); FeedZipHtml(zip_buf, 14575, "e6b8ca2cb42ccf95f95011bfe3250ba7854215fbe1b58856d4"); FeedZipHtml(zip_buf, 14600, "cc699cf5683ce130632e9ca726314bdd96753e88849b38bb5e"); FeedZipHtml(zip_buf, 14625, "975e2e8ec75178e38d284e9805b90f3a0be6e46719d9107a72"); FeedZipHtml(zip_buf, 14650, "76ca82f1b1731406838d2337310a1dc4fc62f1da8827266b47"); FeedZipHtml(zip_buf, 14675, "f9fac7be1bb811d5f07cb07291d7c76722f288c04595ac9b5a"); FeedZipHtml(zip_buf, 14700, "0e15c8bb98447db75b532d8388dce5fbfb1484b1821b6521be"); FeedZipHtml(zip_buf, 14725, "2329f53b504d47f54b8e8859ebb4106262537155086e48cd2d"); FeedZipHtml(zip_buf, 14750, "668a0746e225abbb74f2278db70c31e1f7453d117b5da7d4fc"); FeedZipHtml(zip_buf, 14775, "941d6637c71a761203c3e10d28a241beb2a1eb4ecee88e99e5"); FeedZipHtml(zip_buf, 14800, "dd380ebb1ebd8d213b149fde108c9ebc7f1de812dff2958be0"); FeedZipHtml(zip_buf, 14825, "3b557cb4897fb0cf19ab4d7b09d60be3cc4a89fa63e08b986f"); FeedZipHtml(zip_buf, 14850, "580926cafa6326734bcd043db3969e3cfb72dded4977a8be4a"); FeedZipHtml(zip_buf, 14875, "ab89891b1591af458e66d5be8453cdf8d6a49569fdd3cc7b88"); FeedZipHtml(zip_buf, 14900, "57f820420244cba479e32264f2301d9338f9e2062f009845ba"); FeedZipHtml(zip_buf, 14925, "aedf9df8fc8079553edf9bc4047a4033c27907c68e31ed2f3e"); FeedZipHtml(zip_buf, 14950, "929d6ca3607347906be2e9c988b8114049dcf85b395b4ad18d"); FeedZipHtml(zip_buf, 14975, "50764b59133b719f27ee6c803b3348bf2706556c59091b3e8c"); FeedZipHtml(zip_buf, 15000, "a377893faa6d84ea73957d9bf236e3b0c0d83f9a9cfd9a60c3"); FeedZipHtml(zip_buf, 15025, "fd413fe2ebdcc25e11392017dd6fa050713f937b4d29031fc6"); FeedZipHtml(zip_buf, 15050, "bbf2817831cf30b794316b79d6f5fadf2ddb8078f839d75fa7"); FeedZipHtml(zip_buf, 15075, "b834728de053cd2e42cbaff957e901ff2afe6a38ebba2bce5b"); FeedZipHtml(zip_buf, 15100, "477ba2bae515c60fe3736bd033ff3e3bbdeb7ef544ed8a1a0c"); FeedZipHtml(zip_buf, 15125, "366a037c309e416d83070822aecbb0eeecc87f49473965bbc7"); FeedZipHtml(zip_buf, 15150, "678163976a0246e1643094c5fff41b6476fb51381d570de4f7"); FeedZipHtml(zip_buf, 15175, "c6253c43bd4f037d7a281c3533edd9b3c6464d2feabc63dcd3"); FeedZipHtml(zip_buf, 15200, "3144f95407133772e16b8ed8f53da1f4b904dd6901bb10f8e5"); FeedZipHtml(zip_buf, 15225, "2249e54cbcbe2d618d6cb138aa2c191aec5982f547b5b2d6e1"); FeedZipHtml(zip_buf, 15250, "1540e3934a121f8800bef6bd3f453343cf631cd520ac8c814b"); FeedZipHtml(zip_buf, 15275, "f37eeb32cf9c752066fc789c624215e8d4060b0670df2a1f3b"); FeedZipHtml(zip_buf, 15300, "2c64e0bbf1da99987c8373d28fae3f80c350321cb10ee2fab3"); FeedZipHtml(zip_buf, 15325, "f0a99103c12b0f28559439933eeb3657b0a8609c7ccf7b61a4"); FeedZipHtml(zip_buf, 15350, "c500f1e8a85f8ff89912d2b49f281a2fe2d2f5bfcb2e5df154"); FeedZipHtml(zip_buf, 15375, "ae8a857cd797ac27935159861eddd402c51f08955e26adb132"); FeedZipHtml(zip_buf, 15400, "cd7a9a6b807b8c2e28642d9759a94ca0ab4c889312d3e1a474"); FeedZipHtml(zip_buf, 15425, "fdab4e905b7f0d2be26ec33d9c4b5afe81f40bada7655e71e7"); FeedZipHtml(zip_buf, 15450, "4ab2056f37cb0d8c9d5ed98db76aa9c018e579c906bf7ca19f"); FeedZipHtml(zip_buf, 15475, "638fecda1c3e75a9a16caa9a0c959637eba24240312d95e1cb"); FeedZipHtml(zip_buf, 15500, "c452063d4e01444d4c229dbf93b33a19fdbdd148f4d0cfe2df"); FeedZipHtml(zip_buf, 15525, "3a1dd147331cc8a416c7b92fff1451b8863070169d9b8ae499"); FeedZipHtml(zip_buf, 15550, "e67f3b8eca26541c5266355a41e74340852165e222126e0db7"); FeedZipHtml(zip_buf, 15575, "aaf0876ea2be7501f54031b3f5145e2d789cd88a0a6f51a188"); FeedZipHtml(zip_buf, 15600, "40a61a15bdf283c885288d7711c97496b2f38e95d9a633f172"); FeedZipHtml(zip_buf, 15625, "665c1e03839de3bb5dc50dcc096ed2185f2e84192a23a0cce6"); FeedZipHtml(zip_buf, 15650, "d9344d2de2373bf87dd0d9831d3c5dc53d92b13c22cb685c00"); FeedZipHtml(zip_buf, 15675, "0961e8c74f41859ffba21fe7952ca19fd138879e9c4ec4458c"); FeedZipHtml(zip_buf, 15700, "bf4c4202f48f44e3def9a8f973d9515379cabe1881304fe1bd"); FeedZipHtml(zip_buf, 15725, "9ded5dc06e14daeae6aa96f2c81cfbe96896efee31bca32bc1"); FeedZipHtml(zip_buf, 15750, "a4e88e55e77ae87587cec8bd65f7ea24c19803c79eef2e1f1f"); FeedZipHtml(zip_buf, 15775, "b51309d772ea815f678b6aca1e5f66fffc1eb1e902b41c0a65"); FeedZipHtml(zip_buf, 15800, "d5e0258b692800a9f1d1171d7bd487fee7edf6e9d9e974842e"); FeedZipHtml(zip_buf, 15825, "39f088e66d24e6e8620c3dee35dca88eeca62915bd082fbe23"); FeedZipHtml(zip_buf, 15850, "2fb97db6bd9bfec1fb434139a61d1eb8904ab270e88301b673"); FeedZipHtml(zip_buf, 15875, "88bb7c9ae59a1dc5fad5293a1b4c2f733ff48143e8a17c188d"); FeedZipHtml(zip_buf, 15900, "608c5734039900d92ccc18a94143bf755ace4be77f3b6787f0"); FeedZipHtml(zip_buf, 15925, "3fb00fb590b75600391bd0807feb20b715d9c1f8618591a512"); FeedZipHtml(zip_buf, 15950, "04d03c1b6a22cbac5e221311a4798f69a7e10031a20ae731ce"); FeedZipHtml(zip_buf, 15975, "048ed1efe427cfaed1cb94357ba5e649a7e49576b637394973"); FeedZipHtml(zip_buf, 16000, "de51e662005f9f33e42bc672e2a13bcee65b56a35c09c0384c"); FeedZipHtml(zip_buf, 16025, "4d43d14d31887d20e01bb4ca568cd179f0640898ec511de0f2"); FeedZipHtml(zip_buf, 16050, "41690dd203640e9c1f8cee6701371446d2f7b11008da6e34f0"); FeedZipHtml(zip_buf, 16075, "6bc721bdc026a11a413a76b0f636c827b4caaf10738292c966"); FeedZipHtml(zip_buf, 16100, "333b736e876caa6799ab3bc775fa5a3953433d2524d10b3548"); FeedZipHtml(zip_buf, 16125, "da9e3818389360e4502173357b957aaa14a08cda71e3788219"); FeedZipHtml(zip_buf, 16150, "b28d24dbbcb2423e6a3b90c4671a0033698cb26de29ab36bcb"); FeedZipHtml(zip_buf, 16175, "393fbd85ddadfb6ab51abac3f6bafcbd8fb396b39a723b70de"); FeedZipHtml(zip_buf, 16200, "7294a12d5fd7041c234a85a65193701ca856196945b1e27eb9"); FeedZipHtml(zip_buf, 16225, "b8ed524ac44c1b260653fdf4a8f6ccbb9ecafe559e45408af5"); FeedZipHtml(zip_buf, 16250, "233c8339cd1cc054d52c7bc094d9da72c688aebc3a34fc0b17"); FeedZipHtml(zip_buf, 16275, "76ffc5dc83dce32da03060463b785cea1a3a998c546d308d43"); FeedZipHtml(zip_buf, 16300, "a066b1c57eb96af6a8468ef582353fc71c43f01ded7c703c88"); FeedZipHtml(zip_buf, 16325, "7b5a2f8be4123a990bb4dcd1669a4b10507eb35ac1fd8d0e7c"); FeedZipHtml(zip_buf, 16350, "9ff8c6d063632d5c109d2b28ebfad61e9b4f3abe84c2cf6398"); FeedZipHtml(zip_buf, 16375, "d6ebc31f6585cdeface0379f976978b49acc249d8f50d1371a"); FeedZipHtml(zip_buf, 16400, "e671a0abee58b551da9ccd4364a2b0963a997fa007a2527ade"); FeedZipHtml(zip_buf, 16425, "95d7c3423b26c64a548b32cd2d6a453755a2a15cfe4b139536"); FeedZipHtml(zip_buf, 16450, "3af03dab9542389a0cb9e9eac5c8824b198d43db3467f68b8b"); FeedZipHtml(zip_buf, 16475, "5fdc9b2adaccaba26408c67082af1552b35a60fa2c2c6a2e4b"); FeedZipHtml(zip_buf, 16500, "0441bf2158eace95e73ac7efcebff72480c79d681fab5c5912"); FeedZipHtml(zip_buf, 16525, "dcc816e6facd3c2703c3e3ef5b85dfa7289abb5f8135198acf"); FeedZipHtml(zip_buf, 16550, "cc5e1690ef34108baf82f0079b74321b6cc93289545a8c19b0"); FeedZipHtml(zip_buf, 16575, "44d70101f6bcf80ffb4da8d1f844a04608c44e1c742248b516"); FeedZipHtml(zip_buf, 16600, "9a44434ae14248158ec6c92d3a0faa48d70e27dda16def4fdb"); FeedZipHtml(zip_buf, 16625, "9e08d718e1c83192469176c3d128c4fce7c9b510419e8c78ef"); FeedZipHtml(zip_buf, 16650, "2777b14920298d7f74b0d8a2abea24ea8faaa8fc3bd552b512"); FeedZipHtml(zip_buf, 16675, "999b9e68dc94f604d2d18b257ac848a18ed233cbfe3f266e15"); FeedZipHtml(zip_buf, 16700, "ad4eaf44e4bb63bb48aac6277a2d4b99c254139fc5d54d6157"); FeedZipHtml(zip_buf, 16725, "4fca78389df314fdc5e9f764e761654fafdf17546a9a2eb73a"); FeedZipHtml(zip_buf, 16750, "215ab875c4f65081666786b4f9891de67976aa330052caf6c0"); FeedZipHtml(zip_buf, 16775, "c3aaa5e855efc1712011af9cd9b65c3c5bd0965b4ad17d98c5"); FeedZipHtml(zip_buf, 16800, "0fc722aea22ba556bb6a94b4663d641e3e0fc64226a933fccd"); FeedZipHtml(zip_buf, 16825, "66e9d3a755e7b6aaf166abeacbf2c686f1f32016d0bcecf29b"); FeedZipHtml(zip_buf, 16850, "0bbc5957594f289504268e80115d4e45475901fab2ce485e5b"); FeedZipHtml(zip_buf, 16875, "71e95f4eb74fe3b878974d97d17c8a641d2aba78ef8b9b66e7"); FeedZipHtml(zip_buf, 16900, "d649ae43f4b347708457857631c5f4cd26a292934ca3d0d16f"); FeedZipHtml(zip_buf, 16925, "5b8824faad5e5ca0faef416aa64249dfbb2927da61eaeb25a0"); FeedZipHtml(zip_buf, 16950, "ddaebc3db6ee33aaf16997b95372832984e4ada4d276dc2cb5"); FeedZipHtml(zip_buf, 16975, "1defeea5da2af752593d53dfb9438a7c4e1671e1df1bdc4fe9"); FeedZipHtml(zip_buf, 17000, "beb4a941971debf50804b4d20786196604fb1d4b7467b9ebab"); FeedZipHtml(zip_buf, 17025, "41bf97c90b0b72a73d71c37c67c4dabeb652475b735e36934d"); FeedZipHtml(zip_buf, 17050, "16e3bb7be29226bc7b4d39f6cabc7a8db9f44c865a889ff089"); FeedZipHtml(zip_buf, 17075, "9f2af6a04a2f62295394bb0f1bf41d9a8cb12097e4136bccb7"); FeedZipHtml(zip_buf, 17100, "21dd9bbf72370ae3d8b6c1c98686d9aeb9519fb86e215c773d"); FeedZipHtml(zip_buf, 17125, "0c63a31c182e931343d2b0947f8d6ab7b837de6832323a6606"); FeedZipHtml(zip_buf, 17150, "e654a6b9a979022fe8fa931e6c9672cbe58155441aae36cbb9"); FeedZipHtml(zip_buf, 17175, "ab9583494709dd77c3a7c223cf157c0c4355707d952b7721fe"); FeedZipHtml(zip_buf, 17200, "551d41b808c7ff13fb377a3550cbfb56ee7a6bd0ef96d19c8b"); FeedZipHtml(zip_buf, 17225, "71e73df1ceec0ebf4a675f05c75c5162df22bfe0ef8d734b43"); FeedZipHtml(zip_buf, 17250, "83cee3fafd5e386133cb0688f14a530b7b88de3b4b0a44ddb4"); FeedZipHtml(zip_buf, 17275, "08366868dc274ea8e284bc4e20bce3ed580943e41f109fa397"); FeedZipHtml(zip_buf, 17300, "de92ae16fdfda707bb4ed70dc200a35f29f6d505cc08f2e3eb"); FeedZipHtml(zip_buf, 17325, "2b501e60563aaf3a637c731905c76e127937d85e3f25606353"); FeedZipHtml(zip_buf, 17350, "b6c54df210362bc2f87bf50cd30bf00694ef4ef02de124c941"); FeedZipHtml(zip_buf, 17375, "9e7ddeeb8c39f53abea98555b8ce3012fdb7cf8649328e5f6d"); FeedZipHtml(zip_buf, 17400, "6c8860fddafbe68df125ed7a180d36f0af8dbdfdb57f1d1e3f"); FeedZipHtml(zip_buf, 17425, "dbe6ff4bb733f4e848dbf18f4a4c54fe18d3ceb25d43399831"); FeedZipHtml(zip_buf, 17450, "94f392e2fd31be8acc207618fabdb82c8b0f303d88c29a4520"); FeedZipHtml(zip_buf, 17475, "9cd65918270787176bf8a679a509f9900ca918b401f62f1bf1"); FeedZipHtml(zip_buf, 17500, "2e32dc09a292e7010d025e6b9a856f1238d3aa7cc29b67580e"); FeedZipHtml(zip_buf, 17525, "4d883c4adbdc4b93e1bacac68f613918f6f085c5ed2b3dcacd"); FeedZipHtml(zip_buf, 17550, "1c0446c480eb59010cc7d8069ca69ff7c292011984811e3e0d"); FeedZipHtml(zip_buf, 17575, "1ee183719aff1d7b836f9d93b0279cf3892fe8482bf0d180e7"); FeedZipHtml(zip_buf, 17600, "63467c14c0a17ca13c2555403e2542679be2295e39b0236c1c"); FeedZipHtml(zip_buf, 17625, "9fee6d392dc284bcce902913e96db3f1541727371f8df7f483"); FeedZipHtml(zip_buf, 17650, "dd49f02d08afa5ee58c93f5b87e9b678bafda037e6ebb2428f"); FeedZipHtml(zip_buf, 17675, "17dc83d221c030889c8ade2f65ef3008cb3ba72fd67fd8c929"); FeedZipHtml(zip_buf, 17700, "069d128ad446ae9a2255e81037988c98339cc3c2052e8d6a84"); FeedZipHtml(zip_buf, 17725, "20cb47f81da671533200c376872d2abe98a3f9c845a748efca"); FeedZipHtml(zip_buf, 17750, "05f61990e35f1550f7627e00e276873c2b5eb8e3af8062d099"); FeedZipHtml(zip_buf, 17775, "68054462885e912b213d2c48a6bc8ef39258f8fd955cca6620"); FeedZipHtml(zip_buf, 17800, "d7388c630f0388328cc9908db0be86be9bc0c09b8150cf9a34"); FeedZipHtml(zip_buf, 17825, "b1cd07e17f4ce28412e6e757ce8b2626e98613bfc7d8c367ef"); FeedZipHtml(zip_buf, 17850, "b8f5c947ea60c9a067456b6a80552032d1c2015011e2126cbe"); FeedZipHtml(zip_buf, 17875, "56fe221594148e45e42a4a31782e4b150c3614eed5ad232b84"); FeedZipHtml(zip_buf, 17900, "a8e8220fa338a919dfacaf82f06228131a56842511d1ee4c4b"); FeedZipHtml(zip_buf, 17925, "0b43f2804ee209f5d73c708d6b4a0b0760426c2ceb62b89cb4"); FeedZipHtml(zip_buf, 17950, "dca3b4d2db09e69bee5074bf61ed82443b61a9e4ce2afa5ec5"); FeedZipHtml(zip_buf, 17975, "fa601d55c0e96ffbe7473b6717cee9b9d33efdb0fbcb3efdf3"); FeedZipHtml(zip_buf, 18000, "f0a4bd7f7eb1bfdbbe40056138e57e371ece9b691bd4968ad9"); FeedZipHtml(zip_buf, 18025, "cd6448514ad675251425a70a03f5d6b0446eef316da47ecbd8"); FeedZipHtml(zip_buf, 18050, "5cda1e9bc512bbbb6edf979219737a379b1a2ea8ea185826ee"); FeedZipHtml(zip_buf, 18075, "23afe73f904b303da00fd67232c86cb86e17131ff4221f1f84"); FeedZipHtml(zip_buf, 18100, "70f7bc3821c1790a0db21fc6f62482ace121d432a7d5373507"); FeedZipHtml(zip_buf, 18125, "d922c65fb6bbcf7815aa394d5fa7d3aac8d14aeb6849cbc44c"); FeedZipHtml(zip_buf, 18150, "b6b27b7e8137ec09e627b36abd7991d4509eb87b98fe419370"); FeedZipHtml(zip_buf, 18175, "a989e534387fa58296657bfb5982bc56163062b6cec88bab4e"); FeedZipHtml(zip_buf, 18200, "e40683f202265f985763cc232459d53cf561067b1687864285"); FeedZipHtml(zip_buf, 18225, "399fd3d9f9e9bfd75f5a39913c0aadcd15e555287025804118"); FeedZipHtml(zip_buf, 18250, "20f810eff2872dfac1e34aea327c871371110652abff83341e"); FeedZipHtml(zip_buf, 18275, "d5c83187119aa5f98caa7fa89fec07509c3476f05485550af9"); FeedZipHtml(zip_buf, 18300, "204789a7648037b7e3d8b212d6d929188cb1bae5f422ae6e08"); FeedZipHtml(zip_buf, 18325, "10bf7cb1f54fa745e50a7f3fb8f8f9e5ca2a1be9190869fc0c"); FeedZipHtml(zip_buf, 18350, "94c037aa86a079aa399489aff81c44e9af92dcd9167166929d"); FeedZipHtml(zip_buf, 18375, "50d775e9583089f94c0587027cd96fd280864febc5b0018dfd"); FeedZipHtml(zip_buf, 18400, "5f518dfbec98ce5b87694466350a351c0e103fa3105fd677bb"); FeedZipHtml(zip_buf, 18425, "93089fd573f9462e26d83376639a4b49b33edcbda21b6c9029"); FeedZipHtml(zip_buf, 18450, "7eb8a017c7188e294df18044bdcbf50ecd21b57298300241e2"); FeedZipHtml(zip_buf, 18475, "ddde82ccb197d6706d829294a17296f169298cbe67a32c734f"); FeedZipHtml(zip_buf, 18500, "2ff34b97dcd443eb9c0693f99bfdb2bea1b1ef6907b7d48852"); FeedZipHtml(zip_buf, 18525, "f142d64bf05ce738bfdb57445473f491dd68566d4d53a9d991"); FeedZipHtml(zip_buf, 18550, "1f268db08a223ab7553c18184b3dbd6c45b43a243af81058c5"); FeedZipHtml(zip_buf, 18575, "887f6f0081ea0ec505830226ed84bddb6da53a4dfcfdfcbcdf"); FeedZipHtml(zip_buf, 18600, "7fa63c83a763111c78fc348d6ca3825f0f406708c9b324d338"); FeedZipHtml(zip_buf, 18625, "52eecebeef218ff2711e36dcff39f212f2b96105b79ef34ddc"); FeedZipHtml(zip_buf, 18650, "5e83359677a0c0ff30681b125293a31ac5c503e52864211dc2"); FeedZipHtml(zip_buf, 18675, "dc24f7cc2cbfb37efb08f0c9e58738a1278f03189b6cbb0330"); FeedZipHtml(zip_buf, 18700, "400668daf4f50e3dd9d6e8b461fce27654a55533cd4d2bd6c6"); FeedZipHtml(zip_buf, 18725, "077f9894b3e8d6f87624fb576a5979fe69f9e1802e213f9e9e"); FeedZipHtml(zip_buf, 18750, "d30dd3d8ed56544f7d37c1218bb4e4df4b046195ccd5f2b31a"); FeedZipHtml(zip_buf, 18775, "74f8cfc4ed6169d7580c388f96e5c0564df0fb81e0e1708534"); FeedZipHtml(zip_buf, 18800, "71f196a343a8e00269fa9c89be5abcdaa32f9547f89ad2ec12"); FeedZipHtml(zip_buf, 18825, "6e3c9dbb4c7f423e2cb9a5614e5e36edcf458ea90c9f75e640"); FeedZipHtml(zip_buf, 18850, "06ec92476ad673a22ed1e35cd23b4d02756633f395b948a988"); FeedZipHtml(zip_buf, 18875, "8e807c145285d670052f9e97b9dc38e2f14adcfc32f12de9bc"); FeedZipHtml(zip_buf, 18900, "d2b6393782b9067838dc93d129b41467086b51245ed469b233"); FeedZipHtml(zip_buf, 18925, "f371124e665f70618a79ba4e5f50ec445c5dc18638e0177712"); FeedZipHtml(zip_buf, 18950, "f7c2a8df2ff78f17ba2cca51bed0899abde9329ca91aeaa96e"); FeedZipHtml(zip_buf, 18975, "55edb7c9041295c611e9812fd5c0cfb67de1467cfdc9a42da1"); FeedZipHtml(zip_buf, 19000, "ea2968bb3891b58a0baf8ffa7dd814a931154cb31872e4f6bc"); FeedZipHtml(zip_buf, 19025, "495cba359496d8a637484d0fbe10ba4d2bb3cc326f7a020126"); FeedZipHtml(zip_buf, 19050, "5ff49335acfdc34eb496ae93853101b42ac4b5f2a2724989c8"); FeedZipHtml(zip_buf, 19075, "1b0cf31fe9fa98e64721e1cde9d2ba75d4023997e9d25cc648"); FeedZipHtml(zip_buf, 19100, "e0edb7b812910a68d781053dd8dda89417dea71b63a5553c42"); FeedZipHtml(zip_buf, 19125, "80c5c34d68a044464ff345dda2e3986b6840c154478727fb17"); FeedZipHtml(zip_buf, 19150, "edf3c39303aacfa5eedfdd98cde1afe5362e0d75816b2eb38d"); FeedZipHtml(zip_buf, 19175, "0a5de6e2955507497219469784e69238263b9fde0f040f8c99"); FeedZipHtml(zip_buf, 19200, "9925ad9cba2239827f91f6d3dd18d336e27db0e7d08d44efcc"); FeedZipHtml(zip_buf, 19225, "4d86b69c4f6963edcda7e6e9abd19197c5482d798a3afe70d4"); FeedZipHtml(zip_buf, 19250, "3e34508ee117f938272ec722df5a632d44ae7512d3c2c90857"); FeedZipHtml(zip_buf, 19275, "77251c0553c14dc4448e31141018f6c0f2d4a7988b9dfdbbe3"); FeedZipHtml(zip_buf, 19300, "106f432e4bea41dafba5a51b4dd9ef476e57556dacdaabecb5"); FeedZipHtml(zip_buf, 19325, "ee163bd382e83f5675a315d4385c48c28b701bf174171cd0a5"); FeedZipHtml(zip_buf, 19350, "0f2e2d7d699756cea12b3b5d0829c72e7acdc8616102822faf"); FeedZipHtml(zip_buf, 19375, "e164b57159a5323d44316c146549b7513ec6e060b5c87236ea"); FeedZipHtml(zip_buf, 19400, "dbc272eaf3d0fe7f261e9b5ec9a52ade3395a18a1fd969ae8d"); FeedZipHtml(zip_buf, 19425, "c5129a4b92cb9a54b538aca9a91dfbdc0be239345580e62205"); FeedZipHtml(zip_buf, 19450, "5e651c2be543ce68a6c9ac760cc68c8c3e2994dd22154617b3"); FeedZipHtml(zip_buf, 19475, "ea8a5f6d8ec7c60dbfd3caef9db5f399c1817c8057b668da69"); FeedZipHtml(zip_buf, 19500, "14230b0a0a2b351743485da910270d442c973aa03a61851346"); FeedZipHtml(zip_buf, 19525, "6654465bc30271446256a94fcd2e768e2b2f623cf550b89819"); FeedZipHtml(zip_buf, 19550, "16c4cbd26133b332a428041d53d8d77e4cbce7664cf0faa035"); FeedZipHtml(zip_buf, 19575, "ad3aa2a31328f481d64da1acae45b76ef5186bac631b66918b"); FeedZipHtml(zip_buf, 19600, "49475556b3f2876eb7932ec612e09753f740e5a013416f7ae7"); FeedZipHtml(zip_buf, 19625, "4adbffc100d52c179e2b2e348b3c0b697aabd52aeee22b0dac"); FeedZipHtml(zip_buf, 19650, "50472b6503aee7083e20c81069e62cb5ae38cb4e794e522a8c"); FeedZipHtml(zip_buf, 19675, "625ebcc8e01e15756306f14bc72a872c4d1597e6187697a5aa"); FeedZipHtml(zip_buf, 19700, "449d99ad733a9f4a2a1f3739f022d886f79933a5651842e502"); FeedZipHtml(zip_buf, 19725, "55aa28e1b7095b3393830e999ee121832f3eef9f9f96dfaa5c"); FeedZipHtml(zip_buf, 19750, "0c6183863991976dc7b4b4754e7496b8059a1c7871748a2598"); FeedZipHtml(zip_buf, 19775, "acbaec6f479641a4c01d5b8803bfce1e479b84be88ea58a5e5"); FeedZipHtml(zip_buf, 19800, "27ec25cebb18d2820121aed36aa2d9e335be67e1573b1c4837"); FeedZipHtml(zip_buf, 19825, "dae4d0893844b97c16c3ea9f3957027439851182fed497461c"); FeedZipHtml(zip_buf, 19850, "882b6301b0a6a8ec255ff4c0f6001fa7744f51e2a5174e9812"); FeedZipHtml(zip_buf, 19875, "210a7d87efc7f08331bd718bd5b39d268f62b25492ed528a1a"); FeedZipHtml(zip_buf, 19900, "9abe1a6f70d86639035d328140878ce68a9674ade1c334f8e0"); FeedZipHtml(zip_buf, 19925, "78bf7dfe69f7f4e8687fb77d787ab2a2431f35ea47221ac867"); FeedZipHtml(zip_buf, 19950, "5d9a6dd4feaa7942a38328571883def3dc3a228a4272f189a0"); FeedZipHtml(zip_buf, 19975, "1b4e7019c21e56599f8877a3d52327095b61075a67d363c124"); FeedZipHtml(zip_buf, 20000, "1c088c794daf8ba6459b344f3bdcff8e0148cbdeab9be6a4df"); FeedZipHtml(zip_buf, 20025, "3cdf374dc1947260da728cb8e5c1174091ba3c09367695e79c"); FeedZipHtml(zip_buf, 20050, "a1ecadc9a33d55866d6d6eeb694d8f354ca5157dd9a46ec9b4"); FeedZipHtml(zip_buf, 20075, "348953368b0cf3c6579251c74b227cc26c5461e3d09628166c"); FeedZipHtml(zip_buf, 20100, "458099cfdbc52b0ad7a34175c81ead8e22d571600059b33c9e"); FeedZipHtml(zip_buf, 20125, "64dd381623dc38a1c7087d12219d2c5a32ebc28a712269c52b"); FeedZipHtml(zip_buf, 20150, "eb0be0d77713cfefed0024b6381cd93427bfcef3fdbdf1ebd9"); FeedZipHtml(zip_buf, 20175, "e9d1a783d3933cb31a3f3f6e4e4d1969116c3ae6baaf0be251"); FeedZipHtml(zip_buf, 20200, "5955d6fbd3a254d3b639b974ae019a65d3fd1b604eff367d5c"); FeedZipHtml(zip_buf, 20225, "edc6f22979463a65b0af0a68e13b3b970eff95bbdc224872ec"); FeedZipHtml(zip_buf, 20250, "7e13bad86fa1de42da5866187e29350da747e72d60f8f91e6a"); FeedZipHtml(zip_buf, 20275, "95d574f8d5031b916e6306433860e2ff6ed0eb1b7d0ac993f6"); FeedZipHtml(zip_buf, 20300, "9593260728ea11e9982f5327f25eb7a85554860be8eff5f034"); FeedZipHtml(zip_buf, 20325, "d4671e0b27094e2185f6a7d851c5cca9e071bd5a246d233741"); FeedZipHtml(zip_buf, 20350, "16e016f3d34a5e03a29a9ac532d030ab3bd214dec3c0801754"); FeedZipHtml(zip_buf, 20375, "3b7acf587f8d6c2e33d2f824618caa957a4b64b93ae3444641"); FeedZipHtml(zip_buf, 20400, "0892752d30de8fa5ea552e36bf178a38f82951873a82982e19"); FeedZipHtml(zip_buf, 20425, "02cac609c087835b4ea540474f0adac75c13da0456cef0b496"); FeedZipHtml(zip_buf, 20450, "8a5cb1595e8590bd0889fe10c0de5112d69eb6cd1dda3ec700"); FeedZipHtml(zip_buf, 20475, "0b50b2a2a86581c42af65e9196152d9cd37d4fc68caa300a05"); FeedZipHtml(zip_buf, 20500, "9f71606f01d899987759be177762e37c225f5ccadbb43564fb"); FeedZipHtml(zip_buf, 20525, "e28147664dbb714c3cac2c80d87b913b16251ec2f6a56e6dfc"); FeedZipHtml(zip_buf, 20550, "85d2bc035bbd4d4b621c33510929b0177b86354540746e9d1e"); FeedZipHtml(zip_buf, 20575, "2c4d4608495f01ea368ceb7963bcbde517b0692623990928f5"); FeedZipHtml(zip_buf, 20600, "2e94e8ccadc294c8761f3f191af4e3a763fa4b2721a68c0169"); FeedZipHtml(zip_buf, 20625, "1ea174a6adaa998a8be3993e67a6fa3c752e0a59a9749c3823"); FeedZipHtml(zip_buf, 20650, "4cc743412ea94ce2de787eb8c7664b76c4341e1c7b697e508b"); FeedZipHtml(zip_buf, 20675, "c9449bcbe833e5dfcd9afc804c84e585e5de17d5febb5b9d3b"); FeedZipHtml(zip_buf, 20700, "ca352f5632ce3dd4ec410f335825439888ea8bc92042818a06"); FeedZipHtml(zip_buf, 20725, "a6f4822eee601cdb0ee37c34b1f089fe30dec71bab4d533e81"); FeedZipHtml(zip_buf, 20750, "6e3a09132a52f6caa8fa85415ce94d152904997795b6c1df94"); FeedZipHtml(zip_buf, 20775, "2bd308e3cfb065df0565d49fe06168ccefc3e455aa179500ca"); FeedZipHtml(zip_buf, 20800, "2f785e3bcaabf2d9ec726c7431d4934afba803d5b254004643"); FeedZipHtml(zip_buf, 20825, "4041d95107534a5691cfe44034236f919e7f9bbdb607cd1784"); FeedZipHtml(zip_buf, 20850, "4074dcdc314b4e7728a39d8c87ded045e6c176b33d03f2abaa"); FeedZipHtml(zip_buf, 20875, "d190abd4594ae9fd215fac59d64ab0b1754549ae301f66fa50"); FeedZipHtml(zip_buf, 20900, "41310c6164da566dab9ce6f0754299562f7f95a0f5ebfe4d57"); FeedZipHtml(zip_buf, 20925, "90a8d8ab335afa2d4cd5cf3fc56c4a7f6993af6699f00d272e"); FeedZipHtml(zip_buf, 20950, "b9c7cd281b6da45481caa03609706b0240b55a3058899382dd"); FeedZipHtml(zip_buf, 20975, "61ef32be58cdf45669270c3d0d3f0a79d2e5e4624ae9e75287"); FeedZipHtml(zip_buf, 21000, "5224aa3c25a516c3caf43dc1a44bf67550798a4133c3a09962"); FeedZipHtml(zip_buf, 21025, "90860721842550de2b5e13e0736b2fc5a4ef76bfc92b26d429"); FeedZipHtml(zip_buf, 21050, "59b5a644dd0b62fca1c77e934cfc554ab9554760c4c0755ee7"); FeedZipHtml(zip_buf, 21075, "6c84515ec52a0009871ddcdee24917a061856ee2c0c496b920"); FeedZipHtml(zip_buf, 21100, "4e2c8334c6b42de6828cacbd6a6d53a0d14fa6a4332dd57f2b"); FeedZipHtml(zip_buf, 21125, "b361c00a2c0644a7e95159231bf07b6916c78edeb5330319e9"); FeedZipHtml(zip_buf, 21150, "136d1b6c7d9dbc3a4529cbe6842ef9c0a4c1a36041f42a34b7"); FeedZipHtml(zip_buf, 21175, "17c7a17f252e8cc76d59c9cff798f3247687619a7592cc7d97"); FeedZipHtml(zip_buf, 21200, "b05ae62f60e3b478aa62e72d4d3cab07573b555fa9286d8a83"); FeedZipHtml(zip_buf, 21225, "a4e9642e23ca8d3909dc7e9f6c697976e4ce5900691e0652c3"); FeedZipHtml(zip_buf, 21250, "ac00ea49b2481931ce90ea2e7a11677ec50c6531bad9f63b72"); FeedZipHtml(zip_buf, 21275, "dccc83dc1bbfa534cedc04c81f1f2f2bc92233854553982def"); FeedZipHtml(zip_buf, 21300, "5a8be0323aabbc07231fbd752591e069fb1d2e47e71ae48168"); FeedZipHtml(zip_buf, 21325, "b5aa1bd2b9f8cd76b89f7ec9c5812d92e7b2aca572e2021307"); FeedZipHtml(zip_buf, 21350, "31c7ada41b7ae19954fe126b416cb53b497612cc2e5dc65769"); FeedZipHtml(zip_buf, 21375, "87a64f380b18feafc18b65d71877ba0c68298a9369c96c9a94"); FeedZipHtml(zip_buf, 21400, "de4194f27f9562a739342f198f0c940a267f695e1cb4fb3e1e"); FeedZipHtml(zip_buf, 21425, "fb5e42e1b9d7211c384003c72ae60ba0a2d0313815a81310d9"); FeedZipHtml(zip_buf, 21450, "e978388d19349c775192422ab14a52721de654c1f38ff2d7e0"); FeedZipHtml(zip_buf, 21475, "fba67430f1a1de2b5752958c39d2d7b259caa26cd632e5f0a4"); FeedZipHtml(zip_buf, 21500, "afcde3513e02a12319ce8c10575a5f397e1f1b9befeab887fd"); FeedZipHtml(zip_buf, 21525, "9b0443ef4b03e8d22ea5395e284df61bebabe45201687ef466"); FeedZipHtml(zip_buf, 21550, "05e3805e25205ed36011755ccaa46675f9f1b1f1420cbd4ab1"); FeedZipHtml(zip_buf, 21575, "17d3299fbc062a49507a388725717af68b49676d90de7c512c"); FeedZipHtml(zip_buf, 21600, "3c3af9f1305ffc869a60296164ca53e18a84ef10de7282d035"); FeedZipHtml(zip_buf, 21625, "fcb078b9b125fba4b25bd2f1851e8c842ed76b9a7ba0ca0b80"); FeedZipHtml(zip_buf, 21650, "2131e4c409f086578c104f2a13a44ebddec7dc392b19ddd1c6"); FeedZipHtml(zip_buf, 21675, "2689533d511ae54317c598e49392ed77d446d66115d2c96c64"); FeedZipHtml(zip_buf, 21700, "1d2cc33196ef51d09d462a90a041db7f42ae961211927c6b7a"); FeedZipHtml(zip_buf, 21725, "14f32254e8726f7a7e0e762ea24a31b895759163f92150a8b3"); FeedZipHtml(zip_buf, 21750, "37a79f1239b58f2bcfc177e31d7e6ea979a51ec5cc8bbb2ab2"); FeedZipHtml(zip_buf, 21775, "1941858f9076e6ce3c0f0173df2f928ad9540bb390b234b6ca"); FeedZipHtml(zip_buf, 21800, "d2e93112519b3bf38960faf1628590e6a9433b7e67bb834fad"); FeedZipHtml(zip_buf, 21825, "8f3903bcf5e24d3ec7a57e97b263a99130bae4621c6fe678d6"); FeedZipHtml(zip_buf, 21850, "8317d97a3e9aaed1699ae5a3f30aab4387b2ca8acc98dd54ba"); FeedZipHtml(zip_buf, 21875, "b4a469c1d7b959c34266e16f8a11e4842539ce490ae48c26af"); FeedZipHtml(zip_buf, 21900, "d48a31cb0498f1457f29ac44401567a66efc8fd7741486baa3"); FeedZipHtml(zip_buf, 21925, "a07eb21ded6ea92732cd7836d006466ab84ee3f0777cc090ac"); FeedZipHtml(zip_buf, 21950, "6bbf5d964c2ebb2a362f3b0f2203d24bda5206c41e826f13ef"); FeedZipHtml(zip_buf, 21975, "260712a2a502f2d02585df11836e950c1c2f51660a73ff35a5"); FeedZipHtml(zip_buf, 22000, "a781dc86ddf9731b52d9b62ec6e1d4ca6df8d74fa3bf277c77"); FeedZipHtml(zip_buf, 22025, "12b8b7edc803fe9b70f08fe5eecbd6ad447560b8b9e80d447c"); FeedZipHtml(zip_buf, 22050, "4967e337d95a365f6a3d96fd5a23f2fda1c0346f4c4b47c6b4"); FeedZipHtml(zip_buf, 22075, "ac29a6cc8e34435a36850927830abbb2c9fae5b245d1f2cf69"); FeedZipHtml(zip_buf, 22100, "e8a04d911559b316cdccd714a321fd89180a929ea37e8a9d0d"); FeedZipHtml(zip_buf, 22125, "a528e0dffa3171c99d1c5fc4a917c8f432a0eb25342a45fa0f"); FeedZipHtml(zip_buf, 22150, "043ae9ccd8084b0d5cd34140f3a88a7f1d61d8caf9d3041bcc"); FeedZipHtml(zip_buf, 22175, "2d37f74a88d1e88b78856f1d75ad4c3d46f670a94acf98097a"); FeedZipHtml(zip_buf, 22200, "536eab51d4a8967e57ff95d41db54481aab84c9c2dc0928858"); FeedZipHtml(zip_buf, 22225, "fdd4c205ab94ca88920e01a3a8528eb4812561c8ef0456249d"); FeedZipHtml(zip_buf, 22250, "aa5e6703f6faaee793ad596639fd16466110feb1e7b983c81d"); FeedZipHtml(zip_buf, 22275, "15354db67d6e71eec3c7e252e0f9f032c6559749757dd99fae"); FeedZipHtml(zip_buf, 22300, "911a807db9c0dfbfea92287324ce9e74563d9df5a8f4123332"); FeedZipHtml(zip_buf, 22325, "33752cdf2d22fac36bcea926698411cd04c29058798c572532"); FeedZipHtml(zip_buf, 22350, "8a134660b354e1a58376b1ccff3712af32358ed9e2e7ea20ff"); FeedZipHtml(zip_buf, 22375, "f85fe9adcef7a15f77c3a00bdc5f9a8c5d355668a7bedb4df8"); FeedZipHtml(zip_buf, 22400, "32ae54e910f52e878090787e636aba427d0cf0debf0e35b0f4"); FeedZipHtml(zip_buf, 22425, "7deb4ff971467d9a9a535e0fd914eaec2a42a91b18911990d5"); FeedZipHtml(zip_buf, 22450, "1abd97885925bff85bec0d46ee6b6ae97b7e42b5235e73786e"); FeedZipHtml(zip_buf, 22475, "d777e9c50a579ef7b6a98a25f19ae4e7db7042af30181754ab"); FeedZipHtml(zip_buf, 22500, "9a9e35736a483d9c2328426eb605bc2355ab39c8dc200c51c9"); FeedZipHtml(zip_buf, 22525, "ee10b93a9c487f00db53af4fe51746ecdd58955bfa5ef46f03"); FeedZipHtml(zip_buf, 22550, "be8dde5cbe8df376fbf4ecf4c9a961bcc7ff0d23d6edaff1a9"); FeedZipHtml(zip_buf, 22575, "69ceb09e79be9f7787c0c2a74cd9b9b70600057e7309bd081e"); FeedZipHtml(zip_buf, 22600, "e865d38cca8ac96c627a681bc2b9c62c0c7e24dcdead438f06"); FeedZipHtml(zip_buf, 22625, "6465522f29ba2155580c3e7149f0cbbbda3e9a387b5edc75a3"); FeedZipHtml(zip_buf, 22650, "9ea86200dde7ae9c30cf40cb6389dc03a8ac0ffc5a8752a4fb"); FeedZipHtml(zip_buf, 22675, "3a80da4bd1c7ef79338cbfe25c0f3d309088bcae6635f978a9"); FeedZipHtml(zip_buf, 22700, "c850d3e8a97cc941589c9ba246d433c632b2cbd71bd68c2869"); FeedZipHtml(zip_buf, 22725, "9b9d3a53ea574dcf163865fc6905b296ca1c99b480352cc5d7"); FeedZipHtml(zip_buf, 22750, "289aa3497768beb0dde03c13dac2abad30dc380dfe49ebf46a"); FeedZipHtml(zip_buf, 22775, "becbbc2364bb10ce7c137a0f0dac1a84eaf187fe182f720596"); FeedZipHtml(zip_buf, 22800, "d07203c9390947d3dd4d8b5c604c9f8593f0e73226eaf86e4f"); FeedZipHtml(zip_buf, 22825, "14683f9d7bcac774ca06bd4f8e6127a954251c43053c24dfbb"); FeedZipHtml(zip_buf, 22850, "756438a4d608b9ada173abb6245a5863a43a12fd327261d322"); FeedZipHtml(zip_buf, 22875, "48563eee7741367aceda87c164509d6cc762300e966549495b"); FeedZipHtml(zip_buf, 22900, "5737ec68c030c445bdf9517373942d9bbc68bd70e573ec99c6"); FeedZipHtml(zip_buf, 22925, "fba6068f06d39231513fd190e0d26abac6956503fc788e298e"); FeedZipHtml(zip_buf, 22950, "4a1892da16c19115037fcf2cc9f594b23c398dbc2a81b17508"); FeedZipHtml(zip_buf, 22975, "bae41f8d93db8af0a79d3fbdd1241916594036b49c7152781a"); FeedZipHtml(zip_buf, 23000, "b30a3f16dfc5d4ae6f5035b4631f7b11850da6b001a2946ed6"); FeedZipHtml(zip_buf, 23025, "408403ca4be206f14a9a14631846de9f68b0faea847225c817"); FeedZipHtml(zip_buf, 23050, "6226efe86cc31acd3414b0b8d9bdbcef644a16fb58b6c45994"); FeedZipHtml(zip_buf, 23075, "b44c14dd04172af37dec910771b2fd729d12ce4fc8014fb95f"); FeedZipHtml(zip_buf, 23100, "642912593124c64e68bd6c80b543fd28f7892ad221395292d4"); FeedZipHtml(zip_buf, 23125, "74a70085043ddf18813c30d3e22702d87e1c875e65ea64537f"); FeedZipHtml(zip_buf, 23150, "0d6740d469a0ea4874bfbd7236b7de3e7fedbc787b76b8b1f5"); FeedZipHtml(zip_buf, 23175, "daf927fcdfd7cebfdebec03f4be5e12c0affb066f0950d2d59"); FeedZipHtml(zip_buf, 23200, "264117df281ae855bed955c795989adb8abf574016aa723915"); FeedZipHtml(zip_buf, 23225, "ff98d7a7f2cfb8bc4e59ed641273d6868e6087244a825aea6c"); FeedZipHtml(zip_buf, 23250, "3205b43610589258498a515e02f26e5e18ab67d412b50c24e3"); FeedZipHtml(zip_buf, 23275, "a47a941f63b20d08055300c77a4d6ecc54093b2df79b8b5de4"); FeedZipHtml(zip_buf, 23300, "0a693ef4054fb687c2edc95f56745e0c3ec952be3dacdf0cf3"); FeedZipHtml(zip_buf, 23325, "f0f1d9c8c4a1d4edcab4b212c6b60233da7229545813813b6e"); FeedZipHtml(zip_buf, 23350, "870791cd8f95b6956efa9537c7564e54cb50f4ac39c9e54d45"); FeedZipHtml(zip_buf, 23375, "902075b89de9fc3b07185cf6af1210d9a51c94c52da6aefcd4"); FeedZipHtml(zip_buf, 23400, "5ee80208213bfc39adc368aec853555861612c3bc30477a3f0"); FeedZipHtml(zip_buf, 23425, "dd895c0bd087c2d04b5deea361eb66e398efe29f03d350da96"); FeedZipHtml(zip_buf, 23450, "b86d17ae5da9c006ef9814690c34306d698fd2ab11eaa9d207"); FeedZipHtml(zip_buf, 23475, "ba31e39ae1c6eabf73310aaf64cd017c1729ba132a4b2cc1ca"); FeedZipHtml(zip_buf, 23500, "9dc9686fed82c13abb7f000f8dee384ee3bc3d73a1f027ad54"); FeedZipHtml(zip_buf, 23525, "9f250a77c4773ddcc338bfb8b1e558271b2a2214344761abf9"); FeedZipHtml(zip_buf, 23550, "cc5587145ce81493199dd9f0d04d9b9a3a025fc2995e404947"); FeedZipHtml(zip_buf, 23575, "0d800d56d510ab91afa823dd60e6eba61d3d3ec6d7f7e87a5d"); FeedZipHtml(zip_buf, 23600, "d718c5c7eb89b8491c4a34ac6a4dc570cc725198b9828d1b75"); FeedZipHtml(zip_buf, 23625, "87f4274a1f911be0ec7b37b5333ce37f6642b41ff8f9eca1ba"); FeedZipHtml(zip_buf, 23650, "b6c8ea0c04006cd5be27df15a494942c171b38d32061ce3283"); FeedZipHtml(zip_buf, 23675, "9e993b3a85b439821564a29b284f2b7a13b1f5dc01cce0233a"); FeedZipHtml(zip_buf, 23700, "309e71ca74fe96db096166118493c11035c830f47b9c380e01"); FeedZipHtml(zip_buf, 23725, "ede59465065e9501b52e8c88cb534a4c89eb2b03d675aec080"); FeedZipHtml(zip_buf, 23750, "67b28ef09d4506e0d51493a469d0969030c98bf1f5daf01c81"); FeedZipHtml(zip_buf, 23775, "798e65a5e5853ab903346fd3fd0580e38b3836a78f47a0ebcc"); FeedZipHtml(zip_buf, 23800, "afa817056ee85ef541a0e09c9e70399dab2ca5d7096f385a26"); FeedZipHtml(zip_buf, 23825, "758ea6184a2360d4838e947f14066627cbef787d0b472f15a1"); FeedZipHtml(zip_buf, 23850, "6386e865985e876a10243d3c8e8db022c830bc7646184c6430"); FeedZipHtml(zip_buf, 23875, "5a3ce49bc75b2e0c259762aa6c5cd30cd0d233f5da7e0d431e"); FeedZipHtml(zip_buf, 23900, "095874255f87d137a698b1bd649eeb7b54d06e10b9e3a1d775"); FeedZipHtml(zip_buf, 23925, "5a707cc5d3eb8a99b8b6dc27187f7cb167f108e2cfd5f7c686"); FeedZipHtml(zip_buf, 23950, "fa56fb57d557153b42e303aeca389df8fe665a75508ff7b2b3"); FeedZipHtml(zip_buf, 23975, "556caa78769f0be7533e9c0bedf38f3907e61730594de4ffb8"); FeedZipHtml(zip_buf, 24000, "20bb234ee31d6e65f50f589ff3f1f8886c0137414d1d80bda0"); FeedZipHtml(zip_buf, 24025, "a21eaa22476ef60c6f533e644437ce99d76aaafb7e41532cd0"); FeedZipHtml(zip_buf, 24050, "8d3f726f8a75a4197234b908d65274bfd82bc73660236d7e24"); FeedZipHtml(zip_buf, 24075, "c878b1b7360d174eebb3b951e8830ba592e9e183d1f202992f"); FeedZipHtml(zip_buf, 24100, "f62af99330f6383968d188eb1d517d613bce6463f556b06cac"); FeedZipHtml(zip_buf, 24125, "c8cac87be82e06ec707d644a9acf39d78c5a04326156fedd87"); FeedZipHtml(zip_buf, 24150, "b79d3b62e12c591c7a7d33f24665c22a62164c5c374d1106ba"); FeedZipHtml(zip_buf, 24175, "55fbdc19aed74e8846fbb517e32314005a829b8ec41755153e"); FeedZipHtml(zip_buf, 24200, "eef6a5cabd55201036dc634cdd7b4a211dc8f3269abd54c548"); FeedZipHtml(zip_buf, 24225, "570e93172748347c769da8ac6042d56f0ffbf26b8e9733aa0b"); FeedZipHtml(zip_buf, 24250, "a0af245f413bae5d8707bd1769e6fddcc36ecb75b9478fbcad"); FeedZipHtml(zip_buf, 24275, "4b48d3381321e543f6b0db9d449501777effd0c8b466cb7c90"); FeedZipHtml(zip_buf, 24300, "ef326394e5343470ecddfc732cce22491f2d9495e0b526afa3"); FeedZipHtml(zip_buf, 24325, "97feaa304ef1dccf96c297dc1598e421233a0fa897530874a2"); FeedZipHtml(zip_buf, 24350, "feda0073596bef72750a99e5a0b02a607dcc85476b5b54c8fc"); FeedZipHtml(zip_buf, 24375, "3ff211f30867aaecd20cadae64d5ef3a34beadb0511459dd54"); FeedZipHtml(zip_buf, 24400, "7a4208c435d6a3293973945efc343af07cae7716dcb3f3d37f"); FeedZipHtml(zip_buf, 24425, "afbfac1b391d76d087c2de091460ba424781caeca42aa0ec5c"); FeedZipHtml(zip_buf, 24450, "f481d5d18eb9b88d316a59166c939e1ab9c25295aa7184658c"); FeedZipHtml(zip_buf, 24475, "4a29f3f1d3c268d3ccd04d5387aaca79325d26e56901e3a8ef"); FeedZipHtml(zip_buf, 24500, "bb5721c3c0c584323c4657f2af9d3fb09ed2d442435acb1979"); FeedZipHtml(zip_buf, 24525, "9c5779f6aaba3e2dab0195c61b5224e4045863d21d661239b2"); FeedZipHtml(zip_buf, 24550, "4fda506cfdcef39f61ed8a13a8d731b09d0c88a6d74d78b425"); FeedZipHtml(zip_buf, 24575, "f7941bd126810acea848ea8d646410e2e8cd64fbef49781d0f"); FeedZipHtml(zip_buf, 24600, "7e7ee92884621d376f9bef7d3c5282af95032e1058d8042026"); FeedZipHtml(zip_buf, 24625, "371c4e8427f71c3a6526489001dfed0ae9e24b86e81c76f1ca"); FeedZipHtml(zip_buf, 24650, "090baf46a23ff10127801f3797fc05fe07572d31506a53445e"); FeedZipHtml(zip_buf, 24675, "0f3396ef4c92e1eef985c5a2c87668392efce33270f9f59ce1"); FeedZipHtml(zip_buf, 24700, "7f58e5960a96357e5acc551eefdfb2dc210152b8cdc31015b5"); FeedZipHtml(zip_buf, 24725, "0093cf34ecfafdb5e4c6b5cd529b0fb75e8cd207b4a0b0a80b"); FeedZipHtml(zip_buf, 24750, "be725c0fbd7eb24b21676a96ccafca97592041fa5df90d3bf6"); FeedZipHtml(zip_buf, 24775, "f95875dd8a1d3ecd1945900371a9502ce8d2b772df21b5e4bb"); FeedZipHtml(zip_buf, 24800, "856dc7ed76e90f6225b958bae9e265b19aaa3a74b5e5c0f693"); FeedZipHtml(zip_buf, 24825, "976e5d18826587cf7f250ae8456b4a7cae4109e2e9cba33018"); FeedZipHtml(zip_buf, 24850, "78c9a4e4249ceb736f392e6747191e7602acc48c2101be5a00"); FeedZipHtml(zip_buf, 24875, "f67af1cfe769deeb53dcf064a01d6e24b8c5e5ee5af84bbc71"); FeedZipHtml(zip_buf, 24900, "a17f64ae5dea9d6e4e0a70c04ebeb6f9f3f38de7e9d64d74e3"); FeedZipHtml(zip_buf, 24925, "750084b2a2a1ab0a656532871bc3c833dbf30df84666724326"); FeedZipHtml(zip_buf, 24950, "e0a7d9302506ed4661ac1d0687bc39c847ce7b784ec113db7a"); FeedZipHtml(zip_buf, 24975, "b9ce3e51ef9b810b8e5c4b306daec303e711f55c5bf148ca1a"); FeedZipHtml(zip_buf, 25000, "129584c4a924fd82e473369cbfc3fff94a28a7c1248f64c682"); FeedZipHtml(zip_buf, 25025, "beffa2aecebf9e7f6d90f34a45bbebfaa2b8c9ea5f4b37d9f4"); FeedZipHtml(zip_buf, 25050, "bb72ed8b7dcab5ef17d5a55cff4ecbbd910373e990dc074f22"); FeedZipHtml(zip_buf, 25075, "a0d56a9e174bea9d1725d5bbc61b18639c103e10dc45257390"); FeedZipHtml(zip_buf, 25100, "1121741e944fa2f9d5a2178749148ebd2e214381c01e38477a"); FeedZipHtml(zip_buf, 25125, "7de8b9938e9eca8f6b9466a6b706ee8d177f4d639d0c0f2d4d"); FeedZipHtml(zip_buf, 25150, "089c5e35254f4645907020021c27ec6551419163d7410698af"); FeedZipHtml(zip_buf, 25175, "a5b2701e2680cd8230183f974983f9652913d29392c3604f0c"); FeedZipHtml(zip_buf, 25200, "22c1095e66372d0bb02c62b6fbe0ea081756c9d6b90519955a"); FeedZipHtml(zip_buf, 25225, "cfc2d8a31d931fedbce55720c44c3cac7a32a7b756dd91d3a0"); FeedZipHtml(zip_buf, 25250, "dafa973289e8e3a3b0229718bf97b289f96d29e56e7690a30b"); FeedZipHtml(zip_buf, 25275, "97d8b7b69fab99a500d2c2e6bc1796e1e555320daf0b55212f"); FeedZipHtml(zip_buf, 25300, "25bef692ee30a30b51918042e49ef0ff3f775a543d74452ac0"); FeedZipHtml(zip_buf, 25325, "9b357374aef816a76e13f37229db353d03139c1555502eaedd"); FeedZipHtml(zip_buf, 25350, "71710f563f966ec1faabb9724364877fe086580cd052bddb9b"); FeedZipHtml(zip_buf, 25375, "35a6a689e9065cf63f587df6637f12e7fdf6f2711cc2b2d347"); FeedZipHtml(zip_buf, 25400, "0f86d3cebaee09be03f681ed8601ec61bea38a357ed74efd9d"); FeedZipHtml(zip_buf, 25425, "f6f1e52e56efb59c1ed3b616f2db55e8f54cfe634c1fbbc01e"); FeedZipHtml(zip_buf, 25450, "37193636bf738bfaab53fca957fca950d607f461d8ef5bd4a1"); FeedZipHtml(zip_buf, 25475, "e5d7af0b80b13b1fd89864aed88d6018147f1f167ff2ee8288"); FeedZipHtml(zip_buf, 25500, "55e7cf99d0b32035f2eee8f4dd1a0760f7ec128a39d501082e"); FeedZipHtml(zip_buf, 25525, "5d912d5a94e8527814a6dd0ac2f40e71255b1e83ded81dd2ed"); FeedZipHtml(zip_buf, 25550, "49c2492ae5b09672d7b2e01d2a8664e845e41b1fc56a3cb4b8"); FeedZipHtml(zip_buf, 25575, "e5e95baf421586f6308d169c96c9e9bab567e487e338cdea15"); FeedZipHtml(zip_buf, 25600, "e6ea23698e3417625ea6cef6f02fe5eb0a379da553cb49aa9e"); FeedZipHtml(zip_buf, 25625, "ca24e5cf646691b506a683c6f217390f97b173f7f816ce7132"); FeedZipHtml(zip_buf, 25650, "04cbdd3daf2f8c4de8b85ec522d4a1e5c4952fa99a618f3b4e"); FeedZipHtml(zip_buf, 25675, "058d7f51d6d0445a1a5bf099b68a2fb847abee9976163ef87c"); FeedZipHtml(zip_buf, 25700, "1e62d6d63b8ffc00299be235474aa7e5a2bf50e51efd4c2e14"); FeedZipHtml(zip_buf, 25725, "593f750e22d7a1f147447315893f3ed1e1e312e8f0691a1d3e"); FeedZipHtml(zip_buf, 25750, "3dd1e1d342e940716f63ce6b5e24826a6dc965ecd8908b458d"); FeedZipHtml(zip_buf, 25775, "e88f77d6d6c741127e4985b994a89a905c375522ef6ccbc513"); FeedZipHtml(zip_buf, 25800, "8639998e5c3027b2687e279a62c11ac6a45c8b9d2c4b366c17"); FeedZipHtml(zip_buf, 25825, "02cb63b57a3bf4744fe61085035444a1c2d38d5f8c1987455e"); FeedZipHtml(zip_buf, 25850, "79e124ce2b06758e6a9ee12a6c61699a561277b126f2222178"); FeedZipHtml(zip_buf, 25875, "ac96736df6320ce8fb61ad2a7b5a59d295a46dd4cc9606f662"); FeedZipHtml(zip_buf, 25900, "277cb8dc61181da556f7c218a59a4f2a6cf28f4f44b312ede3"); FeedZipHtml(zip_buf, 25925, "bd13adc280fff444342bd13edd3bd1f6649601d7569c3dd7a1"); FeedZipHtml(zip_buf, 25950, "92809a2e8dbdf7ab15246c802753f305531ccf25287c8e0927"); FeedZipHtml(zip_buf, 25975, "e7c1e0617c1850daa04e99d564f6a887c385c75703ec9b6681"); FeedZipHtml(zip_buf, 26000, "ab4abec61a2a580e9b1681d137882ef5751026a5389511d7b3"); FeedZipHtml(zip_buf, 26025, "a394662a4126b5d543e3925444a051331febcd2fbd87714995"); FeedZipHtml(zip_buf, 26050, "0ea3f181721caad534e3091c1f7dcacbaaebe4321aaaf0b978"); FeedZipHtml(zip_buf, 26075, "3edc89dbe2a6840fb9ad1e727994c56d51b188d45d1c257292"); FeedZipHtml(zip_buf, 26100, "ef160b4f26e6d58df33368c56bb94c737911ed72f47e297f59"); FeedZipHtml(zip_buf, 26125, "f570422231b6f0966374edb87f5da8310898d5eb321ea350c4"); FeedZipHtml(zip_buf, 26150, "8f352f9bcc5c14c740104e359c213c419c7f5db76ac406a9d2"); FeedZipHtml(zip_buf, 26175, "32aadc541a295978935752f6a6d993e2c1eed9e52e3f7cb7e4"); FeedZipHtml(zip_buf, 26200, "8a4b1b5b9cc36cc7c236d4f0aed0f005cec23d11e5d845730b"); FeedZipHtml(zip_buf, 26225, "d6340bc211c8d26e28fafd786eaef997e49a8308a872e0613e"); FeedZipHtml(zip_buf, 26250, "a99ec0709583b3a3abadbf5b192963673227e93c5448c61438"); FeedZipHtml(zip_buf, 26275, "f815a0f3ba1ed5a1d1b9ac5566627ea44ed5d9a5cfb224e407"); FeedZipHtml(zip_buf, 26300, "0883958d625bb80166f226e4ca077f8aa162950951663dcc73"); FeedZipHtml(zip_buf, 26325, "08a50e66ec977dd91371e271e8be93609ab0c41698906131cc"); FeedZipHtml(zip_buf, 26350, "2435c2f788b9ca742a49325521c61806ea44c5f7340feb8aec"); FeedZipHtml(zip_buf, 26375, "716e16297732cd227d84e7a84f9f0da709fcc5ef16d3515810"); FeedZipHtml(zip_buf, 26400, "d9a1d2956c627956660a58ea8ae10f729d6dcb370bca11cf66"); FeedZipHtml(zip_buf, 26425, "4bc9a14966087c3f54ef2b389efa951c2ccdb727694adbe5ab"); FeedZipHtml(zip_buf, 26450, "944b08b2aa65647498c47b1b5fd89fa19bd2c1d209019f6c80"); FeedZipHtml(zip_buf, 26475, "4ec3b067ae454dbac993b640c254cd3f593b0f056c25074d31"); FeedZipHtml(zip_buf, 26500, "9024cff9b1c1039b40ef143f79e86dd06cd95030dba45bc069"); FeedZipHtml(zip_buf, 26525, "b34dfae2ee93be88ea4eca11350d04d8e88fde4c7011543cd1"); FeedZipHtml(zip_buf, 26550, "1d20ddfb3afc0ff5f3c41a36a87579a9956a349a86944d0d37"); FeedZipHtml(zip_buf, 26575, "67a9cea39b67335e198b055a2ed65e455c96d9ab695b7d34df"); FeedZipHtml(zip_buf, 26600, "c9669d07c7f5cd58a44001bb0d1baf80b22db050adb8c486fa"); FeedZipHtml(zip_buf, 26625, "886ce4103a1742abadfdda78550f61e8a197d660f595b2741f"); FeedZipHtml(zip_buf, 26650, "8078c843f2d24f22c8ff1527914c73e94944aeb28cde4b398d"); FeedZipHtml(zip_buf, 26675, "cc2757350f287952e864b065966786e088d655b9399a1b9bb9"); FeedZipHtml(zip_buf, 26700, "6b3d9d751a4eddf34f5bea9e0bae70bb762c1277cf4d5c328c"); FeedZipHtml(zip_buf, 26725, "d58f87414fdc80b11bf47cb2bfbeebb0ffc3c04b246214b28a"); FeedZipHtml(zip_buf, 26750, "dac1d2a9e5e02b009b41a2dfb058bf22a7becbe9aaec2f97ea"); FeedZipHtml(zip_buf, 26775, "8f350a7bf9bc1d4dc2b35a7382667d2a1c46122bb5a272775d"); FeedZipHtml(zip_buf, 26800, "c2979351109b693e641de7cb48f42fe3db581d41dc1e723ce5"); FeedZipHtml(zip_buf, 26825, "4ba1cace3fa65a844f89a06524fcab2a27b66ca6a3134afd26"); FeedZipHtml(zip_buf, 26850, "8911d6e94625f69cfea277573ff281ca383c0236942e230c65"); FeedZipHtml(zip_buf, 26875, "aa6da7d865a32fe6d4cfd92ae038ca3596fe36caf329e39ec4"); FeedZipHtml(zip_buf, 26900, "54e5afc1a7ef3ecdd8360786495b7d171456b4f24a1eaf3347"); FeedZipHtml(zip_buf, 26925, "2c9c360bcc5b5a0bdf46c554347dd5e9808a8b5d50802aef78"); FeedZipHtml(zip_buf, 26950, "dd458e64ee419c06533ceb37baea89ee6d9ad56fffe2ec8093"); FeedZipHtml(zip_buf, 26975, "b9a49974f45ac17066eb20ad30682732d1d606a5010c6e2bf0"); FeedZipHtml(zip_buf, 27000, "f74fbf1f5cfcfcf22775f1e6b971faebe5e9c9d1a79ff8eacd"); FeedZipHtml(zip_buf, 27025, "f2b6981e2153c7b5487049d5fdb30b063f2e005d0f9a93d393"); FeedZipHtml(zip_buf, 27050, "fd0230fbc7676d3b1c41984e594413a6d5c6eb569fd203d381"); FeedZipHtml(zip_buf, 27075, "afc4fab1883e6666aca5e9b0e37cda8ebf6c4ee3f17877d77a"); FeedZipHtml(zip_buf, 27100, "53e1ba1fcdd7c63c5df4e81db3d3dfea945d6435071ed925e9"); FeedZipHtml(zip_buf, 27125, "a11b85b0db15e36ced686d6e480f834de7af30ff91e62b54e8"); FeedZipHtml(zip_buf, 27150, "5a498dfdb64cc044f9b3e26ec89a132433fffc87527102a079"); FeedZipHtml(zip_buf, 27175, "dd8b30ea6ac51d0abaf2bd8e14682f11cecbf57fe0952bea2f"); FeedZipHtml(zip_buf, 27200, "2a3d99bab0b8c47abcb22e218189d5d2590e5466283c7453f9"); FeedZipHtml(zip_buf, 27225, "cb20d58f63b00d5fd91c9a5e193ebced9cff0dbacae07ed2ab"); FeedZipHtml(zip_buf, 27250, "bb2140e40e44dcc695557ff11b555bcc7e11577f7291dca229"); FeedZipHtml(zip_buf, 27275, "66ef4a92dde41656a12550b1ec8fe3c185b55e5ab6bde5c491"); FeedZipHtml(zip_buf, 27300, "5778f8b77029d94912ac1d4a8cc89a90b78bb2ad0210472ad4"); FeedZipHtml(zip_buf, 27325, "d86f2681f79f093e68cba617c411d4ba950c7c299e2f52856c"); FeedZipHtml(zip_buf, 27350, "d9c2404a3cb3808e17f8749a41b1c09d5f9d6eb8085e461a70"); FeedZipHtml(zip_buf, 27375, "deafa4b7e626763c018d10c729bd653d9ef2fbb95e4f9d6a76"); FeedZipHtml(zip_buf, 27400, "c9beb2dcd1e5bbb458bc73da110fc7d85af8d9c624ab3fa259"); FeedZipHtml(zip_buf, 27425, "77498bcbf6ff42b5dea59fddd206f6c565306175933d5f4f75"); FeedZipHtml(zip_buf, 27450, "0e4e67b68f8d19af5c86eacd449baf123b54357132eeb95a6b"); FeedZipHtml(zip_buf, 27475, "4b65e41c67752799b85d1c4d26f7f9512b5218157032a02562"); FeedZipHtml(zip_buf, 27500, "75d4405e6851ad77207a97934fc3f6e665fcb76c4b13d24932"); FeedZipHtml(zip_buf, 27525, "a8522367c00dd2222f4a05c7afb4ee4455f5d3d9e9e149fba7"); FeedZipHtml(zip_buf, 27550, "5587fff159ffeb38fdedf8274369e137478727fb17edf3c393"); FeedZipHtml(zip_buf, 27575, "03ec94fef539fbe771aeb530ced9e9d1a783d3139e89fef9d9"); FeedZipHtml(zip_buf, 27600, "f8f7b1f97be1dbe30f47ed430d7cfad7e7ec9fc7b956fb38d9"); FeedZipHtml(zip_buf, 27625, "05e57efa6cf9edd8d6af0c46bd48f3efcff91f8e0b3d0ae31d"); FeedZipHtml(zip_buf, 27650, "ec9f1eefb7cf3fed9e1e1dedefb60f79d4e2af9f4b7e3e2efd"); FeedZipHtml(zip_buf, 27675, "bd6422b37f66d0cc48d9efc95ec5faa452d86bf16476539717"); FeedZipHtml(zip_buf, 27700, "2b3f7d64e359ba9be4e5ced69ebcd65b2daaf9ea7ca6d945f2"); FeedZipHtml(zip_buf, 27725, "04c73fdd75d475764ced635220aebb1583994092ae53a3aeb1"); FeedZipHtml(zip_buf, 27750, "3e6f912d4549e2e5ed18e68056967e16b0cfe6d2e515d38b69"); FeedZipHtml(zip_buf, 27775, "40aea6104a703fd741c2e76373b297cd4dd62c6e90b3a6263d"); FeedZipHtml(zip_buf, 27800, "3bc374f3549248bc52a7b52c2fea232e5ae5f2ecfb1a55f1b5"); FeedZipHtml(zip_buf, 27825, "7bbb8a5e4ce39ce6ddfe5428ad4b1500c07894995ee5c1bceb"); FeedZipHtml(zip_buf, 27850, "bb11bf97cf68e3bbedfb36234f0da8fdacffc401e018fa05e6"); FeedZipHtml(zip_buf, 27875, "56db28d91c7cd008c2600d8b48f4dca8074b49e4166cdaef74"); FeedZipHtml(zip_buf, 27900, "552eba1338b846cec5ff1ca1098f45e1b25b056246fb38f8ae"); FeedZipHtml(zip_buf, 27925, "eb0b10adeffa3191eceb6aeadb3dc86e8fd2b34bc71a87ea0b"); FeedZipHtml(zip_buf, 27950, "ca5cc192c87c1ae0e380275d441375a14cbb61470c5d8c9e8d"); FeedZipHtml(zip_buf, 27975, "b2fc9bc284de0880eb6f7ef2fa6f83e435a08ca6d06026d1a4"); FeedZipHtml(zip_buf, 28000, "1c4a65e5292b4e557d46dfef69dbd1fe5f20f204179b557665"); FeedZipHtml(zip_buf, 28025, "46d8b9e8e261619a2166edb65c63cc7aa3b138539f6e85d99e"); FeedZipHtml(zip_buf, 28050, "c2ea695e9c70767ed41a29cf9806904ae89cc64ea3b79fce86"); FeedZipHtml(zip_buf, 28075, "78435b6291adfe48092ae7b2cb9cbbd8654b39d5ed79711764"); FeedZipHtml(zip_buf, 28100, "7a1a7b59bbcdc45e0be7075d25b5ccb2a6639749b9bd1ce57a"); FeedZipHtml(zip_buf, 28125, "51388e25d9d8a397a59a76172bde4ab01c03ec461e176605aa"); FeedZipHtml(zip_buf, 28150, "a33a4292223ba679b664e92cc59babd0a2892d7a0ac6a5d1fc"); FeedZipHtml(zip_buf, 28175, "5c0c70eb897ef3224caf9e5e3a16958ab5a39dee4b20304323"); FeedZipHtml(zip_buf, 28200, "492c81ba18bab8494ea4df978ffb25547e4dc26b7e283f52c5"); FeedZipHtml(zip_buf, 28225, "12857e5f41e964852bf3d47ac155f84dc6caed9eefefb4f79d"); FeedZipHtml(zip_buf, 28250, "df0ecfdb1f768e9cf6cebba37d677d7dddf97001f67b66f416"); FeedZipHtml(zip_buf, 28275, "fcbcb2980dbc549e8187a7d2d5d2e9de686a086d0945abe476"); FeedZipHtml(zip_buf, 28300, "958476acf4b285b4ca38581e09a4d78e01a6ebd422058a7d1e"); FeedZipHtml(zip_buf, 28325, "96327d37f1fc1e29adf37624c8fe5514d02bc28bec3265bb5a"); FeedZipHtml(zip_buf, 28350, "6b1b4cdd16b6fd906be022adbbe1906ede6f750533ae6e86c9"); FeedZipHtml(zip_buf, 28375, "877509e22c7c0bb198d736adc501e80e6b781b93a75cd20b2f"); FeedZipHtml(zip_buf, 28400, "e07bceb3088ea6bd674eab0b18c662b62ba06adc9ecc744de0"); FeedZipHtml(zip_buf, 28425, "c127e7a7bfabe88684ce08e5812acc37c79d68174e4396e0e7"); FeedZipHtml(zip_buf, 28450, "6cfb43e5293cb5194b78608c843f69f09669882104d56ac3d2"); FeedZipHtml(zip_buf, 28475, "e961d1580238557344791ec042a7b015a474b61a600ba58629"); FeedZipHtml(zip_buf, 28500, "6643d1fd7641922a7ae728c316512bf4b9a73d9400a18a8371"); FeedZipHtml(zip_buf, 28525, "3852dbde904202eeac9516b06d5232633cbd97d5d643591631"); FeedZipHtml(zip_buf, 28550, "b94a6829bd5050793d32aad72b49f63b17cda9a298d9e52111"); FeedZipHtml(zip_buf, 28575, "ec1a0866589cec3ebad51e84df0fdbbf9c7e6833550c37c223"); FeedZipHtml(zip_buf, 28600, "23d014ab28dfa5466481e59b87a41025adabd521e29e0202bd"); FeedZipHtml(zip_buf, 28625, "e4967d08ca3bd8fdffd97bf3e7b6b12441f8e79abf02e18d9d"); FeedZipHtml(zip_buf, 28650, "a2762995edeaeee9965d8e9025d9ad2959f64a725d1d1d0a90"); FeedZipHtml(zip_buf, 28675, "042994498005809258317ffce6f14ee0e120c553e6ccf7cd96"); FeedZipHtml(zip_buf, 28700, "85c777e4cbcc97774e1d9e6aee47a49df9d83d1dbdda46ddfb"); FeedZipHtml(zip_buf, 28725, "a9584e7b14d9e2e60c9852ee49dcab8a5591abe9d0480a79a1"); FeedZipHtml(zip_buf, 28750, "4e6c34b7abe11281deb4e6769541a17c199d7fb02e3c16c032"); FeedZipHtml(zip_buf, 28775, "f1788d025fd1fa574d368e412def5f80233704ea028abbad73"); FeedZipHtml(zip_buf, 28800, "46e975c77433d0147b62675a7bd14a251d001f40740828b35f"); FeedZipHtml(zip_buf, 28825, "2789bf04113b06caa971850497f046974f72650bd505efc96b"); FeedZipHtml(zip_buf, 28850, "b426a3e09a31d0031bb6d8012733cacc9432093b6322ef07cf"); FeedZipHtml(zip_buf, 28875, "082ed4f95e7c29faa0395ec1858de512df7c832725d0f83a96"); FeedZipHtml(zip_buf, 28900, "dafe215f4b57b40f4c820e281f999977e5de9c157569cf4836"); FeedZipHtml(zip_buf, 28925, "bb5ec890d273b27922ed26984e692576952559ed985c8ec99d"); FeedZipHtml(zip_buf, 28950, "f10d82e873ee4f81f1601b8b340bbb8ebe01a54391e1358842"); FeedZipHtml(zip_buf, 28975, "2cfdb58bbffdab8cc3ad80879d8d00d221ec74c812411efb42"); FeedZipHtml(zip_buf, 29000, "7594d4ee854827f30c18cec6c9d43ca99ac1207cb9664ff4cd"); FeedZipHtml(zip_buf, 29025, "f90611d10ae155de30761198214d64399f000303de72f2b694"); FeedZipHtml(zip_buf, 29050, "e5391626df4b20481e97ccad928add38139606e15d20d4fb42"); FeedZipHtml(zip_buf, 29075, "0ae452ac44cc05df183e64d45d0ff93466bf326c382a9b1991"); FeedZipHtml(zip_buf, 29100, "6f72d807c0ecf74354a08d5e0d64a3881362e3083c8ca4146e"); FeedZipHtml(zip_buf, 29125, "8ba13fc526a121e66df7265d79310043fe691a625ca8089824"); FeedZipHtml(zip_buf, 29150, "bffcc18348b4898ca6e448c8c2bd3abcf7a7a951299efb9523"); FeedZipHtml(zip_buf, 29175, "0a22e2183196b7fe781c44a544fd79dc88a09dc31a1173c92f"); FeedZipHtml(zip_buf, 29200, "378d90799b3544eafdeb1d687e13b8e263ecea43e0be8e3318"); FeedZipHtml(zip_buf, 29225, "798abef6ecdf0ba462494c3b0a9ec522f43ec8e8d2f83e1c29"); FeedZipHtml(zip_buf, 29250, "82d6f719d1f05f464cf9db3806c61171d989559429b9d4b5b2"); FeedZipHtml(zip_buf, 29275, "4e23e04b18c9edbc0613214976eb60d1081cd0891f78bfb130"); FeedZipHtml(zip_buf, 29300, "6910285ed586d9e0ff083185a29bbf63ba2024312afd88c0ed"); FeedZipHtml(zip_buf, 29325, "7c380862bc648f867c02d78ff20de60677b3a1361937eb6089"); FeedZipHtml(zip_buf, 29350, "ff736de615060f22484749484918dc9951bc061933573e2c50"); FeedZipHtml(zip_buf, 29375, "2b0ee3ee1965a9312200053192ec3d9f4eafaece3e9c5d5d9f"); FeedZipHtml(zip_buf, 29400, "1d9352d264dff27fd0b10ce8af235244ffbab6470da3b03204"); FeedZipHtml(zip_buf, 29425, "8749ab01239f5b392ad339d3abfb78f0833ebf460822790312"); FeedZipHtml(zip_buf, 29450, "77f2b52a345bb0d23515aad116444e83e83665f11911e34321"); FeedZipHtml(zip_buf, 29475, "5f46ee0fed4a6fc927063b254ed802f07dfc746d404f41a4ed"); FeedZipHtml(zip_buf, 29500, "81983a162636a17aec1d38994a5360970adfc854f9f1147dff"); FeedZipHtml(zip_buf, 29525, "b097a096c9c95b215cd684b03e534db9fdac34e3a0cc0de4cc"); FeedZipHtml(zip_buf, 29550, "4e406e926f51b4b27cbd847674d3955bd2f95a762a48e70def"); FeedZipHtml(zip_buf, 29575, "1d83c8f65f2ec883de1201f07b39968fe9711408bf570d7a67"); FeedZipHtml(zip_buf, 29600, "ea4619ecdd791e6b05fe1d6d29077c6133c87fbb91b90e92c0"); FeedZipHtml(zip_buf, 29625, "36ee7a6c2b19aae22a3ae99a3d46ce2686ce81e2b976b7bacf"); FeedZipHtml(zip_buf, 29650, "59705c83c44d86cb4dfeb2539c92001ec7cc27917da836a972"); FeedZipHtml(zip_buf, 29675, "11e5d1088e7831acba8bdcc8b5ded6e7f12081f7a6feb64a06"); FeedZipHtml(zip_buf, 29700, "b6bcaaecbcb55cc684775a7315e2e9c2bfa69952ca68de16fe"); FeedZipHtml(zip_buf, 29725, "f2e4ada4368e0426e74fe6a11e9951c87b21d4d4276d52c7df"); FeedZipHtml(zip_buf, 29750, "8a7d18697a672adb349f6d6c46301bd2870e6ce5a4637934d5"); FeedZipHtml(zip_buf, 29775, "bddbef83ee4a73070f41970a8b21ba84a2cea54abc937a03d6"); FeedZipHtml(zip_buf, 29800, "1f30d63ea8d49195fa2b5d611c441b7752d84ba634594a6064"); FeedZipHtml(zip_buf, 29825, "cb2dc519b75e7b7f39787e209b8c639e71476dbdb7467c5f40"); FeedZipHtml(zip_buf, 29850, "0507d4f6bba0ef0fe341453f470a5a8091c73c92f8ba444053"); FeedZipHtml(zip_buf, 29875, "fffeaacb3988e8180da6ea37bc3070d674e5e53ce7d4829a12"); FeedZipHtml(zip_buf, 29900, "1a3131f0c6c00fbbfc41feeb4d6ad961644c64ada40b87722d"); FeedZipHtml(zip_buf, 29925, "156a8fc0381e4f18d5d218f9482f48bb49081f4051026e450b"); FeedZipHtml(zip_buf, 29950, "7d27543421d71b0c42700fc4e093b7cdb434214773bbc38596"); FeedZipHtml(zip_buf, 29975, "54a85d7a3d25179a006525614a6cce3228a3deb8e71c5c9361"); FeedZipHtml(zip_buf, 30000, "5f218fd58a61796b611ddce6dfe588d519b76f745147589e39"); FeedZipHtml(zip_buf, 30025, "b23997a0caf5544654d51390a3e01122a6ab044d5bb91564bf"); FeedZipHtml(zip_buf, 30050, "236b275937414f0d11eeebca12112623dd264160b96c659f57"); FeedZipHtml(zip_buf, 30075, "614e91561edb9ee3be3975e8fafd98dc1cc065e7f5c10a6142"); FeedZipHtml(zip_buf, 30100, "c24b8ad52c5591d924be47f0e4b2e0fa5476368ccadf98e630"); FeedZipHtml(zip_buf, 30125, "128d6a7340ea53b6970d239f1cd68dc032422b8e79e2b4504b"); FeedZipHtml(zip_buf, 30150, "a2216ae30387f5d850dec52c458375d0fe440a8280e6d44a6a"); FeedZipHtml(zip_buf, 30175, "a251c4183453e143453dae01a2f88973aeec3ef6e4f63b01f6"); FeedZipHtml(zip_buf, 30200, "975066dd509ad09abf316e48159f7a5092828cd25f94a9944f"); FeedZipHtml(zip_buf, 30225, "2d23de105549dbd00e82c3da1de0858cc2542196858e4a4911"); FeedZipHtml(zip_buf, 30250, "355206519c48f9bfc9d196fa7c2e401748b3e930a8d002aece"); FeedZipHtml(zip_buf, 30275, "4fbe039d042b8600d8c99ef835cafcc5640cb3844a6936865d"); FeedZipHtml(zip_buf, 30300, "67a52ae6d0319eb4ad87a049c993b9e669af40f7f8c73f7acf"); FeedZipHtml(zip_buf, 30325, "fff18f675879e461347ce9563f54814f61ab30d00fc3a99c18"); FeedZipHtml(zip_buf, 30350, "d879e32a21dea07a9800867cf4e1f91886dd10b507dc0457c8"); FeedZipHtml(zip_buf, 30375, "32dfff8867a7ca48eab730a734b688a201228e01f7acac3346"); FeedZipHtml(zip_buf, 30400, "012d34abc1ee5b6847a0c8201c482554c8a98493bf9ebcf9e5"); FeedZipHtml(zip_buf, 30425, "eac44be1f3c857f3c511d73a0edfece5fd20f3d583ab3fb0f0"); FeedZipHtml(zip_buf, 30450, "e356c83e2007c4238ce261af9aa574c10b1d47f110ffd1cd5b"); FeedZipHtml(zip_buf, 30475, "6a161fbb546f4439f47434122dad3c2aeeaa99b82700a96547"); FeedZipHtml(zip_buf, 30500, "0a65ac053e02027894c047126f75e126ad3fd7946b42a712e9"); FeedZipHtml(zip_buf, 30525, "ba6ca872541a15e4c1959c81e6605c4f29bda55e9eabd31b95"); FeedZipHtml(zip_buf, 30550, "7569ad5de45aa5435b9eb4e3bbd58ffe4d856ed2bfc919bc67"); FeedZipHtml(zip_buf, 30575, "a8a6b69e1d0167843b2efeceefa0db8fc9953f784fe4046dde"); FeedZipHtml(zip_buf, 30600, "6c98defc3101a94baa9f143a203b55c2c7a01766d6370e2b58"); FeedZipHtml(zip_buf, 30625, "f16b0148cda0f44c54d6c583d11d2d884309bc322897e8ada4"); FeedZipHtml(zip_buf, 30650, "fb84751f925f927c3a1d7580a575391a205fce8b522a02ac25"); FeedZipHtml(zip_buf, 30675, "92db1585347c4a4292687f0ca64e2e0eeb9a376d328cc2250b"); FeedZipHtml(zip_buf, 30700, "2b7b60293d24b73ab805ec8d9a580843186ca518391ce66a5b"); FeedZipHtml(zip_buf, 30725, "ca4d59853c745410be288856e6262546891a2b22e91964f748"); FeedZipHtml(zip_buf, 30750, "44caa2f0ac2a742283ee806e0b22fbed0454210cececf99d10"); FeedZipHtml(zip_buf, 30775, "de8ba9e37d23c3a47b2326aa9afb31b054816b18f43177de2a"); FeedZipHtml(zip_buf, 30800, "145ab82c4b79888290c2d8343544a89188890fb6e121ab7f0e"); FeedZipHtml(zip_buf, 30825, "044dfc1406f78dde04c7f83a267607632bbea8f4ccb95e8495"); FeedZipHtml(zip_buf, 30850, "ed6749efc1c6eeffab790d10f41bf618a81bb68229cccb7de4"); FeedZipHtml(zip_buf, 30875, "2b8073a5f99765f7162ce02d9057781173754d34579a98a6e7"); FeedZipHtml(zip_buf, 30900, "5775b9d868a90849f99ab9e4ad5084e93b39ada522964ac3f6"); FeedZipHtml(zip_buf, 30925, "24ea05093753b0560acd560908d77d0c8164150f1fa796fadb"); FeedZipHtml(zip_buf, 30950, "0faf45a399bd27f2aa99153b9aa93a8e1fd4f3e124abf8f2b8"); FeedZipHtml(zip_buf, 30975, "776d751b5a96a2b3b107a87fd936fff1b24ad26ca23ea3aed2"); FeedZipHtml(zip_buf, 31000, "7ec28c5b7cf4139664dbf88439f7e17cc0e0a28a0fd5efc1a8"); FeedZipHtml(zip_buf, 31025, "fcb512114a6a9aca77c94221658ba21b11e93a38dd135377ae"); FeedZipHtml(zip_buf, 31050, "e371fc3e881bbd09b9b175cc2b83e1c378309d218620cf3317"); FeedZipHtml(zip_buf, 31075, "b8e292b8fa1a77f8e415926b01ac7dd5f469b3583a5e26f05b"); FeedZipHtml(zip_buf, 31100, "6bd9f978b7408b30d8027ebdf92ac7b6f3e38b206bcc8f8db1"); FeedZipHtml(zip_buf, 31125, "75bc270a324c857d243b5ecc824be4c6ebd9e0d7c38c2f1868"); FeedZipHtml(zip_buf, 31150, "1bc88be13a17c08b0552ec38f157ca893f474973cf70d9e06a"); FeedZipHtml(zip_buf, 31175, "ceb3126a8f4763cce5a07c4f51fd35cafbc7cb380105ac8551"); FeedZipHtml(zip_buf, 31200, "77382122c160b0fe24c12bef05632c97f5aaccd076ad4d7618"); FeedZipHtml(zip_buf, 31225, "1281092513dac4249259348d390735917746eae5f6bce51877"); FeedZipHtml(zip_buf, 31250, "156436f69c45fdd8113f553ab456eb68f894d53db518bfb79a"); FeedZipHtml(zip_buf, 31275, "4dd06339df4bba7cd23283bb3907638ca546e0d2010cd81337"); FeedZipHtml(zip_buf, 31300, "ee86be6cb05c42624b2502f528563e474940cd77a3ace4206c"); FeedZipHtml(zip_buf, 31325, "864f83acf9fbd7f4d911ada873615732ab05ee62842da98571"); FeedZipHtml(zip_buf, 31350, "28ff1401216bcc8005be7b3a6f4f81b28ee3f1340907b78e52"); FeedZipHtml(zip_buf, 31375, "1895c3eb88b12b073e9ef81fbd66db032408a2b4f04aae8e92"); FeedZipHtml(zip_buf, 31400, "d5190861cfc576368e9ebb2636e88c00e644fa0cb7f110de65"); FeedZipHtml(zip_buf, 31425, "6af2fdda68885d28f7a013cb4413ee5e234ae7a67904227da2"); FeedZipHtml(zip_buf, 31450, "4475edc60c5a4a32c34ad0029498d8ce6252aeb12c968bbe11"); FeedZipHtml(zip_buf, 31475, "931989306d0cc10c0e06078801c7c7cfbd17a245255634c6bf"); FeedZipHtml(zip_buf, 31500, "786f7fc55454fcdb9693bc3b0eceddfbb172781df92db15164"); FeedZipHtml(zip_buf, 31525, "258d1df57a42f4a49c657a60f0e897a2c02ef5032a08a67962"); FeedZipHtml(zip_buf, 31550, "580579a9620c73ea8e0dfa246f299296a939a5685af5834d45"); FeedZipHtml(zip_buf, 31575, "d4cb7235a90c7729e3c69f1b59650eb1c43b1b79a9c493d128"); FeedZipHtml(zip_buf, 31600, "c5b519dcc9b6e316bdc1369a9495ffaa1c5e954b2284978a1f"); FeedZipHtml(zip_buf, 31625, "cfd922bbc1c4335a021634f3da13597229b0fa4a3d2a6886f6"); FeedZipHtml(zip_buf, 31650, "3c23a7a540446d9711c2309c95528383f8f25e663731e60b75"); FeedZipHtml(zip_buf, 31675, "a8f6f3d9ad9fc95444a75d4c27d6bd127922ba1c974f456494"); FeedZipHtml(zip_buf, 31700, "f093fb7d6ac86031521c5700b4321fbdd6c857f5d5e0132616"); FeedZipHtml(zip_buf, 31725, "82363d0aca925fcc73362847524875a94a72d1954778595742"); FeedZipHtml(zip_buf, 31750, "2f26b85c9ba548b69a3fb925ae1f83e97d9ccc22a3c99fd491"); FeedZipHtml(zip_buf, 31775, "ed171eb60693214b6a880f5ff4e936483e337745f388f08efc"); FeedZipHtml(zip_buf, 31800, "de648a7c8ae07d2236c23281aa0a0f6b7eb3b988582189e5d0"); FeedZipHtml(zip_buf, 31825, "6031025801b16a6530f18b2d472ac9a8f06d46a6fe3ef1c7b7"); FeedZipHtml(zip_buf, 31850, "61b792a9e5c6b6bc8761187db9b90595a78041a02bc5136c0d"); FeedZipHtml(zip_buf, 31875, "8536daf38f6f6771e53e7a9d992dce58116b5dde9ab3280d92"); FeedZipHtml(zip_buf, 31900, "0c9e7ab86e1625b080422405272a322c20e15d8ad356989d34"); FeedZipHtml(zip_buf, 31925, "ac08a7f3de56545ac9d92aa76aea654d8ca51d75267c0fa12f"); FeedZipHtml(zip_buf, 31950, "6bcab2d086a0837907c17783b08ff3b6f55fc60c61e32fbf8f"); FeedZipHtml(zip_buf, 31975, "838161e8e13fa67783ff0b20a3bf8ffde930f69b19aa6c976c"); FeedZipHtml(zip_buf, 32000, "bb6000971965a19966b62827ed36f203fd6034e108a5a32b68"); FeedZipHtml(zip_buf, 32025, "7515b47412a0df337546312c869ea810af9c46d110d3408f56"); FeedZipHtml(zip_buf, 32050, "7f2a2f033fac5466a081a84be35a1e95cfa8e3f94b63a1be17"); FeedZipHtml(zip_buf, 32075, "05f786955e6d9e1f6feaed5072cda91aeae06d91f7cb6858e0"); FeedZipHtml(zip_buf, 32100, "6f5c93c0aa0822934cc4fa78d3ba5024568a5469efbd5c2d0c"); FeedZipHtml(zip_buf, 32125, "5a1a3b94711e3d970fc0c603469b3211a562565d60c6c7fab2"); FeedZipHtml(zip_buf, 32150, "dc63ee00b73ea8c7027f388d860bd9c301b0920fa0f12f1fce"); FeedZipHtml(zip_buf, 32175, "bd2b2eb3f0932ab360ec9bab752b3d964faab4425d9c488486"); FeedZipHtml(zip_buf, 32200, "60375fb80c7e79c866463f1076b3580d505f2e944c36c9e211"); FeedZipHtml(zip_buf, 32225, "569d16ed5fac42e002ceb0d92d27b0bc6c5e4e62ce9182c86e"); FeedZipHtml(zip_buf, 32250, "8a96d27f79a2c7637083a687dcd7ea965475ab49e1e83a78c8"); FeedZipHtml(zip_buf, 32275, "e65d6c15ca8281a7b3f3816b2a7b8e28c984cfe7eb69c140b9"); FeedZipHtml(zip_buf, 32300, "ba6a91bd5787ec067d1d45d37b7f4a562ea3a0182f8e2973f4"); FeedZipHtml(zip_buf, 32325, "3bbb08989852518e2e8ffe3b13beb007e1ff731f936c89fd4d"); FeedZipHtml(zip_buf, 32350, "f678b214bb092581d694cda9b2db0916d1e2fa5efea8130e26"); FeedZipHtml(zip_buf, 32375, "8e18b47b692d7a5d595b46e24749b5154779399bbbc81b4089"); FeedZipHtml(zip_buf, 32400, "0c0f1366dfa6c65dabdbe8b0be26f6272f9e6be450891c25f5"); FeedZipHtml(zip_buf, 32425, "21b25224135a16533d475a58d3cf3480d0e66672f2426b97dc"); FeedZipHtml(zip_buf, 32450, "e54d142da90b74ef1a5da6fa76ec9deb8de7af77cb39e06580"); FeedZipHtml(zip_buf, 32475, "827cbd80911b55cef9dacd040f5bd92c99bdc0e91a4ebe342b"); FeedZipHtml(zip_buf, 32500, "7a8930bb9371162de3c8163a060b425884d1443e0845262ca3"); FeedZipHtml(zip_buf, 32525, "2a4aa41d2c4529bc20395947c5495a328fdc82dfedc6097228"); FeedZipHtml(zip_buf, 32550, "f441c44f47f671280d9a3f3751317874ad1fb9844fcc549868"); FeedZipHtml(zip_buf, 32575, "e6f50a9c6325967b19a36447f76bb6908b5c32ebc62d367a49"); FeedZipHtml(zip_buf, 32600, "3657b1e48423a768c6b42042011b095561890621e9e9152fe9"); FeedZipHtml(zip_buf, 32625, "0b51ca084a820b80e117b27227cb72868507915c8a4b17dcdd"); FeedZipHtml(zip_buf, 32650, "48883d310842adde04251680efb6d703708af715c457317e49"); FeedZipHtml(zip_buf, 32675, "e4f7e815d74280a612226831a46e83d97d801d529d444992e8"); FeedZipHtml(zip_buf, 32700, "4650a511e3b8a3caf53d885c2eb1deda668cdb186b1bef697d"); FeedZipHtml(zip_buf, 32725, "92a858ff0949a23b6bdb129ebd3a12738e5c81b5cdb1da765a"); FeedZipHtml(zip_buf, 32750, "db66e4033b6bdb53b1b61918bc65d63663e74fdcda562f60e4"); FeedZipHtml(zip_buf, 32775, "462dc1dad684d36da8b56d27e3ecac6d5b48f90509a381b5ad"); FeedZipHtml(zip_buf, 32800, "307a5e75bfa9b96dce050bac632df6b6026390f636f3c36235"); FeedZipHtml(zip_buf, 32825, "7b31f3cedeb6d1c4e714f01bd9db164680f3a8204fc2de5620"); FeedZipHtml(zip_buf, 32850, "4a656f5b3b55eeec6d1bf42436ceb92d0edfd454c6f9726e05"); FeedZipHtml(zip_buf, 32875, "f22e30a7233fe32ee776fea763869cdbed41d4f9736ee745d6"); FeedZipHtml(zip_buf, 32900, "5dcead4a2ab5d1a436e7d635bc71ceadf3c78bc8b9754fbc88"); FeedZipHtml(zip_buf, 32925, "9cdbd967deba9cdb1c116d68ce6d6e9733e7dce67ebfcbb9dd"); FeedZipHtml(zip_buf, 32950, "78fee496b89ae4dc3a7fb1b9998eb3a4dcae433cdba5dcce86"); FeedZipHtml(zip_buf, 32975, "8635bfd95c449c39e5f691f2d7d79a727b15646c76789fc493"); FeedZipHtml(zip_buf, 33000, "7165a1c7fcb89637c0ff5e4e89c7d564b436ae98284c3374f8"); FeedZipHtml(zip_buf, 33025, "0ad38c06888bd379e62c87d2b061fed1ebc5411a7d9b795378"); FeedZipHtml(zip_buf, 33050, "96892d82f493e987577736e5fea385bcd3d7cb28b2b88d78ad"); FeedZipHtml(zip_buf, 33075, "199f81b6352cd2185981dbeb2a96eb424336214653ea1e4d3e"); FeedZipHtml(zip_buf, 33100, "ff2c18cd859bc62b6c2eb2e5587059bc598e40ac94d90aa32b"); FeedZipHtml(zip_buf, 33125, "39ddba0b2bcb5d5ba1d674c564f5d52d9fb78b8d2d20aaf489"); FeedZipHtml(zip_buf, 33150, "602c4b364d3196476f13c6eaf37d3d185be297d9468cb52543"); FeedZipHtml(zip_buf, 33175, "3ad1273f8cb28f49af046b2b7fd1a237cc19e033c64137318e"); FeedZipHtml(zip_buf, 33200, "5a8731eb9402d71007404084099459cbd8176b247152c06cac"); FeedZipHtml(zip_buf, 33225, "1fb200e6ccb135f905438e7b1eb0058c11425971a2e021f3fc"); FeedZipHtml(zip_buf, 33250, "3bb8772a50cde01bc76968d974ec18143e206c06ebb064f1d8"); FeedZipHtml(zip_buf, 33275, "1b0677c1505461510133af276f3e0d030c7d8ba869d9e4cd21"); FeedZipHtml(zip_buf, 33300, "ad48db432ce7b56809d1b1ac1f0f87f13d8da22b87cfc904eb"); FeedZipHtml(zip_buf, 33325, "eb8607c101d9b5ee7177f8699f7f6d5406167374c40a188113"); FeedZipHtml(zip_buf, 33350, "00ac8d055114ba0d07b7f277075eb9cf3357390cfe3f9328bd"); FeedZipHtml(zip_buf, 33375, "33c0427d3d16afe892522af762f8486dcfa8c0638ef47c4224"); FeedZipHtml(zip_buf, 33400, "ce009b89c6f33fc93f4f46a05db54162eb58c08ee23796e20d"); FeedZipHtml(zip_buf, 33425, "3a17e10ea9df6795cb0ccfcd45333c2952668e371329e77ff2"); FeedZipHtml(zip_buf, 33450, "f590f2a3e5d41d292f9c948b4ff6d743ca4ec3559350befcf0"); FeedZipHtml(zip_buf, 33475, "52917ba5867e232ecc8e56ad929fc9f83f2b1dee84c085a15b"); FeedZipHtml(zip_buf, 33500, "8535ad62fc9c6fc6bad171d9d8b7e3620d4c5e15e3b714ad0a"); FeedZipHtml(zip_buf, 33525, "72c5a2d0ea6b7e1ca58d9160569fc1ae876d4c023b3f33abca"); FeedZipHtml(zip_buf, 33550, "ed823fa3cbe981177c22d95c4bc858cf0ff86a13d76b08cb35"); FeedZipHtml(zip_buf, 33575, "700569ebc5c5b6336b7d36e2df25adef92d67749ebab4a5aaf"); FeedZipHtml(zip_buf, 33600, "1529ec414b48596fc0e53634637d27d4ec52d4b781ce0b1a66"); FeedZipHtml(zip_buf, 33625, "bd0a911f5c1982316772ec23d6da883a9079f25f6878657d08"); FeedZipHtml(zip_buf, 33650, "db2e197da3c8cc69ca69a252ac82d41eb5dac6e6a0e70950a5"); FeedZipHtml(zip_buf, 33675, "a0af89027789e72ba640498270e6613af601cbfefaac1cdffa"); FeedZipHtml(zip_buf, 33700, "cffbcfbbcf9f8903de7effe6b5efe1e5fff06cfce26f216a2e"); FeedZipHtml(zip_buf, 33725, "99ffec0de67af52711257aa56642dfd9d547ef030cc1aedaaf"); FeedZipHtml(zip_buf, 33750, "bff361133885633bb7c69abde7f8bfcfdebc1333c2d05b89e4"); FeedZipHtml(zip_buf, 33775, "ae71575310fd1eea467d7c7f8c6294308dd68d1689763dfcc9"); FeedZipHtml(zip_buf, 33800, "28ee4d905a6a76311961b32a1ae6e0762c6a9ea5b104074b9b"); FeedZipHtml(zip_buf, 33825, "453e5732b02aaff59bb2df78423e5d875b8ff7440981a02f63"); FeedZipHtml(zip_buf, 33850, "bd28da93891d00161b41dc5c479061b5be2ee4705613746fac"); FeedZipHtml(zip_buf, 33875, "16aab744647b6d72aa0b8e9017deef8224455e29ea5add09d9"); FeedZipHtml(zip_buf, 33900, "1b36799d84830186aaeae4c734031eb1ddbaac94230d9c29a2"); FeedZipHtml(zip_buf, 33925, "a26310a89bdd785c7cf546e27b5355f6b153b7e1d191805dee"); FeedZipHtml(zip_buf, 33950, "3ad88ced4cea53c9a6e42d7127be3cf534d0a6f1e83454bcb3"); FeedZipHtml(zip_buf, 33975, "68c689a929da2452bc5174c083030f7b57808ec484c51f61cf"); FeedZipHtml(zip_buf, 34000, "c380f8b2f545ac12be81cd86c8d7c470dc1a30003d277005c0"); FeedZipHtml(zip_buf, 34025, "e3ebe938c8ff4dfddbcf00c2a092daa3d45f730ba214a00601"); FeedZipHtml(zip_buf, 34050, "afe64817de2b2c3e8c0713fd3d25dd5afd13de8d388a4753fd"); FeedZipHtml(zip_buf, 34075, "3dee67f7bed88b79a6bbb01b3860f04f3fe9a9f1f8298aa3f7"); FeedZipHtml(zip_buf, 34100, "413ce04e6e27b9c3f742a04a849990b2c23779c908ae68645e"); FeedZipHtml(zip_buf, 34125, "a8aba521d3b83431a4598ce8c8598a069a573526ec8709886d"); FeedZipHtml(zip_buf, 34150, "6872f05a6865d5fd0931d57d4f86358c8304c7a4a269e2d9c5"); FeedZipHtml(zip_buf, 34175, "d5e9e535eefa158a468839e55d0e4365477ecd0d0d350d09b9"); FeedZipHtml(zip_buf, 34200, "13a7fcfce9e4e8fad410c1ec368762036c15f673855714bd26"); FeedZipHtml(zip_buf, 34225, "f13d8967b6f3739bb9f3fb20336ef2cc91d99b1fd15a3f9fba"); FeedZipHtml(zip_buf, 34250, "1470450b958e7e6134b06f0e1059189b2a1858ce88e5c4a203"); FeedZipHtml(zip_buf, 34275, "c5e7cffa5e14e79631273727e6ec0e515a428aad568c9ac001"); FeedZipHtml(zip_buf, 34300, "80d86fa7971f19e3e11ffb2f0898daa62dee161161755277bf"); FeedZipHtml(zip_buf, 34325, "17e7256ecc4e0970553cf6bb938fdf7d7c7f49a64f1061b80f"); FeedZipHtml(zip_buf, 34350, "e857287c5bd2f76dd0fd72c5759910254e9cf28e6b54cbbb8b"); FeedZipHtml(zip_buf, 34375, "e15a6b4ab4b87fd9ebdc8c41e50c1f96438d3dc0123c7c07de"); FeedZipHtml(zip_buf, 34400, "18c741389e556c4a1302f23d16850502c3ae0e959c20de20c4"); FeedZipHtml(zip_buf, 34425, "74a0c6fd1cdb4a91f185446a47d7d747c7ff3c3dd93f795ba4"); FeedZipHtml(zip_buf, 34450, "5475709a85e9cde4c7bcc873b18694ef3b6f06012a94c9f406"); FeedZipHtml(zip_buf, 34475, "8e381945a9f1849416d5a2c42daa0221e99af708538689e777"); FeedZipHtml(zip_buf, 34500, "f129f186fe140df832c74bf389944b5b4cbd2f517c1f6942f2"); FeedZipHtml(zip_buf, 34525, "19f7733b7ea177dc890111854a430bb7c994c2ab8ae542be02"); FeedZipHtml(zip_buf, 34550, "7c288df2019354c1892fe73ccc026f180cfcee94e6c7a8dd78"); FeedZipHtml(zip_buf, 34575, "48d1b3ac95980570be3f7871f09ccbe0f8c93064f4d92becf4"); FeedZipHtml(zip_buf, 34600, "e5dc3b35b6273809134a6e81efe75e40b822ca20a140f09783"); FeedZipHtml(zip_buf, 34625, "e770528cbd8eb048502705ae80ea9e008afbdc7fb1710a90b3"); FeedZipHtml(zip_buf, 34650, "b801191dd5994abc03f6e4bdfff4e37bfab1501ebb6c3cc39d"); FeedZipHtml(zip_buf, 34675, "8040f7c9ef7ef107417e512558e0bfae7355776c2a50eaaa54"); FeedZipHtml(zip_buf, 34700, "4e41a30411f1564ae0b81549541e522a9275ea51f5a32c00d9"); FeedZipHtml(zip_buf, 34725, "5c0a805d246e2c3204679c445ad5653ab9f87c7eae8bf8d0be"); FeedZipHtml(zip_buf, 34750, "c4213f1c9d5df01b2b26d7be9d349d8c1820001b7f32ccdc8f"); FeedZipHtml(zip_buf, 34775, "1702f86892c5801757999f384a73995f9b714efb176be398d7"); FeedZipHtml(zip_buf, 34800, "45592024d8664e2e2a18a8ed14a3c450d8f1777002602fb7ec"); FeedZipHtml(zip_buf, 34825, "8bc4b0d130412e04c74488d19af7a0208c31d20f6e8d1a9fcb"); FeedZipHtml(zip_buf, 34850, "575bb240262805aa72c1d5fbd72dc8bf232412bd8e24477238"); FeedZipHtml(zip_buf, 34875, "76d0f82bb256ffbd6a6c857b1d04d9fad13576d47e303ece88"); FeedZipHtml(zip_buf, 34900, "acf883adc6d55e9066493c95591775483a897a8b4345b1b689"); FeedZipHtml(zip_buf, 34925, "8c3bf49e0fbdcf40a54184ac936cdde3ca917ec1e2a8300557"); FeedZipHtml(zip_buf, 34950, "4979b20aa643cc538a3edf3a05433c4e91b7d577c2193b1bea"); FeedZipHtml(zip_buf, 34975, "10d3a18ab2b3c0328f43cc1cfa232124ee4db273963e582042"); FeedZipHtml(zip_buf, 35000, "1995e2b2321f2b1ff63c53fca371e56cacd78319df0bc01d13"); FeedZipHtml(zip_buf, 35025, "dc1cfccc31aa25a4e4620908fcdaa8ec6afb3ff0c66e08ce85"); FeedZipHtml(zip_buf, 35050, "002665d2ca7d6aab97ec86425bea2b3e794bc23a114f3d5178"); FeedZipHtml(zip_buf, 35075, "27ce4e574c065519d0232fada83331e249de2270982042187a"); FeedZipHtml(zip_buf, 35100, "ebcbba4906ffe064398cd52ba857ac47c0f13f7d3cbbb8668a"); FeedZipHtml(zip_buf, 35125, "730af030e4fcece2f4eafaf2ece2bd73dcf77aaaf35fdf7fbc"); FeedZipHtml(zip_buf, 35150, "700efa8b1cf4e1f3f9f559f9a27fb5c6d5acfcb7dca4e5cbff"); FeedZipHtml(zip_buf, 35175, "971cf9fef4e387d3ebcb5f8f3f9e9f9f1e5f9f15c6933cddd1"); FeedZipHtml(zip_buf, 35200, "7652a67f7f8aa09540697bead8cc64ffc27fcdc522c1457e87"); FeedZipHtml(zip_buf, 35225, "4f05b2e454055099ec87f172f60bfcf6e7b7d7dfda87fcf6e7"); FeedZipHtml(zip_buf, 35250, "1f0b7f7af7feddb78bb741e6585719c3b80c28e1a501d3281b"); FeedZipHtml(zip_buf, 35275, "b978c6618d5f1cdf5830db1061771c46a1a21908b37cc53bb0"); FeedZipHtml(zip_buf, 35300, "3c2b27b802d68ce3340d3b887558ee94acea61c6055c81050d"); FeedZipHtml(zip_buf, 35325, "4b584ffb3f285e796606b412f43909d32ebc500dd0a76ce44c"); FeedZipHtml(zip_buf, 35350, "e8b3f44bd5d95725ef002569b8c07fe2103c240e646930ecc3"); FeedZipHtml(zip_buf, 35375, "736e4660121f21b40171308b27a0ad735ddc288f43abb9cd05"); FeedZipHtml(zip_buf, 35400, "189c07e32f834a8b33994f948d646778ce1b9e356c6a6ccfc5"); FeedZipHtml(zip_buf, 35425, "8133989f8b3ff6365749d5863932672116519244de348b63d1"); FeedZipHtml(zip_buf, 35450, "32e7a17536b583b89f94bdedd1cca06d792451dfd87fb158f3"); FeedZipHtml(zip_buf, 35475, "7d858905afa8c224a83e3737b3183f59010ef7fbcf2c2bef3c"); FeedZipHtml(zip_buf, 35500, "983c974d505a9ddd4641c2fc055804699e9dcd248faf653641"); FeedZipHtml(zip_buf, 35525, "f975566c5d91557069c85a6a142cc1d279ad826e74749805bf"); FeedZipHtml(zip_buf, 35550, "0e8444f98a8d156f618ab2b850d7281b41f1bf578958cc3f3c"); FeedZipHtml(zip_buf, 35575, "3ab7b84d2a951479cf309b70facc100ae94a193fc8594b8c10"); FeedZipHtml(zip_buf, 35600, "261211356d2ff1c394fc87dd80f3a830502349b0da4605d838"); FeedZipHtml(zip_buf, 35625, "36ee749c0e64379e22d0ec31adaace42ab86a0dfc3e07b61f3"); FeedZipHtml(zip_buf, 35650, "34a2d3d3698ac51ab0b5d4547732506879fae9eabd7eb5138e"); FeedZipHtml(zip_buf, 35675, "720fc9c7e90ba891ec9490210417c1dff36c2c65599979e992"); FeedZipHtml(zip_buf, 35700, "2e87b1f53a04c42074adc2693d0a1447f8ef1b42a8e6ada1da"); FeedZipHtml(zip_buf, 35725, "de288c6e88e99ec413543c81517443e928f638960fc74ccbc7"); FeedZipHtml(zip_buf, 35750, "00937aa89a83be97ff7ebd64c866ce1651de9e47f0142ab870"); FeedZipHtml(zip_buf, 35775, "c6033e884866c628cc12c6ef8c3e67881429618bea65462dcf"); FeedZipHtml(zip_buf, 35800, "ec1e67804f786937a8ee52a81f4e4e7fa15b835f24e1c30d55"); FeedZipHtml(zip_buf, 35825, "8fd762bab965668ca93749312e833238602e0cf943bdb26d44"); FeedZipHtml(zip_buf, 35850, "3af00e71df74164cfb1e637db1fdb8bf9fddc7fb7fc6f1e860"); FeedZipHtml(zip_buf, 35875, "f9a8fb1b2c73cef5d36ad0578dac41e1b6875bbfa1a26c453c"); FeedZipHtml(zip_buf, 35900, "0ea845d2cd7dd80381bf1a9dc5d0db201cdc669b8696ccdbf0"); FeedZipHtml(zip_buf, 35925, "a45c7ecec1c74453bc55200a03ece55ffff600ffbf370e1f82"); FeedZipHtml(zip_buf, 35950, "21ccf182e7953f9795f2bc96b1ede77bcb42b2a35e0ff14626"); FeedZipHtml(zip_buf, 35975, "18b8f12b37a88e3baef1b261f858588008aacc7c724c2720b3"); FeedZipHtml(zip_buf, 36000, "92bafae500f67d905d503a3552a41bacd690fa270794689021"); FeedZipHtml(zip_buf, 36025, "82de4d39e5ae4fc04f74e06dc459e4a190bc73d447a6648c17"); FeedZipHtml(zip_buf, 36050, "0f7a92c59712e3459c0592b2cc15b9ea5d4a7233c56f6531d3"); FeedZipHtml(zip_buf, 36075, "6592c9463c62137a711699a9859404a4b9b57d5e8267219700"); FeedZipHtml(zip_buf, 36100, "a6f04c47a8f5865d1de37bc9c8e0536b318d1228d138668539"); FeedZipHtml(zip_buf, 36125, "40cf49414ca283267e3440ad80f762bc55b677b9b8f9b4d052"); FeedZipHtml(zip_buf, 36150, "4a234b332cbc8cef6b901046d4e320efac02030d344de2fb9b"); FeedZipHtml(zip_buf, 36175, "6832ea2cadb2ea42d11403f8c56e4b1e89760952a1f4a12e5f"); FeedZipHtml(zip_buf, 36200, "4fb34834d6b3bad0d8d8fae3d1388a4d04c6a9e121c7ee5b48"); FeedZipHtml(zip_buf, 36225, "ac0e94ad43bfb311dccbb570523bd14f8d687921fe27e53e0d"); FeedZipHtml(zip_buf, 36250, "e38e892a1a09d78029bc2bb228b4b8bb20ed664feaf71dd8ac"); FeedZipHtml(zip_buf, 36275, "320450e8efb34944b1bccf00a24a5737a6093958d8b0117cba"); FeedZipHtml(zip_buf, 36300, "78dff6fefbd329fcdfebb377ef70929f83ce274ff81ff15729"); FeedZipHtml(zip_buf, 36325, "e3108a16227f9159a83ed481325824410aeabeb204f042877c"); FeedZipHtml(zip_buf, 36350, "de5c1cc0b3713478460604c4fb4fe868cfb9ce9ffd3e0e8c21"); FeedZipHtml(zip_buf, 36375, "b8cbe2185003fb7a0c9ea138e661ff3ee88cf5283c61ce3b2d"); FeedZipHtml(zip_buf, 36400, "4f804581448da5513812609384c99014a069c9ca28f8e5197d"); FeedZipHtml(zip_buf, 36425, "faee99c7269abd03c38c635e71e99b0ecacbc1e0c0bb4fb0b5"); FeedZipHtml(zip_buf, 36450, "a532eee0ea7bd5c6139091eadc94c6b0bc8bd229a1e76294dc"); FeedZipHtml(zip_buf, 36475, "1c590d727ab869ed6f1042377f165935fd7d54fc7b9aa4e5a5"); FeedZipHtml(zip_buf, 36500, "0a962ad689ce8f39efa874c2e418720e9f557500132232814d"); FeedZipHtml(zip_buf, 36525, "b1d29f7fbc26f18f7f6cfe5ce3a90c117966479d1b23287ca5"); FeedZipHtml(zip_buf, 36550, "fcb38e5aa99a828255ca07e838999a314d5633e363ca47e1c1"); FeedZipHtml(zip_buf, 36575, "755c4c611cc78f14920519bd34a4fb437fe0b5d81384cf097b"); FeedZipHtml(zip_buf, 36600, "8a48d5c13f8d30f20c04c0a9f1e5257d516656f961af64b151"); FeedZipHtml(zip_buf, 36625, "e962a3d2c546658b8d8a8bd931f54bd1ba24b3a8d5bcf203cb"); FeedZipHtml(zip_buf, 36650, "3986d788656c8676663b94d6a2a1016c4590c559d40b1e4a2f"); FeedZipHtml(zip_buf, 36675, "c01cf434802f634be84852985825e83ff85f824f71e86aac6e"); FeedZipHtml(zip_buf, 36700, "7df65a5596d05a2b28f9785094f42411598eb3852ce5360557"); FeedZipHtml(zip_buf, 36725, "6f60d54659232e46d11d3d2cb50ac16cb7f95bcd75fe363f90"); FeedZipHtml(zip_buf, 36750, "ff5ce45d2f651f5b8d08de6f0b46850f35a8f061fe2b182d12"); FeedZipHtml(zip_buf, 36775, "1596b28fed46850f8be60a75b8f0db232ea18a1e178a28abdf"); FeedZipHtml(zip_buf, 36800, "e47663d16f0b40a3b39402a1df7f7aebc82652df5ab4b4cb6a"); FeedZipHtml(zip_buf, 36825, "b4c64017dfa3c22814ad918b2ec4786c8ccacae57feb104375"); FeedZipHtml(zip_buf, 36850, "a38b8dc72b0f464a9d10a63f1bc0c5f3045137c69895818174"); FeedZipHtml(zip_buf, 36875, "1b8292c270ea9b194d0a27c944479e630b678509c91aa6d1f6"); FeedZipHtml(zip_buf, 36900, "67c30e88f13754000693dec950845571001a93884a77960217"); FeedZipHtml(zip_buf, 36925, "61f12e89474e101b1f35a0dd7094502ebd86d503ba069012de"); FeedZipHtml(zip_buf, 36950, "65f7b160401ffb697644a16483b0eb886d363f97b38cb58337"); FeedZipHtml(zip_buf, 36975, "8c7a619f6270a82b5c17992587d08e2799cbe2650118d9071d"); FeedZipHtml(zip_buf, 37000, "41a38e654031b84cc9306d85b5cb7378ee752488e6bb4c3473"); FeedZipHtml(zip_buf, 37025, "1be1c1df79a33055011fd2faaa6ffc9b3c6dc1596eced2236a"); FeedZipHtml(zip_buf, 37050, "35e78eee290c69a95a56641f746bf25cb1a374c0fa9e177a4a"); FeedZipHtml(zip_buf, 37075, "10a2707aeb1cd220a66aee33ac7dd4ee83649f9e8e987e669c"); FeedZipHtml(zip_buf, 37100, "4d9727b51d5321561fe22c0459a042e58bdad549704ec22889"); FeedZipHtml(zip_buf, 37125, "48aa6a217c9316ab4507961b0881ff6320c5e3134dfe2b9f64"); FeedZipHtml(zip_buf, 37150, "82ab7ee824c73e807e1fc30c7bde1f13515eeeabce2a79170e"); FeedZipHtml(zip_buf, 37175, "01ae009a9fa9475491f472035a9ef7f0a24a80aef848733ebc"); FeedZipHtml(zip_buf, 37200, "acfa75f9c7bdb989b32c8f8bbbeaa4c2491b29fc603e176561"); FeedZipHtml(zip_buf, 37225, "36f5ee6fe334f03ebcbdf4fa20eea598f3051bbc17b0428e31"); FeedZipHtml(zip_buf, 37250, "516c165dac405f8342a392e0214b80d8bc316a2054d20e4038"); FeedZipHtml(zip_buf, 37275, "7d6126ab0354a62f15f02b2fea98db13384ccd85215fed65f1"); FeedZipHtml(zip_buf, 37300, "357515a4d67251c817931496aaba2a3de82bbfacd080d62aaf"); FeedZipHtml(zip_buf, 37325, "ebed241cf660837c23c59bb2bf3f994b52250d22ba83470036"); FeedZipHtml(zip_buf, 37350, "e79a57b207c5c2d0ad46a429634218dd74a67c657ccf545a5a"); FeedZipHtml(zip_buf, 37375, "5425559832f22390a428148366a7f01c8eb75029177d51d18b"); FeedZipHtml(zip_buf, 37400, "5b104d52297ae5aff9f1f2c4df5df2c4e5ffb94e829c34e1b5"); FeedZipHtml(zip_buf, 37425, "9408750ca7ee8040881ec9af5ac4b844305531c3dc80ada331"); FeedZipHtml(zip_buf, 37450, "0603e8505d79e5750c915127e7c16bc21c57cb1be962ca0443"); FeedZipHtml(zip_buf, 37475, "e3e393bb31ac5b10e052c497fa8a1c0106aa7fd21525eb8fb0"); FeedZipHtml(zip_buf, 37500, "e3b84f419d694c1640caa3c239ef51d1b232d88183a514bb80"); FeedZipHtml(zip_buf, 37525, "4d92a2f8de4b510f9b8a6c1ba1df837a3f0cfd743f921d25fa"); FeedZipHtml(zip_buf, 37550, "9c3b564646a517572e285a9f7797b789977712a65925e5e901"); FeedZipHtml(zip_buf, 37575, "7881f3b93468c6c4ef8593f44931c5f48f09861d76c3a43b19"); FeedZipHtml(zip_buf, 37600, "a5dd24ec70d96cfc3608b18d227e82a3b6900d7a5c2b950f41"); FeedZipHtml(zip_buf, 37625, "258118247bb95bf28cff599064f1301aa2e9b2a2ed89a8cdfe"); FeedZipHtml(zip_buf, 37650, "958b10bfbcbd6181b5480cea1392c168f8894bd54b23b069e8"); FeedZipHtml(zip_buf, 37675, "53a0349c830d7edd26369004d45d0f3fc4f130f0a325cfccb4"); FeedZipHtml(zip_buf, 37700, "c93d063e5f9ee1e77c03a8a5ad2a85f62b73f59a63cfc324aa"); FeedZipHtml(zip_buf, 37725, "9bbe002164c9049d70ba3563dcc1de9f68c664ea90ac03be9f"); FeedZipHtml(zip_buf, 37750, "c45db2331f5891d1dc9c511f581a5845e3552a7d835ce11726"); FeedZipHtml(zip_buf, 37775, "44b9808cb83620d512c9d7f8535c5bb66bf26afe47ef425da6"); FeedZipHtml(zip_buf, 37800, "da840e84959d648d83a84d085b2c16ff19e0839d197c4c3478"); FeedZipHtml(zip_buf, 37825, "cc6f8e66ff128ec732011f9b416a9beeec7b2fa08409c84267"); FeedZipHtml(zip_buf, 37850, "9ca647115546f90c886786ba28536544effafc8ca262528bdd"); FeedZipHtml(zip_buf, 37875, "12e24076c0a7996fef2cb48fcae47d301cee8bce10c6fc5cfb"); FeedZipHtml(zip_buf, 37900, "9b1afcdaa0b3adea2009989bc2de0de406c65e9ce68fa4a60a"); FeedZipHtml(zip_buf, 37925, "a4996213ceb2a71fc8f77d9009aa75f23afdb98504fe91f1d5"); FeedZipHtml(zip_buf, 37950, "26466a4b1d463dea6854d2927a79847b0a9a87dfcd38003c02"); FeedZipHtml(zip_buf, 37975, "adb8cb3e2683560d5ac62c55186d79d28dc60e71120e420cef"); FeedZipHtml(zip_buf, 38000, "35c18cfa8be8790abfc0862aa2e8991addbdf5710f41c24e40"); FeedZipHtml(zip_buf, 38025, "f8aef378cefaee5e238ce6bd80c3190d2641ed500064e3380d"); FeedZipHtml(zip_buf, 38050, "33a03a02247b3714b22bbc32f6594b5e1229a3b01b0ca7c2fb"); FeedZipHtml(zip_buf, 38075, "4ac401071c27f1384850bea43d691f8ec2be3e9c304ea89d84"); FeedZipHtml(zip_buf, 38100, "ec2d21dc4bfe24e5a40b109940caa9dd88095cd9f55b9c8733"); FeedZipHtml(zip_buf, 38125, "6542d230874090074e5e035b888281afa0c37b868f808707f0"); FeedZipHtml(zip_buf, 38150, "1ba4b4241007249e8439e24323b1a39658917ca48791bca85e"); FeedZipHtml(zip_buf, 38175, "0b67cdf7b061acaac8f2601a92c72da331f9fd7144f6c87ca7"); FeedZipHtml(zip_buf, 38200, "866416d93cc84966af4ab1d4ea560240ff7cfd6effefca778e"); FeedZipHtml(zip_buf, 38225, "02f2f5e92fd7082760ee219128f62bba238cc5b52cc2930c5c"); FeedZipHtml(zip_buf, 38250, "d11df0f1ee1088d16e3efcd5d1e08e046d12e4375f16c87452"); FeedZipHtml(zip_buf, 38275, "a13d84e5593725b63db79cfcaf4a59f7df3572f42cebd74acc"); FeedZipHtml(zip_buf, 38300, "736c65c912b5966a82fcd5ede4eb9d7cfd58f95a744d613621"); FeedZipHtml(zip_buf, 38325, "d16b11f2f1b14019b725407cac78b6574169475440c740ee1c"); FeedZipHtml(zip_buf, 38350, "7de5a1c50f631db69cb9406a74ab33d6a340204c17a6e02110"); FeedZipHtml(zip_buf, 38375, "864743f8006fc07e3c5e0fc3ff1c75ab2e4e7fde88ab9b44ab"); FeedZipHtml(zip_buf, 38400, "be3c6bc5cdbb3e11a7edbc3bf1adfee296da33f07a618169dc"); FeedZipHtml(zip_buf, 38425, "62e13fffd7df5fbe78f18ac77cbef8f1e2e3cf176ce42f28aa"); FeedZipHtml(zip_buf, 38450, "be117317ddc5a2dd532c02276bdaf829001f5b8fa803ca7ac0"); FeedZipHtml(zip_buf, 38475, "0ed48f03b52dda95c13b376a07f4c701bdb23f747ec40ed88f"); FeedZipHtml(zip_buf, 38500, "c470ecb6fc5380cae91596ba2e43f1dcb01dd81700f64b1fdb"); FeedZipHtml(zip_buf, 38525, "84d782dd18b603fb23c17e372883f4dd6007dcc701f7fdd851"); FeedZipHtml(zip_buf, 38550, "54417ed901f731c0350ccd57e19f6e6e911bb366809b694114"); FeedZipHtml(zip_buf, 38575, "69015bc2ea559d2906938a2a5836acf2ba943624adc9f67f2a"); FeedZipHtml(zip_buf, 38600, "4cd365e096dfeb41bd4cfb7e1ed24597966dcd412bbb36509b"); FeedZipHtml(zip_buf, 38625, "a61ca763cd5244977615da8b9adf94ec9f1c3c8c876137ccf4"); FeedZipHtml(zip_buf, 38650, "195211f323fd76d5976919cc5cb7a9066cd6751a46b9a0df57"); FeedZipHtml(zip_buf, 38675, "1e155940501af20c4fceea2e49d826f07a9441b1ee1ece5c06"); FeedZipHtml(zip_buf, 38700, "4cd77d1406b66ac276d6742b15c4a568477999703e8a254bc3"); FeedZipHtml(zip_buf, 38725, "c328bef047e4250b78ba73f138187de6705c5af8b83c5f4c3d"); FeedZipHtml(zip_buf, 38750, "1d5ac427c0c01ea2ba9b7f170e83b3d26005feba59b4c77b92"); FeedZipHtml(zip_buf, 38775, "35ef4b2ce1043e6dfe5efac544717e5fa1aa174bcb5fa96a91"); FeedZipHtml(zip_buf, 38800, "7104480992c6d9d547ddd70d3d102a7aa5daf7567967570dee"); FeedZipHtml(zip_buf, 38825, "acedf569883ba176a9f659f32eb94ebd846807dd07e3a1df55"); FeedZipHtml(zip_buf, 38850, "2df06c70920468b77c2a58636532aeece0c8f2ccebc91b13d4"); FeedZipHtml(zip_buf, 38875, "94b342e2268a8ca3499a7922d38c3c6bd2a22bd10a7e6def04"); FeedZipHtml(zip_buf, 38900, "7fff1884aabc5c6cdc5a7eb9eaebec97dbf6ce7ac8d8aec67e"); FeedZipHtml(zip_buf, 38925, "37f8e4ea4b638d103e50ebf3715a378131a238c1dad12ba4f6"); FeedZipHtml(zip_buf, 38950, "1f9c45bf42e442f6f138042bdc9c9906625f9a68871358bb4d"); FeedZipHtml(zip_buf, 38975, "020ab412fe44582fa2170e7e41db955cd22d69c212ff39cc5e"); FeedZipHtml(zip_buf, 39000, "f5ad2dfee7207bc58d70b0ee63379e0c7b0893008bf24fe8d1"); FeedZipHtml(zip_buf, 39025, "35e862efc06cba5ac022f33036022ded30c7521867f49cf534"); FeedZipHtml(zip_buf, 39050, "4ba27d8a0dc49213e5cfb1fcbe590fb2dcd5e63dc9859d2df1"); FeedZipHtml(zip_buf, 39075, "51aebcbbab4677d7f6c662d0a6f14efb692e80758d8f737e2f"); FeedZipHtml(zip_buf, 39100, "cb7e9e2bafd9f83ecf35ef1e69eb915e299a3578a66b516d13"); FeedZipHtml(zip_buf, 39125, "1eea716e93bba77a394ff57598953888e4c7cd7aa4694b9bf3"); FeedZipHtml(zip_buf, 39150, "32f376667b8e11f3aece4fbebb3af5c8ef566b9d3feaa41465"); FeedZipHtml(zip_buf, 39175, "5d764df2fb66dd94dcd5e65c96dad192ef4b174273df97fc5e"); FeedZipHtml(zip_buf, 39200, "7f5f8f2e7e38d38da9a211adb7d80a15b9d8dbf8616f732ed0"); FeedZipHtml(zip_buf, 39225, "dcd6d264e00fe730271752fcc57983e6804dba425f5fa01417"); FeedZipHtml(zip_buf, 39250, "3a6f724d1dbc5f7ee512ba2c3680a4020f6dcaf1c30af40e2f"); FeedZipHtml(zip_buf, 39275, "231cd5eb2ddb65a6ef3a3f00edc3a66893e6b654fc257ca52d"); FeedZipHtml(zip_buf, 39300, "3a7ec99d80f155ce922fe64b5c47d7e77e8aea4f1a9c72a559"); FeedZipHtml(zip_buf, 39325, "3775dba35a8803b244ff3ad8f0284e31e50267212290f72d3a"); FeedZipHtml(zip_buf, 39350, "d4cc46bf1c4f9d88a643de386014b1e66c024519ce560b486b"); FeedZipHtml(zip_buf, 39375, "e0c6c152c68e2f189cf9699bc4c4fef2c9cf6e4f1fc8c32deb"); FeedZipHtml(zip_buf, 39400, "4c9484c8e6865211cbc495dabd0b9aa8456486651d16eb519b"); FeedZipHtml(zip_buf, 39425, "85c2b8ad8562ae316375fa0456d77a379ca4b7ee040af5d909"); FeedZipHtml(zip_buf, 39450, "2f236969f100bb0c286b887472914588a42e9c915d2a0b0638"); FeedZipHtml(zip_buf, 39475, "1466d83d38a41a21d4a218d395b2a0f2d4e7b1df83b99c4716"); FeedZipHtml(zip_buf, 39500, "df5ae4f6180314f7e364fff3e5b9dbb0b13cab062602856f72"); FeedZipHtml(zip_buf, 39525, "9ba0a57335c6291792dfda215657f1703c6ac66dd59fd9263c"); FeedZipHtml(zip_buf, 39550, "9cd36b998ab57892811eadfc774352db13140cc209f6a0ef0a"); FeedZipHtml(zip_buf, 39575, "e5d8a78631dcb10ecd1b80d5bdc0484ae284e3be68b19b99b9"); FeedZipHtml(zip_buf, 39600, "49563e23cf4e1246ce26936bf18606194cc4e2fe42316f8038"); FeedZipHtml(zip_buf, 39625, "d408fb319a5bce55c0829dc3e5130c3b6f8cf93f22f9dc8769"); FeedZipHtml(zip_buf, 39650, "c04cc79dce4123d16203e89e6297c92c38249bc3d5ffa3cac9"); FeedZipHtml(zip_buf, 39675, "d26d2ebbeee893a45e87cadb619bbf08879f5d9fde7c38fae5"); FeedZipHtml(zip_buf, 39700, "e6fcf4e2fdf53fbd1675211e4eb1b5d5fbb782ea9dc961d6ea"); FeedZipHtml(zip_buf, 39725, "7451b88343ce0e310bc678f15880bf17c709e1c80865ad718c"); FeedZipHtml(zip_buf, 39750, "1780749206dd4962d630624499a49c8242b9bf807cbd304538"); FeedZipHtml(zip_buf, 39775, "13f844c61b22607986cba98ede91997119f587bf0b9338a24b"); FeedZipHtml(zip_buf, 39800, "b9f393902e0f2ee3ead3d1f5d91141e4eaf4f8f3e5d9f5af3f"); FeedZipHtml(zip_buf, 39825, "60f1bf079d38e877d27838c930164625d902aec5492fa04ef4"); FeedZipHtml(zip_buf, 39850, "66b04c1031569808635c9f805e1a0487646fc272d59fa3d4ef"); FeedZipHtml(zip_buf, 39875, "eb16c8f9123f05c671852d6ecb3887fcd84269b9ca998a04ea"); FeedZipHtml(zip_buf, 39900, "6627e6436fe69e3e62e6b2acf4558816ccc3d49e391159c505"); FeedZipHtml(zip_buf, 39925, "8aed53196b46c1d0e27935cc4eb239516babc5bc284414000c"); FeedZipHtml(zip_buf, 39950, "b907fc0ebe132d2d902b99b9920e7ea85250e917bdefe23be0"); FeedZipHtml(zip_buf, 39975, "0a3007900c170393220c73cae22c16eb69cd5a8f62ef2b4e86"); FeedZipHtml(zip_buf, 40000, "df8a8214dfcc2d26abae6a2c2963d2eb246147c13e8f908ab9"); FeedZipHtml(zip_buf, 40025, "21f0ee5e814d7c059ad6770b4aeabb61eb9f8ae26e57976727"); FeedZipHtml(zip_buf, 40050, "b2d70ca98eeb2cf2a6cffa7d7d41b62b38d859fa3e8807893f"); FeedZipHtml(zip_buf, 40075, "be7575eac88f68f169677b94ac3dfd6c76e6a1684d9c902c91"); FeedZipHtml(zip_buf, 40100, "2183d66cd1a306e8f787fbb8183b26c27ea571c56c190d83b9"); FeedZipHtml(zip_buf, 40125, "5a6a8b1806d64101f597bc422288f3b9fd593435b07c60d5aa"); FeedZipHtml(zip_buf, 40150, "9cd13343f17ce40ef6e6279132b696092a0ceb4f49fc3b49f8"); FeedZipHtml(zip_buf, 40175, "6597a1066cc65d58fb7d4a57f14f3f7d370cc7e3a077f41038"); FeedZipHtml(zip_buf, 40200, "f2dd8b63d6762182bb720b5eda8e87fb41e5ad1f0e265cb7e7"); FeedZipHtml(zip_buf, 40225, "d09380fdb5fd0bb3e828cd50fb139749a60dd26b70d02fed5f"); FeedZipHtml(zip_buf, 40250, "71d013b94c4c211883c618bbb2df73032aaf51daf8b484217e"); FeedZipHtml(zip_buf, 40275, "7d3a04c8a78d7ffe0814c8ec5e4038c61fa35c078f73c66fb3"); FeedZipHtml(zip_buf, 40300, "71547ac3d605f34f49380a3e04f08fd077d8545da336007cb4"); FeedZipHtml(zip_buf, 40325, "1fcfdcf65a8178e267935129f0e8eb06004ded72adb0fa0c1b"); FeedZipHtml(zip_buf, 40350, "2e05157edc0048c93dae9932e9d976ba3a0a43360068f67ed7"); FeedZipHtml(zip_buf, 40375, "0abaa38730bd79717341c5c14b60678cd900e0c9adb2daca8d"); FeedZipHtml(zip_buf, 40400, "04fa6192321afab0d735c3f2631206a28b591d488da11b00d9"); FeedZipHtml(zip_buf, 40425, "dcc63714c02f1b20ebcb4d46d6340051b6b729c06c8cad2fb7"); FeedZipHtml(zip_buf, 40450, "075bd709e1c7da67b2780c6306d30a1bcdb518b2afc389d65a"); FeedZipHtml(zip_buf, 40475, "8a1f63ab5e7cfff22fffd8ff7e9925f967b2060967bb04d5a9"); FeedZipHtml(zip_buf, 40500, "ec0d5dc4f1b2912d0faf4236e9cc8743b871bcb6eb55c3e138"); FeedZipHtml(zip_buf, 40525, "b80fc32fafaf3f7efa584347250e7ddd0e3bc12ed9c2360e08"); FeedZipHtml(zip_buf, 40550, "8c2745d4690be5561104207a141bbf83b1dd49221ac60aaf7e"); FeedZipHtml(zip_buf, 40575, "395be122ff38f9355a3f1d4686fc8856ad39612df0140e9b4e"); FeedZipHtml(zip_buf, 40600, "8c7eacce1b4190219f48868a4741761f275ff86f4084fe7e46"); FeedZipHtml(zip_buf, 40625, "6732acf5e6e5c0215f10fa005885319e6d0b21da16f8efd22a"); FeedZipHtml(zip_buf, 40650, "df0aa3ee70420e1d19b01f00176323362d52514fe20c182842"); FeedZipHtml(zip_buf, 40675, "18eed7c1ceaf6f8cefd5083eff9dfcb2e04bb92eb815382542"); FeedZipHtml(zip_buf, 40700, "1af8cd8eb20801831b0104d0a530bdf7a7f0367c9baa0639b2"); FeedZipHtml(zip_buf, 40725, "d7acf0ded005b9dbe468a445eee01940db632ffe63ef9ba0bd"); FeedZipHtml(zip_buf, 40750, "ff42bba66a9ea48a50247baf550488df9bdfbf3c227a561acd"); FeedZipHtml(zip_buf, 40775, "d1f6d0cdd0c078b8a099e1cfb77e7af3672e20680d2bb66192"); FeedZipHtml(zip_buf, 40800, "6190f851976671f72fda60aee7c37f9ebcfd7025c27053afc5"); FeedZipHtml(zip_buf, 40825, "2c07ce257c53e4cc0f29e425a2c5bf047b6e97588a2103e81a"); FeedZipHtml(zip_buf, 40850, "0dc6586e3d502fcf016fc3ea360e0091e047881c8aa8ab5e78"); FeedZipHtml(zip_buf, 40875, "17f6d08a3b89c23f260109496ce3355eb243da763ae9c0d261"); FeedZipHtml(zip_buf, 40900, "c48d1b69d74c50e8e90d3376d38e29e9e720d7bd1c16c74bd6"); FeedZipHtml(zip_buf, 40925, "0bcb8e4f9701754c87cbbc9aa6593032c5306b0b54967e9fcd"); FeedZipHtml(zip_buf, 40950, "c8da49b9e75888d08657820757f8cf0d9b736e5e3a818ce981"); FeedZipHtml(zip_buf, 40975, "61df9f78fb18b84d43bbb13c714a1b5086e99a3d108ee2b1f4"); FeedZipHtml(zip_buf, 41000, "89551f6e8dbfece606b17b18728c96b5b3035af1f9c1f3dc7a"); FeedZipHtml(zip_buf, 41025, "ca9d6dcca45cd98e6ef0b57cb3ede29a6d836bda4c323d447e"); FeedZipHtml(zip_buf, 41050, "aea518c553590ababfc5500bacf6cc097979b7bcdeb488022b"); FeedZipHtml(zip_buf, 41075, "63b627a08c94b35af3ebb21eda05b3012ce63a0c84877b14df"); FeedZipHtml(zip_buf, 41100, "910b46e33753fbd0a30c8a50c7d0efe99e0bc8380e05da6030"); FeedZipHtml(zip_buf, 41125, "ed1780f75d904c31da02ee629262b85e24923200f9a7f18412"); FeedZipHtml(zip_buf, 41150, "ec0cdf7a8a1210d0f7fd2de08cfcde8b49f2dca097f6a8d73b"); FeedZipHtml(zip_buf, 41175, "4be38bb8e732445cdfe8cfa58f4adfef06fbc577a5cded31f3"); FeedZipHtml(zip_buf, 41200, "c9229b2795d11df8bd9e48770de10689f1e2a129de461c5006"); FeedZipHtml(zip_buf, 41225, "5c99b19eb2bfcec8cfbab78439a05a0bc7dd3bf899c42da450"); FeedZipHtml(zip_buf, 41250, "0a2a0a2302db2bce5191a46ba9f49e5a8f586860488b5c379e"); FeedZipHtml(zip_buf, 41275, "6e3cf3bfc0ec885318b6cbc199d3827501f750826ec2517c76"); FeedZipHtml(zip_buf, 41300, "c2a59364096d4cf015873710f1552527d288598e671f800cab"); FeedZipHtml(zip_buf, 41325, "10cdf85e8a69117c9c1dd3e65470978266c88c10941692894e"); FeedZipHtml(zip_buf, 41350, "10e21418871b51d7e5928bf34997834381b696725fe6ce9b85"); FeedZipHtml(zip_buf, 41375, "ded56530aaba2afd79d69bdac01be107a270276b833d33dcd3"); FeedZipHtml(zip_buf, 41400, "dea08a1fe3e772211f1b8c94924a10f54abf61c85f4ac1aedb"); FeedZipHtml(zip_buf, 41425, "cbb51134c87523744ba16c7b1fdb375b66d8a8e68734ed22ef"); FeedZipHtml(zip_buf, 41450, "f9f8d68f06014e8b7076deb53da4f4be031830e7756e122176"); FeedZipHtml(zip_buf, 41475, "e9b404f58191f0097026d86354683c01e99ba3130de3b1472d"); FeedZipHtml(zip_buf, 41500, "eed1b47c1b8ecb6e77554cb39470f5e7592f7203efcac134f1"); FeedZipHtml(zip_buf, 41525, "646b83fd45708feba757a0e0b9020dae6fac11b393d23689b2"); FeedZipHtml(zip_buf, 41550, "291e51d10dc89964106141935825ce3e0a7a2420d25be75d9b"); FeedZipHtml(zip_buf, 41575, "f1f482dcf8127a012a521ca4ae350d2c3724ecf0c05e715202"); FeedZipHtml(zip_buf, 41600, "eea6489a3ddc4d392e980376a8d0181546718ff3bf487f56b7"); FeedZipHtml(zip_buf, 41625, "aebecb1bdd0c2c1004ffcfc01f563104fc5e89032fdc52147c"); FeedZipHtml(zip_buf, 41650, "7959ceab370c0d6ee19044a944a56ce102b296ee6882bd2932"); FeedZipHtml(zip_buf, 41675, "dd06a303ef2d7a8db23c36a44d390323808126b9f49d94cc9f"); FeedZipHtml(zip_buf, 41700, "daf32d3182e233e42fe23bd06c6742287e9996c7554af1c9f8"); FeedZipHtml(zip_buf, 41725, "bec327173e5dbb2fd7cd5e084328f641e2d9462001685fb879"); FeedZipHtml(zip_buf, 41750, "e01d685871459f9386668ed9a969a69ae6d2ce5829e3266e98"); FeedZipHtml(zip_buf, 41775, "772f87d1e385965b32a4599c88fee262442ed184ae6133943e"); FeedZipHtml(zip_buf, 41800, "811bc02bde519db572f4114376d8b36cec714835d6f7474935"); FeedZipHtml(zip_buf, 41825, "0b4720d0220de652a6681a43e65436370c05b4be496aa66cf8"); FeedZipHtml(zip_buf, 41850, "28f93c5fb8f0cdf6082d88e88bd7ee165f4caea15160ae1b27"); FeedZipHtml(zip_buf, 41875, "dc59c28d57b10c7bc8d77de3d8d893ef242a972cc8ba3e8f60"); FeedZipHtml(zip_buf, 41900, "914e4080251176e1f78ced1c60cef2227b70d1b931b37ae4ea"); FeedZipHtml(zip_buf, 41925, "4ab7adedaa15c0c99d66d57bf3ab48910c4b9fe2e174201b80"); FeedZipHtml(zip_buf, 41950, "2cfe4248c4adba0d1a30e7559cbce560bb4db98ac998fbe278"); FeedZipHtml(zip_buf, 41975, "b0318a6c34fd97cc4c7b0106c70c4390e3f17a86522d046a0a"); FeedZipHtml(zip_buf, 42000, "47a1d201b8c337dd9df06e0ac382d2f7e84a44623c752b9fe0"); FeedZipHtml(zip_buf, 42025, "d6bbc3b8fb050bc8b43de9a6e7f9b3c4bf0b12511d874b3a50"); FeedZipHtml(zip_buf, 42050, "8906e0e461c2292822ad91bc69af276f020c9cc64ac231fe8b"); FeedZipHtml(zip_buf, 42075, "0426fcf79ee60b7ef245327d0a84e4e0092f05505645c41981"); FeedZipHtml(zip_buf, 42100, "a68b44385914ae2ae83137a63a1e63d3b04b066639b1cb375b"); FeedZipHtml(zip_buf, 42125, "96c3838c414218b8a891499cf95086b1c7930c4b2fd211c92f"); FeedZipHtml(zip_buf, 42150, "4ff5aa106bacd8df7b3f15b7c057893f55ae032c8790a69391"); FeedZipHtml(zip_buf, 42175, "aa48cda546682b6d7e27a89a91ef25f17d412644fb19d743e6"); FeedZipHtml(zip_buf, 42200, "4de07e03bf7b0bc4907188805e882332c26c6ac4f08b470d04"); FeedZipHtml(zip_buf, 42225, "d80c439f70b73c91152d9b628c8a125b92981289f198a2ba8a"); FeedZipHtml(zip_buf, 42250, "370d326e49bf6284d5418765e86a8d28e591caddf3da6c50b5"); FeedZipHtml(zip_buf, 42275, "09183b8ec79321e32c2286bece0e45dec6b2163afc70287810"); FeedZipHtml(zip_buf, 42300, "32c5a41302bb820389972c0c52ab06977de56a52aa749ebb7a"); FeedZipHtml(zip_buf, 42325, "55011deb682382bfe2706ecae1c08fbd701444292556c0d25c"); FeedZipHtml(zip_buf, 42350, "8d542fcbbfe5e814d74fccee5b721f2bc622784651877b3bfd"); FeedZipHtml(zip_buf, 42375, "c4c1318eac06e37b29123536cb9b61b38f9a7b6b0364b1ec10"); FeedZipHtml(zip_buf, 42400, "a01272bc7e2844620e5bf2d9648695ef4837ca3c02cc810218"); FeedZipHtml(zip_buf, 42425, "46ba62e4e575594d2505129987118f42aa72c4cf3df15a47bd"); FeedZipHtml(zip_buf, 42450, "27aef2a3b0916ade2a5f0533d864006c4ee328c65f52e865b9"); FeedZipHtml(zip_buf, 42475, "f8ae43b1166e08c4ca0220965421adf17de1483bffdc4f1169"); FeedZipHtml(zip_buf, 42500, "857b8b9c59a9b6390bb1e16960f0c22d49427ba9c260e3fbc2"); FeedZipHtml(zip_buf, 42525, "3178feb99f2206b339e14923f0c20d2642aaa4ae3e6e14ce8f"); FeedZipHtml(zip_buf, 42550, "980f890ba565f0121e39f50c38bc41e9990602b34d9eac2f02"); FeedZipHtml(zip_buf, 42575, "f45e0b951faa264b05fa27c32c541ff738aab5980528910901"); FeedZipHtml(zip_buf, 42600, "45e526a76cb8e72ae1721407976c1f05a062301af986a1d2b4"); FeedZipHtml(zip_buf, 42625, "9b9c9d90c86eef81dc19cba213ecf0208b9956108b1e568ad6"); FeedZipHtml(zip_buf, 42650, "b339914a28e771eb3c1d1a3a57872c23247bc422a8e93bf68a"); FeedZipHtml(zip_buf, 42675, "3e519a2aee838d884ba7ab8bd8eda5a918bc2a1a9b7fb5ada3"); FeedZipHtml(zip_buf, 42700, "b49f30532b0d4721209dcc49b44162901b2301f77511395e49"); FeedZipHtml(zip_buf, 42725, "988558fbbd17f645d224134aa17a3a4c134703eccb0368340a"); FeedZipHtml(zip_buf, 42750, "ff14fd6146fe43389a8c80f882a0d7d61152bfa33146d8d899"); FeedZipHtml(zip_buf, 42775, "d1e32746cdf12401a2c5c431387c9c481f9361383a8ea334f8"); FeedZipHtml(zip_buf, 42800, "63c2450ca4495018d087817f17b8e809ade59c141e465d9800"); FeedZipHtml(zip_buf, 42825, "6805099aaafa732212a5b0f97daa9ffc107427449906c4847f"); FeedZipHtml(zip_buf, 42850, "050ed7dae3ba01c39c2f9576a72a1803d161b6acf6b6e57744"); FeedZipHtml(zip_buf, 42875, "bfea87dcfe1d4623e340aab637b7634d8f674df8ff5e45feb8"); FeedZipHtml(zip_buf, 42900, "9c1fc911a56c810d8a458e1002be50f99a7a17a38b33cdbdae"); FeedZipHtml(zip_buf, 42925, "baeb9b147e5eca8eac91e434c6f2992583673acd4689100403"); FeedZipHtml(zip_buf, 42950, "f67a019bc2baececb7466a07f8d12174fb332c588d9560f7d8"); FeedZipHtml(zip_buf, 42975, "5b9072c122cd29ac0e0fafed2c76264723d39d12b029dd50e6"); FeedZipHtml(zip_buf, 43000, "9852497506a42c358d1a6dd453ce15515e80d3ad69cc0f5611"); FeedZipHtml(zip_buf, 43025, "52aa7021bcf34c9d3f58354c5f89a5a99c3a92ab33e73cb0ad"); FeedZipHtml(zip_buf, 43050, "e053edb6a1cd71616b6057a2d9c6040e3d4497d10873fc11a2"); FeedZipHtml(zip_buf, 43075, "29a5eaf6b12b9b9971fe4d33264488b90a4e34dbae0411e437"); FeedZipHtml(zip_buf, 43100, "86c2a686a2eacda993f5b19d920ebdc08628b77e1a5899f855"); FeedZipHtml(zip_buf, 43125, "1c118181fe2aedd35f029fbbe245e03fafd9df59c6ee72034b"); FeedZipHtml(zip_buf, 43150, "b94fafb33f56fd798dbf93776edff10320d2c928727d612f25"); FeedZipHtml(zip_buf, 43175, "3b62ed4f8a2956739f3a216f33cfd4904f2f924d6facb54ffa"); FeedZipHtml(zip_buf, 43200, "bdb1cf837228924c6602928e028c972886dc8a33336992330c"); FeedZipHtml(zip_buf, 43225, "e79fba0d4e308e346364f77b61328523381b15a6d0d8c10b44"); FeedZipHtml(zip_buf, 43250, "14ca62a046f9e3909fcf13fd8e0c3e231a95441cbbd9f54523"); FeedZipHtml(zip_buf, 43275, "8bfc360b7da3a583ca68dd09b33efb707476f18c381c9676e8"); FeedZipHtml(zip_buf, 43300, "e4f894dc546ef33065dc7c6bba6a4b2008c40c6230602fd999"); FeedZipHtml(zip_buf, 43325, "3fc9e2914ffa0489bbf8f52ee8c9a70c9bb4c0ce7b9d6707cf"); FeedZipHtml(zip_buf, 43350, "08d662ffcefe8e8a89f2ca6d51d3cf2861419170a881e05b66"); FeedZipHtml(zip_buf, 43375, "eca682d31640e4b801e9813684fc010aeb52cc37bcccb2d818"); FeedZipHtml(zip_buf, 43400, "7a9bcd3263dae9cc07341ccf4d5e38ab030535aa1a53abb29c"); FeedZipHtml(zip_buf, 43425, "bb9bdc41009f21bcb587967db25db44ab68bc6977689c9a52d"); FeedZipHtml(zip_buf, 43450, "b762c59b9973da7f943775ac02034c5898417e85935a1d6ab4"); FeedZipHtml(zip_buf, 43475, "38d52e1132c494ee875e07acc04440894833b26485a01bcac3"); FeedZipHtml(zip_buf, 43500, "c1aa627e0f2408557bac20a8efe5375bf1ecbf9665e897f2d8"); FeedZipHtml(zip_buf, 43525, "4f3a544a29a01baa78ebad71ad528d020d1f37a0b1df90a93e"); FeedZipHtml(zip_buf, 43550, "2d795c0a3851f61a2f665563c0308806dc87aacaf0e2dadf46"); FeedZipHtml(zip_buf, 43575, "3d822215713e7b27c5595961368c7440eee92db6474e3c6de8"); FeedZipHtml(zip_buf, 43600, "4a4510170ad8f954716565e84edd8f16f68b540418bec95d13"); FeedZipHtml(zip_buf, 43625, "415cf78af231b050378a9ac84651a8df6007de1fbc97c25e4b"); FeedZipHtml(zip_buf, 43650, "3d7c8743810efa78fa9d60f8d041b1b390d8923c1d59e7bc5b"); FeedZipHtml(zip_buf, 43675, "9f628fa5ae424df058341735cba2c9a803a3012cbcdf027329"); FeedZipHtml(zip_buf, 43700, "3b1e2359b3e3a1728e45cc3265cf405e2f1a821935d2447c1e"); FeedZipHtml(zip_buf, 43725, "ae913b654066b60c5e04b1b50c6b2485f8c474814a5278df23"); FeedZipHtml(zip_buf, 43750, "d5e58f74cce130be277b0aa82d85430521698c85eb322516d7"); FeedZipHtml(zip_buf, 43775, "49f1d1173a996f85378963d29bc32a2cd9c4266fc83447a070"); FeedZipHtml(zip_buf, 43800, "41969fbe59774165a3a8df12c6db28968cd06190eaac483a3e"); FeedZipHtml(zip_buf, 43825, "7539a35859a5578ec7c3e28b49863fa94d93fc5283805c50b2"); FeedZipHtml(zip_buf, 43850, "1b8f4333b251dca2417af201f1492f9ce2011aab836e025fae"); FeedZipHtml(zip_buf, 43875, "76483dcd6b554373d4f275a886badd6a37d5f42ddcb25db7b5"); FeedZipHtml(zip_buf, 43900, "1e34e3a3faf40ffa148269381037affb2e59e5152249851356"); FeedZipHtml(zip_buf, 43925, "d534df69c73bed78a71d2f483b765abad33251bd42ec72a9c6"); FeedZipHtml(zip_buf, 43950, "cd54e29c8ac74e51b145d52e15ddc078d98736d5d0458d023f"); FeedZipHtml(zip_buf, 43975, "2a0894664959d59fb4dcb41f9a5ecf7045be8675a9fce63b5b"); FeedZipHtml(zip_buf, 44000, "1761511cbb91d2dcaab6b60c996e63f6be1ac96e9b8fbb8df2"); FeedZipHtml(zip_buf, 44025, "5d45f44e5e95db05ef6c68f0ce9a1f89d3878a70f0dcc05510"); FeedZipHtml(zip_buf, 44050, "760f70a713462e8fa9a66939e82e0cee1ffbbc6cc5b996f136"); FeedZipHtml(zip_buf, 44075, "3d8d83cf6cfedf81e869bd81db69e3c01bfd99e2b2e0affacd"); FeedZipHtml(zip_buf, 44100, "60f3846c7724add73dcfd65a89f547e81ac0762b63eee5813d"); FeedZipHtml(zip_buf, 44125, "7f3191fac7609ad36384791a9f07fc671f34186cb8a0acd9fe"); FeedZipHtml(zip_buf, 44150, "9d69c5462098f84880507b968fdd30f6696e111cc693e193e8"); FeedZipHtml(zip_buf, 44175, "633102d91b22c24ab6723d8e1ed39675f1776de1c0a711eb0b"); FeedZipHtml(zip_buf, 44200, "c832183b33d0ce0cb43c33900b2d8c9e24ca51081822261769"); FeedZipHtml(zip_buf, 44225, "5c9ace9c6697afc7c0e4e21408c53c5e8bb22346802b3789fa"); FeedZipHtml(zip_buf, 44250, "f4239b58d222bf52bc41322dd15f86783b603b53114f9cdec6"); FeedZipHtml(zip_buf, 44275, "93618fb0dbe2be62a766d1559b786451108132b9de2155c7c5"); FeedZipHtml(zip_buf, 44300, "37b8ecb4b28bd44ff84e5b9da3b0e70d56eaa26d8b23d06bbe"); FeedZipHtml(zip_buf, 44325, "b413a8421ac04bdf5cc41999cf0e99a6ca78bd62f1aef3aa6d"); FeedZipHtml(zip_buf, 44350, "b03a26d78f0d6be0c9db7c25249bce7676caedb1533e972a28"); FeedZipHtml(zip_buf, 44375, "9574117aa8471604f8aae31d3a2400a13ce8163db23883a392"); FeedZipHtml(zip_buf, 44400, "348364929344525851d81f142a6be4e337953147e1f351a526"); FeedZipHtml(zip_buf, 44425, "3c24eff83dda2c9af4752ab76435568ed5f0cd5717e636eb6d"); FeedZipHtml(zip_buf, 44450, "c5e99667c47d1ac75faabafc75026a1b95e6868663c1ff76b6"); FeedZipHtml(zip_buf, 44475, "e36db31d7f5d0fb7067ff96b6d5c51492548277babfd591bb1"); FeedZipHtml(zip_buf, 44500, "9962c93b937048b2a9d58c78038c63b24030fca7324b31728a"); FeedZipHtml(zip_buf, 44525, "6e7a0aed2888529c845b910ff16f234ab6e926a890bbdaf88a"); FeedZipHtml(zip_buf, 44550, "e28c6a1aa9c4504ca82808382d60afc8c6d4754b552aa16c42"); FeedZipHtml(zip_buf, 44575, "9b6279d14074a10dc23c8ed219f66ccd87502a1c89462d6c21"); FeedZipHtml(zip_buf, 44600, "419ae0cddedf8ad65899ff85ce071ab84f3fccf7cbcd1f491c"); FeedZipHtml(zip_buf, 44625, "050d8825e720435efe2043bffb4548e1eeed7b2d78287ca06f"); FeedZipHtml(zip_buf, 44650, "1f4b50f426d4a312fe74879d533dd4f2d292b4fc7c1505a1f8"); FeedZipHtml(zip_buf, 44675, "d7c60220cff98edb9cd70abe2ee006dc55ec8e81cb48afd91d"); FeedZipHtml(zip_buf, 44700, "61944415374c9daa8f454452b576e4acb65049960c6eafc867"); FeedZipHtml(zip_buf, 44725, "bd09de4f2fe425d416cd4868dd8518d63d8637c1274a3ee49a"); FeedZipHtml(zip_buf, 44750, "a4fd7ed80d31e8fd3b7a993cbc1d2cff689b758475088be6a7"); FeedZipHtml(zip_buf, 44775, "930eb651269ddf1f494ee9df01ab24c9e4f2e8c321239ab651"); FeedZipHtml(zip_buf, 44800, "4bab293fa6b497dbc9c04037b41c79e3a19fc19eacfed3e2f9"); FeedZipHtml(zip_buf, 44825, "a5f0667c3fd482b00cc300e6ee103221b39618850932513a11"); FeedZipHtml(zip_buf, 44850, "87c3ee62a398ad3a5e90247152d6f42157c9d27c4d16e78ebc"); FeedZipHtml(zip_buf, 44875, "24fe743582fb2ae9155236b294278f40e6eb86497702f24d98"); FeedZipHtml(zip_buf, 44900, "4d1f2be42e7c5d1e097cc2df1a91d17c4a94815f971b168c5f"); FeedZipHtml(zip_buf, 44925, "9223b5308aa49c846613e63ddeb1019d30ea050f5e8a609529"); FeedZipHtml(zip_buf, 44950, "0c70e21c0c091830871ff504fbf2086eae9fe1071c6f57c430"); FeedZipHtml(zip_buf, 44975, "6c4d2cc12251a1e80a8a48149a1d958a9b1bc34b9e62fd7cb8"); FeedZipHtml(zip_buf, 45000, "69dfbb0579074066eceed91be33728fcf96f5ca6e6e2c409b6"); FeedZipHtml(zip_buf, 45025, "70c472ded97d107047eb83e7a685eb39ffb30d0f0b324209ca"); FeedZipHtml(zip_buf, 45050, "02743a6f380185ad40c097e06470ca0199e63478e4ece2811c"); FeedZipHtml(zip_buf, 45075, "0f8113a090dc0b536253b04bb167049bfd52756f83ee17a709"); FeedZipHtml(zip_buf, 45100, "1d2696ec9cf76e64e4e90be13c7ae4dc9866c4ee36d3a4e51b"); FeedZipHtml(zip_buf, 45125, "e715e7c86ee1f92b6c531ab4aab747f7de2cfe6e990ced046e"); FeedZipHtml(zip_buf, 45150, "18775c5216bf62f096f48e6fca117ae26c959d0f577d2ba45b"); FeedZipHtml(zip_buf, 45175, "36bd151afc546fa5aad3eff26fa5b2f9a063d013bb85097668"); FeedZipHtml(zip_buf, 45200, "c256af20d4898be81802c8515418818231b66e11cd9d583d92"); FeedZipHtml(zip_buf, 45225, "8966bad31ca83a4374b2a2ab87ff92defa496064cdc94630af"); FeedZipHtml(zip_buf, 45250, "bc30fb16e6ecb0ce41098670cdb7b2c475979c531428d067a1"); FeedZipHtml(zip_buf, 45275, "9f1bcb0cb8bd4b274cd09b844f500aff1eb212a44ea09a110f"); FeedZipHtml(zip_buf, 45300, "0192385e24dba133c6d0b0c896844eab7d33efd486850b5cb9"); FeedZipHtml(zip_buf, 45325, "080e479c4447b7c2e152f4f24941e54a3caab9269764c35917"); FeedZipHtml(zip_buf, 45350, "4154764f740cda11c48e20964110268aad95206a3a563b8755"); FeedZipHtml(zip_buf, 45375, "d66e7cbc7768216b3dca15b37e5a2e162c1852412221eeaa98"); FeedZipHtml(zip_buf, 45400, "b85cc70f99a6cf24d8acfc80dd1044b9f755335c409642a880"); FeedZipHtml(zip_buf, 45425, "8e61b1a07ccb0e0d1d662022388803340f0eb0e85018fda29e"); FeedZipHtml(zip_buf, 45450, "a04089eba079f586cd9e1d81499bf0f0d49059a38ee08ba1b2"); FeedZipHtml(zip_buf, 45475, "452cb523b21d91d988b4561a3b1e82a4524e5cf4b914d5a3e0"); FeedZipHtml(zip_buf, 45500, "7e7f7b64bd2e9e8501970b8596c1d2546fe315610635798af3"); FeedZipHtml(zip_buf, 45525, "5d9e4040c340e738e339bcda40b87524d3881e335741d02bbf"); FeedZipHtml(zip_buf, 45550, "5863d09c4d47dfcf5f597599ad287deeb9a143892751f8c784"); FeedZipHtml(zip_buf, 45575, "5cf42c874ed9cfc65d5984a78c2324a9b056ae8d078edaab6e"); FeedZipHtml(zip_buf, 45600, "61299b282ce92e5103a8bd4b39e869b5156d7897dc9fa4f62a"); FeedZipHtml(zip_buf, 45625, "71d41aaf122bb1d10ad771f575e606b62afa90b8439a4274ff"); FeedZipHtml(zip_buf, 45650, "99b13f9b7cd5aadb81ba09ece16cdd068b4578edb222ad0806"); FeedZipHtml(zip_buf, 45675, "89023f4945940a29c246ba046bf21497cfe0c0a95eb1d99f95"); FeedZipHtml(zip_buf, 45700, "67f52bd1aecf742d6abd1437857c5c3efdd5f122b257e42cc1"); FeedZipHtml(zip_buf, 45725, "2278df286434c10b3daec5c5b9be36acc8159faa450de2f208"); FeedZipHtml(zip_buf, 45750, "4184d9ecf841bf5a337e9c8420a676c2c104048aab6080bfaa"); FeedZipHtml(zip_buf, 45775, "f1e094fd625996b945a3c0699452301719ba74380ec52014d2"); FeedZipHtml(zip_buf, 45800, "d718c8b7184a8782d9906b5e53f1b92408303a016432d92e25"); FeedZipHtml(zip_buf, 45825, "9fc2a527e7f0181928c49e58913080d3c89423399dbada61d0"); FeedZipHtml(zip_buf, 45850, "cf30932c0694c1f807776135e762a26a5b27e0572cbb8ff785"); FeedZipHtml(zip_buf, 45875, "ce98f2a5e944b45b74ceb24e417a503cf445f4052074d2e3bf"); FeedZipHtml(zip_buf, 45900, "8a1823da63f0509307146249c26444e06a613656f46d66868e"); FeedZipHtml(zip_buf, 45925, "607c211a04d35cd891b20dee91f41be4af0a151c209a549349"); FeedZipHtml(zip_buf, 45950, "17b6e387119d94534a0837e38955e25007c1141a9171cc9fae"); FeedZipHtml(zip_buf, 45975, "8f28a1b1bce60b9f29dc539dc34d65c6a0e684e5322bd44f84"); FeedZipHtml(zip_buf, 46000, "651b41a3409cf087fb237cb46a2d18de26f071d9941c593ae0"); FeedZipHtml(zip_buf, 46025, "928852c38bdb27f441996c9f4e8e5105586f1b1de964284f02"); FeedZipHtml(zip_buf, 46050, "11b2c10ef609fc5d05b889e80820228c5e3555b9d2caa0a581"); FeedZipHtml(zip_buf, 46075, "5e79c8e662bd30d04b84d9c961f254adbe8f2982ba29391673"); FeedZipHtml(zip_buf, 46100, "0c839ecc78335a50dbe7e703eb378402c2ac4835af9562d5cc"); FeedZipHtml(zip_buf, 46125, "64af40226b502831e494fc10e7b0ffea8056356ce6807bf8db"); FeedZipHtml(zip_buf, 46150, "7e69d03d7e2c09bca78af68e98fb8d344118d6b3e081b2c265"); FeedZipHtml(zip_buf, 46175, "9ab628d5792d5a88e3c50ec9f890de86631d9523f5184ad7b4"); FeedZipHtml(zip_buf, 46200, "32b5f57b887425a284d3ef28c5722cfe25de1d2105f92c0329"); FeedZipHtml(zip_buf, 46225, "76742943a7f75566dca2f39e5574f6d2729f7398b2cb7f2ec9"); FeedZipHtml(zip_buf, 46250, "7f76dcc426e44037cb54a6b0fcbec40c2381d8e330e27c5e31"); FeedZipHtml(zip_buf, 46275, "75ce291654364ae4320472c9a412116317129ebcd540510641"); FeedZipHtml(zip_buf, 46300, "f2d4d65904d7cfd0518922e1a99aa15bc3760c7d690c5dc8b1"); FeedZipHtml(zip_buf, 46325, "950cdda8facc3c5df7fcdbb1f51d5b7f826c3d67e931387bee"); FeedZipHtml(zip_buf, 46350, "cb8eb9e71a079a55f6dc9c5d8fd944b6ee6e3ab8313b6e130b"); FeedZipHtml(zip_buf, 46375, "db179e867d8e9e97597691bf1dcefbdc6bf5912945318d5cb1"); FeedZipHtml(zip_buf, 46400, "2a0c0fcba5e6e9e789780772d1d65de8936ebb8f6cbca79951"); FeedZipHtml(zip_buf, 46425, "bad7e05532f97118514604f38b0cf6d0996440e3bb776bf76e"); FeedZipHtml(zip_buf, 46450, "6de0bbb5fd85938cc752c17f15ef2511958ec461af2e8c105b"); FeedZipHtml(zip_buf, 46475, "a3fa6e8afc25191471c5696917fcd9a8dc4452b22a2be74039"); FeedZipHtml(zip_buf, 46500, "5df7cdd94745cbcf18e8eae6516a0e325e264079c6591cdd57"); FeedZipHtml(zip_buf, 46525, "da2ae35eecf3dbb4d8fc94ed8380b5fe600054204cfff04da7"); FeedZipHtml(zip_buf, 46550, "67767e872b4f352f2e9c90678439c8a5a5f395883f9b859970"); FeedZipHtml(zip_buf, 46575, "a367e4055393e596b133a369a114eb11a9abb6b33415f0b8da"); FeedZipHtml(zip_buf, 46600, "a0834bbe9ebcf9c4696d912809c5f9af8e58611b8dc2e82efe"); FeedZipHtml(zip_buf, 46625, "1298615ba62d9d2b1fb46c1baf276dbc1b615ad562cdfb200a"); FeedZipHtml(zip_buf, 46650, "1278e6ab4a06b8466f80383457b5916a216fcbce5729126ea8"); FeedZipHtml(zip_buf, 46675, "44782a1312541c64ea393153d09128b942128af0f5b1108989"); FeedZipHtml(zip_buf, 46700, "064539849c9b1cf5ff1d7c97d7d9f3d20c478c407a90520c45"); FeedZipHtml(zip_buf, 46725, "366646968119055a2af3d9b5c994b788fd95fe18c4868750b0"); FeedZipHtml(zip_buf, 46750, "e7c4ef859354575014ef3f5ce5001eedfd4fc1e40b562e153b"); FeedZipHtml(zip_buf, 46775, "ee0a9e3e1cc409dceac8608eeb6213c7f45ce2bfcefd29224f"); FeedZipHtml(zip_buf, 46800, "69bca63d7085c443f7876bcedd626123f7de068d40156bda64"); FeedZipHtml(zip_buf, 46825, "72e61057d1ad584458531403b616e4d8190b7f3caa8c4be4c7"); FeedZipHtml(zip_buf, 46850, "8a5d511e3adca95b3b756ba76e2d5eddca87237498af58c50a"); FeedZipHtml(zip_buf, 46875, "04dbe15a05eeca33ba45a428b8292a9f095bcd9f4112cbf6a5"); FeedZipHtml(zip_buf, 46900, "5cfc956a4d148c2dbe37898ccbce6121a193a11a20ced3d5c0"); FeedZipHtml(zip_buf, 46925, "50ec95faeee8fc8af7d32186839549f70afa844967f0234da7"); FeedZipHtml(zip_buf, 46950, "f44b897b42d5048ea0aa2c30076b6b14141bcf5ba894aeb278"); FeedZipHtml(zip_buf, 46975, "e45cd7a37f1685598327df1ab6d84773b6377dfdcf1f154f21"); FeedZipHtml(zip_buf, 47000, "31138b15e1f3e6cfff0a8e8788664c2d40384840cb7b10ad65"); FeedZipHtml(zip_buf, 47025, "16f52aae0b71b9544503d4cd0d2c45de6dc3c36e0c9a4490e9"); FeedZipHtml(zip_buf, 47050, "546c2beb288f83ebc8113a25cdadc115e506ce73458ff4fc2c"); FeedZipHtml(zip_buf, 47075, "710773aaed1bb8cbb610fdf7c989ba4daa0af0c5713c9e0c59"); FeedZipHtml(zip_buf, 47100, "6f319c41b9e29f7e916e1a857aba64ab223c172566a1e021ec"); FeedZipHtml(zip_buf, 47125, "ce676a5e5d2d4fecb3d2dceeb49357485a73c89606ae2ce6e0"); FeedZipHtml(zip_buf, 47150, "55079247107bec4c84a118d51fd437c4e5f7b8c216f04b2196"); FeedZipHtml(zip_buf, 47175, "1a4c149d96d36630589fb0960649f68e6df858beb291e496fb"); FeedZipHtml(zip_buf, 47200, "cd62b946bf34dd6fb338414860604d44d427410809b8e4ca87"); FeedZipHtml(zip_buf, 47225, "8464a484a331e272aef9e3b9860b8149ddd079be45a1cc6876"); FeedZipHtml(zip_buf, 47250, "e1db2552731552f38fc35ea913aefce0c6a9731bf373c74ee2"); FeedZipHtml(zip_buf, 47275, "7bed8923ad4a14bf253857f9b5d644471a25fefaac0aa782e7"); FeedZipHtml(zip_buf, 47300, "5dc02946a4dbefdfbcf6c95cf3c3b328c8eee3e4cbb33757ff"); FeedZipHtml(zip_buf, 47325, "ef5c191052b348a90a5ab8e0a15c1511e770ece7d6c2fb1ee1"); FeedZipHtml(zip_buf, 47350, "fd3b312b0cbd95a8ec1a773505edf4a16ed4d9d547efc5f72f"); FeedZipHtml(zip_buf, 47375, "fff28ffdef5151160a4addafa4f91a7f328a7b130cf0a9fc85"); FeedZipHtml(zip_buf, 47400, "456a5793117609a29fb818d9fb203bf7d34c00e854de65917b"); FeedZipHtml(zip_buf, 47425, "950c6c817e959589e7f2df1bc06d8cbca2510c44920438a181"); FeedZipHtml(zip_buf, 47450, "bc026965a922441d449bb68840537e4dce14d4bf43c58e9354"); FeedZipHtml(zip_buf, 47475, "e0c51a07448be5ef86d4da61e62288afae6f8cef9590dd9ca4"); FeedZipHtml(zip_buf, 47500, "3daab36f52a0e098d294637a5f1000060d080d798a15a7a8d2"); FeedZipHtml(zip_buf, 47525, "95c88cc3ff4b6e5b4eace3baa1b0513fd5e6dd3e5f0b3b0f04"); FeedZipHtml(zip_buf, 47550, "527a1a647b551a56888c2c3419d91edd72f8e6b9fcbb605c04"); FeedZipHtml(zip_buf, 47575, "eb7d1e9dcffd9c31add3da69f1eeadcf8dafde54491accd056"); FeedZipHtml(zip_buf, 47600, "d111b3693b8f991a3e248d2492e52ed8f66efdf4e6cfb51fbc"); FeedZipHtml(zip_buf, 47625, "641f6d346cc6f737dd388cba24016c953607ff79f2f6c3958a"); FeedZipHtml(zip_buf, 47650, "476991609a82049b8403d86e8a998c3d4aa025d165187e09f6"); FeedZipHtml(zip_buf, 47675, "346b0823a0bf5e90e8966c201206633fc1c925277615fc0780"); FeedZipHtml(zip_buf, 47700, "883b919123012d7417f6b0fc30d78d30bc3b06633fa45da793"); FeedZipHtml(zip_buf, 47725, "0eac1c46ac89d0a699d02769801e18643f1edbf8f255e4616d"); FeedZipHtml(zip_buf, 47750, "71f3bc363c0c0e6dca5ad3ea3009b74c4e164379dc37d843db"); FeedZipHtml(zip_buf, 47775, "33f208c99dc15e72738cd61ea97e71437d516e3e097b1a6a52"); FeedZipHtml(zip_buf, 47800, "7d55019aded534cd02abe6bb7d165c6bff45838508e1678491"); FeedZipHtml(zip_buf, 47825, "5815877d7fe2ed7bbffcfa1b0dedc6f2bad2990e9ba72ec776"); FeedZipHtml(zip_buf, 47850, "f45494cf8c7dea7aa82cef5f50e4d004dd3f13742a7d31ff48"); FeedZipHtml(zip_buf, 47875, "0f871e8b9fe9cfaaf8bf6c49ead3459ae272cb84817bfb25d9"); FeedZipHtml(zip_buf, 47900, "d1ae17aced7abfdac6fb35db737592c4e3d2c7caf8b8242965"); FeedZipHtml(zip_buf, 47925, "c1ccea386f994d4548336332f3a42159d34dbfeb9eae108aec"); FeedZipHtml(zip_buf, 47950, "ed50767fa4f0b39e6840e44f325400879cb0438638c0ab693c"); FeedZipHtml(zip_buf, 47975, "a16839a3932766cc231bbac7381af9bd1793bcb84182ca51af"); FeedZipHtml(zip_buf, 48000, "7796a200ca28ee1052ad1165afa2bb7acdc689af1c20dfeb89"); FeedZipHtml(zip_buf, 48025, "5223611ab3554a9caee466842346b81a45e08052b4c56f176a"); FeedZipHtml(zip_buf, 48050, "70fa00485b732df690b27b899053b9e492ca0b9b53935bca6d"); FeedZipHtml(zip_buf, 48075, "49cf4afeaea42f8f0fa22bbb55d57ecab031f408ebd60e8285"); FeedZipHtml(zip_buf, 48100, "1b092f8351cd95592366bcb10dbc19edf56a4847cbbf03ee52"); FeedZipHtml(zip_buf, 48125, "e478c3988fe1b752b91e7dc4a5e4029a7ee9379da4b9750c10"); FeedZipHtml(zip_buf, 48150, "01222b5893cc771fcb3b2cabcd5fcd0c69c245dee8319581c1"); FeedZipHtml(zip_buf, 48175, "6911b0ce8bb58794ddef1045b9f9ae6f93888ecbe270712b19"); FeedZipHtml(zip_buf, 48200, "c383c1520c7955e59bbb659951fd5666f23a9924f08c521ad5"); FeedZipHtml(zip_buf, 48225, "9f67bcc60dbc29c91ee966d606f08be01e5449dc42498565ae"); FeedZipHtml(zip_buf, 48250, "066d8e990ff41bc6e344dd62268b964c389e48bd9ab436cc29"); FeedZipHtml(zip_buf, 48275, "de435d4cb5ad1662a159674b3e691ef5cf4ec201b6c794d4c6"); FeedZipHtml(zip_buf, 48300, "d7d10b86d4f5db2c149b04e3a12f1b54025795dc763eb6ba04"); FeedZipHtml(zip_buf, 48325, "01b3578b166acc608716f3a0c528eeb1638ffd77eabd95dfe5"); FeedZipHtml(zip_buf, 48350, "ed6e0646001380b7af965198630823667869b749492c43942b"); FeedZipHtml(zip_buf, 48375, "6904dc2efeb1141db5578b306acc6087305bc35996802b2861"); FeedZipHtml(zip_buf, 48400, "c006dddd85840422be573d332fca04f82f2fb7e605ba853312"); FeedZipHtml(zip_buf, 48425, "451335b32518c85fa6f34ae89b4ad96d303af0dec62289da42"); FeedZipHtml(zip_buf, 48450, "89b42913612c307045a42ecb75293910a6c6f459b337653f4c"); FeedZipHtml(zip_buf, 48475, "d24cfe22c656093361956cf9b32406548954c6f71d52b991ea"); FeedZipHtml(zip_buf, 48500, "da7dc36e46436812a0ab4322dba660024a6f302f45e4c153e1"); FeedZipHtml(zip_buf, 48525, "c486dc98328cd88edac9761ea076173a62a0e006d8525a0c4e"); FeedZipHtml(zip_buf, 48550, "b72abc700885d58d85da6388ee18080e19c912bec9c7c9e938"); FeedZipHtml(zip_buf, 48575, "351134970beb5c46f4bbdaeab1e8ba62a796c5989e71eb0ffb"); FeedZipHtml(zip_buf, 48600, "aae69a8c1b1108297da0f8289779edca510e7f5d8772b9314f"); FeedZipHtml(zip_buf, 48625, "0ce524fc7628d718e5249556a1dc2b4e6ecbb8cdb10100f182"); FeedZipHtml(zip_buf, 48650, "0b462cbe11ea856fc8b968424765be15cbae34c89bc36a1a2f"); FeedZipHtml(zip_buf, 48675, "4fd8e9480ec8efe91f7b227bd20855a84c49ad279d529b6e6e"); FeedZipHtml(zip_buf, 48700, "4c19e928132886cf9c7f7ccba4b3099462a43b50e5038909dc"); FeedZipHtml(zip_buf, 48725, "302a96a1d05dab81969f74c22cc1a68a3ae9b18240e49c1407"); FeedZipHtml(zip_buf, 48750, "2c0380451f03954a091742f420f00a6f9e3eea2bc7950b09b8"); FeedZipHtml(zip_buf, 48775, "4626b0eb276666a5d8c66ac8a394aa75299a050a163fa11b5d"); FeedZipHtml(zip_buf, 48800, "6cab2c883337a63244e2e42d07f16f1c3f878d395286298a40"); FeedZipHtml(zip_buf, 48825, "54d708284207033175630dc19d5cf747e13646f879a62a0150"); FeedZipHtml(zip_buf, 48850, "9a07a29315587befa7e262f87685d84ae801bf92214fccebb9"); FeedZipHtml(zip_buf, 48875, "f001edce0e9cc2a8f8bc12ac23e1790f7884c007bceec16b41"); FeedZipHtml(zip_buf, 48900, "fcd2e87b40738699d997ee8ccf61125e26cae759146794c1ea"); FeedZipHtml(zip_buf, 48925, "2531b529c153cafc8129c0c91f0068cb1fa647a1f07ac52122"); FeedZipHtml(zip_buf, 48950, "02314525a1e8315f31a198b0de11ca96114a9357aa9c50de07"); FeedZipHtml(zip_buf, 48975, "99d080df4e55018b42ee853de4d141576690f323679fb310d8"); FeedZipHtml(zip_buf, 49000, "fa83978db2a8fd5008d120d790ef5cda246402be9f714fba03"); FeedZipHtml(zip_buf, 49025, "05350c44c6e0d2ebb2062376a12a20e97814669934a570a603"); FeedZipHtml(zip_buf, 49050, "6188dfc5884311998a1ded00299e1f3c778785562468e9fd9b"); FeedZipHtml(zip_buf, 49075, "169e471104521695e6eb14caf275fd48269a71fb139177172a"); FeedZipHtml(zip_buf, 49100, "cb83d2fe4267be954a3f0aa32f55986f7c5f34dacf3df593c4"); FeedZipHtml(zip_buf, 49125, "7932f815da27f273b565c83f77d0d1ea305f08003742a1ada8"); FeedZipHtml(zip_buf, 49150, "dc9d1f3573b197d2422f2595d1361e75595fced702921626a5"); FeedZipHtml(zip_buf, 49175, "b98a5a63763e6dae6a0b45c86b00b1e92422237fbea2982c9a"); FeedZipHtml(zip_buf, 49200, "6d092fae345377ae717ee5e6f562f2075a6cf1b45de1b4fac2"); FeedZipHtml(zip_buf, 49225, "69b91bd8b4a26994745055396dd6de0a54652d2836ea5b7185"); FeedZipHtml(zip_buf, 49250, "05e47c159dcad5e7d2c8e9e07e7f1bd25358a12cf429574a5c"); FeedZipHtml(zip_buf, 49275, "759b72396ce3bb94e37d09a9abbce56d6ed07c3166a6b0b601"); FeedZipHtml(zip_buf, 49300, "573b635f6b0e18a9eb6b8da3d6d4d71aefc8d16c965ccde5b7"); FeedZipHtml(zip_buf, 49325, "5af68bad6d4fcbaef5d86a4f2b899120fb88eeb43cf78abad3"); FeedZipHtml(zip_buf, 49350, "9a8b6d51775acd1f37a739adc28985135c6d73dadca0b98a08"); FeedZipHtml(zip_buf, 49375, "349e6715ad69e7a2df0f35bcd8dd9a96d27a17d190b65205d8"); FeedZipHtml(zip_buf, 49400, "f5a37d0c01a08c4ae455debeb030ac0c7977dd0b1fdbbd5030"); FeedZipHtml(zip_buf, 49425, "ba7cf742c99377cd0b7755c9b7a02ab98a54d8f52e5c2367af"); FeedZipHtml(zip_buf, 49450, "eb5d688f597b6b988632d406ed781b1bd5d43c5573b42e54d1"); FeedZipHtml(zip_buf, 49475, "51bbce85bb47eb2b7eb4441e478c3591a8e42e5b7b97d45563"); FeedZipHtml(zip_buf, 49500, "968619ba7d04b6da83a3fb16516314aaeac7217c3776938ef0"); FeedZipHtml(zip_buf, 49525, "cd5efed504360477edbec55df3c35df343b9d1ed6c7e9837d6"); FeedZipHtml(zip_buf, 49550, "6c78f3435b2eaa6b7e58367a03e4a985343fdceaf36da34c59"); FeedZipHtml(zip_buf, 49575, "d1fc3027b17ff5cd0fb7b326f8fd28ada807fef3872b127ed3"); FeedZipHtml(zip_buf, 49600, "7892c05ed75b0e7ca632ddb073d928918a9416f9657e44ab8e"); FeedZipHtml(zip_buf, 49625, "f6acfa88f4c354147265eb83813b18f70b22edc88fb8ccb590"); FeedZipHtml(zip_buf, 49650, "6b1d20952f7b982042f7c3c12461fbe12cbe660c01937fac7d"); FeedZipHtml(zip_buf, 49675, "55f0dc976243ef83ecd81ffb9d7018666119904a06b7bc4932"); FeedZipHtml(zip_buf, 49700, "9c45cd9f692e60a8615660b27e0724668c809bc5646cde9b5c"); FeedZipHtml(zip_buf, 49725, "1fcb59e24d90f45556f0ae29ace98ffb6ae80ca52311249fa3"); FeedZipHtml(zip_buf, 49750, "996ea37478a3fb2805cc67d5dace068daef549966d940a6fc3"); FeedZipHtml(zip_buf, 49775, "610f24c63257fa6aa0761564b9f39f81a85d02b392c18fc3ba"); FeedZipHtml(zip_buf, 49800, "7258c27229aaccec6e4aa52a748d539baadc919897d33d45b6"); FeedZipHtml(zip_buf, 49825, "8301fa42630bd86e5599f69500dec0be0ffeb89663c09816bc"); FeedZipHtml(zip_buf, 49850, "ec5957011f207253843b0c19f963c7076ae772e390d2eed02f"); FeedZipHtml(zip_buf, 49875, "27725c957406a2db4d0a8aa835f43f3cc7ffc0b33f086e583b"); FeedZipHtml(zip_buf, 49900, "cbcd9c66d3020e84e90ddc5504779c386a8db7bdfe301cdff8"); FeedZipHtml(zip_buf, 49925, "0f41da40a2ab608a5f3db8f8a7e130e815bfb83796de747d0a"); FeedZipHtml(zip_buf, 49950, "da288cc7696eeec31e9a8ef2c529e81b3cbb83dbac417d8ab5"); FeedZipHtml(zip_buf, 49975, "dc586356d4f6d4e69adff20a6f54edaefc6a177f8b6d2940e6"); FeedZipHtml(zip_buf, 50000, "90dbd8cb1f9320994a55ce5e146e4b985ad082c3b7d611d374"); FeedZipHtml(zip_buf, 50025, "1e2772d07d97443c77de5898c488c421f59f2fcf95ad46da6e"); FeedZipHtml(zip_buf, 50050, "f45de0c405f181341e38649a792ddd3a9643a3b4a9b5d81a8d"); FeedZipHtml(zip_buf, 50075, "b721b0955747eb376da1d0394a64d28b0dd093a0d7754dadf1"); FeedZipHtml(zip_buf, 50100, "9d40699abfc53ca20755586cfd84a51ed52b8a361b333284ec"); FeedZipHtml(zip_buf, 50125, "35871e3db372469cee0a6bf4741dc6fbce1bdf7c814be693af"); FeedZipHtml(zip_buf, 50150, "74c329050532d824391a3f0595338b013f84ef61920a758182"); FeedZipHtml(zip_buf, 50175, "30f3f04bbd5670303840dcfbf6c501fcefb7869f14fef2fdc1"); FeedZipHtml(zip_buf, 50200, "73fa8bf30e05d9f34eb4992fe53605b32e7ffae9eafde15fbe"); FeedZipHtml(zip_buf, 50225, "7ff9376b0bf457f8e3f72fcbf761321adecc87b30fa79cfc27"); FeedZipHtml(zip_buf, 50250, "2b67e1105d7f9d1a85952295b129fadd77e368606d8afffafb"); FeedZipHtml(zip_buf, 50275, "3818946f8a581cefc6c440e67c0c1b2359c5859c5eab1b4f86"); FeedZipHtml(zip_buf, 50300, "3de1e4f95624de5480c162a0bc7438cff1d35bb96e3cf6b15d"); FeedZipHtml(zip_buf, 50325, "074a8e7a66d7da8a39ab65ab16106a6c4a3c7d2c99cd6d9c84"); FeedZipHtml(zip_buf, 50350, "7fc6641d45f9954328f11f0f0ecfbc382f32fb2ada425f55d9"); FeedZipHtml(zip_buf, 50375, "3652e3a0b7b0a27837d02c130e057b839347b1f3c4ea419963"); FeedZipHtml(zip_buf, 50400, "79b4539bab8b978917038588f042c432602b8cf08d38a8b179"); FeedZipHtml(zip_buf, 50425, "270ae8a7ac6a5738cae3072f78408355ca1d5f60f4387c0886"); FeedZipHtml(zip_buf, 50450, "7cf4c76e835fcdda7d88c775391b112f74e515116974fcee97"); FeedZipHtml(zip_buf, 50475, "4142ae047ed371f43f8307eff2fd5b4fcc817948a9a75843bf"); FeedZipHtml(zip_buf, 50500, "fff7e7cf9f5b7ce1e8eff8bf95148a224128e32a2ad0c6c910"); FeedZipHtml(zip_buf, 50525, "84e12c9598c23c55b429448dd38248c9b39b133baaf651fe28"); FeedZipHtml(zip_buf, 50550, "9bd45db2fe630c96cbb58194aa95f951ad9985eac75944e8a6"); FeedZipHtml(zip_buf, 50575, "37db200250a9b583c831b3836f4946b947db4bf8620ae6125b"); FeedZipHtml(zip_buf, 50600, "8895b3d8f2e766dcd9713c9e26921f6b40152f4e0d6c7c7957"); FeedZipHtml(zip_buf, 50625, "22c440e4af8a9fe7be54a8bc0097156c00f393ba4194e67fb1"); FeedZipHtml(zip_buf, 50650, "578e45458215e8a3b628626a795e64a854db23ee867ea67290"); FeedZipHtml(zip_buf, 50675, "3b260f2feb7adb109738b441a6265999696a1117d7ef9ab7af"); FeedZipHtml(zip_buf, 50700, "d19809419fe6361ef6309f8d037c94ebdc0cb2e7fed385e802"); FeedZipHtml(zip_buf, 50725, "77284731a81e0ec4d0d2a7d17a0326db91430c7b3e09a8a666"); FeedZipHtml(zip_buf, 50750, "c88e8a84c0b81c18742326e3d01cf299b6f5131dbe393e7eee"); FeedZipHtml(zip_buf, 50775, "bd38782e0539fa8bf7f657ef2ffcb78a07ea1b8e27e0dc1254"); FeedZipHtml(zip_buf, 50800, "23c2d41338c24e562ccfc29f192220ddbf208e4159012db337"); FeedZipHtml(zip_buf, 50825, "d473fa3bf532c3c400a26ac0bafd178f6d0b6591cd4702761d"); FeedZipHtml(zip_buf, 50850, "5b16a3e662ccf319270b96ad45eca5dcccb3581b4f0343dd82"); FeedZipHtml(zip_buf, 50875, "8e33a3a568369fd822f6e8b2753de60956be483c33738a7471"); FeedZipHtml(zip_buf, 50900, "4f6ec7808088e901bce87ef14a7d0cb43685201a1155c0ce3b"); FeedZipHtml(zip_buf, 50925, "18b62ae46ea4d0f1227ca78b719000483311dc57ee211183e6"); FeedZipHtml(zip_buf, 50950, "b9f22fc1346fe2275e37a74776c93b213212369259835e4aac"); FeedZipHtml(zip_buf, 50975, "a911a7366252f71d9655a6fd2f0c49cb040138ac30a2e877da"); FeedZipHtml(zip_buf, 51000, "f7d271d0c5a81078348759b8cfe7175be2e83dc36a030fa94c"); FeedZipHtml(zip_buf, 51025, "0cb20d86141caa0d65426f55a62aa7b91157e20d950084461c"); FeedZipHtml(zip_buf, 51050, "78a70f3e56774d0fc5efcda3a970193a1cdcc80fa42f8b9db1"); FeedZipHtml(zip_buf, 51075, "0e4db1a362351af12d9b209f0b13a4b9b7c7ccf762e1f3bd58"); FeedZipHtml(zip_buf, 51100, "e87cdfbbf667e4bd7ee3362c08d46f6056b095794ba2eb62e6"); FeedZipHtml(zip_buf, 51125, "189b2901a5fca457c07afbc786d2fadaecd70a2b6106663f8c"); FeedZipHtml(zip_buf, 51150, "72e6ff0d320454b2cfc2b01532d066068312e624bba396dcd3"); FeedZipHtml(zip_buf, 51175, "5a1fae1346d14ac0db633601ea1ffc2f4129bcc9903f37d56c"); FeedZipHtml(zip_buf, 51200, "84187119f4afa63591593c669edb70bb8647614491a91cc6aa"); FeedZipHtml(zip_buf, 51225, "ff38cdff51491223ffc1f10bff21ff8b190492ed39d4d2659b"); FeedZipHtml(zip_buf, 51250, "428ff105093965328ee53994eeb1c22616e11bc44b51920f5e"); FeedZipHtml(zip_buf, 51275, "86fe0700dfdc39c29d375441b1dfa6de5bf412e01fdfc60f5e"); FeedZipHtml(zip_buf, 51300, "cbff228a87031e0080caccfef3bece579757e56f73e9ad3d9d"); FeedZipHtml(zip_buf, 51325, "47ba8a39e5472d8a9217f424176f670bdee62a785b43d6016c"); FeedZipHtml(zip_buf, 51350, "e74b8c1452f20acf4a1f6bbd0036455cb2efecf3e5b9fb0ef2"); FeedZipHtml(zip_buf, 51375, "a3e6b9861233585994d3d2df6ab9b506c1f0d29c6ed86d644c"); FeedZipHtml(zip_buf, 51400, "01ba2917f46a517cc478cce5630cebf7704ab55fa40d489db7"); FeedZipHtml(zip_buf, 51425, "f8be6917bc58403bc30f4be31c8cd60d2dcb1dcebef03d9d79"); FeedZipHtml(zip_buf, 51450, "28ccc57010765f2ff2e1b39eb76e0cbb3372552a972650943f"); FeedZipHtml(zip_buf, 51475, "1d7479c66db948ca2c1a2ea80a1ffbb9a8c9704b37a02ae7e8"); FeedZipHtml(zip_buf, 51500, "1550d743ee4f6d6f5a18c4b06c4c8773d39fbeb6af17266d99"); FeedZipHtml(zip_buf, 51525, "017bd30542280bdd9d8f655981125f25ebaae4581653121c69"); FeedZipHtml(zip_buf, 51550, "1ca7a1eabc238a358adc6f359788a6a3c89aa07798fbd88de3"); FeedZipHtml(zip_buf, 51575, "a41752592eeeca88f7d77adef69eefd18d86f9a472b9a9f0cd"); FeedZipHtml(zip_buf, 51600, "643c867ba0ca7d203144121971fe5f3cff214cb9f6978f6eca"); FeedZipHtml(zip_buf, 51625, "41cce6807b103cd8af4a3e551efd6bfde84e9c65f108b49d15"); FeedZipHtml(zip_buf, 51650, "71f2ca9bb048a04a678105c3d1646454dd5379ee3ed63280f5"); FeedZipHtml(zip_buf, 51675, "f0972f18d2a86f083bb6ad716cc2cbf1d83c4774480fc36e45"); FeedZipHtml(zip_buf, 51700, "aea3e5d7dea24c47a965e1fecfb5fbde7e461d835a32e4423c"); FeedZipHtml(zip_buf, 51725, "09d5e1edeae6679ba9ed2d2a74debc1e66909a39cac8726317"); FeedZipHtml(zip_buf, 51750, "ac42174abdf85e061bf1b8ee4659395931cf77c21f6016b99f"); FeedZipHtml(zip_buf, 51775, "8822f71341c4ba26880c76a0aa07a21c461a0cfbfb4285f7ee"); FeedZipHtml(zip_buf, 51800, "6f8328dfb5f8e4ad74c798de18e19cf82cb57f0692e96ee001"); FeedZipHtml(zip_buf, 51825, "9f92780c3c35c36e67fbde0510d3bb24084a479fc0a04ff092"); FeedZipHtml(zip_buf, 51850, "865def24c6d4eab291466086fb3346697c5f37e02f3503f6af"); FeedZipHtml(zip_buf, 51875, "8e6a27c1310de6d9bf386e32150e73cc66386f4c2b4b55988c"); FeedZipHtml(zip_buf, 51900, "7ce447fed40beee08f132e58c23573500746a181cac01a6912"); FeedZipHtml(zip_buf, 51925, "0245be85272d1860fb9b201971023076840d85eb5a6d61ad76"); FeedZipHtml(zip_buf, 51950, "1e6dbda9e42bce61b371968601980ba07f2e25643424308297"); FeedZipHtml(zip_buf, 51975, "0a34bfc26b28bf85cb00cf52c3d973435a5e3cecb93831309c"); FeedZipHtml(zip_buf, 52000, "c75d082fd5f032e4261677117266790e1da486c1d672ce6983"); FeedZipHtml(zip_buf, 52025, "4945c95a3432c19e44455a7c0aa8a8449660d9894d21c4ab20"); FeedZipHtml(zip_buf, 52050, "332ef773e26ad46d0f412570490fb22b52b724007d6df42a67"); FeedZipHtml(zip_buf, 52075, "973cda21046c377b7eac28ecf7eeb0224aef19682b6937180e"); FeedZipHtml(zip_buf, 52100, "fd2888277052f177cf1291b74812a6d616255531f5b7566951"); FeedZipHtml(zip_buf, 52125, "202afc76e32aeec3e5a99c9f68058abef4bbb2e772c36c6273"); FeedZipHtml(zip_buf, 52150, "4fabdd545b8835372fac1ffe0b3e1c1c1c189f9f5bdfff3d13"); FeedZipHtml(zip_buf, 52175, "b3309a74706f06aee7f67f31dc798f8a27b3c22fda355299ca"); FeedZipHtml(zip_buf, 52200, "62ebc34371985b652050697786e4256d04340b1558865dfa59"); FeedZipHtml(zip_buf, 52225, "2652c042ac3ed7f63a93acd05f111b3e92b44ecbd8bd1fad59"); FeedZipHtml(zip_buf, 52250, "29e13609110361b203c5cd90dd7c4097461627534dbb876e9e"); FeedZipHtml(zip_buf, 52275, "67d4b104a27766d3f2315fe516943a85fe496a64264a71dee3"); FeedZipHtml(zip_buf, 52300, "c91decd0c0235adacc7a342fa2f84b13cf0a3f2ddc57f1f706"); FeedZipHtml(zip_buf, 52325, "1eb2350437dc317ce41400925285782a0dca33dfdfc6147b1a"); FeedZipHtml(zip_buf, 52350, "70411cefd64f25ffcee2912c118871aa91ac9fa78a638fe228"); FeedZipHtml(zip_buf, 52375, "1ee23fbac4ccac1dd8fc5bff13fee3635ed64f0f71326145c1"); FeedZipHtml(zip_buf, 52400, "20f2e7c018132c0faf82625dd88895ada421e5c0a3a6ad6a3c"); FeedZipHtml(zip_buf, 52425, "a88725a8717848f5c1fa7112004fdfff124cd3c3c35ca8993d"); FeedZipHtml(zip_buf, 52450, "14b4d8019061c530cc0000b906d87af9187f3c0ea25ef977ae"); FeedZipHtml(zip_buf, 52475, "0729becbf65737b2d8a9eb175d3fcd5e5224a4fa956c337ec3"); FeedZipHtml(zip_buf, 52500, "3fb77f99bf0aa5902956997b5df92165ae623acdf78cc7b54d"); FeedZipHtml(zip_buf, 52525, "c220d5f21721466a3c6601a8e1e2813eb0cc548f8cfd67f332"); FeedZipHtml(zip_buf, 52550, "f1f75ed983941fb241ef52716b4ff0793a222b1088ffbd2009"); FeedZipHtml(zip_buf, 52575, "efd85b1d536a8df12e73553bae0c2b6df65c074f2201e79ba8"); FeedZipHtml(zip_buf, 52600, "a2a4de08b81a8cd446236af988a9b1bdb02f1dde646de61279"); FeedZipHtml(zip_buf, 52625, "54be320d50c404344d425f368cf91d351bd134b950e8bc1b63"); FeedZipHtml(zip_buf, 52650, "306f86b62bff2e0ee5f3814f2ba13d3627e618638e69c022be"); FeedZipHtml(zip_buf, 52675, "7413b2c4f2d65216e6099c4cc643acc0175cc6f78e6888e298"); FeedZipHtml(zip_buf, 52700, "96377ba789a22843290ae275e22e9ff8baa967912a2c4b1350"); FeedZipHtml(zip_buf, 52725, "4f2e8f5791029d2080f03f3d5182905e3a8535b4aa7807d1d7"); FeedZipHtml(zip_buf, 52750, "84f9a5cc2953002e3260321a02d83f0989e0c740166dde3b28"); FeedZipHtml(zip_buf, 52775, "bf5157e71d7b6b5ca195d07591f774198ce2bba0e6a21c831a"); FeedZipHtml(zip_buf, 52800, "de943c6bc319da5e8edbcc1ba227608b8bd21de5612963881c"); FeedZipHtml(zip_buf, 52825, "e821b2f1f01eb9fda097c27fa388d3652f6037b09986e1d3a1"); FeedZipHtml(zip_buf, 52850, "7d9a06c8bc4c85fdc593115694a6e20e11b792425106e59f6b"); FeedZipHtml(zip_buf, 52875, "e3f03a0fc1aa924bab8204c66934a2d2010b781cd7286366c3"); FeedZipHtml(zip_buf, 52900, "be28de8c070fd17349aeabb007b88c7ccd6402b32266802cad"); FeedZipHtml(zip_buf, 52925, "47a05c38429e0eb9b66f32d5f5b18b18e91ad582659ccf18ca"); FeedZipHtml(zip_buf, 52950, "34429e29be7dae5fd032f86dfcc5f10312986eb8455f13dcdf"); FeedZipHtml(zip_buf, 52975, "b8bdce4a65db791021beac4c81660980fd45ac8d19aa582f14"); FeedZipHtml(zip_buf, 53000, "4db70a9a24a97c7ae4819645588ec8ecfaed49c2edd8427ab6"); FeedZipHtml(zip_buf, 53025, "318116b44d96500250a249a0e0dada520d55ae8e405d9faadf"); FeedZipHtml(zip_buf, 53050, "cdbd08d2987f9b8514fa87f580715b1f3e9f5f9fed63de2e1d"); FeedZipHtml(zip_buf, 53075, "41951d0f75f5754ff79015d6015d383c05c623ba5a8ce041a4"); FeedZipHtml(zip_buf, 53100, "957a94660db21cb18e128334a1803409aace0bac5262f4858c"); FeedZipHtml(zip_buf, 53125, "f11000321edab6f4e09b185333932f853a81ab467309eb0684"); FeedZipHtml(zip_buf, 53150, "13ea1e84299a22cd30cb91ca137b7f06492c3a6d70b5687a5f"); FeedZipHtml(zip_buf, 53175, "ee41adbdd560c3a18282f68d760e23d1e0b92dc4cc781090c0"); FeedZipHtml(zip_buf, 53200, "a68ae9b3d20f0cd89228b86b850e6e318bbe5bde4feec8102a"); FeedZipHtml(zip_buf, 53225, "b086aa0db40da4f04daee2bfbc5ef14486069a86224d3c6fbe"); FeedZipHtml(zip_buf, 53250, "58cf6bb884f7d0a5e3aedbe850a3de97fbbe29e6291eed4b8d"); FeedZipHtml(zip_buf, 53275, "5ebed15180c54b118bb891449b768980328024e245a4a9cd61"); FeedZipHtml(zip_buf, 53300, "b07298113a96b1ddaef24f6155cc608ee177d731f5b9f05ad6"); FeedZipHtml(zip_buf, 53325, "83b167304d40bffcaa47249fc89636e4820853d5e040025360"); FeedZipHtml(zip_buf, 53350, "83a8ed40482045755dd77cc8515dc098ba7ed2b34a30d49837"); FeedZipHtml(zip_buf, 53375, "5c9211099761940689658e3419c9c205a693241e97779932bf"); FeedZipHtml(zip_buf, 53400, "ce28b3d7fd745e31c29eb7cc60f188ad369f72b1fa86a1ec4b"); FeedZipHtml(zip_buf, 53425, "d543b37fb607b40029af442f939fc2e07e8fed0af0260e273d"); FeedZipHtml(zip_buf, 53450, "a93a4a6621479ee19bc2f211cce5638814a72aa3211670bb9b"); FeedZipHtml(zip_buf, 53475, "8a0eba8289a0232efcf23569294b328830adf2b28b23d8b311"); FeedZipHtml(zip_buf, 53500, "86b25dfdf353915ad5a796d747d6e4a81fe2c0e1eead9fa038"); FeedZipHtml(zip_buf, 53525, "d3905816b7088ad169526c568e1f68298c482c5304f0c7e32f"); FeedZipHtml(zip_buf, 53550, "655f941d9aeac6e4bf76e320e9062f4ff20bab4579d04886d0"); FeedZipHtml(zip_buf, 53575, "e686d1be99b66e547b8ffc000c40bb61f779f52a4384e00df5"); FeedZipHtml(zip_buf, 53600, "09cbef93fdef3706a13a160284efc469a1cdf0bf9dffbba716"); FeedZipHtml(zip_buf, 53625, "9f91398574eb5cec4812f3ad3f460c50ade7149913b3ca4922"); FeedZipHtml(zip_buf, 53650, "b3f9cf2466b15db693c22d53e8b068bc7a874571413005666b"); FeedZipHtml(zip_buf, 53675, "bad47047016da9158f4266113e87a11fa4b7630e1ce67f7083"); FeedZipHtml(zip_buf, 53700, "392ea572d0ebf4e99fe9a40f6c7fcf21a5b8bd628ce8ac10b8"); FeedZipHtml(zip_buf, 53725, "da468aba4f8cfaf46b0a06877f03ff032602f247cc6cbb07cc"); FeedZipHtml(zip_buf, 53750, "d56846f2f69d370a502ab02a297dbe7eb7ff7763dfc79f5ebc"); FeedZipHtml(zip_buf, 53775, "fcebcb6a1f8bdbdde5063ad222ed12533a3decc1c66cee152e"); FeedZipHtml(zip_buf, 53800, "b6cfe1c39da964c28e931ab4aa6185b891a62024ea1aabb976"); FeedZipHtml(zip_buf, 53825, "7434bf6e7856b78aa27aeb3e7c829a600746d55ba18698da4f"); FeedZipHtml(zip_buf, 53850, "028f34b563410ab8b83e7d7f7ae91d7dbefe7876717c79fae1"); FeedZipHtml(zip_buf, 53875, "f4e25a93e9379f7ed49dc0449fb25a1028c623223e541d10a2"); FeedZipHtml(zip_buf, 53900, "395c4961e22758f4fa7f7efb9f0ffff3db07f5c7f3b38bd3ab"); FeedZipHtml(zip_buf, 53925, "ebcbb38bf7e617a99de18fce7f7dfff122ff3352b86798d0f8"); FeedZipHtml(zip_buf, 53950, "4d7e3ed964d038abb97517920b96cae90f2c0679fda13f38c4"); FeedZipHtml(zip_buf, 53975, "168832fe06582e3fe774e5cfebef5a33e1c2c4af4c0e6d341d"); FeedZipHtml(zip_buf, 54000, "9a6d018b8f3b361f8e46410f2bc9a1ea3509874cae4a0823d9"); FeedZipHtml(zip_buf, 54025, "6ac625f5cbe05a0f79289c8a63d501a3f909012e301e62bc1a"); FeedZipHtml(zip_buf, 54050, "8635f37287aee57821164b7c7a2efe7b320c61f6139f28cbc5"); FeedZipHtml(zip_buf, 54075, "dbcc27a880b1c55e4be71f7f3ebd34b810fdfbf808c525ecd3"); FeedZipHtml(zip_buf, 54100, "a65d1a1e8711ea467ad11d2b368008d43d9ddebc96c42f162f"); FeedZipHtml(zip_buf, 54125, "1da9dbc0f83e7db296a47fcfba24e591744bda7b5e1d7d3835"); FeedZipHtml(zip_buf, 54150, "16c07f36989f92528c067ec5f4ed62b85afe49afc1391a8fb8"); FeedZipHtml(zip_buf, 54175, "c0e94857f0bb098b0206d23560cd424a70ac26e5078c89a450"); FeedZipHtml(zip_buf, 54200, "0cd2360f5df3b6bd693c21e39121718f81bb2b54e435412cc7"); FeedZipHtml(zip_buf, 54225, "818043f8cadd838a724b7e10d496c5fc07734404b85466964b"); FeedZipHtml(zip_buf, 54250, "1eeb4dc0d5f21d27ec4684de7d301c4aa308681666f01c46af"); FeedZipHtml(zip_buf, 54275, "f0ee7a719cb04101c58e718cc508904da441779284191a3fd3"); FeedZipHtml(zip_buf, 54300, "4990ca468f9354c72521087b618a1285f9c430bbed38f677aa"); FeedZipHtml(zip_buf, 54325, "af40d541812d04d15d98c4d188eb4472956304c9d5a7a3ebb3"); FeedZipHtml(zip_buf, 54350, "a3f3b3ebd39babd3e3cf9767d7bffe80c2d443a04c9c52ce12"); FeedZipHtml(zip_buf, 54375, "769b90ab3d02a2f500d6d869b8df67830ab6ba8a58f631bb32"); FeedZipHtml(zip_buf, 54400, "5678651e4a7516f5c96d2328f70394281f336a33ab58be0d72"); FeedZipHtml(zip_buf, 54425, "3a4d9457466807955ac0bfe7f125888ed005891c59555e8027"); FeedZipHtml(zip_buf, 54450, "71b9441eac177a65d3bfa6b2a0982227ff397ebd69f2ff4a65"); FeedZipHtml(zip_buf, 54475, "f8eaa4148549926c41cced4f869c78c417c2494f4618b576b8"); FeedZipHtml(zip_buf, 54500, "11ebe1558413202f9f9204e9101d0d9995c445e3105af22c95"); FeedZipHtml(zip_buf, 54525, "0e732246ab70b43dcfb19f9df4b118e9638e8755f5f3dc3dac"); FeedZipHtml(zip_buf, 54550, "1bfcb0b2310e784d9931103e2ddf18b88845caed79b6c1acdc"); FeedZipHtml(zip_buf, 54575, "ae56fb90cef1943acc5ec8d837cbec853b6a691f808815df44"); FeedZipHtml(zip_buf, 54600, "abd64acd591b6d27da1901bed66778a7ee3ef95799954ae7ab"); FeedZipHtml(zip_buf, 54625, "ac3eb9f5cd19b4ca9ae76e695aa37cff96a134aef8fd5bcd1b"); FeedZipHtml(zip_buf, 54650, "b653823688fbee94a0a7ca6e7ffce0a82ba73e959af766b0ee"); FeedZipHtml(zip_buf, 54675, "d59a1117b40ea94249d00d658f5f634565326456e28e7ee805"); FeedZipHtml(zip_buf, 54700, "693709c7322ae9b14a50d397018e5ffa32183a9025b53bca12"); FeedZipHtml(zip_buf, 54725, "cff7823cd2eef8b817489ebcce01a475973a20a8fbe74318c9"); FeedZipHtml(zip_buf, 54750, "135d5050b0d6db20ccd21c3cc819f4f70a6790aaada191c70d"); FeedZipHtml(zip_buf, 54775, "e86f53c96e4504381e164f49dcd735a58173f3cd6c4c90eeb8"); FeedZipHtml(zip_buf, 54800, "f8d7cac58144fffb0a8dcb6e4e2e3eaf849b2f702d64cac516"); FeedZipHtml(zip_buf, 54825, "ec8a979731fbe5b26b71beaf94659ba75f1cdb36bafac828fd"); FeedZipHtml(zip_buf, 54850, "948479d9781a83e67122a376b6da09fd367da58a368a445190"); FeedZipHtml(zip_buf, 54875, "6a75ec4f0493e9e89db797eabf31e1e3ea16607c7c79650e70"); FeedZipHtml(zip_buf, 54900, "fe1dff781e4703f13731bd70e6f06f8ccf2ea02fe77ddaf1fa"); FeedZipHtml(zip_buf, 54925, "af83d7b3dbe097f3ab32b7057c9ac1a350eba0986d3a64c9f7"); FeedZipHtml(zip_buf, 54950, "71f225bd0d82cc1de16bfb24fa61926637c3300a6ea8736ec1"); FeedZipHtml(zip_buf, 54975, "35b128df433ac60a59b42ff641605dd70f613789d318f4e083"); FeedZipHtml(zip_buf, 55000, "8761ea4916848d1337c64591dff8829c118f710fe46e58d4ac"); FeedZipHtml(zip_buf, 55025, "e152c777e4ddc17bc2e29e88e4829a3298158ea07e2bdd0664"); FeedZipHtml(zip_buf, 55050, "4721ef027786a38f4ee3fc81d3ec95c31f874f80ca90e2380f"); FeedZipHtml(zip_buf, 55075, "c749f0e88d08693ab5cd24155e820a30eeecd24f99edfefcae"); FeedZipHtml(zip_buf, 55100, "94edc227cd276fe264a6d6b4b3b3e5c52ed7d4839cdefbba4d"); FeedZipHtml(zip_buf, 55125, "6ede813cf607c14d1afe59c8a7a84dfaf8f7237dcc94974599"); FeedZipHtml(zip_buf, 55150, "bfbe0780a17fa7f124e92e865f0bf0cec6b6711fccae554ee6"); FeedZipHtml(zip_buf, 55175, "91965c87535963d15118127f4a8530ba2e669fab976f727cfc"); FeedZipHtml(zip_buf, 55200, "e130df437b4d6f44990b19f7b87617b2c263c76b81dfc68633"); FeedZipHtml(zip_buf, 55225, "e4175a47646effcaff7868fc3e287048e2a015b111c13db358"); FeedZipHtml(zip_buf, 55250, "556f1e53e2a91800420887f7640a30ea35b84c140c08796835"); FeedZipHtml(zip_buf, 55275, "f98090e28169f0f4d7b0cfab620c712f8ebea5320041c4bddc"); FeedZipHtml(zip_buf, 55300, "91f361a504b100d660c21f37494f5961acffee45fd9a5ed493"); FeedZipHtml(zip_buf, 55325, "5fcae3af7ec985465d514dfabaf7f19bfa5f97644fb63d2ef4"); FeedZipHtml(zip_buf, 55350, "57f8b3d11dc4781b650b97b8977f60c97e01d4820be69b2c12"); FeedZipHtml(zip_buf, 55375, "c7bd716649973cd80b8abdfae59d788f909ef28843c8fd2847"); FeedZipHtml(zip_buf, 55400, "b29abec83b1e9b1bc7b7e2e03a8470547880139d613e718378"); FeedZipHtml(zip_buf, 55425, "29ecfe6cc69ef50de7237870022bef0c13b594abf5fb9392b0"); FeedZipHtml(zip_buf, 55450, "5dde4071aa93b3ab6b78c1ae8d393e9cfd725a368d8549aef9"); FeedZipHtml(zip_buf, 55475, "2e3e5e9caaad9d9f5dfc786a6eeff385fe53994c70a3abad62"); FeedZipHtml(zip_buf, 55500, "590d819954ea85c899b421ba2be6a0f4ca00b8e5482076c919"); FeedZipHtml(zip_buf, 55525, "6aa59543431010b5bd10716890100724f33eb456bc37b11afe"); FeedZipHtml(zip_buf, 55550, "937ea12ab3e5ac60fc9f2bc8525fe4d3b20dcfcbd63e31a81b"); FeedZipHtml(zip_buf, 55575, "9c8449c54b2346b4b0f4c90d31b8391e9cba49be9a7767a8df"); FeedZipHtml(zip_buf, 55600, "1b59b24a551ee6aa4627546106b4b0daf748c2b2f97be48bfa"); FeedZipHtml(zip_buf, 55625, "357132353da5b82b21d3ff9f83de034738f1166dd6b37bc376"); FeedZipHtml(zip_buf, 55650, "6fd8ee0ddbbd61eb79c3bef9c6e9dd772a4aea538b4a3502db"); FeedZipHtml(zip_buf, 55675, "cbbd38ed3215081e8b3f8637d872705af8c2f80eccfdc6f9c3"); FeedZipHtml(zip_buf, 55700, "0248a513da3d7ce8778261f9678ae6e7168d332c49bf4ae2cc"); FeedZipHtml(zip_buf, 55725, "974133eedfd1ce00021897fa3a5728a3267a60eed8015196bf"); FeedZipHtml(zip_buf, 55750, "99be65949b24a7143d6521178f4ce2e150f5ce14d7cb8f2097"); FeedZipHtml(zip_buf, 55775, "5a34153517db95f7ab705495c92232c47c78aa8928285d5201"); FeedZipHtml(zip_buf, 55800, "194f83ac3ee2d846135ca5ad922c0b7fb5b140fdd975fbb45f"); FeedZipHtml(zip_buf, 55825, "5e499cd47ddb348e2a2772bc008719dbf654e046a653073991"); FeedZipHtml(zip_buf, 55850, "5967124602b380d3f2728ae531cc6d08a2bf307f0af166b94f"); FeedZipHtml(zip_buf, 55875, "a1ad8665fb0fdf38eb141adcd8157a6d2035a34337a304171f"); FeedZipHtml(zip_buf, 55900, "4f2b0c759efc0ee7d56e38ae8b89cc35c3e08a5bff2e1f63e2"); FeedZipHtml(zip_buf, 55925, "b5d486aa76519a616bc73688388e2e2d260d9eb0493bd28136"); FeedZipHtml(zip_buf, 55950, "893d0115e7c4879bdb9e4668afe4608e4359b24cd570f4ccba"); FeedZipHtml(zip_buf, 55975, "665cb2ecfb0231acf631ddbd8aab7a15afae6f8e275824a3b5"); FeedZipHtml(zip_buf, 56000, "577c17f547ae91bb6f1526b49e08feae5c628e6fb22e51e173"); FeedZipHtml(zip_buf, 56025, "67e8f782f2a995e78cc7b997e06fb844e113bf0baedf593eb9"); FeedZipHtml(zip_buf, 56050, "8a3a8af839f147fbc0e7c7fb583617fb09e7c6cce5776332c7"); FeedZipHtml(zip_buf, 56075, "6beb4ec891efc3758ee3613ca05afd580f05f3e7b151833f55"); FeedZipHtml(zip_buf, 56100, "4f226ae454b1583c31842693945d05f0f12dc2c2fa2812f160"); FeedZipHtml(zip_buf, 56125, "fea413c241f91260a1e940955314e3f7b4a30d2183854a716f"); FeedZipHtml(zip_buf, 56150, "7d38b3ec42212a8f62f9e09eeca624ebc6c2f21ff91d36d667"); FeedZipHtml(zip_buf, 56175, "d242591d561d111bd8efde86c39ed03de198b7e138d5d23d4c"); FeedZipHtml(zip_buf, 56200, "df9f200b17a5ec99fa52ffcef027993e2ee66cfc548836a9ea"); FeedZipHtml(zip_buf, 56225, "0468584dfc2e684a7ef70b5f0f6ccf7c56085ef487b11f02ab"); FeedZipHtml(zip_buf, 56250, "00cd1ad7e98409163016a5a5858a22e190835234b5a0640147"); FeedZipHtml(zip_buf, 56275, "ec370f1658ce78abfaf07f497b9d6469d80b885ff23dde8766"); FeedZipHtml(zip_buf, 56300, "ad58923e22fc1d3f1aa6c641e3732dbdab04260b16525cd1bc"); FeedZipHtml(zip_buf, 56325, "cfec65072fcd90dacde28206e4951c45f283316ab6220e6df7"); FeedZipHtml(zip_buf, 56350, "3ef3651d74bd307b3abb06842e0da12b574fc74139c33ecbb4"); FeedZipHtml(zip_buf, 56375, "f81046b2794a6634fb129dc6e1ec1f8ece283298e0d5a1901b"); FeedZipHtml(zip_buf, 56400, "6a2eaddf373452887660dec95b8dfec48f87ba0570a853ba5e"); FeedZipHtml(zip_buf, 56425, "8ba659fb56cfae12a0c8b1da112da43b9bcbf217a396273ee5"); FeedZipHtml(zip_buf, 56450, "35d8a0096109d85052b1632b6f2bf76255de96f16a99b7a51f"); FeedZipHtml(zip_buf, 56475, "2cd76d951dbe58183dcb137281a9e9ca2b42cabff545dd77ea"); FeedZipHtml(zip_buf, 56500, "2fa45bc3e0db7879c63623e2a8cdb086199b8536aad83fe34e"); FeedZipHtml(zip_buf, 56525, "a1bb9deb6aca0f8deb08eea970c4ec10201f094f15c8471890"); FeedZipHtml(zip_buf, 56550, "7151e0a0d4443489b005ca0aefa6d248b99ddb7990655caa8a"); FeedZipHtml(zip_buf, 56575, "d5096c3711bde5d73daaa085a421ea983aac01b0d6ea3db057"); FeedZipHtml(zip_buf, 56600, "229ddb01246f158a38598c8d8cb94faaef9422b761007a0650"); FeedZipHtml(zip_buf, 56625, "3b49a20ab47e6abe42827c2296402928b1941873c0162d11f3"); FeedZipHtml(zip_buf, 56650, "4a12cb0e696c9f435e62919e1eb37b23cae82c7f047f3ca636"); FeedZipHtml(zip_buf, 56675, "e8a84ae5720218ebe471f0e68402a0ea50f7b82724f5e3118d"); FeedZipHtml(zip_buf, 56700, "9d72114b249e8a6da5dc934b194673cbb59979dd83e8c8be69"); FeedZipHtml(zip_buf, 56725, "6a1a1647dae6e8c3a70220575e44db5b44016d52280b9a73dd"); FeedZipHtml(zip_buf, 56750, "59485cd7d2bae33cd92d47d82622e2860d0c6856c6d78c5b98"); FeedZipHtml(zip_buf, 56775, "b1855b9c1a4b21a6f21930b42be3f432680ad0fff2e8833c36"); FeedZipHtml(zip_buf, 56800, "ef7a51872f55c42bdafbb65d3d81db56f7607ceda4fe2d69ea"); FeedZipHtml(zip_buf, 56825, "a5fc38866b2495597c277d82aa7de59b03a82060de22e59d24"); FeedZipHtml(zip_buf, 56850, "de083b8dbcc6061cbc315d2b9582c42dfd34afa0be0f32d641"); FeedZipHtml(zip_buf, 56875, "3fc0ca70952e3db5300617c36e75a6cf51eb7db55db75448d4"); FeedZipHtml(zip_buf, 56900, "284ec995047a1a221620ca208ab1f8a537e295588ec74a6fea"); FeedZipHtml(zip_buf, 56925, "91c969d49aa5547a07d88f421d71c4d41e37eb42a4a00e1069"); FeedZipHtml(zip_buf, 56950, "1d9854edb9d307d4194b00951fe5dd819e034a08b74671d97f"); FeedZipHtml(zip_buf, 56975, "05fc4cab6f3904612bc509a521c31422856035e526ba9c1e26"); FeedZipHtml(zip_buf, 57000, "a229618e9f780e51afd1100909ad8e22ef1494a0613c0e7222"); FeedZipHtml(zip_buf, 57025, "81095267cf5bbc2009816f81c010ed1912b8d0ab4617452d0e"); FeedZipHtml(zip_buf, 57050, "92046549eca886f490a3381626ecfe1d034f1c8aceba576594"); FeedZipHtml(zip_buf, 57075, "394bcfe3fba3abe3b333d7251a5fd9809fd25dd57bda4b2fed"); FeedZipHtml(zip_buf, 57100, "2ca2fef4949c07cb8b9212707a2a421168e3712ae6c72b0952"); FeedZipHtml(zip_buf, 57125, "c9c242f1b0a90400184efbf3fe6bbf13b2094215b6a8906eaf"); FeedZipHtml(zip_buf, 57150, "6f03457c083fc018b1fd367713f2e567362262cb1a3272a211"); FeedZipHtml(zip_buf, 57175, "b1ed3da7ff2696e97075e0ff205fdbe79f7cbef8f1e2e3cf17"); FeedZipHtml(zip_buf, 57200, "aeb861c5d8e1565172256be2ca9aa6a77f0c41cee83e7b838f"); FeedZipHtml(zip_buf, 57225, "ec27f8afa0870260dbbb62d950ff89c55cfeeb4fc2a298b249"); FeedZipHtml(zip_buf, 57250, "658b7bab5ffd31c423de00ab3af7d3ec14e9cc6199748c5a2c"); FeedZipHtml(zip_buf, 57275, "d7172c9fe95cb264d3b361df0f5d461f9e346c97dd6226b177"); FeedZipHtml(zip_buf, 57300, "a0825bea584a465db900e1d1991e3032e616a09d9407e94888"); FeedZipHtml(zip_buf, 57325, "5c0144e201b2b772a8e9311cdb395ba00e52d20c339961398f"); FeedZipHtml(zip_buf, 57350, "ea4ea302af7d028d5817deccb1ac388a8a553f1616400f65d0"); FeedZipHtml(zip_buf, 57375, "5474a893fb3d7d0840f352ed7659ce611a2a7e77f577bbe637"); FeedZipHtml(zip_buf, 57400, "449ed55236f24f1ccac31e330d1564830ddb64f00d4e8044ff"); FeedZipHtml(zip_buf, 57425, "0a39a8d25384d3d0c418547e624f7822e4e129f0dc21163b1d"); FeedZipHtml(zip_buf, 57450, "4a46dc0c609b5e42ba5fa46381e0a55c2712c4d4666e2cf0f2"); FeedZipHtml(zip_buf, 57475, "953d8372f8e8223e42baddb3e690589f25c05a9c091206adbc"); FeedZipHtml(zip_buf, 57500, "280da11022e8ab2ac5c7c5ad11f042ea3791a7eb63703f429d"); FeedZipHtml(zip_buf, 57525, "e6659b0f9e1ff7e7f2426db477a78295d6b184f706212f888d"); FeedZipHtml(zip_buf, 57550, "4af496629d9667117b8c5b68ce26813b9ab787eab939693d28"); FeedZipHtml(zip_buf, 57575, "de25f18823f3ca002147b428b2a313f7f20e2b0191b7e71fdf"); FeedZipHtml(zip_buf, 57600, "96b2c5ba49543db51b55e6ab7a914640f73d1cefc59ddf0161"); FeedZipHtml(zip_buf, 57625, "24d4614bfa1561b90ad6f4c7e964e82bf4555d8411ba6f61bb"); FeedZipHtml(zip_buf, 57650, "b6e672c65329ce221a4ee6f89ea20bcbb12c67d4d61ecb44a0"); FeedZipHtml(zip_buf, 57675, "ab73155b1acb9a7312464c3111f31d25a41e2c967108ed98f8"); FeedZipHtml(zip_buf, 57700, "4585c457f0a31a37ffae92d2e488baa7b716c1aa26d93404cb"); FeedZipHtml(zip_buf, 57725, "a196378cfd9ef3cecd87758780cde20537fa4d2a2394b3943a"); FeedZipHtml(zip_buf, 57750, "8796d38918d092e86660abc25e2d4e9623f025dd81d5894f4a"); FeedZipHtml(zip_buf, 57775, "02d838044e46480dbb67600b545528cd4630da83697835451f"); FeedZipHtml(zip_buf, 57800, "8d0147b349250de074311929e5ae1c58e6a82a883592b625c4"); FeedZipHtml(zip_buf, 57825, "5c4981689b31b763b9580a4f890b888d81d5941397414eeed3"); FeedZipHtml(zip_buf, 57850, "51caa930c409b3b6e74cb39e41243221899170d351270652f5"); FeedZipHtml(zip_buf, 57875, "94514c5bbc2e843221b7340f60cd76995ca941cda6ba694b73"); FeedZipHtml(zip_buf, 57900, "87d48ce8883f3cd7be1b5c6b083a3579be6cedc9c2b23d6fdf"); FeedZipHtml(zip_buf, 57925, "7b3113f63ff2693d1a0e1b508239aa8a1266b93e1ff3eebb78"); FeedZipHtml(zip_buf, 57950, "25c37014e25b31c4fed218bb0e67fcc9e0add60daf9140ea25"); FeedZipHtml(zip_buf, 57975, "61d8f54f6845ab240e1ad1c2d7c31d188c1fd8166746e81721"); FeedZipHtml(zip_buf, 58000, "ac727ce69dbb9afe1e3dfd493c917dc197307bbe1cc522e77e"); FeedZipHtml(zip_buf, 58025, "1c5aa347334830fe884af6646cea55084d465785251e9ec363"); FeedZipHtml(zip_buf, 58050, "13f06a70f4d2bf072229c750febe282a178c38f1ef3d4b56dd"); FeedZipHtml(zip_buf, 58075, "50023e8ee32f41af123e6a48431015b0b17a024245d8b05bb5"); FeedZipHtml(zip_buf, 58100, "78fcbc2f7213631ce6c1c181f76f35e2a276e9a6b7dea51d3d"); FeedZipHtml(zip_buf, 58125, "f2e23dbf8f2912d4215eda234d7afa49c4295a5ec190427a0e"); FeedZipHtml(zip_buf, 58150, "69ffb663d9ef22eaa4ac98280f2e3fc92ffec68a46301cee23"); FeedZipHtml(zip_buf, 58175, "f15653ae7a665f8943918e701f76b57b560504a939387f02c3"); FeedZipHtml(zip_buf, 58200, "1113c39ed9f7512014c6e8c53efc25882e6cb2e5682e8db673"); FeedZipHtml(zip_buf, 58225, "2279d5cfe747f126b32e15c1c5067618be100ccf055ba8b809"); FeedZipHtml(zip_buf, 58250, "a1d5b7176456ca9380f64c1c536cc97599f4eb1ee8b4e53e56"); FeedZipHtml(zip_buf, 58275, "6b56fbcabbbfb41332d3fa2165c7743045d534b1cb48196595"); FeedZipHtml(zip_buf, 58300, "9f022a61813e11ec50ae693700d5a5683b57092639a8e5b9f3"); FeedZipHtml(zip_buf, 58325, "e9b00a5e3197e0b1a6085e9344af0024ae48b867f2f0a4f044"); FeedZipHtml(zip_buf, 58350, "87f7e93517ce76c553c0a74914fe310974d02ad338d9c072f3"); FeedZipHtml(zip_buf, 58375, "bb1280f1c0ae896556988f814e5825cc28ed2e4d80b9e945b5"); FeedZipHtml(zip_buf, 58400, "24f853da050133752cc79074ad6778cdd8dad8372d88365322"); FeedZipHtml(zip_buf, 58425, "6ba351aaca61e917aebe38c97f24f3e95e2ed1c9f644b988c0"); FeedZipHtml(zip_buf, 58450, "a4f9121c9dd50a546dcdd028fb3e70f92dacef4e6c9ed3d6eb"); FeedZipHtml(zip_buf, 58475, "84b8690016a5e24af0f7a03a1d3a2c419d5e1ca43a6c269ddb"); FeedZipHtml(zip_buf, 58500, "b4d614a82701a67256c295875482b609f513747b345705d41e"); FeedZipHtml(zip_buf, 58525, "8b7cde92e0f499da465f4b2e510a2c63dc0cac756638766ffd"); FeedZipHtml(zip_buf, 58550, "68a0628bd5b664f0bf1664b60fc6c0a4a48056036531b20cce"); FeedZipHtml(zip_buf, 58575, "8f7cad1c70b684c7cd077539a4cb758a622c4805dd3b158066"); FeedZipHtml(zip_buf, 58600, "33cca159cc36f1ea948b4a0cd8690c6bd01860bfb552b03966"); FeedZipHtml(zip_buf, 58625, "2621b8d4e06b7215cb69bda0f51c46e0652f59340c2f7bc5bc"); FeedZipHtml(zip_buf, 58650, "b178d9eb2d459191f4b2483dc6d7547801bf5d8e0aa309bd56"); FeedZipHtml(zip_buf, 58675, "83b9539c4474ccc3b070cc6dda27adc4a7625dd5110718069f"); FeedZipHtml(zip_buf, 58700, "a5560c32fe153060e223efa0ccb688eb5d6c819282c858a1a3"); FeedZipHtml(zip_buf, 58725, "88cf0b5651cad8bb088a2fe828266acea4a268c7ecea341404"); FeedZipHtml(zip_buf, 58750, "59b582a2472c4d3fb120b681a23382a08176921bb641cac9f6"); FeedZipHtml(zip_buf, 58775, "00b8cc63ec1a562e9c96bb8ceb1fbb1917984b6498718d7964"); FeedZipHtml(zip_buf, 58800, "841997985d289871814529889aff6e05aec37f61702efe0537"); FeedZipHtml(zip_buf, 58825, "859b114a08fd3ff87f5cffff7fbcbe7da13376121f45a16198"); FeedZipHtml(zip_buf, 58850, "052f6fd23f86201dd11fcef10f761a8eb76f54f2c010129197"); FeedZipHtml(zip_buf, 58875, "f302674cb04bc4ebdb976fec9f18e90d3f81c0453a10881647"); FeedZipHtml(zip_buf, 58900, "49f71616e866a466c1afe0b79978077bd9ed0fcf5e3c7ffebf"); FeedZipHtml(zip_buf, 58925, "9f791d0ad9837f59c947f03f01a6e580a234f67b18d9f8c3b3"); FeedZipHtml(zip_buf, 58950, "bf3d834d14f28182e7f8bfcfe4a47f8539cd9c9f06830be93e"); FeedZipHtml(zip_buf, 58975, "aff9ff107fb93c7f79234ec52904252a280ecf8797df096880"); FeedZipHtml(zip_buf, 59000, "0067025c0784871126ec1e88199c6b5f53339d9be34f9f675e"); FeedZipHtml(zip_buf, 59025, "de8c6c87df038ee90b996d13c77e98c48b00c330ec7471ae19"); FeedZipHtml(zip_buf, 59050, "979f24c345ad8edd53665afc37f8d52216ff13e6a1d27227a7"); FeedZipHtml(zip_buf, 59075, "efce8faea90eeade6c5b39ffedc3d182e030fc73e4cfb6f8a7"); FeedZipHtml(zip_buf, 59100, "8bf70b5a7b8c994fb32cfddf9f4e17b5f6efe360e0b5e244fe"); FeedZipHtml(zip_buf, 59125, "f73e8cebc433dec3f5d9bb770bda0fe88efdd9167f1fc40b5c"); FeedZipHtml(zip_buf, 59150, "7f10c4b36fe1e7d3b79f16b4fe7dd019cfc80c6efde4fc6a51"); FeedZipHtml(zip_buf, 59175, "ec00261ba6b36de0e3388816889198caf5fbf825b186ff068c"); FeedZipHtml(zip_buf, 59200, "7cf9fcf9f326bc41c80354d5d72b7f9c6512345784c45ce92e"); FeedZipHtml(zip_buf, 59225, "75cbc45c452eec259e6f1d62019b4ae841dce637fbd64f6fe8"); FeedZipHtml(zip_buf, 59250, "b437dc0dd4b8a382e4883fbbc6f63b529fc63ad50cab5c0297"); FeedZipHtml(zip_buf, 59275, "04d5c17f30dc59be8cd3cca7efe2925f782d9411f72ad1486f"); FeedZipHtml(zip_buf, 59300, "b017f431217ac63d8a67c46bfd198e0fd9b4005a76e67befa8"); FeedZipHtml(zip_buf, 59325, "20e8decaf70f809eef0837171f8d53c4936c5d07198bfc99e6"); FeedZipHtml(zip_buf, 59350, "2780477175dbc3f76ac6fd219f5add06fbfec35ffe7f7b57d7"); FeedZipHtml(zip_buf, 59375, "dcb6cdaceff32b38e7c6f28ced247ddb73324ddb19f9238e3a"); FeedZipHtml(zip_buf, 59400, "cec7d84ed3f626438bb4c496221592b2adf7d71fec2e00825f"); FeedZipHtml(zip_buf, 59425, "1265891225edf422b54481c0ee02789ec56277c10ebeebfef9"); FeedZipHtml(zip_buf, 59450, "63db671ac02eabf37fc74b4fb45ca7e1dce495d5a10c3a706c"); FeedZipHtml(zip_buf, 59475, "84797007e2e754c36b420936efbdc124b2d33b4bcdcd47c497"); FeedZipHtml(zip_buf, 59500, "30198db12e311dd7345cdac3171c2aa108ab0313e4d80fe3d8"); FeedZipHtml(zip_buf, 59525, "172cbe7d630378b4e0c8beba779fad0e0c69dabef1f8fe7243"); FeedZipHtml(zip_buf, 59550, "6aa79608c22dbc382390443ea2709fd55eb58931ae6e881b55"); FeedZipHtml(zip_buf, 59575, "634de06c78b530a22c7623cff6bdff42f480f7e4fa32c42cde"); FeedZipHtml(zip_buf, 59600, "6e982cafb0e28848b7e0bf1ceb3fb331e1707dcc86ac8fb7d3"); FeedZipHtml(zip_buf, 59625, "b1abbecfb86ce1d874323ab5032756df9738b80b773c354d02"); FeedZipHtml(zip_buf, 59650, "baa22e711b1217cd8a9fc96ec18fd2706fc8fc813e542f999e"); FeedZipHtml(zip_buf, 59675, "48a5960636a4c6a38332a40dfd2c3f9c919f4e8601e7f26a51"); FeedZipHtml(zip_buf, 59700, "1599195c15e33e73c29d2f411ce79222ce9e53e669a8947049"); FeedZipHtml(zip_buf, 59725, "6a29b26d43f424e69f679f432e2832d21264eea6d741b98a30"); FeedZipHtml(zip_buf, 59750, "c8e419f5020f12fac9541c74eafef7c5f5a734c4bad23f927c"); FeedZipHtml(zip_buf, 59775, "cec86f86452f40da47813b0a03af6fe9c6d5c1ed5a245663c0"); FeedZipHtml(zip_buf, 59800, "3759bb5af1b0d3d6db36ee8fe664983feaeab5c7749debdbe4"); FeedZipHtml(zip_buf, 59825, "d874db869c9e61cd5baeef44f77bba94effcd51867a6da1a9b"); FeedZipHtml(zip_buf, 59850, "7c697a2459ad05890b2c5a31ffa0b21c69fc0a0a7a64277d4a"); FeedZipHtml(zip_buf, 59875, "208c9d3c88ad747d3d5cabde487499f21faaf287baeb7e4a99"); FeedZipHtml(zip_buf, 59900, "82cbeeb9cb7bfc3517b99bd5eac4d8d9d316e7ec2b2596b2a6"); FeedZipHtml(zip_buf, 59925, "5e959c66cfd9ec02f771d10dcfc47fc9d05515ba21dccab446"); FeedZipHtml(zip_buf, 59950, "72abe682b9e015d00426f0d085a7f237d90c3bdd5e43ecc598"); FeedZipHtml(zip_buf, 59975, "65796cc344ad85221b828089ee46bf7530b0177f1adbc27c36"); FeedZipHtml(zip_buf, 60000, "299f706cf75b8890c592f14c035a66cea7c6926c7c4f171258"); FeedZipHtml(zip_buf, 60025, "dc3a96183cd49d82d76d7ce0f8fe8bef82ade7a1dbb7d7e5bb"); FeedZipHtml(zip_buf, 60050, "057df9c3e25306f8059694780c179837314e1c8af06ddfcc51"); FeedZipHtml(zip_buf, 60075, "b00c2e0a5274c9e9f473e805492a4ce7ce28979a09d23aa2eb"); FeedZipHtml(zip_buf, 60100, "d60fae4e3d5ff876acdb92a23ebec4d205fafb69648fa6ce37"); FeedZipHtml(zip_buf, 60125, "df7d48edb402301c7fd6e29d01303735926118fdf75be46a36"); FeedZipHtml(zip_buf, 60150, "4df8427f0d91d0c5af670cb1687fa23b905a3acddf46c3b4ce"); FeedZipHtml(zip_buf, 60175, "64bf73355c0a0396596033c3447081531821b0c229237b6c54"); FeedZipHtml(zip_buf, 60200, "d48b8d4c73d4b016c6cf2f30e01deb57a8296f655f5b1e1c8e"); FeedZipHtml(zip_buf, 60225, "d506c45389ae4d710085330e2456801070553930237c9d061d"); FeedZipHtml(zip_buf, 60250, "6bbce8e4eaba8404d62851b34ca6d32b2b9192b6e8c5901a55"); FeedZipHtml(zip_buf, 60275, "5f81c903acbc909321c5f9a50d940f10a2dac37f08cde98230"); FeedZipHtml(zip_buf, 60300, "f9c6c2c7007ba7468c01efc51562a17d9a560abdf62eb156ac"); FeedZipHtml(zip_buf, 60325, "c0c769fb6e02e5b777c8cb493a942333f61ce383c5fc9d4b62"); FeedZipHtml(zip_buf, 60350, "35f5deed7168c2524dbdfe38195d04b240c63c413ecff3822a"); FeedZipHtml(zip_buf, 60375, "871aa658184a317969969bf5c15027cea0832084694d5b82b1"); FeedZipHtml(zip_buf, 60400, "4ce73946ea78e594638444d4797ff1e7f1f5e5a94c91a5bd1e"); FeedZipHtml(zip_buf, 60425, "95b3d9c24eaf9d74aa4ee0db57e606694417840bdca7ebc11d"); FeedZipHtml(zip_buf, 60450, "b65c3df797723d541973def94011ec8ed4370ef3e4c52d5668"); FeedZipHtml(zip_buf, 60475, "820f8ae929c49fe265b12beb5c61167170e3dabef5f5e2d432"); FeedZipHtml(zip_buf, 60500, "0de60836710f979503b16cbf79f5e695dcca3548db6e23912d"); FeedZipHtml(zip_buf, 60525, "1698067d5cc935e4d7cdb08dd295bf657c63790c41fbedcb53"); FeedZipHtml(zip_buf, 60550, "aa0222f015d4258a771052a4833329cbe70c63c99fe12930ff"); FeedZipHtml(zip_buf, 60575, "51dd322d79262a6b7d8e2d9610acb97d9dfb9e8d1ffd167b38"); FeedZipHtml(zip_buf, 60600, "1f34c94218e2d7a92ee4afccb4dcfa1ead710d17d6a3eeed6d"); FeedZipHtml(zip_buf, 60625, "f7ecfdc5f9f1f9a9f588c54f30704853b6c2a27b1f4e02275b"); FeedZipHtml(zip_buf, 60650, "29a3bcd6fbec0a84b2ca272db646a53ee029aafe60eb5061de"); FeedZipHtml(zip_buf, 60675, "b6be7d0ccfedc446521c9f09c1240b58db227891b23ff7e10d"); FeedZipHtml(zip_buf, 60700, "001ae9b5448c35687c964965e151b3c24a6330d6292b1a8e14"); FeedZipHtml(zip_buf, 60725, "55c77deafb13c42619191e6e8d10cbcebfeb8a6fc9a3f039b2"); FeedZipHtml(zip_buf, 60750, "9843569a150b2ec8cfb4aa3a62c9a75f4faf13648ece5b2422"); FeedZipHtml(zip_buf, 60775, "e89721a00f5eb0e84eb8aa036ef16a6f3419c954178ab691c7"); FeedZipHtml(zip_buf, 60800, "ae4f877490c17bbdc25be7f1618936eca78d69c37e626d64b5"); FeedZipHtml(zip_buf, 60825, "d17d186c4a1b5dc2592f3fb876c02a31b142b42995c055b211"); FeedZipHtml(zip_buf, 60850, "26b2c43bf270459c1593e28fc439771f36af1bf1c6c0b123c7"); FeedZipHtml(zip_buf, 60875, "12bdf1a836286b496be9bdf8371c44f6a809453d3be8f6e3a5"); FeedZipHtml(zip_buf, 60900, "607a54be536654d22592b45e1d0f1206dd4d50a37a187ba1d5"); FeedZipHtml(zip_buf, 60925, "e55d5124855b28c9b77beea75b59cdad86e3a9aee7094ff73d"); FeedZipHtml(zip_buf, 60950, "e7aae2701f9f49c46b3f394ef974812f2f1edc6071c25ac30f"); FeedZipHtml(zip_buf, 60975, "4403660f509b3c40a093de484527accc050a76d43b6f74cded"); FeedZipHtml(zip_buf, 61000, "3c7831dc19122bef83e73e1e9651d68cc535b072a2a98e60e3"); FeedZipHtml(zip_buf, 61025, "4ec2683ad768c9bc0cdbba73335d588d75952de730cdf4fd94"); FeedZipHtml(zip_buf, 61050, "d8f2edfebf9833550c4cb5658d876182b11e623bd2d1228444"); FeedZipHtml(zip_buf, 61075, "3ade897b629d776fbb97d7bdf34321655592f73212fb42df96"); FeedZipHtml(zip_buf, 61100, "890d8d9fa843a758a8002f89a95ebe7827fa22e332403fb14a"); FeedZipHtml(zip_buf, 61125, "76f3e1cbd56defb4fbf19cb2afd778479ac19db6aa3bdc4403"); FeedZipHtml(zip_buf, 61150, "7f9a39f62af460de9488bcb1efc2b6b7f6c991852cd7ae33ff"); FeedZipHtml(zip_buf, 61175, "a1cbc84d97ebeac74e9f1f1fbe6f22a1a706754f905962f324"); FeedZipHtml(zip_buf, 61200, "46fd4d8377795bd8c4b690a2aaac6d506f8ef2df4993507d0d"); FeedZipHtml(zip_buf, 61225, "9cfc03640cb9b150921a1399d9d19d27741f7998a076340e65"); FeedZipHtml(zip_buf, 61250, "ff219001b4162736617f1d65490ee8427e1b05e0d41de3d5b1"); FeedZipHtml(zip_buf, 61275, "96cc14be35cb01cb212bcb2e01a1ab8fe048cbdd8be60f90c0"); FeedZipHtml(zip_buf, 61300, "dcdf1f58b803438d1bc80994b887a65a65d5e25cb733336e91"); FeedZipHtml(zip_buf, 61325, "aedb907d59de12974e08b34f1a9e123a2d871d902e698a19d3"); FeedZipHtml(zip_buf, 61350, "9566c42f4dde47160b9bb54cbd3e0713006810920368306f03"); FeedZipHtml(zip_buf, 61375, "ff1006610b565e802dcfdf725b3e88956c92db3d46ded65aba"); FeedZipHtml(zip_buf, 61400, "ad913ee7780caaf6a5946cf0eeb4b3bb53eb48f186f7d0c53d"); FeedZipHtml(zip_buf, 61425, "b5da9d8651822e7547ac0de2a311aab46937edaa5db394f483"); FeedZipHtml(zip_buf, 61450, "e47766ded8e9d4dd6e1ace1022b7bd11ce0321edaa76607f85"); FeedZipHtml(zip_buf, 61475, "a0592fa9ded46067fc0ae2297de2857ce2bdeb0d86a5db1a36"); FeedZipHtml(zip_buf, 61500, "02f768cabf7ca1c67aedc6a18f471ff8209d88cd097f647d34"); FeedZipHtml(zip_buf, 61525, "a20fb82ef7b95a27f4105c9a9bf1102b6e4b15873d09d2d8ce"); FeedZipHtml(zip_buf, 61550, "3ac73bacd99dd02cc91df04b926ba1acc323d186933e572de5"); FeedZipHtml(zip_buf, 61575, "98b6fccf76329cfbd087f39fe63da2f7e74a0a3527589e6d93"); FeedZipHtml(zip_buf, 61600, "6d73fdb6898f79f1b7ef1381d455f591f906fc22e707b093c4"); FeedZipHtml(zip_buf, 61625, "1d8d315f1ad51c9637d0f2b79721b3ab97b94b4855bf02624a"); FeedZipHtml(zip_buf, 61650, "e7a7c7f742eff34f995fde7c393bbbb8b9293b6d7ef9aedbbb"); FeedZipHtml(zip_buf, 61675, "fa725debd47916b99a8613ac5f3691bc5ab240e0969971e6c7"); FeedZipHtml(zip_buf, 61700, "08197b3cacb0255d1b626c763098f8764a7129c6fda4c08c85"); FeedZipHtml(zip_buf, 61725, "7422f90adbf7c34724d482392aef81bc6a2ede2a83e5913ebe"); FeedZipHtml(zip_buf, 61750, "2d7a217c1b82192ad8684ad867a722729fec3ebc3573d15f8d"); FeedZipHtml(zip_buf, 61775, "f32056690042c7f58b43b90f27916035d56381fc7a24a1cf21"); FeedZipHtml(zip_buf, 61800, "7c26f8dea7b19c17524c1de96170bc186c137d1592a21e9e58"); FeedZipHtml(zip_buf, 61825, "17767fa82ef1d32ff3ae081bcc165c602a61e81d664950a41b"); FeedZipHtml(zip_buf, 61850, "cde557ddf84b0b4ceb5737c03f0f4b86e4dd8b11015fbcf7c0"); FeedZipHtml(zip_buf, 61875, "0f30636c09d886caf96b046ee0da684e3561a250304d8d344d"); FeedZipHtml(zip_buf, 61900, "3aa86bf96406fd6296e7f8c64dd4bb7ac17d182fb67da43502"); FeedZipHtml(zip_buf, 61925, "4bbeb4ef624c2551ed299db3bd6da66fcb2f6fbd40cc8b24c6"); FeedZipHtml(zip_buf, 61950, "da1d13ac1c151fa25675a5c40770928811812b24ec7bb69c64"); FeedZipHtml(zip_buf, 61975, "b6e95153192f8ce17ed3651e73792902aa9e67fa288cf41619"); FeedZipHtml(zip_buf, 62000, "61c843ad8c0074245f452fc91b25ec2c9733437bb7f4aa5126"); FeedZipHtml(zip_buf, 62025, "ba4eceab253d34ca9b9560f63bc7150be2c80bdcb86c0ae806"); FeedZipHtml(zip_buf, 62050, "a5edbf8587c2919760abe6c3e81cc2d1440fb4acd9be58751d"); FeedZipHtml(zip_buf, 62075, "9c0f5810122772261506797e28731a05a942288678ad54ef11"); FeedZipHtml(zip_buf, 62100, "6552b7d5d7b4148861bc466f1aac00564756d792197fe1739c"); FeedZipHtml(zip_buf, 62125, "8d5647569e155bcbf1eb5ab792dd78de45f22ce23b0bc7d348"); FeedZipHtml(zip_buf, 62150, "a39edaf3a39ff9d933e767e33dc107c412e98a3955aba3f3e6"); FeedZipHtml(zip_buf, 62175, "a1ee23ce842b6a79cdb3313b609d502796a6ac3a380c7dc78d"); FeedZipHtml(zip_buf, 62200, "d0d6cd230433ab0299a2b22a65f74e9d796a0a15079016530b"); FeedZipHtml(zip_buf, 62225, "039a3a0817a48862f13d95a93553cdc0a19578e89b6c8c9668"); FeedZipHtml(zip_buf, 62250, "f47fa22fdd3d199c807ecece5e59af4fb0560c022cf8c43afd"); FeedZipHtml(zip_buf, 62275, "cbfa913edbe2d9781e85e385a957bde9f5aca6d3f339bb5f45"); FeedZipHtml(zip_buf, 62300, "2ce686b52a68ee84784a04354c31d7d048bcbb04bd76bc40dd"); FeedZipHtml(zip_buf, 62325, "c7b4117dfb14dc4f4c223eb23e53846e8c530eddf487e9d952"); FeedZipHtml(zip_buf, 62350, "eb41bddc8ff2273a7a2ed5dadf28ff934efb6407744a020dc1"); FeedZipHtml(zip_buf, 62375, "71c36daab134ad747a02381482f3e704f151dd5a29f405bd00"); FeedZipHtml(zip_buf, 62400, "f4a399b1abf38cb5a1b7afd19ed5818e69ce82460017c3a7c9"); FeedZipHtml(zip_buf, 62425, "aaa52d835528d044e79aa9e16fab8513936c8f812f7e40a794"); FeedZipHtml(zip_buf, 62450, "b3ce33b9555f9d30d3c1d07004bf5ed1d6f2fc76975d279a7c"); FeedZipHtml(zip_buf, 62475, "333e21f6f8be7bedde4d3cbf34f6b3e5dd5bf53ad71118075f"); FeedZipHtml(zip_buf, 62500, "26fd2572713bbe13335fc73feaf9828931e3762c4629d686b0"); FeedZipHtml(zip_buf, 62525, "1ce5aca15118729623f08cb49147943611430330cb7a6674e9"); FeedZipHtml(zip_buf, 62550, "527ee7fa613090f146c9d04ef4d2af5626b14ec702969b0520"); FeedZipHtml(zip_buf, 62575, "32105cf743c5b3e0522630f2380a01772ac7d7a380f06e1909"); FeedZipHtml(zip_buf, 62600, "902b6e293017e3cc5a8bf26cd55986218e43315ecd42328230"); FeedZipHtml(zip_buf, 62625, "96df91eb00db4127619c44e114176e87c418d1eb4f20bfa5d0"); FeedZipHtml(zip_buf, 62650, "ce116e71e54da6a5307cf73eb126821d4cfa43d918aac30888"); FeedZipHtml(zip_buf, 62675, "1a79249fdc2fe165495142e894dcf0969472931cfc2a5daa21"); FeedZipHtml(zip_buf, 62700, "becf079f75bfa945fb196fa0ecb05e043ac08b7275f31e6da4"); FeedZipHtml(zip_buf, 62725, "1fcd2d8639b34defd2e4c642d142ad590e1591cfae27694e58"); FeedZipHtml(zip_buf, 62750, "5a84e4e2030b2142d22033ef045ad5b377d69e40bd155f9b22"); FeedZipHtml(zip_buf, 62775, "c9ed17eac5e9b2e1897517e014d5142061d3798efa0dc2e1b8"); FeedZipHtml(zip_buf, 62800, "1fc1c140ce3f5149ada823397b517173da89de1f862a90718c"); FeedZipHtml(zip_buf, 62825, "4e0ce9a27023214c81f0ef85158951ddb9c9a30b6975450393"); FeedZipHtml(zip_buf, 62850, "dfc6c3690c418020653428748ce257f27df08d452f3db1ba18"); FeedZipHtml(zip_buf, 62875, "6a8620121d0e14f3afcc010df607437cff81ff3fb16ed19d4a"); FeedZipHtml(zip_buf, 62900, "f171b19ba0ecc9a3ff1ffa19ba32309768488dbb4ff01e79cf"); FeedZipHtml(zip_buf, 62925, "0becf2d3c74f67efaf3f7db8b05e1f9ff66ef11dca0004b516"); FeedZipHtml(zip_buf, 62950, "7297e572c16c945e54bf4e485a6d5e53c1e87b2300f0b6e8c3"); FeedZipHtml(zip_buf, 62975, "c730f1fad2f26d2bb5c09476c578f681790b138f303d1eb04c"); FeedZipHtml(zip_buf, 63000, "d369612657c69319b51d17cf53c9aae12c695a20d7196edd14"); FeedZipHtml(zip_buf, 63025, "147f56cb2b02e30dbd7bd5abb75c6418acce05ab58981b5b4c"); FeedZipHtml(zip_buf, 63050, "43b5ef697cb9b53e5dcb71413d6c16e6b66ac1798e8b81ec0b"); FeedZipHtml(zip_buf, 63075, "861b275338f7fd608fb7302b43eec6903dc6fb27692d837411"); FeedZipHtml(zip_buf, 63100, "58c54d943bc830203e390d7533baa2818bd98fd5938f95613d"); FeedZipHtml(zip_buf, 63125, "f0edb032a4a7e6859bad1fa70c191296377bab6141c898a9d1"); FeedZipHtml(zip_buf, 63150, "9c2cf82ca879825acd5537966303d7e958d6cdc91a9f991189"); FeedZipHtml(zip_buf, 63175, "caba688f2ef0fb48007200917594353ffed4f1061ea4882d49"); FeedZipHtml(zip_buf, 63200, "70665b371afaa97ba869859d7bb3f04e95f3485f791540ce0b"); FeedZipHtml(zip_buf, 63225, "14784e9b555ce419f7556b92941d4e32952fe624c698992629"); FeedZipHtml(zip_buf, 63250, "05cb96bf3423df70205403cba5bcd35905bda500dffc15dfb1"); FeedZipHtml(zip_buf, 63275, "e80439dee5f5daa9f5af4799edd48c3c527e75c16ea853e27f"); FeedZipHtml(zip_buf, 63300, "9e2cfb5fdbfa707a5d51dc49c7c4950fcf989e727015423e90"); FeedZipHtml(zip_buf, 63325, "2ea803923489387fef1adad51740b1e91c89b475096cba394a"); FeedZipHtml(zip_buf, 63350, "9e2ae3a2a52c302aa92285348b4684007498ab6c988cc31e03"); FeedZipHtml(zip_buf, 63375, "9984a0d992c19586e217f27294c6e22b6108aa48d691d30dfa"); FeedZipHtml(zip_buf, 63400, "ef8ec4fc08acc0051a4bf7a1ab22968131439954d93ecc3f88"); FeedZipHtml(zip_buf, 63425, "8f92c6917e118b161cf1ae07dbf39111ca4bd25949e7687ea7"); FeedZipHtml(zip_buf, 63450, "60f6da04a0696107f0236d1e2431bc0d3c161c7c1cc1f18d29"); FeedZipHtml(zip_buf, 63475, "40315221fd8ca1819de5ac3e13a42d354f8325b1ca5da3206e"); FeedZipHtml(zip_buf, 63500, "b55fc82f1cb1fc07310edd4ec837918a432d481764268fe0ec"); FeedZipHtml(zip_buf, 63525, "9875e4952ee486b384229bc19993c6ab438c4544b2728d686e"); FeedZipHtml(zip_buf, 63550, "fb09ad5a4e00b8503e86352ca0d80dbc985c2b2c4e7425ddd6"); FeedZipHtml(zip_buf, 63575, "f2f34a2a1ee6144aece5d8b93fd00e60f9d93f637750f830f1"); FeedZipHtml(zip_buf, 63600, "eee949b9c61fa02efb7843fae5d3b16ae7ad95bdd5ad5e130c"); FeedZipHtml(zip_buf, 63625, "ca6ad66dc7a5f8595d6ec18578b31a2f1a9d5ef52681f77d02"); FeedZipHtml(zip_buf, 63650, "a7a36226eba414714d23d2c0459dde4a4147501e29eddf313a"); FeedZipHtml(zip_buf, 63675, "2d5fbdca2a5f7cf6063f02ff9735126314462e844aee42adb2"); FeedZipHtml(zip_buf, 63700, "18adf1f7cf17f9be91631df04e1de7cf1f2e9c8f6c1b445d1c"); FeedZipHtml(zip_buf, 63725, "8a6fe7381b70feeca82056effcd95341addcf9c3725c9ff387"); FeedZipHtml(zip_buf, 63750, "65dd1ee70feb627f9c3fa46b76feb0f3879d3fecfc61e70f3b"); FeedZipHtml(zip_buf, 63775, "7fd8f9c3ce9f36387f6a06397923758d8a32ab5a70b397d00e"); FeedZipHtml(zip_buf, 63800, "ec891872051fc5e124eabbdb1dfe7415da4efe64b656e0238e"); FeedZipHtml(zip_buf, 63825, "1d92ec54f3e23937251b79b5c4fbc9f06b18f9ce3baf6ed68a"); FeedZipHtml(zip_buf, 63850, "967530bd2a5595a8690786804f8cb391b7fb38ca95c6091b44"); FeedZipHtml(zip_buf, 63875, "4e209671389ef8694aa9346216534919dced6e6a2c7b98b841"); FeedZipHtml(zip_buf, 63900, "2e747039978265cdd59024677524fe83c5f7c8baedbd7b7704"); FeedZipHtml(zip_buf, 63925, "60ff566cf3b0c3776fce7a3deb3212480f63585b18aa3c6bf3"); FeedZipHtml(zip_buf, 63950, "ca297f91db6759d826439ced1c0ad66d57714654a182bd9398"); FeedZipHtml(zip_buf, 63975, "be1c842edced80f414b493825216bc5147b69a21839299b809"); FeedZipHtml(zip_buf, 64000, "7416828b05c9ce26d59024b34818a1b5cc5d03f8b064a79ca5"); FeedZipHtml(zip_buf, 64025, "14fa3906160355d2bd947d107db4ef1054d385756455929109"); FeedZipHtml(zip_buf, 64050, "5a93da1f8accb03b30df23d1fbbe0da9c810388081c2930506"); FeedZipHtml(zip_buf, 64075, "ab1284610fe0e5f5a56aceefe5ed24c8c5f8a741f0c6156f33"); FeedZipHtml(zip_buf, 64100, "fb493e12debcd188f709df5aa1783e7af4e24280bdfecd2008"); FeedZipHtml(zip_buf, 64125, "a30c3b6863d07a39cc32b095239079115b29d4b3708e6df137"); FeedZipHtml(zip_buf, 64150, "65d8d6845673383778f0a2301851fa194142efe8c6c3cde7ee"); FeedZipHtml(zip_buf, 64175, "6daf7bd5bbbdf8767371f6e5ba77fbd7af9011e149de37209d"); FeedZipHtml(zip_buf, 64200, "9fa4c054e1d2427eb2529c16833ff5dc5b70ab1316346b9f43"); FeedZipHtml(zip_buf, 64225, "5f4f6cec3d4ba0b9b577b019ccd7d261ac1e196eed401bc08f"); FeedZipHtml(zip_buf, 64250, "3b2c8b55a34c828b96f214cf058bf1a26851622085550d4c4a"); FeedZipHtml(zip_buf, 64275, "db6118e99aa1505410dd600636bd736197a45ec2d693035f85"); FeedZipHtml(zip_buf, 64300, "cb63089a9d0c6aae51b273bd80352929c16258d71cd7917988"); FeedZipHtml(zip_buf, 64325, "21de0360102a51d823426b4623139d8c6daaa0c63d1695a0ad"); FeedZipHtml(zip_buf, 64350, "5e0bb54379cdee7e3b118f6a67dfc93fe381e1e43bb163bc4b"); FeedZipHtml(zip_buf, 64375, "7e581f4e31f266e4cdc89b9177bb90376083af1f6e16f43191"); FeedZipHtml(zip_buf, 64400, "81cc7a6480b1125f22bfea8105221d46f11f02c5ccc21aa3f8"); FeedZipHtml(zip_buf, 64425, "ca9ebad1ac0ea967f0cc77c64314de114623bb3263a978aa2c"); FeedZipHtml(zip_buf, 64450, "47bc7892d2c43f0ba5b1229ea588f71559fdb3ca30ba5f9ade"); FeedZipHtml(zip_buf, 64475, "7f11d5b1e6daab397c3a1cdbdf679686e639b9739a25c93fda"); FeedZipHtml(zip_buf, 64500, "e33fff62c5b3e2732e84287c9a96749bad82ada2a2db0bfb94"); FeedZipHtml(zip_buf, 64525, "6a14c079f6d1652162c3f41b09832c21c56d72ee10a795467e"); FeedZipHtml(zip_buf, 64550, "7d95f31454046c82c3ed583cad0314a1fe9383a3a5306ca4ed"); FeedZipHtml(zip_buf, 64575, "6e9ce4a3767e5969802829a85dd1a1e61ccf96bacfceedf2ef"); FeedZipHtml(zip_buf, 64600, "e49c2e7c9999cb85f84035d572deb842ad5f64b2df279e3016"); FeedZipHtml(zip_buf, 64625, "10a3ebbbf498f6b198a9049d69608fe49855c162d0c16c25eb"); FeedZipHtml(zip_buf, 64650, "445cc5c752d61fc713e9d041172a184fda07e953d2cacdc754"); FeedZipHtml(zip_buf, 64675, "0afde1af842ebd07cf8122d5d8c03c6da549c19535c9571cc4"); FeedZipHtml(zip_buf, 64700, "99f6954968d997ae90051d542d8e799dd40c6353cb633e1252"); FeedZipHtml(zip_buf, 64725, "45ce4ed17395782337ce684dac04a217b2980c05b58126ec27"); FeedZipHtml(zip_buf, 64750, "a8cf0b0fd57cbf5c7febbc1e9d2476dfcc4a06b18c28ee3b77"); FeedZipHtml(zip_buf, 64775, "0873ce863ad4eea310bad043e0268f61f42f3b9f5ae27caa19"); FeedZipHtml(zip_buf, 64800, "a328b4a077bcc7ccae8791cdc6794c6c75d21b1a9107953c9c"); FeedZipHtml(zip_buf, 64825, "c3ad8e59fc1a79892b0f8e5280b98a2b4520afd9e1604b5c24"); FeedZipHtml(zip_buf, 64850, "aa8f4ccbaa273fc763b6f382aaaa53590280abaa55b25cd721"); FeedZipHtml(zip_buf, 64875, "57e3987bd9080d167e23c2272a27647a9656a97db61f8075b4"); FeedZipHtml(zip_buf, 64900, "491de9c7a0fece4dfdc8984a564e60a38034f2f73f3d288666"); FeedZipHtml(zip_buf, 64925, "f26d75dedb9e023f7c0974298e4f86209e979a6d17d95ffeb6"); FeedZipHtml(zip_buf, 64950, "2496ff2bde0b5cd33dc8cc0d46a740b52b3a8733ec9715de58"); FeedZipHtml(zip_buf, 64975, "5c2e48271b57a1c22a84229f3cdf034b48636f9492b555d931"); FeedZipHtml(zip_buf, 65000, "92b29aa4b8b010ceb8a7f8f1d3c70be336e2f9c5bbabeeadf9"); FeedZipHtml(zip_buf, 65025, "c9d5df5f8dbf20aac5f8f35df7cfff64ae2d8a0f7e2cbfa9a8"); FeedZipHtml(zip_buf, 65050, "5f941b44059b86ebb92ac2280ef38b4c5ac401958c8e9558ac"); FeedZipHtml(zip_buf, 65075, "e75687729b7f9f40d04c82240fc367d4a5bdc37cbf7ef8e97f"); FeedZipHtml(zip_buf, 65100, "cd4eed3aa59e11ce81d00470c9edbbaf3b094d564a1e775950"); FeedZipHtml(zip_buf, 65125, "9b248f2cd745b1f14aa9098b7ff5e26f0debb0c6be2de0b366"); FeedZipHtml(zip_buf, 65150, "1ec65df6bb6905166176b24bec84a9c9ae5313e605cc0b1ae2"); FeedZipHtml(zip_buf, 65175, "053b090a564e0a76524a9b66042cd4cdd10196fd3e7001c6f9"); FeedZipHtml(zip_buf, 65200, "8cf319e733ce679cbfdf383ff2c6be7b2acc730b831444af7b"); FeedZipHtml(zip_buf, 65225, "623378ba965298f9d065e4baa561f9d9c74efd199703364533"); FeedZipHtml(zip_buf, 65250, "5849f594b47154c84add41a5ae3a648f35bf539a6f8085b381"); FeedZipHtml(zip_buf, 65275, "eca181acd9559026ea17501e927bd78b5ed4854dc52faa0a5b"); FeedZipHtml(zip_buf, 65300, "b01f616d7e84cc6ccb5ecfcb4fb20213cd4dafc22d3d2052a6"); FeedZipHtml(zip_buf, 65325, "9c9403c1336ede295340fb88139b6ee2e82b6db086c5d96367"); FeedZipHtml(zip_buf, 65350, "539e272fe41a5896871d536d45822c4223aa8c44eee620e4f5"); FeedZipHtml(zip_buf, 65375, "7f82e1fc7d71fd09bacf219fec6f5989bf85433ed9e5b3eb2e"); FeedZipHtml(zip_buf, 65400, "9f2d0cfeda3f970f2ba9dd148095ba834a6d92d3b3ee7742f7"); FeedZipHtml(zip_buf, 65425, "eda5ebf9a8df1c63e7286066f5ccea398462ef283df369e6d3"); FeedZipHtml(zip_buf, 65450, "8df36986756d27d3aca196026fd6e8ae69b4691acd8adf6ec5"); FeedZipHtml(zip_buf, 65475, "6f2d87667eccfc98f931f363e6c7cc8f991fcfe6c71fc220dc"); FeedZipHtml(zip_buf, 65500, "f258c6cbc89e563fb51952bbc362dd387c6535b4420db5a26b"); FeedZipHtml(zip_buf, 65525, "5957dba3abd5fb0358a5dba1d2f632fdb2e07650492c3888cb"); FeedZipHtml(zip_buf, 65550, "64bf3d649fe6c99c8156b1f554a3fbc4d939527d0f683b47aa"); FeedZipHtml(zip_buf, 65575, "b3e760b73d075b1c31d966cfc10e8a75e39899d5d00a353447"); FeedZipHtml(zip_buf, 65600, "34595b7c5a5cf7b4384b2339ee9aa9e6ee524de699bbce3399"); FeedZipHtml(zip_buf, 65625, "e431c96b98e4ed12aa6a0bc3db25996e1ca9b20e36af8366b9"); FeedZipHtml(zip_buf, 65650, "1dab8a89dd82c48e491b9336266d4cda98b43169db13d2d68d"); FeedZipHtml(zip_buf, 65675, "fb9e771979ce36c1a5cd70b17d17153ee6c5b85c9f09031580"); FeedZipHtml(zip_buf, 65700, "a2f4021c8b74e5223d02a93962391cd9feb937f092b859607d"); FeedZipHtml(zip_buf, 65725, "debded5e5ef7ce6700eaeecd59af6781eeb80acde6a1f38ae1"); FeedZipHtml(zip_buf, 65750, "64aadc7681cac28c9263dd30567c2b7edf4fec6030f1edc8c2"); FeedZipHtml(zip_buf, 65775, "4e220c090e922cd148e5fa4c7c69ccbab5a3ccc23a25dbeee4"); FeedZipHtml(zip_buf, 65800, "a68214e969188ae91920b13e4c152be6dc7d7e28680b6279f3"); FeedZipHtml(zip_buf, 65825, "01ba89973df97e1fdf620e6a9af9d00bc4a2653b12d5c20fc2"); FeedZipHtml(zip_buf, 65850, "2828fe20549f750c1408abd1e1b2a874183e0abd0460b2b82c"); FeedZipHtml(zip_buf, 65875, "0b11c3ba6c0ded07570a424f275c3cb363cec3d21f494d99b6"); FeedZipHtml(zip_buf, 65900, "f611a39682d4dfc7eee0f7cbad0ad5581b44dd17396df20480"); FeedZipHtml(zip_buf, 65925, "e5baa8ab58f071df4b4a7dd9ab43a997d7ddbf6eceba5717d6"); FeedZipHtml(zip_buf, 65950, "97dec7db37ca094c7f54235770697015f5bdc4b5a0fa7621da"); FeedZipHtml(zip_buf, 65975, "fd7493e2146c0cc02ee961343aa7973105753d824091c0fa6e"); FeedZipHtml(zip_buf, 66000, "3ad98f714978857f141c8e6f5eb1bf31bb95eee43eba6a1cb7"); FeedZipHtml(zip_buf, 66025, "9342da348863a1ee16826374c6e88cd119a3334667cf4067ea"); FeedZipHtml(zip_buf, 66050, "33b9b00de53f3ffc66762f96d3136c2bbf88e3f22e97e47b3c"); FeedZipHtml(zip_buf, 66075, "7aefdcb87d69c41ef86a9dc35f5e8a06ad72998691e30a91be"); FeedZipHtml(zip_buf, 66100, "ce8af7fede2d11af049343e351f715fcf73faad19f449bbfdd"); FeedZipHtml(zip_buf, 66125, "4c83c416ab5132acf3f06434b2612785a72b11ab1c52237949"); FeedZipHtml(zip_buf, 66150, "626abb775e09035a8231567a90ce12dd3014660534069b5798"); FeedZipHtml(zip_buf, 66175, "e48ab5b4312dad3e329d95d97665ae3976bd5e1eabb7840d31"); FeedZipHtml(zip_buf, 66200, "b4141196e341a80172333f0c0600cbe4d972ecfa44bb140653"); FeedZipHtml(zip_buf, 66225, "8ca72f509ce7c0913dd3e55da2cb9c13aa358c99734271e439"); FeedZipHtml(zip_buf, 66250, "479e2f761224b7a946d2b06c0d226a8257efb7445bc0ab5901"); FeedZipHtml(zip_buf, 66275, "2dbf26cc7adaa09e5ac3b30a77826b8483311f633ec67770f7"); FeedZipHtml(zip_buf, 66300, "958c31136226d42c13da532cd2140dda5371b68403b1f4b780"); FeedZipHtml(zip_buf, 66325, "00b19298fdf04913331b6636cc6c98d930b36984d9e85aef3b"); FeedZipHtml(zip_buf, 66350, "19ffb2ce82f06d2056accd556973e3a895b5bfcfdaaf153ec7"); FeedZipHtml(zip_buf, 66375, "26c226b2a97059b624b6a4167851962c420bbf802c58ec62d9"); FeedZipHtml(zip_buf, 66400, "21174b66eed2388ff2dfc9295b20e9b9c99a9312714c534e55"); FeedZipHtml(zip_buf, 66425, "b9aec1b0f629cb35473cef812b8a239ed91bb627deb09d0c40"); FeedZipHtml(zip_buf, 66450, "dc5b6f186b73db290a6b7f9fb5bf062f061bc99e18497b1d14"); FeedZipHtml(zip_buf, 66475, "1585b0948f8283e0d98fc17e0c8ea76127c6524e0cf620b007"); FeedZipHtml(zip_buf, 66500, "615d1e0446933be33e60556e2d3160d5efadead7e438600bd9"); FeedZipHtml(zip_buf, 66525, "750bd95aaf017b04d823c01e01f608b047803d02ec11d88047"); FeedZipHtml(zip_buf, 66550, "e04318843b1f267b19d9a5f5485a40e3f75afe1b87d7acafed"); FeedZipHtml(zip_buf, 66575, "d2971ce3aaef9db0525bafd4c65c25acfb5dd17d7b9d206577"); FeedZipHtml(zip_buf, 66600, "3b4025b120542efb4176d50f42b36ece40ab1c19a97dec933b"); FeedZipHtml(zip_buf, 66625, "832f6aec8147832f6ab053652f9c2a3b1db5bb054e95bd94ff"); FeedZipHtml(zip_buf, 66650, "c6313deb6bbbf4d538b566b5b658aded65cd15a10359e2ccd7"); FeedZipHtml(zip_buf, 66675, "0e985c33b9e6580166d64c6b99d6ae8fd6ae16cc31636d4cb4"); FeedZipHtml(zip_buf, 66700, "8c935959bba3acb57055d6691b75bae544954928935026a14c"); FeedZipHtml(zip_buf, 66725, "42998432096512fa7c12da8dfb9e771979ce1a51da3a60da46"); FeedZipHtml(zip_buf, 66750, "e9270bb51e4af562dc02ce84d1030aab894059f8eb12fe11c8"); FeedZipHtml(zip_buf, 66775, "d7118bf1c8f6cfbd8197c4cd9284f3ee6df7f2ba773e831c74"); FeedZipHtml(zip_buf, 66800, "6fce7a3d0bd4cbd5d2768d06ac181aa7a6d22e805c989f72ac"); FeedZipHtml(zip_buf, 66825, "1bc6bd6f2d9839763098f87664612711520507499634a5727d"); FeedZipHtml(zip_buf, 66850, "265636e6f0da117361d5936d777253418af4340cc5f40cd0e5"); FeedZipHtml(zip_buf, 66875, "70982a56ccb9fbfc50d016c462e9030c152f7bf2fd3ebec51c"); FeedZipHtml(zip_buf, 66900, "d434f3a1178825d0762442871f845150fc41a83eeb18881656"); FeedZipHtml(zip_buf, 66925, "a3c36511f6307c147a09c064719117228655de1ada0fae1484"); FeedZipHtml(zip_buf, 66950, "9e4eb81467c79c87d83f929a326ded23de9e05b87f1fbb83df"); FeedZipHtml(zip_buf, 66975, "2fd719bdb365e06436e26389b6f0048735d0800bffbb00295e"); FeedZipHtml(zip_buf, 67000, "527ac6b03ac47d79ddfdebe6ac7b75617de97dbc7da39cf3f4"); FeedZipHtml(zip_buf, 67025, "47350a07e71039e7395e8c31fa12181d0ca95de87c3fddd738"); FeedZipHtml(zip_buf, 67050, "a11b03e34b7a7e8dcee94551c1768fe05c24788b9b4ef6635c"); FeedZipHtml(zip_buf, 67075, "125ee11f0547f09b57ec072eddc2f775ff6e0893eeab385b02"); FeedZipHtml(zip_buf, 67100, "4859fc7b8746196932d264a4c9489391e6c691a6fcec450627"); FeedZipHtml(zip_buf, 67125, "0d69957b79173a53f1f830190989fc3fb7a47b9d"); // uncompressing the ZIP payload in = zip_buf; html = (char *) malloc(uncompressed_len + 1); if (html == NULL) goto error; out = (Bytef *) html; if (uncompress(out, &outLen, in, inLen) != Z_OK) goto error; *(html + uncompressed_len) = '\0'; free(zip_buf); html_text = wxString::FromUTF8(html); free(html); return; error: if (zip_buf != NULL) free(zip_buf); if (html != NULL) free(html); html_text = wxT ("<html><body><h1>Sorry, HTML Help is currently unavailable.</h1></body></html>"); } |
Changes to LayerTree.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ... 116 117 118 119 120 121 122 123 124 125 126 127 128 129 ... 157 158 159 160 161 162 163 164 165 166 167 168 169 170 ... 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 ... 411 412 413 414 415 416 417 418 419 420 421 422 423 424 ... 458 459 460 461 462 463 464 465 466 467 468 469 470 471 ... 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 ... 765 766 767 768 769 770 771 772 773 774 775 776 777 778 ... 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 ... 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 ... 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 .... 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 .... 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 .... 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 .... 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 .... 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 .... 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 .... 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 .... 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 .... 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 .... 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 .... 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 .... 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 .... 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 .... 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 .... 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 .... 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 .... 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 .... 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 .... 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 .... 2298 2299 2300 2301 2302 2303 2304 |
/* / LayerTree.cpp / tree control to handle map layers / / version 2.0, 2017 January 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include "wx/imaglist.h" // // ICONs in XPM format [universally portable] // #include "icons/map_root.xpm" #include "icons/wms.xpm" #include "icons/wms_off.xpm" ................................................................................ (wxObjectEventFunction) & MyLayerTree::OnCmdMapConfigure); Connect(Tree_MapVisible, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdVisible); Connect(Tree_MapFullExtent, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapFullExtent); Connect(Tree_MapLayerFullExtent, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapLayerFullExtent); Connect(Tree_MapLayerConfigure, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapLayerConfigure); Connect(Tree_QuickStyleEdit, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdQuickStyleEdit); Connect(Tree_MapLayerInfo, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdLayerInfo); Connect(Tree_MapRemoveLayer, wxEVT_COMMAND_MENU_SELECTED, ................................................................................ case MAP_LAYER_WMS: if (layer->IsVisible() == false) idx = 2; else idx = 1; break; case MAP_LAYER_VECTOR: switch (layer->GetGeometryType()) { case 1: case 1001: case 2001: case 3001: case 4: ................................................................................ void MyLayerTree::AddLayer(MapLayer * layer) { // // adds a layer to the TREE list // wxTreeItemId item; wxString name = layer->GetDbPrefix(); if (layer->GetType() == MAP_LAYER_VECTOR) name += wxT(".") + layer->GetVectorPrefix(); name += wxT(".") + layer->GetName(); if (GetChildrenCount(Root) == 0) item = AppendItem(Root, name, 1); else item = InsertItem(Root, 0, name, 1); MapLayerObject *obj = new MapLayerObject(layer); ................................................................................ menuItem = new wxMenuItem(&menu, Tree_MapRemoveLayer, wxT("Remove")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapLayerFullExtent, wxT("Zoom to Full Extent")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapLayerInfo, wxT("Metadata")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_MapLayerConfigure, wxT("Configure")); menu.Append(menuItem); menuItem = ................................................................................ // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); if (obj == NULL) return; MapLayer *layer = obj->GetLayer(); MapPanel->SetMapLayerToFullExtent(layer); } void MyLayerTree::OnCmdRemoveLayer(wxCommandEvent & WXUNUSED(event)) { // // menu event - removing some Map layer (Step #1) // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); ................................................................................ // // menu event - editing Layer's Quick Style // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); if (obj == NULL) return; MapLayer *layer = obj->GetLayer(); bool bboxChanged = false; bool configChanged = false; if (layer->GetType() == MAP_LAYER_VECTOR || layer->GetType() == MAP_LAYER_VECTOR_VIEW || layer->GetType() == MAP_LAYER_VECTOR_SHP) { QuickStyleVectorDialog dlg; int type = layer->GetVectorConfig()->GetGeometryType(); ................................................................................ } if (layer->GetType() == MAP_LAYER_TOPOLOGY || layer->GetType() == MAP_LAYER_NETWORK) { QuickStyleTopologyDialog dlg; dlg.Create(MapPanel, layer); int ret = dlg.ShowModal(); if (ret == wxID_OK) configChanged = dlg.ConfigChanged(); } if (configChanged == true) MapPanel->RefreshMap(); } ................................................................................ wxTreeItemId currentItem = event.GetItem(); MapLayer *layer = obj->GetLayer(); // // creating the new node // wxTreeItemId position; wxString name = layer->GetDbPrefix(); if (layer->GetType() == MAP_LAYER_VECTOR) name += wxT(".") + layer->GetVectorPrefix(); name += wxT(".") + layer->GetName(); wxColour color(0, 0, 0); int idx = GetIconIndex(layer); if (layer->IsVisible() == false) { color = wxColour(192, 192, 192); ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_RASTER_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_RASTER_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_RASTER_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *rst_quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); ................................................................................ "JOIN \"%s\".spatial_ref_sys AS y ON (r.srid = y.srid) " "WHERE r.coverage_name = %Q UNION " "SELECT s.srid, y.ref_sys_name FROM \"%s\".raster_coverages AS r " "JOIN \"%s\".raster_coverages_srid AS s ON (s.coverage_name = r.coverage_name) " "JOIN \"%s\".spatial_ref_sys AS y ON (s.srid = y.srid) " "WHERE r.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf("SELECT s.style_name FROM \"%s\".raster_coverages AS r " "JOIN \"%s\".SE_raster_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_raster_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ const char *style = results[(i * columns) + 0]; if (strcasecmp(style, "default") == 0) has_default = 1; wxString str = wxString::FromUTF8(style); stlList->Append(str); } sqlite3_free_table(results); if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_VECTOR_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_VECTOR_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_VECTOR_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *rst_quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); ................................................................................ "WHERE c.coverage_name = %Q AND s.extent_minx IS NOT NULL AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ "WHERE c.coverage_name = %Q AND s.extent_minx IS NOT NULL AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ "WHERE c.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ sqlite3_mprintf ("SELECT f_table_name, f_geometry_column, view_name, view_geometry, " "virt_name, virt_geometry, topology_name, network_name FROM \"%s\".vector_coverages " "WHERE coverage_name = %Q", xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return MAP_LAYER_UNKNOWN; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf("SELECT s.style_name FROM \"%s\".vector_coverages AS r " "JOIN \"%s\".SE_vector_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_vector_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ stlList->Append(str); } if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_TOPOGEO_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_TOPOGEO_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // third row: Primitives Visibility wxStaticBox *visBox = new wxStaticBox(this, wxID_STATIC, wxT("TopoGeo Primitives Visibility"), wxDefaultPosition, wxDefaultSize); ................................................................................ wxCheckBox *nodeCtrl = new wxCheckBox(this, ID_TOPOGEO_NODE, wxT("Nodes"), wxDefaultPosition, wxDefaultSize); nodeCtrl->SetValue(config->AreNodesVisible()); vis1BoxSizer->Add(nodeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *faceSeedCtrl = new wxCheckBox(this, ID_TOPOGEO_FACE_SEED, wxT("FaceSeeds"), wxDefaultPosition, wxDefaultSize); faceSeedCtrl->SetValue(config->AreFaceSeedsVisible()); vis2BoxSizer->Add(faceSeedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *edgeSeedCtrl = new wxCheckBox(this, ID_TOPOGEO_EDGE_SEED, wxT("EdgeSeeds"), wxDefaultPosition, wxDefaultSize); edgeSeedCtrl->SetValue(config->AreEdgeSeedsVisible()); vis2BoxSizer->Add(edgeSeedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // Apply/Quit buttons wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_TOPOGEO_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); ................................................................................ "WHERE c.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf("SELECT s.style_name FROM \"%s\".vector_coverages AS r " "JOIN \"%s\".SE_vector_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_vector_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ stlList->Append(str); } if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_TOPONET_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_TOPONET_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // third row: Primitives Visibility wxStaticBox *visBox = new wxStaticBox(this, wxID_STATIC, wxT("TopoNet Primitives Visibility"), wxDefaultPosition, wxDefaultSize); ................................................................................ wxCheckBox *nodeCtrl = new wxCheckBox(this, ID_TOPONET_NODE, wxT("Nodes"), wxDefaultPosition, wxDefaultSize); nodeCtrl->SetValue(config->AreNodesVisible()); vis1BoxSizer->Add(nodeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *linkSeedCtrl = new wxCheckBox(this, ID_TOPONET_LINK_SEED, wxT("LinkSeeds"), wxDefaultPosition, wxDefaultSize); linkSeedCtrl->SetValue(config->AreLinkSeedsVisible()); vis2BoxSizer->Add(linkSeedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // Apply/Quit buttons wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_TOPONET_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); ................................................................................ "WHERE c.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf("SELECT s.style_name FROM \"%s\".vector_coverages AS r " "JOIN \"%s\".SE_vector_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_vector_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ stlList->Append(str); } if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ if (Style != NULL) free(Style); Style = (char *) malloc((stl.Len() * 4) + 1); strcpy(Style, stl.ToUTF8()); DoConfigureMapLayer(); wxDialog::EndModal(wxID_OK); } |
| > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < > > > > > > > > | > > > | > | | | | | > > | | | | | | | > > > > > > > | > | > | | | | | | | | | > > | | | | | | | | > | > | | > | > | | > > | | | | | | | | > | > | | > | | > > | | | | | | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ... 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 ... 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 ... 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 ... 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 ... 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 ... 854 855 856 857 858 859 860 861 862 863 864 865 866 867 ... 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 ... 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 .... 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 .... 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 .... 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 .... 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 .... 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 .... 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 .... 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 .... 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 .... 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 .... 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 .... 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 .... 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 .... 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 .... 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 .... 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 .... 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 .... 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 .... 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 .... 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 .... 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 .... 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 .... 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 |
/* / LayerTree.cpp / tree control to handle map layers / / version 2.0, 2017 January 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include "wx/imaglist.h" #include "wx/spinctrl.h" #include "wx/colordlg.h" #include "wx/clipbrd.h" // // ICONs in XPM format [universally portable] // #include "icons/map_root.xpm" #include "icons/wms.xpm" #include "icons/wms_off.xpm" ................................................................................ (wxObjectEventFunction) & MyLayerTree::OnCmdMapConfigure); Connect(Tree_MapVisible, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdVisible); Connect(Tree_MapFullExtent, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapFullExtent); Connect(Tree_MapLayerFullExtent, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapLayerFullExtent); Connect(Tree_SqlSample, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapSqlSample); Connect(Tree_UrlSample, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapUrlSample); Connect(Tree_MapLayerConfigure, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdMapLayerConfigure); Connect(Tree_QuickStyleEdit, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdQuickStyleEdit); Connect(Tree_MapLayerInfo, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyLayerTree::OnCmdLayerInfo); Connect(Tree_MapRemoveLayer, wxEVT_COMMAND_MENU_SELECTED, ................................................................................ case MAP_LAYER_WMS: if (layer->IsVisible() == false) idx = 2; else idx = 1; break; case MAP_LAYER_VECTOR: case MAP_LAYER_VECTOR_VIEW: case MAP_LAYER_VECTOR_SHP: switch (layer->GetGeometryType()) { case 1: case 1001: case 2001: case 3001: case 4: ................................................................................ void MyLayerTree::AddLayer(MapLayer * layer) { // // adds a layer to the TREE list // wxTreeItemId item; wxString name = layer->GetDbPrefix(); if (layer->GetType() == MAP_LAYER_VECTOR || layer->GetType() == MAP_LAYER_VECTOR_VIEW || layer->GetType() == MAP_LAYER_VECTOR_SHP) name += wxT(".") + layer->GetVectorPrefix(); name += wxT(".") + layer->GetName(); if (GetChildrenCount(Root) == 0) item = AppendItem(Root, name, 1); else item = InsertItem(Root, 0, name, 1); MapLayerObject *obj = new MapLayerObject(layer); ................................................................................ menuItem = new wxMenuItem(&menu, Tree_MapRemoveLayer, wxT("Remove")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapLayerFullExtent, wxT("Zoom to Full Extent")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_SqlSample, wxT("SQL sample")); menu.Append(menuItem); if (layer->GetType() == MAP_LAYER_WMS) { menuItem = new wxMenuItem(&menu, Tree_UrlSample, wxT("Request URL sample")); menu.Append(menuItem); } menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapLayerInfo, wxT("Metadata")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_MapLayerConfigure, wxT("Configure")); menu.Append(menuItem); menuItem = ................................................................................ // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); if (obj == NULL) return; MapLayer *layer = obj->GetLayer(); MapPanel->SetMapLayerToFullExtent(layer); } void MyLayerTree::OnCmdMapSqlSample(wxCommandEvent & WXUNUSED(event)) { // // menu event - showing an SQL sample corresponding to the current Map settings // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); if (obj == NULL) return; MapLayer *layer = obj->GetLayer(); switch (layer->GetType()) { case MAP_LAYER_WMS: DoWmsSqlSample(layer); break; case MAP_LAYER_VECTOR: case MAP_LAYER_VECTOR_VIEW: case MAP_LAYER_VECTOR_SHP: DoVectorSqlSample(layer); break; case MAP_LAYER_TOPOLOGY: case MAP_LAYER_NETWORK: DoVectorSqlSample(layer); break; case MAP_LAYER_RASTER: DoRasterSqlSample(layer); break; } } void MyLayerTree::OnCmdMapUrlSample(wxCommandEvent & WXUNUSED(event)) { // // menu event - showing a Request URL sample corresponding to the current Map settings // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); if (obj == NULL) return; MapLayer *layer = obj->GetLayer(); if (layer->GetType() != MAP_LAYER_WMS) return; DoWmsUrlSample(layer); } void MyLayerTree::DoWmsSqlSample(MapLayer * lyr) { // // WMS - showing an SQL sample corresponding to the current Map settings // WmsLayerSettings *conf = lyr->GetWmsConfig(); WmsSqlSampleDialog dlg; dlg.Create(MapPanel, lyr); dlg.ShowModal(); } void MyLayerTree::DoWmsUrlSample(MapLayer * lyr) { // // WMS - showing a Request URL sample corresponding to the current Map settings // WmsLayerSettings *conf = lyr->GetWmsConfig(); WmsSqlSampleDialog dlg; dlg.Create(MapPanel, lyr, true); dlg.ShowModal(); } void MyLayerTree::DoVectorSqlSample(MapLayer * lyr) { // // Vector - showing an SQL sample corresponding to the current Map settings // //fprintf(stderr, "Vector SQL\n"); VectorLayerConfig *conf = lyr->GetVectorConfig(); VectorSqlSampleDialog dlg; dlg.Create(MapPanel, lyr); dlg.ShowModal(); } void MyLayerTree::DoRasterSqlSample(MapLayer * lyr) { // // Raster - showing an SQL sample corresponding to the current Map settings // RasterLayerConfig *conf = lyr->GetRasterConfig(); RasterSqlSampleDialog dlg; dlg.Create(MapPanel, lyr); dlg.ShowModal(); } void MyLayerTree::OnCmdRemoveLayer(wxCommandEvent & WXUNUSED(event)) { // // menu event - removing some Map layer (Step #1) // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); ................................................................................ // // menu event - editing Layer's Quick Style // MapLayerObject *obj = (MapLayerObject *) GetItemData(CurrentItem); if (obj == NULL) return; MapLayer *layer = obj->GetLayer(); bool configChanged = false; if (layer->GetType() == MAP_LAYER_VECTOR || layer->GetType() == MAP_LAYER_VECTOR_VIEW || layer->GetType() == MAP_LAYER_VECTOR_SHP) { QuickStyleVectorDialog dlg; int type = layer->GetVectorConfig()->GetGeometryType(); ................................................................................ } if (layer->GetType() == MAP_LAYER_TOPOLOGY || layer->GetType() == MAP_LAYER_NETWORK) { QuickStyleTopologyDialog dlg; dlg.Create(MapPanel, layer); int ret = dlg.ShowModal(); if (ret == wxID_OK) configChanged = dlg.ConfigChanged(); } if (layer->GetType() == MAP_LAYER_RASTER) { QuickStyleRasterDialog dlg; dlg.Create(MapPanel, layer); int ret = dlg.ShowModal(); if (ret == wxID_OK) configChanged = dlg.ConfigChanged(); } if (configChanged == true) MapPanel->RefreshMap(); } ................................................................................ wxTreeItemId currentItem = event.GetItem(); MapLayer *layer = obj->GetLayer(); // // creating the new node // wxTreeItemId position; wxString name = layer->GetDbPrefix(); if (layer->GetType() == MAP_LAYER_VECTOR || layer->GetType() == MAP_LAYER_VECTOR_VIEW || layer->GetType() == MAP_LAYER_VECTOR_SHP) name += wxT(".") + layer->GetVectorPrefix(); name += wxT(".") + layer->GetName(); wxColour color(0, 0, 0); int idx = GetIconIndex(layer); if (layer->IsVisible() == false) { color = wxColour(192, 192, 192); ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_RASTER_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_RASTER_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_RASTER_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *rst_quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); ................................................................................ "JOIN \"%s\".spatial_ref_sys AS y ON (r.srid = y.srid) " "WHERE r.coverage_name = %Q UNION " "SELECT s.srid, y.ref_sys_name FROM \"%s\".raster_coverages AS r " "JOIN \"%s\".raster_coverages_srid AS s ON (s.coverage_name = r.coverage_name) " "JOIN \"%s\".spatial_ref_sys AS y ON (s.srid = y.srid) " "WHERE r.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT s.style_name FROM \"%s\".raster_coverages AS r " "JOIN \"%s\".SE_raster_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_raster_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ const char *style = results[(i * columns) + 0]; if (strcasecmp(style, "default") == 0) has_default = 1; wxString str = wxString::FromUTF8(style); stlList->Append(str); } sqlite3_free_table(results); QuickStyleRasterObj *quickStyle = Layer->GetQuickStyleRaster(); if (quickStyle != NULL) { wxString str = wxString::FromUTF8(quickStyle->GetUUID()); stlList->Append(str); } if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < (int) stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_VECTOR_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_VECTOR_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_VECTOR_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *rst_quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); ................................................................................ "WHERE c.coverage_name = %Q AND s.extent_minx IS NOT NULL AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ "WHERE c.coverage_name = %Q AND s.extent_minx IS NOT NULL AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ "WHERE c.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ sqlite3_mprintf ("SELECT f_table_name, f_geometry_column, view_name, view_geometry, " "virt_name, virt_geometry, topology_name, network_name FROM \"%s\".vector_coverages " "WHERE coverage_name = %Q", xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return MAP_LAYER_UNKNOWN; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT s.style_name FROM \"%s\".vector_coverages AS r " "JOIN \"%s\".SE_vector_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_vector_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ stlList->Append(str); } if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < (int) stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_TOPOGEO_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_TOPOGEO_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // third row: Primitives Visibility wxStaticBox *visBox = new wxStaticBox(this, wxID_STATIC, wxT("TopoGeo Primitives Visibility"), wxDefaultPosition, wxDefaultSize); ................................................................................ wxCheckBox *nodeCtrl = new wxCheckBox(this, ID_TOPOGEO_NODE, wxT("Nodes"), wxDefaultPosition, wxDefaultSize); nodeCtrl->SetValue(config->AreNodesVisible()); vis1BoxSizer->Add(nodeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *faceSeedCtrl = new wxCheckBox(this, ID_TOPOGEO_FACE_SEED, wxT("FaceSeeds"), wxDefaultPosition, wxDefaultSize); faceSeedCtrl->SetValue(config->AreFaceSeedsVisible()); vis2BoxSizer->Add(faceSeedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *edgeSeedCtrl = new wxCheckBox(this, ID_TOPOGEO_EDGE_SEED, wxT("EdgeSeeds"), wxDefaultPosition, wxDefaultSize); edgeSeedCtrl->SetValue(config->AreEdgeSeedsVisible()); vis2BoxSizer->Add(edgeSeedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // Apply/Quit buttons wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_TOPOGEO_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); ................................................................................ "WHERE c.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT s.style_name FROM \"%s\".vector_coverages AS r " "JOIN \"%s\".SE_vector_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_vector_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ stlList->Append(str); } if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < (int) stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ wxT("SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sridBoxSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); xxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *sridList = new wxComboBox(this, ID_TOPONET_SRID, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateSRIDs(sridList); sridBoxSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_TOPONET_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // third row: Primitives Visibility wxStaticBox *visBox = new wxStaticBox(this, wxID_STATIC, wxT("TopoNet Primitives Visibility"), wxDefaultPosition, wxDefaultSize); ................................................................................ wxCheckBox *nodeCtrl = new wxCheckBox(this, ID_TOPONET_NODE, wxT("Nodes"), wxDefaultPosition, wxDefaultSize); nodeCtrl->SetValue(config->AreNodesVisible()); vis1BoxSizer->Add(nodeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *linkSeedCtrl = new wxCheckBox(this, ID_TOPONET_LINK_SEED, wxT("LinkSeeds"), wxDefaultPosition, wxDefaultSize); linkSeedCtrl->SetValue(config->AreLinkSeedsVisible()); vis2BoxSizer->Add(linkSeedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // Apply/Quit buttons wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(buttonSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_TOPONET_OK, wxT("&Apply Changes")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); ................................................................................ "WHERE c.coverage_name = %Q AND " "s.extent_miny IS NOT NULL AND s.extent_maxx IS NOT NULL AND " "s.extent_maxx IS NOT NULL ORDER BY s.srid", xdb_prefix, xdb_prefix, xdb_prefix, layer, xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT s.style_name FROM \"%s\".vector_coverages AS r " "JOIN \"%s\".SE_vector_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_vector_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list ................................................................................ stlList->Append(str); } if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < (int) stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { ................................................................................ if (Style != NULL) free(Style); Style = (char *) malloc((stl.Len() * 4) + 1); strcpy(Style, stl.ToUTF8()); DoConfigureMapLayer(); wxDialog::EndModal(wxID_OK); } bool VectorSqlSampleDialog::Create(MyMapPanel * parent, MapLayer * layer) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); BgColor = wxColour(255, 255, 255); if (wxDialog::Create (parent, wxID_ANY, wxT("SQL sample: Map Request configuration")) == false) return false; // populates individual controls InitData(); CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); DoUpdateSql(); return true; } void VectorSqlSampleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: Layer name wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *nameBox = new wxStaticBox(this, wxID_ANY, wxT("Layer FullName"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString fullName = DbPrefix + wxT(".") + LayerName; wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_VECTOR_LAYER, fullName, wxDefaultPosition, wxSize(470, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Second row: Vector options wxBoxSizer *rstSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(rstSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *xxSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(xxSizer, 0, wxALIGN_TOP | wxALL, 5); // Style wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_VECTOR_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // Third row: Image options wxBoxSizer *imageSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(imageSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // MIME type wxString mime[4]; mime[0] = wxT("&PNG"); mime[1] = wxT("&JPEG"); mime[2] = wxT("&TIFF"); mime[3] = wxT("PDF"); wxRadioBox *mimeBox = new wxRadioBox(this, ID_MIME_TYPE, wxT("&MIME Type"), wxDefaultPosition, wxDefaultSize, 4, mime, 2, wxRA_SPECIFY_COLS); imageSizer->Add(mimeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); mimeBox->SetSelection(0); // image Quality wxStaticBox *qtyBox = new wxStaticBox(this, wxID_STATIC, wxT("Quality"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *qtyBoxSizer = new wxStaticBoxSizer(qtyBox, wxVERTICAL); imageSizer->Add(qtyBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxSlider *qualityCtrl = new wxSlider(this, ID_IMAGE_QUALITY, 85, 0, 100, wxDefaultPosition, wxSize(100, 50), wxSL_HORIZONTAL | wxSL_LABELS); qtyBoxSizer->Add(qualityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); qualityCtrl->Enable(false); // Map background wxStaticBox *bgBox = new wxStaticBox(this, wxID_STATIC, wxT("Map Background"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *bg1Sizer = new wxStaticBoxSizer(bgBox, wxVERTICAL); imageSizer->Add(bg1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *bg2Sizer = new wxBoxSizer(wxHORIZONTAL); bg1Sizer->Add(bg2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxCheckBox *checkeredCtrl = new wxCheckBox(this, ID_MAPOPT_CHECKERED_BACKGROUND, wxT("&Transparent"), wxDefaultPosition, wxDefaultSize); checkeredCtrl->SetValue(true); bg2Sizer->Add(checkeredCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *bgColorBox = new wxStaticBox(this, wxID_ANY, wxT("Background Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *bgColorBoxSizer = new wxStaticBoxSizer(bgColorBox, wxHORIZONTAL); bg2Sizer->Add(bgColorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bgColorBmp; GetButtonBitmap(BgColor, bgColorBmp); wxBitmapButton *bgColorCtrl = new wxBitmapButton(this, ID_MAPOPT_SOLID_BACKGROUND, bgColorBmp); bgColorCtrl->Enable(false); bgColorBoxSizer->Add(bgColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // SQL sample wxStaticBox *sqlBox = new wxStaticBox(this, wxID_STATIC, wxT("SQL sample"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sqlSizer = new wxStaticBoxSizer(sqlBox, wxVERTICAL); boxSizer->Add(sqlSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *sqlCtrl = new wxTextCtrl(this, ID_SQL_SAMPLE, Sql, wxDefaultPosition, wxSize(470, 100), wxTE_MULTILINE | wxTE_WORDWRAP | wxTE_READONLY); sqlSizer->Add(sqlCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // buttons wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_VECTOR_COPY, wxT("&Copy")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *rst_quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); buttonSizer->Add(rst_quit, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // appends event handlers Connect(ID_VECTOR_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorSqlSampleDialog::OnCopy); Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorSqlSampleDialog::OnQuit); Connect(ID_VECTOR_STYLE, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & VectorSqlSampleDialog::OnStyleChanged); Connect(ID_MIME_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & VectorSqlSampleDialog::OnMimeTypeChanged); Connect(ID_IMAGE_QUALITY, wxEVT_SLIDER, (wxObjectEventFunction) & VectorSqlSampleDialog::OnQualityChanged); Connect(ID_MAPOPT_CHECKERED_BACKGROUND, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & VectorSqlSampleDialog::OnTransparentChanged); Connect(ID_MAPOPT_SOLID_BACKGROUND, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorSqlSampleDialog::OnBackgroundChanged); } void VectorSqlSampleDialog::GetButtonBitmap(wxColour & bgcolor, wxBitmap & bmp) { // creating a Bitmap representing some Color bmp = wxBitmap(96, 18); wxMemoryDC *dc = new wxMemoryDC(bmp); dc->SetBrush(wxBrush(bgcolor)); dc->DrawRectangle(-1, -1, 98, 20); delete dc; } void VectorSqlSampleDialog::InitData() { // initializing the current configuration int len; VectorLayerConfig *config = Layer->GetVectorConfig(); Style = NULL; if (config->GetStyle() != NULL) { len = strlen(config->GetStyle()); Style = (char *) malloc(len + 1); strcpy(Style, config->GetStyle()); } } void VectorSqlSampleDialog::PopulateStyles(wxComboBox * stlList) { // populating the Styles List int ret; char *sql; char **results; int rows; int columns; int has_default = 0; char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT s.style_name FROM \"%s\".vector_coverages AS r " "JOIN \"%s\".SE_vector_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_vector_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list const char *style = results[(i * columns) + 0]; if (strcasecmp(style, "default") == 0) has_default = 1; wxString str = wxString::FromUTF8(style); stlList->Append(str); } sqlite3_free_table(results); if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < (int) stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { if (stlList->GetString(i).Cmp(wxString::FromUTF8(Style)) == 0) stlList->SetSelection(i); } } } if (stlList->GetSelection() == wxNOT_FOUND) { // the current Style probably is a QuickStyle free(Style); Style = NULL; for (int i = 0; i < (int) stlList->GetCount(); i++) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } } } void VectorSqlSampleDialog::DoUpdateSql() { // // updating the SQL query // char *str; char *buf; wxString col; wxTextCtrl *sqlCtrl = (wxTextCtrl *) FindWindow(ID_SQL_SAMPLE); wxComboBox *stlList = (wxComboBox *) FindWindow(ID_VECTOR_STYLE); wxRadioBox *mimeBox = (wxRadioBox *) FindWindow(ID_MIME_TYPE); wxCheckBox *transparentCtrl = (wxCheckBox *) FindWindow(ID_MAPOPT_CHECKERED_BACKGROUND); wxSlider *qualityCtrl = (wxSlider *) FindWindow(ID_IMAGE_QUALITY); Sql = wxT("SELECT RL2_GetMapImageFromVector("); if (DbPrefix.Len() == 0) Sql += wxT("NULL, "); else { str = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(str, DbPrefix.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // coverage name str = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(str, LayerName.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // bounding box wxString bbox; MapPanel->DoPrepareBBox(bbox); Sql += bbox; // image width and height buf = sqlite3_mprintf("%d, %d, ", MapPanel->GetImageWidth(), MapPanel->GetImageHeight()); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // style wxString style = stlList->GetValue(); if (style.Len() == 0) Sql += wxT("'default', "); else { str = (char *) malloc((style.Len() * 4) + 1); strcpy(str, style.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // MIME type switch (mimeBox->GetSelection()) { case 1: Sql += wxT("'image/jpeg', "); break; case 2: Sql += wxT("'image/tiff', "); break; case 3: Sql += wxT("'application/x-pdf', "); break; default: Sql += wxT("'image/png', "); break; }; // bgColor buf = sqlite3_mprintf("'#%02x%02x%02x', ", BgColor.Red(), BgColor.Green(), BgColor.Blue()); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // transparent if (transparentCtrl->GetValue()) Sql += wxT("1, "); else Sql += wxT("0, "); // quality if (mimeBox->GetSelection() == 1) { buf = sqlite3_mprintf("%d", qualityCtrl->GetValue()); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } else Sql += wxT("100"); Sql += wxT(");"); sqlCtrl->SetValue(Sql); } void VectorSqlSampleDialog::OnStyleChanged(wxCommandEvent & WXUNUSED(event)) { // // Style selection changed // DoUpdateSql(); } void VectorSqlSampleDialog::OnMimeTypeChanged(wxCommandEvent & WXUNUSED(event)) { // // MIME Type selection changed // wxRadioBox *mimeBox = (wxRadioBox *) FindWindow(ID_MIME_TYPE); wxSlider *qualityCtrl = (wxSlider *) FindWindow(ID_IMAGE_QUALITY); if (mimeBox->GetSelection() == 1) qualityCtrl->Enable(true); else qualityCtrl->Enable(false); DoUpdateSql(); } void VectorSqlSampleDialog::OnQualityChanged(wxCommandEvent & WXUNUSED(event)) { // // Image Quality selection changed // DoUpdateSql(); } void VectorSqlSampleDialog::OnTransparentChanged(wxCommandEvent & WXUNUSED(event)) { // // Transparent Background selection changed // wxCheckBox *transparentCtrl = (wxCheckBox *) FindWindow(ID_MAPOPT_CHECKERED_BACKGROUND); wxBitmapButton *btn = (wxBitmapButton *) FindWindow(ID_MAPOPT_SOLID_BACKGROUND); if (transparentCtrl->GetValue() == false) btn->Enable(true); else btn->Enable(false); DoUpdateSql(); } void VectorSqlSampleDialog::OnBackgroundChanged(wxCommandEvent & WXUNUSED(event)) { // Map Background Solid Color selection wxColourData initColor; int ret; initColor.SetChooseFull(false); initColor.SetColour(BgColor); wxColourDialog colorDialog(this, &initColor); ret = colorDialog.ShowModal(); if (ret == wxID_OK) { wxColourData colorData = colorDialog.GetColourData(); BgColor = colorData.GetColour(); wxBitmap bmp; GetButtonBitmap(BgColor, bmp); wxBitmapButton *btn = (wxBitmapButton *) FindWindow(ID_MAPOPT_SOLID_BACKGROUND); btn->SetBitmapLabel(bmp); DoUpdateSql(); } } void VectorSqlSampleDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Map Request (SQL statement) // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(Sql)); wxTheClipboard->Close(); } } void VectorSqlSampleDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } bool RasterSqlSampleDialog::Create(MyMapPanel * parent, MapLayer * layer) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); BgColor = wxColour(255, 255, 255); if (wxDialog::Create (parent, wxID_ANY, wxT("SQL sample: Map Request configuration")) == false) return false; // populates individual controls InitData(); CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); DoUpdateSql(); return true; } void RasterSqlSampleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: Layer name wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *nameBox = new wxStaticBox(this, wxID_ANY, wxT("Layer FullName"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString fullName = DbPrefix + wxT(".") + LayerName; wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_VECTOR_LAYER, fullName, wxDefaultPosition, wxSize(470, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Second row: Raster options wxBoxSizer *rstSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(rstSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *xxSizer = new wxBoxSizer(wxVERTICAL); rstSizer->Add(xxSizer, 0, wxALIGN_TOP | wxALL, 5); // Style wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); xxSizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxComboBox *stlList = new wxComboBox(this, ID_VECTOR_STYLE, wxT(""), wxDefaultPosition, wxSize(350, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // Third row: Image options wxBoxSizer *imageSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(imageSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // MIME type wxString mime[4]; mime[0] = wxT("&PNG"); mime[1] = wxT("&JPEG"); mime[2] = wxT("&TIFF"); mime[3] = wxT("PDF"); wxRadioBox *mimeBox = new wxRadioBox(this, ID_MIME_TYPE, wxT("&MIME Type"), wxDefaultPosition, wxDefaultSize, 4, mime, 2, wxRA_SPECIFY_COLS); imageSizer->Add(mimeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); mimeBox->SetSelection(0); // image Quality wxStaticBox *qtyBox = new wxStaticBox(this, wxID_STATIC, wxT("Quality"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *qtyBoxSizer = new wxStaticBoxSizer(qtyBox, wxVERTICAL); imageSizer->Add(qtyBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxSlider *qualityCtrl = new wxSlider(this, ID_IMAGE_QUALITY, 85, 0, 100, wxDefaultPosition, wxSize(100, 50), wxSL_HORIZONTAL | wxSL_LABELS); qtyBoxSizer->Add(qualityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); qualityCtrl->Enable(false); // Map background wxStaticBox *bgBox = new wxStaticBox(this, wxID_STATIC, wxT("Map Background"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *bg1Sizer = new wxStaticBoxSizer(bgBox, wxVERTICAL); imageSizer->Add(bg1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *bg2Sizer = new wxBoxSizer(wxHORIZONTAL); bg1Sizer->Add(bg2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxCheckBox *checkeredCtrl = new wxCheckBox(this, ID_MAPOPT_CHECKERED_BACKGROUND, wxT("&Transparent"), wxDefaultPosition, wxDefaultSize); checkeredCtrl->SetValue(true); bg2Sizer->Add(checkeredCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *bgColorBox = new wxStaticBox(this, wxID_ANY, wxT("Background Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *bgColorBoxSizer = new wxStaticBoxSizer(bgColorBox, wxHORIZONTAL); bg2Sizer->Add(bgColorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bgColorBmp; GetButtonBitmap(BgColor, bgColorBmp); wxBitmapButton *bgColorCtrl = new wxBitmapButton(this, ID_MAPOPT_SOLID_BACKGROUND, bgColorBmp); bgColorCtrl->Enable(false); bgColorBoxSizer->Add(bgColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // SQL sample wxStaticBox *sqlBox = new wxStaticBox(this, wxID_STATIC, wxT("SQL sample"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sqlSizer = new wxStaticBoxSizer(sqlBox, wxVERTICAL); boxSizer->Add(sqlSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *sqlCtrl = new wxTextCtrl(this, ID_SQL_SAMPLE, Sql, wxDefaultPosition, wxSize(470, 100), wxTE_MULTILINE | wxTE_WORDWRAP | wxTE_READONLY); sqlSizer->Add(sqlCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // buttons wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *rst_ok = new wxButton(this, ID_VECTOR_COPY, wxT("&Copy")); buttonSizer->Add(rst_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *rst_quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); buttonSizer->Add(rst_quit, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // appends event handlers Connect(ID_VECTOR_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSqlSampleDialog::OnCopy); Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSqlSampleDialog::OnQuit); Connect(ID_VECTOR_STYLE, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & RasterSqlSampleDialog::OnStyleChanged); Connect(ID_MIME_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSqlSampleDialog::OnMimeTypeChanged); Connect(ID_IMAGE_QUALITY, wxEVT_SLIDER, (wxObjectEventFunction) & RasterSqlSampleDialog::OnQualityChanged); Connect(ID_MAPOPT_CHECKERED_BACKGROUND, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & RasterSqlSampleDialog::OnTransparentChanged); Connect(ID_MAPOPT_SOLID_BACKGROUND, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSqlSampleDialog::OnBackgroundChanged); } void RasterSqlSampleDialog::GetButtonBitmap(wxColour & bgcolor, wxBitmap & bmp) { // creating a Bitmap representing some Color bmp = wxBitmap(96, 18); wxMemoryDC *dc = new wxMemoryDC(bmp); dc->SetBrush(wxBrush(bgcolor)); dc->DrawRectangle(-1, -1, 98, 20); delete dc; } void RasterSqlSampleDialog::InitData() { // initializing the current configuration int len; RasterLayerConfig *config = Layer->GetRasterConfig(); Style = NULL; if (config->GetStyle() != NULL) { len = strlen(config->GetStyle()); Style = (char *) malloc(len + 1); strcpy(Style, config->GetStyle()); } } void RasterSqlSampleDialog::PopulateStyles(wxComboBox * stlList) { // populating the Styles List int ret; char *sql; char **results; int rows; int columns; int has_default = 0; char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT s.style_name FROM \"%s\".raster_coverages AS r " "JOIN \"%s\".SE_raster_styled_layers AS x ON (x.coverage_name = r.coverage_name) " "JOIN \"%s\".SE_raster_styles AS s ON (s.style_id = x.style_id) " "WHERE r.coverage_name = %Q ORDER BY s.style_name", xdb_prefix, xdb_prefix, xdb_prefix, layer); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list const char *style = results[(i * columns) + 0]; if (strcasecmp(style, "default") == 0) has_default = 1; wxString str = wxString::FromUTF8(style); stlList->Append(str); } sqlite3_free_table(results); if (!has_default) stlList->Append(wxT("default")); if (stlList->GetSelection() == wxNOT_FOUND) { for (int i = 0; i < (int) stlList->GetCount(); i++) { if (Style == NULL) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } else { if (stlList->GetString(i).Cmp(wxString::FromUTF8(Style)) == 0) stlList->SetSelection(i); } } } if (stlList->GetSelection() == wxNOT_FOUND) { // the current Style probably is a QuickStyle free(Style); Style = NULL; for (int i = 0; i < (int) stlList->GetCount(); i++) { if (stlList->GetString(i).Cmp(wxT("default")) == 0) stlList->SetSelection(i); } } } void RasterSqlSampleDialog::DoUpdateSql() { // // updating the SQL query // char *str; char *buf; wxString col; wxTextCtrl *sqlCtrl = (wxTextCtrl *) FindWindow(ID_SQL_SAMPLE); wxComboBox *stlList = (wxComboBox *) FindWindow(ID_VECTOR_STYLE); wxRadioBox *mimeBox = (wxRadioBox *) FindWindow(ID_MIME_TYPE); wxCheckBox *transparentCtrl = (wxCheckBox *) FindWindow(ID_MAPOPT_CHECKERED_BACKGROUND); wxSlider *qualityCtrl = (wxSlider *) FindWindow(ID_IMAGE_QUALITY); Sql = wxT("SELECT RL2_GetMapImageFromRaster("); if (DbPrefix.Len() == 0) Sql += wxT("NULL, "); else { str = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(str, DbPrefix.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // coverage name str = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(str, LayerName.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // bounding box wxString bbox; MapPanel->DoPrepareBBox(bbox); Sql += bbox; // image width and height buf = sqlite3_mprintf("%d, %d, ", MapPanel->GetImageWidth(), MapPanel->GetImageHeight()); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // style wxString style = stlList->GetValue(); if (style.Len() == 0) Sql += wxT("'default', "); else { str = (char *) malloc((style.Len() * 4) + 1); strcpy(str, style.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // MIME type switch (mimeBox->GetSelection()) { case 1: Sql += wxT("'image/jpeg', "); break; case 2: Sql += wxT("'image/tiff', "); break; case 3: Sql += wxT("'application/x-pdf', "); break; default: Sql += wxT("'image/png', "); break; }; // bgColor buf = sqlite3_mprintf("'#%02x%02x%02x', ", BgColor.Red(), BgColor.Green(), BgColor.Blue()); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // transparent if (transparentCtrl->GetValue()) Sql += wxT("1, "); else Sql += wxT("0, "); // quality if (mimeBox->GetSelection() == 1) { buf = sqlite3_mprintf("%d", qualityCtrl->GetValue()); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } else Sql += wxT("100"); Sql += wxT(");"); sqlCtrl->SetValue(Sql); } void RasterSqlSampleDialog::OnStyleChanged(wxCommandEvent & WXUNUSED(event)) { // // Style selection changed // DoUpdateSql(); } void RasterSqlSampleDialog::OnMimeTypeChanged(wxCommandEvent & WXUNUSED(event)) { // // MIME Type selection changed // wxRadioBox *mimeBox = (wxRadioBox *) FindWindow(ID_MIME_TYPE); wxSlider *qualityCtrl = (wxSlider *) FindWindow(ID_IMAGE_QUALITY); if (mimeBox->GetSelection() == 1) qualityCtrl->Enable(true); else qualityCtrl->Enable(false); DoUpdateSql(); } void RasterSqlSampleDialog::OnQualityChanged(wxCommandEvent & WXUNUSED(event)) { // // Image Quality selection changed // DoUpdateSql(); } void RasterSqlSampleDialog::OnTransparentChanged(wxCommandEvent & WXUNUSED(event)) { // // Transparent Background selection changed // wxCheckBox *transparentCtrl = (wxCheckBox *) FindWindow(ID_MAPOPT_CHECKERED_BACKGROUND); wxBitmapButton *btn = (wxBitmapButton *) FindWindow(ID_MAPOPT_SOLID_BACKGROUND); if (transparentCtrl->GetValue() == false) btn->Enable(true); else btn->Enable(false); DoUpdateSql(); } void RasterSqlSampleDialog::OnBackgroundChanged(wxCommandEvent & WXUNUSED(event)) { // Map Background Solid Color selection wxColourData initColor; int ret; initColor.SetChooseFull(false); initColor.SetColour(BgColor); wxColourDialog colorDialog(this, &initColor); ret = colorDialog.ShowModal(); if (ret == wxID_OK) { wxColourData colorData = colorDialog.GetColourData(); BgColor = colorData.GetColour(); wxBitmap bmp; GetButtonBitmap(BgColor, bmp); wxBitmapButton *btn = (wxBitmapButton *) FindWindow(ID_MAPOPT_SOLID_BACKGROUND); btn->SetBitmapLabel(bmp); DoUpdateSql(); } } void RasterSqlSampleDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Map Request (SQL statement) // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(Sql)); wxTheClipboard->Close(); } } void RasterSqlSampleDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } bool WmsSqlSampleDialog::Create(MyMapPanel * parent, MapLayer * layer, bool request_url) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; RequestURL = request_url; Url = wxString::FromUTF8(layer->GetWmsGetMapURL()); DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); wxString title = wxT("SQL sample: Map Request configuration"); if (RequestURL == true) title = wxT("URL sample: Map Request configuration"); if (wxDialog::Create(parent, wxID_ANY, title) == false) return false; // populates individual controls InitData(); CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); DoUpdateSql(); return true; } WmsSqlSampleDialog::~WmsSqlSampleDialog() { if (Version != NULL) free(Version); if (MaxVersion != NULL) free(MaxVersion); if (Style != NULL) free(Style); if (ImageFormat != NULL) free(ImageFormat); if (BgColor != NULL) free(BgColor); } void WmsSqlSampleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: URL wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *urlSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(urlSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *urlBox = new wxStaticBox(this, wxID_ANY, wxT("WMS GetMap URL"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *urlBoxSizer = new wxStaticBoxSizer(urlBox, wxHORIZONTAL); urlSizer->Add(urlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *urlCtrl = new wxTextCtrl(this, ID_WMS_URL, Url, wxDefaultPosition, wxSize(800, 22), wxTE_READONLY); urlBoxSizer->Add(urlCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Second row: WMS options wxBoxSizer *optsSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(optsSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // WMS version wxBoxSizer *wmsSizer = new wxBoxSizer(wxHORIZONTAL); optsSizer->Add(wmsSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString ver[4]; ver[0] = wxT("WMS &1.0.0"); ver[1] = wxT("WMS &1.1.0"); ver[2] = wxT("WMS &1.1.1"); ver[3] = wxT("WMS &1.3.0"); wxRadioBox *versionBox = new wxRadioBox(this, ID_WMS_VERSION, wxT("WMS &Version"), wxDefaultPosition, wxDefaultSize, 4, ver, 4, wxRA_SPECIFY_ROWS); FindMaxVersion(); if (MaxVersion == NULL) { versionBox->Enable(1, false); versionBox->Enable(2, false); versionBox->Enable(3, false); } else { if (strcmp(MaxVersion, "1.1.0") == 0) { versionBox->Enable(2, false); versionBox->Enable(3, false); } else if (strcmp(MaxVersion, "1.1.1") == 0) { versionBox->Enable(3, false); } else if (strcmp(MaxVersion, "1.3.0") == 0) ; else { versionBox->Enable(1, false); versionBox->Enable(2, false); versionBox->Enable(3, false); } } if (strcmp(Version, "1.0.0") == 0) versionBox->SetSelection(0); else if (strcmp(Version, "1.1.0") == 0) versionBox->SetSelection(1); else if (strcmp(Version, "1.1.1") == 0) versionBox->SetSelection(2); else versionBox->SetSelection(3); wmsSizer->Add(versionBox, 0, wxALIGN_TOP | wxALL, 5); // layer Name wxBoxSizer *opt2Sizer = new wxBoxSizer(wxVERTICAL); optsSizer->Add(opt2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); opt2Sizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *nameBox = new wxStaticBox(this, wxID_ANY, wxT("Layer Name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_WMS_LAYER, LayerName, wxDefaultPosition, wxSize(420, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Style wxBoxSizer *opt3Sizer = new wxBoxSizer(wxHORIZONTAL); opt2Sizer->Add(opt3Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *stlBox = new wxStaticBox(this, wxID_STATIC, wxT("Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stlBoxSizer = new wxStaticBoxSizer(stlBox, wxVERTICAL); opt3Sizer->Add(stlBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxComboBox *stlList = new wxComboBox(this, ID_WMS_STYLE, wxT(""), wxDefaultPosition, wxSize(250, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateStyles(stlList); stlBoxSizer->Add(stlList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // image format wxStaticBox *fmtBox = new wxStaticBox(this, wxID_STATIC, wxT("Image Format"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fmtBoxSizer = new wxStaticBoxSizer(fmtBox, wxVERTICAL); opt3Sizer->Add(fmtBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxComboBox *fmtList = new wxComboBox(this, ID_WMS_FORMAT, wxT(""), wxDefaultPosition, wxSize(150, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); PopulateImageFormats(fmtList); fmtBoxSizer->Add(fmtList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // transparent / background color wxStaticBox *bgColorBox = new wxStaticBox(this, wxID_ANY, wxT("Background Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *bgColorBoxSizer = new wxStaticBoxSizer(bgColorBox, wxHORIZONTAL); optsSizer->Add(bgColorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enableBgColorCtrl = new wxCheckBox(this, ID_WMS_ENABLE_BGCOLOR, wxT("Transparent"), wxDefaultPosition, wxDefaultSize); if (BgColor == NULL) { Transparent = 1; enableBgColorCtrl->SetValue(true); } else { Transparent = 0; enableBgColorCtrl->SetValue(false); } bgColorBoxSizer->Add(enableBgColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bgColorBmp; GetButtonBitmap(BgColor, bgColorBmp); wxBitmapButton *bgColorCtrl = new wxBitmapButton(this, ID_WMS_BGCOLOR, bgColorBmp); if (Transparent) bgColorCtrl->Enable(false); else bgColorCtrl->Enable(true); bgColorBoxSizer->Add(bgColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // SQL sample wxString title = wxT("SQL sample"); if (RequestURL == true) title = wxT("URL sample"); wxStaticBox *sqlBox = new wxStaticBox(this, wxID_STATIC, title, wxDefaultPosition, wxDefaultSize); wxBoxSizer *sqlSizer = new wxStaticBoxSizer(sqlBox, wxVERTICAL); lyrBoxSizer->Add(sqlSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *sqlCtrl = new wxTextCtrl(this, ID_SQL_SAMPLE, Sql, wxDefaultPosition, wxSize(800, 70), wxTE_MULTILINE | wxTE_WORDWRAP | wxTE_READONLY); sqlSizer->Add(sqlCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *wms_ok = new wxButton(this, ID_VECTOR_COPY, wxT("&Copy")); buttonSizer->Add(wms_ok, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *wms_quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); buttonSizer->Add(wms_quit, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // appends event handlers Connect(ID_VECTOR_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WmsSqlSampleDialog::OnCopy); Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WmsSqlSampleDialog::OnQuit); Connect(ID_WMS_VERSION, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & WmsSqlSampleDialog::OnVersionChanged); Connect(ID_WMS_STYLE, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & WmsSqlSampleDialog::OnStyleChanged); Connect(ID_WMS_FORMAT, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & WmsSqlSampleDialog::OnMimeTypeChanged); Connect(ID_WMS_ENABLE_BGCOLOR, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & WmsSqlSampleDialog::OnTransparentChanged); Connect(ID_WMS_BGCOLOR, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WmsSqlSampleDialog::OnBgColorChanged); } unsigned char WmsSqlSampleDialog::ParseHex(const char *byte) { // parsing an Hex Byte unsigned char value = 0; switch (byte[0]) { case '0': value = 16 * 0; break; case '1': value = 16 * 1; break; case '2': value = 16 * 2; break; case '3': value = 16 * 3; break; case '4': value = 16 * 4; break; case '5': value = 16 * 5; break; case '6': value = 16 * 6; break; case '7': value = 16 * 7; break; case '8': value = 16 * 8; break; case '9': value = 16 * 9; break; case 'A': case 'a': value = 16 * 10; break; case 'B': case 'b': value = 16 * 11; break; case 'C': case 'c': value = 16 * 12; break; case 'D': case 'd': value = 16 * 13; break; case 'E': case 'e': value = 16 * 14; break; case 'F': case 'f': value = 16 * 15; break; }; switch (byte[1]) { case '0': value += 0; break; case '1': value += 1; break; case '2': value += 2; break; case '3': value += 3; break; case '4': value += 4; break; case '5': value += 5; break; case '6': value += 6; break; case '7': value += 7; break; case '8': value += 8; break; case '9': value += 9; break; case 'A': case 'a': value += 10; break; case 'B': case 'b': value += 11; break; case 'C': case 'c': value += 12; break; case 'D': case 'd': value += 13; break; case 'E': case 'e': value += 14; break; case 'F': case 'f': value += 15; break; }; return value; } void WmsSqlSampleDialog::ParseBgColor(const char *color, unsigned char *red, unsigned char *green, unsigned char *blue) { // parsing an Hex RGB color char byte[2]; *red = 0x80; *green = 0x80; *blue = 0x80; if (color == NULL) return; byte[0] = *(color + 0); byte[1] = *(color + 1); *red = ParseHex(byte); byte[0] = *(color + 2); byte[1] = *(color + 3); *green = ParseHex(byte); byte[0] = *(color + 4); byte[1] = *(color + 5); *blue = ParseHex(byte); } void WmsSqlSampleDialog::GetButtonBitmap(const char *bgcolor, wxBitmap & bmp) { // creating a Bitmap representing some Color unsigned char red; unsigned char green; unsigned char blue; ParseBgColor(bgcolor, &red, &green, &blue); wxColour color = wxColour(red, green, blue); bmp = wxBitmap(96, 64); wxMemoryDC *dc = new wxMemoryDC(bmp); dc->SetBrush(wxBrush(color)); dc->DrawRectangle(-1, -1, 98, 66); delete dc; } void WmsSqlSampleDialog::InitData() { // initializing the current configuration int ret; char *sql; char **results; int rows; int columns; char *url = (char *) malloc((Url.Len() * 4) + 1); strcpy(url, Url.ToUTF8()); char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT version, srs, format, style, is_queryable, flip_axes, " "is_cached, tiled, tile_width, tile_height, bgcolor, transparent " "FROM \"%s\".wms_getmap WHERE url = %Q AND layer_name = %Q", xdb_prefix, url, layer); free(url); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) { Version = NULL; ImageFormat = NULL; Style = NULL; Transparent = 1; BgColor = NULL; return; } for (int i = 1; i <= rows; i++) { // fetching data int len; const char *version = results[(i * columns) + 0]; const char *ref_sys = results[(i * columns) + 1]; const char *format = results[(i * columns) + 2]; const char *style = results[(i * columns) + 3]; const char *bgcolor = results[(i * columns) + 10]; Transparent = atoi(results[(i * columns) + 11]); if (version == NULL) Version = NULL; else { len = strlen(version); Version = (char *) malloc(len + 1); strcpy(Version, version); } if (format == NULL) ImageFormat = NULL; else { len = strlen(format); ImageFormat = (char *) malloc(len + 1); strcpy(ImageFormat, format); } if (style == NULL) Style = NULL; else { len = strlen(style); Style = (char *) malloc(len + 1); strcpy(Style, style); } if (bgcolor == NULL) BgColor = NULL; else { if (strlen(bgcolor) == 6) { BgColor = (char *) malloc(7); strcpy(BgColor, bgcolor); } else BgColor = NULL; } } sqlite3_free_table(results); } void WmsSqlSampleDialog::FindMaxVersion() { // identifying the Max WMS Version int ret; char *sql; char **results; int rows; int columns; MaxVersion = NULL; char *url = (char *) malloc((Url.Len() * 4) + 1); strcpy(url, Url.ToUTF8()); char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf("SELECT Max(s.value) FROM \"%s\".wms_getmap AS m " "JOIN \"%s\".wms_settings AS s ON (s.parent_id = m.id) " "WHERE m.url = %Q AND m.layer_name = %Q AND s.key = 'version'", xdb_prefix, xdb_prefix, url, layer); free(url); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // fetching data int len; const char *version = results[(i * columns) + 0]; if (version == NULL) MaxVersion = NULL; else { len = strlen(version); MaxVersion = (char *) malloc(len + 1); strcpy(MaxVersion, version); } } sqlite3_free_table(results); } void WmsSqlSampleDialog::PopulateStyles(wxComboBox * stlList) { // populating the Styles List int ret; char *sql; char **results; int rows; int columns; char *url = (char *) malloc((Url.Len() * 4) + 1); strcpy(url, Url.ToUTF8()); char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf("SELECT s.value FROM \"%s\".wms_getmap AS m " "JOIN \"%s\".wms_settings AS s ON (s.parent_id = m.id) " "WHERE m.url = %Q AND m.layer_name = %Q AND s.key = 'style' ORDER BY s.id", xdb_prefix, xdb_prefix, url, layer); free(url); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list const char *style = results[(i * columns) + 0]; wxString str = wxString::FromUTF8(style); stlList->Append(str); if (strcmp(Style, style) == 0) stlList->SetSelection(i - 1); } sqlite3_free_table(results); } void WmsSqlSampleDialog::PopulateImageFormats(wxComboBox * fmtList) { // populating the Image Formats List int ret; char *sql; char **results; int rows; int columns; char *url = (char *) malloc((Url.Len() * 4) + 1); strcpy(url, Url.ToUTF8()); char *db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); char *xdb_prefix = gaiaDoubleQuotedSql(db_prefix); free(db_prefix); char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); sql = sqlite3_mprintf("SELECT s.value FROM \"%s\".wms_getmap AS m " "JOIN \"%s\".wms_settings AS s ON (s.parent_id = m.id) " "WHERE m.url = %Q AND m.layer_name = %Q AND s.key = 'format' ORDER BY s.id", xdb_prefix, xdb_prefix, url, layer); free(url); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // populating the list const char *format = results[(i * columns) + 0]; wxString str = wxString::FromUTF8(format); fmtList->Append(str); if (strcmp(ImageFormat, format) == 0) fmtList->SetSelection(i - 1); } sqlite3_free_table(results); } int WmsSqlSampleDialog::CheckMarker(wxString & url) { // testing if some "?" marker is already defined int ret = url.Find('?'); if (ret == wxNOT_FOUND) return 0; return 1; } int WmsSqlSampleDialog::DoQueryWmsCoverage(const char *db_prefix, const char *cvg_name, int srid, char **url, int *swap_axes) { // querying the WMS Coverage definitions int len; int i; char **results; int rows; int columns; char *sql; int ret; char *xdb_prefix; int ok = 0; if (db_prefix == NULL) db_prefix = "MAIN"; xdb_prefix = gaiaDoubleQuotedSql(db_prefix); sql = sqlite3_mprintf("SELECT w.url, s.has_flipped_axes " "FROM \"%s\".wms_getmap AS w, \"%s\".spatial_ref_sys_aux AS s " "WHERE w.layer_name = %Q AND s.srid = %d", xdb_prefix, xdb_prefix, cvg_name, srid); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return 0; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *val = results[(i * columns) + 0]; if (*url != NULL) free(*url); len = strlen(val); *url = (char *) malloc(len + 1); strcpy(*url, val); val = results[(i * columns) + 1]; *swap_axes = atoi(val); ok = 1; } } sqlite3_free_table(results); if (!ok) return 0; return 1; } void WmsSqlSampleDialog::DoUpdateUrl() { // // updating the Request URL // char *str; char *buf; wxString col; wxTextCtrl *sqlCtrl = (wxTextCtrl *) FindWindow(ID_SQL_SAMPLE); wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WMS_VERSION); wxComboBox *stlList = (wxComboBox *) FindWindow(ID_WMS_STYLE); wxComboBox *mimeList = (wxComboBox *) FindWindow(ID_WMS_FORMAT); wxCheckBox *transparentCtrl = (wxCheckBox *) FindWindow(ID_WMS_ENABLE_BGCOLOR); char *db_prefix; int srid; const char *crs_prefix = "CRS"; char *crs = NULL; char *url = (char *) malloc((Url.Len() * 4) + 1); strcpy(url, Url.ToUTF8()); const char *version = Version; char *layer = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(layer, LayerName.ToUTF8()); char *style; char *format = ImageFormat; int swap_xy; double minx; double miny; double maxx; double maxy; int width = MapPanel->GetImageWidth(); int height = MapPanel->GetImageHeight(); int opaque; char *bg_color; int valid_bg_color = 1; char *request; int force_marker = CheckMarker(Url); MapPanel->GetBBox(&srid, &minx, &miny, &maxx, &maxy); if (DbPrefix.Len() == 0) db_prefix = NULL; else { db_prefix = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(db_prefix, DbPrefix.ToUTF8()); } if (!DoQueryWmsCoverage(db_prefix, layer, srid, &url, &swap_xy)) return; crs = sqlite3_mprintf("EPSG:%d", srid); wxString xstyle = stlList->GetValue(); if (xstyle.Len() == 0) style = NULL; else { style = (char *) malloc((xstyle.Len() * 4) + 1); strcpy(style, xstyle.ToUTF8()); } wxString xformat = mimeList->GetValue(); if (xformat.Len() == 0) format = NULL; else { format = (char *) malloc((xformat.Len() * 4) + 1); strcpy(format, xformat.ToUTF8()); } /* masking NULL arguments */ if (version == NULL) version = ""; if (strcmp(version, "1.3.0") != 0) swap_xy = 0; if (style == NULL) { style = (char *) malloc(1); *style = '\0'; } if (format == NULL) { format = (char *) malloc(1); *format = '\0'; } /* validating the background color */ if (BgColor == NULL) valid_bg_color = 0; else if (strlen(BgColor) != 6) valid_bg_color = 0; else { int i; for (i = 0; i < 6; i++) { char h = *(BgColor + i); if ((h >= '0' && h <= '9') || (h >= 'a' && h <= 'f') || (h >= 'A' && h <= 'F')) ; else valid_bg_color = 0; } } if (valid_bg_color) bg_color = sqlite3_mprintf("0x%s", BgColor); else bg_color = sqlite3_mprintf("0xFFFFFF"); if (transparentCtrl->GetValue()) opaque = 0; else opaque = 1; /* preparing the request URL */ if (strcmp(version, "1.3.0") < 0) { /* earlier versions of the protocol require SRS instead of CRS */ crs_prefix = "SRS"; } if (force_marker) { /* "?" marker not declared */ if (swap_xy) request = sqlite3_mprintf("%s?SERVICE=WMS&REQUEST=GetMap&VERSION=%s" "&LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f" "&WIDTH=%d&HEIGHT=%d&STYLES=%s&FORMAT=%s" "&TRANSPARENT=%s&BGCOLOR=%s", url, version, layer, crs_prefix, crs, miny, minx, maxy, maxx, width, height, style, format, (opaque == 0) ? "TRUE" : "FALSE", bg_color); else request = sqlite3_mprintf("%s?SERVICE=WMS&REQUEST=GetMap&VERSION=%s" "&LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f" "&WIDTH=%d&HEIGHT=%d&STYLES=%s&FORMAT=%s" "&TRANSPARENT=%s&BGCOLOR=%s", url, version, layer, crs_prefix, crs, minx, miny, maxx, maxy, width, height, style, format, (opaque == 0) ? "TRUE" : "FALSE", bg_color); } else { /* "?" marker already defined */ if (swap_xy) request = sqlite3_mprintf("%sSERVICE=WMS&REQUEST=GetMap&VERSION=%s" "&LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f" "&WIDTH=%d&HEIGHT=%d&STYLES=%s&FORMAT=%s" "&TRANSPARENT=%s&BGCOLOR=%s", url, version, layer, crs_prefix, crs, miny, minx, maxy, maxx, width, height, style, format, (opaque == 0) ? "TRUE" : "FALSE", bg_color); else request = sqlite3_mprintf("%sSERVICE=WMS&REQUEST=GetMap&VERSION=%s" "&LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f" "&WIDTH=%d&HEIGHT=%d&STYLES=%s&FORMAT=%s" "&TRANSPARENT=%s&BGCOLOR=%s", url, version, layer, crs_prefix, crs, minx, miny, maxx, maxy, width, height, style, format, (opaque == 0) ? "TRUE" : "FALSE", bg_color); } Sql = wxString::FromUTF8(request); sqlite3_free(request); sqlCtrl->SetValue(Sql); if (url != NULL) free(url); if (layer != NULL) free(layer); if (db_prefix != NULL) free(db_prefix); if (crs != NULL) sqlite3_free(crs); if (style != NULL) free(style); if (format != NULL) free(format); if (bg_color != NULL) sqlite3_free(bg_color); } void WmsSqlSampleDialog::DoUpdateSql() { // // updating the SQL query // if (RequestURL == true) { DoUpdateUrl(); return; } char *str; char *buf; wxString col; wxTextCtrl *sqlCtrl = (wxTextCtrl *) FindWindow(ID_SQL_SAMPLE); wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WMS_VERSION); wxComboBox *stlList = (wxComboBox *) FindWindow(ID_WMS_STYLE); wxComboBox *mimeList = (wxComboBox *) FindWindow(ID_WMS_FORMAT); wxCheckBox *transparentCtrl = (wxCheckBox *) FindWindow(ID_WMS_ENABLE_BGCOLOR); Sql = wxT("SELECT RL2_GetMapImageFromWMS("); if (DbPrefix.Len() == 0) Sql += wxT("NULL, "); else { str = (char *) malloc((DbPrefix.Len() * 4) + 1); strcpy(str, DbPrefix.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // coverage name str = (char *) malloc((LayerName.Len() * 4) + 1); strcpy(str, LayerName.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // bounding box wxString bbox; MapPanel->DoPrepareBBox(bbox); Sql += bbox; // image width and height buf = sqlite3_mprintf("%d, %d, ", MapPanel->GetImageWidth(), MapPanel->GetImageHeight()); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; // WMS version switch (versionBox->GetSelection()) { case 1: Sql += wxT("'1.1.0', "); break; case 2: Sql += wxT("'1.1.1', "); break; case 3: Sql += wxT("'1.3.0', "); break; default: Sql += wxT("'1.0.0', "); break; }; // style wxString style = stlList->GetValue(); if (style.Len() == 0) Sql += wxT("'default', "); else { str = (char *) malloc((style.Len() * 4) + 1); strcpy(str, style.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // MIME type wxString format = mimeList->GetValue(); if (format.Len() == 0) Sql += wxT("'default', "); else { str = (char *) malloc((format.Len() * 4) + 1); strcpy(str, format.ToUTF8()); buf = sqlite3_mprintf("%Q, ", str); free(str); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // bgColor if (BgColor == NULL) Sql += wxT("'#ffffff', "); else { buf = sqlite3_mprintf("'#%s', ", BgColor); col = wxString::FromUTF8(buf); sqlite3_free(buf); Sql += col; } // transparent if (transparentCtrl->GetValue()) Sql += wxT("1"); else Sql += wxT("0"); Sql += wxT(");"); sqlCtrl->SetValue(Sql); } void WmsSqlSampleDialog::OnVersionChanged(wxCommandEvent & WXUNUSED(event)) { // // WMS Version selection changed // DoUpdateSql(); } void WmsSqlSampleDialog::OnStyleChanged(wxCommandEvent & WXUNUSED(event)) { // // Style selection changed // DoUpdateSql(); } void WmsSqlSampleDialog::OnMimeTypeChanged(wxCommandEvent & WXUNUSED(event)) { // // MIME Type selection changed // DoUpdateSql(); } void WmsSqlSampleDialog::OnTransparentChanged(wxCommandEvent & WXUNUSED(event)) { // // Transparent selection changed // wxBitmapButton *btn = (wxBitmapButton *) FindWindow(ID_WMS_BGCOLOR); if (Transparent == 1) { Transparent = 0; if (BgColor != NULL) free(BgColor); BgColor = (char *) malloc(7); strcpy(BgColor, "ffffff"); wxBitmap bmp; GetButtonBitmap(BgColor, bmp); btn->SetBitmapLabel(bmp); btn->Enable(true); } else { Transparent = 0; btn->Enable(false); if (BgColor != NULL) { free(BgColor); BgColor = NULL; } } DoUpdateSql(); } void WmsSqlSampleDialog::OnBgColorChanged(wxCommandEvent & WXUNUSED(event)) { // BgColor selection wxColourData initColor; int ret; unsigned char red; unsigned char green; unsigned char blue; ParseBgColor(BgColor, &red, &green, &blue); wxColour color = wxColour(red, green, blue); initColor.SetChooseFull(false); initColor.SetColour(color); wxColourDialog colorDialog(this, &initColor); ret = colorDialog.ShowModal(); if (ret == wxID_OK) { wxColourData colorData = colorDialog.GetColourData(); color = colorData.GetColour(); char byte[3]; sprintf(byte, "%02x", color.Red()); memcpy(BgColor, byte, 2); sprintf(byte, "%02x", color.Green()); memcpy(BgColor + 2, byte, 2); sprintf(byte, "%02x", color.Blue()); memcpy(BgColor + 4, byte, 2); *(BgColor + 6) = '\0'; wxBitmap bmp; GetButtonBitmap(BgColor, bmp); wxBitmapButton *bgColorCtrl = (wxBitmapButton *) FindWindow(ID_WMS_BGCOLOR); bgColorCtrl->SetBitmapLabel(bmp); DoUpdateSql(); } } void WmsSqlSampleDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Map Request (SQL statement) // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(Sql)); wxTheClipboard->Close(); } } void WmsSqlSampleDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } |
Changes to Main.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 30 31 32 33 34 35 36 37 38 39 40 41 42 43 .. 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 ... 109 110 111 112 113 114 115 116 117 118 119 120 121 122 ... 339 340 341 342 343 344 345 346 347 348 349 350 351 352 ... 447 448 449 450 451 452 453 454 455 456 457 458 459 460 ... 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 ... 561 562 563 564 565 566 567 568 569 570 571 572 573 574 ... 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 ... 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 ... 686 687 688 689 690 691 692 693 694 695 696 697 698 699 ... 734 735 736 737 738 739 740 741 742 743 744 745 746 747 ... 861 862 863 864 865 866 867 868 869 870 871 872 873 874 ... 921 922 923 924 925 926 927 928 929 930 931 932 933 934 ... 943 944 945 946 947 948 949 950 951 952 953 954 955 956 ... 969 970 971 972 973 974 975 976 977 978 979 980 981 982 .... 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 .... 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 .... 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 .... 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 .... 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 .... 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 .... 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 .... 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 .... 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 .... 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 .... 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 .... 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 .... 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 .... 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 .... 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 .... 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 .... 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 .... 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 .... 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 .... 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 .... 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 .... 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 .... 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 .... 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 .... 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 .... 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 .... 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 .... 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 .... 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 .... 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 .... 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 .... 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 .... 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 .... 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 .... 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 .... 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 .... 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 .... 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 ..... 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 ..... 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 ..... 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 ..... 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 ..... 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 15989 15990 15991 15992 15993 15994 15995 15996 15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 17205 17206 17207 17208 17209 17210 17211 17212 17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 |
/* / Main.cpp / the main core of spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 1.7, 2014 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2014 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "wx/filename.h" #include "wx/config.h" #include "wx/tokenzr.h" #include <spatialite.h> #include <proj_api.h> #include <geos_c.h> // // ICONs in XPM format [universally portable] // #include "icons/icon.xpm" #include "icons/icon_info.xpm" #include "icons/create_new.xpm" ................................................................................ #include "icons/sanegeom.xpm" #include "icons/wfs.xpm" #include "icons/dxf.xpm" #include "icons/map_go.xpm" #include "icons/security_lock.xpm" #include "icons/security_relaxed.xpm" #include "icons/security_rdonly.xpm" #if defined(_WIN32) && !defined(__MINGW32__) #define unlink _unlink #endif IMPLEMENT_APP(MyApp) bool MyApp::OnInit() ................................................................................ { // // main GUI frame constructor // setlocale(LC_ALL, ""); // forcing DECIMAL POINT IS COMMA setlocale(LC_NUMERIC, "C"); // creating the internal WMS Cache WmsCache = create_wms_cache(); ::wxInitAllImageHandlers(); MapPanel = NULL; ................................................................................ BtnSqlLog = new wxBitmap(sql_log_xpm); BtnDbStatus = new wxBitmap(db_status_xpm); BtnCheckGeom = new wxBitmap(checkgeom_xpm); BtnSaneGeom = new wxBitmap(sanegeom_xpm); BtnWFS = new wxBitmap(wfs_xpm); BtnDXF = new wxBitmap(dxf_xpm); BtnMap = new wxBitmap(map_go_xpm); // // setting up the application icon // wxIcon MyIcon(icon_xpm); SetIcon(MyIcon); ................................................................................ wxT("&Optimizing current SQLite DB [VACUUM]")); menuItem->SetBitmap(*BtnVacuum); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, ID_Attach, wxT("&Attach DataBase")); menuItem->SetBitmap(*BtnAttach); menuFile->Append(menuItem); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, ID_MapPanel, wxT("Map &Panel"), wxT("Map &Panel"), wxITEM_CHECK); menuFile->Append(menuItem); menuFile->AppendSeparator(); wxMenu *advancedMenu = new wxMenu(); menuItem = ................................................................................ menuItem = new wxMenuItem(advancedMenu, ID_LoadXL, wxT("Load &XLS")); menuItem->SetBitmap(*BtnLoadXL); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_VirtualXL, wxT("Virtual &XLS")); menuItem->SetBitmap(*BtnVirtualXL); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_Network, wxT("Build &Network")); menuItem->SetBitmap(*BtnNetwork); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_Exif, wxT("Import &EXIF photos")); menuItem->SetBitmap(*BtnExif); advancedMenu->Append(menuItem); menuItem = ................................................................................ // // setting up menu initial state // menuBar->Enable(ID_Disconnect, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_Vacuum, false); menuBar->Enable(ID_MapPanel, false); menuBar->Enable(ID_SqlScript, false); menuBar->Enable(ID_QueryViewComposer, false); menuBar->Enable(ID_LoadShp, false); menuBar->Enable(ID_VirtualShp, false); menuBar->Enable(ID_LoadTxt, false); menuBar->Enable(ID_VirtualTxt, false); ................................................................................ wxT("Disconnecting current SQLite DB")); toolBar->AddTool(ID_Vacuum, wxT("Optimizing current SQLite DB [VACUUM]"), *BtnVacuum, wxNullBitmap, wxITEM_NORMAL, wxT("Optimizing current SQLite DB [VACUUM]")); toolBar->AddTool(ID_Attach, wxT("Attach DataBase"), *BtnAttach, wxNullBitmap, wxITEM_NORMAL, wxT("Attach DataBase")); toolBar->AddTool(ID_MapPanel, wxT("Map Panel"), *BtnMap, wxNullBitmap, wxITEM_CHECK, wxT("Map Panel")); toolBar->AddTool(ID_SqlLog, wxT("SQL Log"), *BtnSqlLog, wxNullBitmap, wxITEM_CHECK, wxT("SQL Log")); toolBar->AddTool(ID_DbStatus, wxT("DB Status"), *BtnDbStatus, wxNullBitmap, wxITEM_NORMAL, wxT("DB Status")); toolBar->AddTool(ID_CheckGeom, wxT("Check Geometries"), *BtnCheckGeom, wxNullBitmap, wxITEM_NORMAL, wxT("Check Geometries")); toolBar->AddTool(ID_SaneGeom, wxT("Sanitize Geometries"), *BtnSaneGeom, wxNullBitmap, wxITEM_NORMAL, wxT("Sanitize Geometries")); toolBar->AddTool(ID_SqlScript, wxT("Execute SQL script"), *BtnSqlScript, wxNullBitmap, wxITEM_NORMAL, wxT("Execute SQL script")); toolBar->AddTool(ID_QueryViewComposer, wxT("Query/View Composer"), *BtnQueryComposer, wxNullBitmap, wxITEM_NORMAL, wxT("Query/View Composer")); ................................................................................ wxITEM_NORMAL, wxT("Load DBF")); toolBar->AddTool(ID_VirtualDbf, wxT("Virtual DBF"), *BtnVirtualDbf, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual DBF")); toolBar->AddTool(ID_LoadXL, wxT("Load XLS"), *BtnLoadXL, wxNullBitmap, wxITEM_NORMAL, wxT("Load XLS")); toolBar->AddTool(ID_VirtualXL, wxT("Virtual XLS"), *BtnVirtualXL, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual XLS")); toolBar->AddTool(ID_Network, wxT("Build Network"), *BtnNetwork, wxNullBitmap, wxITEM_NORMAL, wxT("Build Network")); toolBar->AddTool(ID_Exif, wxT("Import EXIF photos"), *BtnExif, wxNullBitmap, wxITEM_NORMAL, wxT("Import EXIF photos")); toolBar->AddTool(ID_GpsPics, wxT("Import GPS photos"), *BtnGpsPics, wxNullBitmap, wxITEM_NORMAL, wxT("Import GPS photos")); toolBar->AddTool(ID_LoadXml, wxT("Import XML Documents"), *BtnLoadXml, wxNullBitmap, wxITEM_NORMAL, wxT("Import XML Documents")); toolBar->AddTool(ID_WFS, wxT("Import data from WFS datasource"), *BtnWFS, ................................................................................ // // setting up the toolbar initial state // toolBar->EnableTool(ID_Disconnect, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_Vacuum, false); toolBar->EnableTool(ID_MapPanel, false); toolBar->EnableTool(ID_SqlScript, false); toolBar->EnableTool(ID_QueryViewComposer, false); toolBar->EnableTool(ID_LoadShp, false); toolBar->EnableTool(ID_VirtualShp, false); toolBar->EnableTool(ID_LoadTxt, false); toolBar->EnableTool(ID_VirtualTxt, false); ................................................................................ (wxObjectEventFunction) & MyFrame::OnMemoryDbNew); Connect(ID_MemoryDbClock, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbClock); Connect(ID_MemoryDbSave, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbSave); Connect(ID_Vacuum, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnVacuum); Connect(ID_MapPanel, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMapPanel); Connect(ID_SqlScript, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnSqlScript); Connect(ID_QueryViewComposer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnQueryViewComposer); Connect(ID_LoadShp, wxEVT_COMMAND_MENU_SELECTED, ................................................................................ delete BtnMemDbClock; if (BtnMemDbSave != NULL) delete BtnMemDbSave; if (BtnVacuum != NULL) delete BtnVacuum; if (BtnMap != NULL) delete BtnMap; if (BtnSqlScript != NULL) delete BtnSqlScript; if (BtnQueryComposer != NULL) delete BtnQueryComposer; if (BtnLoadShp != NULL) delete BtnLoadShp; if (BtnVirtualShp != NULL) ................................................................................ delete[]Charsets; if (CharsetsNames) delete[]CharsetsNames; if (WmsCache != NULL) destroy_wms_cache(WmsCache); if (RL2PrivateData) rl2_cleanup_private(RL2PrivateData); } void MyFrame::SaveConfig() { // // saves layout configuration // ................................................................................ config->Write(wxT("WfsGetCapabilitiesURL"), WfsGetCapabilitiesURL); config->Write(wxT("HttpProxy"), HttpProxy); config->Write(wxT("ReadOnlyConnection"), ReadOnlyConnection); config->Write(wxT("RL2MaxThreads"), RL2MaxThreads); config->Write(wxT("MapMultiThreadingEnabled"), MapMultiThreadingEnabled); config->Write(wxT("MapMaxThreads"), MapMaxThreads); config->Write(wxT("MapAutoTransformEnabled"), MapAutoTransformEnabled); delete config; } void MyFrame::LoadConfig(wxString & externalPath) { // // loads layout configuration ................................................................................ config->Read(wxT("WfsGetCapabilitiesURL"), &WfsGetCapabilitiesURL); config->Read(wxT("HttpProxy"), &HttpProxy); config->Read(wxT("ReadOnlyConnection"), &ReadOnlyConnection); config->Read(wxT("RL2MaxThreads"), &RL2MaxThreads); config->Read(wxT("MapMultiThreadingEnabled"), &MapMultiThreadingEnabled); config->Read(wxT("MapMaxThreads"), &MapMaxThreads); config->Read(wxT("MapAutoTransformEnabled"), &MapAutoTransformEnabled); delete config; Hide(); if (externalPath.Len() > 0) { // applying the external path wxFileName file(externalPath); ConfigDir = file.GetPath(); ................................................................................ { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); UpdateStatusBar(); } } Show(); if (AutoFDOmsg.Len() > 0) { wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoFDOmsg = wxT(""); } ................................................................................ { // // EXIT - event handler // Close(true); } void MyFrame::OnClose(wxCloseEvent & event) { // // immedtiately before closing the main window // wxString db_path = SqlitePath; CloseDB(); SqlitePath = db_path; ................................................................................ str += wxT("RTTOPO version ") + wxString::FromUTF8(ver) + wxT("\n"); } if (GetLibXml2Version(ver)) { // printing out the LIBXML2 version if supported str += wxT("LIBXML2 version ") + wxString::FromUTF8(ver) + wxT("\n"); } str += wxT("\nSQLite's extensions: 'SpatiaLite', 'VirtualShape', 'VirtualDbf',\n"); str += wxT("'VirtualXL', 'VirtualText', 'VirtualXPath', 'VirtualNetwork',\n"); str += wxT("'RTree', 'MbrCache', 'VirtualBBox', 'VirtualFDO', 'VirtualGPKG',\n"); str += wxT("'RasterLite2'\n\n"); strcpy(ver, spatialite_target_cpu()); ................................................................................ menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ mode2 = false; mode3 = false; } wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Disconnect, mode); menuBar->Enable(ID_Vacuum, mode); menuBar->Enable(ID_MapPanel, mode); menuBar->Enable(ID_SqlScript, mode); menuBar->Enable(ID_QueryViewComposer, mode2); menuBar->Enable(ID_LoadShp, mode); menuBar->Enable(ID_VirtualShp, mode); menuBar->Enable(ID_LoadTxt, mode); menuBar->Enable(ID_VirtualTxt, mode); ................................................................................ menuBar->Enable(ID_SqlLog, mode); menuBar->Enable(ID_DbStatus, mode); menuBar->Enable(ID_CheckGeom, mode); menuBar->Enable(ID_SaneGeom, mode); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Disconnect, mode); toolBar->EnableTool(ID_Vacuum, mode); toolBar->EnableTool(ID_MapPanel, mode); toolBar->EnableTool(ID_SqlScript, mode); toolBar->EnableTool(ID_QueryViewComposer, mode2); toolBar->EnableTool(ID_LoadShp, mode); toolBar->EnableTool(ID_VirtualShp, mode); toolBar->EnableTool(ID_LoadTxt, mode); toolBar->EnableTool(ID_VirtualTxt, mode); ................................................................................ menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ menuBar->Enable(ID_CreateNew, true); menuBar->Enable(ID_Disconnect, false); menuBar->Enable(ID_MemoryDbLoad, true); menuBar->Enable(ID_MemoryDbNew, true); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_Vacuum, false); menuBar->Enable(ID_MapPanel, false); menuBar->Enable(ID_SqlScript, false); menuBar->Enable(ID_QueryViewComposer, false); menuBar->Enable(ID_LoadShp, false); menuBar->Enable(ID_VirtualShp, false); menuBar->Enable(ID_LoadTxt, false); menuBar->Enable(ID_VirtualTxt, false); ................................................................................ toolBar->EnableTool(ID_CreateNew, true); toolBar->EnableTool(ID_Disconnect, false); toolBar->EnableTool(ID_MemoryDbLoad, true); toolBar->EnableTool(ID_MemoryDbNew, true); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_Vacuum, false); toolBar->EnableTool(ID_MapPanel, false); toolBar->EnableTool(ID_SqlScript, false); toolBar->EnableTool(ID_QueryViewComposer, false); toolBar->EnableTool(ID_LoadShp, false); toolBar->EnableTool(ID_VirtualShp, false); toolBar->EnableTool(ID_LoadTxt, false); toolBar->EnableTool(ID_VirtualTxt, false); ................................................................................ menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ } ret = sqlite3_backup_finish(backup); sqlite3_close(extSqlite); // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); ................................................................................ menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); menuBar->Enable(ID_MemoryDbSave, true); menuBar->Enable(ID_MemoryDbClock, true); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); toolBar->EnableTool(ID_MemoryDbSave, true); toolBar->EnableTool(ID_MemoryDbClock, true); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ ok = true; } } } sqlite3_free_table(results); return ok; } void MyFrame::OnVacuum(wxCommandEvent & WXUNUSED(event)) { // // performing a VACUUM in order to reorganize the current DB // char *errMsg = NULL; ................................................................................ NetworkDialog dlg; int ret; wxString table; wxString from; wxString to; bool isNoGeometry; wxString geom; wxString name; bool isGeomLength; wxString cost; bool isBidirectional; bool isOneWays; wxString oneWayToFrom; wxString oneWayFromTo; bool aStarSupported; wxString dataTableName; wxString virtualTableName; dlg.Create(this); ret = dlg.ShowModal(); if (ret == wxID_OK) { table = dlg.GetTableName(); from = dlg.GetFromColumn(); to = dlg.GetToColumn(); isNoGeometry = dlg.IsNoGeometry(); geom = dlg.GetGeomColumn(); name = dlg.GetNameColumn(); isGeomLength = dlg.IsGeomLength(); cost = dlg.GetCostColumn(); isBidirectional = dlg.IsBidirectional(); isOneWays = dlg.IsOneWays(); oneWayToFrom = dlg.GetOneWayToFrom(); oneWayFromTo = dlg.GetOneWayFromTo(); aStarSupported = dlg.IsAStarSupported(); dataTableName = dlg.GetDataTable(); virtualTableName = dlg.GetVirtualTable(); BuildNetwork(table, from, to, isNoGeometry, geom, name, isGeomLength, cost, isBidirectional, isOneWays, oneWayFromTo, oneWayToFrom, aStarSupported, dataTableName, virtualTableName); } } void MyFrame::OnImportXmlDocuments(wxCommandEvent & WXUNUSED(event)) { // // importing XML Documents ................................................................................ if (NoData.Len() == 0) { // creating a default NO-DATA value no_data = DefaultNoData(SampleType, PixelType, NumBands); } else { no_data = ParseNoData(NoData, SampleType, PixelType, NumBands); if (no_data == NULL) { wxMessageBox(wxT("ERROR: invalid NO-DATA string"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } } ................................................................................ MemoryDatabase = false; return false; } // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); ................................................................................ wxMessageBox(wxT("Unable to activate FOREIGN_KEY constraints"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); } // setting RL2 MaxThreads char sqlmax[1024]; sprintf(sqlmax, "SELECT RL2_SetMaxThreads(%d)", RL2MaxThreads); sqlite3_exec(SqliteHandle, sqlmax, NULL, 0, &errMsg); AutoFDOStart(); AutoGPKGStart(); InitTableTree(); LoadHistory(); return true; } ................................................................................ void MyFrame::CloseDB() { // // disconnecting current SQLite DB // if (!SqliteHandle) return; AutoFDOStop(); AutoGPKGStop(); if (AutoFDOmsg.Len() > 0) wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); if (AutoGPKGmsg.Len() > 0) wxMessageBox(AutoGPKGmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, ................................................................................ SpliteInternalCache = NULL; SqlitePath = wxT(""); ReadOnlyConnection = false; MemoryDatabase = false; ResetSecurity(); AttachedList.Flush(); ClearTableTree(); } bool MyFrame::CreateDB() { // creating a new, empty SQLite DB int ret; char path[1024]; ................................................................................ MemoryDatabase = false; return false; } // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); ................................................................................ } sqlite3_free_table(results); if (count > 0) return; // all right, it's empty: proceding to initialize strcpy(sql, "SELECT InitSpatialMetadata(1)"); ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to initialite SpatialMetadata: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } } ................................................................................ wxString tblName; wxString sql; char *xsql; bool status = false; // fetching any defined Spatial Index sql = wxT ("SELECT f_table_name, f_geometry_column FROM main.geometry_columns WHERE spatial_index_enabled = 1"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); int ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); free(xsql); if (ret != SQLITE_OK) { ................................................................................ } } sqlite3_finalize(stmt); if (success == false) return false; return true; } void MyFrame::InitTableTree() { // loads the table TREE list int i; char **results; int rows; ................................................................................ if (MemoryDatabase == true) { wxString memory = wxT("MEMORY-DB"); TableTree->SetPath(memory); } else TableTree->SetPath(SqlitePath); TableTree->FlushAll(); if (ExistsTopologies()) { // fetching topologies sql = wxT("SELECT topology_name, srid, has_z "); sql += wxT(" FROM main.topologies"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); ................................................................................ int srid = atoi(results[(i * columns) + 1]); RasterCoverageSet coverage(name, srid); TableTree->AddRasterCoverage(&coverage); } } sqlite3_free_table(results); } if (ExistsVectorCoverages()) { // fetching Vector Coverages sql = wxT("SELECT 'table', c.coverage_name, g.srid, g.geometry_type "); sql += wxT("FROM main.vector_coverages AS c "); sql += wxT("JOIN main.geometry_columns AS g ON ("); sql += wxT("c.topology_name IS NULL AND c.network_name IS NULL AND "); sql += wxT("Lower(c.f_table_name) = Lower(g.f_table_name) AND "); ................................................................................ } } sqlite3_free_table(results); } // fetching persistent tables and views sql = wxT ("SELECT name, sql, type FROM main.sqlite_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); int ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); free(xsql); if (ret != SQLITE_OK) { ................................................................................ list = new TableViewList(); if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; createSql = results[(i * columns) + 1]; type = results[(i * columns) + 2]; if (strstr(createSql, " VIRTUAL ") || strstr(createSql, " virtual ")) virtualTable = true; else virtualTable = false; tblName = wxString::FromUTF8(name); if (strcmp(type, "view") == 0) list->Add(tblName, true, false); else list->Add(tblName, false, virtualTable); } } sqlite3_free_table(results); ................................................................................ FindFdoOgrGeometries(list); else FindGeometries(list); ptv = list->GetFirst(); while (ptv != NULL) { // inserting items into the Tree Control View if (ptv->IsView() == true) TableTree->AddView(ptv->GetName(), ptv->IsGeometry()); else if (ptv->IsGeoPackageGeometry() == true) TableTree->AddGeoPackageTable(ptv->GetName()); else if (ptv->IsGeoPackageVirtualGeometry() == true) TableTree->AddGeoPackageVirtualTable(ptv->GetName()); else if (ptv->IsFdoOgrGeometry() == true) TableTree->AddFdoOgrTable(ptv->GetName()); ................................................................................ ptv = ptv->GetNext(); } delete list; // fetching temporary tables and views sql = wxT ("SELECT name, sql, type FROM sqlite_temp_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); free(xsql); if (ret != SQLITE_OK) { ................................................................................ if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; if (atoi(results[(i * columns) + 1]) == 1) index = true; else index = false; if (atoi(results[(i * columns) + 1]) == 2) cached = true; else cached = false; ................................................................................ ("were native SpatiaLite ones in a completely transparent way.\n"); TableTree->SetFdoOgrMode(true); } return; } TableTree->SetFdoOgrMode(false); } void MyFrame::AutoFDOStop() { // // trying to stop the FDO-OGR auto-wrapper // int ret; ................................................................................ // creating the VirtualGPKG table // xname = sqlite3_mprintf("vgpkg_%s", p->GetName()); xname2 = gaiaDoubleQuotedSql(xname); xname3 = gaiaDoubleQuotedSql(p->GetName()); sprintf(sql, "CREATE VIRTUAL TABLE \"%s\" USING VirtualGPKG(\"%s\")", xname2, xname3); free(xname); free(xname2); free(xname3); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; if (count < 5) gpkgNames[count] = ................................................................................ free(db_prefix); xname = sqlite3_mprintf("vgpkg_%s", p->GetName()); xname2 = gaiaDoubleQuotedSql(xname); xname3 = gaiaDoubleQuotedSql(p->GetName()); sprintf(sql, "CREATE VIRTUAL TABLE \"%s\".\"%s\" USING VirtualGPKG(\"%s\", \"%s\")", xdb_prefix, xname2, xdb_prefix, xname3); free(xname); free(xname2); free(xname3); free(xdb_prefix); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; wxString tbl_name = wxString::FromUTF8(p->GetName()); ................................................................................ wxT ("The currently connected DB-file contains one or more harmful Triggers.\n"); msg += wxT("Such a condition could eventually cause serious security breaches."); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_EXCLAMATION, this); return false; } MyStatusBar::MyStatusBar(MyFrame * parent):wxStatusBar(parent) { // constructor Parent = parent; int widths[2]; widths[0] = 20; ................................................................................ void MyStatusBar::SetText(wxString & msg) { wxStatusBar *sb = Parent->GetStatusBar(); if (!sb) return; sb->SetStatusText(msg, 1); } void MyFrame::GetHelp(wxString & html) { // // return the HTML Help // html = wxT("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"); html += wxT("<html>"); html += wxT("<head>"); html += wxT ("<meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">"); html += wxT("<title>SQLite + SpatiaLite quick Help</title>"); html += wxT("</head>"); html += wxT("<body bgcolor=\"#e8e8e8\">"); html += wxT("<h1><a name=\"index\">SQLite + SpatiaLite quick Help</a></h1>"); html += wxT("<table cellspacing=\"2\" cellpadding=\"2\">"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\">Index of contents</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">1.</td><td bgcolor=\"#f0fff0\"><a href=\"#c1\">SQLite SQL syntax</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">2.</td><td bgcolor=\"#f0fff0\"><a href=\"#c2\">SQLite SQL functions</a><ul>"); html += wxT("<li><a href=\"#c21\">ordinary functions</a></li>"); html += wxT("<li><a href=\"#c22\">aggregate functions</a></li>"); html += wxT("</ul></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">3.</td><td bgcolor=\"#f0fff0\"><a href=\"#c3\">SpatiaLite SQL Spatial functions</a><ul>"); html += wxT ("<li><a href=\"#version\">version info [and build options] functions</a></li>"); html += wxT("<li><a href=\"#generic\">generic functions</a></li>"); html += wxT("<li><a href=\"#math\">math functions</a></li>"); html += wxT ("<li><a href=\"#error\">SQL functions reporting GEOS / RTTOPO errors and warnings</a></li>"); html += wxT ("<li><a href=\"#length_cvt\">length/distance unit-conversion functions</a></li>"); html += wxT ("<li><a href=\"#dms_cvt\">DD/DMS conversion functions (longitude/latitude)</a></li>"); html += wxT("<li><a href=\"#blob\">utility functions for BLOB objects</a></li>"); html += wxT ("<li><a href=\"#c30\">utility functions [non-standard] for geometric objects</a></li>"); html += wxT ("<li><a href=\"#c31\">functions for constructing a geometric object given its Well-known Text Representation</a></li>"); html += wxT ("<li><a href=\"#c32\">functions for constructing a geometric object given its Well-known Binary Representation</a></li>"); html += wxT ("<li><a href=\"#c33\">functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object</a></li>"); html += wxT ("<li><a href=\"#c33misc\">functions supporting exotic geometric formats</a></li>"); html += wxT("<li><a href=\"#c34\">functions on type Geometry</a></li>"); html += wxT ("<li><a href=\"#repair\">Functions attempting to repair malformed Geometries</a></li>"); html += wxT("<li><a href=\"#compress\">Geometry-compression functions</a></li>"); html += wxT("<li><a href=\"#cast\">Geometry-type casting functions</a></li>"); html += wxT ("<li><a href=\"#dims-cast\">Space-dimensions casting functions</a></li>"); html += wxT("<li><a href=\"#c35\">functions on type Point</a></li>"); html += wxT ("<li><a href=\"#c361\">functions on type Curve [Linestring or Ring]</a></li>"); html += wxT ("<li><a href=\"#c36\">functions on type Surface [Polygon or Ring]</a></li>"); html += wxT("<li><a href=\"#c37\">functions on type Polygon</a></li>"); html += wxT("<li><a href=\"#c38\">functions on type GeomCollection</a></li>"); html += wxT ("<li><a href=\"#c39\">functions testing approximative spatial relationships via MBRs</a></li>"); html += wxT ("<li><a href=\"#c40\">functions testing spatial relationships</a></li>"); html += wxT ("<li><a href=\"#c41\">functions implementing spatial operators</a></li>"); html += wxT ("<li><a href=\"#c42\">functions for coordinate transformations</a></li>"); html += wxT ("<li><a href=\"#c43\">functions for Spatial-MetaData and Spatial-Index handling</a></li>"); html += wxT ("<li><a href=\"#c43metacatalog\">functions for MetaCatalog and related Statistics</a></li>"); html += wxT ("<li><a href=\"#c43style\">functions supporting SLD/SE Styled Layers</a></li>"); html += wxT ("<li><a href=\"#c43isometa\">functions supporting ISO Metadata</a></li>"); html += wxT ("<li><a href=\"#c43fdo\">functions implementing FDO/OGR compatibily</a></li>"); html += wxT("<li><a href=\"#c44\">functions for MbrCache-based queries</a></li>"); html += wxT ("<li><a href=\"#c45\">functions for R*Tree-based queries (Geometry Callbacks)</a></li>"); html += wxT("<li><a href=\"#xmlBlob\">SQL functions supporting XmlBLOB</a></li>"); html += wxT("</ul></td></tr>"); html += wxT("</table>"); html += wxT("<h3><a name=\"c1\">SQLite SQL syntax</a></h3>"); html += wxT("<table cellspacing=\"4\" cellpadding=\"2\"width=\"100%\">"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ALTER TABLE</td><td bgcolor=\"#f0fff0\">sql-statement ::= ALTER TABLE [database-name .] table-name alteration<br>"); html += wxT("alteration ::= RENAME TO new-table-name<br>"); html += wxT("alteration ::= ADD [COLUMN] column-def<br></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ANALYZE</td><td bgcolor=\"#f0fff0\">sql-statement ::= ANALYZE<br>"); html += wxT("sql-statement ::= ANALYZE database-name<br>"); html += wxT("sql-statement ::= ANALYZE [database-name .] table-name<br></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ATTACH DATABASE</td><td bgcolor=\"#f0fff0\">sql-statement ::= ATTACH [DATABASE] database-filename AS database-name</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BEGIN TRANSACTION</td><td bgcolor=\"#f0fff0\">sql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= END [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]<br></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">COMMIT TRANSACTION</td><td bgcolor=\"#f0fff0\">sql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= END [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]<br></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CREATE INDEX</td><td bgcolor=\"#f0fff0\">sql-statement ::= CREATE [UNIQUE] INDEX [IF NOT EXISTS] [database-name .] index-name<br>"); html += wxT("ON table-name ( column-name [, column-name]* )<br>"); html += wxT ("column-name ::= name [ COLLATE collation-name] [ ASC | DESC ]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CREATE TABLE</td><td bgcolor=\"#f0fff0\">sql-command ::= CREATE [TEMP | TEMPORARY] TABLE [IF NOT EXISTS] [database-name .] table-name (<br>"); html += wxT("column-def [, column-def]*<br>"); html += wxT("[, constraint]*<br>"); html += wxT(")<br>"); html += wxT ("sql-command ::= CREATE [TEMP | TEMPORARY] TABLE [database-name.] table-name AS select-statement<br>"); html += wxT ("column-def ::= name [type] [[CONSTRAINT name] column-constraint]*<br>"); html += wxT("type ::= typename |<br>"); html += wxT("typename ( number ) |<br>"); html += wxT("typename ( number , number )<br>"); html += wxT("column-constraint ::= NOT NULL [ conflict-clause ] |<br>"); html += wxT("PRIMARY KEY [sort-order] [ conflict-clause ] [AUTOINCREMENT] |<br>"); html += wxT("UNIQUE [ conflict-clause ] |<br>"); html += wxT("CHECK ( expr ) |<br>"); html += wxT("DEFAULT value |<br>"); html += wxT("COLLATE collation-name<br>"); html += wxT("constraint ::= PRIMARY KEY ( column-list ) [ conflict-clause ] |<br>"); html += wxT("UNIQUE ( column-list ) [ conflict-clause ] |<br>"); html += wxT("CHECK ( expr )<br>"); html += wxT("conflict-clause ::= ON CONFLICT conflict-algorithm</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CREATE TRIGGER</td><td bgcolor=\"#f0fff0\">sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name [ BEFORE | AFTER ]<br>"); html += wxT("database-event ON [database-name .] table-name<br>"); html += wxT("trigger-action<br>"); html += wxT ("sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name INSTEAD OF<br>"); html += wxT("database-event ON [database-name .] view-name<br>"); html += wxT("trigger-action<br>"); html += wxT("database-event ::= DELETE |<br>"); html += wxT("INSERT |<br>"); html += wxT("UPDATE |<br>"); html += wxT("UPDATE OF column-list<br>"); html += wxT("trigger-action ::= [ FOR EACH ROW ] [ WHEN expression ]<br>"); html += wxT("BEGIN<br>"); html += wxT("trigger-step ; [ trigger-step ; ]*<br>"); html += wxT("END<br>"); html += wxT("trigger-step ::= update-statement | insert-statement |<br>"); html += wxT("delete-statement | select-statement</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CREATE VIEW</td><td bgcolor=\"#f0fff0\">sql-command ::= CREATE [TEMP | TEMPORARY] VIEW [IF NOT EXISTS] [database-name.] view-name AS select-statement</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CREATE VIRTUAL TABLE</td><td bgcolor=\"#f0fff0\">sql-command ::= CREATE VIRTUAL TABLE [database-name .] table-name USING module-name [( arguments )]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DELETE</td><td bgcolor=\"#f0fff0\">sql-statement ::= DELETE FROM [database-name .] table-name [WHERE expr]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DETACH DATABASE</td><td bgcolor=\"#f0fff0\">sql-command ::= DETACH [DATABASE] database-name</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DROP INDEX</td><td bgcolor=\"#f0fff0\">sql-command ::= DROP INDEX [IF EXISTS] [database-name .] index-name</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DROP TABLE</td><td bgcolor=\"#f0fff0\">sql-command ::= DROP TABLE [IF EXISTS] [database-name.] table-name</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DROP TRIGGER</td><td bgcolor=\"#f0fff0\">sql-statement ::= DROP TRIGGER [IF EXISTS] [database-name .] trigger-name</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DROP VIEW</td><td bgcolor=\"#f0fff0\">sql-command ::= DROP VIEW [IF EXISTS] view-name</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">END TRANSACTION</td><td bgcolor=\"#f0fff0\">sql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= END [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]<br></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">EXPLAIN</td><td bgcolor=\"#f0fff0\">sql-statement ::= EXPLAIN sql-statement</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">INSERT</td><td bgcolor=\"#f0fff0\">sql-statement ::= INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] VALUES(value-list) |<br>"); html += wxT ("INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] select-statement</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ON CONFLICT clause</td><td bgcolor=\"#f0fff0\">conflict-clause ::= ON CONFLICT conflict-algorithm<br>"); html += wxT ("conflict-algorithm ::= ROLLBACK | ABORT | FAIL | IGNORE | REPLACE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PRAGMA</td><td bgcolor=\"#f0fff0\">sql-statement ::= PRAGMA name [= value] |<br>"); html += wxT("PRAGMA function(arg)<hr>"); html += wxT("PRAGMA auto_vacuum;<br>"); html += wxT("PRAGMA auto_vacuum = 0 | none | 1 | full | 2 | incremental;<hr>"); html += wxT("PRAGMA cache_size;<br>"); html += wxT("PRAGMA cache_size = Number-of-pages;<hr>"); html += wxT("PRAGMA case_sensitive_like;<br>"); html += wxT("PRAGMA case_sensitive_like = 0 | 1;<hr>"); html += wxT("PRAGMA count_changes;<br>"); html += wxT("PRAGMA count_changes = 0 | 1;<hr>"); html += wxT("PRAGMA default_cache_size;<br>"); html += wxT("PRAGMA default_cache_size = Number-of-pages;<hr>"); html += wxT("PRAGMA empty_result_callbacks;<br>"); html += wxT("PRAGMA empty_result_callbacks = 0 | 1;<hr>"); html += wxT("PRAGMA encoding;<br>"); html += wxT("PRAGMA encoding = \"UTF-8\";<br>"); html += wxT("PRAGMA encoding = \"UTF-16\";<br>"); html += wxT("PRAGMA encoding = \"UTF-16le\";<br>"); html += wxT("PRAGMA encoding = \"UTF-16be\";<hr>"); html += wxT("PRAGMA foreign_keys;<br>"); html += wxT("PRAGMA foreign_keys = 0 | 1;<hr>"); html += wxT("PRAGMA full_column_names;<br>"); html += wxT("PRAGMA full_column_names = 0 | 1;<hr>"); html += wxT("PRAGMA fullfsync;<br>"); html += wxT("PRAGMA fullfsync = 0 | 1;<hr>"); html += wxT("PRAGMA journal_mode;<br>"); html += wxT("PRAGMA database.journal_mode;<br>"); html += wxT("PRAGMA journal_mode = DELETE | TRUNCATE | PERSIST | MEMORY | OFF<br>"); html += wxT ("PRAGMA database.journal_mode = DELETE | TRUNCATE | PERSIST | MEMORY | OFF<hr>"); html += wxT("PRAGMA journal_size_limit;<br>"); html += wxT("PRAGMA journal_size_limit = N<hr>"); html += wxT("PRAGMA legacy_file_format;<br>"); html += wxT("PRAGMA legacy_file_format = 0 | 1<hr>"); html += wxT("PRAGMA locking_mode;<br>"); html += wxT("PRAGMA locking_mode = NORMAL | EXCLUSIVE<hr>"); html += wxT("PRAGMA page_size;<br>"); html += wxT("PRAGMA page_size = bytes;<hr>"); html += wxT("PRAGMA max_page_count;<br>"); html += wxT("PRAGMA max_page_count = N;<hr>"); html += wxT("PRAGMA read_uncommitted;<br>"); html += wxT("PRAGMA read_uncommitted = 0 | 1;<hr>"); html += wxT("PRAGMA recursive_triggers;<br>"); html += wxT("PRAGMA recursive_triggers = 0 | 1;<hr>"); html += wxT("PRAGMA reverse_unordered_selects;<br>"); html += wxT("PRAGMA reverse_unordered_selects = 0 | 1;<hr>"); html += wxT("PRAGMA short_column_names;<br>"); html += wxT("PRAGMA short_column_names = 0 | 1;<hr>"); html += wxT("PRAGMA synchronous;<br>"); html += wxT("PRAGMA synchronous = FULL; (2)<br>"); html += wxT("PRAGMA synchronous = NORMAL; (1)<br>"); html += wxT("PRAGMA synchronous = OFF; (0)<hr>"); html += wxT("PRAGMA temp_store;<br>"); html += wxT("PRAGMA temp_store = DEFAULT; (0)<br>"); html += wxT("PRAGMA temp_store = FILE; (1)<br>"); html += wxT("PRAGMA temp_store = MEMORY; (2)<hr>"); html += wxT("PRAGMA temp_store_directory;<br>"); html += wxT("PRAGMA temp_store_directory = 'directory-name';<hr>"); html += wxT("PRAGMA database_list;<hr>"); html += wxT("PRAGMA foreign_key_list(table-name);<hr>"); html += wxT("PRAGMA [database].freelist_count;<hr>"); html += wxT("PRAGMA index_info(index-name);<hr>"); html += wxT("PRAGMA index_list(table-name);<hr>"); html += wxT("PRAGMA table_info(table-name);<hr>"); html += wxT("PRAGMA [database.]schema_version;<br>"); html += wxT("PRAGMA [database.]schema_version = integer ;<br>"); html += wxT("PRAGMA [database.]user_version;<br>"); html += wxT("PRAGMA [database.]user_version = integer ;<hr>"); html += wxT("PRAGMA integrity_check;<br>"); html += wxT("PRAGMA integrity_check(integer)<hr>"); html += wxT("PRAGMA quick_check;<br>"); html += wxT("PRAGMA quick_check(integer)<hr>"); html += wxT("PRAGMA parser_trace = ON; (1)<br>"); html += wxT("PRAGMA parser_trace = OFF; (0)<hr>"); html += wxT("PRAGMA vdbe_trace = ON; (1)<br>"); html += wxT("PRAGMA vdbe_trace = OFF; (0)<hr>"); html += wxT("PRAGMA vdbe_listing = ON; (1)<br>"); html += wxT("PRAGMA vdbe_listing = OFF; (0)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">REINDEX</td><td bgcolor=\"#f0fff0\">sql-statement ::= REINDEX collation name<br>"); html += wxT ("sql-statement ::= REINDEX [database-name .] table/index-name</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">REPLACE</td><td bgcolor=\"#f0fff0\">sql-statement ::= REPLACE INTO [database-name .] table-name [( column-list )] VALUES ( value-list ) |<br>"); html += wxT ("REPLACE INTO [database-name .] table-name [( column-list )] select-statement</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ROLLBACK TRANSACTION</td><td bgcolor=\"#f0fff0\">sql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= END [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]<br>"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]<br></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SELECT</td><td bgcolor=\"#f0fff0\">sql-statement ::= SELECT [ALL | DISTINCT] result [FROM table-list]<br>"); html += wxT("[WHERE expr]<br>"); html += wxT("[GROUP BY expr-list]<br>"); html += wxT("[HAVING expr]<br>"); html += wxT("[compound-op select]*<br>"); html += wxT("[ORDER BY sort-expr-list]<br>"); html += wxT("[LIMIT integer [( OFFSET | , ) integer]]<br>"); html += wxT("result ::= result-column [, result-column]*<br>"); html += wxT("result-column ::= * | table-name . * | expr [ [AS] string ]<br>"); html += wxT("table-list ::= table [join-op table join-args]*<br>"); html += wxT("table ::= table-name [AS alias] |<br>"); html += wxT("( select ) [AS alias]<br>"); html += wxT ("join-op ::= , | [NATURAL] [LEFT | RIGHT | FULL] [OUTER | INNER | CROSS] JOIN<br>"); html += wxT("join-args ::= [ON expr] [USING ( id-list )]<br>"); html += wxT("sort-expr-list ::= expr [sort-order] [, expr [sort-order]]*<br>"); html += wxT("sort-order ::= [ COLLATE collation-name ] [ ASC | DESC ]<br>"); html += wxT("compound_op ::= UNION | UNION ALL | INTERSECT | EXCEPT</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">UPDATE</td><td bgcolor=\"#f0fff0\">sql-statement ::= UPDATE [ OR conflict-algorithm ] [database-name .] table-name<br>"); html += wxT("SET assignment [, assignment]*<br>"); html += wxT("[WHERE expr]<br>"); html += wxT("assignment ::= column-name = expr</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">VACUUM</td><td bgcolor=\"#f0fff0\">sql-statement ::= VACUUM</td></tr>"); html += wxT("</table>"); html += wxT("<a href=\"#index\">back to index</a>"); html += wxT ("<h3><a align=\"center\" bgcolor=\"#e0ffe0\" name=\"c2\">SQLite SQL functions</a></h3>"); html += wxT("<table cellspacing=\"4\" cellpadding=\"2\" width=\"100%\">"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c21\">ordinary functions</a><br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">abs(X)</td><td bgcolor=\"#f0fff0\">Return the absolute value of the numeric argument X. "); html += wxT ("Return NULL if X is NULL. Return 0.0 if X is not a numeric value.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">changes()</td><td bgcolor=\"#f0fff0\">Returns the number of database rows that were changed or inserted or deleted "); html += wxT ("by the most recently completed INSERT, DELETE, or UPDATE statement, exclusive of statements in lower-level triggers.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">char(X1,X2,...,XN)</td><td bgcolor=\"#f0fff0\">The char(X1,X2,...,XN) function returns a string "); html += wxT ("composed of characters having the unicode code point values of integers X1 through XN, respectively.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">coalesce(X,Y,...)</td><td bgcolor=\"#f0fff0\">Return a copy of the first non-NULL argument. "); html += wxT ("If all arguments are NULL then NULL is returned. There must be at least 2 arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">glob(X,Y)</td><td bgcolor=\"#f0fff0\">This function is used to implement the \"X GLOB Y\" syntax of SQLite. "); html += wxT ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the GLOB operator.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ifnull(X,Y)</td><td bgcolor=\"#f0fff0\">Return a copy of the first non-NULL argument. "); html += wxT ("If both arguments are NULL then NULL is returned. This behaves the same as coalesce().</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">instr(X,Y)</td><td bgcolor=\"#f0fff0\">The instr(X,Y) function finds the first occurrence of string Y within string X and returns the "); html += wxT ("number of prior characters plus 1, or 0 if Y is nowhere found within X. Or, if X and Y are both BLOBs, then instr(X,Y) returns one more than "); html += wxT ("the number bytes prior to the first occurrence of Y, or 0 if Y does not occur anywhere within X. If both arguments X and Y to instr(X,Y) "); html += wxT ("are non-NULL and are not BLOBs then both are interpreted as strings. If either X or Y are NULL in instr(X,Y) then the result is NULL. </td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">hex(X)</td><td bgcolor=\"#f0fff0\">The argument is interpreted as a BLOB. "); html += wxT ("The result is a hexadecimal rendering of the content of that blob.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">last_insert_rowid()</td><td bgcolor=\"#f0fff0\">Return the ROWID of the last row insert from this connection to the database. "); html += wxT ("This is the same value that would be returned from the sqlite3_last_insert_rowid() API function.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">length(X)</td><td bgcolor=\"#f0fff0\">Return the string length of X in characters. "); html += wxT ("If SQLite is configured to support UTF-8, then the number of UTF-8 characters is returned, not the number of bytes.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">like(X,Y)<br>like(X,Y,Z)</td><td bgcolor=\"#f0fff0\">This function is used to implement the \"X LIKE Y [ESCAPE Z]\" syntax of SQL."); html += wxT ("If the optional ESCAPE clause is present, then the user-function is invoked with three arguments. "); html += wxT("Otherwise, it is invoked with two arguments only. "); html += wxT ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the LIKE operator. "); html += wxT ("When doing this, it may be important to override both the two and three argument versions of the like() function. "); html += wxT ("Otherwise, different code may be called to implement the LIKE operator depending on whether or not an ESCAPE clause was specified.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">load_extension(X)</br>load_extension(X,Y)</td><td bgcolor=\"#f0fff0\">Load SQLite extensions "); html += wxT("out of the shared library file named X using the entry point Y. "); html += wxT ("The result is a NULL. If Y is omitted then the default entry point of sqlite3_extension_init is used. "); html += wxT ("This function raises an exception if the extension fails to load or initialize correctly.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">lower(X)</td><td bgcolor=\"#f0fff0\">Return a copy of string X will all ASCII characters converted to lower case. "); html += wxT ("The C library tolower() routine is used for the conversion, which means that this function might not work correctly on non-ASCII UTF-8 characters.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ltrim(X)<br>ltrim(X,Y)</td><td bgcolor=\"#f0fff0\">Return a string formed by removing any and all characters "); html += wxT ("that appear in Y from the left side of X. If the Y argument is omitted, spaces are removed.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">max(X,Y,...)</td><td bgcolor=\"#f0fff0\">Return the argument with the maximum value. "); html += wxT("Arguments may be strings in addition to numbers. "); html += wxT("The maximum value is determined by the usual sort order. "); html += wxT ("Note that max() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">min(X,Y,...)</td><td bgcolor=\"#f0fff0\">Return the argument with the minimum value. "); html += wxT("Arguments may be strings in addition to numbers. "); html += wxT("The minimum value is determined by the usual sort order. "); html += wxT ("Note that min() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">nullif(X,Y)</td><td bgcolor=\"#f0fff0\">Return the first argument if the arguments are different, otherwise return NULL.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">quote(X)</td><td bgcolor=\"#f0fff0\">This routine return a string which is the value of its argument suitable for inclusion "); html += wxT ("into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed. "); html += wxT ("BLOBs are encoded as hexadecimal literals. The implementation of VACUUM uses this function. "); html += wxT ("The function is also useful when writing triggers to implement undo/redo functionality.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">random()</td><td bgcolor=\"#f0fff0\">Return a pseudo-random integer between -9223372036854775808 and +9223372036854775807.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">randomblob(N)</td><td bgcolor=\"#f0fff0\">Return an N-byte blob containing pseudo-random bytes. N should be a postive integer.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">replace(X,Y,Z)</td><td bgcolor=\"#f0fff0\">Return a string formed by substituting string Z for every occurrance of string Y in string X. "); html += wxT("The BINARY collating sequence is used for comparisons.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">round(X)<br>round(X,Y)</td><td bgcolor=\"#f0fff0\">Round off the number X to Y digits to the right of the decimal point. "); html += wxT("If the Y argument is omitted, 0 is assumed.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">rtrim(X)<br>rtrim(X,Y)</td><td bgcolor=\"#f0fff0\">Return a string formed by removing any and all characters "); html += wxT ("that appear in Y from the right side of X. If the Y argument is omitted, spaces are removed.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">sqlite_version(X)</td><td bgcolor=\"#f0fff0\">Return the version string for the SQLite library that is running. Example: \"3.5.9\"</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">substr(X,Y,Z)<br>substr(X,Y)</td><td bgcolor=\"#f0fff0\">Return a substring of input string X that begins with the Y-th character "); html += wxT ("and which is Z characters long. If Z is omitted then all character through the end of the string are returned. "); html += wxT("The left-most character of X is number 1. "); html += wxT ("If Y is negative the the first character of the substring is found by counting from the right rather than the left. "); html += wxT ("If X is string then characters indices refer to actual UTF-8 characters. If X is a BLOB then the indices refer to bytes.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">trim(X)<br>trim(X,Y)</td><td bgcolor=\"#f0fff0\">Return a string formed by removing any and all characters that appear in Y from both ends of X. "); html += wxT("If the Y argument is omitted, spaces are removed.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">typeof(X)</td><td bgcolor=\"#f0fff0\">Return the type of the expression X. "); html += wxT ("The only return values are \"null\", \"integer\", \"real\", \"text\", and \"blob\".</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">unicode(X)</td><td bgcolor=\"#f0fff0\">The unicode(X) function returns the numeric unicode code point corresponding to the first "); html += wxT ("character of the string X. If the argument to unicode(X) is not a string then the result is undefined. </td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">upper(X)</td><td bgcolor=\"#f0fff0\">Return a copy of input string X converted to all upper-case letters. "); html += wxT ("The implementation of this function uses the C library routine toupper() which means it may not work correctly on non-ASCII UTF-8 strings.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">zeroblob(N)</td><td bgcolor=\"#f0fff0\">Return a BLOB consisting of N bytes of 0x00. "); html += wxT("SQLite manages these zeroblobs very efficiently. "); html += wxT ("Zeroblobs can be used to reserve space for a BLOB that is later written using incremental BLOB I/O.</td></tr> "); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c22\">aggregate functions</a><br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">avg(X)</td><td bgcolor=\"#f0fff0\">Return the average value of all non-NULL X within a group. "); html += wxT ("String and BLOB values that do not look like numbers are interpreted as 0. "); html += wxT ("The result of avg() is always a floating point value even if all inputs are integers.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">count(X)<br>count(*)</td><td bgcolor=\"#f0fff0\">The first form return a count of the number of times that X is not NULL in a group. "); html += wxT ("The second form (with no argument) return the total number of rows in the group.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">group_concat(X)<br>group_concat(X,Y)</td><td bgcolor=\"#f0fff0\">The result is a string which is the concatenation of all non-NULL values of X. "); html += wxT ("If parameter Y is the separator between instances of X. A comma (\",\") is used as the separator if Y is omitted.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">max(X)</td><td bgcolor=\"#f0fff0\">Return the maximum value of all values in the group. "); html += wxT("The usual sort order is used to determine the maximum.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">min(X)</td><td bgcolor=\"#f0fff0\">Return the minimum non-NULL value of all values in the group. "); html += wxT ("The usual sort order is used to determine the minimum. NULL is only returned if all values in the group are NULL.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">sum(X)<br>total(X)</td><td bgcolor=\"#f0fff0\">Return the numeric sum of all non-NULL values in the group. "); html += wxT ("If there are no non-NULL input rows then sum() return NULL but total() return 0.0. "); html += wxT ("NULL is not normally a helpful result for the sum of no rows but the SQL standard requires it and most other SQL "); html += wxT ("database engines implement sum() that way so SQLite does it in the same way in order to be compatible. "); html += wxT ("The non-standard total() function is provided as a convenient way to work around this design problem in the SQL language.<br>"); html += wxT ("The result of total() is always a floating point value. The result of sum() is an integer value if all non-NULL inputs are integers. "); html += wxT ("If any input to sum() is neither an integer or a NULL then sum() return a floating point value which might be an approximation to the true sum.<br>"); html += wxT ("Sum() will throw an \"integer overflow\" exception if all inputs are integers or NULL and an integer overflow occurs at any point during the computation."); html += wxT("Total() never throws an exception.</td></tr> "); html += wxT("</table>"); html += wxT("<a href=\"#index\">back to index</a>"); html += wxT("<h3><a name=\"c3\">SpatiaLite SQL Spatial functions</a></h3>"); html += wxT("<table cellspacing=\"4\" cellpadding=\"2\" width=\"100%\">"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"version\">SQL version info [and build options] functions</a></a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">spatialite_version( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the current SpatiaLite version</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">spatialite_target_cpu( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the current SpatiaLite Target CPU</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">proj4_version( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the current PROJ.4 version, or NULL if PROJ.4 is currently unsupported</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">geos_version( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the current GEOS version, or NULL if GEOS is currently unsupported</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">rttopo_version( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the current RTTOPO version, or NULL if RTTOPO is currently unsupported</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">libxml2_version( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the current LibXML2 version, or NULL if LibXML2 is currently unsupported</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasIconv( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling ICONV</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasMathSQL( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling MATHSQL</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasGeoCallbacks( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling GEOCALLBACKS</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasProj( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling PROJ</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasGeos( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling GEOS</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasGeosAdvanced( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling GEOSADVANCED</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasGeosTrunk( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling GEOSTRUNK</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasRtTopo( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling RTTOPO</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasLibXML2( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling LibXML2</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasEpsg( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling EPSG</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">HasFreeXL( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">TRUE if the underlaying library was built enabling FreeXL</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"generic\">generic SQL functions</a></a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToInteger( value Generic ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the intput value possibly casted to the Integer data-type: NULL if no conversion is possible.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToDouble( value Generic ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the intput value possibly casted to the Double data-type: NULL if no conversion is possible.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToText( value Generic ) : Text<hr>CastToText( value Generic ) : Text</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the intput value possibly casted to the Text data-type: NULL if no conversion is possible.<br>"); html += wxT ("If an optional argument \"zero_pad\" is passed and the input value is of the Integer or Double type, then the returned string will be padded using as much trailing ZEROs so to ensure the required length.</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">CastToBlob( value Generic ) : Blob<hr>"); html += wxT("(CastToBlob (value Generic , hex_input Boolean ) : Blob</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the intput value possibly casted to the Blob data-type: NULL if no conversion is possible.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ForceAsNull( val1 Generic , val2 Generic ) : Generic</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">if \"val1\" and \"val2\" are equal (and exactly of the same data-type) NULL will be returned; "); html += wxT ("otherwise \"val1\" will be returned absolutely untouched and still preserving its originale data-type.</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">CreateUUID( void ) : Text</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a Version 4 (random) UUID (<b>Universally unique identifier</b>).</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">MD5Checksum( BLOB | TEXT ) : Text</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the MD5 checksum corresponding to the input value.<br>Will return NULL for non-BLOB input.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MD5TotalChecksum( BLOB | TEXT ) : Text</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a cumulative MD5 checksum.<br><b><u>Aggregate function</u></b>.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"error\">SQL functions reporting "); html += wxT("GEOS / RTTOPO errors and warnings</a></a>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GEOS_GetLastWarningMsg( void ) : <i>String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent warning message returned by GEOS (if any).<hr>"); html += wxT("NULL will be returned if there is no pending GEOS warning.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GEOS_GetLastErrorMsg( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent error message returned by GEOS (if any).<hr>"); html += wxT("NULL will be returned if there is no pending GEOS error.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GEOS_GetLastAuxErrorMsg( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent (auxiliary) error message returned by GEOS (if any).<hr>"); html += wxT ("NULL will be returned if there is no pending GEOS (auxiliary) error.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GEOS_GetCriticalPointFromMsg( void ) : Point<hr>"); html += wxT("GEOS_GetCriticalPointFromMsg( SRID Integer ) : Point</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will (possibly) return a Point Geometry extracted from the latest error / warning "); html += wxT ("message returned by GEOS.<hr>NULL will be returned if there is no pending GEOS message, or if the "); html += wxT("current GEOS message doesn't contain a critical Point.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RTTOPO_GetLastWarningMsg( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent warning message returned by RTTOPO (if any).<hr>"); html += wxT("NULL will be returned if there is no pending RTTOPO error.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RTTOPO_GetLastErrorMsg( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent error message returned by RTTOPO (if any).<hr>"); html += wxT("NULL will be returned if there is no pending RTTOPO error.</td></tr>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"math\">SQL math functions</a></a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Abs( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the absolute value of <i>x</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Acos( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the arc cosine of <i>x</i>, that is, the value whose cosine is <i>x</i><br>"); html += wxT("returns NULL if <i>x</i> is not in the range -1 to 1</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Asin( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the arc sine of <i>x</i>, that is, the value whose sine is <i>x</i><br>"); html += wxT("returns NULL if <i>x</i> is not in the range -1 to 1</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Atan( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the arc tangent of <i>x</i>, that is, the value whose tangent is <i>x</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Ceil( x Double precision ) : Double precision<hr>"); html += wxT("Ceiling( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the smallest integer value not less than <i>x</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Cos( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the cosine of <i>x</i>, where <i>x</i> is given in <u>radians</u></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Cot( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the cotangent of <i>x</i>, where <i>x</i> is given in <u>radians</u></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Degrees( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the argument <i>x</i>, converted from radians to degrees</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Exp( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the value of <b><i>e</i></b> (the base of natural logarithms) raised to the power of <i>x</i><hr>"); html += wxT ("the inverse of this function is <i>Log()</i> (using a single argument only) or <i>Ln()</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Floor( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the largest integer value not greater than <i>x</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Ln( x Double precision ) : Double precision<hr>"); html += wxT("Log( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the natural logarithm of <i>x</i>; that is, the base-<b><i>e</i></b> logarithm of <i>x</i><br>"); html += wxT ("If <i>x</i> is less than or equal to 0, then NULL is returned</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Log( b Double precision, x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the logarithm of <i>x</i> to the base <i>b</i><br>"); html += wxT ("If <i>x</i> is less than or equal to 0, or if <i>b</i> is less than or equal to 1, then NULL is returned<hr>"); html += wxT ("<i>Log(b, x)</i> is equivalent to <i>Log(x)</i> / <i>Log(b)</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Log2( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">returns the base-2 logarithm of <i>x</i><hr>"); html += wxT ("<i>Log2(x)</i> is equivalent to <i>Log(x)</i> / <i>Log(2)</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Log10( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the base-10 logarithm of <i>x</i><hr>"); html += wxT ("<i>Log10(x)</i> is equivalent to <i>Log(x)</i> / <i>Log(10)</i></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">PI( void ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">returns the value of <i>PI</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Pow( x Double precision, y Double precision ) : Double precision<hr>"); html += wxT ("Power( x Double precision, y Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the value of <i>x</i> raised to the power of <i>y</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Radians( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the argument <i>x</i>, converted from degrees to radians</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Sign( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the sign of the argument as -1, 0, or 1, "); html += wxT ("depending on whether <i>x</i> is negative, zero, or positive.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Sin( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the sine of <i>x</i>, where <i>x</i> is given in <u>radians</u></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Sqrt( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the square root of a non-negative number <i>x</i></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Stddev_pop( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the population standard deviation of the input values<br>"); html += wxT("<b><u>aggregate function</u></b></u></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Stddev_samp( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the sample standard deviation of the input values<br>"); html += wxT("<b><u>aggregate function</u></b></u></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Tan( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the tangent of <i>x</i>, where <i>x</i> is given in <u>radians</u></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Var_pop( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the population variance of the input values (<i>square of the population standard deviation</i>)<br>"); html += wxT("<b><u>aggregate function</u></b></u></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Var_samp( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the sample variance of the input values (<i>square of the sample standard deviation</i>)<br>"); html += wxT("<b><u>aggregate function</u></b></u></td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"length_cvt\">SQL length/distance unit-conversion functions</a></a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToKm( x Double precision ) : Double precision<hr>CvtFromKm( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / kilometers</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToDm( x Double precision ) : Double precision<hr>CvtFromDm( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / decimeters</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToCm( x Double precision ) : Double precision<hr>CvtFromCm( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / centimeters</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToMm( x Double precision ) : Double precision<hr>CvtFromMm( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / millimeters</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToKmi( x Double precision ) : Double precision<hr>CvtFromKmi( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">meters / internation nautical miles</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToIn( x Double precision ) : Double precision<hr>CvtFromIn( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / international inches</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToFt( x Double precision ) : Double precision<hr>CvtFromFt( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / international feet</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToYd( x Double precision ) : Double precision<hr>CvtFromYd( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / international yards</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToMi( x Double precision ) : Double precision<hr>CvtFromMi( x Double precision ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">meters / international statute miles</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToFath( x Double precision ) : Double precision<hr>CvtFromFath( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / international fathoms</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToCh( x Double precision ) : Double precision<hr>CvtFromCh( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / international chains</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToLink( x Double precision ) : Double precision<hr>CvtFromLink( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / international links</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToUsIn( x Double precision ) : Double precision<hr>CvtFromUsIn( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / U.S. inches</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToUsFt( x Double precision ) : Double precision<hr>CvtFromUsFt( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / U.S. feet</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToUsYd( x Double precision ) : Double precision<hr>CvtFromUsYd( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / U.S. yards</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToUsMi( x Double precision ) : Double precision<hr>CvtFromUsMi( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / U.S. statute miles</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToUsCh( x Double precision ) : Double precision<hr>CvtFromUsCh( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / U.S. chains</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToIndFt( x Double precision ) : Double precision<hr>CvtFromIndFt( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / indian feet</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToIndYd( x Double precision ) : Double precision<hr>CvtFromIndYd( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / indian yards</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CvtToIndCh( x Double precision ) : Double precision<hr>CvtFromIndCh( x Double precision ) : Double precision</td>"); html += wxT("<td bgcolor=\"#f0fff0\">meters / indian chains</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"dms_cvt\">DD/DMS conversion functions (longitude/latitude)</a></a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LongLatToDMS( longitude Double precision , latitude Double precision ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a DMS string (Degrees, Minutes and Seconds) starting from DD (Decimal Degrees) input coordinates<hr>"); html += wxT("NULL will be returned on invalid input.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LongitudeFromDMS( dms_expression String ) : Double precision<hr>LatitudeFromDMS( dms_expression String ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return the DD coordinates from within a DMS expression<hr>"); html += wxT("NULL will be returned on invalid input.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"blob\">SQL utility functions for BLOB objects</a></a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsZipBlob( content Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if this BLOB object corresponds to a valid ZIP-compressed file</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsPdfBlob( content Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if this BLOB object corresponds to a valid PDF document</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsGifBlob( image Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this BLOB object corresponds to a valid GIF image</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsPngBlob( image Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this BLOB object corresponds to a valid PNG image</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsTiffBlob( image Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this BLOB object corresponds to a valid TIFF image</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsJpegBlob( image Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this BLOB object corresponds to a valid JPEG image</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsExifBlob( image Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this BLOB object corresponds to a valid EXIF image<br>"); html += wxT ("<u>Please note:</u> any valid EXIF image is a valid JPEG as well</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">IsExifGpsBlob( image Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this BLOB object corresponds to a valid EXIF-GPS image<br>"); html += wxT ("<u>Please note:</u> any valid EXIF-GPS image is a valid EXIF and JPEG as well</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsWebpBlob( image Blob ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this BLOB object corresponds to a valid WebP image</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GetMimeType( payload Blob ) : String</td>"); html += wxT("<td bgcolor=\"#f0fff0\">The return type is Text.<br>"); html += wxT ("NULL could be returned for an invalid argument or if no valid mime-type is detected.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BlobFromFile( filepath String ) : BLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">If filepath corresponds to some valid pathname, and the corresponding file "); html += wxT ("can be actually accessed in read mode, then the whole file content will be returned as a BLOB value.<br>"); html += wxT ("Otherwise NULL will be returned.<br><u>Please note:</u> SQLite doesn't support BLOB values bigger than SQLITE_MAX_LENGTH (usually, 1 GB).<hr>"); html += wxT ("<u>Please note</u>: security restrictions apply to this function, which is really supported only when the environment variable \"SPATIALTE_SECURITY=relaxed\" is explicitly set.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BlobToFile( payload BLOB , filepath String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">If payload is of the BLOB-type, and if filepath corresponds to some valid pathname "); html += wxT ("(accessible in write/create mode), then the corresponding file will be created/overwritten so to contain the payload.<br>"); html += wxT ("The return type is Integer, with a return value of 1 for success, 0 for failure.<hr>"); html += wxT ("<u>Please note</u>: security restrictions apply to this function, which is really supported only when the environment variable \"SPATIALTE_SECURITY=relaxed\" is explicitly set.</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">CountUnsafeTriggers( ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">This SQL function checks if the currently connected DB does contain any potentially malicious Trigger; "); html += wxT ("carefully checking this conditions is a minimal precaution expected to be always verified before eventually activating the \"SPATIALITE_SECURITY=relaxed\" mode.<hr>"); html += wxT ("The return type is Integer (total count of suspected Triggers); 0 means that the currently connected DB should be considered absolutely safe.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c30\">SQL utility functions [<i>non-standard</i>] for geometric objects</a></a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromExifGpsBlob( image Blob ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a POINT Geometry will be returned representing the GPS long/lat contained within EXIF-GPS <i>metadata</i> for the BLOB image<br>"); html += wxT ("NULL will be returned if for any reason it's not possible to build such a POINT</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Point( x Double precision , y Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">simply an alias-name for MakePoint() (SRID is never supported).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakePoint( x Double precision , y Double precision [ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry will be returned representing the POINT defined by [x y] coordinates</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakePointZ( x Double precision , y Double precision , z Double precision [ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry will be returned representing the POINT Z defined by [x y z] coordinates</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakePointM( x Double precision , y Double precision , m Double precision [ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry will be returned representing the POINT M defined by [x y m] coordinates</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakePointZM( x Double precision , y Double precision , z Double precision , m Double precision "); html += wxT("[ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry will be returned representing the POINT ZM defined by [x y z m] coordinates</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeLine( pt1 PointGeometry , pt2 PointGeometry ) : LinestringGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Linestring Geometry will be returned representing the segment connecting pt1 to pt2<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeLine( geom PointGeometry ) : LinestringGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Linestring Geometry will be returned connecting all the input Points (accordingly to input sequence)<br>"); html += wxT("<b><u>aggregate function</u></b><br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeLine( geom MultiPointGeometry , direction Boolean ) : LinestringGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Linestring Geometry will be returned connecting all the input Points (accordingly to input sequence); \"direction=FALSE\" implies reverse order.<br>"); html += wxT ("<u>Please note</u>: similar to the previuous one, but this one is an ordinary (not aggregate) function; a MultiPoint input is always expected.<hr>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeCircle( cx Double , cy Double , radius Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a closed LINESTRING approximating the Circle defined by \"cx\", \"cy\" and \"radius\".<br>"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.<br>"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeEllipse( cx Double , cy Double , x_axis Double , y_axus Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a closed LINESTRING approximating the Ellipsee defined by \"cx\", \"cy\" and \"x_axis\", \"y_axis\".<br>"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the ellipse; a point will be set every \"step\" degrees.<br>"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeArc( cx Double , cy Double , radius Double , start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a LINESTRING approximating the Circular Arc defined by \"cx\", \"cy\" and \"radius\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.<br>"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.<br>"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeEllipticArc( cx Double , cy Double , x_axis Double , y_axis Double, start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a LINESTRING approximating the Elliptic Arc defined by \"cx\", \"cy\" and \"x_axis\", \"y_axis\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.<br>"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the ellipse; a point will be set every \"step\" degrees.<br>"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeCircularSector( cx Double , cy Double , radius Double , start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : PolygonGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a POLYGON approximating the Circular Sector defined by \"cx\", \"cy\" and \"radius\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.<br>"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.<br>"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeEllipticSector( cx Double , cy Double , x_axis Double , y_axis Double, start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : PolygonGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a POLYGON approximating the Elliptic Sector defined by \"cx\", \"cy\" and \"x_axis\", \"y_axis\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.<br>"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the ellipse; a point will be set every \"step\" degrees.<br>"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeCircularStripe( cx Double , cy Double , radius_1 Double , radius_2 Double, start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : PolygonGeometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">will return a POLYGON approximating the Circular Stripe delimited by two arcs sharing the same Centre \"cx\", \"cy\" "); html += wxT ("but having different radii \"radius_1\", \"radius_2\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.<br>"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.<br>"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Collect( geom1 Geometry , geom2 Geometry ) : Geometry<hr>"); html += wxT("ST_Collect( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a generic Geometry (possibly a GEOMETRYCOLLECTION) will be returned merging geom1 and geom2<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Collect( geom Geometry ) : Geometry<hr>"); html += wxT("ST_Collect( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a generic Geometry (possibly a GEOMETRYCOLLECTION) will be returned merging input Geometries all together<br>"); html += wxT("<b><u>aggregate function</u></b><br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BuildArea( geom Geometry ) : Geometry<hr>"); html += wxT("ST_BuildArea( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a POLYGON or MULTIPOLYGON) will be returned.<br>"); html += wxT ("The input Geometry is expected to represent a LINESTRING or a MULTILINESTRING.<br>The input Geometry can be an arbitrary collection "); html += wxT ("of sparse Linestrings: this function will then try to (possibly) reassemble them into one (or more) polygon(s)."); html += wxT ("<br>If the second [optional] argument is TRUE then a MULTIPOLYGON will be returned anyway.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Polygonize( geom Geometry ) : Geometry<hr>"); html += wxT("ST_Polygonize( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Exactly the same as ST_BuildArea, but implemented as an <u>aggregate function</u>.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LineMerge( geom Geometry ) : Geometry<hr>"); html += wxT("ST_LineMerge( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.<br>"); html += wxT ("The input Geometry is expected to represent a LINESTRING or a MULTILINESTRING.<br>The input Geometry can be an arbitrary collection "); html += wxT ("of sparse Linestrings: this function will then try to (possibly) reassemble them into one (or more) polygon(s)."); html += wxT ("<br>If the second [optional] argument is TRUE then a MULTIPOLYGON will be returned anyway.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakePolygon( geom1 Geometry [ , geom2 Geometry ] ) : Geometry<hr>"); html += wxT ("ST_MakePolygon( geom1 Geometry [ , geom2 Geometry ] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Kind of lightweight/simplified ST_BuildArea: the first input Geometry is always "); html += wxT ("expected to represent a closed LINESTRING assumed to identify the output polygon's Exterior Ring.<br>"); html += wxT ("The second input Geometry (if any) is expected to be a LINESTRING or MULTILINESTRING identifying any "); html += wxT ("polygon's Interior Ring (and all them are expected to be correctly closed).<br>"); html += wxT ("<b><u>Please note well</u></b>: this function doesn't perform any internal topology check, so it could "); html += wxT ("possibly return an invalid polygon on invalid input.<hr>NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LinesFromRings( geom Geometry ) : Geometry<hr>"); html += wxT("ST_LinesFromRings( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.<br>"); html += wxT ("The input Geometry is expected to be a POLYGON or MULTIPOLYGON; any RING will then be transformed into the corresponding LINESTRING.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LinesCutAtNodes( geom1 Geometry , geom2 Geometry ) : Geometry<hr>"); html += wxT ("ST_LinesCutAtNodes( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.<br>"); html += wxT ("The first input Geometry is expected to be a LINESTRING or MULTILINESTRING (Lines); "); html += wxT ("the second input Geometry is expected to be a POINT or MULTIPOINT (Nodes).<br>"); html += wxT ("any Line will then be possibly split in two halves where some vertex exactely intercepts a Node.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RingsCutAtNodes( geom Geometry ) : Geometry<hr>"); html += wxT("ST_RingsCutAtNodes( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.<br>"); html += wxT ("The input Geometry is expected to be a POLYGON or MULTIPOLYGON (Rings); "); html += wxT ("any self-intersection or intersection between Rings is assumed to represent a Node.<br>"); html += wxT ("any Ring will then be possibly split in two halves where some vertex exactely intercepts a Node.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DissolveSegments( geom Geometry ) : Geometry<hr>"); html += wxT("ST_DissolveSegments( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a LINESTRING, MULTILINESTRING or GEOMETRYCOLLECTION) will be returned.<br>"); html += wxT ("The input Geometry is arbitrary: any POINT will remain unaffected, but any LINESTRING or RING will be dissolved into elementary segments.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DissolvePoints( geom Geometry ) : Geometry<hr>"); html += wxT("ST_DissolvePoints( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a POINT or MULTIPOINT) will be returned.<br>"); html += wxT ("The input Geometry is arbitrary: any POINT will remain unaffected, but any LINESTRING or RING will be dissolved into elementary Points corresponding to each Vertex.<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CollectionExtract( geom Geometry, type Integer ) : Geometry<hr>"); html += wxT("ST_CollectionExtract( geom Geometry, type Integer ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type.<br>"); html += wxT ("Sub-geometries that are not the specified type are ignored.<br>(1=POINT-type, 2=LINESTRING-type, 3=POLYGON-type)<br>"); html += wxT ("NULL will be returned if any error is encountered (or when no item of required type is found)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Locate_Along_Measure( geom Geometry, m_value Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return a derived geometry collection value with elements that match the specified measure.<br>"); html += wxT ("NULL will be returned if any error is encountered (or when no element corresponding to the given measure is found).<br>"); html += wxT ("Please note: NULL will be returned anyway if Geometry doesn't support M-dimension, or if it contains any Polygon, or if it's of the GeometryCollection type.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Locate_Between_Measures( geom Geometry, m_start Double precision , m_end Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return a derived geometry collection value with elements that match the specified range of measures.<br>"); html += wxT ("NULL will be returned if any error is encountered (or when no element corresponding to the given range if measures is found).<br>"); html += wxT ("Please note: NULL will be returned anyway if Geometry doesn't support M-dimension, or if it contains any Polygon, or if it's of the GeometryCollection type.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SquareGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry<hr>"); html += wxT ("ST_SquareGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a grid of square cells (having the edge length of size) precisely covering the input Geometry (expected to be a Polygon or MultiPolygon).<br>"); html += wxT ("The returned Geometry will usually be of the MultiPolygon type (a collection of Squares), but will be a MultiLinestring if the optional edges_only argument is set to TRUE<br>"); html += wxT ("If the optional origin argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">TriangularGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry<hr>"); html += wxT ("ST_TriangularGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a grid of square cells (having the edge length of size) precisely covering the input Geometry (expected to be a Polygon or MultiPolygon).<br>"); html += wxT ("The returned Geometry will usually be of the MultiPolygon type (a collection of Triangles), but will be a MultiLinestring if the optional edges_only argument is set to TRUE<br>"); html += wxT ("If the optional origin argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">HexagonalGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry<hr>"); html += wxT ("ST_HexagonalGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a grid of square cells (having the edge length of size) precisely covering the input Geometry (expected to be a Polygon or MultiPolygon).<br>"); html += wxT ("The returned Geometry will usually be of the MultiPolygon type (a collection of Hexagons), but will be a MultiLinestring if the optional edges_only argument is set to TRUE<br>"); html += wxT ("If the optional origin argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DelaunayTriangulation( geom Geometry [ , edges_only Boolean [ , tolerance Double precision ]] ) : Geometry<hr>"); html += wxT ("ST_DelaunayTriangulation( geom Geometry [ , edges_only Boolean [ , tolerance Double precision ]] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return the Delaunay Triangulation corresponding to the input Geometry.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">VoronojDiagram( geom Geometry [ , edges_only Boolean [ , extra_frame_size Double precision [ , tolerance Double precision ]]] ) : Geometry<hr>"); html += wxT ("ST_VoronojDiagram( geom Geometry [ , edges_only Boolean [ , extra_frame_size Double precision [ , tolerance Double precision ]]] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return the Voronoj Diagram corresponding to the input Geometry.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ConcaveHull( geom Geometry [ , factor Double precision [ , allow_hols Boolean [ , tolerance Double precision ]]] ) : Geometry<hr>"); html += wxT ("ST_ConcaveHull( geom Geometry [ , factor Double precision [ , allow_hols Boolean [ , tolerance Double precision ]]] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return the ConcaveHull corresponding to the input Geometry.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeValid( geom Geometry ) : Geometry<hr>"); html += wxT("ST_MakeValid( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return a surely valid version of the input Geometry.<br>"); html += wxT ("If the input Geometry was already valid, then it will be returned exactly as it was.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MakeValidDiscarded( geom Geometry ) : Geometry<hr>"); html += wxT("ST_MakeValidDiscarded( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return all elements that would be eventually discarded by ST_MakeValid() while validating the same input Geometry.<br>"); html += wxT ("NULL will be returned if any error is encountered, or if no discarded item exists.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Segmentize( geom Geometry , dist Double precision ) : Geometry<hr>"); html += wxT ("ST_Segmentize( geom Geometry , dist Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a new Geometry corresponding to the input Geometry; as much Linestring / Ring vertices "); html += wxT ("as required will be eventually interpolated so to ensure that no segment will be longer than dist.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Split( geom Geometry , blade Geometry ) : Geometry<hr>"); html += wxT("ST_Split( geom Geometry , blade Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a new Geometry collecting all items resulting by splitting the input Geometry by the blade.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SplitLeft( geom Geometry , blade Geometry ) : Geometry<hr>"); html += wxT("ST_SplitLeft( geom Geometry , blade Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a new Geometry collecting all items resulting by splitting the input Geometry by the blade and falling on the left side.<br>"); html += wxT ("All items not affected by the split operation (i.e. not intersecting the blade) will be returned into the left collection.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SplitRight( geom Geometry , blade Geometry ) : Geometry<hr>"); html += wxT("ST_SplitRight( geom Geometry , blade Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a new Geometry collecting all items resulting by splitting the input Geometry by the blade and falling on the right side.<br>"); html += wxT ("NULL will be returned if any error is encountered (or if the right side is empty).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Azimuth( pt1 Geometry , pt2 Geometry ) : Double precision<hr>"); html += wxT("ST_Azimuth( pt1 Geometry , pt2 Geometry ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the angle (in radians) from the horizontal of the vector defined by pt1 and pt2.<br>"); html += wxT("Both pt1 and pt2 are expected to be simple Points.<br>"); html += wxT ("Starting since 4.1.0 if both points supports \"long/lat\" coords the returned Azimuth will be precisely computed on the ellipsoid.<br>"); html += wxT("NULL will be returned if any error is encountered.<hr>"); html += wxT("On the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Project( start_point Geometry, distance Double precision, azimuth Double precision ) : Geometry<hr>"); html += wxT ("Project( start_point Geometry, distance Double precision, azimuth Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a new Point projected from a start point using a bearing and distance.<br>"); html += wxT ("start_point is expected to be simple long/lat Point.<br>distance is expected to be measured in meters; "); html += wxT ("azimuth (aka bearing or heading) has the same identical meaning as in ST_Azimuth().<br>"); html += wxT("NULL is returned on failure or on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SnapToGrid( geom Geometry , size Double precision ) : Geometry<br>"); html += wxT ("SnapToGrid( geom Geometry , size_x Double precision , size_y Double precision ) : Geometry<br>"); html += wxT ("SnapToGrid( geom Geometry , origin_x Double precision , origin_y Double precision , size_x Double precision , size_y Double precision ) : Geometry<br>"); html += wxT ("SnapToGrid( geom Geometry , origin Geometry , size_x Double precision , size_y Double precision , size_z Double precision , size_m Double precision ) : Geometry<hr>"); html += wxT ("ST_SnapToGrid( geom Geometry , size Double precision ) : Geometry<br>"); html += wxT ("ST_SnapToGrid( geom Geometry , size_x Double precision , size_y Double precision ) ) : Geometry<br>"); html += wxT ("ST_SnapToGrid( geom Geometry , origin_x Double precision , origin_y Double precision , size_x Double precision , size_y Double precision ) ) : Geometry<br>"); html += wxT ("ST_SnapToGrid( geom Geometry , origin Geometry , size_x Double precision , size_y Double precision, size_z Double precision , size_m Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a new Geometry corresponding to the input Geometry; all points and vertices will be snapped to the grid defined by its origin and size(s).<br>"); html += wxT("Removes all consecutive points falling on the same cell.<br>"); html += wxT ("All collapsed geometries will be stripped from the returned Geometry.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">GeoHash( geom Geometry ) : String<hr>"); html += wxT("ST_GeoHash( geom Geometry ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return a GeoHash representation (geohash.org) of the geometry.<br>"); html += wxT ("A GeoHash encodes a point into a text form that is sortable and searchable based on prefixing.<hr>"); html += wxT ("ST_GeoHash will not work with geometries that are not in geographic (lon/lat) coordinates</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsX3D( geom Geometry [ , precision Integer [ , options Integer [ , refid String ]]] ) : String<hr>"); html += wxT ("ST_AsX3D( geom Geometry [ , precision Integer [ , options Integer [ , refid String ]]] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Returns a geometry as an X3D XML formatted node element</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MaxDistance( geom1 Geometry , geom2 Geometry ) : Double precision<hr>"); html += wxT ("ST_MaxDistance( geom1 Geometry , geom2 Geometry ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the max distance between geom1 and geom2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_3DDistance( geom1 Geometry , geom2 Geometry ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the 3D-distance between geom1 and geom2 (considering Z coordinates)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Max3DDistance( geom1 Geometry , geom2 Geometry ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the max 3D-distance between geom1 and geom2 (considering Z coordinates)</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">ST_Node( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Fully nodes a set of linestrings using the least possible number of nodes while preserving all of the input ones.<br>"); html += wxT ("NULL will be returned if the input Geometry isn't a set of linestrings or if any other error occurs.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SelfIntersections( geom Geometry ) : Geometry<hr>ST_SelffIntersections( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Returns a MultiPoint Geometry representing any self-intersection found within the input geometry "); html += wxT("[Expected to be of the Linestring or MultiLinestring type].<br>"); html += wxT ("NULL will be returned for invalid arguments, or when no self-intersections were found.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BuildMbr( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision, [ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">[x1 y1] and [x2 y2] are assumed to be Points identifying a line segment;"); html += wxT ("then a Geometry will be returned representing the MBR for this line segment</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BuildCircleMbr( x Double precision , y Double precision , radius Double precision [ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">[x y] is assumed to be the center of a circle of given radius; then a Geometry will be returned representing the MBR for this circle</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Extent( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object representing the bounding box that encloses a set of input values<br>"); html += wxT("<b><u>aggregate function</u></b></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">ToGARS( geom Geometry ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">geom is expected to represent a POINT (longitude and latitude coords); "); html += wxT("the corresponding GARS area designation code will be returned.<hr>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GARSMbr( GARS_code String ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">code is assumed to represent a valid GARS area designation code; "); html += wxT ("a Geometry will be returned representing the MBR for the corresponding GARS area.<hr>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrMinX( geom Geometry) : Double precision<hr>"); html += wxT("ST_MinX( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the x-coordinate for geom MBR's leftmost side as a double precision number.<br>"); html += wxT("NULL will be returned if geom isn't a valid Geometry.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrMinY( geom Geometry) : Double precision<hr>"); html += wxT("ST_MinY( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the y-coordinate for geom MBR's lowermost side as a double precision number.<br>"); html += wxT("NULL will be returned if geom isn't a valid Geometry.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrMaxX( geom Geometry) : Double precision<hr>"); html += wxT("ST_MaxX( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the x-coordinate for geom MBR's rightmost side as a double precision number.<br>"); html += wxT("NULL will be returned if geom isn't a valid Geometry.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrMaxY( geom Geometry) : Double precision<hr>"); html += wxT("ST_MaxY( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the y-coordinate for geom MBR's uppermost side as a double precision number.<br>"); html += wxT("NULL will be returned if geom isn't a valid Geometry.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_MinZ( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the minimum Z-coordinate value for geom as a double precision number.<br>"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no Z dimension.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_MaxZ( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the maximum Z-coordinate value for geom as a double precision number.<br>"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no Z dimension.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_MinM( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the minimum M-coordinate value for geom as a double precision number.<br>"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no M dimension.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_MaxM( geom Geometry) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the maximum M-coordinate value for geom as a double precision number.<br>"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no M dimension.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c31\">functions for constructing a geometric object given its Well-known Text Representation</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromText( wkt String [ , SRID Integer] ) : Geometry<hr>"); html += wxT("ST_GeomFromText( wkt String [ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">construct a geometric object given its Well-known text Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_WKTToSQL( wkt String ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">SQL/MM alias name for ST_GeomFromText: SRID=0 is assumed.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PointFromText( wktPoint String [ , SRID Integer] ) : Point<hr>"); html += wxT("ST_PointFromText( wktPoint String [ , SRID Integer] ) : Point</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a Point</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LineFromText( wktLineString String [ , SRID Integer] ) : Linestring<hr>"); html += wxT ("ST_LineFromText( wktLineString String [ , SRID Integer] ) : Linestring<hr>"); html += wxT ("LineStringFromText( wktLineString String [ , SRID Integer] ) : Linestring<hr>"); html += wxT ("ST_LineStringFromText( wktLineString String [ , SRID Integer] ) : Linestring</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a Linestring</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PolyFromText( wktPolygon String [ , SRID Integer] ) : Polygon<hr>"); html += wxT("ST_PolyFromText( wktPolygon String [ , SRID Integer] ) : Polygon<hr>"); html += wxT("PolygonFromText( wktPolygon String [ , SRID Integer] ) : Polygon<hr>"); html += wxT ("ST_PolygonFromText( wktPolygon String [ , SRID Integer] ) : Polygon</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a Polygon</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint<hr>"); html += wxT ("ST_MPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint<hr>"); html += wxT ("MultiPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint<hr>"); html += wxT ("ST_MultiPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a MultiPoint</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MLineFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring<hr>"); html += wxT ("ST_MLineFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring<hr>"); html += wxT ("MultiLineStringFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring<hr>"); html += wxT ("ST_MultiLineStringFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a MultiLinestring</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MPolyFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("ST_MPolyFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("MultiPolygonFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("ST_MultiPolygonFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a MultiPolygon</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomCollFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection<hr>"); html += wxT ("ST_GeomCollFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection<hr>"); html += wxT ("GeometryCollectionFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection<hr>"); html += wxT ("ST_GeometryCollectionFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a GeometryCollection</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BdPolyFromText( wktMultilinestring String [ , SRID Integer] ) : Polygon<hr>"); html += wxT ("ST_BdPolyFromText( wktMultilinestring String [ , SRID Integer] ) : Polygon</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Construct a Polygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString text representation.<hr>see also: BuildArea(), Polygonize()</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BdMPolyFromText( wktMultilinestring String [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("ST_BdMPolyFromText( wktMultilinestring String [ , SRID Integer] ) : MultiPolygon</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Construct a MultiPolygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString text representation.<hr>see also: BuildArea(), Polygonize()</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c32\">functions for constructing a geometric object given its Well-known Binary Representation</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromWKB( wkbGeometry Binary [ , SRID Integer] ) : Geometry<hr>"); html += wxT ("ST_GeomFromWKB( wkbGeometry Binary [ , SRID Integer] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">construct a geometric object given its Well-known binary Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_WKBToSQL( wkbGeometry Binary ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">SQL/MM alias name for ST_GeomFromWKB: SRID=0 is assumed.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PointFromWKB( wkbPoint Binary [ , SRID Integer] ) : Point<hr>"); html += wxT("ST_PointFromWKB( wkbPoint Binary [ , SRID Integer] ) : Point</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a Point</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LineFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring<hr>"); html += wxT ("ST_LineFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring<hr>"); html += wxT ("LineStringFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring<hr>"); html += wxT ("ST_LineStringFromWKB ( wkbLineString Binary [ , SRID Integer] ) : Linestring</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a Linestring</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PolyFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon<hr>"); html += wxT("ST_PolyFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon<hr>"); html += wxT("PolygonFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon<hr>"); html += wxT ("ST_PolygonFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a Polygon</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint<hr>"); html += wxT ("ST_MPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint<hr>"); html += wxT ("MultiPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint<hr>"); html += wxT ("ST_MultiPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a MultiPoint</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MLineFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring<hr>"); html += wxT ("ST_MLineFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring<hr>"); html += wxT ("MultiLineStringFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring<hr>"); html += wxT ("ST_MultiLineStringFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a MultiLinestring</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MPolyFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("ST_MPolyFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("MultiPolygonFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("ST_MultiPolygonFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a MultiPolygon</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomCollFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection<hr>"); html += wxT ("ST_GeomCollFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection<hr>"); html += wxT ("GeometryCollectionFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection<hr>"); html += wxT ("ST_GeometryCollectionFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection</td>"); html += wxT("<td bgcolor=\"#f0fff0\">construct a GeometryCollection</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BdPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : Polygon<hr>"); html += wxT ("ST_BdPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : Polygon</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Construct a Polygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString binary representation.<hr>see also: BuildArea(), Polygonize()</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">BdMPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : MultiPolygon<hr>"); html += wxT ("ST_BdMPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : MultiPolygon</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Construct a MultiPolygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString binary representation.<hr>see also: BuildArea(), Polygonize()</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c33\">functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">AsText( geom Geometry ) : String<hr>"); html += wxT ("ST_AsText( geom Geometry ) : String</td><td bgcolor=\"#f0fff0\">return the Well-known Text representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsWKT( geom Geometry [ , precision Integer ] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the Well-known Text representation<hr>always return strictly conformant 2D WKT</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">AsBinary( geom Geometry ) : Binary<hr>"); html += wxT ("ST_AsBinary( geom Geometry ) : Binary</td><td bgcolor=\"#f0fff0\">return the Well-known Binary representation</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c33misc\">SQL functions supporting exotic geometric formats</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsSVG( geom Geometry, [ , relative Integer [ , precision Integer ] ] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the SVG [<i>Scalable Vector Graphics</i>] representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsKML( geom Geometry [ , precision Integer ] ) : String<br>"); html += wxT ("AsKML( name String, description String, geom Geometry [ , precision Integer ] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the KML [<i>Keyhole Markup Language</i>] representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromKml( KmlGeometry String ) : Geometry</td><td bgcolor=\"#f0fff0\">construct a geometric object given its KML Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsGML( geom Geometry [ , precision Integer ] ) : String<br>"); html += wxT ("AsGML( version Integer, geom Geometry [ , precision Integer ] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the GML [<i>Geography Markup Language</i>] representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromGML( gmlGeometry String ) : Geometry</td><td bgcolor=\"#f0fff0\">construct a geometric object given its GML Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsGeoJSON( geom Geometry [ , precision Integer [ , options Integer ] ] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns the GeoJSON [<i>Geographic JavaScript Object Notation</i>] representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromGeoJSON( GeoJSONGeometry String ) : Geometry</td><td bgcolor=\"#f0fff0\">construct a geometric object given its GeoJSON Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsEWKB( geom Geometry ) : String</td><td bgcolor=\"#f0fff0\">returns the EWKB [<i>Extended Well Known Binary</i>] representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromEWKB( ewkbGeometry String ) : Geometry</td><td bgcolor=\"#f0fff0\">construct a geometric object given its EWKB Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsEWKT( geom Geometry ) : String</td><td bgcolor=\"#f0fff0\">returns the EWKT [<i>Extended Well Known Text</i>] representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromEWKT( ewktGeometry String ) : Geometry</td><td bgcolor=\"#f0fff0\">construct a geometric object given its EWKT Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AsFGF( geom Geometry ) : String</td><td bgcolor=\"#f0fff0\">returns the FGF [<i>FDO Geometry Binary Format</i>] representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeomFromFGF( fgfGeometry Binary [ , SRID Integer] ) : Geometry</td><td bgcolor=\"#f0fff0\">construct a geometric object given its FGF binary Representation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ExportDXF( out_dir String , filename String , sql_query String , layer_col_name String , "); html += wxT ("geom_col_name String , label_col_name String , text_height_col_name String , text_rotation_col_name String , geom_filter Geometry [ , precision Integer ] ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Exports a whole DXF file.<br>Will return 0 (i.e. FALSE) on failure, any other value (i.e. TRUE) on success.<hr>"); html += wxT ("Please note this SQL function open the doors to many potential security issues, and thus is always disabled by default.<br>"); html += wxT ("Explicitly setting the environment variable SPATIALITE_SECURITY=relaxed is absolutely required in order to effectively enable this function.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c34\">functions on type Geometry</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Dimension( geom Geometry ) : Integer<hr>"); html += wxT("ST_Dimension( geom Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the dimension of the geometric object, which is less than or equal to the dimension of the coordinate space</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CoordDimension( geom Geometry ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the dimension model used by the geometric object as:<br>'XY', 'XYZ', 'XYM' or 'XYZM'</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">ST_NDims( geom Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the number of dimensions used by the geometric object as:<br>2, 3 or 4</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">ST_Is3D( geom Geometry ) : Integer</td>"); html += wxT("<td bgcolor=\"#f0fff0\">Checks if geom has the Z dimension.<br>"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); html += wxT("function invocation on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_IsMeasured( geom Geometry ) : Integer</td>"); html += wxT("<td bgcolor=\"#f0fff0\">Checks if geom has the M dimension.<br>"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); html += wxT("function invocation on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeometryType( geom Geometry ) : String<hr>"); html += wxT("ST_GeometryType( geom Geometry ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the name of the instantiable subtype of Geometry of which this geometric object is a member, as a string</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">SRID( geom Geometry ) : Integer<hr>"); html += wxT("ST_SRID( geom <i>Geometry</i> ) : <i>Integer</i></td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the Spatial Reference System ID for this geometric object</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SetSRID( geom Geometry , SRID Integer ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">directly sets the Spatial Reference System ID for this geometric object [no reprojection is applied].<br>"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); html += wxT("function invocation on NULL arguments</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsEmpty( geom Geometry ) : Integer<hr>"); html += wxT("ST_IsEmpty( geom Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if this geometric object corresponds to the empty set</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsSimple( geom Geometry ) : Integer<hr>"); html += wxT("ST_IsSimple( geom <i>Geometry</i> ) : <i>Integer</i></td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if this geometric object is simple, as defined in the Geometry Model</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsValid( geom Geometry ) : Integer<hr>"); html += wxT("ST_IsValid( geom Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if this geometric object does not contains any topological error</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Boundary( geom Geometry ) : Geometry<hr>"); html += wxT("ST_Boundary( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object that is the combinatorial boundary of g as defined in the Geometry Model</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Envelope( geom Geometry ) : Geometry<hr>"); html += wxT("ST_Envelope( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the rectangle bounding g as a Polygon. "); html += wxT ("The Polygon is defined by the corner points of the bounding box [(MINX, MINY),(MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)].</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Expand( geom Geometry , amount Double ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the rectangle bounding g as a Polygon.<br>"); html += wxT ("The bounding rectangle is expanded in all directions by an amount specified by the second argument.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_NPoints( geom Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the total number of Points (this including any Linestring/Polygon vertex)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_NRings( geom Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the total number of Rings (this including both Exterior and Interior Rings)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Reverse( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a new Geometry [if possible] or NULL<hr>"); html += wxT("Any Linestring or Ring will be in reverse order.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_ForceLHR( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a new Geometry [if possible] or NULL<hr>"); html += wxT ("Any Polygon will be oriented accordingly to Left Hand Rule (Exterior Ring clockwise, "); html += wxT("Interior Rings counter-clockwise).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AddPoint( line Linestring , point Point [ , position Integer ] ) : Linestring<hr>"); html += wxT ("ST_AddPoint( line Linestring , point Point [ , position Integer ] ) : Linestring</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Adds a new Point into the input Linestring immediately before \"position\" (zero-based index)<br>"); html += wxT ("A negative \"position\" (default) means appending the new Point to the end of the input Linestring.<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SetPoint( line Linestring , position Integer , point Point ) : Linestring<hr>"); html += wxT ("ST_SetPoint( line Linestring , position Integer , point Point ) : Linestring</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Replaces the Point into the input Linestring at \"position\" (zero-based index)<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT("ST_SetStartPoint( line Linestring , point Point ) : Linestring</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Replaces the StartPoint into the input Linestring<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT("ST_SetEndtPoint( line Linestring , point Point ) : Linestring</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Replaces the EndPoint into the input Linestring<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RemovePoint( line Linestring , position Integer ) : Linestring<hr>"); html += wxT ("ST_RemovePoint( line Linestring , position Integer ) : Linestring</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Removes the Point into the input Linestring at \"position\" (zero-based index)<br>"); html += wxT("NULL will be returned if any error is encountered.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"repair\">Functions attempting to repair malformed Geometries</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SanitizeGeometry( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a (possibly) sanitized Geometry or NULL</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"compress\">Geometry-compression functions</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CompressGeometry( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a compressed Geometry or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">UncompressGeometry( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns an uncompressed Geometry or NULL</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"cast\">Geometry-type casting functions</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToPoint( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a POINT-type Geometry [if possible] or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToLinestring( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a LINESTRING-type Geometry [if possible] or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToPolygon( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a POLYGON-type Geometry [if possible] or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToMultiPoint( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a MULTIPOINT-type Geometry [if possible] or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToMultiLinestring( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a MULTILINESTRING-type Geometry [if possible] or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToMultiPolygon( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a MULTIPOLYGON-type Geometry [if possible] or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToGeometryCollection( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a GEOMETRYCOLLECTION-type Geometry [if possible] or NULL</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToMulti( geom Geometry ) : geom Geometry<hr>"); html += wxT("ST_Multi( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a MULTIPOINT-, MULTILINESTRING- or MULTIPOLYGON-type Geometry [if possible]: NULL in any other case</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToSingle( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a POINT-, LINESTRING- or POLYGON-type Geometry [if possible]: NULL in any other case</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"dims-cast\">Space-dimensions casting functions</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToXY( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a Geometry using the [XY] space dimension</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToXYZ( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a Geometry using the [XYZ] space dimension</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToXYM( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a Geometry using the [XYM] space dimension</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CastToXYZM( geom Geometry ) : geom Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">returns a Geometry using the [XYZM] space dimension</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c35\">functions on type Point</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">X( pt Point ) : Double precision<hr>"); html += wxT ("ST_X( pt Point ) : Double precision</td><td bgcolor=\"#f0fff0\">return the x-coordinate of Point p as a double precision number</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Y( pt Point ) : Double precision<hr>"); html += wxT ("ST_Y( pt Point ) : Double precision</td><td bgcolor=\"#f0fff0\">return the y-coordinate of Point p as a double precision number</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Z( pt Point ) : Double precision<hr>"); html += wxT ("ST_Z( pt Point ) : Double precision</td><td bgcolor=\"#f0fff0\">return the z-coordinate of Point p as a double precision number"); html += wxT("or NULL if no z-coordinate is available</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">M( pt Point ) : Double precision<hr>"); html += wxT ("ST_M( pt Point ) : Double precision</td><td bgcolor=\"#f0fff0\">return the m-coordinate of Point p as a double precision number<br>"); html += wxT("or NULL if no m-coordinate is available</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c361\">functions on type Curve [Linestring or Ring]</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">StartPoint( c Curve ) : Point<hr>"); html += wxT ("ST_StartPoint( c Curve ) : Point</td><td bgcolor=\"#f0fff0\">return a Point containing the first Point of c</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">EndPoint( c Curve ) : Point<hr>"); html += wxT ("ST_EndPoint( c Curve ) : Point</td><td bgcolor=\"#f0fff0\">return a Point containing the last Point of c</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">NumPoints( line LineString ) : Integer<hr>"); html += wxT ("ST_NumPoints( line LineString ) : Integer</td><td bgcolor=\"#f0fff0\">return the number of Points in the LineString</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PointN( line LineString , n Integer ) : Point<hr>"); html += wxT ("ST_PointN( line LineString , n Integer ) : Point</td><td bgcolor=\"#f0fff0\">return a Point containing Point n of line</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GLength( c Curve [ , use_ellipsoid Boolean ] ) : Double precision<hr>"); html += wxT ("ST_Length( c Curve [ , use_ellipsoid Boolean ] ) : Double precision</td><td bgcolor=\"#f0fff0\">return the length of c</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Perimeter( s Surface [ , use_ellipsoid Boolean ] ) : Double precision<hr>"); html += wxT ("ST_Perimeter( s Surface [ , use_ellipsoid Boolean ] ) : Double precision</td><td bgcolor=\"#f0fff0\">return the perimeter of s</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeodesicLength( c Curve ) : Double precision</td><td bgcolor=\"#f0fff0\">return the geodesic length of c"); html += wxT (" measured on the Ellipsoid [<i>only for <b>geographic</b> SRIDs</i>]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GreatCircleLength( c Curve ) : Double precision</td><td bgcolor=\"#f0fff0\">return the Great Circle length of c"); html += wxT(" [<i>only for <b>geographic</b> SRIDs</i>]</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsClosed( c Curve ) : Integer<hr>"); html += wxT("ST_IsClosed( c Curve ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT ("return TRUE if c is closed, i.e., if StartPoint(c) = EndPoint(c)</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">IsRing( c Curve ) : Integer<hr>"); html += wxT("ST_IsRing( c Curve ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT ("return TRUE if c is a ring, i.e., if c is closed and simple. A simple Curve does not pass through the same Point more than once.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PointOnSurface( s Surface/Curve ) : Point<hr>"); html += wxT ("ST_PointOnSurface( s Surface ) : Point</td><td bgcolor=\"#f0fff0\">return a Point guaranteed to lie on the Surface (or Curve)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Simplify( c Curve , tolerance Double precision ) : Curve<hr>"); html += wxT("ST_Simplify( c Curve , tolerance Double precision ) : Curve<hr>"); html += wxT("ST_Generalize( c Curve , tolerance Double precision ) : Curve</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object representing a simplified version of c applying the Douglas-Peukert algorithm with given tolerance</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SimplifyPreserveTopology( c Curve , tolerance Double precision ) : Curve<hr>"); html += wxT ("ST_SimplifyPreserveTopology( c Curve , tolerance Double precision ) : Curve</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object representing a simplified version of c "); html += wxT ("applying the Douglas-Peukert algorithm with given tolerance and respecting topology</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c36\">functions on type Surface [Polygon or Ring]</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">Centroid( s Surface ) : Point<hr>"); html += wxT ("ST_Centroid( s Surface ) : Point</td><td bgcolor=\"#f0fff0\">return the centroid of s, which may lie outside s</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Area( s Surface [ , use_ellipsoid Boolean ] ) : Double precision<hr>"); html += wxT ("ST_Area( s Surface [ , use_ellipsoid Boolean ] ) : Double precision</td><td bgcolor=\"#f0fff0\">return the area of s</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c37\">functions on type Polygon</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ExteriorRing( polyg Polygon ) : LineString<hr>"); html += wxT ("ST_ExteriorRing( polyg Polygon ) : LineString</td><td bgcolor=\"#f0fff0\">return the exteriorRing of p</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">NumInteriorRing( polyg Polygon ) : Integer<hr>NumInteriorRings( polyg Polygon ) : Integer<hr>"); html += wxT("ST_NumInteriorRing( polyg Polygon ) : Integer</td>"); html += wxT("<td bgcolor=\"#f0fff0\">return the number of interiorRings</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">InteriorRingN( polyg Polygon , n Integer ) : LineString<hr>"); html += wxT("ST_InteriorRingN( polyg Polygon , n Integer ) : LineString</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the nth interiorRing. The order of Rings is not geometrically significant.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c38\">functions on type GeomCollection</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">NumGeometries( geom GeomCollection ) : Integer<hr>"); html += wxT ("ST_NumGeometries( geom GeomCollection ) : Integer</td><td bgcolor=\"#f0fff0\">return the number of geometries</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GeometryN( geom GeomCollection , n Integer ) : Geometry<hr>"); html += wxT("ST_GeometryN( geom GeomCollection , n Integer ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the nth geometric object in the collection. The order of the elements in the collection is not geometrically significant.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c39\">functions testing approximative spatial relationships via MBRs</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrEqual( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if g1 and g2 have equal MBRs</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrDisjoint( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if the intersection of g1 and g2 MBRs is the empty set</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrTouches( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if the only Points in common between g1 and g2 MBRs lie in the union of the boundaries of g1 and g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrWithin( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if g1 MBR is completely contained in g2 MBR</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrOverlaps( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if the intersection of g1 and g2 MBRs results in a value of the same dimension as g1 and g2 that is different from both g1 and g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrIntersects( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT ("convenience predicate: TRUE if the intersection of g1 and g2 MBRs is not empty</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_EnvIntersects( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT ("ST_EnvelopesIntersects( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT ("ST_EnvIntersects( geom1 Geometry , x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer<hr>"); html += wxT ("ST_EnvelopesIntersects( geom1 Geometry , x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The first form simply is an alias name for MbrIntersects; the other form allows to define the second MBR by two extreme points [x1, y1] and [x2, y2].<br>"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on invalid arguments<br>"); html += wxT ("convenience predicate: TRUE if the intersection of both MBRs is not empty</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">MbrContains( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT ("convenience predicate: TRUE if g2 MBR is completely contained in g1 MBR</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c40\">functions testing spatial relationships</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Equals( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Equals( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if g1 and g2 are equal</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Disjoint( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Disjoint( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if the intersection of g1 and g2 is the empty set</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Touches( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Touches( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if the only Points in common between g1 and g2 lie in the union of the boundaries of g1 and g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Within( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Within( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT("TRUE if g1 is completely contained in g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Overlaps( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Overlaps( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if the intersection of g1 and g2 results in a value of the same dimension as g1 and g2 that is different from both g1 and g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Crosses( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Crosses( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("TRUE if the intersection of g1 and g2 results in a value whose dimension is less than the maximum dimension of g1 and g2 "); html += wxT ("and the intersection value includes Points interior to both g1 and g2, and the intersection value is not equal to either g1 or g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Intersects( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Intersects( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT ("convenience predicate: TRUE if the intersection of g1 and g2 is not empty</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Contains( geom1 Geometry , geom2 Geometry ) : Integer<hr>"); html += wxT("ST_Contains( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT ("convenience predicate: TRUE if g2 is completely contained in g1</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Covers( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT("convenience predicate: TRUE if g1 completely covers g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CoveredBy( geom1 Geometry , geom2 Geometry ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments<br>"); html += wxT ("convenience predicate: TRUE if g1 is completely covered by g2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Relate( geom1 Geometry , geom2 Geometry , patternMatrix String ) : Integer<hr>"); html += wxT ("ST_Relate( geom1 Geometry , geom2 Geometry , patternMatrix String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.<br>"); html += wxT ("return TRUE if the spatial relationship specified by the patternMatrix holds</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Distance( geom1 Geometry , geom2 Geometry [ , use_ellipsoid Boolean ] ) : Double precision<hr>"); html += wxT ("ST_Distance( geom1 Geometry , geom2 Geometry [ , use_ellipsoid Boolean ] ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the distance between geom1 and geom2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">HausdorffDistance( geom1 Geometry , geom2 Geometry ) : Double precision<hr>"); html += wxT ("ST_HausdorffDistance( geom1 Geometry , geom2 Geometry ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the Hausdorff Distance between geom1 and geom2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">PtDistWithin( geom1 Geometry , geom2 Geometry , range Double precision [ , use_spheroid Integer ] ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">checks if the distance between geom1 and geom2 is within the given range.<br>"); html += wxT ("As a special case if both geoms are simple WGS84 POINTs (SRID=4326) distances are expessed in meters.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c41\">functions implementing spatial operators</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Intersection( geom1 Geometry , geom2 Geometry ) : Geometry<hr>"); html += wxT("ST_Intersection( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object that is the intersection of geometric objects geom1 and geom2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Difference( geom1 Geometry , geom2 Geometry ) : Geometry<hr>"); html += wxT("ST_Difference( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object that is the closure of the set difference of geom1 and geom2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GUnion( geom1 Geometry , geom2 Geometry ) : Geometry<hr>"); html += wxT("ST_Union( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object that is the set union of geom1 and geom2</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">GUnion( geom Geometry ) : Geometry<hr>"); html += wxT("ST_Union( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object that is the set union of input values<br>"); html += wxT("<b><u>aggregate function</u></b></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SymDifference( geom1 Geometry , geom2 Geometry ) : Geometry<hr>"); html += wxT("ST_SymDifference( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object that is the closure of the set symmetric difference of geom1 and geom2 (logical XOR of space)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Buffer( geom Geometry , dist Double precision ) : Geometry<hr>"); html += wxT("ST_Buffer( geom Geometry , dist Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object defined by buffering a distance d around geom, "); html += wxT ("where dist is in the distance units for the Spatial Reference of geom</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ConvexHull( geom Geometry ) : Geometry<hr>"); html += wxT("ST_ConvexHull( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object that is the convex hull of geom</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">OffsetCurve( geom Curve , radius Double precision, left_or_right Integer ) : Curve<hr>"); html += wxT ("ST_OffsetCurve( geom Curve , radius Double precision, left_or_right Integer ) : Curve</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object representing the corresponding left- (or right-sided) offset curve<br>"); html += wxT ("NULL if returned whenever is not possible deriving an offset curve from the original geometry<br>"); html += wxT("[a single not-closed LINESTRING is expected as input]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SingleSidedBuffer( geom Curve , radius Double precision, left_or_right Integer ) : Curve<hr>"); html += wxT ("ST_SingleSidedBuffer( geom Curve , radius Double precision, left_or_right Integer ) : Curve</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object representing the corresponding left- (or right-sided) single-sided buffer<br>"); html += wxT ("NULL if returned whenever is not possible deriving a single-sided buffer from the original geometry<br>"); html += wxT("[a single not-closed LINESTRING is expected as input]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SharedPaths( geom1 Geometry , geom2 Geometry ) : Geometry<hr>"); html += wxT("ST_SharedPaths( geom1 Geometry , geom2 Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object (of the MULTILINESTRING type) representing any common edge shared by both geometries<br>"); html += wxT("NULL if returned is no common edge exists</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Line_Interpolate_Point( line Curve , fraction Double precision ) : Point<hr>"); html += wxT ("ST_Line_Interpolate_Point( line Curve , fraction Double precision ) : Point</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a point interpolated along a line.<br>Second argument (between 0.0 and 1.0) representing fraction"); html += wxT("of total length of linestring the point has to be located.<br>"); html += wxT("NULL if returned for invalid arguments</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Line_Interpolate_Equidistant_Points( line Curve , distance Double precision ) : Point<hr>"); html += wxT ("ST_Line_Interpolate_Equidistant_Points( line Curve , distance Double precision ) : Point</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a set of equidistant points interpolated along a line; the returned geometry "); html += wxT ("always corresponds to a MULTIPOINT supporting the M coordinate (representing the progressive distance for each interpolated Point).<br>"); html += wxT ("Second argument represents the regular distance between interpolated points.<br>"); html += wxT("NULL if returned for invalid arguments</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Line_Locatate_Point( line Curve , point Point ) : Double precision<hr>"); html += wxT ("ST_Line_Locate_Point( line Curve , point Point ) : Double precision</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a number (between 0.0 and 1.0) representing the location of the closest point on LineString"); html += wxT("to the given Point, as a fraction of total 2d line length.<br>"); html += wxT("NULL if returned for invalid arguments</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Line_Substring( line Curve , start_fraction Double precision , end_fraction Double precision ) : Curve<hr>"); html += wxT ("ST_Line_Substring( line Curve , start_fraction Double precision , end_fraction Double precision ) : Curve</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return a Linestring being a substring of the input one starting and ending at the given fractions of total 2d length.<br>"); html += wxT ("Second and third arguments are expected to be in the range between 0.0 and 1.0.<br>"); html += wxT("NULL if returned for invalid arguments</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ClosestPoint( geom1 Geometry , geom2 Geometry ) : Point<hr>"); html += wxT("ST_ClosestPoint( geom1 Geometry , geom2 Geometry ) : Point</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Returns the Point on geom1 that is closest to geom2.<br>"); html += wxT ("NULL is returned for invalid arguments (or if distance is ZERO)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ShortestLine( geom1 Geometry , geom2 Geometry ) : Curve<hr>"); html += wxT("ST_ShortestLine( geom1 Geometry , geom2 Geometry ) : Curve</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Returns the shortest line between two geometries.<br>"); html += wxT ("NULL is returned for invalid arguments (or if distance is ZERO)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Snap( geom1 Geometry , geom2 Geometry , tolerance Double precision ) : Geometry<hr>"); html += wxT ("ST_Snap( geom1 Geometry , geom2 Geometry , tolerance Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Returns a new Geometry representing a modified geom1, so to \"snap\" vertices "); html += wxT ("and segments to geom2 vertices; a snap distance tolerance is used to control where snapping is performed.<br>"); html += wxT("NULL is returned for invalid arguments</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">LineMerge( geom Geometry ) : Geometry<hr>"); html += wxT("ST_LineMerge( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned."); html += wxT ("The input Geometry is expected to represent a LINESTRING or a MULTILINESTRING.<br>The input Geometry can be an "); html += wxT ("arbitrary collection of sparse line fragments: this function will then try to (possibly) reassemble them into one"); html += wxT("(or more) Linestring(s).<br>"); html += wxT("NULL is returned for invalid arguments</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">UnaryUnion( geom Geometry ) : Geometry<hr>"); html += wxT("ST_UnaryUnion( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Exactely the same as ST_Union, but applied to a single Geometry.<br>"); html += wxT ("(set union of elementary Geometries within a MULTI- or GEOMETRYCOLLECTION complex Geometry).<br>"); html += wxT("NULL will be returned if any error is encountered</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c42\">functions for coordinate transformations</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">Transform( geom Geometry , newSRID Integer ) : Geometry<br>"); html += wxT("ST_Transform( geom Geometry , newSRID Integer ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by reprojecting coordinates into the Reference System identified by newSRID</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SridFromAuthCRS( auth_name String , auth_SRID Integer ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return the internal SRID corresponding to auth_name and auth_SRID<br>-1 will be returned if no such CRS is defined</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ShiftCoords( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry<hr>"); html += wxT ("ShiftCoordinates( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by translating coordinates according to shiftX and shiftY values</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Translate( geom Geometry , shiftX Double precision , shiftY Double precision , shiftZ Double Precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by translating coordinates according to shiftX, shiftY and shiftZ values</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ST_Shift_Longitude( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by translating any negative longitude by 360.<hr>"); html += wxT ("Only meaningful for geographic (longitude/latitude) coordinates.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">NormalizeLonLat( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by normalizing any longitude in the range"); html += wxT("[-180 / +180] and any latitude in the range [-90 / + 90].<hr>"); html += wxT ("Only meaningful for geographic (longitude/latitude) coordinates.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ScaleCoords( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry<hr>"); html += wxT ("ScaleCoordinates( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by scaling coordinates according to scaleX and scaleY values<br>"); html += wxT ("if only one scale factor is specified, then an isotropic scaling occurs [i.e. the same scale factor is applied to both axis]"); html += wxT ("otherwise an anisotropic scaling occurs [i.e. each axis is scaled according to its own scale factor]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RotateCoords( geom Geometry , angleInDegrees Double precision ) : Geometry<hr>"); html += wxT ("RotateCoordinates( geom Geometry , angleInDegrees Double precision ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by rotating coordinates according to angleInDegrees value<br>"); html += wxT("Positive angle = clockwise rotation</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">ReflectCoords( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry<hr>"); html += wxT ("ReflectCoordinates( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by reflecting coordinates according to xAxis and yAxis switches<br>"); html += wxT ("i.e. if xAxis is 0 (FALSE), then x-coordinates remains untouched; otherwise x-coordinates will be reflected</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SwapCoords( geom Geometry ) : Geometry<hr>SwapCoordinates( geom Geometry ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">return a geometric object obtained by swapping x- and y-coordinates</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c43\">functions for Spatial-MetaData and Spatial-Index handling</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">InitSpatialMetaData( void ) : Integer<hr>"); html += wxT("InitSpatialMetaData( transaction Integer ) : Integer<hr>"); html += wxT("InitSpatialMetaData( mode String ) : Integer<hr>"); html += wxT ("InitSpatialMetaData( transaction Integer , mode String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates the geometry_columns and spatial_ref_sys metadata tables"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE<hr>"); html += wxT ("the first form (no args) will automatically populate spatial_ref_sys inserting any possible ESPG SRID definition<br>"); html += wxT ("if the arg 'WGS84' (alias 'WGS84_ONLY') is specified, then only WGS84-releated EPSG SRIDs will be inserted<br>"); html += wxT ("if the arg 'NONE' (alias 'EMPTY') is specified, no EPSG SRID will be inserted at all</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">InsertEpsgSrid( srid <i>Integer</i> ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Attempts to insert into spatial_ref_sys the EPSG definition uniquely identified by srid<br>"); html += wxT ("[the corresponding EPSG SRID definition will be copied from the inlined dataset defined in libspatialite<hr>"); html += wxT ("the return type is Integer, with a return value of 1 for success or 0 for failure</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AddGeometryColumn( table String , column String , srid Integer , geom_type String , dimension String [ , not_null Integer ] ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates a new geometry column updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RecoverGeometryColumn( table String , column String , srid Integer , geom_type String , dimension String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Validates an existing ordinary column in order to possibly transform it in a real geometry column, "); html += wxT ("thus updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DiscardGeometryColumn( table String , column String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Removes a geometry column from Spatial MetaData tables and drops any related trigger<br>"); html += wxT ("the column itself still continues to exist untouched as an ordinary, unconstrained column<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RegisterVirtualGeometry( table String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Registers a VirtualShape table into Spatial MetaData tables; the VirtualShape table should be already created in some previous step.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DropVirtualGeometry( table String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Removes a VirtualShape table from Spatial MetaData tables, dropping the VirtualShape table as well.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CreateSpatialIndex( table String , column String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Builds an RTree Spatial Index on a geometry column, "); html += wxT ("creating any required trigger required in order to enforce full data coherency between the main table and Spatial Index<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DisableSpatialIndex( table String , column String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Disables an RTree Spatial Index, removing any related trigger<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CheckShadowedRowid( table String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Checks if some table has a physical column named \"rowid\" (caseless) shadowing the real ROWID.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">CheckSpatialIndex( void ) : Integer<hr>"); html += wxT("CheckSpatialIndex( table String , column String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Checks an RTree Spatial Index for validity and consistency<br>"); html += wxT ("- if no arguments are passed, then any RTree defined into geometry_columns will be checked<br>"); html += wxT ("- otherwise only the RTree corresponding to table and column will be checked<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RecoverSpatialIndex( [ no_check Integer ] ) : Integer<hr>"); html += wxT ("RecoverSpatialIndex( table String , column String [ , no_check Integer ] ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Recovers a (possibly broken) RTree Spatial Index<br>"); html += wxT ("- if no arguments are passed, then any RTree defined into geometry_columns will be recovered<br>"); html += wxT ("- otherwise only the RTree corresponding to table and column will be recovered<br>"); html += wxT("- the optional argument no_check will be interpreted as follows:<br>"); html += wxT (" * if no_check = FALSE (default) the RTree will be checked first: "); html += wxT("and only an invalid RTree will be then actually rebuilt<br>"); html += wxT (" * if no_check = TRUE the RTree will be unconditionally rebuilt from scratch anyway<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">InvalidateLayerStatistics( void ) : Integer<hr>"); html += wxT ("InvalidateLayerStatistics( table String [, column String ] ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Immediately and unconditionally invalidates the internal Layer Statistics<br>"); html += wxT ("- if no arguments are passed, then internal statics will be invalidated for any possible Geometry Column "); html += wxT("defined in the current DB<br>"); html += wxT ("- otherwise statistics will be invalidated only for Geometry Columns corresponding to the given table<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">UpdateLayerStatistics( void ) : Integer<hr>"); html += wxT ("UpdateLayerStatistics( table String [, column String ] ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Updates the internal Layer Statistics [Feature Count and Total Extent]<br>"); html += wxT ("- if no arguments are passed, then internal statics will be updated for any possible Geometry Column "); html += wxT("defined in the current DB<br>"); html += wxT ("- otherwise statistics will be updated only for Geometry Columns corresponding to the given table<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GetLayerExtent( table String [ , column String [ , mode Boolean] ] ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return the Envelope corresponding to the Total Extent of some Layer; "); html += wxT ("if the Table/Layer only contains a single Geometry column passing the column name isn't strictly required.<br>"); html += wxT ("NULL will be returned if any error occurs or if the required table isn't a Layer.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CreateTopologyTables( SRID Integer , dims String ) : Integer<hr>"); html += wxT ("CreateTopologyTables( prefix String , SRID Integer , dims String ) : Integer</td>"); html += wxT("<td bgcolor=\"#f0fff0\">Creates a set of <b>Topology</b> tables.<br>"); html += wxT ("<ul><li>the SRIDargument is mandatory</li><li>the dims argument must be 'XY' or 'XYZ': 2 or 3 are valid aliases</li>"); html += wxT ("<li>the optionalargument prefix can be used to support more Topology sets on the same DB: "); html += wxT ("if omitted a \"topo_\" prefix will be assumed by default</li></ul><hr>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CreateRasterCoveragesTable( void ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates the <b>raster_coverages</b> table required by RasterLite-2<hr>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure).</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c43metacatalog\">functions for MetaCatalog and related Statistics</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CreateMetaCatalogTables( transaction Integer ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates both <b>splite_metacatalog</b> and <b>splite_metacatalog_statistics</b> tables; "); html += wxT ("<i>splite_metacatalog</i> will be populated so to describe every table/column currently defined within the DB.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">UpdateMetaCatalogTables( transaction Integer , table_name String, column_name String ) : Integer</hr>"); html += wxT ("UpdateMetaCatalogTables( transaction Integer , master_table String , table_name String, column_name String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Updates the <b>splite_metacatalog_statistics</b> table by computing the statistic summary for the required table/column.<br>"); html += wxT ("the second form (four args) will use a MasterTable in order to identify all table/columns to be updated.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c43style\">functions supporting SLD/SE Styled Layers</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">CreateStylingTables( ) : Integer<hr>"); html += wxT("CreateStylingTables( relaxed Integer ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates a set of tables supporting <b>SLD/SE Styled Layers</b>.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RegisterExternalGraphic( xlink_href String , resource BLOB ) : Integer<hr>"); html += wxT ("RagisterExternalGraphic( xlink_href String , resource BLOB , title String , abstract String , file_name String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Inserts (or updates) an <b>External Graphic Resource</b>.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RegisterVectorStyledLayer( f_table_name String , f_geometry_column String , style BLOB ) : Integer<hr>"); html += wxT ("RegisterVectorStyledLayer( f_table_name String , f_geometry_column String , style_id Integer , style BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Inserts (or updates) a <b>Vector Styled Layer</b> definition.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RegisterRasterStyledLayer( coverage_name String , style BLOB ) : Integer<hr>"); html += wxT ("RegisterRasterStyledLayer( coverage_name String , style_id Integer , style BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Inserts (or updates) a <b>Raster Styled Layer</b> definition.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RegisterStyledGroup( group_name String , f_table_name String , f_geometry_colum String [ , paint_order Integer ] ) : Integer<hr>"); html += wxT ("RegisterStyledGroup( group_name String, coverage_name String [ , paint_order Integer ] ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Inserts (or updates) a <b>Styled Group</b> definition.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">SetStyledGroupInfos( group_name String , title String , abstract String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Inserts (or updates) the descriptive infos associated to a <b>Styled Group</b><br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RegisterGroupStyle( group_name String , style BLOB ) : Integer<hr>"); html += wxT ("RegisterGroupStyle( group_name String , style_id Integer , style BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Inserts (or updates) a <b>Group Style</b> definition.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c43isometa\">functions implementing ISO Metadata</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">CreateIsoMetadataTables( ) : Integer<hr>"); html += wxT("CreateIsoMetadataTables( relaxed Integer ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates a set of tables supporting <b>ISO Metadata</b>.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RegisterIsoMetadata( scope String , metadata BLOB ) : Integer<hr>"); html += wxT ("RegisterIsoMetadata( scope String , metadata BLOB , id Integer ) : Integer<hr>"); html += wxT ("RagisterIsoMetadata( scope String , metadata BLOB , fileIdentifier String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Inserts (or updates) an <b>ISO Metadata</b> definition.<br>"); html += wxT ("The first form (two arguments only) always performs an INSERT; if one the optional arguments \"id\" or \"fileIdentifier\" an UPDATE could be eventually performed if a corresponding metadata row is already defined.<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">GetIsoMetadataId( fileIdentifier String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Return the unique \"id\" corresponding to the ISO Metadata definition identified by <b>fileIdentifier</b>.<hr>"); html += wxT ("If no corresponding ISO Metadata definition exists, this function will always return ZERO; -1 will be returned for invalid arguments.</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c43fdo\">functions implementing FDO/OGR compatibily</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">CheckSpatialMetaData( void ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Checks the Spatial Metadata type, then returning:<br>"); html += wxT ("<b>0</b> if the <i>geometry_columns</i> and <i>spatial_ref_sys</i> table does not exist, "); html += wxT ("or if their actual layout doesn't corresponds to any known implementation<br>"); html += wxT ("<b>1</b> if both tables exist, and their layout is the one used by <i>SpatiaLite legacy</i> (older versions including 3.0.1)<br>"); html += wxT ("<b>2</b> if both tables exist, and their layout is the one used by <i>FDO/OGR</i><br>"); html += wxT ("<b>3</b> if both tables exist, and their layout is the one currently used by <i>SpatiaLite</i> (3.1.0 or any subsequent version)</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">AutoFDOStart( void ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">This function will inspect the Spatial Metadata, then automatically creating/refreshing a <i>VirtualFDO</i>"); html += wxT (" wrapper for each FDO/OGR geometry table<br>the return type is Integer [how many VirtualFDO tables have been created]</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">AutoFDOStop( void ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">This function will inspect the Spatial Metadata, then automatically destroying any <i>VirtualFDO</i>"); html += wxT (" wrapper found<br>the return type is Integer [how many VirtualFDO tables have been destroyed]</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">InitFDOSpatialMetaData( void ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates the geometry_columns and spatial_ref_sys metadata tables"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE<br>"); html += wxT ("<u>Please note:</u> Spatial Metadata created using this function will have the FDO/OGR layout, and not the SpatiaLite's own</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">AddFDOGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer , geometry_type String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Creates a new geometry column updating the FDO/OGR Spatial Metadata tables<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RecoverFDOGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer , geometry_type String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Validates an existing ordinary column in order to possibly transform it in a real geometry column, "); html += wxT("thus updating the FDO/OGR Spatial Metadata tables<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">DiscardFDOGeometryColumn( table String , column String ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Removes a geometry column from FDO/OGR Spatial MetaData tables<br>"); html += wxT ("the column itself still continues to exist untouched as an ordinary column<br>"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c44\">functions for MbrCache-based queries</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">FilterMbrWithin( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Retrieves from an MbrCache any entity whose MBR falls within"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">FilterMbrContains( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Retrieves from an MbrCache any entity whose MBR contains"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">FilterMbrIntersects( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Retrieves from an MbrCache any entity whose MBR intersects"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"c45\">functions for R*Tree-based queries (Geometry Callbacks)</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RTreeWithin( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">*DEPRECATED* (alias-name for RTreeIntersects)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RTreeContains( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">*DEPRECATED* (alias-name for RTreeIntersects)</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RTreeIntersects( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Retrieves from an R*Tree any entity whose MBR intersects"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">RTreeDistWithin( x Double precision , y Double precision , radius Double precision ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Retrieves from an R*Tree any entity whose MBR intersects"); html += wxT (" the square square circumscribed on the given circle (x y center, radius)</td></tr>"); html += wxT ("<tr><td align=\"center\" bgcolor=\"#e0ffe0\" colspan=\"2\"><a name=\"xmlBlob\">SQL functions supporting XmlBLOB</a>"); html += wxT("<br><a href=\"#index\">back to index</a></td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_Create( xmlPayload BLOB ) : XmlBLOB<hr>"); html += wxT("XB_Create( xmlPayload BLOB , compressed Boolean ) : XmlBLOB<hr>"); html += wxT ("XB_Create( xmlPayload BLOB , compressed Boolean , schemaURI Text ) : XmlBLOB<hr>"); html += wxT ("XB_Create( xmlPayload BLOB , compressed Boolean , internalSchemaURI Boolean ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Construct an XmlBLOB object starting from an XmlDocument.<hr>"); html += wxT ("NULL will be returned for not well-formed XmlDocuments, or when XML validation is required but XmlDocument fails to pass validation for any reason.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetPayload( xmlObject BLOB [ , indent Integer ] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Extracts a generic BLOB from an XmlBLOB object, exactly corresponding to the original XmlDocument and fully preserving the original character encoding.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetDocument( xmlObject BLOB [ , indent Integer ] ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Extracts an XmlDocument from an XmlBLOB object; the returned XmlDocument will always be UTF-8 encoded (TEXT), irrespectively from the original internal encoding declaration.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_SchemaValidate( xmlObject BLOB , schemaURI Text [ , compressed Boolean ] ) : XmlBLOB<hr>"); html += wxT ("XB_SchemaValidate( xmlObject BLOB , internalSchemaURI Boolean [ , compressed Boolean ] ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Construct an XML validated XmlBLOB object starting from an XmlDocument.<hr>"); html += wxT ("NULL will be returned if the input XmlBLOB fails to pass validation for any reason.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_Compress( xmlObject BLOB ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">A new compressed XmlBLOB object will be returned.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_Uncompress( xmlObject BLOB ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">A new uncompressed XmlBLOB object will be returned.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsValid( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsCompressed( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsSchemaValidated( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsIsoMetadata( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsSldSeVectorStyle( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsSldSeRasterStyle( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsSvg( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetDocumentSize( xmlObject BLOB ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the size in bytes of the corresponding uncompressed XmlDocument.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetEncoding( xmlObject BLOB ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the character encoding internally declared by the XmlDocument corresponding to the input XmlBLOB.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetSchemaURI( xmlObject BLOB ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the Schema URI effectively used to validate an XmlBLOB.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetInternalSchemaURI( xmlPayload BLOB ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the Schema URI internally declared by the input XmlDocument.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetFileId( xmlObject BLOB ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the FileId defined within the XmlBLOB (if any).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_SetFileId( xmlObject BLOB , fileId String ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return a new XmlBLOB by replacing the FileIdentifier value.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_AddFileId( xmlObject BLOB , fileId String , IdNameSpacePrefix String , IdNameSpaceURI String , CsNameSpacePrefix String , CsNameSpaceURI String ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return a new XmlBLOB by inserting a FileIdentifier value.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetParentId( xmlObject BLOB ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the ParentId defined within the XmlBLOB (if any).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_SetParentId( xmlObject BLOB , parentId String ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return a new XmlBLOB by replacing the ParentIdentifier value.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_AddParentId( xmlObject BLOB , parentId String , IdNameSpacePrefix String , IdNameSpaceURI String , CsNameSpacePrefix String , CsNameSpaceURI String ) : XmlBLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return a new XmlBLOB by inserting a ParentIdentifier value.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetTitle( xmlObject BLOB ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the Title defined within the XmlBLOB (if any).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetAbstract( xmlObject BLOB ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the Abstract defined within the XmlBLOB (if any).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetGeometry( xmlObject BLOB ) : Geometry</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the Geometry defined within the XmlBLOB (if any).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetLastParseError( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent XML parsing error (if any).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetLastValidateError( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent XML validating error (if any).</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_IsValidXPathExpression( expr Text ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_GetLastXPathError( void ) : String</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Will return the most recent XPath error (if any).</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">XB_CacheFlush( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Reset the internal XML Schema cache to its initial empty state.</td></tr>"); html += wxT("<tr><td bgcolor=\"#fffff0\">XB_CacheFlush( void ) : Boolean</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">Reset the internal XML Schema cache to its initial empty state.</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_LoadXML( filepath-or-URL String ) : BLOB</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">If \"filepath-or-URL\" corresponds to some valid local pathname, and the corresponding file (expected to contain a well-formed XML Document) "); html += wxT ("can be actually accessed in read mode, then the whole file content will be returned as a BLOB value.<br>"); html += wxT ("This function is even able to acces a remote XML Document identified by an URL.<br>Otherwise NULL will be returned.<br>"); html += wxT ("<u>Please note:</u> SQLite doesn't support BLOB values bigger than SQLITE_MAX_LENGTH (usually, 1 GB).<hr>"); html += wxT ("<u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always disabled by default.<br>"); html += wxT ("Explicitly setting the environment variable \"SPATIALITE_SECURITY=relaxed\" is absolutely required in order to effectively enable this function.<br>"); html += wxT("Please see: CountUnsafeTriggers().</td></tr>"); html += wxT ("<tr><td bgcolor=\"#fffff0\">XB_StoreXML( XmlObject XmlBLOB , filepath String ) : Integer<hr>"); html += wxT ("XB_StoreXML( XmlObject XmlBLOB , filepath String , indent Integer ) : Integer</td>"); html += wxT ("<td bgcolor=\"#f0fff0\">If \"XmlObject\" is of the XmlBLOB-type, and if \"filepath\" corresponds to some valid pathname "); html += wxT ("(accessible in write/create mode), then the corresponding file will be created/overwritten so to "); html += wxT ("contain the corresponding XML Document (fully preserving the original character encoding).<br>"); html += wxT ("If the optional argument \"indent\" is set to some positive value then the returned XmlDocument will be nicely formatted and properly indented by the required factor; "); html += wxT ("ZERO will cause the whole XmlDocument to be returned as a single line. (default setting is <i>negative</i> indenting, i.e. not reformatting at all).<hr>"); html += wxT ("The return type is Integer, with a return value of 1 for success, 0 for failure and -1 for invalid arguments.<hr>"); html += wxT ("<u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always disabled by default.<br>"); html += wxT ("Explicitly setting the environment variable \"SPATIALITE_SECURITY=relaxed\" is absolutely required in order to effectively enable this function.<br>"); html += wxT("Please see: CountUnsafeTriggers().</td></tr>"); html += wxT("</table>"); html += wxT("<a href=\"#index\">back to index</a>"); html += wxT("</body>"); html += wxT("</html>"); } |
| > > | > > > > > > > > > | > > > > | | | | | | | < | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | > > > > > > > > > | > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | > > > > > > > > > > > > > > > > > > > > > > > > | | > > > | | | > > > > > > > > > > > > | | > | > > > > > > > > > > | | > > > > > > > > > > > > > > > > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 .. 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 ... 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ... 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 ... 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 ... 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 ... 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 ... 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 ... 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 ... 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 ... 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 ... 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 ... 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 ... 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 ... 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 .... 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 .... 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 .... 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 .... 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 .... 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 .... 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 .... 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 .... 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 .... 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 .... 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 .... 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 .... 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 .... 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 .... 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 .... 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 .... 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 .... 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 .... 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 .... 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 .... 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 .... 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 .... 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 .... 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 .... 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 .... 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 .... 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 .... 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 .... 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 .... 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 .... 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 .... 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 .... 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 .... 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 .... 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 .... 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 .... 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 .... 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 .... 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 ..... 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 ..... 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 ..... 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 ..... 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 ..... 13410 13411 13412 13413 13414 13415 13416 |
/* / Main.cpp / the main core of spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 1.7, 2014 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2014 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "wx/filename.h" #include "wx/config.h" #include "wx/tokenzr.h" #include <spatialite.h> #include <proj_api.h> #include <geos_c.h> #include <virtualpg.h> // // ICONs in XPM format [universally portable] // #include "icons/icon.xpm" #include "icons/icon_info.xpm" #include "icons/create_new.xpm" ................................................................................ #include "icons/sanegeom.xpm" #include "icons/wfs.xpm" #include "icons/dxf.xpm" #include "icons/map_go.xpm" #include "icons/security_lock.xpm" #include "icons/security_relaxed.xpm" #include "icons/security_rdonly.xpm" #include "icons/postgres.xpm" #if defined(_WIN32) && !defined(__MINGW32__) #define unlink _unlink #endif IMPLEMENT_APP(MyApp) bool MyApp::OnInit() ................................................................................ { // // main GUI frame constructor // setlocale(LC_ALL, ""); // forcing DECIMAL POINT IS COMMA setlocale(LC_NUMERIC, "C"); // setting up the LibPQ virtual API DoInitVirtualPQapi(); // creating the internal WMS Cache WmsCache = create_wms_cache(); ::wxInitAllImageHandlers(); MapPanel = NULL; ................................................................................ BtnSqlLog = new wxBitmap(sql_log_xpm); BtnDbStatus = new wxBitmap(db_status_xpm); BtnCheckGeom = new wxBitmap(checkgeom_xpm); BtnSaneGeom = new wxBitmap(sanegeom_xpm); BtnWFS = new wxBitmap(wfs_xpm); BtnDXF = new wxBitmap(dxf_xpm); BtnMap = new wxBitmap(map_go_xpm); BtnPostgres = new wxBitmap(postgres_xpm); // // setting up the application icon // wxIcon MyIcon(icon_xpm); SetIcon(MyIcon); ................................................................................ wxT("&Optimizing current SQLite DB [VACUUM]")); menuItem->SetBitmap(*BtnVacuum); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, ID_Attach, wxT("&Attach DataBase")); menuItem->SetBitmap(*BtnAttach); menuFile->Append(menuItem); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, ID_Postgres, wxT("&Connecting to PostgreSQL")); menuItem->SetBitmap(*BtnPostgres); menuFile->Append(menuItem); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, ID_MapPanel, wxT("Map &Panel"), wxT("Map &Panel"), wxITEM_CHECK); menuFile->Append(menuItem); menuFile->AppendSeparator(); wxMenu *advancedMenu = new wxMenu(); menuItem = ................................................................................ menuItem = new wxMenuItem(advancedMenu, ID_LoadXL, wxT("Load &XLS")); menuItem->SetBitmap(*BtnLoadXL); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_VirtualXL, wxT("Virtual &XLS")); menuItem->SetBitmap(*BtnVirtualXL); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_Network, wxT("Create &Network")); menuItem->SetBitmap(*BtnNetwork); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_Exif, wxT("Import &EXIF photos")); menuItem->SetBitmap(*BtnExif); advancedMenu->Append(menuItem); menuItem = ................................................................................ // // setting up menu initial state // menuBar->Enable(ID_Disconnect, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_Vacuum, false); menuBar->Enable(ID_Postgres, false); menuBar->Enable(ID_MapPanel, false); menuBar->Enable(ID_SqlScript, false); menuBar->Enable(ID_QueryViewComposer, false); menuBar->Enable(ID_LoadShp, false); menuBar->Enable(ID_VirtualShp, false); menuBar->Enable(ID_LoadTxt, false); menuBar->Enable(ID_VirtualTxt, false); ................................................................................ wxT("Disconnecting current SQLite DB")); toolBar->AddTool(ID_Vacuum, wxT("Optimizing current SQLite DB [VACUUM]"), *BtnVacuum, wxNullBitmap, wxITEM_NORMAL, wxT("Optimizing current SQLite DB [VACUUM]")); toolBar->AddTool(ID_Attach, wxT("Attach DataBase"), *BtnAttach, wxNullBitmap, wxITEM_NORMAL, wxT("Attach DataBase")); toolBar->AddTool(ID_Postgres, wxT("Connecting to PostgreSQL"), *BtnPostgres, wxNullBitmap, wxITEM_CHECK, wxT("Connecting to PostgreSQL")); toolBar->AddTool(ID_MapPanel, wxT("Map Panel"), *BtnMap, wxNullBitmap, wxITEM_CHECK, wxT("Map Panel")); toolBar->AddTool(ID_SqlLog, wxT("SQL Log"), *BtnSqlLog, wxNullBitmap, wxITEM_CHECK, wxT("SQL Log")); toolBar->AddTool(ID_DbStatus, wxT("DB Status"), *BtnDbStatus, wxNullBitmap, wxITEM_NORMAL, wxT("DB Status")); toolBar->AddTool(ID_CheckGeom, wxT("Check Geometries"), *BtnCheckGeom, wxNullBitmap, wxITEM_NORMAL, wxT("Check Geometries")); toolBar->AddTool(ID_SaneGeom, wxT("Sanitize Geometries"), *BtnSaneGeom, wxNullBitmap, wxITEM_NORMAL, wxT("Sanitize Geometries")); toolBar->AddTool(ID_SqlScript, wxT("Execute SQL script"), *BtnSqlScript, wxNullBitmap, wxITEM_NORMAL, wxT("Execute SQL script")); toolBar->AddTool(ID_QueryViewComposer, wxT("Query/View Composer"), *BtnQueryComposer, wxNullBitmap, wxITEM_NORMAL, wxT("Query/View Composer")); ................................................................................ wxITEM_NORMAL, wxT("Load DBF")); toolBar->AddTool(ID_VirtualDbf, wxT("Virtual DBF"), *BtnVirtualDbf, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual DBF")); toolBar->AddTool(ID_LoadXL, wxT("Load XLS"), *BtnLoadXL, wxNullBitmap, wxITEM_NORMAL, wxT("Load XLS")); toolBar->AddTool(ID_VirtualXL, wxT("Virtual XLS"), *BtnVirtualXL, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual XLS")); toolBar->AddTool(ID_Network, wxT("Create Network"), *BtnNetwork, wxNullBitmap, wxITEM_NORMAL, wxT("Create Network")); toolBar->AddTool(ID_Exif, wxT("Import EXIF photos"), *BtnExif, wxNullBitmap, wxITEM_NORMAL, wxT("Import EXIF photos")); toolBar->AddTool(ID_GpsPics, wxT("Import GPS photos"), *BtnGpsPics, wxNullBitmap, wxITEM_NORMAL, wxT("Import GPS photos")); toolBar->AddTool(ID_LoadXml, wxT("Import XML Documents"), *BtnLoadXml, wxNullBitmap, wxITEM_NORMAL, wxT("Import XML Documents")); toolBar->AddTool(ID_WFS, wxT("Import data from WFS datasource"), *BtnWFS, ................................................................................ // // setting up the toolbar initial state // toolBar->EnableTool(ID_Disconnect, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_Vacuum, false); toolBar->EnableTool(ID_Postgres, false); toolBar->EnableTool(ID_MapPanel, false); toolBar->EnableTool(ID_SqlScript, false); toolBar->EnableTool(ID_QueryViewComposer, false); toolBar->EnableTool(ID_LoadShp, false); toolBar->EnableTool(ID_VirtualShp, false); toolBar->EnableTool(ID_LoadTxt, false); toolBar->EnableTool(ID_VirtualTxt, false); ................................................................................ (wxObjectEventFunction) & MyFrame::OnMemoryDbNew); Connect(ID_MemoryDbClock, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbClock); Connect(ID_MemoryDbSave, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbSave); Connect(ID_Vacuum, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnVacuum); Connect(ID_Postgres, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnPostgreSQL); Connect(ID_MapPanel, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMapPanel); Connect(ID_SqlScript, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnSqlScript); Connect(ID_QueryViewComposer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnQueryViewComposer); Connect(ID_LoadShp, wxEVT_COMMAND_MENU_SELECTED, ................................................................................ delete BtnMemDbClock; if (BtnMemDbSave != NULL) delete BtnMemDbSave; if (BtnVacuum != NULL) delete BtnVacuum; if (BtnMap != NULL) delete BtnMap; if (BtnPostgres != NULL) delete BtnPostgres; if (BtnSqlScript != NULL) delete BtnSqlScript; if (BtnQueryComposer != NULL) delete BtnQueryComposer; if (BtnLoadShp != NULL) delete BtnLoadShp; if (BtnVirtualShp != NULL) ................................................................................ delete[]Charsets; if (CharsetsNames) delete[]CharsetsNames; if (WmsCache != NULL) destroy_wms_cache(WmsCache); if (RL2PrivateData) rl2_cleanup_private(RL2PrivateData); if (DynamicLibPQ.IsLoaded() == true) DynamicLibPQ.Unload(); } void MyFrame::SaveConfig() { // // saves layout configuration // ................................................................................ config->Write(wxT("WfsGetCapabilitiesURL"), WfsGetCapabilitiesURL); config->Write(wxT("HttpProxy"), HttpProxy); config->Write(wxT("ReadOnlyConnection"), ReadOnlyConnection); config->Write(wxT("RL2MaxThreads"), RL2MaxThreads); config->Write(wxT("MapMultiThreadingEnabled"), MapMultiThreadingEnabled); config->Write(wxT("MapMaxThreads"), MapMaxThreads); config->Write(wxT("MapAutoTransformEnabled"), MapAutoTransformEnabled); config->Write(wxT("PathLibPQ"), PathLibPQ); delete config; } void MyFrame::LoadConfig(wxString & externalPath) { // // loads layout configuration ................................................................................ config->Read(wxT("WfsGetCapabilitiesURL"), &WfsGetCapabilitiesURL); config->Read(wxT("HttpProxy"), &HttpProxy); config->Read(wxT("ReadOnlyConnection"), &ReadOnlyConnection); config->Read(wxT("RL2MaxThreads"), &RL2MaxThreads); config->Read(wxT("MapMultiThreadingEnabled"), &MapMultiThreadingEnabled); config->Read(wxT("MapMaxThreads"), &MapMaxThreads); config->Read(wxT("MapAutoTransformEnabled"), &MapAutoTransformEnabled); config->Read(wxT("PathLibPQ"), &PathLibPQ); delete config; Hide(); if (externalPath.Len() > 0) { // applying the external path wxFileName file(externalPath); ConfigDir = file.GetPath(); ................................................................................ { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_Postgres, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_Postgres, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); UpdateStatusBar(); } } if (VirtualPQapiOK == false) { // attempting to attempting to load LibPQ if (PathLibPQ.Len() > 0) { // using the same path from the previous session DoLoadLibPQ(PathLibPQ); } if (VirtualPQapiOK == false) { // using just the library name wxString path; #ifdef _WIN32 path = wxDynamicLibrary::CanonicalizeName(wxT("libpq")); #else path = wxDynamicLibrary::CanonicalizeName(wxT("pq")); #endif DoLoadLibPQ(path); } } Show(); if (AutoFDOmsg.Len() > 0) { wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoFDOmsg = wxT(""); } ................................................................................ { // // EXIT - event handler // Close(true); } void MyFrame::OnClose(wxCloseEvent & WXUNUSED(event)) { // // immedtiately before closing the main window // wxString db_path = SqlitePath; CloseDB(); SqlitePath = db_path; ................................................................................ str += wxT("RTTOPO version ") + wxString::FromUTF8(ver) + wxT("\n"); } if (GetLibXml2Version(ver)) { // printing out the LIBXML2 version if supported str += wxT("LIBXML2 version ") + wxString::FromUTF8(ver) + wxT("\n"); } strcpy(ver, virtualpg_version()); str += wxT("VirtualPG version ") + wxString::FromUTF8(ver) + wxT("\n"); wxString pqver; GetPQlibVersion(pqver); str += wxT("PQlib (PostgreSQL client) version ") + pqver + wxT("\n"); str += wxT("\nSQLite's extensions: 'SpatiaLite', 'VirtualShape', 'VirtualDbf',\n"); str += wxT("'VirtualXL', 'VirtualText', 'VirtualXPath', 'VirtualNetwork',\n"); str += wxT("'RTree', 'MbrCache', 'VirtualBBox', 'VirtualFDO', 'VirtualGPKG',\n"); str += wxT("'RasterLite2'\n\n"); strcpy(ver, spatialite_target_cpu()); ................................................................................ menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_Postgres, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_Postgres, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ mode2 = false; mode3 = false; } wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Disconnect, mode); menuBar->Enable(ID_Vacuum, mode); menuBar->Enable(ID_Postgres, mode); menuBar->Enable(ID_MapPanel, mode); menuBar->Enable(ID_SqlScript, mode); menuBar->Enable(ID_QueryViewComposer, mode2); menuBar->Enable(ID_LoadShp, mode); menuBar->Enable(ID_VirtualShp, mode); menuBar->Enable(ID_LoadTxt, mode); menuBar->Enable(ID_VirtualTxt, mode); ................................................................................ menuBar->Enable(ID_SqlLog, mode); menuBar->Enable(ID_DbStatus, mode); menuBar->Enable(ID_CheckGeom, mode); menuBar->Enable(ID_SaneGeom, mode); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Disconnect, mode); toolBar->EnableTool(ID_Vacuum, mode); toolBar->EnableTool(ID_Postgres, mode); toolBar->EnableTool(ID_MapPanel, mode); toolBar->EnableTool(ID_SqlScript, mode); toolBar->EnableTool(ID_QueryViewComposer, mode2); toolBar->EnableTool(ID_LoadShp, mode); toolBar->EnableTool(ID_VirtualShp, mode); toolBar->EnableTool(ID_LoadTxt, mode); toolBar->EnableTool(ID_VirtualTxt, mode); ................................................................................ menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_Postgres, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_Postgres, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ menuBar->Enable(ID_CreateNew, true); menuBar->Enable(ID_Disconnect, false); menuBar->Enable(ID_MemoryDbLoad, true); menuBar->Enable(ID_MemoryDbNew, true); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_Vacuum, false); menuBar->Enable(ID_Postgres, false); menuBar->Enable(ID_MapPanel, false); menuBar->Enable(ID_SqlScript, false); menuBar->Enable(ID_QueryViewComposer, false); menuBar->Enable(ID_LoadShp, false); menuBar->Enable(ID_VirtualShp, false); menuBar->Enable(ID_LoadTxt, false); menuBar->Enable(ID_VirtualTxt, false); ................................................................................ toolBar->EnableTool(ID_CreateNew, true); toolBar->EnableTool(ID_Disconnect, false); toolBar->EnableTool(ID_MemoryDbLoad, true); toolBar->EnableTool(ID_MemoryDbNew, true); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_Vacuum, false); toolBar->EnableTool(ID_Postgres, false); toolBar->EnableTool(ID_MapPanel, false); toolBar->EnableTool(ID_SqlScript, false); toolBar->EnableTool(ID_QueryViewComposer, false); toolBar->EnableTool(ID_LoadShp, false); toolBar->EnableTool(ID_VirtualShp, false); toolBar->EnableTool(ID_LoadTxt, false); toolBar->EnableTool(ID_VirtualTxt, false); ................................................................................ menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_Postgres, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_Postgres, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ } ret = sqlite3_backup_finish(backup); sqlite3_close(extSqlite); // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); DoInitVirtualPG(); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); ................................................................................ menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_Postgres, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_Postgres, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); menuBar->Enable(ID_MemoryDbSave, true); menuBar->Enable(ID_MemoryDbClock, true); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_Postgres, true); menuBar->Enable(ID_MapPanel, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); ................................................................................ toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); toolBar->EnableTool(ID_MemoryDbSave, true); toolBar->EnableTool(ID_MemoryDbClock, true); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_Postgres, true); toolBar->EnableTool(ID_MapPanel, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); ................................................................................ ok = true; } } } sqlite3_free_table(results); return ok; } void MyFrame::CreateNetwork(wxString & table, wxString & from, wxString & to, bool isNoGeometry, wxString & geom, bool isNameEnabled, wxString & name, bool isGeomLength, wxString & cost, bool isBidirectional, bool isOneWays, wxString & oneWayFromTo, wxString & oneWayToFrom, bool aStarSupported, wxString & dataTableName, wxString & virtualTableName, bool overwrite) { // // creating VirtualRouting tables // char *xtable = (char *) malloc(table.Len() * 4); strcpy(xtable, table.ToUTF8()); char *xfrom = (char *) malloc(from.Len() * 4); strcpy(xfrom, from.ToUTF8()); char *xto = (char *) malloc(to.Len() * 4); strcpy(xto, to.ToUTF8()); char *xgeom = NULL; if (isNoGeometry == false && geom.Len() > 0) { xgeom = (char *) malloc(geom.Len() * 4); strcpy(xgeom, geom.ToUTF8()); } char *xname = NULL; if (isNameEnabled == true && name.Len() > 0) { xname = (char *) malloc(name.Len() * 4); strcpy(xname, name.ToUTF8()); } char *xcost = NULL; if (isGeomLength == false && cost.Len() > 0) { xcost = (char *) malloc(cost.Len() * 4); strcpy(xcost, cost.ToUTF8()); } int xbidirectional = 0; if (isBidirectional == true) xbidirectional = 1; char *xonewayfrom = NULL; char *xonewayto = NULL; if (isOneWays == true && oneWayFromTo.Len() > 0 && oneWayToFrom.Len() > 0) { xonewayfrom = (char *) malloc(oneWayFromTo.Len() * 4); strcpy(xonewayfrom, oneWayFromTo.ToUTF8()); xonewayto = (char *) malloc(oneWayToFrom.Len() * 4); strcpy(xonewayto, oneWayToFrom.ToUTF8()); } int xastarsupported = 0; if (aStarSupported == true) xastarsupported = 1; char *xdatatablename = (char *) malloc(dataTableName.Len() * 4); strcpy(xdatatablename, dataTableName.ToUTF8()); char *xvirtualtablename = (char *) malloc(virtualTableName.Len() * 4); strcpy(xvirtualtablename, virtualTableName.ToUTF8()); int xoverwrite = 0; if (overwrite == true) xoverwrite = 1; // preparing the SQL statement char *sql = sqlite3_mprintf("SELECT CreateRouting(%Q, %Q, %Q, %Q, %Q", xdatatablename, xvirtualtablename, xtable, xfrom, xto); char *prev = sql; if (xgeom == NULL) sql = sqlite3_mprintf("%s, NULL", prev); else sql = sqlite3_mprintf("%s, %Q", prev, xgeom); sqlite3_free(prev); prev = sql; if (xcost == NULL) sql = sqlite3_mprintf("%s, NULL", prev); else sql = sqlite3_mprintf("%s, %Q", prev, xcost); sqlite3_free(prev); prev = sql; if (xname == NULL) sql = sqlite3_mprintf("%s, NULL", prev); else sql = sqlite3_mprintf("%s, %Q", prev, xname); sqlite3_free(prev); prev = sql; sql = sqlite3_mprintf("%s, %d, %d", prev, xastarsupported, xbidirectional); sqlite3_free(prev); prev = sql; if (xonewayfrom != NULL && xonewayto != NULL) sql = sqlite3_mprintf("%s, %Q, %Q", prev, xonewayfrom, xonewayto); else sql = sqlite3_mprintf("%s, NULL, NULL", prev); sqlite3_free(prev); prev = sql; sql = sqlite3_mprintf("%s, %d)", prev, xoverwrite); sqlite3_free(prev); // executing the SQL statement int i; char **results; int rows; int columns; int success = 0; int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) goto end; if (rows < 1) ; else { for (i = 1; i <= rows; i++) success = atoi(results[(i * columns) + 0]); } sqlite3_free_table(results); end: free(xtable); free(xfrom); free(xto); if (xgeom != NULL) free(xgeom); if (xname != NULL) free(xname); if (xcost != NULL) free(xcost); if (xonewayfrom != NULL) free(xonewayfrom); if (xonewayto != NULL) free(xonewayto); free(xdatatablename); free(xvirtualtablename); if (success) { wxString msg = wxT("The VirtualRouting Tables were succesfully created"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } else { // failure: reporting the error cause wxString errCause = wxT("Unknown Cause"); GetLastRoutingError(errCause); wxString msg = wxT ("Some error occurred forbidding to create the VirtualRouting Tables\n\n") + errCause; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } void MyFrame::GetLastRoutingError(wxString & msg) { // // attempting to retrieve the most recent failure cause - CreateRouting // int i; char **results; int rows; int columns; int ret = sqlite3_get_table(SqliteHandle, "SELECT CreateRouting_GetLastError()", &results, &rows, &columns, NULL); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *message = results[(i * columns) + 0]; msg = wxString::FromUTF8(message); } } sqlite3_free_table(results); } void MyFrame::OnVacuum(wxCommandEvent & WXUNUSED(event)) { // // performing a VACUUM in order to reorganize the current DB // char *errMsg = NULL; ................................................................................ NetworkDialog dlg; int ret; wxString table; wxString from; wxString to; bool isNoGeometry; wxString geom; bool isNameEnabled; wxString name; bool isGeomLength; wxString cost; bool isBidirectional; bool isOneWays; wxString oneWayToFrom; wxString oneWayFromTo; bool aStarSupported; wxString dataTableName; wxString virtualTableName; bool overwrite; dlg.Create(this); ret = dlg.ShowModal(); if (ret == wxID_OK) { table = dlg.GetTableName(); from = dlg.GetFromColumn(); to = dlg.GetToColumn(); isNoGeometry = dlg.IsNoGeometry(); geom = dlg.GetGeomColumn(); isNameEnabled = dlg.IsNameEnabled(); name = dlg.GetNameColumn(); isGeomLength = dlg.IsGeomLength(); cost = dlg.GetCostColumn(); isBidirectional = dlg.IsBidirectional(); isOneWays = dlg.IsOneWays(); oneWayToFrom = dlg.GetOneWayToFrom(); oneWayFromTo = dlg.GetOneWayFromTo(); aStarSupported = dlg.IsAStarSupported(); dataTableName = dlg.GetDataTable(); virtualTableName = dlg.GetVirtualTable(); overwrite = dlg.IsOverwriteEnabled(); ::wxBeginBusyCursor(); CreateNetwork(table, from, to, isNoGeometry, geom, isNameEnabled, name, isGeomLength, cost, isBidirectional, isOneWays, oneWayFromTo, oneWayToFrom, aStarSupported, dataTableName, virtualTableName, overwrite); ::wxEndBusyCursor(); } } void MyFrame::OnImportXmlDocuments(wxCommandEvent & WXUNUSED(event)) { // // importing XML Documents ................................................................................ if (NoData.Len() == 0) { // creating a default NO-DATA value no_data = DefaultNoData(SampleType, PixelType, NumBands); } else { if (NoData.CmpNoCase(wxT("NONE")) == 0) { // creating a NoData pixel of the NONE type no_data = rl2_create_pixel_none(); } else { // creating the NoData pixel no_data = ParseNoData(NoData, SampleType, PixelType, NumBands); } if (no_data == NULL) { wxMessageBox(wxT("ERROR: invalid NO-DATA string"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } } ................................................................................ MemoryDatabase = false; return false; } // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); DoInitVirtualPG(); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); ................................................................................ wxMessageBox(wxT("Unable to activate FOREIGN_KEY constraints"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); } // setting RL2 MaxThreads char sqlmax[1024]; sprintf(sqlmax, "SELECT RL2_SetMaxThreads(%d)", RL2MaxThreads); sqlite3_exec(SqliteHandle, sqlmax, NULL, 0, NULL); // creating POSTGIS_GEOMETRY_COLUMNS (Temporary Table) const char *sql = "CREATE TEMPORARY TABLE IF NOT EXISTS postgis_geometry_columns (\n" "\tf_table_name TEXT NOT NULL,\n\tf_geometry_column TEXT NOT NULL,\n" "\tcoord_dimension INTEGER NOT NULL,\n\tsrid INTEGER NOT NULL,\n" "\tgeometry_type TEXT NOT NULL,\n\tCONSTRAINT tmp_postgis_pk PRIMARY " "KEY (f_table_name, f_geometry_column))"; sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); // creating TMP_VECTOR_COVERAGES (Temporary Table) sql = "CREATE TEMPORARY TABLE IF NOT EXISTS tmp_vector_coverages (\n" "\tcoverage_name TEXT NOT NULL PRIMARY KEY,\n" "\tf_table_name TEXT,\n\tf_geometry_column TEXT,\n" "\tview_name TEXT,\n\tview_geometry TEXT,\n\tvirt_name TEXT,\n" "\tvirt_geometry TEXT,\n\ttopology_name TEXT,\n\tnetwork_name TEXT,\n" "\tpostgis_table TEXT,\n\tpostgis_geometry TEXT,\n" "\tgeo_minx DOUBLE,\n\tgeo_miny DOUBLE,\n\tgeo_maxx DOUBLE,\n" "\tgeo_maxy DOUBLE,\n\textent_minx DOUBLE,\n\textent_miny DOUBLE,\n" "\textent_maxx DOUBLE,\n\textent_maxy DOUBLE)"; sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); AutoFDOStart(); AutoGPKGStart(); InitTableTree(); LoadHistory(); return true; } ................................................................................ void MyFrame::CloseDB() { // // disconnecting current SQLite DB // if (!SqliteHandle) return; AutoPostgresStop(); AutoFDOStop(); AutoGPKGStop(); if (AutoFDOmsg.Len() > 0) wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); if (AutoGPKGmsg.Len() > 0) wxMessageBox(AutoGPKGmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, ................................................................................ SpliteInternalCache = NULL; SqlitePath = wxT(""); ReadOnlyConnection = false; MemoryDatabase = false; ResetSecurity(); AttachedList.Flush(); ClearTableTree(); // dropping POSTGIS_GEOMETRY_COLUMNS (Temporary Table) const char *sql = "DROP TABLE IF EXISTS temp.postgis_geometry_columns"; sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); // dropping TMP_VECTOR_COVERAGES (Temporary Table) sql = "DROP TABLE IF EXISTS temp.tmp_vector_coverages"; sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); } bool MyFrame::CreateDB() { // creating a new, empty SQLite DB int ret; char path[1024]; ................................................................................ MemoryDatabase = false; return false; } // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); DoInitVirtualPG(); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); ................................................................................ } sqlite3_free_table(results); if (count > 0) return; // all right, it's empty: proceding to initialize strcpy(sql, "SELECT InitSpatialMetadataFull(1)"); ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to initialite SpatialMetadataFull: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } } ................................................................................ wxString tblName; wxString sql; char *xsql; bool status = false; // fetching any defined Spatial Index sql = wxT ("SELECT f_table_name, f_geometry_column FROM main.geometry_columns WHERE spatial_index_enabled IN (1,3)"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); int ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); free(xsql); if (ret != SQLITE_OK) { ................................................................................ } } sqlite3_finalize(stmt); if (success == false) return false; return true; } void MyFrame::DoCreatePostgreSqlNodes() { // initializing the PostgreSQL nodes int c = 0; MyPostgresConn *pC = PostgresList.GetFirst(); while (pC != NULL) { // adding a Connection node wxTreeItemId connId; TableTree->AddPostgresConnection(c++, pC, connId); MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { // adding a Schema node wxTreeItemId schemaId; TableTree->AddPostgresSchema(connId, pC, pS->GetName(), schemaId); pS->SetTreeNode(schemaId); pS = pS->GetNext(); } pC = pC->GetNext(); } } void MyFrame::InitTableTree() { // loads the table TREE list int i; char **results; int rows; ................................................................................ if (MemoryDatabase == true) { wxString memory = wxT("MEMORY-DB"); TableTree->SetPath(memory); } else TableTree->SetPath(SqlitePath); TableTree->FlushAll(); DoCreatePostgreSqlNodes(); if (ExistsTopologies()) { // fetching topologies sql = wxT("SELECT topology_name, srid, has_z "); sql += wxT(" FROM main.topologies"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); ................................................................................ int srid = atoi(results[(i * columns) + 1]); RasterCoverageSet coverage(name, srid); TableTree->AddRasterCoverage(&coverage); } } sqlite3_free_table(results); } if (ExistsVectorCoverages() && ExistsTopologies() && ExistsNetworks()) { // fetching Vector Coverages sql = wxT("SELECT 'table', c.coverage_name, g.srid, g.geometry_type "); sql += wxT("FROM main.vector_coverages AS c "); sql += wxT("JOIN main.geometry_columns AS g ON ("); sql += wxT("c.topology_name IS NULL AND c.network_name IS NULL AND "); sql += wxT("Lower(c.f_table_name) = Lower(g.f_table_name) AND "); ................................................................................ } } sqlite3_free_table(results); } // fetching persistent tables and views sql = wxT ("SELECT 'main', name, sql, type FROM main.sqlite_master WHERE (type = 'table' OR type = 'view') " "UNION SELECT 'temp', name, sql, type FROM temp.sqlite_master WHERE type = 'table' " "AND name IN ('postgis_geometry_columns', 'tmp_vector_coverages') ORDER BY name"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); int ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); free(xsql); if (ret != SQLITE_OK) { ................................................................................ list = new TableViewList(); if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *db = results[(i * columns) + 0]; name = results[(i * columns) + 1]; createSql = results[(i * columns) + 2]; type = results[(i * columns) + 3]; if (strstr(createSql, " VIRTUAL ") || strstr(createSql, " virtual ")) virtualTable = true; else virtualTable = false; tblName = wxString::FromUTF8(name); wxString dbName = wxString::FromUTF8(db); if (dbName.Cmp(wxT("temp")) == 0 && (tblName.Cmp(wxT("postgis_geometry_columns")) == 0 || tblName.Cmp(wxT("tmp_vector_coverages")) == 0)) { list->Add(dbName, tblName); continue; } if (strcmp(type, "view") == 0) list->Add(tblName, true, false); else list->Add(tblName, false, virtualTable); } } sqlite3_free_table(results); ................................................................................ FindFdoOgrGeometries(list); else FindGeometries(list); ptv = list->GetFirst(); while (ptv != NULL) { // inserting items into the Tree Control View if (ptv->IsTmpMetadata() == true) TableTree->AddTmpMetadata(ptv->GetName()); else if (ptv->IsPostgresTable(&PostgresList) == true) TableTree->AddPostgresTable(&PostgresList, ptv->GetName()); else if (ptv->IsView() == true) TableTree->AddView(ptv->GetName(), ptv->IsGeometry()); else if (ptv->IsGeoPackageGeometry() == true) TableTree->AddGeoPackageTable(ptv->GetName()); else if (ptv->IsGeoPackageVirtualGeometry() == true) TableTree->AddGeoPackageVirtualTable(ptv->GetName()); else if (ptv->IsFdoOgrGeometry() == true) TableTree->AddFdoOgrTable(ptv->GetName()); ................................................................................ ptv = ptv->GetNext(); } delete list; // fetching temporary tables and views sql = wxT ("SELECT name, sql, type FROM sqlite_temp_master WHERE (type = 'table' OR type = 'view') " "AND name NOT IN ('postgis_geometry_columns', 'tmp_vector_coverages') ORDER BY name"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); free(xsql); if (ret != SQLITE_OK) { ................................................................................ if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; if (atoi(results[(i * columns) + 1]) == 1 || atoi(results[(i * columns) + 1]) == 3) index = true; else index = false; if (atoi(results[(i * columns) + 1]) == 2) cached = true; else cached = false; ................................................................................ ("were native SpatiaLite ones in a completely transparent way.\n"); TableTree->SetFdoOgrMode(true); } return; } TableTree->SetFdoOgrMode(false); } void MyFrame::AutoPostgresStop() { // // trying to stop the PostgreSQL auto-wrapper // DoDropPostgresTables(); PostgresList.Clear(); } void MyFrame::AutoFDOStop() { // // trying to stop the FDO-OGR auto-wrapper // int ret; ................................................................................ // creating the VirtualGPKG table // xname = sqlite3_mprintf("vgpkg_%s", p->GetName()); xname2 = gaiaDoubleQuotedSql(xname); xname3 = gaiaDoubleQuotedSql(p->GetName()); sprintf(sql, "CREATE VIRTUAL TABLE \"%s\" USING VirtualGPKG(\"%s\")", xname2, xname3); sqlite3_free(xname); free(xname2); free(xname3); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; if (count < 5) gpkgNames[count] = ................................................................................ free(db_prefix); xname = sqlite3_mprintf("vgpkg_%s", p->GetName()); xname2 = gaiaDoubleQuotedSql(xname); xname3 = gaiaDoubleQuotedSql(p->GetName()); sprintf(sql, "CREATE VIRTUAL TABLE \"%s\".\"%s\" USING VirtualGPKG(\"%s\", \"%s\")", xdb_prefix, xname2, xdb_prefix, xname3); sqlite3_free(xname); free(xname2); free(xname3); free(xdb_prefix); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; wxString tbl_name = wxString::FromUTF8(p->GetName()); ................................................................................ wxT ("The currently connected DB-file contains one or more harmful Triggers.\n"); msg += wxT("Such a condition could eventually cause serious security breaches."); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_EXCLAMATION, this); return false; } void MyFrame::FeedZipHtml(unsigned char *zip, int offset, const char *data) { // // feeding data into the Html ZIP buffer // int i; int j; for (i = 0, j = 0; i < (int) strlen(data); i += 2, j++) { char byte_hi; char byte_lo; byte_hi = *(data + i); byte_lo = *(data + i + 1); *(zip + offset + j) = ColorMapEntry::ParseHex(byte_hi, byte_lo); } } MyStatusBar::MyStatusBar(MyFrame * parent):wxStatusBar(parent) { // constructor Parent = parent; int widths[2]; widths[0] = 20; ................................................................................ void MyStatusBar::SetText(wxString & msg) { wxStatusBar *sb = Parent->GetStatusBar(); if (!sb) return; sb->SetStatusText(msg, 1); } |
Changes to Makefile-static-mingw32.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 .. 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# SandroFurieri (c) 2008 # Makefile ( Mingw & wxwidgets) for spatialite-GUI SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp \ Objects.cpp QueryViewComposer.cpp MalformedGeoms.cpp DialogsGraph.cpp \ Raster.cpp Styles.cpp RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp Wfs.cpp SqlFilterComposer.cpp \ WmsDialog.cpp LayerTree.cpp MapPanel.cpp MapView.cpp \ QuickStyles.cpp \ win_resource/resource.rc OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o \ Dialogs.o Shapefiles.o Network.o Exif.o TextCsv.o Objects.o \ QueryViewComposer.o MalformedGeoms.o DialogsGraph.o \ Raster.o Styles.o RasterSymbolizers.o VectorSymbolizers1.o \ VectorSymbolizers2.o Wfs.o SqlFiltersComposer.o \ WmsDialog.o LayerTree.o MapPanel.o MapView.o QuickStyles.o \ win_resource/resource.o EXE = ./static_bin/spatialite_gui.exe INCLUDE = Classdef.h # Define default flags: CXXFLAGS = $(shell /mingw32/local/bin/wx-config --cxxflags) LIB = -Wl,--subsystem,windows /mingw32/local/lib/libwx_mswu-3.0.a \ ................................................................................ /mingw32/local/lib/libfreetype.a /mingw32/local/lib/libexpat.a \ /mingw32/local/lib/libgeotiff.a /mingw32/local/lib/libtiff.a \ /mingw32/local/lib/libpng.a /mingw32/local/lib/libjpeg.a \ /mingw32/local/lib/libsqlite3.a /mingw32/local/lib/libcurl.a \ /mingw32/local/lib/libwebp.a /mingw32/local/lib/libgif.a \ /mingw32/local/lib/libssl.a /mingw32/local/lib/libcrypto.a \ /mingw32/local/lib/libz.a /mingw32/local/lib/liblzma.a \ /mingw32/local/lib/libCharLS.a /mingw32/local/lib/libopenjp2.a EXTRALIB2 = -lgdi32 -lmsimg32 -lws2_32 -lwldap32 CXX = g++ -static REZ = $(shell /mingw32/local/bin/wx-config --rescomp) all: $(EXE) ................................................................................ DialogsGraph.o: DialogsGraph.cpp $(INCLUDE) $(CXX) -c DialogsGraph.cpp $(CXXFLAGS) $(EXTRAFLAGS) Shapefiles.o: Shapefiles.cpp $(INCLUDE) $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) Network.o: Network.cpp $(INCLUDE) $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) Exif.o: Exif.cpp $(INCLUDE) $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) TextCsv.o: TextCsv.cpp $(INCLUDE) $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) Objects.o: Objects.cpp $(INCLUDE) ................................................................................ MapPanel.o: MapPanel.cpp $(INCLUDE) $(CXX) -c MapPanel.cpp $(CXXFLAGS) $(EXTRAFLAGS) MapView.o: MapView.cpp $(INCLUDE) $(CXX) -c MapView.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStyles.o: QuickStyles.cpp $(INCLUDE) $(CXX) -c QuickStyles.cpp $(CXXFLAGS) $(EXTRAFLAGS) win_resource/resource.o: win_resource/resource.rc echo $(CXXFLAGS) $(REZ) $(CXXFLAGS) -i win_resource/resource.rc -o win_resource/resource.o |
| > | | | | > | > < < < > > > > > > > > > | | > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 .. 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 .. 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# SandroFurieri (c) 2008 # Makefile ( Mingw & wxwidgets) for spatialite-GUI SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ Dialogs.cpp Shapefiles.cpp Exif.cpp TextCsv.cpp Postgres.cpp \ Objects.cpp QueryViewComposer.cpp MalformedGeoms.cpp DialogsGraph.cpp \ Raster.cpp Styles.cpp RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp Wfs.cpp SqlFilterComposer.cpp \ WmsDialog.cpp LayerTree.cpp MapPanel.cpp MapView.cpp \ QuickStylesVector.cpp QuickStylesTopology.cpp QuickStylesRaster.cpp \ HtmlHelp.cpp \ win_resource/resource.rc OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o \ Dialogs.o Shapefiles.o Exif.o TextCsv.o Objects.o Postgres.o \ QueryViewComposer.o MalformedGeoms.o DialogsGraph.o \ Raster.o Styles.o RasterSymbolizers.o VectorSymbolizers1.o \ VectorSymbolizers2.o Wfs.o SqlFiltersComposer.o HtmlHelp.o \ WmsDialog.o LayerTree.o MapPanel.o MapView.o QuickStylesVector.o \ QuickStylesTopology.o QuickStylesRaster.o \ win_resource/resource.o EXE = ./static_bin/spatialite_gui.exe INCLUDE = Classdef.h # Define default flags: CXXFLAGS = $(shell /mingw32/local/bin/wx-config --cxxflags) LIB = -Wl,--subsystem,windows /mingw32/local/lib/libwx_mswu-3.0.a \ ................................................................................ /mingw32/local/lib/libfreetype.a /mingw32/local/lib/libexpat.a \ /mingw32/local/lib/libgeotiff.a /mingw32/local/lib/libtiff.a \ /mingw32/local/lib/libpng.a /mingw32/local/lib/libjpeg.a \ /mingw32/local/lib/libsqlite3.a /mingw32/local/lib/libcurl.a \ /mingw32/local/lib/libwebp.a /mingw32/local/lib/libgif.a \ /mingw32/local/lib/libssl.a /mingw32/local/lib/libcrypto.a \ /mingw32/local/lib/libz.a /mingw32/local/lib/liblzma.a \ /mingw32/local/lib/libCharLS.a /mingw32/local/lib/libopenjp2.a \ /mingw32/local/lib/libvirtualpg.a EXTRALIB2 = -lgdi32 -lmsimg32 -lws2_32 -lwldap32 CXX = g++ -static REZ = $(shell /mingw32/local/bin/wx-config --rescomp) all: $(EXE) ................................................................................ DialogsGraph.o: DialogsGraph.cpp $(INCLUDE) $(CXX) -c DialogsGraph.cpp $(CXXFLAGS) $(EXTRAFLAGS) Shapefiles.o: Shapefiles.cpp $(INCLUDE) $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) Exif.o: Exif.cpp $(INCLUDE) $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) TextCsv.o: TextCsv.cpp $(INCLUDE) $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) Objects.o: Objects.cpp $(INCLUDE) ................................................................................ MapPanel.o: MapPanel.cpp $(INCLUDE) $(CXX) -c MapPanel.cpp $(CXXFLAGS) $(EXTRAFLAGS) MapView.o: MapView.cpp $(INCLUDE) $(CXX) -c MapView.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStylesVector.o: QuickStylesVector.cpp $(INCLUDE) $(CXX) -c QuickStylesVector.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStylesTopology.o: QuickStylesTopology.cpp $(INCLUDE) $(CXX) -c QuickStylesTopology.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStylesRaster.o: QuickStylesRaster.cpp $(INCLUDE) $(CXX) -c QuickStylesRaster.cpp $(CXXFLAGS) $(EXTRAFLAGS) Postgres.o: Postgres.cpp $(INCLUDE) $(CXX) -c Postgres.cpp $(CXXFLAGS) $(EXTRAFLAGS) HtmlHelp.o: HtmlHelp.cpp $(INCLUDE) $(CXX) -c HtmlHelp.cpp $(CXXFLAGS) $(EXTRAFLAGS) win_resource/resource.o: win_resource/resource.rc echo $(CXXFLAGS) $(REZ) $(CXXFLAGS) -i win_resource/resource.rc -o win_resource/resource.o |
Changes to Makefile-static-mingw64.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 .. 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 .. 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# SandroFurieri (c) 2008 # Makefile ( Mingw & wxwidgets) for spatialite-GUI SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp \ Objects.cpp QueryViewComposer.cpp MalformedGeoms.cpp DialogsGraph.cpp \ Raster.cpp Styles.cpp RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp Wfs.cpp SqlFilterComposer.cpp \ WmsDialog.cpp LayerTree.cpp MapPanel.cpp MapView.cpp \ QuickStyles.cpp \ win_resource/resource.rc OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o \ Dialogs.o Shapefiles.o Network.o Exif.o TextCsv.o Objects.o \ QueryViewComposer.o MalformedGeoms.o DialogsGraph.o \ Raster.o Styles.o RasterSymbolizers.o VectorSymbolizers1.o \ VectorSymbolizers2.o Wfs.o SqlFiltersComposer.o \ WmsDialog.o LayerTree.o MapPanel.o MapView.o QuickStyles.o \ win_resource/resource.o EXE = ./static_bin/spatialite_gui.exe INCLUDE = Classdef.h # Define default flags: CXXFLAGS = $(shell /mingw64/local/bin/wx-config --cxxflags) LIB = -Wl,--subsystem,windows /mingw64/local/lib/libwx_mswu-3.0.a \ ................................................................................ /mingw64/local/lib/libfreetype.a /mingw64/local/lib/libexpat.a \ /mingw64/local/lib/libgeotiff.a /mingw64/local/lib/libtiff.a \ /mingw64/local/lib/libpng.a /mingw64/local/lib/libjpeg.a \ /mingw64/local/lib/libsqlite3.a /mingw64/local/lib/libcurl.a \ /mingw64/local/lib/libwebp.a /mingw64/local/lib/libgif.a \ /mingw64/local/lib/libssl.a /mingw64/local/lib/libcrypto.a \ /mingw64/local/lib/libz.a /mingw64/local/lib/liblzma.a \ /mingw64/local/lib/libCharLS.a /mingw64/local/lib/libopenjp2.a EXTRALIB2 = -lgdi32 -lmsimg32 -lws2_32 -lwldap32 CXX = g++ -static REZ = $(shell /mingw64/local/bin/wx-config --rescomp) all: $(EXE) ................................................................................ DialogsGraph.o: DialogsGraph.cpp $(INCLUDE) $(CXX) -c DialogsGraph.cpp $(CXXFLAGS) $(EXTRAFLAGS) Shapefiles.o: Shapefiles.cpp $(INCLUDE) $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) Network.o: Network.cpp $(INCLUDE) $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) Exif.o: Exif.cpp $(INCLUDE) $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) TextCsv.o: TextCsv.cpp $(INCLUDE) $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) Objects.o: Objects.cpp $(INCLUDE) ................................................................................ MapPanel.o: MapPanel.cpp $(INCLUDE) $(CXX) -c MapPanel.cpp $(CXXFLAGS) $(EXTRAFLAGS) MapView.o: MapView.cpp $(INCLUDE) $(CXX) -c MapView.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStyles.o: QuickStyles.cpp $(INCLUDE) $(CXX) -c QuickStyles.cpp $(CXXFLAGS) $(EXTRAFLAGS) win_resource/resource.o: win_resource/resource.rc echo $(CXXFLAGS) $(REZ) $(CXXFLAGS) -i win_resource/resource.rc -o win_resource/resource.o |
| > | | | | > | > < < < > > > > > > > > > | | > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 .. 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 .. 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# SandroFurieri (c) 2008 # Makefile ( Mingw & wxwidgets) for spatialite-GUI SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ Dialogs.cpp Shapefiles.cpp Exif.cpp TextCsv.cpp Postgres.cpp \ Objects.cpp QueryViewComposer.cpp MalformedGeoms.cpp DialogsGraph.cpp \ Raster.cpp Styles.cpp RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp Wfs.cpp SqlFilterComposer.cpp \ WmsDialog.cpp LayerTree.cpp MapPanel.cpp MapView.cpp \ QuickStylesVector.cpp QuickStylesTopology.cpp QuickStylesRaster.cpp \ HtmlHelp.cpp \ win_resource/resource.rc OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o \ Dialogs.o Shapefiles.o Exif.o TextCsv.o Objects.o Postgres.o \ QueryViewComposer.o MalformedGeoms.o DialogsGraph.o \ Raster.o Styles.o RasterSymbolizers.o VectorSymbolizers1.o \ VectorSymbolizers2.o Wfs.o SqlFiltersComposer.o HtmlHelp.o \ WmsDialog.o LayerTree.o MapPanel.o MapView.o QuickStylesVector.o \ QuickStylesTopology.o QuickStylesRaster.o \ win_resource/resource.o EXE = ./static_bin/spatialite_gui.exe INCLUDE = Classdef.h # Define default flags: CXXFLAGS = $(shell /mingw64/local/bin/wx-config --cxxflags) LIB = -Wl,--subsystem,windows /mingw64/local/lib/libwx_mswu-3.0.a \ ................................................................................ /mingw64/local/lib/libfreetype.a /mingw64/local/lib/libexpat.a \ /mingw64/local/lib/libgeotiff.a /mingw64/local/lib/libtiff.a \ /mingw64/local/lib/libpng.a /mingw64/local/lib/libjpeg.a \ /mingw64/local/lib/libsqlite3.a /mingw64/local/lib/libcurl.a \ /mingw64/local/lib/libwebp.a /mingw64/local/lib/libgif.a \ /mingw64/local/lib/libssl.a /mingw64/local/lib/libcrypto.a \ /mingw64/local/lib/libz.a /mingw64/local/lib/liblzma.a \ /mingw64/local/lib/libCharLS.a /mingw64/local/lib/libopenjp2.a \ /mingw64/local/lib/libvirtualpg.a EXTRALIB2 = -lgdi32 -lmsimg32 -lws2_32 -lwldap32 CXX = g++ -static REZ = $(shell /mingw64/local/bin/wx-config --rescomp) all: $(EXE) ................................................................................ DialogsGraph.o: DialogsGraph.cpp $(INCLUDE) $(CXX) -c DialogsGraph.cpp $(CXXFLAGS) $(EXTRAFLAGS) Shapefiles.o: Shapefiles.cpp $(INCLUDE) $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) Exif.o: Exif.cpp $(INCLUDE) $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) TextCsv.o: TextCsv.cpp $(INCLUDE) $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) Objects.o: Objects.cpp $(INCLUDE) ................................................................................ MapPanel.o: MapPanel.cpp $(INCLUDE) $(CXX) -c MapPanel.cpp $(CXXFLAGS) $(EXTRAFLAGS) MapView.o: MapView.cpp $(INCLUDE) $(CXX) -c MapView.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStylesVector.o: QuickStylesVector.cpp $(INCLUDE) $(CXX) -c QuickStylesVector.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStylesTopology.o: QuickStylesTopology.cpp $(INCLUDE) $(CXX) -c QuickStylesTopology.cpp $(CXXFLAGS) $(EXTRAFLAGS) QuickStylesRaster.o: QuickStylesRaster.cpp $(INCLUDE) $(CXX) -c QuickStylesRaster.cpp $(CXXFLAGS) $(EXTRAFLAGS) Postgres.o: Postgres.cpp $(INCLUDE) $(CXX) -c Postgres.cpp $(CXXFLAGS) $(EXTRAFLAGS) HtmlHelp.o: HtmlHelp.cpp $(INCLUDE) $(CXX) -c HtmlHelp.cpp $(CXXFLAGS) $(EXTRAFLAGS) win_resource/resource.o: win_resource/resource.rc echo $(CXXFLAGS) $(REZ) $(CXXFLAGS) -i win_resource/resource.rc -o win_resource/resource.o |
Changes to Makefile.am.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
bin_PROGRAMS = spatialite_gui AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ AM_CPPFLAGS += -I$(top_srcdir) spatialite_gui_SOURCES = Classdef.h BlobExplorer.cpp \ Dialogs.cpp DialogsGraph.cpp WmsDialog.cpp Exif.cpp \ Main.cpp MalformedGeoms.cpp Network.cpp \ Objects.cpp QueryView.cpp QueryViewComposer.cpp \ ResultSetView.cpp Shapefiles.cpp TableTree.cpp \ TextCsv.cpp Wfs.cpp Raster.cpp Styles.cpp \ RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp SqlFiltersComposer.cpp \ MapPanel.cpp MapView.cpp LayerTree.cpp \ QuickStyles.cpp LDADD = @WX_LIBS@ @LIBSPATIALITE_LIBS@ \ @LIBRASTERLITE2_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ -lgeos_c EXTRA_DIST = Makefile-static-MinGW \ Makefile-static-mingw32 \ Makefile-static-mingw64 \ Makefile-static-Linux \ Makefile-static-MacOsX \ indent_me AUTOMAKE_OPTIONS = dist-zip foreign SUBDIRS = icons win_resource mac_resource gnome_resource |
| | > | > > < | | < < > > | |
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
bin_PROGRAMS = spatialite_gui AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ AM_CPPFLAGS += -I$(top_srcdir) spatialite_gui_SOURCES = Classdef.h BlobExplorer.cpp \ Dialogs.cpp DialogsGraph.cpp WmsDialog.cpp Exif.cpp \ Main.cpp MalformedGeoms.cpp \ Objects.cpp QueryView.cpp QueryViewComposer.cpp \ ResultSetView.cpp Shapefiles.cpp TableTree.cpp \ TextCsv.cpp Wfs.cpp Raster.cpp Styles.cpp \ RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp SqlFiltersComposer.cpp \ MapPanel.cpp MapView.cpp LayerTree.cpp \ QuickStylesVector.cpp QuickStylesTopology.cpp \ QuickStylesRaster.cpp HtmlHelp.cpp Postgres.cpp LDADD = @WX_LIBS@ @LIBSPATIALITE_LIBS@ \ @LIBRASTERLITE2_LIBS@ @LIBFREEXL_LIBS@ \ @LIBVIRTUALPG_LIBS@ @LIBXML2_LIBS@ \ @PG_LDFLAGS@ @PG_LIB@ -lgeos_c EXTRA_DIST = Makefile-static-mingw32 \ Makefile-static-mingw64 \ helpgen/helpgen.c \ helpgen/READ_ME.txt \ indent_me AUTOMAKE_OPTIONS = dist-zip foreign SUBDIRS = icons win_resource mac_resource gnome_resource |
Changes to Makefile.in.
1 2 3 4 5 6 7 8 9 10 11 ... 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ... 315 316 317 318 319 320 321 322 323 324 325 326 327 328 ... 341 342 343 344 345 346 347 348 349 350 351 352 353 354 ... 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 ... 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_spatialite_gui_OBJECTS = BlobExplorer.$(OBJEXT) Dialogs.$(OBJEXT) \ DialogsGraph.$(OBJEXT) WmsDialog.$(OBJEXT) Exif.$(OBJEXT) \ Main.$(OBJEXT) MalformedGeoms.$(OBJEXT) Network.$(OBJEXT) \ Objects.$(OBJEXT) QueryView.$(OBJEXT) \ QueryViewComposer.$(OBJEXT) ResultSetView.$(OBJEXT) \ Shapefiles.$(OBJEXT) TableTree.$(OBJEXT) TextCsv.$(OBJEXT) \ Wfs.$(OBJEXT) Raster.$(OBJEXT) Styles.$(OBJEXT) \ RasterSymbolizers.$(OBJEXT) VectorSymbolizers1.$(OBJEXT) \ VectorSymbolizers2.$(OBJEXT) SqlFiltersComposer.$(OBJEXT) \ MapPanel.$(OBJEXT) MapView.$(OBJEXT) LayerTree.$(OBJEXT) \ QuickStyles.$(OBJEXT) spatialite_gui_OBJECTS = $(am_spatialite_gui_OBJECTS) spatialite_gui_LDADD = $(LDADD) spatialite_gui_DEPENDENCIES = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ ................................................................................ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir) spatialite_gui_SOURCES = Classdef.h BlobExplorer.cpp \ Dialogs.cpp DialogsGraph.cpp WmsDialog.cpp Exif.cpp \ Main.cpp MalformedGeoms.cpp Network.cpp \ Objects.cpp QueryView.cpp QueryViewComposer.cpp \ ResultSetView.cpp Shapefiles.cpp TableTree.cpp \ TextCsv.cpp Wfs.cpp Raster.cpp Styles.cpp \ RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp SqlFiltersComposer.cpp \ MapPanel.cpp MapView.cpp LayerTree.cpp \ QuickStyles.cpp LDADD = @WX_LIBS@ @LIBSPATIALITE_LIBS@ \ @LIBRASTERLITE2_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ -lgeos_c EXTRA_DIST = Makefile-static-MinGW \ Makefile-static-mingw32 \ Makefile-static-mingw64 \ Makefile-static-Linux \ Makefile-static-MacOsX \ indent_me AUTOMAKE_OPTIONS = dist-zip foreign SUBDIRS = icons win_resource mac_resource gnome_resource all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: ................................................................................ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlobExplorer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Dialogs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DialogsGraph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Exif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LayerTree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MalformedGeoms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MapPanel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MapView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Network.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Objects.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueryView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueryViewComposer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QuickStyles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Raster.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RasterSymbolizers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ResultSetView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Shapefiles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SqlFiltersComposer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Styles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TableTree.Po@am__quote@ |
| | | | | | | | | | > > | > > > > > > | | > | > > < | | < < > > | > | | | > > |
1 2 3 4 5 6 7 8 9 10 11 ... 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 ... 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 ... 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 ... 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 ... 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_spatialite_gui_OBJECTS = BlobExplorer.$(OBJEXT) Dialogs.$(OBJEXT) \ DialogsGraph.$(OBJEXT) WmsDialog.$(OBJEXT) Exif.$(OBJEXT) \ Main.$(OBJEXT) MalformedGeoms.$(OBJEXT) Objects.$(OBJEXT) \ QueryView.$(OBJEXT) QueryViewComposer.$(OBJEXT) \ ResultSetView.$(OBJEXT) Shapefiles.$(OBJEXT) \ TableTree.$(OBJEXT) TextCsv.$(OBJEXT) Wfs.$(OBJEXT) \ Raster.$(OBJEXT) Styles.$(OBJEXT) RasterSymbolizers.$(OBJEXT) \ VectorSymbolizers1.$(OBJEXT) VectorSymbolizers2.$(OBJEXT) \ SqlFiltersComposer.$(OBJEXT) MapPanel.$(OBJEXT) \ MapView.$(OBJEXT) LayerTree.$(OBJEXT) \ QuickStylesVector.$(OBJEXT) QuickStylesTopology.$(OBJEXT) \ QuickStylesRaster.$(OBJEXT) HtmlHelp.$(OBJEXT) \ Postgres.$(OBJEXT) spatialite_gui_OBJECTS = $(am_spatialite_gui_OBJECTS) spatialite_gui_LDADD = $(LDADD) spatialite_gui_DEPENDENCIES = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBVIRTUALPG_CFLAGS = @LIBVIRTUALPG_CFLAGS@ LIBVIRTUALPG_LIBS = @LIBVIRTUALPG_LIBS@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PG_CFLAGS = @PG_CFLAGS@ PG_LDFLAGS = @PG_LDFLAGS@ PG_LIB = @PG_LIB@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ ................................................................................ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir) spatialite_gui_SOURCES = Classdef.h BlobExplorer.cpp \ Dialogs.cpp DialogsGraph.cpp WmsDialog.cpp Exif.cpp \ Main.cpp MalformedGeoms.cpp \ Objects.cpp QueryView.cpp QueryViewComposer.cpp \ ResultSetView.cpp Shapefiles.cpp TableTree.cpp \ TextCsv.cpp Wfs.cpp Raster.cpp Styles.cpp \ RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp SqlFiltersComposer.cpp \ MapPanel.cpp MapView.cpp LayerTree.cpp \ QuickStylesVector.cpp QuickStylesTopology.cpp \ QuickStylesRaster.cpp HtmlHelp.cpp Postgres.cpp LDADD = @WX_LIBS@ @LIBSPATIALITE_LIBS@ \ @LIBRASTERLITE2_LIBS@ @LIBFREEXL_LIBS@ \ @LIBVIRTUALPG_LIBS@ @LIBXML2_LIBS@ \ @PG_LDFLAGS@ @PG_LIB@ -lgeos_c EXTRA_DIST = Makefile-static-mingw32 \ Makefile-static-mingw64 \ helpgen/helpgen.c \ helpgen/READ_ME.txt \ indent_me AUTOMAKE_OPTIONS = dist-zip foreign SUBDIRS = icons win_resource mac_resource gnome_resource all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: ................................................................................ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlobExplorer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Dialogs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DialogsGraph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Exif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlHelp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LayerTree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MalformedGeoms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MapPanel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MapView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Objects.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Postgres.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueryView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueryViewComposer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QuickStylesRaster.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QuickStylesTopology.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QuickStylesVector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Raster.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RasterSymbolizers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ResultSetView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Shapefiles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SqlFiltersComposer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Styles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TableTree.Po@am__quote@ |
Changes to MalformedGeoms.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ MalformedGeoms.cpp
/ identifying malformed geometries
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a-furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ MalformedGeoms.cpp
/ identifying malformed geometries
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
Changes to MapPanel.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 ... 782 783 784 785 786 787 788 789 790 791 792 793 794 795 ... 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 .... 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 .... 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 .... 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 .... 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 .... 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 .... 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 |
/* / MapPanel.cpp / the Map Panel of spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 2.0, 2017 January 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "wx/spinctrl.h" #include "wx/colordlg.h" #include <float.h> #include "icons/icon_map.xpm" #include "icons/linestrings_on.xpm" #include "icons/linestrings_off.xpm" #include "icons/points_on.xpm" #include "icons/points_off.xpm" #include "icons/polygons_on.xpm" #include "icons/polygons_off.xpm" #include "icons/vector.xpm" #include "icons/vector_off.xpm" #include "icons/topo_geo.xpm" #include "icons/topo_geo_off.xpm" #include "icons/topo_net.xpm" #include "icons/topo_net_off.xpm" #include "icons/coverage.xpm" #include "icons/coverage_off.xpm" #include "icons/wms.xpm" #include "icons/wms_off.xpm" #include "icons/icon_info.xpm" #include "icons/map_add.xpm" #include "icons/map_table.xpm" #include "icons/identify.xpm" #include "icons/zoom_in.xpm" #include "icons/zoom_out.xpm" #include "icons/pan.xpm" ................................................................................ color = wxColour(192, 192, 192); MyBitmapCellRenderer *renderer = new MyBitmapCellRenderer; wxBitmap bmp; switch (pL->GetLayerType()) { case MAP_LAYER_VECTOR: case MAP_LAYER_VECTOR_VIEW: switch (pL->GetGeometryType()) { case 1: case 1001: case 2001: case 3001: case 4: ................................................................................ pL = pL->GetNext(); continue; }; renderer->SetGraphic(bmp); Layers->SetCellValue(count, 0, pL->GetDbPrefix()); Layers->SetCellTextColour(count, 0, color); Layers->SetCellRenderer(count, 1, renderer); if (pL->GetLayerType() == MAP_LAYER_VECTOR) { wxString prefixName = pL->GetLayerPrefix(); prefixName += wxT("."); prefixName += pL->GetLayerName(); Layers->SetCellValue(count, 2, prefixName); } else Layers->SetCellValue(count, 2, pL->GetLayerName()); ................................................................................ // first row: Layer's fully qualified name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Full Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString name = Layer->GetDbPrefix(); if (Layer->GetType() == MAP_LAYER_VECTOR) name += wxT(".") + Layer->GetVectorPrefix(); name += wxT(".") + Layer->GetName(); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_MAPLAYER_NAME, name, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: Title ................................................................................ switch (Layer->GetType()) { case MAP_LAYER_WMS: datasource = wxT("WMS Layer GetMap URL:\n"); datasource += wxString::FromUTF8(Layer->GetWmsGetMapURL()); break; case MAP_LAYER_VECTOR: datasource = wxT("Vector Coverage\n"); datasource += wxT("SpatiaLite "); if (Layer->GetVectorPrefix().IsSameAs(wxT("table")) == true) datasource += wxT("GeoTable: ") + wxString::FromUTF8(Layer->GetTableName()) + wxT(" / ") + wxString::FromUTF8(Layer->GetGeometryColumn()) + wxT("\n"); ................................................................................ { CachedNodes = new CachedFrame(); CachedLinks = new CachedFrame(); CachedLinkSeeds = new CachedFrame(); } QuickStyle = NULL; QuickStyleTopology = NULL; Prev = NULL; Next = NULL; } MapLayer::~MapLayer() { // ................................................................................ delete CachedLinkSeeds; if (CachedFaceSeeds != NULL) delete CachedFaceSeeds; if (QuickStyle != NULL) delete QuickStyle; if (QuickStyleTopology != NULL) delete QuickStyleTopology; } void MapLayer::Invalidate() { // // the Style changed: invalidating all Caches // ................................................................................ QuickStyleTopology = style->Clone(); Invalidate(); return true; } } return false; } void MapLayer::PrepareGraphicsContext(int width, int height, double minx, double miny, double maxx, double maxy, const char *style) { // // initializing the Graphics Context ................................................................................ if (CachedLinks->IsValid(width, height, minx, miny, maxx, maxy, style) != true) CachedLinks->Reset(width, height, minx, miny, maxx, maxy, style); if (CachedLinkSeeds->IsValid(width, height, minx, miny, maxx, maxy, style) != true) CachedLinkSeeds->Reset(width, height, minx, miny, maxx, maxy, style); } if (Type == MAP_LAYER_VECTOR || Type == MAP_LAYER_TOPOLOGY || Type == MAP_LAYER_NETWORK) { // Labels if (CachedLabels->IsValid(width, height, minx, miny, maxx, maxy, style) != true) CachedLabels->Reset(width, height, minx, miny, maxx, maxy, style); } |
| < < < < < < < < > | > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 ... 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 ... 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 .... 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 .... 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 .... 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 .... 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 .... 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 .... 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 |
/* / MapPanel.cpp / the Map Panel of spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 2.0, 2017 January 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "wx/spinctrl.h" #include "wx/colordlg.h" #include <float.h> #include "icons/icon_map.xpm" #include "icons/linestrings_on.xpm" #include "icons/points_on.xpm" #include "icons/polygons_on.xpm" #include "icons/vector.xpm" #include "icons/topo_geo.xpm" #include "icons/topo_net.xpm" #include "icons/coverage.xpm" #include "icons/wms.xpm" #include "icons/icon_info.xpm" #include "icons/map_add.xpm" #include "icons/map_table.xpm" #include "icons/identify.xpm" #include "icons/zoom_in.xpm" #include "icons/zoom_out.xpm" #include "icons/pan.xpm" ................................................................................ color = wxColour(192, 192, 192); MyBitmapCellRenderer *renderer = new MyBitmapCellRenderer; wxBitmap bmp; switch (pL->GetLayerType()) { case MAP_LAYER_VECTOR: case MAP_LAYER_VECTOR_VIEW: case MAP_LAYER_VECTOR_SHP: switch (pL->GetGeometryType()) { case 1: case 1001: case 2001: case 3001: case 4: ................................................................................ pL = pL->GetNext(); continue; }; renderer->SetGraphic(bmp); Layers->SetCellValue(count, 0, pL->GetDbPrefix()); Layers->SetCellTextColour(count, 0, color); Layers->SetCellRenderer(count, 1, renderer); if (pL->GetLayerType() == MAP_LAYER_VECTOR || pL->GetLayerType() == MAP_LAYER_VECTOR_VIEW || pL->GetLayerType() == MAP_LAYER_VECTOR_SHP) { wxString prefixName = pL->GetLayerPrefix(); prefixName += wxT("."); prefixName += pL->GetLayerName(); Layers->SetCellValue(count, 2, prefixName); } else Layers->SetCellValue(count, 2, pL->GetLayerName()); ................................................................................ // first row: Layer's fully qualified name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Full Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString name = Layer->GetDbPrefix(); if (Layer->GetType() == MAP_LAYER_VECTOR || Layer->GetType() == MAP_LAYER_VECTOR_VIEW || Layer->GetType() == MAP_LAYER_VECTOR_SHP) name += wxT(".") + Layer->GetVectorPrefix(); name += wxT(".") + Layer->GetName(); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_MAPLAYER_NAME, name, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: Title ................................................................................ switch (Layer->GetType()) { case MAP_LAYER_WMS: datasource = wxT("WMS Layer GetMap URL:\n"); datasource += wxString::FromUTF8(Layer->GetWmsGetMapURL()); break; case MAP_LAYER_VECTOR: case MAP_LAYER_VECTOR_VIEW: case MAP_LAYER_VECTOR_SHP: datasource = wxT("Vector Coverage\n"); datasource += wxT("SpatiaLite "); if (Layer->GetVectorPrefix().IsSameAs(wxT("table")) == true) datasource += wxT("GeoTable: ") + wxString::FromUTF8(Layer->GetTableName()) + wxT(" / ") + wxString::FromUTF8(Layer->GetGeometryColumn()) + wxT("\n"); ................................................................................ { CachedNodes = new CachedFrame(); CachedLinks = new CachedFrame(); CachedLinkSeeds = new CachedFrame(); } QuickStyle = NULL; QuickStyleTopology = NULL; QuickStyleRaster = NULL; Prev = NULL; Next = NULL; } MapLayer::~MapLayer() { // ................................................................................ delete CachedLinkSeeds; if (CachedFaceSeeds != NULL) delete CachedFaceSeeds; if (QuickStyle != NULL) delete QuickStyle; if (QuickStyleTopology != NULL) delete QuickStyleTopology; if (QuickStyleRaster != NULL) delete QuickStyleRaster; } void MapLayer::Invalidate() { // // the Style changed: invalidating all Caches // ................................................................................ QuickStyleTopology = style->Clone(); Invalidate(); return true; } } return false; } bool MapLayer::UpdateQuickStyle(QuickStyleRasterObj * style) { // // updating the current Quick Syle // bool ret; if (QuickStyleRaster == NULL) { QuickStyleRaster = style->Clone(); QuickStyleRaster->UpdateXmlStyle(); Invalidate(); return true; } else { ret = style->Compare(QuickStyleRaster); if (ret == false) { if (QuickStyleRaster != NULL) delete QuickStyleRaster; QuickStyleRaster = style->Clone(); QuickStyleRaster->UpdateXmlStyle(); Invalidate(); return true; } } return false; } void MapLayer::PrepareGraphicsContext(int width, int height, double minx, double miny, double maxx, double maxy, const char *style) { // // initializing the Graphics Context ................................................................................ if (CachedLinks->IsValid(width, height, minx, miny, maxx, maxy, style) != true) CachedLinks->Reset(width, height, minx, miny, maxx, maxy, style); if (CachedLinkSeeds->IsValid(width, height, minx, miny, maxx, maxy, style) != true) CachedLinkSeeds->Reset(width, height, minx, miny, maxx, maxy, style); } if (Type == MAP_LAYER_VECTOR || Type == MAP_LAYER_VECTOR_VIEW || Type == MAP_LAYER_VECTOR_SHP || Type == MAP_LAYER_TOPOLOGY || Type == MAP_LAYER_NETWORK) { // Labels if (CachedLabels->IsValid(width, height, minx, miny, maxx, maxy, style) != true) CachedLabels->Reset(width, height, minx, miny, maxx, maxy, style); } |
Changes to MapView.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 199 200 201 202 203 204 205 206 207 208 209 210 211 212 ... 540 541 542 543 544 545 546 547 548 549 550 551 552 553 .... 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 .... 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 .... 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 .... 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 .... 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 .... 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 .... 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 |
/* / MapView.cpp / the Map View of spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 2.0, 2017 January 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ void MyMapView::OnSize(wxSizeEvent & WXUNUSED(event)) { // // this window has changed its size // PrepareMap(); } void MyMapView::OnPaint(wxPaintEvent & WXUNUSED(event)) { // // this window needs to be repainted // wxPaintDC dc(this); ................................................................................ coords = wxString::FromUTF8(dummy); sqlite3_free(dummy); MapPanel->UpdateMapScale(); MapPanel->UpdateMapCoords(coords); MapPanel->UpdateMapSRID(); } void MyMapView::Invalidate() { // resetting to initial state ValidMap = false; MapMinX = DBL_MAX; MapMinY = DBL_MAX; ................................................................................ nice(10); } } #endif lyr->IncrementRetryCount(); view->DoPaintLayer(lyr); mother->ReleaseThread(index, lyr); lyr->SetLocked(false); if (lyr->IsReady() == true) { canvas->SetChanged(true); wxCommandEvent evt_step(wxEVT_COMMAND_BUTTON_CLICKED, ID_PAINT_MAP_STEP); view->GetEventHandler()->AddPendingEvent(evt_step); } ................................................................................ char *db_prefix; char *layer_name = NULL; int len; rl2CanvasPtr canvas; sqlite3_stmt *stmt = NULL; const char *sql; int ret; if (lyr == NULL) return; layer = lyr->GetLayer(); if (layer == NULL) return; config = layer->GetRasterConfig(); if (config == NULL) return; wxString prefix = layer->GetDbPrefix(); len = prefix.Len(); if (len == 0) db_prefix = NULL; else { ................................................................................ (unsigned char *) sqlite3_column_blob(stmt, 0); int blob_sz = sqlite3_column_bytes(stmt, 0); canvas = layer->CreateCanvas(); rl2_map_image_paint_from_raster(MapPanel->GetSqlite(), MapPanel->GetRL2PrivateData(), canvas, db_prefix, layer_name, blob, blob_sz, config->GetStyle()); layer->Validate(canvas); rl2_destroy_canvas(canvas); } } } sqlite3_finalize(stmt); if (db_prefix != NULL) ................................................................................ (unsigned char *) sqlite3_column_blob(stmt, 0); int blob_sz = sqlite3_column_bytes(stmt, 0); canvas = layer->CreateCanvas(); const void *data = MapPanel->GetRL2PrivateData(); if (layer->GetType() == MAP_LAYER_TOPOLOGY) rl2_map_image_paint_from_vector_ex(MapPanel->GetSqlite(), data, canvas, db_prefix, layer_name, blob, blob_sz, styleName, quickStyle, config->AreNodesVisible(), config->AreEdgesVisible(), config->AreFacesVisible(), config->AreEdgeSeedsVisible (), config->AreFaceSeedsVisible ()); else if (layer->GetType() == MAP_LAYER_NETWORK) rl2_map_image_paint_from_vector_ex(MapPanel->GetSqlite(), data, canvas, db_prefix, layer_name, blob, blob_sz, styleName, quickStyle, config->AreNodesVisible(), config->AreLinksVisible(), 0, config->AreLinkSeedsVisible (), 0); else rl2_map_image_paint_from_vector(MapPanel->GetSqlite(), data, canvas, db_prefix, layer_name, blob, blob_sz, styleName, quickStyle); layer->Validate(canvas); rl2_destroy_canvas(canvas); } } } sqlite3_finalize(stmt); ................................................................................ rl2_graph_get_context_alpha_array(ctx, &half_transparent); rl2_graph_destroy_context(ctx); // updating the Screen wxImage img = wxImage(FrameWidth, FrameHeight); img.SetData(rgb, false); img.SetAlpha(alpha, false); BlinkBitmap = img; DynamicBlink = true; ResetScreenBitmap(); DynamicBlink = false; } void MyMapView::ResetMapBitmap(wxImage & img, unsigned int width, unsigned int height) ................................................................................ } void MyMapView::RebuildLayerTree(MyLayerTree * LayerTree) { // // rebuilding from scratch the Map Layers Tree // MapLayerObject *obj; wxTreeItemId layer; ::wxBeginBusyCursor(); LayerTree->Hide(); LayerTree->DeleteChildren(LayerTree->GetRoot()); int count_rasters = 0; MapLayer *pL = FirstLayer; ................................................................................ *(UnusedThreads + i) = false; return i; } } return -1; } void MapViewPaintParams::ReleaseThread(int index, SingleLayerPainter * lyr) { // releasing a Thread slot if (UnusedThreads == NULL) return; if (index >= 0 && index < NumThreads) { // unlocking the Thread slot |
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > | | | | | < | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 ... 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 .... 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 .... 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 .... 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 .... 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 .... 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 .... 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 .... 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 |
/* / MapView.cpp / the Map View of spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 2.0, 2017 January 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ void MyMapView::OnSize(wxSizeEvent & WXUNUSED(event)) { // // this window has changed its size // PrepareMap(); } int MyMapView::GetImageWidth() { // will return the current image Width wxSize sz = GetClientSize(); return sz.GetWidth(); } int MyMapView::GetImageHeight() { // will return the current image Width wxSize sz = GetClientSize(); return sz.GetHeight(); } void MyMapView::OnPaint(wxPaintEvent & WXUNUSED(event)) { // // this window needs to be repainted // wxPaintDC dc(this); ................................................................................ coords = wxString::FromUTF8(dummy); sqlite3_free(dummy); MapPanel->UpdateMapScale(); MapPanel->UpdateMapCoords(coords); MapPanel->UpdateMapSRID(); } void MyMapView::DoPrepareBBox(wxString & bbox) { // preparing the current frame BBOX char *buf = sqlite3_mprintf("BuildMBR(%f, %f, %f, %f, %d), ", FrameMinX, FrameMinY, FrameMaxX, FrameMaxY, MapSRID); bbox = wxString::FromUTF8(buf); sqlite3_free(buf); } void MyMapView::GetBBox(int *srid, double *minx, double *miny, double *maxx, double *maxy) { // returning the current fram BBOX *srid = MapSRID; *minx = FrameMinX; *miny = FrameMinY; *maxx = FrameMaxX; *maxy = FrameMaxY; } void MyMapView::Invalidate() { // resetting to initial state ValidMap = false; MapMinX = DBL_MAX; MapMinY = DBL_MAX; ................................................................................ nice(10); } } #endif lyr->IncrementRetryCount(); view->DoPaintLayer(lyr); mother->ReleaseThread(index); lyr->SetLocked(false); if (lyr->IsReady() == true) { canvas->SetChanged(true); wxCommandEvent evt_step(wxEVT_COMMAND_BUTTON_CLICKED, ID_PAINT_MAP_STEP); view->GetEventHandler()->AddPendingEvent(evt_step); } ................................................................................ char *db_prefix; char *layer_name = NULL; int len; rl2CanvasPtr canvas; sqlite3_stmt *stmt = NULL; const char *sql; int ret; unsigned char *quickStyle = NULL; if (lyr == NULL) return; layer = lyr->GetLayer(); if (layer == NULL) return; config = layer->GetRasterConfig(); if (config == NULL) return; // attempting to apply a QuickStyle if (layer->GetQuickStyleRaster() != NULL) { if (strcasecmp (layer->GetQuickStyleRaster()->GetUUID(), config->GetStyle()) == 0) { // applying the Quick Style quickStyle = layer->GetQuickStyleRaster()->CloneXmlStyle(); } } wxString prefix = layer->GetDbPrefix(); len = prefix.Len(); if (len == 0) db_prefix = NULL; else { ................................................................................ (unsigned char *) sqlite3_column_blob(stmt, 0); int blob_sz = sqlite3_column_bytes(stmt, 0); canvas = layer->CreateCanvas(); rl2_map_image_paint_from_raster(MapPanel->GetSqlite(), MapPanel->GetRL2PrivateData(), canvas, db_prefix, layer_name, blob, blob_sz, config->GetStyle(), quickStyle); layer->Validate(canvas); rl2_destroy_canvas(canvas); } } } sqlite3_finalize(stmt); if (db_prefix != NULL) ................................................................................ (unsigned char *) sqlite3_column_blob(stmt, 0); int blob_sz = sqlite3_column_bytes(stmt, 0); canvas = layer->CreateCanvas(); const void *data = MapPanel->GetRL2PrivateData(); if (layer->GetType() == MAP_LAYER_TOPOLOGY) rl2_map_image_paint_from_vector_ex(MapPanel->GetSqlite(), data, canvas, db_prefix, layer_name, blob, blob_sz, 0, styleName, quickStyle, config->AreNodesVisible(), config->AreEdgesVisible(), config->AreFacesVisible(), config->AreEdgeSeedsVisible (), config->AreFaceSeedsVisible ()); else if (layer->GetType() == MAP_LAYER_NETWORK) rl2_map_image_paint_from_vector_ex(MapPanel->GetSqlite(), data, canvas, db_prefix, layer_name, blob, blob_sz, 0, styleName, quickStyle, config->AreNodesVisible(), config->AreLinksVisible(), 0, config->AreLinkSeedsVisible (), 0); else rl2_map_image_paint_from_vector(MapPanel->GetSqlite(), data, canvas, db_prefix, layer_name, blob, blob_sz, 0, styleName, quickStyle); layer->Validate(canvas); rl2_destroy_canvas(canvas); } } } sqlite3_finalize(stmt); ................................................................................ rl2_graph_get_context_alpha_array(ctx, &half_transparent); rl2_graph_destroy_context(ctx); // updating the Screen wxImage img = wxImage(FrameWidth, FrameHeight); img.SetData(rgb, false); img.SetAlpha(alpha, false); BlinkBitmap = wxBitmap(img); DynamicBlink = true; ResetScreenBitmap(); DynamicBlink = false; } void MyMapView::ResetMapBitmap(wxImage & img, unsigned int width, unsigned int height) ................................................................................ } void MyMapView::RebuildLayerTree(MyLayerTree * LayerTree) { // // rebuilding from scratch the Map Layers Tree // wxTreeItemId layer; ::wxBeginBusyCursor(); LayerTree->Hide(); LayerTree->DeleteChildren(LayerTree->GetRoot()); int count_rasters = 0; MapLayer *pL = FirstLayer; ................................................................................ *(UnusedThreads + i) = false; return i; } } return -1; } void MapViewPaintParams::ReleaseThread(int index) { // releasing a Thread slot if (UnusedThreads == NULL) return; if (index >= 0 && index < NumThreads) { // unlocking the Thread slot |
Deleted Network.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 |
/* / Network.cpp / methods related to Network building / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include <float.h> #if defined(_WIN32) && !defined(__MINGW32__) #define strcasecmp _stricmp #endif #define MAX_BLOCK 1048576 void MyFrame::BuildNetwork(wxString & table, wxString & from, wxString & to, bool isNoGeometry, wxString & geometry, wxString & name, bool cost_length, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, bool aStarSupported, wxString & dataTableName, wxString & virtualTableName) { // // trying to build a Network // int ret; sqlite3_stmt *stmt; Network *p_graph = NULL; wxString sql; char xsql[2048]; char **results; int n_rows; int n_columns; int i; char *errMsg = NULL; char *col_name; int type; bool ok_from_column = false; bool ok_to_column = false; bool ok_cost_column = false; bool ok_geom_column = false; bool ok_name_column = false; bool ok_oneway_tofrom = false; bool ok_oneway_fromto = false; bool from_null = false; bool from_int = false; bool from_double = false; bool from_text = false; bool from_blob = false; bool to_null = false; bool to_int = false; bool to_double = false; bool to_text = false; bool to_blob = false; bool cost_null = false; bool cost_text = false; bool cost_blob = false; bool tofrom_null = false; bool tofrom_double = false; bool tofrom_text = false; bool tofrom_blob = false; bool fromto_null = false; bool fromto_double = false; bool fromto_text = false; bool fromto_blob = false; bool geom_null = false; bool geom_not_linestring = false; int col_n; int fromto_n = 0; int tofrom_n = 0; sqlite3_int64 rowid; sqlite3_int64 id_from = -1; sqlite3_int64 id_to = -1; char code_from[1024]; char code_to[1024]; double node_from_x; double node_from_y; double node_to_x; double node_to_y; double cost_val; int fromto; int tofrom; wxString endMsg; wxString msg; bool wr; bool aStarLength; double a_star_length; double a_star_coeff; double min_a_star_coeff = DBL_MAX; char *xname; char *xname2; if (isNoGeometry == true) { BuildNetwork(table, from, to, name, cost, bidirectional, one_way, one_way_from_to, one_way_to_from, dataTableName, virtualTableName); return; } ::wxBeginBusyCursor(); // checking for table existence sql = wxT("SELECT tbl_name FROM sqlite_master WHERE Lower(tbl_name) = Lower('"); xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("') AND type = 'table'"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows == 0) { // required table does not exists wxMessageBox(wxT("ERROR: table ") + table + wxT(" does not exists"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } else sqlite3_free_table(results); // checking for columns existence sql = wxT("PRAGMA table_info("); xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows > 1) { for (i = 1; i <= n_rows; i++) { char xcol[256]; col_name = results[(i * n_columns) + 1]; strcpy(xcol, from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_from_column = true; strcpy(xcol, to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_to_column = true; if (cost_length == false) { strcpy(xcol, cost.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_cost_column = true; } strcpy(xcol, geometry.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_geom_column = true; if (name.Len() > 0) { strcpy(xcol, name.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_name_column = true; } if (one_way == true) { strcpy(xcol, one_way_from_to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_tofrom = true; } if (one_way == true) { strcpy(xcol, one_way_to_from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_fromto = true; } } sqlite3_free_table(results); } if (ok_from_column == true && ok_to_column == true && ok_geom_column == true) ; else goto abort; if (name.Len() > 0 && ok_name_column == false) goto abort; if (cost_length == false && ok_cost_column == false) goto abort; if (one_way == true && ok_oneway_tofrom == false) goto abort; if (one_way == true && ok_oneway_fromto == false) goto abort; // checking column types p_graph = new Network(); xname = (char *) malloc((from.Len() * 4) + 1); strcpy(xname, from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("SELECT ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((to.Len() * 4) + 1); strcpy(xname, to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((geometry.Len() * 4) + 1); strcpy(xname, geometry.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", GeometryType(") + wxString::FromUTF8(xname2) + wxT(")"); free(xname2); col_n = 3; if (cost_length == false) { xname = (char *) malloc((cost.Len() * 4) + 1); strcpy(xname, cost.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); col_n++; } if (one_way == true) { xname = (char *) malloc((one_way_to_from.Len() * 4) + 1); strcpy(xname, one_way_to_from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); tofrom_n = col_n; col_n++; xname = (char *) malloc((one_way_from_to.Len() * 4) + 1); strcpy(xname, one_way_from_to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); fromto_n = col_n; col_n++; } xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { // the NodeFrom type type = sqlite3_column_type(stmt, 0); if (type == SQLITE_NULL) from_null = true; if (type == SQLITE_INTEGER) { from_int = true; id_from = sqlite3_column_int64(stmt, 0); p_graph->InsertNode(id_from); } if (type == SQLITE_FLOAT) from_double = true; if (type == SQLITE_TEXT) { from_text = true; strcpy(code_from, (char *) sqlite3_column_text(stmt, 0)); p_graph->InsertNode(code_from); } if (type == SQLITE_BLOB) from_blob = true; // the NodeTo type type = sqlite3_column_type(stmt, 1); if (type == SQLITE_NULL) to_null = true; if (type == SQLITE_INTEGER) { to_int = true; id_to = sqlite3_column_int64(stmt, 1); p_graph->InsertNode(id_to); } if (type == SQLITE_FLOAT) to_double = true; if (type == SQLITE_TEXT) { to_text = true; strcpy(code_to, (char *) sqlite3_column_text(stmt, 1)); p_graph->InsertNode(code_to); } if (type == SQLITE_BLOB) to_blob = true; // the Geometry type type = sqlite3_column_type(stmt, 2); if (type == SQLITE_NULL) geom_null = true; else if (strcmp("LINESTRING", (char *) sqlite3_column_text(stmt, 2)) != 0) geom_not_linestring = true; col_n = 3; if (cost_length == false) { // the Cost type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) cost_null = true; if (type == SQLITE_TEXT) cost_text = true; if (type == SQLITE_BLOB) cost_blob = true; } if (one_way == true) { // the FromTo type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) fromto_null = true; if (type == SQLITE_FLOAT) fromto_double = true; if (type == SQLITE_TEXT) fromto_text = true; if (type == SQLITE_BLOB) fromto_blob = true; // the ToFrom type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) tofrom_null = true; if (type == SQLITE_FLOAT) tofrom_double = true; if (type == SQLITE_TEXT) tofrom_text = true; if (type == SQLITE_BLOB) tofrom_blob = true; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ret = 1; if (from_null == true) ret = 0; if (from_blob == true) ret = 0; if (from_double == true) ret = 0; if (to_null == true) ret = 0; if (to_blob == true) ret = 0; if (to_double == true) ret = 0; if (geom_null == true) ret = 0; if (geom_not_linestring == true) ret = 0; if (cost_length == false) { if (cost_null == true) ret = 0; if (cost_blob == true) ret = 0; if (cost_text == true) ret = 0; } if (one_way == true) { if (fromto_null == true) ret = 0; if (fromto_blob == true) ret = 0; if (fromto_text == true) ret = 0; if (fromto_double == true) ret = 0; if (tofrom_null == true) ret = 0; if (tofrom_blob == true) ret = 0; if (tofrom_text == true) ret = 0; if (tofrom_double == true) ret = 0; } if (!ret) goto abort; if (from_int == true && to_int == true) { // each node is identified by an INTEGER id p_graph->SetNodeCode(false); } else if (from_text == true && to_text == true) { // each node is identified by a TEXT code p_graph->SetNodeCode(true); } else goto abort; p_graph->InitNodes(); // checking topologic consistency xname = (char *) malloc((from.Len() * 4) + 1); strcpy(xname, from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("SELECT ROWID, ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((to.Len() * 4) + 1); strcpy(xname, to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2) + wxT(", "); free(xname2); xname = (char *) malloc((geometry.Len() * 4) + 1); strcpy(xname, geometry.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT("X(StartPoint(") + wxString::FromUTF8(xname2) + wxT(")), Y(StartPoint("); sql += wxString::FromUTF8(xname2) + wxT(")), "); sql += wxT("X(EndPoint(") + wxString::FromUTF8(xname2) + wxT(")), Y(EndPoint("); sql += wxString::FromUTF8(xname2) + wxT("))"); free(xname2); if (aStarSupported == true) { // supporting A* algorithm if (cost_length == false) { xname = (char *) malloc((cost.Len() * 4) + 1); strcpy(xname, cost.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((geometry.Len() * 4) + 1); strcpy(xname, geometry.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", GLength(") + wxString::FromUTF8(xname2) + wxT(")"); free(xname2); col_n = 9; aStarLength = true; } else { xname = (char *) malloc((geometry.Len() * 4) + 1); strcpy(xname, geometry.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", GLength(") + wxString::FromUTF8(xname2) + wxT(")"); free(xname2); col_n = 9; aStarLength = false; min_a_star_coeff = 1.0; } } else { // A* algorithm unsupported if (cost_length == false) { xname = (char *) malloc((cost.Len() * 4) + 1); strcpy(xname, cost.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); col_n = 8; } else { xname = (char *) malloc((geometry.Len() * 4) + 1); strcpy(xname, geometry.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", GLength(") + wxString::FromUTF8(xname2) + wxT(")"); free(xname2); col_n = 9; } aStarLength = false; } if (one_way == true) { xname = (char *) malloc((one_way_to_from.Len() * 4) + 1); strcpy(xname, one_way_to_from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); tofrom_n = col_n; col_n++; xname = (char *) malloc((one_way_from_to.Len() * 4) + 1); strcpy(xname, one_way_from_to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); fromto_n = col_n; col_n++; } xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { fromto = true; tofrom = true; if (p_graph->IsNodeCode() == true) { id_from = -1; id_to = -1; } else { *code_from = '\0'; *code_to = '\0'; } // fetching the ROWID rowid = sqlite3_column_int64(stmt, 0); // fetching the NodeFrom value if (p_graph->IsNodeCode() == true) strcpy(code_from, (char *) sqlite3_column_text(stmt, 1)); else id_from = sqlite3_column_int64(stmt, 1); // fetching the NodeTo value if (p_graph->IsNodeCode() == true) strcpy(code_to, (char *) sqlite3_column_text(stmt, 2)); else id_to = sqlite3_column_int64(stmt, 2); // fetching the NodeFromX value node_from_x = sqlite3_column_double(stmt, 3); // fetching the NodeFromY value node_from_y = sqlite3_column_double(stmt, 4); // fetching the NodeFromX value node_to_x = sqlite3_column_double(stmt, 5); // fetching the NodeFromY value node_to_y = sqlite3_column_double(stmt, 6); // fetching the Cost value cost_val = sqlite3_column_double(stmt, 7); if (one_way == true) { // fetching the OneWay-FromTo value fromto = sqlite3_column_int(stmt, fromto_n); // fetching the OneWay-ToFrom value tofrom = sqlite3_column_int(stmt, tofrom_n); } if (cost_val <= 0.0) p_graph->SetError(); if (aStarLength == true) { // supporting A* - fetching the arc length a_star_length = sqlite3_column_double(stmt, 8); a_star_coeff = cost_val / a_star_length; if (a_star_coeff < min_a_star_coeff) min_a_star_coeff = a_star_coeff; } if (bidirectional == true) { if (fromto) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); else p_graph->AddArc(rowid, id_from, id_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); } if (tofrom) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_to, code_from, node_to_x, node_to_y, node_from_x, node_from_y, cost_val); else p_graph->AddArc(rowid, id_to, id_from, node_to_x, node_to_y, node_from_x, node_from_y, cost_val); } } else { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); else p_graph->AddArc(rowid, id_from, id_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); } if (p_graph->IsError() == true) { sqlite3_finalize(stmt); goto abort; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ::wxEndBusyCursor(); wr = CreateNetwork(p_graph, table, from, to, geometry, name, aStarSupported, min_a_star_coeff, dataTableName, virtualTableName); if (wr == true) { endMsg = wxT("OK: VirtualNetwork table '") + table + wxT("_net' successfully created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { endMsg = wxT("DB ERROR: VirtualNetwork table '") + table + wxT("_net' was not created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } if (p_graph) delete p_graph; InitTableTree(); return; abort: ::wxEndBusyCursor(); msg = wxT ("It's impossible to build a Network using the given configuration;\nsome fatal error occurred\n\n"); msg += wxT("please note: using the 'spatialite_network' command-line tool\n"); msg += wxT ("you can obtain a full detailed report explaining causes for this failure"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (p_graph) delete p_graph; } void MyFrame::BuildNetwork(wxString & table, wxString & from, wxString & to, wxString & name, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, wxString & dataTableName, wxString & virtualTableName) { // // trying to build a Network - NO-GEOMETRY // int ret; sqlite3_stmt *stmt; Network *p_graph = NULL; wxString sql; char xsql[2048]; char **results; int n_rows; int n_columns; int i; char *errMsg = NULL; char *col_name; int type; bool ok_from_column = false; bool ok_to_column = false; bool ok_cost_column = false; bool ok_name_column = false; bool ok_oneway_tofrom = false; bool ok_oneway_fromto = false; bool from_null = false; bool from_int = false; bool from_double = false; bool from_text = false; bool from_blob = false; bool to_null = false; bool to_int = false; bool to_double = false; bool to_text = false; bool to_blob = false; bool cost_null = false; bool cost_text = false; bool cost_blob = false; bool tofrom_null = false; bool tofrom_double = false; bool tofrom_text = false; bool tofrom_blob = false; bool fromto_null = false; bool fromto_double = false; bool fromto_text = false; bool fromto_blob = false; int col_n; int fromto_n = 0; int tofrom_n = 0; sqlite3_int64 rowid; sqlite3_int64 id_from = -1; sqlite3_int64 id_to = -1; char code_from[1024]; char code_to[1024]; double cost_val; int fromto; int tofrom; wxString endMsg; wxString msg; bool wr; char *xname; char *xname2; ::wxBeginBusyCursor(); // checking for table existence sql = wxT("SELECT tbl_name FROM sqlite_master WHERE Lower(tbl_name) = Lower('"); xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("') AND type = 'table'"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows == 0) { // required table does not exists wxMessageBox(wxT("ERROR: table ") + table + wxT(" does not exists"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } else sqlite3_free_table(results); // checking for columns existence sql = wxT("PRAGMA table_info("); xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows > 1) { for (i = 1; i <= n_rows; i++) { char xcol[256]; col_name = results[(i * n_columns) + 1]; strcpy(xcol, from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_from_column = true; strcpy(xcol, to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_to_column = true; strcpy(xcol, cost.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_cost_column = true; if (name.Len() > 0) { strcpy(xcol, name.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_name_column = true; } if (one_way == true) { strcpy(xcol, one_way_from_to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_tofrom = true; } if (one_way == true) { strcpy(xcol, one_way_to_from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_fromto = true; } } sqlite3_free_table(results); } if (ok_from_column == true && ok_to_column == true) ; else goto abort; if (name.Len() > 0 && ok_name_column == false) goto abort; if (ok_cost_column == false) goto abort; if (one_way == true && ok_oneway_tofrom == false) goto abort; if (one_way == true && ok_oneway_fromto == false) goto abort; // checking column types p_graph = new Network(); xname = (char *) malloc((from.Len() * 4) + 1); strcpy(xname, from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("SELECT ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((to.Len() * 4) + 1); strcpy(xname, to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((cost.Len() * 4) + 1); strcpy(xname, cost.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); col_n = 3; if (one_way == true) { xname = (char *) malloc((one_way_to_from.Len() * 4) + 1); strcpy(xname, one_way_to_from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); tofrom_n = col_n; col_n++; xname = (char *) malloc((one_way_from_to.Len() * 4) + 1); strcpy(xname, one_way_from_to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); fromto_n = col_n; col_n++; } xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { // the NodeFrom type type = sqlite3_column_type(stmt, 0); if (type == SQLITE_NULL) from_null = true; if (type == SQLITE_INTEGER) { from_int = true; id_from = sqlite3_column_int64(stmt, 0); p_graph->InsertNode(id_from); } if (type == SQLITE_FLOAT) from_double = true; if (type == SQLITE_TEXT) { from_text = true; strcpy(code_from, (char *) sqlite3_column_text(stmt, 0)); p_graph->InsertNode(code_from); } if (type == SQLITE_BLOB) from_blob = true; // the NodeTo type type = sqlite3_column_type(stmt, 1); if (type == SQLITE_NULL) to_null = true; if (type == SQLITE_INTEGER) { to_int = true; id_to = sqlite3_column_int64(stmt, 1); p_graph->InsertNode(id_to); } if (type == SQLITE_FLOAT) to_double = true; if (type == SQLITE_TEXT) { to_text = true; strcpy(code_to, (char *) sqlite3_column_text(stmt, 1)); p_graph->InsertNode(code_to); } if (type == SQLITE_BLOB) to_blob = true; // the Cost type type = sqlite3_column_type(stmt, 2); if (type == SQLITE_NULL) cost_null = true; if (type == SQLITE_TEXT) cost_text = true; if (type == SQLITE_BLOB) cost_blob = true; col_n = 3; if (one_way == true) { // the FromTo type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) fromto_null = true; if (type == SQLITE_FLOAT) fromto_double = true; if (type == SQLITE_TEXT) fromto_text = true; if (type == SQLITE_BLOB) fromto_blob = true; // the ToFrom type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) tofrom_null = true; if (type == SQLITE_FLOAT) tofrom_double = true; if (type == SQLITE_TEXT) tofrom_text = true; if (type == SQLITE_BLOB) tofrom_blob = true; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ret = 1; if (from_null == true) ret = 0; if (from_blob == true) ret = 0; if (from_double == true) ret = 0; if (to_null == true) ret = 0; if (to_blob == true) ret = 0; if (to_double == true) ret = 0; if (cost_null == true) ret = 0; if (cost_blob == true) ret = 0; if (cost_text == true) ret = 0; if (one_way == true) { if (fromto_null == true) ret = 0; if (fromto_blob == true) ret = 0; if (fromto_text == true) ret = 0; if (fromto_double == true) ret = 0; if (tofrom_null == true) ret = 0; if (tofrom_blob == true) ret = 0; if (tofrom_text == true) ret = 0; if (tofrom_double == true) ret = 0; } if (!ret) goto abort; if (from_int == true && to_int == true) { // each node is identified by an INTEGER id p_graph->SetNodeCode(false); } else if (from_text == true && to_text == true) { // each node is identified by a TEXT code p_graph->SetNodeCode(true); } else goto abort; p_graph->InitNodes(); // checking topological consistency xname = (char *) malloc((from.Len() * 4) + 1); strcpy(xname, from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("SELECT ROWID, ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((to.Len() * 4) + 1); strcpy(xname, to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); xname = (char *) malloc((cost.Len() * 4) + 1); strcpy(xname, cost.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); col_n = 4; if (one_way == true) { xname = (char *) malloc((one_way_to_from.Len() * 4) + 1); strcpy(xname, one_way_to_from.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); tofrom_n = col_n; col_n++; xname = (char *) malloc((one_way_from_to.Len() * 4) + 1); strcpy(xname, one_way_from_to.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(", ") + wxString::FromUTF8(xname2); free(xname2); fromto_n = col_n; col_n++; } xname = (char *) malloc((table.Len() * 4) + 1); strcpy(xname, table.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { fromto = true; tofrom = true; if (p_graph->IsNodeCode() == true) { id_from = -1; id_to = -1; } else { *code_from = '\0'; *code_to = '\0'; } // fetching the ROWID rowid = sqlite3_column_int64(stmt, 0); // fetching the NodeFrom value if (p_graph->IsNodeCode() == true) strcpy(code_from, (char *) sqlite3_column_text(stmt, 1)); else id_from = sqlite3_column_int64(stmt, 1); // fetching the NodeTo value if (p_graph->IsNodeCode() == true) strcpy(code_to, (char *) sqlite3_column_text(stmt, 2)); else id_to = sqlite3_column_int64(stmt, 2); // fetching the Cost value cost_val = sqlite3_column_double(stmt, 3); if (one_way == true) { // fetching the OneWay-FromTo value fromto = sqlite3_column_int(stmt, fromto_n); // fetching the OneWay-ToFrom value tofrom = sqlite3_column_int(stmt, tofrom_n); } if (cost_val <= 0.0) p_graph->SetError(); if (bidirectional == true) { if (fromto) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, cost_val); else p_graph->AddArc(rowid, id_from, id_to, cost_val); } if (tofrom) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_to, code_from, cost_val); else p_graph->AddArc(rowid, id_to, id_from, cost_val); } } else { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, cost_val); else p_graph->AddArc(rowid, id_from, id_to, cost_val); } if (p_graph->IsError() == true) { sqlite3_finalize(stmt); goto abort; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ::wxEndBusyCursor(); wr = CreateNetwork(p_graph, table, from, to, name, dataTableName, virtualTableName); if (wr == true) { endMsg = wxT("OK: VirtualNetwork table '") + table + wxT("_net' successfully created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { endMsg = wxT("DB ERROR: VirtualNetwork table '") + table + wxT("_net' was not created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } if (p_graph) delete p_graph; InitTableTree(); return; abort: ::wxEndBusyCursor(); msg = wxT ("It's impossible to build a Network using the given configuration;\nsome fatal error occurred\n\n"); msg += wxT("please note: using the 'spatialite_network' command-line tool\n"); msg += wxT ("you can obtain a full detailed report explaining causes for this failure"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (p_graph) delete p_graph; } void MyFrame::OutputNetNode(unsigned char *auxbuf, int *size, int ind, bool node_code, int max_node_length, NetNode * pN, int endian_arch, bool aStarSupported) { // // exporting a Node into NETWORK-DATA // int n_star; int i; NetArc **arc_array; NetArc *pA; unsigned char *out = auxbuf; *out++ = GAIA_NET_NODE; gaiaExport32(out, ind, 1, endian_arch); // the Node internal index out += 4; if (node_code) { // Nodes are identified by a TEXT Code memset(out, '\0', max_node_length); strcpy((char *) out, pN->GetCode().ToUTF8()); out += max_node_length; } else { // Nodes are identified by an INTEGER Id gaiaExportI64(out, pN->GetId(), 1, endian_arch); out += 8; } if (aStarSupported) { // in order to support the A* algorithm [X,Y] are required for each node gaiaExport64(out, pN->GetX(), 1, endian_arch); out += 8; gaiaExport64(out, pN->GetY(), 1, endian_arch); out += 8; } arc_array = pN->PrepareOutcomings(&n_star); gaiaExport16(out, n_star, 1, endian_arch); // # of outcoming arcs out += 2; for (i = 0; i < n_star; i++) { // exporting the outcoming arcs pA = *(arc_array + i); *out++ = GAIA_NET_ARC; gaiaExportI64(out, pA->GetRowId(), 1, endian_arch); // the Arc rowid out += 8; gaiaExport32(out, pA->GetTo()->GetInternalIndex(), 1, endian_arch); // the ToNode internal index out += 4; gaiaExport64(out, pA->GetCost(), 1, endian_arch); // the Arc Cost out += 8; *out++ = GAIA_NET_END; } if (arc_array) delete[]arc_array; *out++ = GAIA_NET_END; *size = out - auxbuf; } bool MyFrame::CreateNetwork(Network * p_graph, wxString & table, wxString & from, wxString & to, wxString & geometry, wxString & name, bool aStarSupported, double aStarCoeff, wxString & dataTableName, wxString & virtualTableName) { // // creates the NETWORK-DATA table // int ret; wxString sql; char xsql[1024]; char *errMsg = NULL; unsigned char *auxbuf = new unsigned char[MAX_BLOCK]; unsigned char *buf = new unsigned char[MAX_BLOCK]; unsigned char *out; sqlite3_stmt *stmt; int i; int size; int endian_arch = gaiaEndianArch(); NetNode *pN; int pk = 0; int nodes_cnt = 0; int len; bool net_data_exists = false; bool net_exists = false; bool delete_existing = false; char *xname; char *xname2; net_data_exists = TableAlreadyExists(dataTableName); net_exists = TableAlreadyExists(virtualTableName); if (net_data_exists == true || net_exists == true) { // asking permission to overwrite existing tables wxString msg; if (net_data_exists == true) msg += wxT("A table named '") + dataTableName + wxT("' already exists\n"); if (net_exists == true) msg += wxT("A table named '") + virtualTableName + wxT("' already exists\n"); msg += wxT("\nDo you allow DROPping existing table(s) ?"); wxMessageDialog confirm(this, msg, wxT("Confirm overwrite"), wxYES_NO | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret == wxID_YES) delete_existing = true; } ::wxBeginBusyCursor(); for (i = 0; i < p_graph->GetNumNodes(); i++) { // setting the internal index to each Node pN = p_graph->GetSortedNode(i); pN->SetInternalIndex(i); } // starts a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (delete_existing == true) { xname = (char *) malloc((virtualTableName.Len() * 4) + 1); strcpy(xname, virtualTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } } // creating the NETWORK-DATA table xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("CREATE TABLE ") + wxString::FromUTF8(xname2); free(xname2); sql += wxT(" (Id INTEGER PRIMARY KEY, NetworkData BLOB NOT NULL)"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // preparing the SQL statement xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("INSERT INTO ") + wxString::FromUTF8(xname2) + wxT(" (Id, NetworkData) VALUES (?, ?)"); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("INSERT error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } if (pk == 0) { // preparing the HEADER block out = buf; if (aStarSupported) *out++ = GAIA_NET64_A_STAR_START; else *out++ = GAIA_NET64_START; *out++ = GAIA_NET_HEADER; gaiaExport32(out, p_graph->GetNumNodes(), 1, endian_arch); // how many Nodes are there out += 4; if (p_graph->IsNodeCode() == true) *out++ = GAIA_NET_CODE; // Nodes are identified by a TEXT code else *out++ = GAIA_NET_ID; // Nodes are identified by an INTEGER id if (p_graph->IsNodeCode() == true) *out++ = p_graph->GetMaxCodeLength(); // max TEXT code length else *out++ = 0x00; // inserting the main Table name *out++ = GAIA_NET_TABLE; len = table.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Table Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, table.ToUTF8()); out += len; // inserting the NodeFrom column name *out++ = GAIA_NET_FROM; len = from.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeFrom column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, from.ToUTF8()); out += len; // inserting the NodeTo column name *out++ = GAIA_NET_TO; len = to.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeTo column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, to.ToUTF8()); out += len; // inserting the Geometry column name *out++ = GAIA_NET_GEOM; len = geometry.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Geometry column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, geometry.ToUTF8()); out += len; // inserting the Name column name - may be empty *out++ = GAIA_NET_NAME; if (name.Len() == 0) len = 1; else len = name.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Name column Name length, including last '\0' out += 2; memset(out, '\0', len); if (name.Len() > 0) strcpy((char *) out, name.ToUTF8()); out += len; if (aStarSupported) { // inserting the A* Heuristic Coeff *out++ = GAIA_NET_A_STAR_COEFF; gaiaExport64(out, aStarCoeff, 1, endian_arch); out += 8; } *out++ = GAIA_NET_END; // INSERTing the Header block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } for (i = 0; i < p_graph->GetNumNodes(); i++) { // looping on each Node pN = p_graph->GetSortedNode(i); OutputNetNode(auxbuf, &size, i, p_graph->IsNodeCode(), p_graph->GetMaxCodeLength(), pN, endian_arch, aStarSupported); if (size >= (MAX_BLOCK - (out - buf))) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } // inserting the current Node into the block nodes_cnt++; memcpy(out, auxbuf, size); out += size; } if (nodes_cnt) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); // creating the VirtualNetwork NET-table xname = (char *) malloc((virtualTableName.Len() * 4) + 1); strcpy(xname, virtualTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("CREATE VIRTUAL TABLE ") + wxString::FromUTF8(xname2); free(xname2); sql += wxT(" USING VirtualNetwork("); xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2) + wxT(")"); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE VIRTUAL TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // commits the transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; ::wxEndBusyCursor(); return true; abort: ::wxEndBusyCursor(); if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; return true; return false; } bool MyFrame::CreateNetwork(Network * p_graph, wxString & table, wxString & from, wxString & to, wxString & name, wxString & dataTableName, wxString & virtualTableName) { // // creates the NETWORK-DATA table . NO-GEOMETRY // int ret; wxString sql; char xsql[1024]; char *errMsg = NULL; unsigned char *auxbuf = new unsigned char[MAX_BLOCK]; unsigned char *buf = new unsigned char[MAX_BLOCK]; unsigned char *out; sqlite3_stmt *stmt; int i; int size; int endian_arch = gaiaEndianArch(); NetNode *pN; int pk = 0; int nodes_cnt = 0; int len; bool net_data_exists = false; bool net_exists = false; bool delete_existing = false; char *xname; char *xname2; net_data_exists = TableAlreadyExists(dataTableName); net_exists = TableAlreadyExists(virtualTableName); if (net_data_exists == true || net_exists == true) { // asking permission to overwrite existing tables wxString msg; if (net_data_exists == true) msg += wxT("A table named '") + dataTableName + wxT("' already exists\n"); if (net_exists == true) msg += wxT("A table named '") + virtualTableName + wxT("' already exists\n"); msg += wxT("\nDo you allow DROPping existing table(s) ?"); wxMessageDialog confirm(this, msg, wxT("Confirm overwrite"), wxYES_NO | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret == wxID_YES) delete_existing = true; } ::wxBeginBusyCursor(); for (i = 0; i < p_graph->GetNumNodes(); i++) { // setting the internal index to each Node pN = p_graph->GetSortedNode(i); pN->SetInternalIndex(i); } // starts a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (delete_existing == true) { xname = (char *) malloc((virtualTableName.Len() * 4) + 1); strcpy(xname, virtualTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname2); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } } // creating the NETWORK-DATA table xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("CREATE TABLE ") + wxString::FromUTF8(xname2); free(xname2); sql += wxT(" (Id INTEGER PRIMARY KEY, NetworkData BLOB NOT NULL)"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // preparing the SQL statement xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("INSERT INTO ") + wxString::FromUTF8(xname2) + wxT(" (Id, NetworkData) VALUES (?, ?)"); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("INSERT error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } if (pk == 0) { // preparing the HEADER block out = buf; *out++ = GAIA_NET64_START; *out++ = GAIA_NET_HEADER; gaiaExport32(out, p_graph->GetNumNodes(), 1, endian_arch); // how many Nodes are there out += 4; if (p_graph->IsNodeCode() == true) *out++ = GAIA_NET_CODE; // Nodes are identified by a TEXT code else *out++ = GAIA_NET_ID; // Nodes are identified by an INTEGER id if (p_graph->IsNodeCode() == true) *out++ = p_graph->GetMaxCodeLength(); // max TEXT code length else *out++ = 0x00; // inserting the main Table name *out++ = GAIA_NET_TABLE; len = table.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Table Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, table.ToUTF8()); out += len; // inserting the NodeFrom column name *out++ = GAIA_NET_FROM; len = from.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeFrom column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, from.ToUTF8()); out += len; // inserting the NodeTo column name *out++ = GAIA_NET_TO; len = to.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeTo column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, to.ToUTF8()); out += len; // inserting the Geometry column name *out++ = GAIA_NET_GEOM; len = 1; gaiaExport16(out, len, 1, endian_arch); // the Geometry column Name length, including last '\0' out += 2; memset(out, '\0', len); out += len; // inserting the Name column name - may be empty *out++ = GAIA_NET_NAME; if (name.Len() == 0) len = 1; else len = name.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Name column Name length, including last '\0' out += 2; memset(out, '\0', len); if (name.Len() > 0) strcpy((char *) out, name.ToUTF8()); out += len; *out++ = GAIA_NET_END; // INSERTing the Header block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } for (i = 0; i < p_graph->GetNumNodes(); i++) { // looping on each Node pN = p_graph->GetSortedNode(i); OutputNetNode(auxbuf, &size, i, p_graph->IsNodeCode(), p_graph->GetMaxCodeLength(), pN, endian_arch, 0); if (size >= (MAX_BLOCK - (out - buf))) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } // inserting the current Node into the block nodes_cnt++; memcpy(out, auxbuf, size); out += size; } if (nodes_cnt) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); // creating the VirtualNetwork NET-table xname = (char *) malloc((virtualTableName.Len() * 4) + 1); strcpy(xname, virtualTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql = wxT("CREATE VIRTUAL TABLE ") + wxString::FromUTF8(xname2); free(xname2); sql += wxT(" USING VirtualNetwork("); xname = (char *) malloc((dataTableName.Len() * 4) + 1); strcpy(xname, dataTableName.ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2) + wxT(")"); free(xname2); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE VIRTUAL TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // commits the transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; ::wxEndBusyCursor(); return true; abort: ::wxEndBusyCursor(); if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; return true; return false; } int cmp_prenodes_code(const void *p1, const void *p2) { // // compares two preliminary nodes by CODE [for QSORT] // NetNodePre *pP1 = *((NetNodePre **) p1); NetNodePre *pP2 = *((NetNodePre **) p2); return pP1->GetCode().Cmp(pP2->GetCode()); } int cmp_prenodes_id(const void *p1, const void *p2) { // // compares two preliminary nodes by ID [for QSORT] // NetNodePre *pP1 = *((NetNodePre **) p1); NetNodePre *pP2 = *((NetNodePre **) p2); if (pP1->GetId() == pP2->GetId()) return 0; if (pP1->GetId() > pP2->GetId()) return 1; return -1; } int cmp_nodes2_code(const void *p1, const void *p2) { // // compares two nodes by CODE [for BSEARCH] // NetNode *pN1 = (NetNode *) p1; NetNode *pN2 = *((NetNode **) p2); return pN1->GetCode().Cmp(pN2->GetCode()); } int cmp_nodes2_id(const void *p1, const void *p2) { // // compares two nodes by ID [for BSEARCH] // NetNode *pN1 = (NetNode *) p1; NetNode *pN2 = *((NetNode **) p2); if (pN1->GetId() == pN2->GetId()) return 0; if (pN1->GetId() > pN2->GetId()) return 1; return -1; } int cmp_nodes1_code(const void *p1, const void *p2) { // // compares two nodes by CODE [for QSORT] // NetNode *pN1 = *((NetNode **) p1); NetNode *pN2 = *((NetNode **) p2); return pN1->GetCode().Cmp(pN2->GetCode()); } int cmp_nodes1_id(const void *p1, const void *p2) { // // compares two nodes by ID [for QSORT ] // NetNode *pN1 = *((NetNode **) p1); NetNode *pN2 = *((NetNode **) p2); if (pN1->GetId() == pN2->GetId()) return 0; if (pN1->GetId() > pN2->GetId()) return 1; return -1; } NetNodePre::NetNodePre(sqlite3_int64 id) { // // Network Node [preliminary] constructor // Id = id; Code = wxT(""); Next = NULL; } NetNodePre::NetNodePre(const char *code) { // // Network Node [preliminary] constructor // Id = -1; Code = wxString::FromUTF8(code); Code.Truncate(30); Next = NULL; } NetNode::NetNode(sqlite3_int64 id) { // // Network Node [final] constructor // InternalIndex = -1; Id = id; Code = wxT(""); X = DBL_MAX; Y = DBL_MAX; First = NULL; Last = NULL; Next = NULL; } NetNode::NetNode(wxString & code) { // // Network Node [final] constructor // InternalIndex = -1; Id = -1; Code = code; X = DBL_MAX; Y = DBL_MAX; First = NULL; Last = NULL; Next = NULL; } NetNode::~NetNode() { // Network Node [final] destructor NetArcRef *pAR; NetArcRef *pARn; pAR = First; while (pAR) { pARn = pAR->GetNext(); delete pAR; pAR = pARn; } } void NetNode::AddOutcoming(NetArc * pA) { // // adds an outcoming Arc to a Node // NetArcRef *pAR = new NetArcRef(pA); if (!First) First = pAR; if (Last) Last->SetNext(pAR); Last = pAR; } NetArc **NetNode::PrepareOutcomings(int *count) { // // preparing the outcoming arc array // NetArc **arc_array; int n = 0; int i; bool ok; NetArcRef *pAR; NetArc *pA0; NetArc *pA1; pAR = First; while (pAR) { // counting how many outcoming arcs are there n++; pAR = pAR->GetNext(); } if (!n) { *count = 0; return NULL; } arc_array = new NetArc *[n]; i = 0; pAR = First; while (pAR) { // populating the arcs array *(arc_array + i++) = pAR->GetReference(); pAR = pAR->GetNext(); } ok = true; while (ok == true) { // bubble sorting the arcs by Cost ok = false; for (i = 1; i < n; i++) { pA0 = *(arc_array + i - 1); pA1 = *(arc_array + i); if (pA0->GetCost() > pA1->GetCost()) { // swapping the arcs *(arc_array + i - 1) = pA1; *(arc_array + i) = pA0; ok = true; } } } *count = n; return arc_array; } NetArc::NetArc(sqlite3_int64 rowid, NetNode * from, NetNode * to, double cost) { // // Network Arc constructor // RowId = rowid; From = from; To = to; Cost = cost; Next = NULL; } Network::Network() { // // Network constructor // FirstPre = NULL; LastPre = NULL; NumPreNodes = 0; SortedPreNodes = NULL; NumPreNodes = 0; SortedPreNodes = NULL; FirstArc = NULL; LastArc = NULL; FirstNode = NULL; LastNode = NULL; NumNodes = 0; SortedNodes = NULL; Error = false; NodeCode = false; MaxCodeLength = 0; } Network::~Network() { // // Network destructor // NetArc *pA; NetArc *pAn; NetNode *pN; NetNode *pNn; CleanPreNodes(); pA = FirstArc; while (pA) { pAn = pA->GetNext(); delete pA; pA = pAn; } pN = FirstNode; while (pN) { pNn = pN->GetNext(); delete pN; pN = pNn; } if (SortedNodes) delete[]SortedNodes; } void Network::CleanPreNodes() { // // cleaning up the preliminary Nodes list // NetNodePre *pP; NetNodePre *pPn; pP = FirstPre; while (pP) { pPn = pP->GetNext(); delete pP; pP = pPn; } FirstPre = NULL; LastPre = NULL; NumPreNodes = 0; if (SortedPreNodes) delete[]SortedPreNodes; SortedPreNodes = NULL; } void Network::InsertNode(sqlite3_int64 id) { // // inserts a Node into the preliminary list // NetNodePre *pP = new NetNodePre(id); if (!FirstPre) FirstPre = pP; if (LastPre) LastPre->SetNext(pP); LastPre = pP; } void Network::InsertNode(const char *code) { // // inserts a Node into the preliminary list // NetNodePre *pP = new NetNodePre(code); if (!FirstPre) FirstPre = pP; if (LastPre) LastPre->SetNext(pP); LastPre = pP; } void Network::AddNode(sqlite3_int64 id) { // // inserts a Node into the final list // NetNode *pN = new NetNode(id); if (!FirstNode) FirstNode = pN; if (LastNode) LastNode->SetNext(pN); LastNode = pN; } void Network::AddNode(wxString & code) { // // inserts a Node into the final list // int len; NetNode *pN = new NetNode(code); len = pN->GetCode().Len() + 1; if (len > MaxCodeLength) MaxCodeLength = len; if (!FirstNode) FirstNode = pN; if (LastNode) LastNode->SetNext(pN); LastNode = pN; } NetNode *Network::ProcessNode(sqlite3_int64 id, double x, double y, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(id); *pOther = NULL; if (pN) { // this Node already exists into the sorted list if (pN->GetX() == DBL_MAX && pN->GetY() == DBL_MAX) { pN->SetX(x); pN->SetY(y); } else { if (pN->GetX() == x && pN->GetY() == y) ; else *pOther = pN; } return pN; } // unexpected error; undefined Node return NULL; } NetNode *Network::ProcessNode(wxString & code, double x, double y, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(code); *pOther = NULL; if (pN) { // this Node already exists into the sorted list if (pN->GetX() == DBL_MAX && pN->GetY() == DBL_MAX) { pN->SetX(x); pN->SetY(y); } else { if (pN->GetX() == x && pN->GetY() == y) ; else *pOther = pN; } return pN; } // unexpected error; undefined Node return NULL; } NetNode *Network::ProcessNode(sqlite3_int64 id, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(id); *pOther = NULL; return pN; } NetNode *Network::ProcessNode(wxString & code, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(code); *pOther = NULL; return pN; } void Network::AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; pFrom = ProcessNode(id_from, node_from_x, node_from_y, &pN2); if (pN2) Error = true; pTo = ProcessNode(id_to, node_to_x, node_to_y, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; wxString stCode = wxString::FromUTF8(code_from); pFrom = ProcessNode(stCode, node_from_x, node_from_y, &pN2); if (pN2) Error = true; stCode = wxString::FromUTF8(code_to); pTo = ProcessNode(stCode, node_to_x, node_to_y, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; pFrom = ProcessNode(id_from, &pN2); if (pN2) Error = true; pTo = ProcessNode(id_to, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; wxString stCode = wxString::FromUTF8(code_from); pFrom = ProcessNode(stCode, &pN2); if (pN2) Error = true; stCode = wxString::FromUTF8(code_to); pTo = ProcessNode(stCode, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::Sort() { // // updating the Nodes sorted list // int i; NetNode *pN; NumNodes = 0; if (SortedNodes) { // we must free the already existent sorted list delete[]SortedNodes; } SortedNodes = NULL; pN = FirstNode; while (pN) { NumNodes++; pN = pN->GetNext(); } if (!NumNodes) return; SortedNodes = new NetNode *[NumNodes]; i = 0; pN = FirstNode; while (pN) { *(SortedNodes + i++) = pN; pN = pN->GetNext(); } if (NodeCode == true) { // Nodes are identified by a TEXT code qsort(SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes1_code); } else { // Nodes are identified by an INTEGER id qsort(SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes1_id); } } NetNode *Network::GetSortedNode(sqlite3_int64 x) { // // return a sorted Node [by position] // if (x >= 0 && x < NumNodes) return *(SortedNodes + x); return NULL; } NetNode *Network::Find(sqlite3_int64 id) { // // searching a Node into the sorted list // NetNode **ret; NetNode pN(id); if (!SortedNodes) return NULL; // Nodes are identified by an INTEGER id ret = (NetNode **) bsearch(&pN, SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes2_id); if (!ret) return NULL; return *ret; } NetNode *Network::Find(wxString & code) { // // searching a Node into the sorted list // NetNode **ret; NetNode pN(code); if (!SortedNodes) return NULL; // Nodes are identified by a TEXT code ret = (NetNode **) bsearch(&pN, SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes2_code); if (!ret) return NULL; return *ret; } void Network::InitNodes() { // // prepares the final Nodes list // sqlite3_int64 last_id; wxString last_code; int i; NetNodePre *pP; NumPreNodes = 0; // sorting preliminary nodes if (SortedPreNodes) { // we must free the already existent sorted list delete[]SortedPreNodes; } SortedPreNodes = NULL; pP = FirstPre; while (pP) { NumPreNodes++; pP = pP->GetNext(); } if (!NumPreNodes) return; SortedPreNodes = new NetNodePre *[NumPreNodes]; i = 0; pP = FirstPre; while (pP) { *(SortedPreNodes + i++) = pP; pP = pP->GetNext(); } if (NodeCode == true) { // Nodes are identified by a TEXT code qsort(SortedPreNodes, NumPreNodes, sizeof(NetNodePre *), cmp_prenodes_code); } else { // Nodes are identified by an INTEGER id qsort(SortedPreNodes, NumPreNodes, sizeof(NetNodePre *), cmp_prenodes_id); } // creating the final Nodes linked list last_id = -1; last_code = wxT(""); for (i = 0; i < NumPreNodes; i++) { pP = *(SortedPreNodes + i); if (NodeCode == true) { // Nodes are identified by a TEXT code if (pP->GetCode().Cmp(last_code) != 0) AddNode(pP->GetCode()); } else { // Nodes are identified by an INTEGER id if (pP->GetId() != last_id) AddNode(pP->GetId()); } last_id = pP->GetId(); last_code = pP->GetCode(); } // sorting the final Nodes list Sort(); // cleaning up the preliminary Nodes structs CleanPreNodes(); } |
< < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to Objects.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 106 107 108 109 110 111 112 113 114 115 116 117 118 119 ... 404 405 406 407 408 409 410 411 412 413 414 415 416 417 .... 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 .... 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 .... 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 .... 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 |
/* / Objects.cpp / miscellaneous ancillary classes implementation / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ SubType = type; DbAlias = dbAlias; MainName = name; ColName = column; PathOrURL = path_or_url; Restricted = true; } bool MyObject::IsEditable() { // // testing for an EDITABLE TABLE or VIEW object // if (Restricted) ................................................................................ // // testing for FOREIGN KEY COLUMN nodes // if (Type == MY_FOREIGN_KEY_FLD) return true; return false; } void MyVariant::Copy(MyVariant * other) { // // transfers a BLOB value // if (other->Type != MY_BLOB_VARIANT) ................................................................................ // checking for a GPKG Geometry // int i; char **results; int rows; int columns; char *errMsg = NULL; const char *name; wxString Name; char *sql; char xname[1024]; int ret; int is_virtual = 0; char *xtable; if (table.StartsWith(wxT("vgpkg_")) == true) { wxString clean; table.StartsWith(wxT("vgpkg_"), &clean); table = clean; is_virtual = 1; ................................................................................ // checking for an FDO/OGR Geometry // int i; char **results; int rows; int columns; char *errMsg = NULL; const char *name; wxString Name; char *sql; char xname[1024]; int ret; int is_virtual = 0; char *xtable; if (table.StartsWith(wxT("fdo_")) == true) { wxString clean; table.StartsWith(wxT("fdo_"), &clean); table = clean; is_virtual = 1; ................................................................................ Geometry = false; GeoPackageGeometry = false; GeoPackageVirtualGeometry = false; FdoOgrGeometry = false; FdoOgrVirtualGeometry = false; Next = NULL; } TableViewList::TableViewList() { // constructor First = NULL; Last = NULL; Count = 0; ................................................................................ void TableViewList::Add(wxString & name, bool isView, bool isVirtual) { // adding a new item to the list TableViewItem *item = new TableViewItem(name, isView, isVirtual); if (First == NULL) First = item; if (Last != NULL) Last->SetNext(item); Last = item; } static int cmp_tables1(const void *p1, const void *p2) { |
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 ... 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 .... 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 .... 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 .... 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 .... 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 |
/* / Objects.cpp / miscellaneous ancillary classes implementation / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ SubType = type; DbAlias = dbAlias; MainName = name; ColName = column; PathOrURL = path_or_url; Restricted = true; } MyObject::MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly) { // // constructor - TreeItemData // Type = type; Host = host; HostAddr = hostaddr; Port = port; DbName = dbname; User = user; ReadOnly = readOnly; } MyObject::MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, wxString & schema) { // // constructor - TreeItemData // Type = type; Host = host; HostAddr = hostaddr; Port = port; DbName = dbname; User = user; Schema = schema; } MyObject::MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, wxString & schema, wxString & name, wxString & virtName, bool readOnly, bool pk, bool select, bool insertUpdateDelete) { // // constructor - TreeItemData // Type = type; Host = host; HostAddr = hostaddr; Port = port; DbName = dbname; User = user; Schema = schema; Name = name; VirtName = virtName; ReadOnly = readOnly; PK = pk; Select = select; InsertUpdateDelete = insertUpdateDelete; } MyObject::MyObject(int type, wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, wxString & schema, wxString & name, wxString & column, wxString & virtName) { // // constructor - TreeItemData // Type = type; Host = host; HostAddr = hostaddr; Port = port; DbName = dbname; User = user; Schema = schema; Name = name; Column = column; VirtName = virtName; } bool MyObject::IsEditable() { // // testing for an EDITABLE TABLE or VIEW object // if (Restricted) ................................................................................ // // testing for FOREIGN KEY COLUMN nodes // if (Type == MY_FOREIGN_KEY_FLD) return true; return false; } bool MyObject::IsPostgreSQL() { // // testing for PostgreSQL related nodes // bool ok = false; switch (Type) { case MY_POSTGRES_CONN: case MY_POSTGRES_SCHEMA: case MY_POSTGRES_TABLE: case MY_POSTGRES_VIEW: case MY_POSTGIS_VIEW: case MY_POSTGRES_COLUMN: case MY_POSTGIS_GEOMETRY: ok = true; break; default: ok = false; break; }; return ok; } void MyVariant::Copy(MyVariant * other) { // // transfers a BLOB value // if (other->Type != MY_BLOB_VARIANT) ................................................................................ // checking for a GPKG Geometry // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString Name; char *sql; char xname[1024]; int ret; int is_virtual = 0; if (table.StartsWith(wxT("vgpkg_")) == true) { wxString clean; table.StartsWith(wxT("vgpkg_"), &clean); table = clean; is_virtual = 1; ................................................................................ // checking for an FDO/OGR Geometry // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString Name; char *sql; char xname[1024]; int ret; int is_virtual = 0; if (table.StartsWith(wxT("fdo_")) == true) { wxString clean; table.StartsWith(wxT("fdo_"), &clean); table = clean; is_virtual = 1; ................................................................................ Geometry = false; GeoPackageGeometry = false; GeoPackageVirtualGeometry = false; FdoOgrGeometry = false; FdoOgrVirtualGeometry = false; Next = NULL; } TableViewItem::TableViewItem(wxString & db, wxString & name) { // constructor DbName = db; Name = name; View = false; Virtual = false; Geometry = false; GeoPackageGeometry = false; GeoPackageVirtualGeometry = false; FdoOgrGeometry = false; FdoOgrVirtualGeometry = false; Next = NULL; } bool TableViewItem::IsPostgresTable(MyPostgres * list) { // testing for some PostgreSQL table or view MyPostgresConn *pC = list->GetFirst(); while (pC != NULL) { MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (Name.Cmp(pT->GetVirtName()) == 0) return true; if (Name.Cmp(pT->GetPostGisName()) == 0) return true; pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { if (Name.Cmp(pV->GetVirtName()) == 0) return true; pV = pV->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } return false; } bool TableViewItem::IsTmpMetadata() { // testing for some TEMPORARY METADATA TABLE if (DbName.Cmp(wxT("temp")) == 0 && (Name.Cmp(wxT("postgis_geometry_columns")) == 0 || Name.Cmp(wxT("tmp_vector_coverages")) == 0)) return true; return false; } TableViewList::TableViewList() { // constructor First = NULL; Last = NULL; Count = 0; ................................................................................ void TableViewList::Add(wxString & name, bool isView, bool isVirtual) { // adding a new item to the list TableViewItem *item = new TableViewItem(name, isView, isVirtual); if (First == NULL) First = item; if (Last != NULL) Last->SetNext(item); Last = item; } void TableViewList::Add(wxString & db, wxString & name) { // adding a new item to the list TableViewItem *item = new TableViewItem(db, name); if (First == NULL) First = item; if (Last != NULL) Last->SetNext(item); Last = item; } static int cmp_tables1(const void *p1, const void *p2) { |
Added Postgres.cpp.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 |
/* / Postgres.cpp / helper functions for PostgreSQL connections / / version 2.1, 2018 May 5 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2018 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/utils.h" #include "wx/filename.h" void MyFrame::GetPQlibVersion(wxString & ver) { // // returns the PQlib (PostgreSQL client) version // int ver_num = vpgPQlibVersion(); int major = ver_num / 10000; int minor = (ver_num - (major * 10000)) / 100; int revision = ver_num - (major * 10000) - (minor * 100); char version[128]; sprintf(version, "%d.%02d.%02d", major, minor, revision); ver = wxString::FromUTF8(version); } bool MyFrame::HasPostgreSqlConnections() { // checks for any current PostgreSQL connection if (PostgresList.GetFirst() == NULL) return false; return true; } void MyFrame::DoLoadLibPQ(wxString & path) { // // attempting to load LibPQ - dynamic late binding // if (DynamicLibPQ.IsLoaded() == true) DynamicLibPQ.Unload(); if (DynamicLibPQ.Load(path, wxDL_QUIET)) { // retievinig the pointers of ALL APIs bool valid = true; bool ok; VirtualPQapi.PQclear = (void (*)(PGresult *)) DynamicLibPQ.GetSymbol(wxT("PQclear"), &ok); if (ok == false) valid = false; VirtualPQapi.PQconnectdb = (PGconn * (*)(const char *conninfo)) DynamicLibPQ.GetSymbol(wxT("PQconnectdb"), &ok); if (ok == false) valid = false; VirtualPQapi.PQerrorMessage = (char *(*)(const PGconn * conn)) DynamicLibPQ.GetSymbol(wxT("PQerrorMessage"), &ok); if (ok == false) valid = false; VirtualPQapi.PQexec = (PGresult * (*)(PGconn * conn, const char *command)) DynamicLibPQ.GetSymbol(wxT("PQexec"), &ok); if (ok == false) valid = false; VirtualPQapi.PQfinish = (void (*)(PGconn * conn)) DynamicLibPQ.GetSymbol(wxT("PQfinish"), &ok); if (ok == false) valid = false; VirtualPQapi.PQgetisnull = (int (*)(const PGresult * res, int row_number, int column_number)) DynamicLibPQ.GetSymbol(wxT("PQgetisnull"), &ok); if (ok == false) valid = false; VirtualPQapi.PQgetvalue = (char *(*)(const PGresult * res, int row_number, int column_number)) DynamicLibPQ.GetSymbol(wxT("PQgetvalue"), &ok); if (ok == false) valid = false; VirtualPQapi.PQlibVersion = (int (*)(void)) DynamicLibPQ.GetSymbol(wxT("PQlibVersion"), &ok); if (ok == false) valid = false; VirtualPQapi.PQnfields = (int (*)(const PGresult * res)) DynamicLibPQ.GetSymbol(wxT("PQnfields"), &ok); if (ok == false) valid = false; VirtualPQapi.PQntuples = (int (*)(const PGresult * res)) DynamicLibPQ.GetSymbol(wxT("PQntuples"), &ok); if (ok == false) valid = false; VirtualPQapi.PQresultStatus = (ExecStatusType(*)(const PGresult * res)) DynamicLibPQ.GetSymbol(wxT("PQresultStatus"), &ok); if (ok == false) valid = false; VirtualPQapi.PQstatus = (ConnStatusType(*)(const PGconn * conn)) DynamicLibPQ.GetSymbol(wxT("PQstatus"), &ok); if (ok == false) valid = false; if (valid == true) { if (virtualpg_extension_init(SqliteHandle, &VirtualPQapi) == SQLITE_OK) { // OK, anything is good PathLibPQ = path; VirtualPQapiOK = true; return; } } } PathLibPQ = wxT(""); } void MyFrame::DoLocateLibPQ(wxString & extpath) { // // attempting to load LibPQ - path selected by the user // int ret; wxString path = wxDynamicLibrary::CanonicalizeName(wxT("libpq")); wxFileName name(path); wxString suffix = wxT("Dynamic Library (*.") + name.GetExt() + wxT(")|*.") + name.GetExt(); wxFileDialog fileDialog(this, wxT("libPQ manual search"), wxT(""), path, suffix, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); DoLoadLibPQ(path); extpath = path; } } void MyFrame::DoPostgreSqlConnection() { // // establishing a connection to PostgreSQL // if (VirtualPQapiOK == false) { // // LibPQ isn't yet loaded // int ret = wxMessageBox(wxT ("The PostgreSQL client library (LibPQ) isn't yet loaded.\n\n" "Do you wish to attempt loading it right now ?"), wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret == wxYES) { // trying to load LibPQ wxString path; DoLocateLibPQ(path); if (VirtualPQapiOK == true) { wxMessageBox(wxT ("The PostgreSQL client library (LibPQ) has been correctly loaded\n\n" "Full PostgreSQL support is now available."), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); goto ok; } if (path.Len() > 0) wxMessageBox(wxT ("Unable to load a valid PostgreSQL client library (LibPQ) from:\n\n") + path + wxT ("\n\nFull PostgreSQL support still continues to be disabled."), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } return; } ok: PostgresConnectionDialog dlg; dlg.Create(this); int ret = dlg.ShowModal(); if (ret == wxID_OK) { char *conninfo = sqlite3_mprintf(" "); char *prev; if (dlg.GetHost() != NULL) { prev = conninfo; conninfo = sqlite3_mprintf("%s host=%s", prev, dlg.GetHost()); sqlite3_free(prev); } if (dlg.GetHostAddr() != NULL) { prev = conninfo; conninfo = sqlite3_mprintf("%s hostaddr=%s", prev, dlg.GetHostAddr()); sqlite3_free(prev); } prev = conninfo; conninfo = sqlite3_mprintf("%s port=%d", prev, dlg.GetPort()); sqlite3_free(prev); if (dlg.GetDbName() != NULL) { prev = conninfo; conninfo = sqlite3_mprintf("%s dbname=%s", prev, dlg.GetDbName()); sqlite3_free(prev); } if (dlg.GetUser() != NULL) { prev = conninfo; conninfo = sqlite3_mprintf("%s user=%s", prev, dlg.GetUser()); sqlite3_free(prev); } if (dlg.GetPassword() != NULL) { prev = conninfo; conninfo = sqlite3_mprintf("%s password=%s", prev, dlg.GetPassword()); sqlite3_free(prev); } wxString host = wxString::FromUTF8(dlg.GetHost()); wxString hostaddr = wxString::FromUTF8(dlg.GetHostAddr()); int port = dlg.GetPort(); wxString dbname = wxString::FromUTF8(dlg.GetDbName()); wxString user = wxString::FromUTF8(dlg.GetUser()); bool readOnly = dlg.IsReadOnly(); bool textDates = dlg.IsTextDates(); bool ret = false; if (DoCheckPostgres(host, hostaddr, port, dbname, user) == true) wxMessageBox(wxT ("A PostgreSQL Connection with the same arguments alreay exists !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); else ret = DoInitPostgres(host, hostaddr, dlg.GetPort(), dbname, user, readOnly, textDates, conninfo + 2); sqlite3_free(conninfo); if (ret) InitTableTree(); } } bool MyFrame::DoCheckPostgres(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user) { // // testing for already existing PostgreSQL connections // MyPostgresConn *pC = PostgresList.GetFirst(); while (pC != NULL) { if (pC->GetHost().Cmp(host) == 0 && pC->GetHostAddr().Cmp(hostaddr) == 0 && pC->GetPort() == port && pC->GetDbName().Cmp(dbname) == 0 && pC->GetUser().Cmp(user) == 0) return true; pC = pC->GetNext(); } return false; } void MyFrame::DoInitVirtualPQapi() { // // initializing the Virtual LibPQ API // #ifdef LIBPQ_DEFERRED /* / not directly linked to libpq / libpq will be eventually loaded only when required (late binding) */ VirtualPQapi.PQclear = NULL; VirtualPQapi.PQconnectdb = NULL; VirtualPQapi.PQerrorMessage = NULL; VirtualPQapi.PQexec = NULL; VirtualPQapi.PQfinish = NULL; VirtualPQapi.PQgetisnull = NULL; VirtualPQapi.PQgetvalue = NULL; VirtualPQapi.PQlibVersion = NULL; VirtualPQapi.PQnfields = NULL; VirtualPQapi.PQntuples = NULL; VirtualPQapi.PQresultStatus = NULL; VirtualPQapi.PQstatus = NULL; VirtualPQapiOK = false; #else /* directly linked to libpq */ VirtualPQapi.PQclear = PQclear; VirtualPQapi.PQconnectdb = PQconnectdb; VirtualPQapi.PQerrorMessage = PQerrorMessage; VirtualPQapi.PQexec = PQexec; VirtualPQapi.PQfinish = PQfinish; VirtualPQapi.PQgetisnull = PQgetisnull; VirtualPQapi.PQgetvalue = PQgetvalue; VirtualPQapi.PQlibVersion = PQlibVersion; VirtualPQapi.PQnfields = PQnfields; VirtualPQapi.PQntuples = PQntuples; VirtualPQapi.PQresultStatus = PQresultStatus; VirtualPQapi.PQstatus = PQstatus; VirtualPQapiOK = false; #endif } void MyFrame::DoInitVirtualPG() { // // attempting to initialize the VirtalPG extension // if (virtualpg_extension_init(SqliteHandle, &VirtualPQapi) == SQLITE_OK) VirtualPQapiOK = true; } bool MyFrame::DoInitPostgres(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly, bool textDates, const char *conninfo) { // // attempting to initialize a PostgreSQL connection // PGconn *pg_conn; PGresult *res; int nRows; int nFields; const char *obj; const char *schema_name; const char *table_name; const char *geometry; const char *type; int srid; int dims; int r; MyPostgresConn *conn; MyPostgresSchema *pS; ::wxBeginBusyCursor(); pg_conn = vpgPQconnectdb(conninfo); if (vpgPQstatus(pg_conn) != CONNECTION_OK) { char *msg = sqlite3_mprintf("Connection to Postgres failed: %s", vpgPQerrorMessage(pg_conn)); wxMessageBox(wxString::FromUTF8(msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(msg); vpgPQfinish(pg_conn); ::wxEndBusyCursor(); return false; } conn = PostgresList.Insert(host, hostaddr, port, dbname, user, readOnly, textDates); // retrieving all PosgreSQL Tables and Views const char *sql = "SELECT 'table' AS obj, t.schemaname, t.tablename, g.f_geometry_column, " "g.type, g.srid, g.coord_dimension " "FROM pg_tables AS t LEFT JOIN geometry_columns AS g ON " "(g.f_table_schema = t.schemaname AND g.f_table_name = t.tablename) " "WHERE t.schemaname NOT IN ('information_schema', 'pg_catalog') " "UNION SELECT 'view' AS obj, schemaname, viewname, '', '', -1, -1 FROM pg_views " "WHERE schemaname NOT IN ('information_schema', 'pg_catalog') " "ORDER BY 1, 2, 3"; res = vpgPQexec(pg_conn, sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto err; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 7) { for (r = 0; r < nRows; r++) { obj = vpgPQgetvalue(res, r, 0); schema_name = vpgPQgetvalue(res, r, 1); table_name = vpgPQgetvalue(res, r, 2); geometry = vpgPQgetvalue(res, r, 3); type = vpgPQgetvalue(res, r, 4); srid = atoi(vpgPQgetvalue(res, r, 5)); dims = atoi(vpgPQgetvalue(res, r, 6)); wxString Schema = wxString::FromUTF8(schema_name); wxString Table = wxString::FromUTF8(table_name); wxString Geometry = wxString::FromUTF8(geometry); wxString Type = wxString::FromUTF8(type); if (strcmp(obj, "view") == 0) conn->Add(Schema, Table); else conn->Add(Schema, Table, Geometry, Type, srid, dims); } } vpgPQclear(res); pS = conn->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { InitPostgresPks(pg_conn, pS, pT); DoCheckGrantPermissions(pg_conn, conn->GetUser(), pS, pT); pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { DoCheckGrantPermissions(pg_conn, conn->GetUser(), pS, pV); pV = pV->GetNext(); } pS = pS->GetNext(); } vpgPQfinish(pg_conn); conn->SetConnectionString(conninfo); DoSetUniqueVirtNames(); DoCreatePostgresTables(); ::wxEndBusyCursor(); return true; err: // something has gone the wrong way if (res != NULL) vpgPQclear(res); vpgPQfinish(pg_conn); ::wxEndBusyCursor(); return false; } void MyFrame::DoSetUniqueVirtNames() { // // ensuring to set Unique Names to all PostgreSQL Tables and Views // wxString baseName; wxString uniqueName; MyPostgresConn *pC = PostgresList.GetFirst(); while (pC != NULL) { MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (pT->GetVirtName().Len() == 0) { baseName = wxT("vpg_") + pT->GetName(); PostgresList.MakeUniqueVirtName(baseName, uniqueName); pT->SetVirtName(uniqueName); } if (pT->GetFirst() != NULL) { if (pT->GetPostGisName().Len() == 0) { baseName = wxT("vpg_") + pT->GetName() + wxT("_postgis"); PostgresList.MakeUniqueVirtName(baseName, uniqueName); pT->SetPostGisName(uniqueName); } } pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { if (pV->GetVirtName().Len() == 0) { baseName = wxT("vpg_") + pV->GetName(); PostgresList.MakeUniqueVirtName(baseName, uniqueName); pV->SetVirtName(uniqueName); } pV = pV->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } } void MyFrame::DoCreatePostgresTables() { // // attempting to create any required PostgreSQL/PostGIS table // char *sql; char *virt_name; char *xvirt_name; char *geom_name; char *geo_type; char *connection_string; char *schema; char *table; int ret; char *errMsg = NULL; MyPostgresConn *pC = PostgresList.GetFirst(); while (pC != NULL) { const char *readOnly = "-"; const char *textDates = "-"; if (pC->IsReadOnly() == false) readOnly = "W"; if (pC->IsTextDates() == false) textDates = "J"; MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { // creating some VirtualPG Table virt_name = (char *) malloc((pT->GetVirtName().Len() * 4) + 1); strcpy(virt_name, pT->GetVirtName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); connection_string = (char *) malloc((pC->GetConnectionString().Len() * 4) + 1); strcpy(connection_string, pC->GetConnectionString().ToUTF8()); schema = (char *) malloc((pS->GetName().Len() * 4) + 1); strcpy(schema, pS->GetName().ToUTF8()); table = (char *) malloc((pT->GetName().Len() * 4) + 1); strcpy(table, pT->GetName().ToUTF8()); sql = sqlite3_mprintf ("CREATE VIRTUAL TABLE IF NOT EXISTS main.\"%s\" " "USING VirtualPostgres(%Q, %Q, %Q, %Q, %Q)", xvirt_name, connection_string, schema, table, readOnly, textDates); free(xvirt_name); free(connection_string); free(schema); free(table); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostgreSQL wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } if (pT->GetFirst() != NULL) { // creating some SpatiaLite-like Spatial View based on a PostgreSQL Table virt_name = (char *) malloc((pT->GetPostGisName().Len() * 4) + 1); strcpy(virt_name, pT->GetPostGisName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); sql = sqlite3_mprintf ("CREATE VIEW IF NOT EXISTS main.\"%s\" AS\n", xvirt_name); free(xvirt_name); sql = DoCreatePostGisSpatialView(pT, sql); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } char a[1024]; char b[1024]; strcpy(a, pS->GetName().ToUTF8()); strcpy(b, pT->GetPostGisName().ToUTF8()); if (pC->IsReadOnly() == false && pT->HasPK() == true && pT->CanInsertUpdateDelete() == true) { // creating all required Triggers so to get a Writable View DoCreatePostGisSpatialViewTriggers(pC, pS, pT); } // registering all Spatial Views MyPostGisGeometry *pG = pT->GetFirst(); while (pG != NULL) { // registering a Spatial View virt_name = (char *) malloc((pT->GetPostGisName().Len() * 4) + 1); strcpy(virt_name, pT->GetPostGisName().ToUTF8()); geom_name = (char *) malloc((pG->GetName().Len() * 4) + 1); strcpy(geom_name, pG->GetName().ToUTF8()); geo_type = (char *) malloc((pG->GetGeomType().Len() * 4) + 1); strcpy(geo_type, pG->GetGeomType().ToUTF8()); sql = sqlite3_mprintf ("INSERT INTO temp.postgis_geometry_columns " "(f_table_name, f_geometry_column, coord_dimension, srid, geometry_type) " "VALUES (%Q, %Q, %d, %d, %Q)", virt_name, geom_name, pG->GetDims(), pG->GetSrid(), geo_type); free(virt_name); free(geom_name); free(geo_type); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostgreSQL wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pG = pG->GetNext(); } } pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { // creating some VirtualPG View virt_name = (char *) malloc((pV->GetVirtName().Len() * 4) + 1); strcpy(virt_name, pV->GetVirtName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); connection_string = (char *) malloc((pC->GetConnectionString().Len() * 4) + 1); strcpy(connection_string, pC->GetConnectionString().ToUTF8()); schema = (char *) malloc((pS->GetName().Len() * 4) + 1); strcpy(schema, pS->GetName().ToUTF8()); table = (char *) malloc((pV->GetName().Len() * 4) + 1); strcpy(table, pV->GetName().ToUTF8()); sql = sqlite3_mprintf ("CREATE VIRTUAL TABLE IF NOT EXISTS main.\"%s\" " "USING VirtualPostgres(%Q, %Q, %Q, '-', textDates)", xvirt_name, connection_string, schema, table, textDates); free(xvirt_name); free(connection_string); free(schema); free(table); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostgreSQL wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pV = pV->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } } char *MyFrame::DoCreatePostGisSpatialView(MyPostgresTable * table, char *prev_sql) { // // auto-writing the CREATE VIEW for some PostGIS geometry // int ret; int i; char **results; int rows; int columns; char *sql = prev_sql; char *prev; char *xtable = (char *) malloc((table->GetVirtName().Len() * 4) + 1); strcpy(xtable, table->GetVirtName().ToUTF8()); char *sql2 = sqlite3_mprintf("PRAGMA table_info(%Q)", xtable); free(xtable); ret = sqlite3_get_table(SqliteHandle, sql2, &results, &rows, &columns, NULL); sqlite3_free(sql2); if (ret != SQLITE_OK) return sql; if (rows < 1) ; else { prev = sql; sql = sqlite3_mprintf("%sSELECT ROWID AS ROWID", prev); sqlite3_free(prev); for (i = 1; i <= rows; i++) { prev = sql; const char *name = results[(i * columns) + 1]; char *xname = gaiaDoubleQuotedSql(name); wxString col = wxString::FromUTF8(name); MyPostGisGeometry *geom = table->Find(col); if (geom != NULL) { if (geom->IsMultiType() == true) sql = sqlite3_mprintf ("%s, CastToMulti(GeomFromEWKB(\"%s\")) AS \"%s\"", prev, xname, xname); else sql = sqlite3_mprintf("%s, GeomFromEWKB(\"%s\") AS \"%s\"", prev, xname, xname); } else { sql = sqlite3_mprintf("%s, \"%s\" AS \"%s\"", prev, xname, xname); } free(xname); sqlite3_free(prev); } } sqlite3_free_table(results); prev = sql; xtable = (char *) malloc((table->GetVirtName().Len() * 4) + 1); strcpy(xtable, table->GetVirtName().ToUTF8()); char *xxtable = gaiaDoubleQuotedSql(xtable); free(xtable); sql = sqlite3_mprintf("%s\nFROM MAIN.\"%s\"", prev, xxtable); free(xxtable); sqlite3_free(prev); return sql; } void MyFrame::DoCheckGrantPermissions(void *conn, wxString & user, MyPostgresSchema * schema, MyPostgresTable * table) { // // testing Grant permissions for some PostgreSQL Table or View // PGconn *pg_conn = (PGconn *) conn; PGresult *res; int nRows; int nFields; int r; bool canSelect = false; bool canInsert = false; bool canUpdate = false; bool canDelete = false; bool canInsertUpdateDelete = false; char *cuser = (char *) malloc(user.Len() * 4 + 1); strcpy(cuser, user.ToUTF8()); char *cschema = (char *) malloc(schema->GetName().Len() * 4 + 1); strcpy(cschema, schema->GetName().ToUTF8()); char *ctable = (char *) malloc(table->GetName().Len() * 4 + 1); strcpy(ctable, table->GetName().ToUTF8()); char *name = sqlite3_mprintf("%s.%s", cschema, ctable); // testing for SELECT char *sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'select')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canSelect = true; } } vpgPQclear(res); res = NULL; // testing for INSERT sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'insert')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canInsert = true; } } vpgPQclear(res); res = NULL; // testing for UPDATE sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'update')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canUpdate = true; } } vpgPQclear(res); res = NULL; // testing for DELETE sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'delete')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canDelete = true; } } vpgPQclear(res); res = NULL; if (canInsert == true && canUpdate == true && canDelete == true) canInsertUpdateDelete = true; table->SetGrants(canSelect, canInsertUpdateDelete); end: if (res != NULL) vpgPQclear(res); free(cuser); free(cschema); free(ctable); sqlite3_free(name); } void MyFrame::DoCheckGrantPermissions(void *conn, wxString & user, MyPostgresSchema * schema, MyPostgresView * view) { // // testing Grant permissions for some PostgreSQL Table or View // PGconn *pg_conn = (PGconn *) conn; PGresult *res; int nRows; int nFields; int r; bool canSelect = false; bool canInsert = false; bool canUpdate = false; bool canDelete = false; bool canInsertUpdateDelete = false; char *cuser = (char *) malloc(user.Len() * 4 + 1); strcpy(cuser, user.ToUTF8()); char *cschema = (char *) malloc(schema->GetName().Len() * 4 + 1); strcpy(cschema, schema->GetName().ToUTF8()); char *ctable = (char *) malloc(view->GetName().Len() * 4 + 1); strcpy(ctable, view->GetName().ToUTF8()); char *name = sqlite3_mprintf("%s.%s", cschema, ctable); // testing for SELECT char *sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'select')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canSelect = true; } } vpgPQclear(res); res = NULL; // testing for INSERT sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'insert')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canInsert = true; } } vpgPQclear(res); res = NULL; // testing for UPDATE sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'update')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canUpdate = true; } } vpgPQclear(res); res = NULL; // testing for DELETE sql = sqlite3_mprintf("SELECT has_table_privilege(%Q, %Q, 'delete')", cuser, name); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto end; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *permission = vpgPQgetvalue(res, r, 0); if (strcmp(permission, "t") == 0) canDelete = true; } } vpgPQclear(res); res = NULL; if (canInsert == true && canUpdate == true && canDelete == true) canInsertUpdateDelete = true; view->SetGrants(canSelect, canInsertUpdateDelete); end: if (res != NULL) vpgPQclear(res); free(cuser); free(cschema); free(ctable); sqlite3_free(name); } void MyFrame::DoCreatePostGisSpatialViewTriggers(MyPostgresConn * conn, MyPostgresSchema * schema, MyPostgresTable * table) { // // auto-writing the CREATE TRIGGERS for some PostGIS geometry (writable view) // char *sql; char *prev; char *ctrigger; char *xtrigger; char *ctable; char *xtable; char *cview; char *xview; char name[1024]; char *xname; char *where; int first; MyPostgresCol *pC; MyPostgresColumns *cols; char *errMsg = NULL; int ret; InitPostgresPkColumns(conn, schema, table); cols = DoGetPostgresColumns(table); // preparing the INSERT Trigger ctable = (char *) malloc(table->GetVirtName().Len() * 4 + 1); strcpy(ctable, table->GetVirtName().ToUTF8()); xtable = gaiaDoubleQuotedSql(ctable); free(ctable); cview = (char *) malloc(table->GetPostGisName().Len() * 4 + 1); strcpy(cview, table->GetPostGisName().ToUTF8()); xview = gaiaDoubleQuotedSql(cview); ctrigger = sqlite3_mprintf("%s_trgins", cview); free(cview); xtrigger = gaiaDoubleQuotedSql(ctrigger); sqlite3_free(ctrigger); sql = sqlite3_mprintf("CREATE TRIGGER \"%s\"\n\tINSTEAD OF " "INSERT ON \"%s\"\nBEGIN\n\tINSERT OR REPLACE INTO \"%s\"\n\t\t(", xtrigger, xview, xtable); free(xtrigger); free(xtable); free(xview); pC = cols->GetFirst(); first = 1; while (pC != NULL) { prev = sql; if (first) { first = 0; strcpy(name, pC->GetName().ToUTF8()); xname = gaiaDoubleQuotedSql(name); sql = sqlite3_mprintf("%s\"%s\"", prev, xname); free(xname); } else { strcpy(name, pC->GetName().ToUTF8()); xname = gaiaDoubleQuotedSql(name); sql = sqlite3_mprintf("%s, \"%s\"", prev, xname); free(xname); } sqlite3_free(prev); pC = pC->GetNext(); } prev = sql; sql = sqlite3_mprintf("%s)\n\tVALUES (", prev); sqlite3_free(prev); pC = cols->GetFirst(); first = 1; while (pC != NULL) { strcpy(name, pC->GetName().ToUTF8()); xname = gaiaDoubleQuotedSql(name); MyPostGisGeometry *geom = table->Find(pC->GetName()); prev = sql; if (first) { first = 0; if (geom != NULL) sql = sqlite3_mprintf("%sAsEWKB(NEW.\"%s\")", prev, xname); else sql = sqlite3_mprintf("%sNEW.\"%s\"", prev, xname); } else { if (geom != NULL) sql = sqlite3_mprintf("%s, AsEWKB(NEW.\"%s\")", prev, xname); else sql = sqlite3_mprintf("%s, NEW.\"%s\"", prev, xname); } free(xname); sqlite3_free(prev); pC = pC->GetNext(); } prev = sql; sql = sqlite3_mprintf("%s);\nEND", prev); sqlite3_free(prev); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TRIGGER error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } // preparing the UPDATE Trigger ctable = (char *) malloc(table->GetVirtName().Len() * 4 + 1); strcpy(ctable, table->GetVirtName().ToUTF8()); xtable = gaiaDoubleQuotedSql(ctable); free(ctable); cview = (char *) malloc(table->GetPostGisName().Len() * 4 + 1); strcpy(cview, table->GetPostGisName().ToUTF8()); xview = gaiaDoubleQuotedSql(cview); ctrigger = sqlite3_mprintf("%s_trgupd", cview); free(cview); xtrigger = gaiaDoubleQuotedSql(ctrigger); sqlite3_free(ctrigger); sql = sqlite3_mprintf("CREATE TRIGGER \"%s\"\n\tINSTEAD OF " "UPDATE OF ", xtrigger); free(xtrigger); pC = cols->GetFirst(); first = 1; while (pC != NULL) { strcpy(name, pC->GetName().ToUTF8()); xname = gaiaDoubleQuotedSql(name); prev = sql; if (first) { first = 0; sql = sqlite3_mprintf("%s\"%s\"", prev, xname); } else sql = sqlite3_mprintf("%s, \"%s\"", prev, xname); free(xname); sqlite3_free(prev); pC = pC->GetNext(); } prev = sql; sql = sqlite3_mprintf("%s\n\tON \"%s\"\nBEGIN\n\tUPDATE \"%s\" SET ", prev, xview, xtable); sqlite3_free(prev); free(xtable); free(xview); pC = cols->GetFirst(); first = 1; while (pC != NULL) { strcpy(name, pC->GetName().ToUTF8()); xname = gaiaDoubleQuotedSql(name); MyPostGisGeometry *geom = table->Find(pC->GetName()); prev = sql; if (first) { first = 0; if (geom != NULL) sql = sqlite3_mprintf("%s\"%s\" = AsEWKB(NEW.\"%s\")", prev, xname, xname); else sql = sqlite3_mprintf("%s\"%s\" = NEW.\"%s\"", prev, xname, xname); } else { if (geom != NULL) sql = sqlite3_mprintf("%s, \"%s\" = AsEWKB(NEW.\"%s\")", prev, xname, xname); else sql = sqlite3_mprintf("%s, \"%s\" = NEW.\"%s\"", prev, xname, xname); } free(xname); sqlite3_free(prev); pC = pC->GetNext(); } prev = sql; where = cols->BuildWhere(); sql = sqlite3_mprintf("%s\n\t%s;\nEND", prev, where); sqlite3_free(prev); sqlite3_free(where); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TRIGGER error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } // preparing the DELETE Trigger ctable = (char *) malloc(table->GetVirtName().Len() * 4 + 1); strcpy(ctable, table->GetVirtName().ToUTF8()); xtable = gaiaDoubleQuotedSql(ctable); free(ctable); cview = (char *) malloc(table->GetPostGisName().Len() * 4 + 1); strcpy(cview, table->GetPostGisName().ToUTF8()); xview = gaiaDoubleQuotedSql(cview); ctrigger = sqlite3_mprintf("%s_trgdel", cview); free(cview); xtrigger = gaiaDoubleQuotedSql(ctrigger); sqlite3_free(ctrigger); where = cols->BuildWhere(); sql = sqlite3_mprintf("CREATE TRIGGER \"%s\"\n\tINSTEAD OF " "DELETE ON \"%s\"\nBEGIN\n\tDELETE FROM \"%s\" %s;\nEND", xtrigger, xview, xtable, where); sqlite3_free(where); free(xtrigger); free(xtable); free(xview); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TRIGGER error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } delete cols; } MyPostgresColumns *MyFrame::DoGetPostgresColumns(MyPostgresTable * table) { // // fetching all Columns for a given VirtualPG Table // MyPostgresColumns *cols = NULL; int ret; int i; char **results; int rows; int columns; char *xtable = (char *) malloc((table->GetVirtName().Len() * 4) + 1); strcpy(xtable, table->GetVirtName().ToUTF8()); char *sql = sqlite3_mprintf("PRAGMA table_info(%Q)", xtable); free(xtable); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return NULL; if (rows < 1) ; else { cols = new MyPostgresColumns(); for (i = 1; i <= rows; i++) { const char *name = results[(i * columns) + 1]; wxString sName = wxString::FromUTF8(name); cols->Add(sName); } } sqlite3_free_table(results); MyPostgresPK *pK = table->GetFirstPK(); while (pK != NULL) { // marking all PK Columns cols->SetPK(pK->GetName()); pK = pK->GetNext(); } if (cols->GetFirst() == NULL) { // empyt list !!! delete cols; return NULL; } return cols; } void MyFrame::DoDropPostgresTables() { // // attempting to drop any PostgreSQL/PostGIS table // char *sql; char *virt_name; char *xvirt_name; char *geom_name; int ret; char *errMsg = NULL; MyPostgresConn *pC = PostgresList.GetFirst(); while (pC != NULL) { MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (pT->GetFirst() != NULL) { // dropping some SpatiaLite-like Spatial View based on a PostgreSQL Table virt_name = (char *) malloc((pT->GetPostGisName().Len() * 4) + 1); strcpy(virt_name, pT->GetPostGisName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); sql = sqlite3_mprintf("DROP VIEW IF EXISTS main.\"%s\"", xvirt_name); free(xvirt_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } MyPostGisGeometry *pG = pT->GetFirst(); while (pG != NULL) { // removing from POSTGIS_GEOMETRY_COLUMNS virt_name = (char *) malloc((pT->GetPostGisName().Len() * 4) + 1); strcpy(virt_name, pT->GetPostGisName().ToUTF8()); geom_name = (char *) malloc((pG->GetName().Len() * 4) + 1); strcpy(geom_name, pG->GetName().ToUTF8()); sql = sqlite3_mprintf ("DELETE FROM temp.postgis_geometry_columns " "WHERE f_table_name = %Q AND f_geometry_column = %Q", virt_name, geom_name); free(virt_name); free(geom_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pG = pG->GetNext(); } } // dropping some VirtualPG Table virt_name = (char *) malloc((pT->GetVirtName().Len() * 4) + 1); strcpy(virt_name, pT->GetVirtName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); sql = sqlite3_mprintf("DROP TABLE IF EXISTS main.\"%s\"", xvirt_name); free(xvirt_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostgreSQL wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { // dropping some VirtualPG View virt_name = (char *) malloc((pV->GetVirtName().Len() * 4) + 1); strcpy(virt_name, pV->GetVirtName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); sql = sqlite3_mprintf("DROP TABLE IF EXISTS main.\"%s\"", xvirt_name); free(xvirt_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostgreSQL wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pV = pV->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } } bool MyFrame::DoClosePostgreSqlConn(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user) { // // attempting to close a single connection to PostgreSQL // char *sql; char *virt_name; char *xvirt_name; char *geom_name; int ret; char *errMsg = NULL; MyPostgresConn *conn = NULL; MyPostgresConn *pC = PostgresList.GetFirst(); while (pC != NULL) { if (pC->GetHost().Cmp(host) == 0 && pC->GetHostAddr().Cmp(hostaddr) == 0 && pC->GetPort() == port && pC->GetDbName().Cmp(dbname) == 0 && pC->GetUser().Cmp(user) == 0) conn = pC; pC = pC->GetNext(); } if (conn == NULL) return false; pC = conn; MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (pT->GetFirst() != NULL) { // dropping some SpatiaLite-like Spatial View based on a PostgreSQL Table virt_name = (char *) malloc((pT->GetPostGisName().Len() * 4) + 1); strcpy(virt_name, pT->GetPostGisName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); sql = sqlite3_mprintf("DROP VIEW IF EXISTS main.\"%s\"", xvirt_name); free(xvirt_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } MyPostGisGeometry *pG = pT->GetFirst(); while (pG != NULL) { // removing from POSTGIS_GEOMETRY_COLUMNS virt_name = (char *) malloc((pT->GetPostGisName().Len() * 4) + 1); strcpy(virt_name, pT->GetPostGisName().ToUTF8()); geom_name = (char *) malloc((pG->GetName().Len() * 4) + 1); strcpy(geom_name, pG->GetName().ToUTF8()); sql = sqlite3_mprintf("DELETE FROM temp.postgis_geometry_columns " "WHERE f_table_name = %Q AND f_geometry_column = %Q", virt_name, geom_name); free(virt_name); free(geom_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pG = pG->GetNext(); } } // dropping some VirtualPG Table virt_name = (char *) malloc((pT->GetVirtName().Len() * 4) + 1); strcpy(virt_name, pT->GetVirtName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); sql = sqlite3_mprintf("DROP TABLE IF EXISTS main.\"%s\"", xvirt_name); free(xvirt_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostgreSQL wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { // dropping some VirtualPG View virt_name = (char *) malloc((pV->GetVirtName().Len() * 4) + 1); strcpy(virt_name, pV->GetVirtName().ToUTF8()); xvirt_name = gaiaDoubleQuotedSql(virt_name); free(virt_name); sql = sqlite3_mprintf("DROP TABLE IF EXISTS main.\"%s\"", xvirt_name); free(xvirt_name); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostgreSQL wrapper: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } pV = pV->GetNext(); } pS = pS->GetNext(); } // removing the connection from the list PostgresList.Remove(conn); return true; } bool MyFrame::DoCheckPostGisGeometry(wxString & virtName, wxString & columnName) { // // checking for a PostGIS Geometry column (wrapping View) // MyPostgresConn *pC = PostgresList.GetFirst(); while (pC != NULL) { MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (pT->GetPostGisName().Cmp(virtName) == 0) { MyPostGisGeometry *pG = pT->GetFirst(); while (pG != NULL) { if (pG->GetName().Cmp(columnName) == 0) return true; pG = pG->GetNext(); } } pT = pT->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } return false; } void MyFrame::InitPostgresPkColumns(MyPostgresConn * conn, MyPostgresSchema * schema, MyPostgresTable * table) { // // attempting to initialize the PK columns for a PostgreSQL Table // PGconn *pg_conn; PGresult *res; int nRows; int nFields; const char *obj; const char *schema_name; const char *table_name; const char *geometry; const char *type; int r; char *connection_string; if (table->IsPkAlreadyChecked() == true) return; // already initialized // attempting to establish a connection to Postgres connection_string = (char *) malloc((conn->GetConnectionString().Len() * 4) + 1); strcpy(connection_string, conn->GetConnectionString().ToUTF8()); pg_conn = vpgPQconnectdb(connection_string); if (vpgPQstatus(pg_conn) != CONNECTION_OK) { char *msg = sqlite3_mprintf("Connection to Postgres failed: %s", vpgPQerrorMessage(pg_conn)); wxMessageBox(wxString::FromUTF8(msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(msg); vpgPQfinish(pg_conn); free(connection_string); return; } free(connection_string); // querying the PK columns char *pg_schema = (char *) malloc(schema->GetName().Len() * 4 + 1); strcpy(pg_schema, schema->GetName().ToUTF8()); char *pg_table = (char *) malloc(table->GetName().Len() * 4 + 1); strcpy(pg_table, table->GetName().ToUTF8()); char *sql = sqlite3_mprintf ("SELECT a.attname FROM pg_index AS i " "JOIN pg_attribute AS a ON (a.attrelid = i.indrelid AND a.attnum = ANY(i.indkey)) " "WHERE i.indrelid = '%s.%s'::regclass AND i.indisprimary", pg_schema, pg_table); free(pg_schema); free(pg_table); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) goto err; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *col_name = vpgPQgetvalue(res, r, 0); wxString column = wxString::FromUTF8(col_name); table->AddPK(column); } } vpgPQclear(res); vpgPQfinish(pg_conn); table->SetPkChecked(); return; err: // something has gone the wrong way if (res != NULL) vpgPQclear(res); vpgPQfinish(pg_conn); } void MyFrame::InitPostgresPks(void *conn, MyPostgresSchema * schema, MyPostgresTable * table) { // // attempting to initialize the PK columns for a PostgreSQL Table // PGconn *pg_conn = (PGconn *) conn; PGresult *res; int nRows; int nFields; const char *obj; const char *schema_name; const char *table_name; const char *geometry; const char *type; int r; char *connection_string; if (table->IsPkAlreadyChecked() == true) return; // already initialized // querying the PK columns char *pg_schema = (char *) malloc(schema->GetName().Len() * 4 + 1); strcpy(pg_schema, schema->GetName().ToUTF8()); char *pg_table = (char *) malloc(table->GetName().Len() * 4 + 1); strcpy(pg_table, table->GetName().ToUTF8()); char *sql = sqlite3_mprintf ("SELECT a.attname FROM pg_index AS i " "JOIN pg_attribute AS a ON (a.attrelid = i.indrelid AND a.attnum = ANY(i.indkey)) " "WHERE i.indrelid = '%s.%s'::regclass AND i.indisprimary", pg_schema, pg_table); free(pg_schema); free(pg_table); res = vpgPQexec(pg_conn, sql); sqlite3_free(sql); if (vpgPQresultStatus(res) != PGRES_TUPLES_OK) return; nRows = vpgPQntuples(res); nFields = vpgPQnfields(res); if (nRows > 0 && nFields == 1) { for (r = 0; r < nRows; r++) { const char *col_name = vpgPQgetvalue(res, r, 0); wxString column = wxString::FromUTF8(col_name); table->AddPK(column); } } vpgPQclear(res); table->SetPkChecked(); } char *MyFrame::DropPostgreSqlOrphans() { // // attempting to Drop all PostgreSql Orphans // int ret; int i; char **results; int rows; int columns; char *errMsg = NULL; int first = 1; char *sql_statement = NULL; char *prev; bool ok = false; // fetching all candidate Tables const char *sql = "SELECT name FROM sqlite_master " "WHERE type = 'table' AND name LIKE 'vpg_%' AND sql LIKE '%Using VirtualPostgres%'"; ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) goto error; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *name = results[(i * columns) + 0]; wxString xName = wxString::FromUTF8(name); if (PostgresList.FindTable(NULL, xName) == NULL) { // found an Orphan Table - to be dropped char *x_name = gaiaDoubleQuotedSql(name); if (first) { first = 0; sql_statement = sqlite3_mprintf("BEGIN;\n;DROP TABLE MAIN.\"%s\";\n", x_name); } else { prev = sql_statement; sql_statement = sqlite3_mprintf("%sDROP TABLE MAIN.\"%s\";\n", prev, x_name); sqlite3_free(prev); } free(x_name); ok = true; } } } sqlite3_free_table(results); // fetching all candidate Views sql = "SELECT name FROM sqlite_master " "WHERE type = 'view' AND name LIKE 'vpg_%' AND sql LIKE '%GeomFromEWKB%'"; ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) goto error; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *name = results[(i * columns) + 0]; wxString xName = wxString::FromUTF8(name); if (PostgresList.FindPostGisView(NULL, xName) == NULL) { // found an Orphan View - to be dropped char *x_name = gaiaDoubleQuotedSql(name); if (first) { first = 0; sql_statement = sqlite3_mprintf("BEGIN;\n;DROP VIEW MAIN.\"%s\";\n", x_name); } else { prev = sql_statement; sql_statement = sqlite3_mprintf("%sDROP VIEW MAIN.\"%s\";\n", prev, x_name); sqlite3_free(prev); } free(x_name); ok = true; } } } sqlite3_free_table(results); if (ok == false) return NULL; // committing the transaction prev = sql_statement; sql_statement = sqlite3_mprintf("%sCOMMIT;\n", prev); sqlite3_free(prev); return sql_statement; error: wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return NULL; } bool PostgresConnectionDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; if (wxDialog::Create(parent, wxID_ANY, wxT("Connecting to PostgreSQL")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void PostgresConnectionDialog::CreateControls() { // // creating individual control and setting initial values // wxString user = wxGetUserId(); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: HOST wxBoxSizer *hostSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(hostSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *hostLabel = new wxStaticText(this, wxID_STATIC, wxT("Host Name")); hostSizer->Add(hostLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *hostCtrl = new wxTextCtrl(this, ID_POSTGRES_HOST, wxT("localhost"), wxDefaultPosition, wxSize(250, 22)); hostSizer->Add(hostCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // second row: HOSTADDR wxBoxSizer *addrSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(addrSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *addrLabel = new wxStaticText(this, wxID_STATIC, wxT("Host Address")); addrSizer->Add(addrLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *addrCtrl = new wxTextCtrl(this, ID_POSTGRES_HOSTADDR, wxT("127.0.0.1"), wxDefaultPosition, wxSize(250, 22)); addrSizer->Add(addrCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // third row: PORT wxBoxSizer *portSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(portSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *portLabel = new wxStaticText(this, wxID_STATIC, wxT("Port:")); portSizer->Add(portLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *portCtrl = new wxSpinCtrl(this, ID_POSTGRES_PORT, wxT("5432"), wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, 0, 65535, 5432); portSizer->Add(portCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: DBNAME wxBoxSizer *dbSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(dbSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *dbLabel = new wxStaticText(this, wxID_STATIC, wxT("DB Name")); dbSizer->Add(dbLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dbCtrl = new wxTextCtrl(this, ID_POSTGRES_DBNAME, user, wxDefaultPosition, wxSize(250, 22)); dbSizer->Add(dbCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // fifth row: USER wxBoxSizer *userSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(userSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *userLabel = new wxStaticText(this, wxID_STATIC, wxT("User")); userSizer->Add(userLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *userCtrl = new wxTextCtrl(this, ID_POSTGRES_USER, user, wxDefaultPosition, wxSize(250, 22)); userSizer->Add(userCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // sixth row: PASSWORD wxBoxSizer *pwdSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pwdSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *pwdLabel = new wxStaticText(this, wxID_STATIC, wxT("Password")); pwdSizer->Add(pwdLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pwdCtrl = new wxTextCtrl(this, ID_POSTGRES_PASSWORD, wxT(""), wxDefaultPosition, wxSize(250, 22), wxTE_PASSWORD); pwdSizer->Add(pwdCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // seventh row: Options wxBoxSizer *optSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString rdonly[2]; rdonly[0] = wxT("Read Only"); rdonly[1] = wxT("Read && Write"); wxRadioBox *rdonly_sel = new wxRadioBox(this, ID_POSTGRES_RDONLY, wxT("Connection Mode"), wxDefaultPosition, wxDefaultSize, 2, rdonly, 2, wxRA_SPECIFY_ROWS); rdonly_sel->SetSelection(0); optSizer->Add(rdonly_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString textdates[2]; textdates[0] = wxT("as Julian Day numbers"); textdates[1] = wxT("as PlainText strings"); wxRadioBox *textdates_sel = new wxRadioBox(this, ID_POSTGRES_TEXTDATES, wxT("&DATE/TIME values"), wxDefaultPosition, wxDefaultSize, 2, textdates, 2, wxRA_SPECIFY_ROWS); textdates_sel->SetSelection(1); optSizer->Add(textdates_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Connect")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & PostgresConnectionDialog::OnOk); } void PostgresConnectionDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *hostCtrl = (wxTextCtrl *) FindWindow(ID_POSTGRES_HOST); wxTextCtrl *addrCtrl = (wxTextCtrl *) FindWindow(ID_POSTGRES_HOSTADDR); wxSpinCtrl *portCtrl = (wxSpinCtrl *) FindWindow(ID_POSTGRES_PORT); wxTextCtrl *dbCtrl = (wxTextCtrl *) FindWindow(ID_POSTGRES_DBNAME); wxTextCtrl *userCtrl = (wxTextCtrl *) FindWindow(ID_POSTGRES_USER); wxTextCtrl *pwdCtrl = (wxTextCtrl *) FindWindow(ID_POSTGRES_PASSWORD); wxRadioBox *rdonly_sel = (wxRadioBox *) FindWindow(ID_POSTGRES_RDONLY); wxRadioBox *textdates_sel = (wxRadioBox *) FindWindow(ID_POSTGRES_TEXTDATES); wxString value = hostCtrl->GetValue(); if (host != NULL) free(host); if (value.Len() == 0) host = NULL; else { host = (char *) malloc(value.Len() * 4 + 1); strcpy(host, value.ToUTF8()); } value = addrCtrl->GetValue(); if (hostaddr != NULL) free(hostaddr); if (value.Len() == 0) hostaddr = NULL; else { hostaddr = (char *) malloc(value.Len() * 4 + 1); strcpy(hostaddr, value.ToUTF8()); } port = portCtrl->GetValue(); value = dbCtrl->GetValue(); if (dbname != NULL) free(dbname); if (value.Len() == 0) dbname = NULL; else { dbname = (char *) malloc(value.Len() * 4 + 1); strcpy(dbname, value.ToUTF8()); } value = userCtrl->GetValue(); if (user != NULL) free(user); if (value.Len() == 0) user = NULL; else { user = (char *) malloc(value.Len() * 4 + 1); strcpy(user, value.ToUTF8()); } value = pwdCtrl->GetValue(); if (password != NULL) free(password); if (value.Len() == 0) password = NULL; else { password = (char *) malloc(value.Len() * 4 + 1); strcpy(password, value.ToUTF8()); } if (rdonly_sel->GetSelection() == 0) ReadOnly = true; else ReadOnly = false; if (textdates_sel->GetSelection() == 0) TextDates = false; else TextDates = true; wxDialog::EndModal(wxID_OK); } MyPostGisGeometry::MyPostGisGeometry(wxString & name, wxString & type, int srid, int dims) { // ctor Name = name; GeomType = type; MultiType = false; Srid = srid; Dims = dims; if (type.Len() == 0) return; if (type.Cmp(wxT("MULTIPOINT")) == 0) MultiType = true; if (type.Cmp(wxT("MULTILINESTRING")) == 0) MultiType = true; if (type.Cmp(wxT("MULTIPOLYGON")) == 0) MultiType = true; Next = NULL; } MyPostgresTable::MyPostgresTable(wxString & name) { // ctor Name = name; PkChecked = false; GrantSelect = false; GrantInsertUpdateDelete = false; FirstPK = NULL; LastPK = NULL; First = NULL; Last = NULL; Next = NULL; } MyPostgresTable::~MyPostgresTable() { // dtor MyPostGisGeometry *pG; MyPostGisGeometry *pGn; MyPostgresPK *pK; MyPostgresPK *pKn; pG = First; while (pG != NULL) { pGn = pG->GetNext(); delete pG; pG = pGn; } pK = FirstPK; while (pK != NULL) { pKn = pK->GetNext(); delete pK; pK = pKn; } } void MyPostgresTable::AddPK(wxString & name) { // adding a PostgreSQL PK column MyPostgresPK *pK = FirstPK; while (pK != NULL) { if (pK->GetName().Cmp(name) == 0) return; // already defined pK = pK->GetNext(); } // inserting a new PostgreSQL PK column pK = new MyPostgresPK(name); if (FirstPK == NULL) FirstPK = pK; if (LastPK != NULL) LastPK->SetNext(pK); LastPK = pK; } void MyPostgresTable::Add(wxString & geometry, wxString & type, int srid, int dims) { // // adding a PostGIS geometry to a Table // bool is_multi = false; if (type.Len() == 0) return; if (type.Cmp(wxT("MULTIPOINT")) == 0) is_multi = true; if (type.Cmp(wxT("MULTILINESTRING")) == 0) is_multi = true; if (type.Cmp(wxT("MULTIPOLYGON")) == 0) is_multi = true; if (geometry.Len() == 0) return; MyPostGisGeometry *pG = First; while (pG != NULL) { if (pG->GetName().Cmp(geometry) == 0) return; // already defined pG = pG->GetNext(); } // inserting a new PostGIS geometry pG = new MyPostGisGeometry(geometry, type, srid, dims); if (First == NULL) First = pG; if (Last != NULL) Last->SetNext(pG); Last = pG; } bool MyPostgresTable::IsPkColumn(wxString & name) { // checks if a PostgreSQL Column is a PK column MyPostgresPK *pK = FirstPK; while (pK != NULL) { if (pK->GetName().Cmp(name) == 0) return true; pK = pK->GetNext(); } return false; } bool MyPostgresTable::HasPK() { // checks if a PostgreSQL Table has any PK column if (FirstPK == NULL) return false; return true; } MyPostGisGeometry *MyPostgresTable::Find(wxString & name) { // attempting to find a Geometry Column MyPostGisGeometry *pG = First; while (pG != NULL) { if (pG->GetName().Cmp(name) == 0) return pG; pG = pG->GetNext(); } return NULL; } MyPostgresView::MyPostgresView(wxString & name) { // ctor Name = name; GrantSelect = false; GrantInsertUpdateDelete = false; Next = NULL; } MyPostgresSchema::MyPostgresSchema(wxString & name) { // ctor Name = name; FirstTable = NULL; LastTable = NULL; CurrentTable = NULL; FirstView = NULL; LastView = NULL; Next = NULL; } MyPostgresSchema::~MyPostgresSchema() { // dtor MyPostgresTable *pT; MyPostgresTable *pTn; MyPostgresView *pV; MyPostgresView *pVn; pT = FirstTable; while (pT != NULL) { pTn = pT->GetNext(); delete pT; pT = pTn; } pV = FirstView; while (pV != NULL) { pVn = pV->GetNext(); delete pV; pV = pVn; } } void MyPostgresSchema::Add(wxString & name, wxString & geometry, wxString & type, int srid, int dims) { // // adding a Table to a Schema // MyPostgresTable *pT = CurrentTable; if (pT != NULL) { if (pT->GetName().Cmp(name) == 0) { // continuing with the current table if (geometry.Len() > 0 && type.Len() > 0) pT->Add(geometry, type, srid, dims); return; } } pT = FirstTable; while (pT != NULL) { if (pT->GetName().Cmp(name) == 0) { // already defined if (geometry.Len() > 0 && type.Len() > 0) pT->Add(geometry, type, srid, dims); return; } pT = pT->GetNext(); } // adding a new Table pT = new MyPostgresTable(name); if (geometry.Len() > 0 && type.Len() > 0) pT->Add(geometry, type, srid, dims); if (FirstTable == NULL) FirstTable = pT; if (LastTable != NULL) LastTable->SetNext(pT); LastTable = pT; CurrentTable = pT; } void MyPostgresSchema::Add(wxString & name) { // // adding a View to a Schema // MyPostgresView *pV = FirstView; while (pV != NULL) { if (pV->GetName().Cmp(name) == 0) return; // already defined pV = pV->GetNext(); } // adding a new View pV = new MyPostgresView(name); if (FirstView == NULL) FirstView = pV; if (LastView != NULL) LastView->SetNext(pV); LastView = pV; } MyPostgresConn::MyPostgresConn(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly, bool textDates) { // ctor Host = host; HostAddr = hostaddr; Port = port; DbName = dbname; User = user; ReadOnly = readOnly; TextDates = textDates; First = NULL; Last = NULL; Current = NULL; Prev = NULL; Next = NULL; } MyPostgresConn::~MyPostgresConn() { // dtor MyPostgresSchema *pS; MyPostgresSchema *pSn; pS = First; while (pS != NULL) { pSn = pS->GetNext(); delete pS; pS = pSn; } } void MyPostgresConn::Add(wxString & schema, wxString & table, wxString & geometry, wxString & type, int srid, int dims) { // // adding a Table to a PostgreSQL connection // MyPostgresSchema *pS = Current; if (pS != NULL) { if (pS->GetName().Cmp(schema) == 0) { // continuing with the current Schema pS->Add(table, geometry, type, srid, dims); return; } } pS = First; while (pS != NULL) { if (pS->GetName().Cmp(schema) == 0) { // the Schema is already defined pS->Add(table, geometry, type, srid, dims); return; } pS = pS->GetNext(); } // adding a new Schema pS = new MyPostgresSchema(schema); pS->Add(table, geometry, type, srid, dims); if (First == NULL) First = pS; if (Last != NULL) Last->SetNext(pS); Last = pS; Current = pS; } void MyPostgresConn::Add(wxString & schema, wxString & view) { // // adding a View to a PostgreSQL connection // MyPostgresSchema *pS = Current; if (pS != NULL) { if (pS->GetName().Cmp(schema) == 0) { // continuing with the current Schema pS->Add(view); return; } pS = pS->GetNext(); } pS = First; while (pS != NULL) { if (pS->GetName().Cmp(schema) == 0) { // the Schema is already defined pS->Add(view); return; } pS = pS->GetNext(); } // adding a new Schema pS = new MyPostgresSchema(schema); pS->Add(view); if (First == NULL) First = pS; if (Last != NULL) Last->SetNext(pS); Last = pS; Current = pS; } void MyPostgres::Clear() { // // memory cleanup - clearing a MyPostgres object // MyPostgresConn *pC; MyPostgresConn *pCn; pC = First; while (pC != NULL) { pCn = pC->GetNext(); delete pC; pC = pCn; } First = NULL; Last = NULL; Current = NULL; } MyPostgresConn *MyPostgres::Insert(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user, bool readOnly, bool textDates) { // // inserting into the list a new connection to PostgreSQL // (or returning an already existing one) // MyPostgresConn *pC = Current; if (pC != NULL) { if (pC->GetHost().Cmp(host) == 0 && pC->GetHostAddr().Cmp(hostaddr) == 0 && pC->GetPort() == port && pC->GetDbName().Cmp(dbname) == 0 && pC->GetUser().Cmp(user) == 0) return pC; // continuing with the current connection } pC = Find(host, hostaddr, port, dbname, user); if (pC != NULL) return pC; // already defined // adding a new connection pC = new MyPostgresConn(host, hostaddr, port, dbname, user, readOnly, textDates); if (First == NULL) First = pC; pC->SetPrev(Last); if (Last != NULL) Last->SetNext(pC); Last = pC; Current = pC; return pC; } MyPostgresConn *MyPostgres::Find(wxString & host, wxString & hostaddr, int port, wxString & dbname, wxString & user) { // // searching for a given connection // MyPostgresConn *pC = First; while (pC != NULL) { if (pC->GetHost().Cmp(host) == 0 && pC->GetHostAddr().Cmp(hostaddr) == 0 && pC->GetPort() == port && pC->GetDbName().Cmp(dbname) == 0 && pC->GetUser().Cmp(user) == 0) return pC; pC = pC->GetNext(); } return NULL; } void MyPostgres::Remove(MyPostgresConn * conn) { // // removing a connection from the list // MyPostgresConn *pC = First; while (pC != NULL) { if (pC == conn) { MyPostgresConn *x = pC->GetPrev(); if (x != NULL) x->SetNext(pC->GetNext()); x = pC->GetNext(); if (x != NULL) x->SetPrev(pC->GetPrev()); if (pC == First) First = pC->GetNext(); if (pC == Last) Last = pC->GetPrev(); if (pC == Current) Current = Last; delete pC; return; } pC = pC->GetNext(); } } bool MyPostgres::CheckUniqueVirtName(wxString & virtName) { // // testing for PostgreSQL unique virtual names // MyPostgresConn *pC = First; while (pC != NULL) { MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (virtName.Cmp(pT->GetVirtName()) == 0) return false; if (virtName.Cmp(pT->GetPostGisName()) == 0) return false; pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { if (virtName.Cmp(pV->GetVirtName()) == 0) return false; pV = pV->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } return true; } void MyPostgres::MakeUniqueVirtName(wxString & baseName, wxString & uniqueName) { // // ensuring to create PostgreSQL unique virtual names // if (CheckUniqueVirtName(baseName) == true) { uniqueName = baseName; return; } int alias = 0; while (1) { wxString suffix; suffix.Printf(wxT("_%d"), alias); wxString test = baseName + suffix; if (CheckUniqueVirtName(test) == true) { uniqueName = test; return; } alias++; } } MyPostgresTable *MyPostgres::FindTable(MyFrame * parent, wxString & virtName) { // attempting to retrieve a PostgreSQL Table MyPostgresConn *pC = First; while (pC != NULL) { MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (virtName.Cmp(pT->GetVirtName()) == 0) { if (parent != NULL) parent->InitPostgresPkColumns(pC, pS, pT); return pT; } pT = pT->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } return NULL; } MyPostgresTable *MyPostgres::FindPostGisView(MyFrame * parent, wxString & virtName) { // attempting to retrieve the PostgreSQL Table supporting a PostGIS View (wrapper) MyPostgresConn *pC = First; while (pC != NULL) { MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (virtName.Cmp(pT->GetPostGisName()) == 0) { if (parent != NULL) parent->InitPostgresPkColumns(pC, pS, pT); return pT; } pT = pT->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } return NULL; } MyPostgresColumns::~MyPostgresColumns() { // dtor MyPostgresCol *pC; MyPostgresCol *pCn; pC = First; while (pC != NULL) { pCn = pC->GetNext(); delete pC; pC = pCn; } } void MyPostgresColumns::Add(wxString & name) { // adding a Column into the list MyPostgresCol *col = new MyPostgresCol(name); if (First == NULL) First = col; if (Last != NULL) Last->SetNext(col); Last = col; } void MyPostgresColumns::SetPK(wxString & name) { // setting a PK Column MyPostgresCol *pC; pC = First; while (pC != NULL) { if (pC->GetName().Cmp(name) == 0) { pC->SetPK(); return; } pC = pC->GetNext(); } } char *MyPostgresColumns::BuildWhere() { // building a WHERE clause char *where = NULL; char *prev; int first = 1; char name[1024]; char *xname; MyPostgresCol *pC = First; while (pC != NULL) { if (pC->IsPK() == false) { pC = pC->GetNext(); continue; } if (first) { first = 0; strcpy(name, pC->GetName().ToUTF8()); xname = gaiaDoubleQuotedSql(name); where = sqlite3_mprintf("WHERE \"%s\" = OLD.\"%s\"", xname, xname); free(xname); } else { prev = where; strcpy(name, pC->GetName().ToUTF8()); xname = gaiaDoubleQuotedSql(name); where = sqlite3_mprintf("%s AND \"%s\" = OLD.\"%s\"", xname, xname); free(xname); sqlite3_free(prev); } pC = pC->GetNext(); } return where; } |
Changes to QueryView.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 533 534 535 536 537 538 539 540 541 542 543 544 545 546 ... 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 ... 638 639 640 641 642 643 644 645 646 647 648 649 650 651 ... 667 668 669 670 671 672 673 674 675 676 677 678 679 680 ... 779 780 781 782 783 784 785 786 787 788 789 790 791 792 ... 807 808 809 810 811 812 813 814 815 816 817 818 819 820 ... 867 868 869 870 871 872 873 874 875 876 877 878 879 880 ... 896 897 898 899 900 901 902 903 904 905 906 907 908 909 ... 966 967 968 969 970 971 972 973 974 975 976 977 978 979 ... 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 .... 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 .... 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 .... 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 .... 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 .... 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 .... 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 .... 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 .... 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 |
/* / QueryView.cpp / a panel to set SQL queries / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ return true; if (str.CmpNoCase(wxT("hasGeoCallbacks")) == 0) return true; if (str.CmpNoCase(wxT("hasGeos")) == 0) return true; if (str.CmpNoCase(wxT("hasProj")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosAdvanced")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosTrunk")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosReentrant")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosOnlyReentrant")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("hasGGP")) == 0) return true; if (str.CmpNoCase(wxT("hasGroundControlPoints")) == 0) return true; if (str.CmpNoCase(wxT("hasTopology")) == 0) return true; if (str.CmpNoCase(wxT("EnableGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("DisableGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("GetGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("EnableGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("DisableGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("GetGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("SetDecimalPrecision")) == 0) return true; if (str.CmpNoCase(wxT("GetDecimalPrecision")) == 0) return true; if (str.CmpNoCase(wxT("GetShapefileExtent")) == 0) return true; if (str.CmpNoCase(wxT("IsLowASCII")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RecoverFDOGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("DiscardFDOGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("InitSpatialMetaData")) == 0) return true; if (str.CmpNoCase(wxT("AddGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("RecoverGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("DiscardGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("RegisterVirtualGeometry")) == 0) ................................................................................ if (str.CmpNoCase(wxT("RebuildGeometryTriggers")) == 0) return true; if (str.CmpNoCase(wxT("UpgradeGeometryTriggers")) == 0) return true; if (str.CmpNoCase(wxT("CheckSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("RecoverSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("CheckShadowedRowid")) == 0) return true; if (str.CmpNoCase(wxT("CheckWithoutRowid")) == 0) return true; if (str.CmpNoCase(wxT("CreateMetaCatalogTables")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("RegisterIsoMetadata")) == 0) return true; if (str.CmpNoCase(wxT("XB_LoadXML")) == 0) return true; if (str.CmpNoCase(wxT("XB_StoreXML")) == 0) return true; if (str.CmpNoCase(wxT("CountUnsafeTriggers")) == 0) return true; if (str.CmpNoCase(wxT("CastToInteger")) == 0) return true; if (str.CmpNoCase(wxT("CastToDouble")) == 0) return true; if (str.CmpNoCase(wxT("CastToText")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("DirNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FullFileNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FileNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FileExtFromPath")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Create")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateTranslate")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateScale")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("GetCutterMessage")) == 0) return true; if (str.CmpNoCase(wxT("CreateRasterCoveragesTable")) == 0) return true; if (str.CmpNoCase(wxT("CreateVectorCoveragesTables")) == 0) return true; if (str.CmpNoCase(wxT("CloneTable")) == 0) return true; if (str.CmpNoCase(wxT("CheckDuplicateRows")) == 0) return true; if (str.CmpNoCase(wxT("RemoveDuplicateRows")) == 0) return true; if (str.CmpNoCase(wxT("ElementaryGeometries")) == 0) return true; ................................................................................ return true; if (str.CmpNoCase(wxT("ImportWFS")) == 0) return true; if (str.CmpNoCase(wxT("ImportDXF")) == 0) return true; if (str.CmpNoCase(wxT("ImportDXFfromDir")) == 0) return true; if (str.CmpNoCase(wxT("sequence_nextval")) == 0) return true; if (str.CmpNoCase(wxT("sequence_currval")) == 0) return true; if (str.CmpNoCase(wxT("sequence_lastval")) == 0) return true; ................................................................................ return true; if (str.CmpNoCase(wxT("Var_pop")) == 0) return true; if (str.CmpNoCase(wxT("Var_samp")) == 0) return true; if (str.CmpNoCase(wxT("Tan")) == 0) return true; if (str.CmpNoCase(wxT("IsZipBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsPdfBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsGifBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsPngBlob")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("BlobFromFile")) == 0) return true; if (str.CmpNoCase(wxT("BlobToFile")) == 0) return true; if (str.CmpNoCase(wxT("ExportDXF")) == 0) return true; if (str.CmpNoCase(wxT("MakePoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_Point")) == 0) return true; if (str.CmpNoCase(wxT("MakePointZ")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointZ")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("GeomFromEWKB")) == 0) return true; if (str.CmpNoCase(wxT("AsTWKB")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromTWKB")) == 0) return true; if (str.CmpNoCase(wxT("AsEWKT")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromEWKT")) == 0) return true; if (str.CmpNoCase(wxT("CompressGeometry")) == 0) return true; if (str.CmpNoCase(wxT("UncompressGeometry")) == 0) ................................................................................ if (str.CmpNoCase(wxT("CastToXYM")) == 0) return true; if (str.CmpNoCase(wxT("CastToXYZM")) == 0) return true; if (str.CmpNoCase(wxT("ST_Reverse")) == 0) return true; if (str.CmpNoCase(wxT("ST_ForceLHR")) == 0) return true; if (str.CmpNoCase(wxT("Dimension")) == 0) return true; if (str.CmpNoCase(wxT("ST_Dimension")) == 0) return true; if (str.CmpNoCase(wxT("CoordDimension")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("SimplifyPreserveTopology")) == 0) return true; if (str.CmpNoCase(wxT("ST_SimplifyPreserveTopology")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicLength")) == 0) return true; if (str.CmpNoCase(wxT("GreatCircleLength")) == 0) return true; if (str.CmpNoCase(wxT("NumPoints")) == 0) return true; if (str.CmpNoCase(wxT("ST_NumPoints")) == 0) return true; if (str.CmpNoCase(wxT("PointN")) == 0) return true; ................................................................................ return true; if (str.CmpNoCase(wxT("ST_ConvexHull")) == 0) return true; if (str.CmpNoCase(wxT("Transform")) == 0) return true; if (str.CmpNoCase(wxT("ST_Transform")) == 0) return true; if (str.CmpNoCase(wxT("ST_Shift_Longitude")) == 0) return true; if (str.CmpNoCase(wxT("NormalizeLonLat")) == 0) return true; if (str.CmpNoCase(wxT("Line_Interpolate_Point")) == 0) return true; if (str.CmpNoCase(wxT("ST_Line_Interpolate_Point")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("ExtractMultiPoint")) == 0) return true; if (str.CmpNoCase(wxT("ExtractMultiLinestring")) == 0) return true; if (str.CmpNoCase(wxT("ExtractMultiPolygon")) == 0) return true; if (str.CmpNoCase(wxT("ST_Locate_Along_Measure")) == 0) return true; if (str.CmpNoCase(wxT("ST_Locate_Between_Measures")) == 0) return true; if (str.CmpNoCase(wxT("SquareGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_SquareGrid")) == 0) return true; if (str.CmpNoCase(wxT("TriangularGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_TriangularGrid")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RL2_SetMaxThreads")) == 0) return true; if (str.CmpNoCase(wxT("IsValidPixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidPixel")) == 0) return true; if (str.CmpNoCase(wxT("IsValidRasterPalette")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidRasterPalette")) == 0) return true; if (str.CmpNoCase(wxT("IsValidRasterStatistics")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidRasterStatistics")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RL2_PaletteEquals")) == 0) return true; if (str.CmpNoCase(wxT("CreatePixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_CreatePixel")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelType")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelType")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelSampleType")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelSampleType")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RL2_GetMapImageFromRaster")) == 0) return true; if (str.CmpNoCase(wxT("GetMapImageFromVector")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetMapImageFromVector")) == 0) return true; if (str.CmpNoCase(wxT("GetTileImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetTileImage")) == 0) return true; if (str.CmpNoCase(wxT("GetTripleBandTileImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetTripleBandTileImage")) == 0) |
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 ... 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 ... 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 ... 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 ... 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 ... 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 ... 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 ... 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 .... 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 .... 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 .... 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 .... 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 .... 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 .... 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 .... 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 .... 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 .... 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 .... 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 |
/* / QueryView.cpp / a panel to set SQL queries / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ return true; if (str.CmpNoCase(wxT("hasGeoCallbacks")) == 0) return true; if (str.CmpNoCase(wxT("hasGeos")) == 0) return true; if (str.CmpNoCase(wxT("hasProj")) == 0) return true; if (str.CmpNoCase(wxT("hasProjGeodesic")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosAdvanced")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosTrunk")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosReentrant")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosOnlyReentrant")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("hasGGP")) == 0) return true; if (str.CmpNoCase(wxT("hasGroundControlPoints")) == 0) return true; if (str.CmpNoCase(wxT("hasTopology")) == 0) return true; if (str.CmpNoCase(wxT("hasKNN")) == 0) return true; if (str.CmpNoCase(wxT("hasRouting")) == 0) return true; if (str.CmpNoCase(wxT("EnableGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("DisableGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("GetGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("EnableGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("DisableGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("GetGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("EnableTinyPoint")) == 0) return true; if (str.CmpNoCase(wxT("DisableTInyPoint")) == 0) return true; if (str.CmpNoCase(wxT("IsTinyPointEnabled")) == 0) return true; if (str.CmpNoCase(wxT("SetDecimalPrecision")) == 0) return true; if (str.CmpNoCase(wxT("GetDecimalPrecision")) == 0) return true; if (str.CmpNoCase(wxT("GetShapefileExtent")) == 0) return true; if (str.CmpNoCase(wxT("IsLowASCII")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RecoverFDOGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("DiscardFDOGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("InitSpatialMetaData")) == 0) return true; if (str.CmpNoCase(wxT("InitSpatialMetaDataFull")) == 0) return true; if (str.CmpNoCase(wxT("AddGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("RecoverGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("DiscardGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("RegisterVirtualGeometry")) == 0) ................................................................................ if (str.CmpNoCase(wxT("RebuildGeometryTriggers")) == 0) return true; if (str.CmpNoCase(wxT("UpgradeGeometryTriggers")) == 0) return true; if (str.CmpNoCase(wxT("CheckSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("RecoverSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("GetSpatialIndexExtent")) == 0) return true; if (str.CmpNoCase(wxT("CheckShadowedRowid")) == 0) return true; if (str.CmpNoCase(wxT("CheckWithoutRowid")) == 0) return true; if (str.CmpNoCase(wxT("CreateMetaCatalogTables")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("RegisterIsoMetadata")) == 0) return true; if (str.CmpNoCase(wxT("XB_LoadXML")) == 0) return true; if (str.CmpNoCase(wxT("XB_StoreXML")) == 0) return true; if (str.CmpNoCase(wxT("CountUnsafeTriggers")) == 0) return true; if (str.CmpNoCase(wxT("IsInteger")) == 0) return true; if (str.CmpNoCase(wxT("IsDecimalNumber")) == 0) return true; if (str.CmpNoCase(wxT("IsNumber")) == 0) return true; if (str.CmpNoCase(wxT("CastToInteger")) == 0) return true; if (str.CmpNoCase(wxT("CastToDouble")) == 0) return true; if (str.CmpNoCase(wxT("CastToText")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("DirNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FullFileNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FileNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FileExtFromPath")) == 0) return true; if (str.CmpNoCase(wxT("MakeStringList")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Create")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateTranslate")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateScale")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("GetCutterMessage")) == 0) return true; if (str.CmpNoCase(wxT("CreateRasterCoveragesTable")) == 0) return true; if (str.CmpNoCase(wxT("CreateVectorCoveragesTables")) == 0) return true; if (str.CmpNoCase(wxT("CloneTable")) == 0) return true; if (str.CmpNoCase(wxT("CreateClonedTable")) == 0) return true; if (str.CmpNoCase(wxT("CheckDuplicateRows")) == 0) return true; if (str.CmpNoCase(wxT("RemoveDuplicateRows")) == 0) return true; if (str.CmpNoCase(wxT("ElementaryGeometries")) == 0) return true; ................................................................................ return true; if (str.CmpNoCase(wxT("ImportWFS")) == 0) return true; if (str.CmpNoCase(wxT("ImportDXF")) == 0) return true; if (str.CmpNoCase(wxT("ImportDXFfromDir")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_GetLastError")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_SetLogfile")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_GetLogfile")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_FromFile")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_FromText")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_IsValid")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_NumVariables")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_VariableN")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_AllVariables")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_RawSQL")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_VarValue")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_IsValidVarValue")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_CookedSQL")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_Execute")) == 0) return true; if (str.CmpNoCase(wxT("SqlProc_Exit")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_CreateTables")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_Register")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_Get")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_Delete")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_UpdateTitle")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_UpdateSqlBody")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_Execute")) == 0) return true; if (str.CmpNoCase(wxT("StoredProc_Exit")) == 0) return true; if (str.CmpNoCase(wxT("StoredVar_Register")) == 0) return true; if (str.CmpNoCase(wxT("StoredVar_Get")) == 0) return true; if (str.CmpNoCase(wxT("StoredVar_GetValue")) == 0) return true; if (str.CmpNoCase(wxT("StoredVar_Delete")) == 0) return true; if (str.CmpNoCase(wxT("StoredVar_UpdateTitle")) == 0) return true; if (str.CmpNoCase(wxT("StoredVar_UpdateValue")) == 0) return true; if (str.CmpNoCase(wxT("PostgreSql_ResetLastError")) == 0) return true; if (str.CmpNoCase(wxT("PostgreSql_SetLastError")) == 0) return true; if (str.CmpNoCase(wxT("PostgreSql_GetLastError")) == 0) return true; if (str.CmpNoCase(wxT("CreateRoutingNodes")) == 0) return true; if (str.CmpNoCase(wxT("CreateRouting")) == 0) return true; if (str.CmpNoCase(wxT("CreateRouting_GetLastError")) == 0) return true; if (str.CmpNoCase(wxT("sequence_nextval")) == 0) return true; if (str.CmpNoCase(wxT("sequence_currval")) == 0) return true; if (str.CmpNoCase(wxT("sequence_lastval")) == 0) return true; ................................................................................ return true; if (str.CmpNoCase(wxT("Var_pop")) == 0) return true; if (str.CmpNoCase(wxT("Var_samp")) == 0) return true; if (str.CmpNoCase(wxT("Tan")) == 0) return true; if (str.CmpNoCase(wxT("IsGeometryBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsTinyPointBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsZipBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsPdfBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsGifBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsPngBlob")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("BlobFromFile")) == 0) return true; if (str.CmpNoCase(wxT("BlobToFile")) == 0) return true; if (str.CmpNoCase(wxT("ExportDXF")) == 0) return true; if (str.CmpNoCase(wxT("TinyPointEncode")) == 0) return true; if (str.CmpNoCase(wxT("GeometryPointEncode")) == 0) return true; if (str.CmpNoCase(wxT("MakePoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_Point")) == 0) return true; if (str.CmpNoCase(wxT("MakePointZ")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointZ")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("GeomFromEWKB")) == 0) return true; if (str.CmpNoCase(wxT("AsTWKB")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromTWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_AsEncodedPolyline")) == 0) return true; if (str.CmpNoCase(wxT("ST_LineFromEncodedPolyline")) == 0) return true; if (str.CmpNoCase(wxT("AsEWKT")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromEWKT")) == 0) return true; if (str.CmpNoCase(wxT("CompressGeometry")) == 0) return true; if (str.CmpNoCase(wxT("UncompressGeometry")) == 0) ................................................................................ if (str.CmpNoCase(wxT("CastToXYM")) == 0) return true; if (str.CmpNoCase(wxT("CastToXYZM")) == 0) return true; if (str.CmpNoCase(wxT("ST_Reverse")) == 0) return true; if (str.CmpNoCase(wxT("ST_ForceLHR")) == 0) return true; if (str.CmpNoCase(wxT("ST_ForcePolygonCW")) == 0) return true; if (str.CmpNoCase(wxT("ST_ForcePolygonCCW")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsPolygonCW")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsPolygonCCW")) == 0) return true; if (str.CmpNoCase(wxT("Dimension")) == 0) return true; if (str.CmpNoCase(wxT("ST_Dimension")) == 0) return true; if (str.CmpNoCase(wxT("CoordDimension")) == 0) return true; ................................................................................ if (str.CmpNoCase(wxT("SimplifyPreserveTopology")) == 0) return true; if (str.CmpNoCase(wxT("ST_SimplifyPreserveTopology")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicLength")) == 0) return true; if (str.CmpNoCase(wxT("GreatCircleLength")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicArcLength")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicChordLength")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicCentralAngle")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicArcArea")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicArcHeigth")) == 0) return true; if (str.CmpNoCase(wxT("NumPoints")) == 0) return true; if (str.CmpNoCase(wxT("ST_NumPoints")) == 0) return true; if (str.CmpNoCase(wxT("PointN")) == 0) return true; ................................................................................ return true; if (str.CmpNoCase(wxT("ST_ConvexHull")) == 0) return true; if (str.CmpNoCase(wxT("Transform")) == 0) return true; if (str.CmpNoCase(wxT("ST_Transform")) == 0) return true; if (str.CmpNoCase(wxT("TransformXY")) == 0) return true; if (str.CmpNoCase(wxT("ST_TransformXY")) == 0) return true; if (str.CmpNoCase(wxT("ST_Shift_Longitude")) == 0) return true; if (str.CmpNoCase(wxT("NormalizeLonLat")) == 0) return true; if (str.CmpNoCase(wxT("Line_Interpolate_Point")) == 0) return true; if (str.CmpNoCase(wxT("ST_Line_Interpolate_Point")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("ExtractMultiPoint")) == 0) return true; if (str.CmpNoCase(wxT("ExtractMultiLinestring")) == 0) return true; if (str.CmpNoCase(wxT("ExtractMultiPolygon")) == 0) return true; if (str.CmpNoCase(wxT("ST_AddMeasure")) == 0) return true; if (str.CmpNoCase(wxT("ST_InterpolatePoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_Locate_Along_Measure")) == 0) return true; if (str.CmpNoCase(wxT("ST_LocateAlong")) == 0) return true; if (str.CmpNoCase(wxT("ST_Locate_Between_Measures")) == 0) return true; if (str.CmpNoCase(wxT("ST_LocateBetween")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsValidTrajectory")) == 0) return true; if (str.CmpNoCase(wxT("ST_TrajectoryInterpolatePoint")) == 0) return true; if (str.CmpNoCase(wxT("SquareGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_SquareGrid")) == 0) return true; if (str.CmpNoCase(wxT("TriangularGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_TriangularGrid")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RL2_SetMaxThreads")) == 0) return true; if (str.CmpNoCase(wxT("IsValidPixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidPixel")) == 0) return true; if (str.CmpNoCase(wxT("IsPixelNone")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsPixelNone")) == 0) return true; if (str.CmpNoCase(wxT("IsValidRasterPalette")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidRasterPalette")) == 0) return true; if (str.CmpNoCase(wxT("IsValidRasterStatistics")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidRasterStatistics")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RL2_PaletteEquals")) == 0) return true; if (str.CmpNoCase(wxT("CreatePixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_CreatePixel")) == 0) return true; if (str.CmpNoCase(wxT("CreatePixelNone")) == 0) return true; if (str.CmpNoCase(wxT("RL2_CreatePixelNone")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelType")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelType")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelSampleType")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelSampleType")) == 0) ................................................................................ return true; if (str.CmpNoCase(wxT("RL2_GetMapImageFromRaster")) == 0) return true; if (str.CmpNoCase(wxT("GetMapImageFromVector")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetMapImageFromVector")) == 0) return true; if (str.CmpNoCase(wxT("GetMapImageFromWMS")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetMapImageFromWMS")) == 0) return true; if (str.CmpNoCase(wxT("GetTileImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetTileImage")) == 0) return true; if (str.CmpNoCase(wxT("GetTripleBandTileImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetTripleBandTileImage")) == 0) |
Changes to QueryViewComposer.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ QueryViewComposer.cpp
/ Query/View Composer
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a-furieri@lqt.it
/
/ Copyright (C) 2009-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ QueryViewComposer.cpp
/ Query/View Composer
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2009-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
Deleted QuickStyles.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 |
/* / QuickStyles.cpp / Quick Styles wizards / / version 2.0, 2017 May 26 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include "wx/imaglist.h" #include "wx/colordlg.h" #include "wx/filename.h" #include "wx/clipbrd.h" QuickStyleObj::QuickStyleObj(int type) { // ctor DoGetUUID(UUID); Type = type; MinScaleEnabled = false; MaxScaleEnabled = false; ScaleMin = 0.0; ScaleMax = 0.0; SymbolOpacity = 1.0; SymbolSize = 16; SymbolRotation = 0.0; SymbolAnchorX = 0.5; SymbolAnchorY = 0.5; SymbolDisplacementX = 0.0; SymbolDisplacementY = 0.0; SymbolWellKnownMark = RandomWellKnownMark(); RandomColor(SymbolFillColor); RandomColor(SymbolStrokeColor); LineOpacity = 1.0; LinePerpendicularOffset = 0.0; LineStrokeWidth = 1.0; RandomColor(LineStrokeColor); LineDotStyle = QUICK_STYLE_SOLID_LINE; PolygonFill = true; PolygonStroke = true; PolygonDisplacementX = 0.0; PolygonDisplacementY = 0.0; PolygonPerpendicularOffset = 0.0; PolygonFillOpacity = 1.0; RandomColor(PolygonFillColor); PolygonStrokeOpacity = 1.0; PolygonStrokeWidth = 1.0; RandomColor(PolygonStrokeColor); LabelLinePlacement = true; LabelPrint = false; LabelColumn = NULL; FontFacename = NULL; FontSize = 10.0; FontStyle = RL2_FONTSTYLE_NORMAL; FontWeight = RL2_FONTWEIGHT_NORMAL; FontOpacity = 1.0; strcpy(FontColor, "#000000"); HasHalo = false; HaloRadius = 1.0; HaloOpacity = 1.0; strcpy(HaloColor, "#ffffff"); LabelAnchorX = 0.5; LabelAnchorY = 0.5; LabelDisplacementX = 0.0; LabelDisplacementY = 0.0; LabelRotation = 0.0; LabelPerpendicularOffset = 0.0; RepeatedLabel = false; LabelInitialGap = 0.0; LabelGap = 0.0; LabelIsAligned = false; LabelGeneralizeLine = false; XmlStyle = NULL; } QuickStyleObj *QuickStyleObj::Clone() { // // cloning a Quick Style // QuickStyleObj *Style = new QuickStyleObj(this->Type); strcpy(Style->UUID, this->UUID); Style->MinScaleEnabled = this->MinScaleEnabled; Style->MaxScaleEnabled = this->MaxScaleEnabled; Style->ScaleMin = this->ScaleMin; Style->ScaleMax = this->ScaleMax; Style->SymbolOpacity = this->SymbolOpacity; Style->SymbolSize = this->SymbolSize; Style->SymbolRotation = this->SymbolRotation; Style->SymbolAnchorX = this->SymbolAnchorX; Style->SymbolAnchorY = this->SymbolAnchorY; Style->SymbolDisplacementX = this->SymbolDisplacementX; Style->SymbolDisplacementY = this->SymbolDisplacementY; Style->SymbolWellKnownMark = this->SymbolWellKnownMark; strcpy(Style->SymbolFillColor, this->SymbolFillColor); strcpy(Style->SymbolStrokeColor, this->SymbolStrokeColor); Style->LineOpacity = this->LineOpacity; Style->LinePerpendicularOffset = this->LinePerpendicularOffset; Style->LineStrokeWidth = this->LineStrokeWidth; strcpy(Style->LineStrokeColor, this->LineStrokeColor); Style->LineDotStyle = this->LineDotStyle; Style->PolygonFill = this->PolygonFill; Style->PolygonStroke = this->PolygonStroke; Style->PolygonDisplacementX = this->PolygonDisplacementX; Style->PolygonDisplacementY = this->PolygonDisplacementY; Style->PolygonPerpendicularOffset = this->PolygonPerpendicularOffset; Style->PolygonFillOpacity = this->PolygonFillOpacity; strcpy(Style->PolygonFillColor, this->PolygonFillColor); Style->PolygonStrokeOpacity = this->PolygonStrokeOpacity; Style->PolygonStrokeWidth = this->PolygonStrokeWidth; strcpy(Style->PolygonStrokeColor, this->PolygonStrokeColor); Style->LabelLinePlacement = this->LabelLinePlacement; Style->LabelPrint = this->LabelPrint; if (this->LabelColumn == NULL) Style->LabelColumn = NULL; else { int len = strlen(this->LabelColumn); Style->LabelColumn = (char *) malloc(len + 1); strcpy(Style->LabelColumn, this->LabelColumn); } if (this->FontFacename == NULL) Style->FontFacename = NULL; else { int len = strlen(this->FontFacename); Style->FontFacename = (char *) malloc(len + 1); strcpy(Style->FontFacename, this->FontFacename); } Style->FontSize = this->FontSize; Style->FontStyle = this->FontStyle; Style->FontWeight = this->FontWeight; Style->FontOpacity = this->FontOpacity; strcpy(Style->FontColor, this->FontColor); Style->HasHalo = this->HasHalo; Style->HaloRadius = this->HaloRadius; Style->HaloOpacity = this->HaloOpacity; strcpy(Style->HaloColor, this->HaloColor); Style->LabelAnchorX = this->LabelAnchorX; Style->LabelAnchorY = this->LabelAnchorY; Style->LabelDisplacementX = this->LabelDisplacementX; Style->LabelDisplacementY = this->LabelDisplacementY; Style->LabelRotation = this->LabelRotation; Style->LabelPerpendicularOffset = this->LabelPerpendicularOffset; Style->RepeatedLabel = this->RepeatedLabel; Style->LabelInitialGap = this->LabelInitialGap; Style->LabelGap = this->LabelGap; Style->LabelIsAligned = this->LabelIsAligned; Style->LabelGeneralizeLine = this->LabelGeneralizeLine; Style->XmlStyle = NULL; return Style; } bool QuickStyleObj::Compare(QuickStyleObj * Style) { // // comparing two Quick Style objects // if (Style == NULL) return false; if (strcmp(Style->UUID, this->UUID) != 0) return false; if (Style->MinScaleEnabled != this->MinScaleEnabled) return false; if (Style->MaxScaleEnabled != this->MaxScaleEnabled) return false; if (Style->ScaleMin != this->ScaleMin) return false; if (Style->ScaleMax != this->ScaleMax) return false; if (Style->SymbolOpacity != this->SymbolOpacity) return false; if (Style->SymbolSize != this->SymbolSize) return false; if (Style->SymbolRotation != this->SymbolRotation) return false; if (Style->SymbolAnchorX != this->SymbolAnchorX) return false; if (Style->SymbolAnchorY != this->SymbolAnchorY) return false; if (Style->SymbolDisplacementX != this->SymbolDisplacementX) return false; if (Style->SymbolDisplacementY != this->SymbolDisplacementY) return false; if (Style->SymbolWellKnownMark != this->SymbolWellKnownMark) return false; if (strcmp(Style->SymbolFillColor, this->SymbolFillColor) != 0) return false; if (strcmp(Style->SymbolStrokeColor, this->SymbolStrokeColor) != 0) return false; if (Style->LineOpacity != this->LineOpacity) return false; if (Style->LinePerpendicularOffset != this->LinePerpendicularOffset) return false; if (Style->LineStrokeWidth != this->LineStrokeWidth) return false; if (strcmp(Style->LineStrokeColor, this->LineStrokeColor) != 0) return false; if (Style->LineDotStyle != this->LineDotStyle) return false; if (Style->PolygonFill != this->PolygonFill) return false; if (Style->PolygonStroke != this->PolygonStroke) return false; if (Style->PolygonDisplacementX != this->PolygonDisplacementX) return false; if (Style->PolygonDisplacementY != this->PolygonDisplacementY) return false; if (Style->PolygonPerpendicularOffset != this->PolygonPerpendicularOffset) return false; if (Style->PolygonFillOpacity != this->PolygonFillOpacity) return false; if (strcmp(Style->PolygonFillColor, this->PolygonFillColor) != 0) return false; if (Style->PolygonStrokeOpacity != this->PolygonStrokeOpacity) return false; if (Style->PolygonStrokeWidth != this->PolygonStrokeWidth) return false; if (strcmp(Style->PolygonStrokeColor, this->PolygonStrokeColor) != 0) return false; if (Style->LabelLinePlacement != this->LabelLinePlacement) return false; if (Style->LabelPrint != this->LabelPrint) return false; if (Style->LabelColumn == NULL && this->LabelColumn == NULL) ; else if (Style->LabelColumn == NULL && this->LabelColumn != NULL) return false; else if (Style->LabelColumn != NULL && this->LabelColumn == NULL) return false; else if (strcmp(Style->LabelColumn, this->LabelColumn) != 0) return false; if (Style->FontFacename == NULL && this->FontFacename == NULL) ; else if (Style->FontFacename == NULL && this->FontFacename != NULL) return false; else if (Style->FontFacename != NULL && this->FontFacename == NULL) return false; else if (strcmp(Style->FontFacename, this->FontFacename) != 0) return false; if (Style->FontSize != this->FontSize) return false; if (Style->FontStyle != this->FontStyle) return false; if (Style->FontWeight != this->FontWeight) return false; if (Style->FontOpacity != this->FontOpacity) return false; if (strcmp(Style->FontColor, this->FontColor) != 0) return false; if (Style->HasHalo != this->HasHalo) return false; if (Style->HaloRadius != this->HaloRadius) return false; if (Style->HaloOpacity != this->HaloOpacity) return false; if (strcmp(Style->HaloColor, this->HaloColor) != 0) return false; if (Style->LabelAnchorX != this->LabelAnchorX) return false; if (Style->LabelAnchorY != this->LabelAnchorY) return false; if (Style->LabelDisplacementX != this->LabelDisplacementX) return false; if (Style->LabelDisplacementY != this->LabelDisplacementY) return false; if (Style->LabelRotation != this->LabelRotation) return false; if (Style->LabelPerpendicularOffset != this->LabelPerpendicularOffset) return false; if (Style->RepeatedLabel != this->RepeatedLabel) return false; if (Style->LabelInitialGap != this->LabelInitialGap) return false; if (Style->LabelGap != this->LabelGap) return false; if (Style->LabelIsAligned != this->LabelIsAligned) return false; if (Style->LabelGeneralizeLine != this->LabelGeneralizeLine) return false; return true; } void QuickStyleObj::SetLabelColumn(const char *x) { // // setting the Label Column // int len; if (LabelColumn != NULL) free(LabelColumn); LabelColumn = NULL; if (x == NULL) return; len = strlen(x); LabelColumn = (char *) malloc(len + 1); strcpy(LabelColumn, x); } void QuickStyleObj::SetFontFacename(const char *x) { // // setting the Font Facename // int len; if (FontFacename != NULL) free(FontFacename); FontFacename = NULL; if (x == NULL) return; len = strlen(x); FontFacename = (char *) malloc(len + 1); strcpy(FontFacename, x); } void QuickStyleObj::UpdateXmlStyle() { // // updating the XML Style // if (XmlStyle != NULL) sqlite3_free(XmlStyle); XmlStyle = CreateXmlStyle(); } char *QuickStyleObj::CreateXmlStyle() { // // creating the XML Style // char *xml; if ((MinScaleEnabled == true || MaxScaleEnabled == true) || LabelPrint == true || Type == QUICK_STYLE_GEOMETRY) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(false); return xml; } char *QuickStyleObj::DoCreateFeatureTypeXML() { // // creating a FeatureType XML Style // const char *cstr; char *prev; char *xml2; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; xml = sqlite3_mprintf("%s<FeatureTypeStyle version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Rule>\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml2 = NULL; if (Type == QUICK_STYLE_POINT) xml2 = DoCreatePointSymbolizerXML(true); if (Type == QUICK_STYLE_LINE) xml2 = DoCreateLineSymbolizerXML(true); if (Type == QUICK_STYLE_POLYGON) xml2 = DoCreatePolygonSymbolizerXML(true); else { // mixed-type Symbolizers xml2 = DoCreatePointSymbolizerXML(true); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } xml2 = DoCreateLineSymbolizerXML(true); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } xml2 = DoCreatePolygonSymbolizerXML(true); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); xml2 = NULL; prev = xml; } } if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } if (LabelPrint == true) { // adding a Text Symbolizer xml2 = NULL; if (Type == QUICK_STYLE_POINT || QUICK_STYLE_POLYGON) xml2 = DoCreateTextPointSymbolizerXML(); if (Type == QUICK_STYLE_LINE) xml2 = DoCreateTextLineSymbolizerXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } } xml = sqlite3_mprintf("%s\t</Rule>\r\n</FeatureTypeStyle>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateSymbolizerXML(bool subordered) { // // creating a Symbolizer XML Style // if (Type == QUICK_STYLE_POINT) return DoCreatePointSymbolizerXML(subordered); if (Type == QUICK_STYLE_LINE) return DoCreateLineSymbolizerXML(subordered); if (Type == QUICK_STYLE_POLYGON) return DoCreatePolygonSymbolizerXML(subordered); return NULL; } char *QuickStyleObj::DoCreatePointSymbolizerXML(bool subordered) { // // creating a Point Symbolizer XML Style // const char *cstr; char *prev; const char *extra = ""; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); if (subordered == true) { extra = "\t\t"; sqlite3_free(xml); prev = (char *) ""; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); } else { prev = xml; xml = sqlite3_mprintf("%s<PointSymbolizer version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; cstr = "http://www.opengeospatial.org/se/units/pixel"; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" uom=\"%s\">\r\n", prev, cstr); sqlite3_free(prev); } prev = xml; if (subordered != true) { xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - PointSymbolizer"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (SymbolWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, SymbolFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, SymbolStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (SymbolOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, SymbolOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, SymbolSize); sqlite3_free(prev); prev = xml; if (SymbolRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, SymbolRotation); sqlite3_free(prev); prev = xml; } if (SymbolAnchorX != 0.5 || SymbolAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, SymbolAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, SymbolAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (SymbolDisplacementX != 0.0 || SymbolDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, SymbolDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, SymbolDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateLineSymbolizerXML(bool subordered) { // // creating a Line Symbolizer XML Style // const char *cstr; char *prev; const char *extra = ""; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; if (subordered == true) { extra = "\t\t"; sqlite3_free(xml); prev = (char *) ""; xml = sqlite3_mprintf("%s%s<LineSymbolizer>\r\n", prev, extra); } else { xml = sqlite3_mprintf("%s<LineSymbolizer version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; cstr = "http://www.opengeospatial.org/se/units/pixel"; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" uom=\"%s\">\r\n", prev, cstr); sqlite3_free(prev); } prev = xml; if (subordered != true) { xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - LineSymbolizer"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, LineStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, LineOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, LineStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; const char *dashArray; switch (LineDotStyle) { case QUICK_STYLE_DOT_LINE: dashArray = "5.0, 10.0"; break; case QUICK_STYLE_DASH_LINE: dashArray = "20.0, 20.0"; break; case QUICK_STYLE_DASH_DOT_LINE: dashArray = "20.0, 10.0, 5.0, 10.0"; break; default: dashArray = NULL; break; }; if (dashArray != NULL) { xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-dasharray\">%s</SvgParameter>\r\n", prev, extra, dashArray); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (LinePerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.2f</PerpendicularOffset>\r\n", prev, extra, LinePerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</LineSymbolizer>\r\n", prev, extra); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreatePolygonSymbolizerXML(bool subordered) { // // creating a Polygon Symbolizer XML Style // const char *cstr; char *prev; const char *extra = ""; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; if (subordered == true) { extra = "\t\t"; sqlite3_free(xml); prev = (char *) ""; xml = sqlite3_mprintf("%s%s<PolygonSymbolizer>\r\n", prev, extra); } else { xml = sqlite3_mprintf("%s<PolygonSymbolizer version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; cstr = "http://www.opengeospatial.org/se/units/pixel"; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" uom=\"%s\">\r\n", prev, cstr); sqlite3_free(prev); } prev = xml; if (subordered != true) { xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - Polygon Symbolizer"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; } if (PolygonFill == true) { // Polygon Fill xml = sqlite3_mprintf("%s%s\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, PolygonFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, PolygonFillOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (PolygonStroke == true) { // Polygon Stroke xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, PolygonStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, PolygonStrokeOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, PolygonStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (PolygonDisplacementX != 0.0 || PolygonDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, PolygonDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, PolygonDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (PolygonPerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.4f</PerpendicularOffset>\r\n", prev, extra, PolygonPerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</PolygonSymbolizer>\r\n", prev, extra); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateTextPointSymbolizerXML() { // // creating a Text Symbolizer (Point Placement) // const char *cstr; char *xml; char *prev; xml = sqlite3_mprintf("\t\t<TextSymbolizer>\r\n"); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Label>%s</Label>\r\n", prev, LabelColumn); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, FontFacename); sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", prev); else if (FontStyle == RL2_FONTSTYLE_OBLIQUE) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">oblique</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; if (FontWeight == RL2_FONTWEIGHT_BOLD) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">bold</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-size\">%1.2f</SvgParameter>\r\n", prev, FontSize); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Font>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<LabelPlacement>\n", prev); sqlite3_free(prev); prev = xml; // PointPlacement xml = sqlite3_mprintf("%s\t\t\t\t<PointPlacement>\n", prev); sqlite3_free(prev); prev = xml; if (LabelAnchorX != 0.5 || LabelAnchorY != 0.5) { xml = sqlite3_mprintf("%s\t\t\t\t\t<AnchorPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, LabelAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, LabelAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</AnchorPoint>\r\n", prev); sqlite3_free(prev); prev = xml; } if (LabelDisplacementX != 0.0 || LabelDisplacementY != 0.0) { xml = sqlite3_mprintf("%s\t\t\t\t\t<Displacement>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, LabelDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, LabelDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</Displacement>\r\n", prev); sqlite3_free(prev); prev = xml; } if (LabelRotation != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t\t<Rotation>%1.2f</Rotation>\r\n", prev, LabelRotation); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t</PointPlacement>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</LabelPlacement>\r\n", prev); sqlite3_free(prev); prev = xml; if (HasHalo == true) { // Halo xml = sqlite3_mprintf("%s\t\t\t<Halo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Radius>%1.2f</Radius>\r\n", prev, HaloRadius); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, HaloColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, HaloOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Halo>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, FontColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, FontOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t</TextSymbolizer>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateTextLineSymbolizerXML() { // // creating a Text Symbolizer (Line Placement) // const char *cstr; char *xml; char *prev; xml = sqlite3_mprintf("\t\t<TextSymbolizer>\r\n"); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Label>%s</Label>\r\n", prev, LabelColumn); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, FontFacename); sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", prev); else if (FontStyle == RL2_FONTSTYLE_OBLIQUE) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">oblique</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; if (FontWeight == RL2_FONTWEIGHT_BOLD) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">bold</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-size\">%1.2f</SvgParameter>\r\n", prev, FontSize); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Font>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<LabelPlacement>\n", prev); sqlite3_free(prev); prev = xml; // LinePlacement xml = sqlite3_mprintf("%s\t\t\t\t<LinePlacement>\n", prev); sqlite3_free(prev); prev = xml; if (LabelPerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t\t<PerpendicularOffset>%1.4f</PerpendicularOffset>\r\n", prev, LabelPerpendicularOffset); sqlite3_free(prev); prev = xml; } if (RepeatedLabel == true) { // Repeated: InitialGap and Gap xml = sqlite3_mprintf("%s\t\t\t\t\t<IsRepeated>true</IsRepeated>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<InitialGap>%1.4f</InitialGap>\r\n", prev, LabelInitialGap); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<Gap>%1.4f</Gap>\r\n", prev, LabelGap); sqlite3_free(prev); prev = xml; } if (LabelIsAligned == true) { xml = sqlite3_mprintf("%s\t\t\t\t\t<IsAligned>true</IsAligned>\r\n", prev); sqlite3_free(prev); prev = xml; } if (LabelGeneralizeLine == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t<GeneralizeLine>true</GeneralizeLine>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t</LinePlacement>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</LabelPlacement>\r\n", prev); sqlite3_free(prev); prev = xml; if (HasHalo == true) { // Halo xml = sqlite3_mprintf("%s\t\t\t<Halo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Radius>%1.2f</Radius>\r\n", prev, HaloRadius); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, HaloColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, HaloOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Halo>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, FontColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, FontOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t</TextSymbolizer>\r\n", prev); sqlite3_free(prev); return xml; } const unsigned char *QuickStyleObj::CloneXmlStyle() { // // cloning the XML Style definition // if (XmlStyle == NULL) XmlStyle = CreateXmlStyle(); if (XmlStyle == NULL) return NULL; int len = strlen(XmlStyle); char *cloned = (char *) malloc(len + 1); strcpy(cloned, XmlStyle); return (const unsigned char *) cloned; } void QuickStyleObj::DoGetUUID(char *uuid) { // // creating an UUID value // unsigned char rnd[16]; char *p = uuid; int i; sqlite3_randomness(16, rnd); for (i = 0; i < 16; i++) { if (i == 4 || i == 6 || i == 8 || i == 10) *p++ = '-'; sprintf(p, "%02x", rnd[i]); p += 2; } *p = '\0'; uuid[14] = '4'; uuid[19] = '8'; } int QuickStyleObj::RandomWellKnownMark() { // // returning a random Symbol Well Known Mark // int wkt; int mod = rand() % 6; switch (mod) { case 0: wkt = RL2_GRAPHIC_MARK_SQUARE; break; case 1: wkt = RL2_GRAPHIC_MARK_CIRCLE; break; case 2: wkt = RL2_GRAPHIC_MARK_TRIANGLE; break; case 3: wkt = RL2_GRAPHIC_MARK_STAR; break; case 4: wkt = RL2_GRAPHIC_MARK_CROSS; break; default: wkt = RL2_GRAPHIC_MARK_X; break; }; return wkt; } void QuickStyleObj::RandomColor(char *color) { // // setting a random Color // unsigned char red = rand() % 256; unsigned char green = rand() % 256; unsigned char blue = rand() % 256; sprintf(color, "#%02x%02x%02x", red, green, blue); } QuickStyleTopologyObj::QuickStyleTopologyObj(int type) { // ctor QuickStyleObj::DoGetUUID(UUID); Type = type; MinScaleEnabled = false; MaxScaleEnabled = false; ScaleMin = 0.0; ScaleMax = 0.0; NodeOpacity = 1.0; NodeSize = 16; NodeRotation = 0.0; NodeAnchorX = 0.5; NodeAnchorY = 0.5; NodeDisplacementX = 0.0; NodeDisplacementY = 0.0; NodeWellKnownMark = QuickStyleObj::RandomWellKnownMark(); QuickStyleObj::RandomColor(NodeFillColor); QuickStyleObj::RandomColor(NodeStrokeColor); EdgeLinkOpacity = 1.0; EdgeLinkPerpendicularOffset = 0.0; EdgeLinkStrokeWidth = 1.0; QuickStyleObj::RandomColor(EdgeLinkStrokeColor); EdgeLinkDotStyle = QUICK_STYLE_SOLID_LINE; FaceFill = true; FaceStroke = true; FaceDisplacementX = 0.0; FaceDisplacementY = 0.0; FacePerpendicularOffset = 0.0; FaceFillOpacity = 1.0; QuickStyleObj::RandomColor(FaceFillColor); FaceStrokeOpacity = 1.0; FaceStrokeWidth = 1.0; QuickStyleObj::RandomColor(FaceStrokeColor); EdgeLinkSeedOpacity = 1.0; EdgeLinkSeedSize = 16; EdgeLinkSeedRotation = 0.0; EdgeLinkSeedAnchorX = 0.5; EdgeLinkSeedAnchorY = 0.5; EdgeLinkSeedDisplacementX = 0.0; EdgeLinkSeedDisplacementY = 0.0; EdgeLinkSeedWellKnownMark = QuickStyleObj::RandomWellKnownMark(); QuickStyleObj::RandomColor(EdgeLinkSeedFillColor); QuickStyleObj::RandomColor(EdgeLinkSeedStrokeColor); FaceSeedOpacity = 1.0; FaceSeedSize = 16; FaceSeedRotation = 0.0; FaceSeedAnchorX = 0.5; FaceSeedAnchorY = 0.5; FaceSeedDisplacementX = 0.0; FaceSeedDisplacementY = 0.0; FaceSeedWellKnownMark = QuickStyleObj::RandomWellKnownMark(); QuickStyleObj::RandomColor(FaceSeedFillColor); QuickStyleObj::RandomColor(FaceSeedStrokeColor); XmlStyle = NULL; } QuickStyleTopologyObj *QuickStyleTopologyObj::Clone() { // // cloning a Quick Style Topology // QuickStyleTopologyObj *Style = new QuickStyleTopologyObj(this->Type); strcpy(Style->UUID, this->UUID); Style->MinScaleEnabled = this->MinScaleEnabled; Style->MaxScaleEnabled = this->MaxScaleEnabled; Style->ScaleMin = this->ScaleMin; Style->ScaleMax = this->ScaleMax; Style->NodeOpacity = this->NodeOpacity; Style->NodeSize = this->NodeSize; Style->NodeRotation = this->NodeRotation; Style->NodeAnchorX = this->NodeAnchorX; Style->NodeAnchorY = this->NodeAnchorY; Style->NodeDisplacementX = this->NodeDisplacementX; Style->NodeDisplacementY = this->NodeDisplacementY; Style->NodeWellKnownMark = this->NodeWellKnownMark; strcpy(Style->NodeFillColor, this->NodeFillColor); strcpy(Style->NodeStrokeColor, this->NodeStrokeColor); Style->EdgeLinkOpacity = this->EdgeLinkOpacity; Style->EdgeLinkPerpendicularOffset = this->EdgeLinkPerpendicularOffset; Style->EdgeLinkStrokeWidth = this->EdgeLinkStrokeWidth; strcpy(Style->EdgeLinkStrokeColor, this->EdgeLinkStrokeColor); Style->EdgeLinkDotStyle = this->EdgeLinkDotStyle; Style->FaceFill = this->FaceFill; Style->FaceStroke = this->FaceStroke; Style->FaceDisplacementX = this->FaceDisplacementX; Style->FaceDisplacementY = this->FaceDisplacementY; Style->FacePerpendicularOffset = this->FacePerpendicularOffset; Style->FaceFillOpacity = this->FaceFillOpacity; strcpy(Style->FaceFillColor, this->FaceFillColor); Style->FaceStrokeOpacity = this->FaceStrokeOpacity; Style->FaceStrokeWidth = this->FaceStrokeWidth; strcpy(Style->FaceStrokeColor, this->FaceStrokeColor); Style->EdgeLinkSeedOpacity = this->EdgeLinkSeedOpacity; Style->EdgeLinkSeedSize = this->EdgeLinkSeedSize; Style->EdgeLinkSeedRotation = this->EdgeLinkSeedRotation; Style->EdgeLinkSeedAnchorX = this->EdgeLinkSeedAnchorX; Style->EdgeLinkSeedAnchorY = this->EdgeLinkSeedAnchorY; Style->EdgeLinkSeedDisplacementX = this->EdgeLinkSeedDisplacementX; Style->EdgeLinkSeedDisplacementY = this->EdgeLinkSeedDisplacementY; Style->EdgeLinkSeedWellKnownMark = this->EdgeLinkSeedWellKnownMark; strcpy(Style->EdgeLinkSeedFillColor, this->EdgeLinkSeedFillColor); strcpy(Style->EdgeLinkSeedStrokeColor, this->EdgeLinkSeedStrokeColor); Style->FaceSeedOpacity = this->FaceSeedOpacity; Style->FaceSeedSize = this->FaceSeedSize; Style->FaceSeedRotation = this->FaceSeedRotation; Style->FaceSeedAnchorX = this->FaceSeedAnchorX; Style->FaceSeedAnchorY = this->FaceSeedAnchorY; Style->FaceSeedDisplacementX = this->FaceSeedDisplacementX; Style->FaceSeedDisplacementY = this->FaceSeedDisplacementY; Style->FaceSeedWellKnownMark = this->FaceSeedWellKnownMark; strcpy(Style->FaceSeedFillColor, this->FaceSeedFillColor); strcpy(Style->FaceSeedStrokeColor, this->FaceSeedStrokeColor); Style->XmlStyle = NULL; return Style; } bool QuickStyleTopologyObj::Compare(QuickStyleTopologyObj * Style) { // // comparing two Quick Style objects (Topology) // if (strcmp(Style->UUID, this->UUID) != 0) return false; if (Style->MinScaleEnabled != this->MinScaleEnabled) return false; if (Style->MaxScaleEnabled != this->MaxScaleEnabled) return false; if (Style->ScaleMin != this->ScaleMin) return false; if (Style->ScaleMax != this->ScaleMax) return false; if (Style->NodeOpacity != this->NodeOpacity) return false; if (Style->NodeSize != this->NodeSize) return false; if (Style->NodeRotation != this->NodeRotation) return false; if (Style->NodeAnchorX != this->NodeAnchorX) return false; if (Style->NodeAnchorY != this->NodeAnchorY) return false; if (Style->NodeDisplacementX != this->NodeDisplacementX) return false; if (Style->NodeDisplacementY != this->NodeDisplacementY) return false; if (Style->NodeWellKnownMark != this->NodeWellKnownMark) return false; if (strcmp(Style->NodeFillColor, this->NodeFillColor) != 0) return false; if (strcmp(Style->NodeStrokeColor, this->NodeStrokeColor) != 0) return false; if (Style->EdgeLinkOpacity != this->EdgeLinkOpacity) return false; if (Style->EdgeLinkPerpendicularOffset != this->EdgeLinkPerpendicularOffset) return false; if (Style->EdgeLinkStrokeWidth != this->EdgeLinkStrokeWidth) return false; if (strcmp(Style->EdgeLinkStrokeColor, this->EdgeLinkStrokeColor) != 0) return false; if (Style->EdgeLinkDotStyle != this->EdgeLinkDotStyle) return false; if (Style->FaceFill != this->FaceFill) return false; if (Style->FaceStroke != this->FaceStroke) return false; if (Style->FaceDisplacementX != this->FaceDisplacementX) return false; if (Style->FaceDisplacementY != this->FaceDisplacementY) return false; if (Style->FacePerpendicularOffset != this->FacePerpendicularOffset) return false; if (Style->FaceFillOpacity != this->FaceFillOpacity) return false; if (strcmp(Style->FaceFillColor, this->FaceFillColor) != 0) return false; if (Style->FaceStrokeOpacity != this->FaceStrokeOpacity) return false; if (Style->FaceStrokeWidth != this->FaceStrokeWidth) return false; if (strcmp(Style->FaceStrokeColor, this->FaceStrokeColor) != 0) return false; if (Style->EdgeLinkSeedOpacity != this->EdgeLinkSeedOpacity) return false; if (Style->EdgeLinkSeedSize != this->EdgeLinkSeedSize) return false; if (Style->EdgeLinkSeedRotation != this->EdgeLinkSeedRotation) return false; if (Style->EdgeLinkSeedAnchorX != this->EdgeLinkSeedAnchorX) return false; if (Style->EdgeLinkSeedAnchorY != this->EdgeLinkSeedAnchorY) return false; if (Style->EdgeLinkSeedDisplacementX != this->EdgeLinkSeedDisplacementX) return false; if (Style->EdgeLinkSeedDisplacementY != this->EdgeLinkSeedDisplacementY) return false; if (Style->EdgeLinkSeedWellKnownMark != this->EdgeLinkSeedWellKnownMark) return false; if (strcmp(Style->EdgeLinkSeedFillColor, this->EdgeLinkSeedFillColor) != 0) return false; if (strcmp(Style->EdgeLinkSeedStrokeColor, this->EdgeLinkSeedStrokeColor) != 0) return false; if (Style->FaceSeedOpacity != this->FaceSeedOpacity) return false; if (Style->FaceSeedSize != this->FaceSeedSize) return false; if (Style->FaceSeedRotation != this->FaceSeedRotation) return false; if (Style->FaceSeedAnchorX != this->FaceSeedAnchorX) return false; if (Style->FaceSeedAnchorY != this->FaceSeedAnchorY) return false; if (Style->FaceSeedDisplacementX != this->FaceSeedDisplacementX) return false; if (Style->FaceSeedDisplacementY != this->FaceSeedDisplacementY) return false; if (Style->FaceSeedWellKnownMark != this->FaceSeedWellKnownMark) return false; if (strcmp(Style->FaceSeedFillColor, this->FaceSeedFillColor) != 0) return false; if (strcmp(Style->FaceSeedStrokeColor, this->FaceSeedStrokeColor) != 0) return false; return true; } void QuickStyleTopologyObj::UpdateXmlStyle() { // // updating the XML Style // if (XmlStyle != NULL) sqlite3_free(XmlStyle); XmlStyle = CreateXmlStyle(); } char *QuickStyleTopologyObj::CreateXmlStyle() { // // creating the XML Style // const char *cstr; char *prev; char *xml2; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; xml = sqlite3_mprintf("%s<FeatureTypeStyle version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - Topology"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; if (Type == MAP_LAYER_NETWORK) { // Links xml2 = DoCreateEdgeLinkXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // Nodes xml2 = DoCreateNodeXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // LinkSeeds xml2 = DoCreateEdgeLinkSeedXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } } else { // Faces xml2 = DoCreateFaceXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // Edges xml2 = DoCreateEdgeLinkXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // Nodes xml2 = DoCreateNodeXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // EdgeSeeds xml2 = DoCreateEdgeLinkSeedXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // EdgeSeeds xml2 = DoCreateFaceSeedXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } } xml = sqlite3_mprintf("%s</FeatureTypeStyle>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateFaceXML() { // // creating the XML Style - Face // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t<Name>Face</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>face</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PolygonSymbolizer>\r\n", prev, extra); prev = xml; if (FaceFill == true) { // Polygon Fill xml = sqlite3_mprintf("%s%s\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, FaceFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, FaceFillOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FaceStroke == true) { // Polygon Stroke xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, FaceStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, FaceStrokeOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, FaceStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FaceDisplacementX != 0.0 || FaceDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, FaceDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, FaceDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FacePerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.4f</PerpendicularOffset>\r\n", prev, extra, FacePerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</PolygonSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateEdgeLinkXML() { // // creating the XML Style - Edge or Link // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t<Name>Link</Name>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t<Name>Edge</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>link</ogc:Literal>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>edge</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<LineSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, EdgeLinkStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, EdgeLinkOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, EdgeLinkStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; const char *dashArray; switch (EdgeLinkDotStyle) { case QUICK_STYLE_DOT_LINE: dashArray = "5.0, 10.0"; break; case QUICK_STYLE_DASH_LINE: dashArray = "20.0, 20.0"; break; case QUICK_STYLE_DASH_DOT_LINE: dashArray = "20.0, 10.0, 5.0, 10.0"; break; default: dashArray = NULL; break; }; if (dashArray != NULL) { xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-dasharray\">%s</SvgParameter>\r\n", prev, extra, dashArray); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (EdgeLinkPerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.2f</PerpendicularOffset>\r\n", prev, extra, EdgeLinkPerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</LineSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateNodeXML() { // // creating the XML Style - Node // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t<Name>Node</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>node</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (NodeWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, NodeFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, NodeStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (NodeOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, NodeOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, NodeSize); sqlite3_free(prev); prev = xml; if (NodeRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, NodeRotation); sqlite3_free(prev); prev = xml; } if (NodeAnchorX != 0.5 || NodeAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, NodeAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, NodeAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (NodeDisplacementX != 0.0 || NodeDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, NodeDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, NodeDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateEdgeLinkSeedXML() { // // creating the XML Style - Edge or Link Seed // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t<Name>LinkSeed</Name>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t<Name>EdgeSeed</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>link_seed</ogc:Literal>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>edge_seed</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (EdgeLinkSeedWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, EdgeLinkSeedFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, EdgeLinkSeedStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (EdgeLinkSeedOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, EdgeLinkSeedOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, EdgeLinkSeedSize); sqlite3_free(prev); prev = xml; if (EdgeLinkSeedRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, EdgeLinkSeedRotation); sqlite3_free(prev); prev = xml; } if (EdgeLinkSeedAnchorX != 0.5 || EdgeLinkSeedAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, EdgeLinkSeedAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, EdgeLinkSeedAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (EdgeLinkSeedDisplacementX != 0.0 || EdgeLinkSeedDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, EdgeLinkSeedDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, EdgeLinkSeedDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateFaceSeedXML() { // // creating the XML Style - FaceSeed // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t<Name>FaceSeed</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>face_seed</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (FaceSeedWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, FaceSeedFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, FaceSeedStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (FaceSeedOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, FaceSeedOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, FaceSeedSize); sqlite3_free(prev); prev = xml; if (FaceSeedRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, FaceSeedRotation); sqlite3_free(prev); prev = xml; } if (FaceSeedAnchorX != 0.5 || FaceSeedAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, FaceSeedAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, FaceSeedAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FaceSeedDisplacementX != 0.0 || FaceSeedDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, FaceSeedDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, FaceSeedDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } const unsigned char *QuickStyleTopologyObj::CloneXmlStyle() { // // cloning the XML Style definition // if (XmlStyle == NULL) XmlStyle = CreateXmlStyle(); if (XmlStyle == NULL) return NULL; int len = strlen(XmlStyle); char *cloned = (char *) malloc(len + 1); strcpy(cloned, XmlStyle); return (const unsigned char *) cloned; } bool QuickStyleVectorDialog::Create(MyMapPanel * parent, MapLayer * layer, int type) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; Type = type; DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); IsConfigChanged = false; if (wxPropertySheetDialog::Create (parent, wxID_ANY, wxT("QuickStyle (Vector) Edit")) == false) return false; if (Layer->GetQuickStyle() != NULL) Style = Layer->CloneQuickStyle(); else Style = new QuickStyleObj(Type); wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels int next = 1; PagePointIndex = 0; PageLineIndex = 0; PagePolygonIndex = 0; PageTextPointIndex = 0; PageTextLineIndex = 0; wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_GEOMETRY) { wxPanel *pointPage = CreatePointPage(book); book->AddPage(pointPage, wxT("Point Symbolizer"), false); PagePointIndex = next++; } if (Type == QUICK_STYLE_LINE || Type == QUICK_STYLE_GEOMETRY) { wxPanel *linePage = CreateLinePage(book); book->AddPage(linePage, wxT("Line Symbolyzer"), false); PageLineIndex = next++; } if (Type == QUICK_STYLE_POLYGON || Type == QUICK_STYLE_GEOMETRY) { wxPanel *polygonPage = CreatePolygonPage(book); book->AddPage(polygonPage, wxT("Polygon Symbolizer"), false); PagePolygonIndex = next++; } if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_POLYGON) { wxPanel *textPointPage = CreateTextPointPage(book); book->AddPage(textPointPage, wxT("Text Symbolizer"), false); PageTextPointIndex = next++; } if (Type == QUICK_STYLE_LINE) { wxPanel *textLinePage = CreateTextLinePage(book); book->AddPage(textLinePage, wxT("Text Symbolizer"), false); PageTextLineIndex = next++; } CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & QuickStyleVectorDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnQuit); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnOk); Connect(ID_QUICK_STYLE_APPLY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnApply); Connect(ID_QUICK_STYLE_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnExport); Connect(ID_QUICK_STYLE_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } void QuickStyleVectorDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *save = new wxButton(this, ID_QUICK_STYLE_APPLY, wxT("&Apply")); btnBox->Add(save, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_QUICK_STYLE_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_QUICK_STYLE_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } wxPanel *QuickStyleVectorDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // First row: Layer name boxSizer->AddSpacer(50); wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *nameSizer = new wxBoxSizer(wxVERTICAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *nameBox = new wxStaticBox(panel, wxID_ANY, wxT("Layer FullName"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString fullName = DbPrefix + wxT(".") + LayerName; wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_VECTOR_LAYER, fullName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *typeBox = new wxStaticBox(panel, wxID_ANY, wxT("Geometry Type"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *typeBoxSizer = new wxStaticBoxSizer(typeBox, wxHORIZONTAL); nameSizer->Add(typeBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString typeName = wxT("UNKNOWN"); if (Type == QUICK_STYLE_POINT) typeName = wxT("POINT-Type Geometries"); if (Type == QUICK_STYLE_LINE) typeName = wxT("LINE-Type Geometries"); if (Type == QUICK_STYLE_POLYGON) typeName = wxT("POLYGON-Type Geometries"); if (Type == QUICK_STYLE_GEOMETRY) typeName = wxT("MIXED-Type Geometries"); wxTextCtrl *typeCtrl = new wxTextCtrl(panel, ID_VECTOR_TYPE, typeName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); typeBoxSizer->Add(typeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *uuidBox = new wxStaticBox(panel, wxID_ANY, wxT("QuickStyle Name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *uuidBoxSizer = new wxStaticBoxSizer(uuidBox, wxHORIZONTAL); nameSizer->Add(uuidBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString uuid = wxString::FromUTF8(Style->GetUUID()); wxTextCtrl *uuidCtrl = new wxTextCtrl(panel, ID_VECTOR_UUID, uuid, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); uuidBoxSizer->Add(uuidCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); boxSizer->AddSpacer(25); // second row: Visibility Range wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdScaleChanged); return panel; } void QuickStyleVectorDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: Style->EnableMinScale(false); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: Style->EnableMinScale(true); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: Style->EnableMinScale(false); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: Style->EnableMinScale(true); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *QuickStyleVectorDialog::CreatePointPage(wxWindow * parent) { // // creating the Point Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorPoint and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor Point wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Point"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdMarkChanged); Connect(ID_SYMBOLIZER_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorFillPicker); Connect(ID_SYMBOLIZER_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorFillChanged); Connect(ID_SYMBOLIZER_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorStrokePicker); Connect(ID_SYMBOLIZER_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorStrokeChanged); return panel; } void QuickStyleVectorDialog::OnCmdMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleVectorDialog:: OnCmdPointColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPointColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdPointColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPointColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleVectorDialog::CreateLinePage(wxWindow * parent) { // // creating the Line Symbolizer page // wxString StrokeColor = wxT("#000000"); wxPanel *panel = new wxPanel(parent, ID_PANE_LINE); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #1 Opacity and Perpendicular Offset boxSizer->AddSpacer(50); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxHORIZONTAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); opacityBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); colorBoxSizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString dot[4]; dot[0] = wxT("&Solid Line"); dot[1] = wxT("&Dotted Line"); dot[2] = wxT("&Dashed Line"); dot[3] = wxT("&Dashed/Dotted Line"); wxRadioBox *dotBox = new wxRadioBox(panel, ID_SYMBOLIZER_DASH_DOT, wxT("&Dash/Dot Style"), wxDefaultPosition, wxDefaultSize, 4, dot, 1, wxRA_SPECIFY_COLS); dotBox->SetSelection(0); dashBoxSizer->Add(dotBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLineColorChanged); Connect(ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLineColorPicker); return panel; } void QuickStyleVectorDialog:: OnCmdLineColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdLineColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleVectorDialog::CreatePolygonPage(wxWindow * parent) { // // creating the Polygon Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_FILL2); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the Polygon Displacement and Perpendicular Offset wxBoxSizer *polygonBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(polygonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row A: Displacement wxBoxSizer *displacementBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(displacementBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); displacementBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive: larger. / Negative: smaller.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Drawing polygons smaller or larger than their actual geometry (Buffer).")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Fill Opacity wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon Fill"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxHORIZONTAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsPolygonFill()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); enableSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FILL2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(400, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(Style->IsPolygonFill()); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Fill Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); auxSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sampleCtrl->Enable(Style->IsPolygonFill()); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_FILL2_PICKER_BTN, wxT("&Pick a color")); pick->Enable(Style->IsPolygonFill()); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // first row A: the Stroke #1 Opacity wxBoxSizer *opacity2BoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacity2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enable2Sizer = new wxStaticBoxSizer(enableBox, wxHORIZONTAL); opacity2BoxSizer->Add(enable2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enable2Ctrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enable2Ctrl->SetValue(Style->IsPolygonStroke()); enable2Sizer->Add(enable2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *opacity2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacity2Sizer = new wxStaticBoxSizer(opacity2Box, wxVERTICAL); enable2Sizer->Add(opacity2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacity2Ctrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(250, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacity2Ctrl->Enable(Style->IsPolygonStroke()); opacity2Sizer->Add(opacity2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color wxStaticBox *color2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *color2Sizer = new wxStaticBoxSizer(color2Box, wxVERTICAL); enable2Sizer->Add(color2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *color3Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(color3Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *color2Ctrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color2Ctrl->Enable(Style->IsPolygonStroke()); color3Sizer->Add(color2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sample2Ctrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sample2Ctrl->Enable(Style->IsPolygonStroke()); color3Sizer->Add(sample2Ctrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *picker2Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(picker2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick2 = new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color")); pick2->Enable(Style->IsPolygonStroke()); picker2Sizer->Add(pick2, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width, wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); enable2Sizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonStrokeChanged); Connect(ID_SYMBOLIZER_FILL2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonFillChanged); Connect(ID_SYMBOLIZER_FILL2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorFillChanged); Connect(ID_SYMBOLIZER_FILL2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorFillPicker); Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorStrokeChanged); Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorStrokePicker); return panel; } void QuickStyleVectorDialog:: OnCmdPolygonStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetPolygonStroke(true); else Style->SetPolygonStroke(false); RetrievePolygonPage(false); UpdatePolygonPage(); } void QuickStyleVectorDialog:: OnCmdPolygonFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetPolygonFill(true); else Style->SetPolygonFill(false); RetrievePolygonPage(false); UpdatePolygonPage(); } void QuickStyleVectorDialog:: OnCmdPolygonColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPolygonColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdPolygonColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPolygonColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } bool QuickStyleVectorDialog::DoCheckDatasource(const char *prefix, const char *coverage, char *table, char *geometry) { // // retrieving the real table and geometry column names // sqlite3 *sqlite = MainFrame->GetSqlite(); char *sql; int ret; char **results; int rows; int columns; int i; char *qprefix; bool ok = false; qprefix = gaiaDoubleQuotedSql(prefix); sql = sqlite3_mprintf("SELECT f_table_name, f_geometry_column, view_name, " "view_geometry, virt_name, virt_geometry " "FROM \"%s\".vector_coverages WHERE coverage_name = %Q", qprefix, coverage); free(qprefix); ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return false; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *t = results[(i * columns) + 0]; const char *g = results[(i * columns) + 1]; if (t != NULL && g != NULL) { strcpy(table, t); strcpy(geometry, g); ok = true; } t = results[(i * columns) + 2]; g = results[(i * columns) + 3]; if (t != NULL && g != NULL) { strcpy(table, t); strcpy(geometry, g); ok = true; } t = results[(i * columns) + 4]; g = results[(i * columns) + 5]; if (t != NULL && g != NULL) { strcpy(table, t); strcpy(geometry, g); ok = true; } } } sqlite3_free_table(results); return ok; } void QuickStyleVectorDialog::InitializeComboColumns(wxComboBox * ctrl) { // // initializing a Column list ComboBox // sqlite3 *sqlite = MainFrame->GetSqlite(); char *sql; int ret; char **results; int rows; int columns; int i; char prefix[1024]; char coverage[1024]; char table[1024]; char geometry[1024]; char *qprefix; char *qtable; char *qgeometry; if (DbPrefix.Len() == 0) strcpy(prefix, "MAIN"); else strcpy(prefix, DbPrefix.ToUTF8()); strcpy(coverage, LayerName.ToUTF8()); if (DoCheckDatasource(prefix, coverage, table, geometry) != true) return; qprefix = gaiaDoubleQuotedSql(prefix); qtable = gaiaDoubleQuotedSql(table); sql = sqlite3_mprintf("PRAGMA \"%s\".table_info(\"%s\")", qprefix, qtable); free(qprefix); free(qtable); ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *value = results[(i * columns) + 1]; if (strcasecmp(value, geometry) == 0) continue; // skipping the Geometry column wxString col = wxString::FromUTF8(value); ctrl->Append(col); } } sqlite3_free_table(results); } void QuickStyleVectorDialog::InitializeComboFonts(wxComboBox * ctrl) { // // initializing a Font list ComboBox // sqlite3 *sqlite = MainFrame->GetSqlite(); char *sql; int ret; char **results; int rows; int columns; int i; char prefix[1024]; char *qprefix; // inserting the default TOY FONTS wxString font = wxT("ToyFont: serif"); ctrl->Append(font); font = wxT("ToyFont: sans-serif"); ctrl->Append(font); font = wxT("ToyFont: monospace"); ctrl->Append(font); if (DbPrefix.Len() == 0) strcpy(prefix, "MAIN"); else strcpy(prefix, DbPrefix.ToUTF8()); qprefix = gaiaDoubleQuotedSql(prefix); sql = sqlite3_mprintf ("SELECT font_facename FROM \"%s\".SE_fonts ORDER BY font_facename", qprefix); free(qprefix); ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *value = results[(i * columns) + 0]; wxString col = wxString::FromUTF8(value); ctrl->Append(col); } } sqlite3_free_table(results); } wxPanel *QuickStyleVectorDialog::CreateTextPointPage(wxWindow * parent) { // // creating the Text Symbolizer page (Point Placement) // wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_TEXT1); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // enable/disable Labels wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Labels"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsLabelPrint()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); wxStaticText *columnLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Column:")); enableSizer->Add(columnLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxComboBox *columnList = new wxComboBox(panel, ID_SYMBOLIZER_TEXT1_LABEL, wxT(""), wxDefaultPosition, wxSize(400, 22), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboColumns(columnList); enableSizer->Add(columnList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *fontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *font9Sizer = new wxStaticBoxSizer(fontBox, wxHORIZONTAL); auxSizer->Add(font9Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Second row: Font Name, Size and Fill wxBoxSizer *fontSizer = new wxBoxSizer(wxHORIZONTAL); font9Sizer->Add(fontSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *font0Sizer = new wxBoxSizer(wxHORIZONTAL); fontSizer->Add(font0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Name wxBoxSizer *fontXSizer = new wxBoxSizer(wxVERTICAL); font0Sizer->Add(fontXSizer, 0, wxALIGN_LEFT | wxALL, 0); wxComboBox *fontList = new wxComboBox(panel, ID_SYMBOLIZER_FONT1_NAME, wxT(""), wxDefaultPosition, wxSize(250, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboFonts(fontList); fontList->Select(0); fontXSizer->Add(fontList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font Size wxBoxSizer *fontYSizer = new wxBoxSizer(wxHORIZONTAL); fontXSizer->Add(fontYSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxHORIZONTAL); fontYSizer->Add(sizeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT1_SIZE, wxT("15.0"), wxDefaultPosition, wxSize(100, 22)); sizeSizer->Add(sizeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *boldBoxSizer = new wxBoxSizer(wxVERTICAL); fontYSizer->Add(boldBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *boldBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *boldSizer = new wxStaticBoxSizer(boldBox, wxVERTICAL); boldBoxSizer->Add(boldSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *italicSizer = new wxBoxSizer(wxVERTICAL); boldSizer->Add(italicSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *italicCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_ITALIC, wxT("Italic"), wxDefaultPosition, wxDefaultSize); italicCtrl->SetValue(false); italicCtrl->Enable(false); italicSizer->Add(italicCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxCheckBox *boldCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_BOLD, wxT("Bold"), wxDefaultPosition, wxDefaultSize); boldCtrl->SetValue(false); boldCtrl->Enable(false); italicSizer->Add(boldCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Opacity wxStaticBox *opacityFontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityFontSizer = new wxStaticBoxSizer(opacityFontBox, wxVERTICAL); fontSizer->Add(opacityFontSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityFontCtrl = new wxSlider(panel, ID_SYMBOLIZER_FONT1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(150, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityFontSizer->Add(opacityFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font color wxStaticBox *fontColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fontColorSizer = new wxStaticBoxSizer(fontColorBox, wxVERTICAL); fontSizer->Add(fontColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *font2Sizer = new wxBoxSizer(wxHORIZONTAL); fontColorSizer->Add(font2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *fontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT1_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); font2Sizer->Add(fontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFontCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FONT1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); font2Sizer->Add(sampleFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickFont = new wxButton(panel, ID_SYMBOLIZER_FONT1_PICKER_BTN, wxT("&Pick a color")); fontColorSizer->Add(pickFont, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: PointPlacement wxBoxSizer *pointBoxSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(pointBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *pointBox = new wxStaticBox(panel, wxID_STATIC, wxT("Label Point Placement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *pointSizer = new wxStaticBoxSizer(pointBox, wxHORIZONTAL); pointBoxSizer->Add(pointSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row A: Anchor Point wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Point"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); pointSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(60, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(60, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); pointSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row C: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); pointSizer->Add(rotSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font Halo wxStaticBox *haloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Halo"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloSizer = new wxStaticBoxSizer(haloBox, wxVERTICAL); pointBoxSizer->Add(haloSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *halo1Sizer = new wxBoxSizer(wxHORIZONTAL); haloSizer->Add(halo1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enableHaloCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_HALO1_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableHaloCtrl->SetValue(Style->IsHaloEnabled()); enableHaloCtrl->Enable(false); halo1Sizer->Add(enableHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo Radius wxStaticBox *radiusBox = new wxStaticBox(panel, wxID_STATIC, wxT("Radius"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *radiusSizer = new wxStaticBoxSizer(radiusBox, wxVERTICAL); halo1Sizer->Add(radiusSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *radiusCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO1_RADIUS, wxT("1.0"), wxDefaultPosition, wxSize(50, 22)); radiusCtrl->Enable(false); radiusSizer->Add(radiusCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo Opacity wxStaticBox *opacityHaloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityHaloSizer = new wxStaticBoxSizer(opacityHaloBox, wxVERTICAL); halo1Sizer->Add(opacityHaloSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxSlider *opacityHaloCtrl = new wxSlider(panel, ID_SYMBOLIZER_HALO1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(75, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityHaloSizer->Add(opacityHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); opacityHaloCtrl->Enable(false); // Halo color wxStaticBox *haloColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloColorSizer = new wxStaticBoxSizer(haloColorBox, wxHORIZONTAL); haloSizer->Add(haloColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *haloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO1_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); haloColorSizer->Add(haloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); haloCtrl->Enable(false); color = wxColour(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleHaloCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_HALO1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); haloColorSizer->Add(sampleHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickHalo = new wxButton(panel, ID_SYMBOLIZER_HALO1_PICKER_BTN, wxT("&Pick a color")); haloColorSizer->Add(pickHalo, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); pickHalo->Enable(false); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_TEXT1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLabel1Changed); Connect(ID_SYMBOLIZER_FONT1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont1ColorPicker); Connect(ID_SYMBOLIZER_FONT1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont1ColorChanged); Connect(ID_SYMBOLIZER_FONT1_NAME, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnFont1Changed); Connect(ID_SYMBOLIZER_HALO1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdHalo1EnableChanged); Connect(ID_SYMBOLIZER_HALO1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo1Picker); Connect(ID_SYMBOLIZER_HALO1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo1Changed); return panel; } void QuickStyleVectorDialog:: OnCmdLabel1Changed(wxCommandEvent & WXUNUSED(event)) { // // Label enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ENABLE); if (enableCtrl->IsChecked() == true) { Style->SetLabelPrint(true); Style->SetLabelLinePlacement(false); } else Style->SetLabelPrint(false); RetrieveTextPointPage(false); UpdateTextPointPage(); } void QuickStyleVectorDialog::OnFont1Changed(wxCommandEvent & WXUNUSED(event)) { // // the Font is changed // wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC); wxComboBox *fontList = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME); wxString font = fontList->GetValue(); char facename[1024]; strcpy(facename, font.ToUTF8()); if (strncmp(facename, "ToyFont: ", 9) == 0) { boldCtrl->Enable(true); italicCtrl->Enable(true); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(facename, &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } void QuickStyleVectorDialog:: OnCmdFont1ColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdFont1ColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Font Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FONT1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdColorHalo1Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdColorHalo1Changed(wxCommandEvent & WXUNUSED(event)) { // // Halo Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_HALO1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdHalo1EnableChanged(wxCommandEvent & WXUNUSED(event)) { // // Graphic Halo enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO1_ENABLE); if (enableCtrl->IsChecked() == true) Style->EnableHalo(true); else Style->EnableHalo(false); RetrieveTextPointPage(false); UpdateTextPointPage(); } wxPanel *QuickStyleVectorDialog::CreateTextLinePage(wxWindow * parent) { // // creating the Text Symbolizer page (Line Placement) // wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_TEXT1); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // enable/disable Labels wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Labels"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsLabelPrint()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); wxStaticText *columnLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Column:")); enableSizer->Add(columnLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxComboBox *columnList = new wxComboBox(panel, ID_SYMBOLIZER_TEXT2_LABEL, wxT(""), wxDefaultPosition, wxSize(400, 22), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboColumns(columnList); enableSizer->Add(columnList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *fontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *font9Sizer = new wxStaticBoxSizer(fontBox, wxHORIZONTAL); auxSizer->Add(font9Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Second row: Font Name, Size and Fill wxBoxSizer *fontSizer = new wxBoxSizer(wxHORIZONTAL); font9Sizer->Add(fontSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *font0Sizer = new wxBoxSizer(wxHORIZONTAL); fontSizer->Add(font0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Name wxBoxSizer *fontXSizer = new wxBoxSizer(wxVERTICAL); font0Sizer->Add(fontXSizer, 0, wxALIGN_LEFT | wxALL, 0); wxComboBox *fontList = new wxComboBox(panel, ID_SYMBOLIZER_FONT2_NAME, wxT(""), wxDefaultPosition, wxSize(250, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboFonts(fontList); fontList->Select(0); fontXSizer->Add(fontList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font Size wxBoxSizer *fontYSizer = new wxBoxSizer(wxHORIZONTAL); fontXSizer->Add(fontYSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); fontYSizer->Add(sizeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT2_SIZE, wxT("15.0"), wxDefaultPosition, wxSize(100, 22)); sizeSizer->Add(sizeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *boldBoxSizer = new wxBoxSizer(wxHORIZONTAL); fontYSizer->Add(boldBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *boldBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *boldSizer = new wxStaticBoxSizer(boldBox, wxHORIZONTAL); boldBoxSizer->Add(boldSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *italicSizer = new wxBoxSizer(wxHORIZONTAL); boldSizer->Add(italicSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *italicCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_ITALIC, wxT("Italic"), wxDefaultPosition, wxDefaultSize); italicCtrl->SetValue(false); italicCtrl->Enable(false); italicSizer->Add(italicCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxCheckBox *boldCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_BOLD, wxT("Bold"), wxDefaultPosition, wxDefaultSize); boldCtrl->SetValue(false); boldCtrl->Enable(false); italicSizer->Add(boldCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Opacity wxStaticBox *opacityFontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityFontSizer = new wxStaticBoxSizer(opacityFontBox, wxVERTICAL); fontSizer->Add(opacityFontSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityFontCtrl = new wxSlider(panel, ID_SYMBOLIZER_FONT2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(150, 35), wxSL_HORIZONTAL | wxSL_LABELS); opacityFontSizer->Add(opacityFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font color wxStaticBox *fontColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fontColorSizer = new wxStaticBoxSizer(fontColorBox, wxHORIZONTAL); fontSizer->Add(fontColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *font2Sizer = new wxBoxSizer(wxVERTICAL); fontColorSizer->Add(font2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *fontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); font2Sizer->Add(fontCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFontCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FONT2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fontColorSizer->Add(sampleFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickFont = new wxButton(panel, ID_SYMBOLIZER_FONT2_PICKER_BTN, wxT("&Pick a color")); font2Sizer->Add(pickFont, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // second row: LinePlacement wxBoxSizer *lineBoxSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(lineBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *lineBox = new wxStaticBox(panel, wxID_STATIC, wxT("Label Line Placement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *lineSizer = new wxStaticBoxSizer(lineBox, wxVERTICAL); lineBoxSizer->Add(lineSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row A: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); lineSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); perpendicularCtrl->Enable(false); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row B: IsRepeated, InitialGap and Gap wxBoxSizer *repeatedBoxSizer = new wxBoxSizer(wxHORIZONTAL); lineSizer->Add(repeatedBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *repeatedBox = new wxStaticBox(panel, wxID_STATIC, wxT("Repeated Label"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *repeatedSizer = new wxStaticBoxSizer(repeatedBox, wxHORIZONTAL); repeatedBoxSizer->Add(repeatedSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *isRepeatedCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_IS_REPEATED, wxT("Repeated"), wxDefaultPosition, wxDefaultSize); isRepeatedCtrl->SetValue(false); isRepeatedCtrl->Enable(false); repeatedSizer->Add(isRepeatedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *inigapBox = new wxStaticBox(panel, wxID_STATIC, wxT("Initial Gap"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *inigapSizer = new wxStaticBoxSizer(inigapBox, wxVERTICAL); repeatedSizer->Add(inigapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *inigapCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_INITIAL_GAP, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); inigapCtrl->Enable(false); inigapSizer->Add(inigapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *gapBox = new wxStaticBox(panel, wxID_STATIC, wxT("Gap"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *gapSizer = new wxStaticBoxSizer(gapBox, wxVERTICAL); repeatedSizer->Add(gapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *gapCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_GAP, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); gapCtrl->Enable(false); gapSizer->Add(gapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row C: IsAligned and Generalize wxBoxSizer *optBoxSizer = new wxBoxSizer(wxHORIZONTAL); repeatedBoxSizer->Add(optBoxSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC, wxT("Options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxVERTICAL); optBoxSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *isAlignedCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_IS_ALIGNED, wxT("Aligned"), wxDefaultPosition, wxDefaultSize); isAlignedCtrl->SetValue(false); isAlignedCtrl->Enable(false); optSizer->Add(isAlignedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *generalizeCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_GENERALIZE, wxT("Generalize"), wxDefaultPosition, wxDefaultSize); generalizeCtrl->SetValue(false); generalizeCtrl->Enable(false); optSizer->Add(generalizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo wxBoxSizer *haloBoxSizer = new wxBoxSizer(wxVERTICAL); lineBoxSizer->Add(haloBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *haloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Halo"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloSizer = new wxStaticBoxSizer(haloBox, wxVERTICAL); haloBoxSizer->Add(haloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *halo0Sizer = new wxBoxSizer(wxHORIZONTAL); haloSizer->Add(halo0Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *enableHaloCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_HALO2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableHaloCtrl->SetValue(Style->IsHaloEnabled()); enableHaloCtrl->Enable(false); halo0Sizer->Add(enableHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo Radius wxStaticBox *radiusBox = new wxStaticBox(panel, wxID_STATIC, wxT("Radius"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *radiusSizer = new wxStaticBoxSizer(radiusBox, wxVERTICAL); halo0Sizer->Add(radiusSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxTextCtrl *radiusCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO2_RADIUS, wxT("1.0"), wxDefaultPosition, wxSize(50, 22)); radiusCtrl->Enable(false); radiusSizer->Add(radiusCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // Halo Opacity wxStaticBox *opacityHaloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityHaloSizer = new wxStaticBoxSizer(opacityHaloBox, wxVERTICAL); haloSizer->Add(opacityHaloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxSlider *opacityHaloCtrl = new wxSlider(panel, ID_SYMBOLIZER_HALO2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(130, 35), wxSL_HORIZONTAL | wxSL_LABELS); opacityHaloSizer->Add(opacityHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); opacityHaloCtrl->Enable(false); // Halo color wxStaticBox *haloColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloColorSizer = new wxStaticBoxSizer(haloColorBox, wxHORIZONTAL); haloSizer->Add(haloColorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxBoxSizer *halo2Sizer = new wxBoxSizer(wxVERTICAL); haloColorSizer->Add(halo2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *haloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); halo2Sizer->Add(haloCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); haloCtrl->Enable(false); color = wxColour(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleHaloCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_HALO2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); haloColorSizer->Add(sampleHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickHalo = new wxButton(panel, ID_SYMBOLIZER_HALO2_PICKER_BTN, wxT("&Pick a color")); halo2Sizer->Add(pickHalo, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); pickHalo->Enable(false); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_TEXT2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLabel2Changed); Connect(ID_SYMBOLIZER_FONT2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont2ColorPicker); Connect(ID_SYMBOLIZER_FONT2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont2ColorChanged); Connect(ID_SYMBOLIZER_TEXT_IS_REPEATED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdIsRepeatedChanged); Connect(ID_SYMBOLIZER_TEXT_IS_ALIGNED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdIsAlignedChanged); Connect(ID_SYMBOLIZER_TEXT_GENERALIZE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdGeneralizeLineChanged); Connect(ID_SYMBOLIZER_FONT2_NAME, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnFont2Changed); Connect(ID_SYMBOLIZER_HALO2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdHalo2EnableChanged); Connect(ID_SYMBOLIZER_HALO2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo2Picker); Connect(ID_SYMBOLIZER_HALO2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo2Changed); return panel; } void QuickStyleVectorDialog:: OnCmdLabel2Changed(wxCommandEvent & WXUNUSED(event)) { // // Label enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ENABLE); if (enableCtrl->IsChecked() == true) { Style->SetLabelPrint(true); Style->SetLabelLinePlacement(true); } else Style->SetLabelPrint(false); RetrieveTextLinePage(false); UpdateTextLinePage(); } void QuickStyleVectorDialog::OnFont2Changed(wxCommandEvent & WXUNUSED(event)) { // // the Font is changed // wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC); wxComboBox *fontList = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME); wxString font = fontList->GetValue(); char facename[1024]; strcpy(facename, font.ToUTF8()); if (strncmp(facename, "ToyFont: ", 9) == 0) { boldCtrl->Enable(true); italicCtrl->Enable(true); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(facename, &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } void QuickStyleVectorDialog:: OnCmdFont2ColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdFont2ColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Font Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FONT2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdIsRepeatedChanged(wxCommandEvent & WXUNUSED(event)) { // // Label IsRepeated enable/disable // wxCheckBox *repeatedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_REPEATED); if (repeatedCtrl->IsChecked() == true) Style->SetRepeatedLabel(true); else Style->SetRepeatedLabel(false); RetrieveTextLinePage(false); UpdateTextLinePage(); } void QuickStyleVectorDialog:: OnCmdIsAlignedChanged(wxCommandEvent & WXUNUSED(event)) { // // Label IsAligned enable/disable // wxCheckBox *alignedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_ALIGNED); if (alignedCtrl->IsChecked() == true) Style->SetLabelIsAligned(true); else Style->SetLabelIsAligned(false); } void QuickStyleVectorDialog:: OnCmdGeneralizeLineChanged(wxCommandEvent & WXUNUSED(event)) { // // Label GeneralizeLine enable/disable // wxCheckBox *generalizeCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_GENERALIZE); if (generalizeCtrl->IsChecked() == true) Style->SetLabelGeneralizeLine(true); else Style->SetLabelGeneralizeLine(false); } void QuickStyleVectorDialog:: OnCmdColorHalo2Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdColorHalo2Changed(wxCommandEvent & WXUNUSED(event)) { // // Halo Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_HALO2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdHalo2EnableChanged(wxCommandEvent & WXUNUSED(event)) { // // Graphic Halo enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO2_ENABLE); if (enableCtrl->IsChecked() == true) Style->EnableHalo(true); else Style->EnableHalo(false); RetrieveTextLinePage(false); UpdateTextLinePage(); } bool QuickStyleVectorDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // double min = Style->GetScaleMin(); double max = Style->GetScaleMax(); if (Style->IsMinScaleEnabled() == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&min) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (min < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMaxScaleEnabled() == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&max) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (max < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() == true) { if (min >= max) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Style->SetScaleMin(min); Style->SetScaleMax(max); return true; } void QuickStyleVectorDialog::UpdateMainPage() { // // updating the MAIN page // wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(0); else if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(1); else if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (Style->IsMinScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMin()); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (Style->IsMaxScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMax()); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } } bool QuickStyleVectorDialog::RetrievePointPage(bool check) { // // retrieving params from the Point Symbolizer page // double opacity; double size; double rotation; double anchorPointX; double anchorPointY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorPointX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointX < 0.0 || anchorPointX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorPointY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointY < 0.0 || anchorPointY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetSymbolOpacity(opacity); Style->SetSymbolSize(size); Style->SetSymbolAnchorX(anchorPointX); Style->SetSymbolAnchorY(anchorPointY); Style->SetSymbolRotation(rotation); Style->SetSymbolDisplacementX(displacementX); Style->SetSymbolDisplacementY(displacementY); Style->SetSymbolFillColor(fillColor); Style->SetSymbolStrokeColor(strokeColor); return true; } void QuickStyleVectorDialog::UpdatePointPage() { // // updating the Point Symbolizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); opacityCtrl->SetValue(Style->GetSymbolOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetSymbolSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); sprintf(dummy, "%1.2f", Style->GetSymbolRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetSymbolAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetSymbolAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetSymbolDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetSymbolDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK); switch (Style->GetSymbolWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetSymbolFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetSymbolStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } bool QuickStyleVectorDialog::RetrieveLinePage(bool check) { // // retrieving params from the Line Symbolizer page // double opacity; double perpendicularOffset; char strokeColor[8]; double strokeWidth; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&strokeWidth) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (strokeWidth <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (dotCtrl->GetSelection()) { case 1: Style->SetLineDotStyle(QUICK_STYLE_DOT_LINE); break; case 2: Style->SetLineDotStyle(QUICK_STYLE_DASH_LINE); break; case 3: Style->SetLineDotStyle(QUICK_STYLE_DASH_DOT_LINE); break; default: Style->SetLineDotStyle(QUICK_STYLE_SOLID_LINE); break; }; Style->SetLineOpacity(opacity); Style->SetLinePerpendicularOffset(perpendicularOffset); Style->SetLineStrokeWidth(strokeWidth); Style->SetLineStrokeColor(strokeColor); return true; } void QuickStyleVectorDialog::UpdateLinePage() { // // updating the Line Symbolizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacityCtrl->SetValue(Style->GetLineOpacity() * 100.0); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetLinePerpendicularOffset()); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); colorCtrl->Enable(true); pick->Enable(true); wxString strokeColor = wxString::FromUTF8(Style->GetLineStrokeColor()); colorCtrl->SetValue(strokeColor); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); sprintf(dummy, "%1.2f", Style->GetLineStrokeWidth()); str = wxString::FromUTF8(dummy); wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (Style->GetLineDotStyle()) { case QUICK_STYLE_DOT_LINE: dotCtrl->SetSelection(1); break; case QUICK_STYLE_DASH_LINE: dotCtrl->SetSelection(2); break; case QUICK_STYLE_DASH_DOT_LINE: dotCtrl->SetSelection(3); break; default: dotCtrl->SetSelection(0); break; }; widthCtrl->SetValue(str); } bool QuickStyleVectorDialog::RetrievePolygonPage(bool check) { // // retrieving params from the Polygon Synbolizer page // double fillOpacity; double displacementX; double displacementY; double perpendicularOffset; char fillColor[8]; double strokeOpacity; char strokeColor[8]; double strokeWidth; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); fillOpacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); wxString value = displXCtrl->GetValue(); if (Style->IsPolygonFill() != true && Style->IsPolygonStroke() != true) { if (check == true) { wxMessageBox(wxT ("You can't disable both FILL and STROKE at the same time !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); wxSlider *opacity2Ctrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); strokeOpacity = opacity2Ctrl->GetValue() / 100.0; wxTextCtrl *color2Ctrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); color = color2Ctrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&strokeWidth) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (strokeWidth <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Style->SetPolygonFillOpacity(fillOpacity); Style->SetPolygonDisplacementX(displacementX); Style->SetPolygonDisplacementY(displacementY); Style->SetPolygonPerpendicularOffset(perpendicularOffset); Style->SetPolygonFillColor(fillColor); Style->SetPolygonStrokeOpacity(strokeOpacity); Style->SetPolygonStrokeColor(strokeColor); Style->SetPolygonStrokeWidth(strokeWidth); return true; } void QuickStyleVectorDialog::UpdatePolygonPage() { // // updating the Polygon Symbolizer page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); enableBox->SetValue(Style->IsPolygonFill()); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetPolygonDisplacementX()); wxString str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetPolygonDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); sprintf(dummy, "%1.2f", Style->GetPolygonPerpendicularOffset()); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); opacityCtrl->SetValue(Style->GetPolygonFillOpacity() * 100.0); opacityCtrl->Enable(Style->IsPolygonFill()); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetPolygonFillColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } colorCtrl->Enable(Style->IsPolygonFill()); pick->Enable(Style->IsPolygonFill()); wxCheckBox *enable2Box = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); enable2Box->SetValue(Style->IsPolygonStroke()); wxSlider *opacity2Ctrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); opacity2Ctrl->SetValue(Style->GetPolygonStrokeOpacity() * 100.0); opacity2Ctrl->Enable(Style->IsPolygonStroke()); wxTextCtrl *color2Ctrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxButton *pick2 = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); color = wxNullColour; str = wxString::FromUTF8(Style->GetPolygonStrokeColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); color2Ctrl->SetValue(str); } color2Ctrl->Enable(Style->IsPolygonStroke()); pick2->Enable(Style->IsPolygonStroke()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); sprintf(dummy, "%1.2f", Style->GetPolygonStrokeWidth()); str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); widthCtrl->Enable(Style->IsPolygonStroke()); } bool QuickStyleVectorDialog::RetrieveTextPointPage(bool check) { // // retrieving params from the Text Symbolizer page - Point Placement // wxString column; wxString font; double fontSize; int fontStyle; int fontWeight; double opacity; char fontColor[8]; double haloRadius; double haloOpacity; char haloColor[8]; double rotation; double anchorPointX; double anchorPointY; double displacementX; double displacementY; if (Style->IsLabelPrint() == false) return true; wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT1_LABEL); int idSel = columnCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Column !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } column = columnCtrl->GetValue(); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME); idSel = fontCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Font !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } font = fontCtrl->GetValue(); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&fontSize) != true) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (fontSize <= 0.0) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE should be a positive numberr !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC); if (boldCtrl->GetValue() == true) fontWeight = RL2_FONTWEIGHT_BOLD; else fontWeight = RL2_FONTWEIGHT_NORMAL; if (italicCtrl->GetValue() == true) fontStyle = RL2_FONTSTYLE_ITALIC; else fontStyle = RL2_FONTSTYLE_NORMAL; wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT1_OPACITY); opacity = opacityFontCtrl->GetValue() / 100.0; wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FONT-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fontColor, color.ToUTF8()); // Point Placement wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorPointX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointX < 0.0 || anchorPointX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorPointY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointY < 0.0 || anchorPointY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsHaloEnabled() == true) { wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO1_OPACITY); haloOpacity = opacityHaloCtrl->GetValue() / 100.0; wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_RADIUS); wxString value = radiusCtrl->GetValue(); if (value.ToDouble(&haloRadius) != true) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (haloRadius <= 0.0) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); wxString color = colorHaloCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("HALO-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(haloColor, color.ToUTF8()); } Style->SetLabelColumn(column.ToUTF8()); Style->SetFontFacename(font.ToUTF8()); Style->SetFontOpacity(opacity); Style->SetFontSize(fontSize); Style->SetFontStyle(fontStyle); Style->SetFontWeight(fontWeight); Style->SetFontColor(fontColor); Style->SetLabelRotation(rotation); Style->SetLabelAnchorX(anchorPointX); Style->SetLabelAnchorY(anchorPointY); Style->SetLabelDisplacementX(displacementX); Style->SetLabelDisplacementY(displacementY); if (Style->IsHaloEnabled() == true) { Style->SetHaloRadius(haloRadius); Style->SetHaloOpacity(haloOpacity); Style->SetHaloColor(haloColor); } return true; } void QuickStyleVectorDialog::UpdateTextPointPage() { // // updating the Text Symbolizer page - Point Placement // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ENABLE); enableCtrl->SetValue(Style->IsLabelPrint()); wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT1_LABEL); wxString str = wxString::FromUTF8(Style->GetLabelColumn()); int idSel = columnCtrl->FindString(str); columnCtrl->SetSelection(idSel); columnCtrl->Enable(Style->IsLabelPrint()); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME); str = wxString::FromUTF8(Style->GetFontFacename()); idSel = fontCtrl->FindString(str); fontCtrl->SetSelection(idSel); fontCtrl->Enable(Style->IsLabelPrint()); wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT1_OPACITY); opacityFontCtrl->SetValue(Style->GetFontOpacity() * 100.0); opacityFontCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *colorFontCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxButton *pickFont = (wxButton *) FindWindow(ID_SYMBOLIZER_FONT1_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetFontColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorFontCtrl->SetValue(str); } colorFontCtrl->Enable(Style->IsLabelPrint()); pickFont->Enable(Style->IsLabelPrint()); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFontSize()); str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); sizeCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC); if (Style->GetFontWeight() == RL2_FONTWEIGHT_BOLD) boldCtrl->SetValue(true); else boldCtrl->SetValue(false); if (Style->GetFontStyle() == RL2_FONTSTYLE_ITALIC) italicCtrl->SetValue(true); else italicCtrl->SetValue(false); boldCtrl->Enable(false); italicCtrl->Enable(false); if (Style->GetFontFacename() != NULL) { if (strncmp(Style->GetFontFacename(), "ToyFont: ", 9) == 0) { boldCtrl->Enable(Style->IsLabelPrint()); italicCtrl->Enable(Style->IsLabelPrint()); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(Style->GetFontFacename(), &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } // Point Placement wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ROTATION); sprintf(dummy, "%1.2f", Style->GetLabelRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); rotationCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetLabelAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); anchorXCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetLabelAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); anchorYCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetLabelDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); displXCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetLabelDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); displYCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *enableHaloBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO1_ENABLE); if (Style->IsHaloEnabled() == true) enableHaloBox->SetValue(true); else enableHaloBox->SetValue(false); enableHaloBox->Enable(Style->IsLabelPrint()); bool enable = false; if (Style->IsLabelPrint() == true) enable = Style->IsHaloEnabled(); wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_RADIUS); radiusCtrl->Enable(enable); wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); colorHaloCtrl->Enable(enable); wxButton *pickHalo = (wxButton *) FindWindow(ID_SYMBOLIZER_HALO1_PICKER_BTN); pickHalo->Enable(enable); wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO1_OPACITY); opacityHaloCtrl->Enable(enable); opacityHaloCtrl->SetValue(Style->GetHaloOpacity() * 100.0); sprintf(dummy, "%1.2f", Style->GetHaloRadius()); str = wxString::FromUTF8(dummy); radiusCtrl->SetValue(str); color = wxNullColour; str = wxString::FromUTF8(Style->GetHaloColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorHaloCtrl->SetValue(str); } if (Style->IsHaloEnabled() == false) { opacityHaloCtrl->Enable(false); pickHalo->Enable(false); colorHaloCtrl->Enable(false); radiusCtrl->Enable(false); } else { opacityHaloCtrl->Enable(true); pickHalo->Enable(true); colorHaloCtrl->Enable(true); radiusCtrl->Enable(true); } } bool QuickStyleVectorDialog::RetrieveTextLinePage(bool check) { // // retrieving params from the Text Symbolizer page - Line Placement // wxString column; wxString font; double fontSize; int fontStyle; int fontWeight; double opacity; char fontColor[8]; double haloRadius; double haloOpacity; char haloColor[8]; double perpendicularOffset; double initialGap; double gap; if (Style->IsLabelPrint() == false) return true; wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT2_LABEL); int idSel = columnCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Column !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } column = columnCtrl->GetValue(); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME); idSel = fontCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Font !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } font = fontCtrl->GetValue(); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&fontSize) != true) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (fontSize <= 0.0) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE should be a positive numberr !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC); if (boldCtrl->GetValue() == true) fontWeight = RL2_FONTWEIGHT_BOLD; else fontWeight = RL2_FONTWEIGHT_NORMAL; if (italicCtrl->GetValue() == true) fontStyle = RL2_FONTSTYLE_ITALIC; else fontStyle = RL2_FONTSTYLE_NORMAL; wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT2_OPACITY); opacity = opacityFontCtrl->GetValue() / 100.0; wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FONT-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fontColor, color.ToUTF8()); // Line Placement wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *inigapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_INITIAL_GAP); value = inigapCtrl->GetValue(); if (value.ToDouble(&initialGap) != true) { if (check == true) { wxMessageBox(wxT ("INITIAL-GAP isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (initialGap < 0.0) { if (check == true) { wxMessageBox(wxT ("INITIAL-GAP should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_GAP); value = gapCtrl->GetValue(); if (value.ToDouble(&gap) != true) { if (check == true) { wxMessageBox(wxT ("GAP isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (gap < 0.0) { if (check == true) { wxMessageBox(wxT ("GAP should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsHaloEnabled() == true) { wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO2_OPACITY); haloOpacity = opacityHaloCtrl->GetValue() / 100.0; wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_RADIUS); wxString value = radiusCtrl->GetValue(); if (value.ToDouble(&haloRadius) != true) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (haloRadius <= 0.0) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); wxString color = colorHaloCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("HALO-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(haloColor, color.ToUTF8()); } Style->SetLabelColumn(column.ToUTF8()); Style->SetFontFacename(font.ToUTF8()); Style->SetFontOpacity(opacity); Style->SetFontSize(fontSize); Style->SetFontStyle(fontStyle); Style->SetFontWeight(fontWeight); Style->SetFontColor(fontColor); Style->SetLabelPerpendicularOffset(perpendicularOffset); Style->SetLabelInitialGap(initialGap); Style->SetLabelGap(gap); if (Style->IsHaloEnabled() == true) { Style->SetHaloRadius(haloRadius); Style->SetHaloOpacity(haloOpacity); Style->SetHaloColor(haloColor); } return true; } void QuickStyleVectorDialog::UpdateTextLinePage() { // // updating the Text Symbolizer page - Line Placement // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ENABLE); enableCtrl->SetValue(Style->IsLabelPrint()); wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT2_LABEL); wxString str = wxString::FromUTF8(Style->GetLabelColumn()); int idSel = columnCtrl->FindString(str); columnCtrl->SetSelection(idSel); columnCtrl->Enable(Style->IsLabelPrint()); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME); str = wxString::FromUTF8(Style->GetFontFacename()); idSel = fontCtrl->FindString(str); fontCtrl->SetSelection(idSel); fontCtrl->Enable(Style->IsLabelPrint()); wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT2_OPACITY); opacityFontCtrl->SetValue(Style->GetFontOpacity() * 100.0); opacityFontCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *colorFontCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxButton *pickFont = (wxButton *) FindWindow(ID_SYMBOLIZER_FONT2_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetFontColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorFontCtrl->SetValue(str); } colorFontCtrl->Enable(Style->IsLabelPrint()); pickFont->Enable(Style->IsLabelPrint()); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFontSize()); str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); sizeCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC); if (Style->GetFontWeight() == RL2_FONTWEIGHT_BOLD) boldCtrl->SetValue(true); else boldCtrl->SetValue(false); if (Style->GetFontStyle() == RL2_FONTSTYLE_ITALIC) italicCtrl->SetValue(true); else italicCtrl->SetValue(false); italicCtrl->Enable(Style->IsLabelPrint()); boldCtrl->Enable(false); italicCtrl->Enable(false); if (Style->GetFontFacename() != NULL) { if (strncmp(Style->GetFontFacename(), "ToyFont: ", 9) == 0) { boldCtrl->Enable(Style->IsLabelPrint()); italicCtrl->Enable(Style->IsLabelPrint()); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(Style->GetFontFacename(), &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } // Line Placement wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_PERPENDICULAR); sprintf(dummy, "%1.2f", Style->GetLabelPerpendicularOffset()); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); perpCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *repeatBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_REPEATED); repeatBox->SetValue(Style->IsRepeatedLabel()); repeatBox->Enable(Style->IsLabelPrint()); wxTextCtrl *inigapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_INITIAL_GAP); sprintf(dummy, "%1.2f", Style->GetLabelInitialGap()); str = wxString::FromUTF8(dummy); inigapCtrl->SetValue(str); wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_GAP); sprintf(dummy, "%1.2f", Style->GetLabelGap()); str = wxString::FromUTF8(dummy); gapCtrl->SetValue(str); if (Style->IsLabelPrint() && Style->IsRepeatedLabel()) { inigapCtrl->Enable(true); gapCtrl->Enable(true); } else { inigapCtrl->Enable(false); gapCtrl->Enable(false); } wxCheckBox *alignBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_ALIGNED); alignBox->SetValue(Style->IsLabelAligned()); alignBox->Enable(Style->IsLabelPrint()); wxCheckBox *generalizeBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_GENERALIZE); generalizeBox->SetValue(Style->IsLabelGeneralizeLine()); generalizeBox->Enable(Style->IsLabelPrint()); wxCheckBox *enableHaloBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO2_ENABLE); if (Style->IsHaloEnabled() == true) enableHaloBox->SetValue(true); else enableHaloBox->SetValue(false); enableHaloBox->Enable(Style->IsLabelPrint()); bool enable = false; if (Style->IsLabelPrint() == true) enable = Style->IsHaloEnabled(); wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_RADIUS); radiusCtrl->Enable(enable); wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); colorHaloCtrl->Enable(enable); wxButton *pickHalo = (wxButton *) FindWindow(ID_SYMBOLIZER_HALO2_PICKER_BTN); pickHalo->Enable(enable); wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO2_OPACITY); opacityHaloCtrl->Enable(enable); opacityHaloCtrl->SetValue(Style->GetHaloOpacity() * 100.0); sprintf(dummy, "%1.2f", Style->GetHaloRadius()); str = wxString::FromUTF8(dummy); radiusCtrl->SetValue(str); color = wxNullColour; str = wxString::FromUTF8(Style->GetHaloColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorHaloCtrl->SetValue(str); } if (Style->IsHaloEnabled() == false) { opacityHaloCtrl->Enable(false); pickHalo->Enable(false); colorHaloCtrl->Enable(false); radiusCtrl->Enable(false); } else { opacityHaloCtrl->Enable(true); pickHalo->Enable(true); colorHaloCtrl->Enable(true); radiusCtrl->Enable(true); } } void QuickStyleVectorDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret = false; int idx = event.GetOldSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PagePointIndex) ret = RetrievePointPage(); if (idx == PageLineIndex) ret = RetrieveLinePage(); if (idx == PagePolygonIndex) ret = RetrievePolygonPage(); if (idx == PageTextPointIndex) ret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) ret = RetrieveTextLinePage(); } if (ret != true) event.Veto(); } void QuickStyleVectorDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // int idx = event.GetSelection(); if (idx == 0) UpdateMainPage(); else { if (idx == PagePointIndex) UpdatePointPage(); if (idx == PageLineIndex) UpdateLinePage(); if (idx == PagePolygonIndex) UpdatePolygonPage(); if (idx == PageTextPointIndex) UpdateTextPointPage(); if (idx == PageTextLineIndex) UpdateTextLinePage(); } } bool QuickStyleVectorDialog::UpdateStyle() { // // updating the QuickStyle // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PagePointIndex) ret = RetrievePointPage(); if (idx == PageLineIndex) ret = RetrieveLinePage(); if (idx == PagePolygonIndex) ret = RetrievePolygonPage(); if (idx == PageTextPointIndex) ret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) ret = RetrieveTextLinePage(); } if (ret == false) return false; VectorLayerConfig *config = Layer->GetVectorConfig(); bool setCurrentStyle = false; if (config->GetStyle() == NULL) setCurrentStyle = true; else { if (strcmp(Style->GetUUID(), config->GetStyle()) != 0) setCurrentStyle = true; } if (setCurrentStyle == true) { config->SetStyle(Style->GetUUID()); IsConfigChanged = true; } IsConfigChanged = Layer->UpdateQuickStyle(Style); return true; } void QuickStyleVectorDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // permanently saving the QuickStyle and quitting // if (UpdateStyle() == true) wxDialog::EndModal(wxID_OK); } void QuickStyleVectorDialog::OnApply(wxCommandEvent & WXUNUSED(event)) { // // applying the QuickStyle and continuing // if (UpdateStyle() == true) { if (IsConfigChanged == true) MapPanel->RefreshMap(); } } void QuickStyleVectorDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the Quick Style as an external file // bool xret = false; int ret; wxString path; wxString lastDir; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) xret = RetrieveMainPage(); else { if (idx == PagePointIndex) xret = RetrievePointPage(); if (idx == PageLineIndex) xret = RetrieveLinePage(); if (idx == PagePolygonIndex) xret = RetrievePolygonPage(); if (idx == PageTextPointIndex) xret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) xret = RetrieveTextLinePage(); } if (xret == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE QuickStyle to a file"), wxT(""), wxT("style.xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml = Style->CreateXmlStyle(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE QuickStyle successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } } void QuickStyleVectorDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Quick Style into the Clipboard // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PagePointIndex) ret = RetrievePointPage(); if (idx == PageLineIndex) ret = RetrieveLinePage(); if (idx == PagePolygonIndex) ret = RetrievePolygonPage(); if (idx == PageTextPointIndex) ret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) ret = RetrieveTextLinePage(); } if (ret == false) return; char *xml = Style->CreateXmlStyle(); wxString XMLstring = wxString::FromUTF8(xml); sqlite3_free(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void QuickStyleVectorDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } bool QuickStyleTopologyDialog::Create(MyMapPanel * parent, MapLayer * layer) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; Type = Layer->GetType(); DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); IsConfigChanged = false; wxString title = wxT("QuickStyle (Topology) Edit"); if (Type == MAP_LAYER_NETWORK) title = wxT("QuickStyle (Network) Edit"); if (wxPropertySheetDialog::Create(parent, wxID_ANY, title) == false) return false; if (Layer->GetQuickStyleTopology() != NULL) Style = Layer->CloneQuickStyleTopology(); else Style = new QuickStyleTopologyObj(Type); wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); if (Type == MAP_LAYER_NETWORK) { wxPanel *nodePage = CreateNodePage(book); book->AddPage(nodePage, wxT("Nodes"), false); wxPanel *edgeLinkPage = CreateEdgeLinkPage(book); book->AddPage(edgeLinkPage, wxT("Links"), false); wxPanel *edgeLinkSeedPage = CreateEdgeLinkSeedPage(book); book->AddPage(edgeLinkSeedPage, wxT("Link Seeds"), false); } else { wxPanel *nodePage = CreateNodePage(book); book->AddPage(nodePage, wxT("Nodes"), false); wxPanel *edgeLinkPage = CreateEdgeLinkPage(book); book->AddPage(edgeLinkPage, wxT("Edges"), false); wxPanel *facePage = CreateFacePage(book); book->AddPage(facePage, wxT("Faces"), false); wxPanel *edgeLinkSeedPage = CreateEdgeLinkSeedPage(book); book->AddPage(edgeLinkSeedPage, wxT("Edge Seeds"), false); wxPanel *faceSeedPage = CreateFaceSeedPage(book); book->AddPage(faceSeedPage, wxT("Face Seeds"), false); } CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnQuit); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnOk); Connect(ID_QUICK_STYLE_APPLY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnApply); Connect(ID_QUICK_STYLE_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnExport); Connect(ID_QUICK_STYLE_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } void QuickStyleTopologyDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *save = new wxButton(this, ID_QUICK_STYLE_APPLY, wxT("&Apply")); btnBox->Add(save, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_QUICK_STYLE_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_QUICK_STYLE_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } wxPanel *QuickStyleTopologyDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // First row: Layer name boxSizer->AddSpacer(50); wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *nameSizer = new wxBoxSizer(wxVERTICAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *nameBox = new wxStaticBox(panel, wxID_ANY, wxT("Layer FullName"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString fullName = DbPrefix + wxT(".") + LayerName; wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_VECTOR_LAYER, fullName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *typeBox = new wxStaticBox(panel, wxID_ANY, wxT("Geometry Type"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *typeBoxSizer = new wxStaticBoxSizer(typeBox, wxHORIZONTAL); nameSizer->Add(typeBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString typeName = wxT("UNKNOWN"); if (Type == MAP_LAYER_NETWORK) typeName = wxT("Network (ISO TopoNet)"); if (Type == MAP_LAYER_TOPOLOGY) typeName = wxT("Topology (ISO TopoGeo)"); wxTextCtrl *typeCtrl = new wxTextCtrl(panel, ID_VECTOR_TYPE, typeName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); typeBoxSizer->Add(typeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *uuidBox = new wxStaticBox(panel, wxID_ANY, wxT("QuickStyle Name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *uuidBoxSizer = new wxStaticBoxSizer(uuidBox, wxHORIZONTAL); nameSizer->Add(uuidBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString uuid = wxString::FromUTF8(Style->GetUUID()); wxTextCtrl *uuidCtrl = new wxTextCtrl(panel, ID_VECTOR_UUID, uuid, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); uuidBoxSizer->Add(uuidCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); boxSizer->AddSpacer(25); // second row: Visibility Range wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdScaleChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: Style->EnableMinScale(false); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: Style->EnableMinScale(true); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: Style->EnableMinScale(false); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: Style->EnableMinScale(true); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *QuickStyleTopologyDialog::CreateNodePage(wxWindow * parent) { // // creating the Node Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_NODE_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_NODE_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorNode and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor Node wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Node"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_NODE_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_NODE_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_NODE_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_NODE_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_NODE_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeMarkChanged); Connect(ID_SYMBOLIZER_NODE_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorFillPicker); Connect(ID_SYMBOLIZER_NODE_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorFillChanged); Connect(ID_SYMBOLIZER_NODE_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorStrokePicker); Connect(ID_SYMBOLIZER_NODE_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorStrokeChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdNodeMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_NODE_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleTopologyDialog:: OnCmdNodeColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_NODE_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdNodeColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdNodeColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdNodeColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateEdgeLinkPage(wxWindow * parent) { // // creating the EdgeLink Symbolizer page // wxString StrokeColor = wxT("#000000"); wxPanel *panel = new wxPanel(parent, ID_PANE_LINE); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #1 Opacity and Perpendicular Offset boxSizer->AddSpacer(50); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxHORIZONTAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); opacityBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); colorBoxSizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString dot[4]; if (Type == MAP_LAYER_NETWORK) { dot[0] = wxT("&Solid Link"); dot[1] = wxT("&Dotted Link"); dot[2] = wxT("&Dashed Link"); dot[3] = wxT("&Dashed/Dotted Link"); } else { dot[0] = wxT("&Solid Edge"); dot[1] = wxT("&Dotted Edge"); dot[2] = wxT("&Dashed Edge"); dot[3] = wxT("&Dashed/Dotted Edge"); } wxRadioBox *dotBox = new wxRadioBox(panel, ID_SYMBOLIZER_DASH_DOT, wxT("&Dash/Dot Style"), wxDefaultPosition, wxDefaultSize, 4, dot, 1, wxRA_SPECIFY_COLS); dotBox->SetSelection(0); dashBoxSizer->Add(dotBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkColorChanged); Connect(ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkColorPicker); return panel; } void QuickStyleTopologyDialog:: OnCmdEdgeLinkColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdEdgeLinkColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateFacePage(wxWindow * parent) { // // creating the Face Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_FILL2); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the Face Displacement and Perpendicular Offset wxBoxSizer *polygonBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(polygonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row A: Displacement wxBoxSizer *displacementBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(displacementBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); displacementBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive: larger. / Negative: smaller.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Drawing polygons smaller or larger than their actual geometry (Buffer).")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Fill Opacity wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Face Fill"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxHORIZONTAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsFaceFill()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); enableSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FILL2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(400, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(Style->IsFaceFill()); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Fill Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); auxSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sampleCtrl->Enable(Style->IsFaceFill()); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_FILL2_PICKER_BTN, wxT("&Pick a color")); pick->Enable(Style->IsFaceFill()); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // first row A: the Stroke #1 Opacity wxBoxSizer *opacity2BoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacity2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Face Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enable2Sizer = new wxStaticBoxSizer(enableBox, wxHORIZONTAL); opacity2BoxSizer->Add(enable2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enable2Ctrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enable2Ctrl->SetValue(Style->IsFaceStroke()); enable2Sizer->Add(enable2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *opacity2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacity2Sizer = new wxStaticBoxSizer(opacity2Box, wxVERTICAL); enable2Sizer->Add(opacity2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacity2Ctrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(250, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacity2Ctrl->Enable(Style->IsFaceStroke()); opacity2Sizer->Add(opacity2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color wxStaticBox *color2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *color2Sizer = new wxStaticBoxSizer(color2Box, wxVERTICAL); enable2Sizer->Add(color2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *color3Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(color3Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *color2Ctrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color2Ctrl->Enable(Style->IsFaceStroke()); color3Sizer->Add(color2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sample2Ctrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sample2Ctrl->Enable(Style->IsFaceStroke()); color3Sizer->Add(sample2Ctrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *picker2Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(picker2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick2 = new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color")); pick2->Enable(Style->IsFaceStroke()); picker2Sizer->Add(pick2, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width, wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); enable2Sizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceStrokeChanged); Connect(ID_SYMBOLIZER_FILL2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceFillChanged); Connect(ID_SYMBOLIZER_FILL2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorFillChanged); Connect(ID_SYMBOLIZER_FILL2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorFillPicker); Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorStrokeChanged); Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorStrokePicker); return panel; } void QuickStyleTopologyDialog:: OnCmdFaceStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetFaceStroke(true); else Style->SetFaceStroke(false); RetrieveFacePage(false); UpdateFacePage(); } void QuickStyleTopologyDialog:: OnCmdFaceFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetFaceFill(true); else Style->SetFaceFill(false); RetrieveFacePage(false); UpdateFacePage(); } void QuickStyleTopologyDialog:: OnCmdFaceColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdFaceColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateEdgeLinkSeedPage(wxWindow * parent) { // // creating the EdgeLinkSeed Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_EDGELINK_SEED_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_EDGELINK_SEED_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorEdgeLinkSeed and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor EdgeLinkSeed wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor EdgeLinkSeed"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_EDGELINK_SEED_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedMarkChanged); Connect(ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorFillPicker); Connect(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorFillChanged); Connect(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorStrokePicker); Connect(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorStrokeChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateFaceSeedPage(wxWindow * parent) { // // creating the FaceSeed Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FACE_SEED_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_FACE_SEED_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorFaceSeed and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor FaceSeed wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor FaceSeed"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_FACE_SEED_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedMarkChanged); Connect(ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorFillPicker); Connect(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorFillChanged); Connect(ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorStrokePicker); Connect(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorStrokeChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdFaceSeedMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FACE_SEED_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } bool QuickStyleTopologyDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // double min = Style->GetScaleMin(); double max = Style->GetScaleMax(); if (Style->IsMinScaleEnabled() == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&min) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (min < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMaxScaleEnabled() == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&max) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (max < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() == true) { if (min >= max) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Style->SetScaleMin(min); Style->SetScaleMax(max); return true; } void QuickStyleTopologyDialog::UpdateMainPage() { // // updating the MAIN page // wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(0); else if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(1); else if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (Style->IsMinScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMin()); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (Style->IsMaxScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMax()); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } } bool QuickStyleTopologyDialog::RetrieveNodePage(bool check) { // // retrieving params from the Node Nodeizer page // double opacity; double size; double rotation; double anchorNodeX; double anchorNodeY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_NODE_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorNodeX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorNodeX < 0.0 || anchorNodeX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorNodeY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorNodeY < 0.0 || anchorNodeY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetNodeOpacity(opacity); Style->SetNodeSize(size); Style->SetNodeRotation(rotation); Style->SetNodeAnchorX(anchorNodeX); Style->SetNodeAnchorY(anchorNodeY); Style->SetNodeDisplacementX(displacementX); Style->SetNodeDisplacementY(displacementY); Style->SetNodeFillColor(fillColor); Style->SetNodeStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateNodePage() { // // updating the Node Nodeizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_NODE_OPACITY); opacityCtrl->SetValue(Style->GetNodeOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetNodeSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ROTATION); sprintf(dummy, "%1.2f", Style->GetNodeRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetNodeAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetNodeAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetNodeDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetNodeDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_NODE_MARK); switch (Style->GetNodeWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetNodeFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetNodeStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } bool QuickStyleTopologyDialog::RetrieveEdgeLinkPage(bool check) { // // retrieving params from the EdgeLink Symbolizer page // double opacity; double perpendicularOffset; char strokeColor[8]; double strokeWidth; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&strokeWidth) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (strokeWidth <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (dotCtrl->GetSelection()) { case 1: Style->SetEdgeLinkDotStyle(QUICK_STYLE_DOT_LINE); break; case 2: Style->SetEdgeLinkDotStyle(QUICK_STYLE_DASH_LINE); break; case 3: Style->SetEdgeLinkDotStyle(QUICK_STYLE_DASH_DOT_LINE); break; default: Style->SetEdgeLinkDotStyle(QUICK_STYLE_SOLID_LINE); break; }; Style->SetEdgeLinkOpacity(opacity); Style->SetEdgeLinkPerpendicularOffset(perpendicularOffset); Style->SetEdgeLinkStrokeWidth(strokeWidth); Style->SetEdgeLinkStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateEdgeLinkPage() { // // updating the EdgeLink Symbolizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacityCtrl->SetValue(Style->GetEdgeLinkOpacity() * 100.0); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetEdgeLinkPerpendicularOffset()); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); colorCtrl->Enable(true); pick->Enable(true); wxString strokeColor = wxString::FromUTF8(Style->GetEdgeLinkStrokeColor()); colorCtrl->SetValue(strokeColor); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); sprintf(dummy, "%1.2f", Style->GetEdgeLinkStrokeWidth()); str = wxString::FromUTF8(dummy); wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (Style->GetEdgeLinkDotStyle()) { case QUICK_STYLE_DOT_LINE: dotCtrl->SetSelection(1); break; case QUICK_STYLE_DASH_LINE: dotCtrl->SetSelection(2); break; case QUICK_STYLE_DASH_DOT_LINE: dotCtrl->SetSelection(3); break; default: dotCtrl->SetSelection(0); break; }; widthCtrl->SetValue(str); } bool QuickStyleTopologyDialog::RetrieveFacePage(bool check) { // // retrieving params from the Face Synbolizer page // double fillOpacity; double displacementX; double displacementY; double perpendicularOffset; char fillColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); fillOpacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); wxString value = displXCtrl->GetValue(); if (Style->IsFaceFill() != true && Style->IsFaceStroke() != true) { if (check == true) { wxMessageBox(wxT ("You can't disable both FILL and STROKE at the same time !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); Style->SetFaceFillOpacity(fillOpacity); Style->SetFaceDisplacementX(displacementX); Style->SetFaceDisplacementY(displacementY); Style->SetFacePerpendicularOffset(perpendicularOffset); Style->SetFaceFillColor(fillColor); return true; } void QuickStyleTopologyDialog::UpdateFacePage() { // // updating the Face Symbolizer page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); enableBox->SetValue(Style->IsFaceFill()); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFaceDisplacementX()); wxString str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetFaceDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); sprintf(dummy, "%1.2f", Style->GetFacePerpendicularOffset()); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); opacityCtrl->SetValue(Style->GetFaceFillOpacity() * 100.0); opacityCtrl->Enable(Style->IsFaceFill()); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetFaceFillColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } colorCtrl->Enable(Style->IsFaceFill()); pick->Enable(Style->IsFaceFill()); wxSlider *opacity2Ctrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); opacity2Ctrl->SetValue(Style->GetFaceStrokeOpacity() * 100.0); opacity2Ctrl->Enable(Style->IsFaceStroke()); wxTextCtrl *color2Ctrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxButton *pick2 = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); color = wxNullColour; str = wxString::FromUTF8(Style->GetFaceStrokeColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); color2Ctrl->SetValue(str); } color2Ctrl->Enable(Style->IsFaceStroke()); pick2->Enable(Style->IsFaceStroke()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); sprintf(dummy, "%1.2f", Style->GetFaceStrokeWidth()); str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); widthCtrl->Enable(Style->IsFaceStroke()); } bool QuickStyleTopologyDialog::RetrieveEdgeLinkSeedPage(bool check) { // // retrieving params from the EdgeLinkSeed EdgeLinkSeedizer page // double opacity; double size; double rotation; double anchorEdgeLinkSeedX; double anchorEdgeLinkSeedY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorEdgeLinkSeedX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorEdgeLinkSeedX < 0.0 || anchorEdgeLinkSeedX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorEdgeLinkSeedY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorEdgeLinkSeedY < 0.0 || anchorEdgeLinkSeedY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetEdgeLinkSeedOpacity(opacity); Style->SetEdgeLinkSeedSize(size); Style->SetEdgeLinkSeedRotation(rotation); Style->SetEdgeLinkSeedAnchorX(anchorEdgeLinkSeedX); Style->SetEdgeLinkSeedAnchorY(anchorEdgeLinkSeedY); Style->SetEdgeLinkSeedDisplacementX(displacementX); Style->SetEdgeLinkSeedDisplacementY(displacementY); Style->SetEdgeLinkSeedFillColor(fillColor); Style->SetEdgeLinkSeedStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateEdgeLinkSeedPage() { // // updating the EdgeLinkSeed EdgeLinkSeedizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_OPACITY); opacityCtrl->SetValue(Style->GetEdgeLinkSeedOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ROTATION); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_MARK); switch (Style->GetEdgeLinkSeedWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetEdgeLinkSeedFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetEdgeLinkSeedStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } bool QuickStyleTopologyDialog::RetrieveFaceSeedPage(bool check) { // // retrieving params from the FaceSeed FaceSeedizer page // double opacity; double size; double rotation; double anchorFaceSeedX; double anchorFaceSeedY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FACE_SEED_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorFaceSeedX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorFaceSeedX < 0.0 || anchorFaceSeedX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorFaceSeedY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorFaceSeedY < 0.0 || anchorFaceSeedY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetFaceSeedOpacity(opacity); Style->SetFaceSeedSize(size); Style->SetFaceSeedRotation(rotation); Style->SetFaceSeedAnchorX(anchorFaceSeedX); Style->SetFaceSeedAnchorY(anchorFaceSeedY); Style->SetFaceSeedDisplacementX(displacementX); Style->SetFaceSeedDisplacementY(displacementY); Style->SetFaceSeedFillColor(fillColor); Style->SetFaceSeedStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateFaceSeedPage() { // // updating the FaceSeed FaceSeedizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FACE_SEED_OPACITY); opacityCtrl->SetValue(Style->GetFaceSeedOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFaceSeedSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ROTATION); sprintf(dummy, "%1.2f", Style->GetFaceSeedRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetFaceSeedAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetFaceSeedAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetFaceSeedDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetFaceSeedDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FACE_SEED_MARK); switch (Style->GetFaceSeedWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetFaceSeedFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetFaceSeedStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } void QuickStyleTopologyDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret = false; int idx = event.GetOldSelection(); if (idx == 0) ret = RetrieveMainPage(); else if (idx == 1) ret = RetrieveNodePage(); else if (idx == 2) ret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) ret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) ret = RetrieveFacePage(); if (idx == 4) ret = RetrieveEdgeLinkSeedPage(); if (idx == 5) ret = RetrieveFaceSeedPage(); } } if (ret != true) event.Veto(); } void QuickStyleTopologyDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // int idx = event.GetSelection(); if (idx == 0) UpdateMainPage(); else if (idx == 1) UpdateNodePage(); else if (idx == 2) UpdateEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) UpdateEdgeLinkSeedPage(); } else { if (idx == 3) UpdateFacePage(); if (idx == 4) UpdateEdgeLinkSeedPage(); if (idx == 5) UpdateFaceSeedPage(); } } } bool QuickStyleTopologyDialog::UpdateStyle() { // // updating the QuickStyle // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else if (idx == 1) ret = RetrieveNodePage(); else if (idx == 2) ret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) ret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) ret = RetrieveFacePage(); if (idx == 4) ret = RetrieveEdgeLinkSeedPage(); if (idx == 5) ret = RetrieveFaceSeedPage(); } } if (ret == false) return false; VectorLayerConfig *config = Layer->GetVectorConfig(); bool setCurrentStyle = false; if (config->GetStyle() == NULL) setCurrentStyle = true; else { if (strcmp(Style->GetUUID(), config->GetStyle()) != 0) setCurrentStyle = true; } if (setCurrentStyle == true) { config->SetStyle(Style->GetUUID()); IsConfigChanged = true; } IsConfigChanged = Layer->UpdateQuickStyle(Style); return true; } void QuickStyleTopologyDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // permanently saving the QuickStyle and quitting // if (UpdateStyle() == true) wxDialog::EndModal(wxID_OK); } void QuickStyleTopologyDialog::OnApply(wxCommandEvent & WXUNUSED(event)) { // // applying the QuickStyle and continuing // if (UpdateStyle() == true) { if (IsConfigChanged == true) MapPanel->RefreshMap(); } } void QuickStyleTopologyDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the Quick Style as an external file // bool xret = false; int ret; wxString path; wxString lastDir; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) xret = RetrieveMainPage(); else if (idx == 1) xret = RetrieveNodePage(); else if (idx == 2) xret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) xret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) xret = RetrieveFacePage(); if (idx == 4) xret = RetrieveEdgeLinkSeedPage(); if (idx == 5) xret = RetrieveFaceSeedPage(); } } if (xret == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE QuickStyle to a file"), wxT(""), wxT("style.xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml = Style->CreateXmlStyle(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE QuickStyle successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } } void QuickStyleTopologyDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Quick Style into the Clipboard // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else if (idx == 1) ret = RetrieveNodePage(); else if (idx == 2) ret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) ret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) ret = RetrieveFacePage(); if (idx == 4) ret = RetrieveEdgeLinkSeedPage(); if (idx == 5) ret = RetrieveFaceSeedPage(); } } if (ret == false) return; char *xml = Style->CreateXmlStyle(); wxString XMLstring = wxString::FromUTF8(xml); sqlite3_free(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void QuickStyleTopologyDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } |
< < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added QuickStylesRaster.cpp.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 |
/* / QuickStylesRaster.cpp / Quick Styles wizards (Raster layers) / / version 2.0, 2018 June 7 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/imaglist.h" #include "wx/colordlg.h" #include "wx/filename.h" #include "wx/clipbrd.h" QuickStyleRasterObj::QuickStyleRasterObj() { // ctor QuickStyleObj::DoGetUUID(UUID); MinScaleEnabled = false; MaxScaleEnabled = false; ScaleMin = 0.0; ScaleMax = 0.0; Opacity = 1.0; Normalize = false; Histogram = false; Gamma = false; GammaValue = 1.0; TripleBand = false; SingleBand = false; RedBand = 0; GreenBand = 0; BlueBand = 0; GrayBand = 0; SrtmColorMap = false; TerrainColorMap = false; NdviColorMap = false; ColorRamp = false; MinValue = 0.0; ShadedRelief = false; ShadedReliefFactor = 0.0; QuickStyleObj::RandomColor(MinValueColor); MaxValue = 0.0; QuickStyleObj::RandomColor(MaxValueColor); XmlStyle = NULL; } QuickStyleRasterObj *QuickStyleRasterObj::Clone() { // // cloning a Quick Style - Raster // QuickStyleRasterObj *Style = new QuickStyleRasterObj(); strcpy(Style->UUID, this->UUID); Style->MinScaleEnabled = this->MinScaleEnabled; Style->MaxScaleEnabled = this->MaxScaleEnabled; Style->ScaleMin = this->ScaleMin; Style->ScaleMax = this->ScaleMax; Style->Opacity = this->Opacity; Style->Normalize = this->Normalize; Style->Histogram = this->Histogram; Style->Gamma = this->Gamma; Style->GammaValue = this->GammaValue; Style->TripleBand = this->TripleBand; Style->SingleBand = this->SingleBand; Style->RedBand = this->RedBand; Style->GreenBand = this->GreenBand; Style->BlueBand = this->BlueBand; Style->GrayBand = this->GrayBand; Style->SrtmColorMap = this->SrtmColorMap; Style->TerrainColorMap = this->TerrainColorMap; Style->NdviColorMap = this->NdviColorMap; Style->ColorRamp = this->ColorRamp; Style->MinValue = this->MinValue; strcpy(Style->MinValueColor, this->MinValueColor); Style->MaxValue = this->MaxValue; strcpy(Style->MaxValueColor, this->MaxValueColor); Style->ShadedRelief = this->ShadedRelief; Style->ShadedReliefFactor = this->ShadedReliefFactor; Style->XmlStyle = NULL; return Style; } bool QuickStyleRasterObj::Compare(QuickStyleRasterObj * Style) { // // comparing two Quick Style objects - Raster // if (Style == NULL) return false; if (strcmp(Style->UUID, this->UUID) != 0) return false; if (Style->MinScaleEnabled != this->MinScaleEnabled) return false; if (Style->MaxScaleEnabled != this->MaxScaleEnabled) return false; if (Style->ScaleMin != this->ScaleMin) return false; if (Style->ScaleMax != this->ScaleMax) return false; if (Style->Opacity != this->Opacity) return false; if (Style->Normalize != this->Normalize) return false; if (Style->Histogram != this->Histogram) return false; if (Style->Gamma != this->Gamma) return false; if (Style->GammaValue != this->GammaValue) return false; if (Style->TripleBand != this->TripleBand) return false; if (Style->SingleBand != this->SingleBand) return false; if (Style->RedBand != this->RedBand) return false; if (Style->GreenBand != this->GreenBand) return false; if (Style->BlueBand != this->BlueBand) return false; if (Style->GrayBand != this->GrayBand) return false; if (Style->SrtmColorMap != this->SrtmColorMap) return false; if (Style->TerrainColorMap != this->TerrainColorMap) return false; if (Style->NdviColorMap != this->NdviColorMap) return false; if (Style->ColorRamp != this->ColorRamp) return false; if (Style->MinValue != this->MinValue) return false; if (strcmp(Style->MinValueColor, this->MinValueColor) != 0) return false; if (Style->MaxValue != this->MaxValue) return false; if (strcmp(Style->MaxValueColor, this->MaxValueColor) != 0) return false; if (Style->ShadedRelief != this->ShadedRelief) return false; if (Style->ShadedReliefFactor != this->ShadedReliefFactor) return false; return true; } char *QuickStyleRasterObj::DoCreatePredefinedSrtmStyle(char *base_xml) { // // creating the predefined SRTM Style // char *prev = base_xml; char *xml = sqlite3_mprintf("%s\t\t\t<ColorMap>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Interpolate fallbackValue=\"#ffffff\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-11000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#000000</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-8000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#000032</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-5000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#0a0a64</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-3000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#1e1e96</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-1000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#4646c8</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-100.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#6464e1</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#aaaaff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.10000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#399769</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>100.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#75c25d</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>500.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#e6e680</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>1000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#ca9e4b</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>2000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#b99a64</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>3000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#dcdcdc</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>5000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#ffffff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>8850.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#6464c8</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Interpolate>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ColorMap>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleRasterObj::DoCreatePredefinedTerrainStyle(char *base_xml) { // // creating the predefined Terrain Style // char *prev = base_xml; char *xml = sqlite3_mprintf("%s\t\t\t<ColorMap>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Interpolate fallbackValue=\"#ffffff\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-11000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#000000</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-500.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#00001e</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-100.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#0000c8</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-1.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#9696ff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#007800</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>100.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#009600</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>270.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#5aa55a</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>300.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#5aaf5a</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>500.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#32b432</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>500.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#46aa46</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>1000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#46914b</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>1000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#469b4b</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>2000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#969c64</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>2800.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#dcdcdc</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>3000.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#ffffff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>8850.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#ffffff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Interpolate>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ColorMap>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleRasterObj::DoCreatePredefinedNdviStyle(char *base_xml) { // // creating the predefined NDVI Style // char *prev = base_xml; char *xml = sqlite3_mprintf("%s\t\t\t<ColorMap>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Interpolate fallbackValue=\"#ffffff\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-1.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#051852</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-0.30000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#051852</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>-0.18000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#ffffff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#ffffff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.02500000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#cec5b4</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.07500000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#bfa37c</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.12500000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#b3ae60</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.15000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#a3b550</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.17500000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#90aa3c</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.23300000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#a6c31d</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.26600000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#87b703</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.33300000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#79af01</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.36600000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#65a300</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.43300000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#4e9700</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.46600000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#2b8404</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.55000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#007200</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.65000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#005a01</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.75000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#004900</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.85000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#003800</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>0.95000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#001f00</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>1.00000000</Data>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>#000000</Value>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Interpolate>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ColorMap>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleRasterObj::CreateXmlStyle() { // // creating the XML Style // if (MinScaleEnabled == false && MaxScaleEnabled == false && Opacity == 1.0 && Normalize == false && Histogram == false && Gamma == false && TripleBand == false && SingleBand == false && SrtmColorMap == false && TerrainColorMap == false && NdviColorMap == false && ColorRamp == false && ShadedRelief == false) return NULL; // NULL Raster Style - no option is set char *prev; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; xml = sqlite3_mprintf("%s<CoverageStyle version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Rule>\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t<RasterSymbolizer>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Opacity>%1.2f</Opacity>\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; if (SrtmColorMap == true) { // special case: predefined SRTM style xml = DoCreatePredefinedSrtmStyle(prev); prev = xml; goto shaded_relief; } if (TerrainColorMap == true) { // special case: predefined Terrain style xml = DoCreatePredefinedTerrainStyle(prev); prev = xml; goto shaded_relief; } if (NdviColorMap == true) { // special case: predefined NDVI style xml = DoCreatePredefinedNdviStyle(prev); prev = xml; goto foot; } if (TripleBand == true || SingleBand == true) { xml = sqlite3_mprintf("%s\t\t\t<ChannelSelection>\r\n", prev); sqlite3_free(prev); prev = xml; if (TripleBand == true) { xml = sqlite3_mprintf ("%s\t\t\t\t<RedChannel>\r\n\t\t\t\t\t<SourceChannelName>%d", prev, RedBand + 1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s</SourceChannelName>\r\n\t\t\t\t</RedChannel>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<GreenChannel>\r\n\t\t\t\t\t<SourceChannelName>%d", prev, GreenBand + 1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s</SourceChannelName>\r\n\t\t\t\t</GreenChannel>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<BlueChannel>\r\n\t\t\t\t\t<SourceChannelName>%d", prev, BlueBand + 1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s</SourceChannelName>\r\n\t\t\t\t</BlueChannel>\r\n", prev); sqlite3_free(prev); prev = xml; } if (SingleBand == true) { xml = sqlite3_mprintf ("%s\t\t\t\t<GrayChannel>\r\n\t\t\t\t\t<SourceChannelName>%d", prev, GrayBand + 1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s</SourceChannelName>\r\n\t\t\t\t</GrayChannel>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t</ChannelSelection>\r\n", prev); sqlite3_free(prev); prev = xml; } if (Normalize == true || Histogram == true || Gamma == true) { xml = sqlite3_mprintf("%s\t\t\t<ContrastEnhancement>\r\n", prev); sqlite3_free(prev); prev = xml; if (Histogram == true) { xml = sqlite3_mprintf("%s\t\t\t\t<Histogram/>\r\n", prev); sqlite3_free(prev); prev = xml; } else if (Gamma == true) { xml = sqlite3_mprintf("%s\t\t\t\t<GammaValue>%1.2f</GammaValue>\r\n", prev, GammaValue); sqlite3_free(prev); prev = xml; } else { xml = sqlite3_mprintf("%s\t\t\t\t<Normalize/>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t</ContrastEnhancement>\r\n", prev); sqlite3_free(prev); prev = xml; } if (ColorRamp == true) { xml = sqlite3_mprintf("%s\t\t\t<ColorMap>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Interpolate fallbackValue=\"%s\">\r\n", prev, MinValueColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>%1.8f</Data>\r\n", prev, MinValue); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>%s</Value>\r\n", prev, MinValueColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Data>%1.8f</Data>\r\n", prev, MaxValue); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\t<Value>%s</Value>\r\n", prev, MaxValueColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</InterpolationPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Interpolate>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ColorMap>\r\n", prev); sqlite3_free(prev); prev = xml; } shaded_relief: if (ShadedRelief == true) { xml = sqlite3_mprintf("%s\t\t\t<ShadedRelief>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<ReliefFactor>%1.2f</ReliefFactor>\r\n", prev, ShadedReliefFactor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ShadedRelief>\r\n", prev); sqlite3_free(prev); prev = xml; } foot: xml = sqlite3_mprintf("%s\t\t</RasterSymbolizer>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n</CoverageStyle>\r\n", prev); sqlite3_free(prev); return xml; } unsigned char *QuickStyleRasterObj::CloneXmlStyle() { // // cloning the XML Style definition // if (XmlStyle == NULL) XmlStyle = CreateXmlStyle(); if (XmlStyle == NULL) return NULL; int len = strlen(XmlStyle); char *cloned = (char *) malloc(len + 1); strcpy(cloned, XmlStyle); return (unsigned char *) cloned; } void QuickStyleRasterObj::UpdateXmlStyle() { // // updating the XML Style // if (XmlStyle != NULL) sqlite3_free(XmlStyle); XmlStyle = CreateXmlStyle(); } bool QuickStyleRasterDialog::Create(MyMapPanel * parent, MapLayer * layer) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); CanApplyContrastEnhancement = true; IsMultiband = false; CanApplyColorMap = false; CanApplyShadedRelief = false; RedBand = 0; GreenBand = 0; BlueBand = 0; GrayBand = 0; MinPixelValue = 0.0; MaxPixelValue = 0.0; GetCoverageInfos(); IsConfigChanged = false; if (wxPropertySheetDialog::Create (parent, wxID_ANY, wxT("QuickStyle (Raster) Edit")) == false) return false; if (Layer->GetQuickStyleRaster() != NULL) Style = Layer->CloneQuickStyleRaster(); else Style = new QuickStyleRasterObj(); Style->SetRedBand(RedBand); Style->SetGreenBand(GreenBand); Style->SetBlueBand(BlueBand); Style->SetGrayBand(GrayBand); Style->SetMinValue(MinPixelValue); Style->SetMaxValue(MaxPixelValue); wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels int next = 1; PageContrastEnhancementIndex = 0; PageChannelSelectionIndex = 0; PageColorMapIndex = 0; wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); wxPanel *contrastEnhancementPage = CreateContrastEnhancementPage(book); book->AddPage(contrastEnhancementPage, wxT("ContrastEnhancement"), false); PageContrastEnhancementIndex = next++; wxPanel *channelSelectionPage = CreateChannelSelectionPage(book); book->AddPage(channelSelectionPage, wxT("ChannelSelection"), false); PageChannelSelectionIndex = next++; wxPanel *colorMapPage = CreateColorMapPage(book); book->AddPage(colorMapPage, wxT("ColorMap"), false); PageColorMapIndex = next++; CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & QuickStyleRasterDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnQuit); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnOk); Connect(ID_QUICK_STYLE_APPLY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnApply); Connect(ID_QUICK_STYLE_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnExport); Connect(ID_QUICK_STYLE_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } void QuickStyleRasterDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *save = new wxButton(this, ID_QUICK_STYLE_APPLY, wxT("&Apply")); btnBox->Add(save, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_QUICK_STYLE_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_QUICK_STYLE_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } wxPanel *QuickStyleRasterDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // First row: Layer name wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *nameSizer = new wxBoxSizer(wxVERTICAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *nameBox = new wxStaticBox(panel, wxID_ANY, wxT("Layer FullName"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString fullName = DbPrefix + wxT(".") + LayerName; wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_VECTOR_LAYER, fullName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *uuidBox = new wxStaticBox(panel, wxID_ANY, wxT("QuickStyle Name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *uuidBoxSizer = new wxStaticBoxSizer(uuidBox, wxHORIZONTAL); nameSizer->Add(uuidBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString uuid = wxString::FromUTF8(Style->GetUUID()); wxTextCtrl *uuidCtrl = new wxTextCtrl(panel, ID_VECTOR_UUID, uuid, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); uuidBoxSizer->Add(uuidCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row: Visibility Range wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); rangeBox->SetSelection(0); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(400, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdScaleChanged); return panel; } void QuickStyleRasterDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: Style->EnableMinScale(false); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: Style->EnableMinScale(true); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: Style->EnableMinScale(false); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: Style->EnableMinScale(true); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *QuickStyleRasterDialog::CreateContrastEnhancementPage(wxWindow * parent) { // // creating the Contrast Enhancement page // wxPanel *panel = new wxPanel(parent, ID_PANE_CONTRAST_ENHANCEMENT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: Contrast Enhancement boxSizer->AddSpacer(100); wxBoxSizer *contrastSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(contrastSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString contrast[4]; contrast[0] = wxT("&None"); contrast[1] = wxT("Normalize/&Stretch"); contrast[2] = wxT("&Histogram"); contrast[3] = wxT("&GammaValue"); wxRadioBox *contrastBox = new wxRadioBox(panel, ID_SYMBOLIZER_CONTRAST, wxT("&Contrast Enhancement Method"), wxDefaultPosition, wxDefaultSize, 4, contrast, 1, wxRA_SPECIFY_COLS); contrastSizer->Add(contrastBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); contrastBox->SetSelection(0); if (CanApplyContrastEnhancement == false) contrastBox->Enable(false); wxBoxSizer *gammaSizer = new wxBoxSizer(wxHORIZONTAL); contrastSizer->Add(gammaSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *gammaLabel = new wxStaticText(panel, wxID_STATIC, wxT("&GammaValue [x100]:")); gammaSizer->Add(gammaLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *gammaCtrl = new wxSpinCtrl(panel, ID_SYMBOLIZER_GAMMA, wxT("100"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 100, 500, 100); gammaCtrl->Enable(false); gammaSizer->Add(gammaCtrl, 0, wxALIGN_RIGHT | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handler for OK button Connect(ID_SYMBOLIZER_CONTRAST, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdContrastChanged); return panel; } void QuickStyleRasterDialog:: OnCmdContrastChanged(wxCommandEvent & WXUNUSED(event)) { // // Contrast Enhancement Method selection changed // wxRadioBox *contrastCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CONTRAST); wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); switch (contrastCtrl->GetSelection()) { case 1: Style->SetNormalize(true); Style->SetHistogram(false); Style->SetGamma(false); gammaCtrl->Enable(false); break; case 2: Style->SetNormalize(false); Style->SetHistogram(true); Style->SetGamma(false); gammaCtrl->Enable(false); break; case 3: Style->SetNormalize(false); Style->SetHistogram(false); Style->SetGamma(true); gammaCtrl->Enable(true); break; default: Style->SetNormalize(false); Style->SetHistogram(false); Style->SetGamma(false); gammaCtrl->Enable(false); break; }; } wxPanel *QuickStyleRasterDialog::CreateChannelSelectionPage(wxWindow * parent) { // // creating the Channel Selection page // wxPanel *panel = new wxPanel(parent, ID_PANE_CHANNEL_SELECTION); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); panel->SetSizer(topSizer); // Left panel: mode selector boxSizer->AddSpacer(50); wxBoxSizer *pageSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pageSizer, 0, wxALIGN_CENTER_VERTICAL); wxBoxSizer *leftSizer = new wxBoxSizer(wxVERTICAL); pageSizer->Add(leftSizer, 0, wxALIGN_CENTER_VERTICAL); wxString mode[3]; mode[0] = wxT("&None"); mode[1] = wxT("&Triple Band (RGB Image)"); mode[2] = wxT("&Single Band (Grayscale Image)"); wxRadioBox *bandModeBox = new wxRadioBox(panel, ID_SYMBOLIZER_BAND_MODE, wxT("&Channel Selection Method"), wxDefaultPosition, wxDefaultSize, 3, mode, 1, wxRA_SPECIFY_COLS); leftSizer->Add(bandModeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); bandModeBox->SetSelection(0); if (IsMultiband == false) bandModeBox->Enable(false); // First row: ChannelSelection RGB wxBoxSizer *rightSizer = new wxBoxSizer(wxVERTICAL); pageSizer->Add(rightSizer, 0, wxALIGN_CENTER_HORIZONTAL); wxBoxSizer *channelBoxSizer = new wxBoxSizer(wxVERTICAL); rightSizer->Add(channelBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *channelBox = new wxStaticBox(panel, wxID_STATIC, wxT ("Channel Selection (first Band is #1)"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *channelSizer = new wxStaticBoxSizer(channelBox, wxVERTICAL); channelBoxSizer->Add(channelSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *bandSizer = new wxBoxSizer(wxVERTICAL); channelSizer->Add(bandSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *redSizer = new wxBoxSizer(wxHORIZONTAL); bandSizer->Add(redSizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *redLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Red Channel is Band #")); redSizer->Add(redLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *redCtrl = new wxSpinCtrl(panel, ID_SYMBOLIZER_RED, wxT("1"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 1); redSizer->Add(redCtrl, 0, wxALIGN_RIGHT | wxALL, 0); redCtrl->Enable(false); wxBoxSizer *greenSizer = new wxBoxSizer(wxHORIZONTAL); bandSizer->Add(greenSizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *greenLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Green Channel is Band #")); greenSizer->Add(greenLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *greenCtrl = new wxSpinCtrl(panel, ID_SYMBOLIZER_GREEN, wxT("2"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 2); greenSizer->Add(greenCtrl, 0, wxALIGN_RIGHT | wxALL, 0); greenCtrl->Enable(false); wxBoxSizer *blueSizer = new wxBoxSizer(wxHORIZONTAL); bandSizer->Add(blueSizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *blueLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Blue Channel is Band #")); blueSizer->Add(blueLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *blueCtrl = new wxSpinCtrl(panel, ID_SYMBOLIZER_BLUE, wxT("3"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 3); blueSizer->Add(blueCtrl, 0, wxALIGN_RIGHT | wxALL, 0); blueCtrl->Enable(false); // Second row: ChannelSelection Grayscale rightSizer->AddSpacer(25); wxBoxSizer *channel2BoxSizer = new wxBoxSizer(wxVERTICAL); rightSizer->Add(channel2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *channel2Box = new wxStaticBox(panel, wxID_STATIC, wxT ("Channel Selection (first Band is #1)"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *channel2Sizer = new wxStaticBoxSizer(channel2Box, wxVERTICAL); channel2BoxSizer->Add(channel2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *band2Sizer = new wxBoxSizer(wxVERTICAL); channel2Sizer->Add(band2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *graySizer = new wxBoxSizer(wxHORIZONTAL); band2Sizer->Add(graySizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *grayLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Gray Channel is Band #")); graySizer->Add(grayLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *grayCtrl = new wxSpinCtrl(panel, ID_SYMBOLIZER_GRAY, wxT("1"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 1); graySizer->Add(grayCtrl, 0, wxALIGN_RIGHT | wxALL, 0); grayCtrl->Enable(false); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_BAND_MODE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdBandModeChanged); return panel; } void QuickStyleRasterDialog:: OnCmdBandModeChanged(wxCommandEvent & WXUNUSED(event)) { // // Channel Selection Method selection changed // wxRadioBox *bandModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BAND_MODE); wxSpinCtrl *redCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RED); wxSpinCtrl *greenCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GREEN); wxSpinCtrl *blueCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_BLUE); wxSpinCtrl *grayCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GRAY); switch (bandModeCtrl->GetSelection()) { case 1: Style->SetTripleBand(true); Style->SetSingleBand(false); redCtrl->Enable(true); greenCtrl->Enable(true); blueCtrl->Enable(true); grayCtrl->Enable(false); break; case 2: Style->SetTripleBand(false); Style->SetSingleBand(true); redCtrl->Enable(false); greenCtrl->Enable(false); blueCtrl->Enable(false); grayCtrl->Enable(true); break; default: Style->SetTripleBand(false); Style->SetSingleBand(false); redCtrl->Enable(false); greenCtrl->Enable(false); blueCtrl->Enable(false); grayCtrl->Enable(false); break; }; } wxPanel *QuickStyleRasterDialog::CreateColorMapPage(wxWindow * parent) { // // creating the ColorMap page // wxPanel *panel = new wxPanel(parent, ID_PANE_COLOR_MAP); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); boxSizer->AddSpacer(50); wxBoxSizer *mainSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(mainSizer, 0, wxALIGN_CENTER | wxALL, 5); // left box: mode selector wxBoxSizer *modeSizer = new wxBoxSizer(wxVERTICAL); mainSizer->Add(modeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); int max = 4; if (CanApplyNDVI == true) max = 2; wxString mode[max]; mode[0] = wxT("&None"); if (CanApplyNDVI == true) mode[1] = wxT("&NDVI (predefined style)"); else { mode[1] = wxT("&SRTM (predefined style)"); mode[2] = wxT("&Terrain (predefined style)"); mode[3] = wxT("&Color Ramp"); } wxRadioBox *modeBox = new wxRadioBox(panel, ID_SYMBOLIZER_COLOR_MAP_MODE, wxT("&Color Map Type"), wxDefaultPosition, wxDefaultSize, max, mode, 1, wxRA_SPECIFY_COLS); modeSizer->Add(modeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); modeBox->SetSelection(0); if (CanApplyColorMap == false && CanApplyNDVI == false) modeBox->Enable(false); // right box: Color Ramp wxBoxSizer *rampSizer = new wxBoxSizer(wxVERTICAL); mainSizer->Add(rampSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *rampBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Ramp"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *ramp2Sizer = new wxStaticBoxSizer(rampBox, wxVERTICAL); rampSizer->Add(ramp2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *minSizer = new wxBoxSizer(wxHORIZONTAL); ramp2Sizer->Add(minSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3); // Min Color wxStaticBox *minBox = new wxStaticBox(panel, wxID_STATIC, wxT("Min Value"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *min2Sizer = new wxStaticBoxSizer(minBox, wxHORIZONTAL); minSizer->Add(min2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString minColor = wxT("#000000"); wxTextCtrl *colorMinCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_COLOR, minColor, wxDefaultPosition, wxSize(80, 22)); min2Sizer->Add(colorMinCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); colorMinCtrl->Enable(false); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleMinCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_MIN_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); min2Sizer->Add(sampleMinCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxButton *minPick = new wxButton(panel, ID_SYMBOLIZER_MIN_PICKER_BTN, wxT("&Pick a color")); min2Sizer->Add(minPick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); minPick->Enable(false); // Max Color wxBoxSizer *maxSizer = new wxBoxSizer(wxHORIZONTAL); ramp2Sizer->Add(maxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3); wxStaticBox *maxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Max Value"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *max2Sizer = new wxStaticBoxSizer(maxBox, wxHORIZONTAL); maxSizer->Add(max2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString maxColor = wxT("#ffffff"); wxTextCtrl *colorMaxCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_COLOR, maxColor, wxDefaultPosition, wxSize(80, 22)); max2Sizer->Add(colorMaxCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); colorMaxCtrl->Enable(false); wxBitmap bmp2; wxColour color2(255, 255, 255); ColorMapEntry::DoPaintColorSample(32, 32, color2, bmp2); wxStaticBitmap *sampleMaxCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_MAX_PICKER_HEX, bmp2, wxDefaultPosition, wxSize(32, 32)); max2Sizer->Add(sampleMaxCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxButton *maxPick = new wxButton(panel, ID_SYMBOLIZER_MAX_PICKER_BTN, wxT("&Pick a color")); max2Sizer->Add(maxPick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); maxPick->Enable(false); // bottom box: shaded relief wxBoxSizer *shadedSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(shadedSizer, 0, wxALIGN_CENTER_HORIZONTAL); wxStaticBox *shadedBox = new wxStaticBox(panel, wxID_STATIC, wxT("Shaded Relief"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *shaded2Sizer = new wxStaticBoxSizer(shadedBox, wxHORIZONTAL); shadedSizer->Add(shaded2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *reliefSizer = new wxBoxSizer(wxHORIZONTAL); shaded2Sizer->Add(reliefSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxCheckBox *shadedCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_SHADED, wxT("Enable"), wxDefaultPosition, wxDefaultSize); reliefSizer->Add(shadedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); if (CanApplyShadedRelief == false) shadedCtrl->Enable(false); reliefSizer->AddSpacer(25); wxBoxSizer *relief2Sizer = new wxBoxSizer(wxHORIZONTAL); reliefSizer->Add(relief2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *reliefLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Relief Factor:")); relief2Sizer->Add(reliefLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *reliefCtrl = new wxSpinCtrl(panel, ID_SYMBOLIZER_RELIEF, wxT(""), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 0, 0, 0); reliefCtrl->Enable(false); relief2Sizer->Add(reliefCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_COLOR_MAP_MODE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdColorMapModeChanged); Connect(ID_SYMBOLIZER_MIN_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdColorMinChanged); Connect(ID_SYMBOLIZER_MIN_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdMinColorPicker); Connect(ID_SYMBOLIZER_MAX_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdColorMaxChanged); Connect(ID_SYMBOLIZER_MAX_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnCmdMaxColorPicker); Connect(ID_SYMBOLIZER_SHADED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleRasterDialog::OnShadedChanged); return panel; } void QuickStyleRasterDialog:: OnCmdColorMapModeChanged(wxCommandEvent & WXUNUSED(event)) { // // Color Map Mode selection changed // wxRadioBox *colorMapModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_COLOR_MAP_MODE); wxTextCtrl *colorMinCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_COLOR); wxButton *minPick = (wxButton *) FindWindow(ID_SYMBOLIZER_MIN_PICKER_BTN); wxTextCtrl *colorMaxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_COLOR); wxButton *maxPick = (wxButton *) FindWindow(ID_SYMBOLIZER_MAX_PICKER_BTN); wxStaticBitmap *sampleMinCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_MIN_PICKER_HEX); wxStaticBitmap *sampleMaxCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_MIN_PICKER_HEX); if (CanApplyNDVI == true) { // special case: NDVI Style->SetSrtmColorMap(false); Style->SetTerrainColorMap(false); Style->SetColorRamp(false); colorMinCtrl->Enable(false); minPick->Enable(false); colorMaxCtrl->Enable(false); maxPick->Enable(false); colorMinCtrl->SetValue(wxT("#000000")); colorMaxCtrl->SetValue(wxT("#ffffff")); switch (colorMapModeCtrl->GetSelection()) { case 1: Style->SetNdviColorMap(true); break; default: Style->SetNdviColorMap(false); break; }; } else { // ordinary Color Map Style->SetNdviColorMap(false); switch (colorMapModeCtrl->GetSelection()) { case 1: Style->SetSrtmColorMap(true); Style->SetTerrainColorMap(false); Style->SetColorRamp(false); colorMinCtrl->Enable(false); minPick->Enable(false); colorMaxCtrl->Enable(false); maxPick->Enable(false); colorMinCtrl->SetValue(wxT("#000000")); colorMaxCtrl->SetValue(wxT("#ffffff")); break; case 2: Style->SetSrtmColorMap(false); Style->SetTerrainColorMap(true); Style->SetColorRamp(false); colorMinCtrl->Enable(false); minPick->Enable(false); colorMaxCtrl->Enable(false); maxPick->Enable(false); colorMinCtrl->SetValue(wxT("#000000")); colorMaxCtrl->SetValue(wxT("#ffffff")); break; case 3: Style->SetSrtmColorMap(false); Style->SetTerrainColorMap(false); Style->SetColorRamp(true); colorMinCtrl->Enable(true); minPick->Enable(true); colorMaxCtrl->Enable(true); maxPick->Enable(true); colorMinCtrl-> SetValue(wxString::FromUTF8(Style->GetMinValueColor())); colorMaxCtrl-> SetValue(wxString::FromUTF8(Style->GetMaxValueColor())); break; default: Style->SetSrtmColorMap(false); Style->SetTerrainColorMap(false); Style->SetColorRamp(false); colorMinCtrl->Enable(false); minPick->Enable(false); colorMaxCtrl->Enable(false); maxPick->Enable(false); colorMinCtrl->SetValue(wxT("#000000")); colorMaxCtrl->SetValue(wxT("#ffffff")); break; }; } } void QuickStyleRasterDialog:: OnCmdColorMinChanged(wxCommandEvent & WXUNUSED(event)) { // // Min Value color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_MIN_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleRasterDialog:: OnCmdMinColorPicker(wxCommandEvent & WXUNUSED(event)) { // // Min Value color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleRasterDialog:: OnCmdColorMaxChanged(wxCommandEvent & WXUNUSED(event)) { // // Max Value color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_MAX_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleRasterDialog:: OnCmdMaxColorPicker(wxCommandEvent & WXUNUSED(event)) { // // Max Value color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleRasterDialog::OnShadedChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Shaded Relief (on/off): // wxCheckBox *shadedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_SHADED); wxSpinCtrl *reliefCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); if (shadedCtrl->IsChecked() == true) { reliefCtrl->SetRange(1, 200); reliefCtrl->SetValue(25); reliefCtrl->Enable(true); Style->SetShadedRelief(true); } else { reliefCtrl->SetRange(0, 0); reliefCtrl->SetValue(0); reliefCtrl->Enable(false); Style->SetShadedRelief(false); } } bool QuickStyleRasterDialog::UpdateStyle() { // // updating the QuickStyle // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PageContrastEnhancementIndex) ret = RetrieveContrastEnhancementPage(); if (idx == PageChannelSelectionIndex) ret = RetrieveChannelSelectionPage(); if (idx == PageColorMapIndex) ret = RetrieveColorMapPage(); } if (ret == false) return false; RasterLayerConfig *config = Layer->GetRasterConfig(); bool setCurrentStyle = false; if (config->GetStyle() == NULL) setCurrentStyle = true; else { if (strcmp(Style->GetUUID(), config->GetStyle()) != 0) setCurrentStyle = true; } if (setCurrentStyle == true) { config->SetStyle(Style->GetUUID()); IsConfigChanged = true; } IsConfigChanged = Layer->UpdateQuickStyle(Style); return true; } bool QuickStyleRasterDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // double min = Style->GetScaleMin(); double max = Style->GetScaleMax(); double opacity = Style->GetOpacity(); if (Style->IsMinScaleEnabled() == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&min) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (min < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMaxScaleEnabled() == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&max) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (max < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() == true) { if (min >= max) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; Style->SetScaleMin(min); Style->SetScaleMax(max); Style->SetOpacity(opacity); return true; } void QuickStyleRasterDialog::UpdateMainPage() { // // updating the MAIN page // wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(0); else if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(1); else if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (Style->IsMinScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMin()); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (Style->IsMaxScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMax()); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); opacityCtrl->SetValue(Style->GetOpacity() * 100.0); } bool QuickStyleRasterDialog::RetrieveContrastEnhancementPage(bool check) { // // retrieving params from the CONTRAST ENHANCEMENT page // if (Style->IsGamma() == true) { wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); Style->SetGammaValue(gammaCtrl->GetValue() / 100.0); } else Style->SetGammaValue(1.0); return true; } void QuickStyleRasterDialog::UpdateContrastEnhancementPage() { // // updating the CONTRAST ENHANCEMENT page // wxRadioBox *contrastCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CONTRAST); wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); if (Style->IsNormalize() == true) { contrastCtrl->SetSelection(1); gammaCtrl->Enable(false); } else if (Style->IsHistogram() == true) { contrastCtrl->SetSelection(2); gammaCtrl->Enable(false); } else if (Style->IsGamma() == true) { contrastCtrl->SetSelection(3); gammaCtrl->Enable(true); } else { contrastCtrl->SetSelection(0); gammaCtrl->Enable(false); } gammaCtrl->SetValue(Style->GetGammaValue() * 100.0); if (CanApplyContrastEnhancement == true) contrastCtrl->Enable(true); else contrastCtrl->Enable(false); } bool QuickStyleRasterDialog::RetrieveChannelSelectionPage(bool check) { // // retrieving params from the CHANNEL SELECTION page // if (Style->IsTripleBand() == true) { wxSpinCtrl *redCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RED); Style->SetRedBand(redCtrl->GetValue() - 1); wxSpinCtrl *greenCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GREEN); Style->SetGreenBand(greenCtrl->GetValue() - 1); wxSpinCtrl *blueCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_BLUE); Style->SetBlueBand(blueCtrl->GetValue() - 1); Style->SetGrayBand(0); } else if (Style->IsSingleBand() == true) { wxSpinCtrl *grayCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GRAY); Style->SetGrayBand(grayCtrl->GetValue() - 1); Style->SetRedBand(0); Style->SetGreenBand(0); Style->SetBlueBand(0); } else { Style->SetRedBand(0); Style->SetGreenBand(0); Style->SetBlueBand(0); Style->SetGrayBand(0); } return true; } void QuickStyleRasterDialog::UpdateChannelSelectionPage() { // // updating the CHANNEL SELECTION page // wxRadioBox *bandModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BAND_MODE); wxSpinCtrl *redCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RED); wxSpinCtrl *greenCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GREEN); wxSpinCtrl *blueCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_BLUE); wxSpinCtrl *grayCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GRAY); if (IsMultiband == false) { bandModeCtrl->SetSelection(0); redCtrl->Enable(false); greenCtrl->Enable(false); blueCtrl->Enable(false); grayCtrl->Enable(false); redCtrl->SetValue(1); greenCtrl->SetValue(1); blueCtrl->SetValue(1); grayCtrl->SetValue(1); bandModeCtrl->Enable(false); return; } if (Style->IsTripleBand() == true) { bandModeCtrl->SetSelection(1); redCtrl->Enable(true); greenCtrl->Enable(true); blueCtrl->Enable(true); grayCtrl->Enable(false); } else if (Style->IsSingleBand() == true) { bandModeCtrl->SetSelection(2); redCtrl->Enable(false); greenCtrl->Enable(false); blueCtrl->Enable(false); grayCtrl->Enable(true); } else { bandModeCtrl->SetSelection(0); redCtrl->Enable(false); greenCtrl->Enable(false); blueCtrl->Enable(false); grayCtrl->Enable(false); } redCtrl->SetRange(1, NumBands); greenCtrl->SetRange(1, NumBands); blueCtrl->SetRange(1, NumBands); grayCtrl->SetRange(1, NumBands); redCtrl->SetValue(Style->GetRedBand() + 1); greenCtrl->SetValue(Style->GetGreenBand() + 1); blueCtrl->SetValue(Style->GetBlueBand() + 1); grayCtrl->SetValue(Style->GetGrayBand() + 1); if (IsMultiband == true) bandModeCtrl->Enable(true); else bandModeCtrl->Enable(false); } bool QuickStyleRasterDialog::RetrieveColorMapPage(bool check) { // // retrieving params from the COLOR MAP page // if (Style->IsShadedRelief() == true) { wxSpinCtrl *shadedCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); Style->SetShadedReliefFactor(shadedCtrl->GetValue()); } else Style->SetShadedReliefFactor(0.0); wxTextCtrl *colorMinCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_COLOR); wxTextCtrl *colorMaxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_COLOR); char dummy[64]; strcpy(dummy, colorMinCtrl->GetValue().ToUTF8()); Style->SetMinValueColor(dummy); strcpy(dummy, colorMaxCtrl->GetValue().ToUTF8()); Style->SetMaxValueColor(dummy); return true; } void QuickStyleRasterDialog::UpdateColorMapPage() { // // updating the COLOR MAP page // wxRadioBox *modeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_COLOR_MAP_MODE); wxTextCtrl *colorMinCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_COLOR); wxStaticBitmap *sampleMinCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_MIN_PICKER_HEX); wxButton *minPick = (wxButton *) FindWindow(ID_SYMBOLIZER_MIN_PICKER_BTN); wxTextCtrl *colorMaxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_COLOR); wxStaticBitmap *sampleMaxCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_MAX_PICKER_HEX); wxButton *maxPick = (wxButton *) FindWindow(ID_SYMBOLIZER_MAX_PICKER_BTN); wxCheckBox *shadedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_SHADED); wxSpinCtrl *reliefCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); if (CanApplyNDVI == true) { // special case: NDVI if (Style->IsNdviColorMap() == true) modeBox->SetSelection(1); else modeBox->SetSelection(0); } else { // ordinary Color Map if (Style->IsSrtmColorMap() == true) modeBox->SetSelection(1); else if (Style->IsTerrainColorMap() == true) modeBox->SetSelection(2); else if (Style->IsColorRamp() == true) modeBox->SetSelection(3); else modeBox->SetSelection(0); } if (Style->IsColorRamp() == true) { colorMinCtrl->Enable(true); minPick->Enable(true); colorMaxCtrl->Enable(true); maxPick->Enable(true); colorMinCtrl->SetValue(wxString::FromUTF8(Style->GetMinValueColor())); colorMaxCtrl->SetValue(wxString::FromUTF8(Style->GetMaxValueColor())); } else { colorMinCtrl->Enable(false); minPick->Enable(false); colorMaxCtrl->Enable(false); maxPick->Enable(false); colorMinCtrl->SetValue(wxT("#000000")); colorMaxCtrl->SetValue(wxT("#ffffff")); } if (Style->IsShadedRelief() == true) { reliefCtrl->SetRange(1, 200); reliefCtrl->SetValue(Style->GetShadedReliefFactor()); reliefCtrl->Enable(true); } else { reliefCtrl->SetRange(0, 0); reliefCtrl->SetValue(0); reliefCtrl->Enable(false); } if (CanApplyColorMap == true || CanApplyNDVI == true) modeBox->Enable(true); else modeBox->Enable(false); if (CanApplyShadedRelief == true) shadedCtrl->Enable(true); else shadedCtrl->Enable(false); } void QuickStyleRasterDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret = false; int idx = event.GetOldSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PageContrastEnhancementIndex) ret = RetrieveContrastEnhancementPage(); if (idx == PageChannelSelectionIndex) ret = RetrieveChannelSelectionPage(); if (idx == PageColorMapIndex) ret = RetrieveColorMapPage(); } if (ret != true) event.Veto(); } void QuickStyleRasterDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // int idx = event.GetSelection(); if (idx == 0) UpdateMainPage(); else { if (idx == PageContrastEnhancementIndex) UpdateContrastEnhancementPage(); if (idx == PageChannelSelectionIndex) UpdateChannelSelectionPage(); if (idx == PageColorMapIndex) UpdateColorMapPage(); } } void QuickStyleRasterDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // permanently saving the QuickStyle and quitting // if (UpdateStyle() == true) wxDialog::EndModal(wxID_OK); } void QuickStyleRasterDialog::OnApply(wxCommandEvent & WXUNUSED(event)) { // // applying the QuickStyle and continuing // if (UpdateStyle() == true) { if (IsConfigChanged == true) MapPanel->RefreshMap(); } } void QuickStyleRasterDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the Quick Style as an external file // bool xret = false; int ret; wxString path; wxString lastDir; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) xret = RetrieveMainPage(); else { if (idx == PageContrastEnhancementIndex) xret = RetrieveContrastEnhancementPage(); if (idx == PageChannelSelectionIndex) xret = RetrieveChannelSelectionPage(); if (idx == PageColorMapIndex) xret = RetrieveColorMapPage(); } if (xret == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE QuickStyle to a file"), wxT(""), wxT("style.xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml = Style->CreateXmlStyle(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE QuickStyle successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } } void QuickStyleRasterDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Quick Style into the Clipboard // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PageContrastEnhancementIndex) ret = RetrieveContrastEnhancementPage(); if (idx == PageChannelSelectionIndex) ret = RetrieveChannelSelectionPage(); if (idx == PageColorMapIndex) ret = RetrieveColorMapPage(); } if (ret == false) return; char *xml = Style->CreateXmlStyle(); wxString XMLstring = wxString::FromUTF8(xml); sqlite3_free(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void QuickStyleRasterDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } void QuickStyleRasterDialog::GetCoverageInfos() { // // attempting to get the basic Coverage Infos // char *prefix; char *xprefix; char *name; char *sql; int ret; char **results; int rows; int columns; wxString pixelType; wxString sampleType; int numBands; bool ok_min = false; bool ok_max = false; double min = 0.0; double max = 0.0; if (DbPrefix.Len() == 0) { prefix = (char *) malloc(5); strcpy(prefix, "MAIN"); } else { prefix = (char *) malloc(DbPrefix.Len() * 4); strcpy(prefix, DbPrefix.ToUTF8()); } xprefix = gaiaDoubleQuotedSql(prefix); free(prefix); name = (char *) malloc(LayerName.Len() * 4); strcpy(name, LayerName.ToUTF8()); sql = sqlite3_mprintf ("SELECT pixel_type, sample_type, num_bands, enable_auto_ndvi, " "RL2_GetBandStatistics_Min(statistics, 0), RL2_GetBandStatistics_Max(statistics, 0) " "FROM \"%s\".raster_coverages WHERE Upper(coverage_name) = Upper(%Q)", xprefix, name); free(xprefix); free(name); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; for (int i = 1; i <= rows; i++) { // retrieving the basic Coverage Infos pixelType = wxString::FromUTF8(results[(i * columns) + 0]); sampleType = wxString::FromUTF8(results[(i * columns) + 1]); numBands = atoi(results[(i * columns) + 2]); if (results[(i * columns) + 3] == NULL) CanApplyNDVI = false; else { if (atoi(results[(i * columns) + 3]) == 0) CanApplyNDVI = false; else CanApplyNDVI = true; } if (results[(i * columns) + 4] == NULL) ok_min = false; else { ok_min = true; min = atof(results[(i * columns) + 4]); } if (results[(i * columns) + 5] == NULL) ok_max = false; else { ok_max = true; max = atof(results[(i * columns) + 5]); } } sqlite3_free_table(results); if (pixelType.Cmp(wxT("RGB")) == 0 || pixelType.Cmp(wxT("GRAYSCALE")) == 0 || pixelType.Cmp(wxT("MULTIBAND")) == 0 || (pixelType.Cmp(wxT("DATAGRID")) == 0 && sampleType.Cmp(wxT("UINT16")) == 0)) CanApplyContrastEnhancement = true; else CanApplyContrastEnhancement = false; if (pixelType.Cmp(wxT("MULTIBAND")) == 0) { IsMultiband = true; NumBands = numBands; RedBand = 0; GreenBand = 1; BlueBand = 2; } else IsMultiband = false; if (ok_min == true && ok_max == true) { CanApplyColorMap = true; MinPixelValue = min; MaxPixelValue = max; } else CanApplyColorMap = false; if (pixelType.Cmp(wxT("DATAGRID")) == 0 || pixelType.Cmp(wxT("MONOCHROME")) == 0) ; else CanApplyColorMap = false; if (pixelType.Cmp(wxT("DATAGRID")) == 0) CanApplyShadedRelief = true; else CanApplyShadedRelief = false; } |
Added QuickStylesTopology.cpp.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 |
/* / QuickStylesTopology.cpp / Quick Styles wizards (Topology layers) / / version 2.0, 2017 May 26 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/imaglist.h" #include "wx/colordlg.h" #include "wx/filename.h" #include "wx/clipbrd.h" QuickStyleTopologyObj::QuickStyleTopologyObj(int type) { // ctor QuickStyleObj::DoGetUUID(UUID); Type = type; MinScaleEnabled = false; MaxScaleEnabled = false; ScaleMin = 0.0; ScaleMax = 0.0; NodeOpacity = 1.0; NodeSize = 16; NodeRotation = 0.0; NodeAnchorX = 0.5; NodeAnchorY = 0.5; NodeDisplacementX = 0.0; NodeDisplacementY = 0.0; NodeWellKnownMark = QuickStyleObj::RandomWellKnownMark(); QuickStyleObj::RandomColor(NodeFillColor); QuickStyleObj::RandomColor(NodeStrokeColor); EdgeLinkOpacity = 1.0; EdgeLinkPerpendicularOffset = 0.0; EdgeLinkStrokeWidth = 1.0; QuickStyleObj::RandomColor(EdgeLinkStrokeColor); EdgeLinkDotStyle = QUICK_STYLE_SOLID_LINE; FaceFill = true; FaceStroke = true; FaceDisplacementX = 0.0; FaceDisplacementY = 0.0; FacePerpendicularOffset = 0.0; FaceFillOpacity = 1.0; QuickStyleObj::RandomColor(FaceFillColor); FaceStrokeOpacity = 1.0; FaceStrokeWidth = 1.0; QuickStyleObj::RandomColor(FaceStrokeColor); EdgeLinkSeedOpacity = 1.0; EdgeLinkSeedSize = 16; EdgeLinkSeedRotation = 0.0; EdgeLinkSeedAnchorX = 0.5; EdgeLinkSeedAnchorY = 0.5; EdgeLinkSeedDisplacementX = 0.0; EdgeLinkSeedDisplacementY = 0.0; EdgeLinkSeedWellKnownMark = QuickStyleObj::RandomWellKnownMark(); QuickStyleObj::RandomColor(EdgeLinkSeedFillColor); QuickStyleObj::RandomColor(EdgeLinkSeedStrokeColor); FaceSeedOpacity = 1.0; FaceSeedSize = 16; FaceSeedRotation = 0.0; FaceSeedAnchorX = 0.5; FaceSeedAnchorY = 0.5; FaceSeedDisplacementX = 0.0; FaceSeedDisplacementY = 0.0; FaceSeedWellKnownMark = QuickStyleObj::RandomWellKnownMark(); QuickStyleObj::RandomColor(FaceSeedFillColor); QuickStyleObj::RandomColor(FaceSeedStrokeColor); XmlStyle = NULL; } QuickStyleTopologyObj *QuickStyleTopologyObj::Clone() { // // cloning a Quick Style Topology // QuickStyleTopologyObj *Style = new QuickStyleTopologyObj(this->Type); strcpy(Style->UUID, this->UUID); Style->MinScaleEnabled = this->MinScaleEnabled; Style->MaxScaleEnabled = this->MaxScaleEnabled; Style->ScaleMin = this->ScaleMin; Style->ScaleMax = this->ScaleMax; Style->NodeOpacity = this->NodeOpacity; Style->NodeSize = this->NodeSize; Style->NodeRotation = this->NodeRotation; Style->NodeAnchorX = this->NodeAnchorX; Style->NodeAnchorY = this->NodeAnchorY; Style->NodeDisplacementX = this->NodeDisplacementX; Style->NodeDisplacementY = this->NodeDisplacementY; Style->NodeWellKnownMark = this->NodeWellKnownMark; strcpy(Style->NodeFillColor, this->NodeFillColor); strcpy(Style->NodeStrokeColor, this->NodeStrokeColor); Style->EdgeLinkOpacity = this->EdgeLinkOpacity; Style->EdgeLinkPerpendicularOffset = this->EdgeLinkPerpendicularOffset; Style->EdgeLinkStrokeWidth = this->EdgeLinkStrokeWidth; strcpy(Style->EdgeLinkStrokeColor, this->EdgeLinkStrokeColor); Style->EdgeLinkDotStyle = this->EdgeLinkDotStyle; Style->FaceFill = this->FaceFill; Style->FaceStroke = this->FaceStroke; Style->FaceDisplacementX = this->FaceDisplacementX; Style->FaceDisplacementY = this->FaceDisplacementY; Style->FacePerpendicularOffset = this->FacePerpendicularOffset; Style->FaceFillOpacity = this->FaceFillOpacity; strcpy(Style->FaceFillColor, this->FaceFillColor); Style->FaceStrokeOpacity = this->FaceStrokeOpacity; Style->FaceStrokeWidth = this->FaceStrokeWidth; strcpy(Style->FaceStrokeColor, this->FaceStrokeColor); Style->EdgeLinkSeedOpacity = this->EdgeLinkSeedOpacity; Style->EdgeLinkSeedSize = this->EdgeLinkSeedSize; Style->EdgeLinkSeedRotation = this->EdgeLinkSeedRotation; Style->EdgeLinkSeedAnchorX = this->EdgeLinkSeedAnchorX; Style->EdgeLinkSeedAnchorY = this->EdgeLinkSeedAnchorY; Style->EdgeLinkSeedDisplacementX = this->EdgeLinkSeedDisplacementX; Style->EdgeLinkSeedDisplacementY = this->EdgeLinkSeedDisplacementY; Style->EdgeLinkSeedWellKnownMark = this->EdgeLinkSeedWellKnownMark; strcpy(Style->EdgeLinkSeedFillColor, this->EdgeLinkSeedFillColor); strcpy(Style->EdgeLinkSeedStrokeColor, this->EdgeLinkSeedStrokeColor); Style->FaceSeedOpacity = this->FaceSeedOpacity; Style->FaceSeedSize = this->FaceSeedSize; Style->FaceSeedRotation = this->FaceSeedRotation; Style->FaceSeedAnchorX = this->FaceSeedAnchorX; Style->FaceSeedAnchorY = this->FaceSeedAnchorY; Style->FaceSeedDisplacementX = this->FaceSeedDisplacementX; Style->FaceSeedDisplacementY = this->FaceSeedDisplacementY; Style->FaceSeedWellKnownMark = this->FaceSeedWellKnownMark; strcpy(Style->FaceSeedFillColor, this->FaceSeedFillColor); strcpy(Style->FaceSeedStrokeColor, this->FaceSeedStrokeColor); Style->XmlStyle = NULL; return Style; } bool QuickStyleTopologyObj::Compare(QuickStyleTopologyObj * Style) { // // comparing two Quick Style objects (Topology) // if (strcmp(Style->UUID, this->UUID) != 0) return false; if (Style->MinScaleEnabled != this->MinScaleEnabled) return false; if (Style->MaxScaleEnabled != this->MaxScaleEnabled) return false; if (Style->ScaleMin != this->ScaleMin) return false; if (Style->ScaleMax != this->ScaleMax) return false; if (Style->NodeOpacity != this->NodeOpacity) return false; if (Style->NodeSize != this->NodeSize) return false; if (Style->NodeRotation != this->NodeRotation) return false; if (Style->NodeAnchorX != this->NodeAnchorX) return false; if (Style->NodeAnchorY != this->NodeAnchorY) return false; if (Style->NodeDisplacementX != this->NodeDisplacementX) return false; if (Style->NodeDisplacementY != this->NodeDisplacementY) return false; if (Style->NodeWellKnownMark != this->NodeWellKnownMark) return false; if (strcmp(Style->NodeFillColor, this->NodeFillColor) != 0) return false; if (strcmp(Style->NodeStrokeColor, this->NodeStrokeColor) != 0) return false; if (Style->EdgeLinkOpacity != this->EdgeLinkOpacity) return false; if (Style->EdgeLinkPerpendicularOffset != this->EdgeLinkPerpendicularOffset) return false; if (Style->EdgeLinkStrokeWidth != this->EdgeLinkStrokeWidth) return false; if (strcmp(Style->EdgeLinkStrokeColor, this->EdgeLinkStrokeColor) != 0) return false; if (Style->EdgeLinkDotStyle != this->EdgeLinkDotStyle) return false; if (Style->FaceFill != this->FaceFill) return false; if (Style->FaceStroke != this->FaceStroke) return false; if (Style->FaceDisplacementX != this->FaceDisplacementX) return false; if (Style->FaceDisplacementY != this->FaceDisplacementY) return false; if (Style->FacePerpendicularOffset != this->FacePerpendicularOffset) return false; if (Style->FaceFillOpacity != this->FaceFillOpacity) return false; if (strcmp(Style->FaceFillColor, this->FaceFillColor) != 0) return false; if (Style->FaceStrokeOpacity != this->FaceStrokeOpacity) return false; if (Style->FaceStrokeWidth != this->FaceStrokeWidth) return false; if (strcmp(Style->FaceStrokeColor, this->FaceStrokeColor) != 0) return false; if (Style->EdgeLinkSeedOpacity != this->EdgeLinkSeedOpacity) return false; if (Style->EdgeLinkSeedSize != this->EdgeLinkSeedSize) return false; if (Style->EdgeLinkSeedRotation != this->EdgeLinkSeedRotation) return false; if (Style->EdgeLinkSeedAnchorX != this->EdgeLinkSeedAnchorX) return false; if (Style->EdgeLinkSeedAnchorY != this->EdgeLinkSeedAnchorY) return false; if (Style->EdgeLinkSeedDisplacementX != this->EdgeLinkSeedDisplacementX) return false; if (Style->EdgeLinkSeedDisplacementY != this->EdgeLinkSeedDisplacementY) return false; if (Style->EdgeLinkSeedWellKnownMark != this->EdgeLinkSeedWellKnownMark) return false; if (strcmp(Style->EdgeLinkSeedFillColor, this->EdgeLinkSeedFillColor) != 0) return false; if (strcmp(Style->EdgeLinkSeedStrokeColor, this->EdgeLinkSeedStrokeColor) != 0) return false; if (Style->FaceSeedOpacity != this->FaceSeedOpacity) return false; if (Style->FaceSeedSize != this->FaceSeedSize) return false; if (Style->FaceSeedRotation != this->FaceSeedRotation) return false; if (Style->FaceSeedAnchorX != this->FaceSeedAnchorX) return false; if (Style->FaceSeedAnchorY != this->FaceSeedAnchorY) return false; if (Style->FaceSeedDisplacementX != this->FaceSeedDisplacementX) return false; if (Style->FaceSeedDisplacementY != this->FaceSeedDisplacementY) return false; if (Style->FaceSeedWellKnownMark != this->FaceSeedWellKnownMark) return false; if (strcmp(Style->FaceSeedFillColor, this->FaceSeedFillColor) != 0) return false; if (strcmp(Style->FaceSeedStrokeColor, this->FaceSeedStrokeColor) != 0) return false; return true; } void QuickStyleTopologyObj::UpdateXmlStyle() { // // updating the XML Style // if (XmlStyle != NULL) sqlite3_free(XmlStyle); XmlStyle = CreateXmlStyle(); } char *QuickStyleTopologyObj::CreateXmlStyle() { // // creating the XML Style // char *prev; char *xml2; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; xml = sqlite3_mprintf("%s<FeatureTypeStyle version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - Topology"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; if (Type == MAP_LAYER_NETWORK) { // Links xml2 = DoCreateEdgeLinkXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // Nodes xml2 = DoCreateNodeXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // LinkSeeds xml2 = DoCreateEdgeLinkSeedXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } } else { // Faces xml2 = DoCreateFaceXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // Edges xml2 = DoCreateEdgeLinkXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // Nodes xml2 = DoCreateNodeXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // EdgeSeeds xml2 = DoCreateEdgeLinkSeedXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } // EdgeSeeds xml2 = DoCreateFaceSeedXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } } xml = sqlite3_mprintf("%s</FeatureTypeStyle>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateFaceXML() { // // creating the XML Style - Face // char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t<Name>Face</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>face</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PolygonSymbolizer>\r\n", prev, extra); prev = xml; if (FaceFill == true) { // Polygon Fill xml = sqlite3_mprintf("%s%s\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, FaceFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, FaceFillOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FaceStroke == true) { // Polygon Stroke xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, FaceStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, FaceStrokeOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, FaceStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FaceDisplacementX != 0.0 || FaceDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, FaceDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, FaceDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FacePerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.4f</PerpendicularOffset>\r\n", prev, extra, FacePerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</PolygonSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateEdgeLinkXML() { // // creating the XML Style - Edge or Link // char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t<Name>Link</Name>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t<Name>Edge</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>link</ogc:Literal>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>edge</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<LineSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, EdgeLinkStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, EdgeLinkOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, EdgeLinkStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; const char *dashArray; switch (EdgeLinkDotStyle) { case QUICK_STYLE_DOT_LINE: dashArray = "5.0, 10.0"; break; case QUICK_STYLE_DASH_LINE: dashArray = "20.0, 20.0"; break; case QUICK_STYLE_DASH_DOT_LINE: dashArray = "20.0, 10.0, 5.0, 10.0"; break; default: dashArray = NULL; break; }; if (dashArray != NULL) { xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-dasharray\">%s</SvgParameter>\r\n", prev, extra, dashArray); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (EdgeLinkPerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.2f</PerpendicularOffset>\r\n", prev, extra, EdgeLinkPerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</LineSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateNodeXML() { // // creating the XML Style - Node // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t<Name>Node</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>node</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (NodeWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, NodeFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, NodeStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (NodeOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, NodeOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, NodeSize); sqlite3_free(prev); prev = xml; if (NodeRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, NodeRotation); sqlite3_free(prev); prev = xml; } if (NodeAnchorX != 0.5 || NodeAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, NodeAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, NodeAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (NodeDisplacementX != 0.0 || NodeDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, NodeDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, NodeDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateEdgeLinkSeedXML() { // // creating the XML Style - Edge or Link Seed // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t<Name>LinkSeed</Name>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t<Name>EdgeSeed</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; if (Type == MAP_LAYER_NETWORK) xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>link_seed</ogc:Literal>\r\n", prev); else xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>edge_seed</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (EdgeLinkSeedWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, EdgeLinkSeedFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, EdgeLinkSeedStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (EdgeLinkSeedOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, EdgeLinkSeedOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, EdgeLinkSeedSize); sqlite3_free(prev); prev = xml; if (EdgeLinkSeedRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, EdgeLinkSeedRotation); sqlite3_free(prev); prev = xml; } if (EdgeLinkSeedAnchorX != 0.5 || EdgeLinkSeedAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, EdgeLinkSeedAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, EdgeLinkSeedAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (EdgeLinkSeedDisplacementX != 0.0 || EdgeLinkSeedDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, EdgeLinkSeedDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, EdgeLinkSeedDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleTopologyObj::DoCreateFaceSeedXML() { // // creating the XML Style - FaceSeed // const char *cstr; char *prev; char *xml = sqlite3_mprintf("\t<Rule>\r\n"); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t<Name>FaceSeed</Name>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<ogc:Filter>\r\n\t\t\t<ogc:PropertyIsEqualTo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<ogc:PropertyName>topoclass</ogc:PropertyName>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<ogc:Literal>face_seed</ogc:Literal>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</ogc:PropertyIsEqualTo>\r\n\t\t</ogc:Filter>\r\n", prev); sqlite3_free(prev); prev = xml; const char *extra = "\t\t"; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); prev = xml; xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (FaceSeedWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, FaceSeedFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, FaceSeedStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (FaceSeedOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, FaceSeedOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, FaceSeedSize); sqlite3_free(prev); prev = xml; if (FaceSeedRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, FaceSeedRotation); sqlite3_free(prev); prev = xml; } if (FaceSeedAnchorX != 0.5 || FaceSeedAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, FaceSeedAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, FaceSeedAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (FaceSeedDisplacementX != 0.0 || FaceSeedDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, FaceSeedDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, FaceSeedDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Rule>\r\n", prev); sqlite3_free(prev); return xml; } const unsigned char *QuickStyleTopologyObj::CloneXmlStyle() { // // cloning the XML Style definition // if (XmlStyle == NULL) XmlStyle = CreateXmlStyle(); if (XmlStyle == NULL) return NULL; int len = strlen(XmlStyle); char *cloned = (char *) malloc(len + 1); strcpy(cloned, XmlStyle); return (const unsigned char *) cloned; } bool QuickStyleTopologyDialog::Create(MyMapPanel * parent, MapLayer * layer) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; Type = Layer->GetType(); DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); IsConfigChanged = false; wxString title = wxT("QuickStyle (Topology) Edit"); if (Type == MAP_LAYER_NETWORK) title = wxT("QuickStyle (Network) Edit"); if (wxPropertySheetDialog::Create(parent, wxID_ANY, title) == false) return false; if (Layer->GetQuickStyleTopology() != NULL) Style = Layer->CloneQuickStyleTopology(); else Style = new QuickStyleTopologyObj(Type); wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); if (Type == MAP_LAYER_NETWORK) { wxPanel *nodePage = CreateNodePage(book); book->AddPage(nodePage, wxT("Nodes"), false); wxPanel *edgeLinkPage = CreateEdgeLinkPage(book); book->AddPage(edgeLinkPage, wxT("Links"), false); wxPanel *edgeLinkSeedPage = CreateEdgeLinkSeedPage(book); book->AddPage(edgeLinkSeedPage, wxT("Link Seeds"), false); } else { wxPanel *nodePage = CreateNodePage(book); book->AddPage(nodePage, wxT("Nodes"), false); wxPanel *edgeLinkPage = CreateEdgeLinkPage(book); book->AddPage(edgeLinkPage, wxT("Edges"), false); wxPanel *facePage = CreateFacePage(book); book->AddPage(facePage, wxT("Faces"), false); wxPanel *edgeLinkSeedPage = CreateEdgeLinkSeedPage(book); book->AddPage(edgeLinkSeedPage, wxT("Edge Seeds"), false); wxPanel *faceSeedPage = CreateFaceSeedPage(book); book->AddPage(faceSeedPage, wxT("Face Seeds"), false); } CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnQuit); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnOk); Connect(ID_QUICK_STYLE_APPLY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnApply); Connect(ID_QUICK_STYLE_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnExport); Connect(ID_QUICK_STYLE_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } void QuickStyleTopologyDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *save = new wxButton(this, ID_QUICK_STYLE_APPLY, wxT("&Apply")); btnBox->Add(save, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_QUICK_STYLE_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_QUICK_STYLE_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } wxPanel *QuickStyleTopologyDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // First row: Layer name boxSizer->AddSpacer(50); wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *nameSizer = new wxBoxSizer(wxVERTICAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *nameBox = new wxStaticBox(panel, wxID_ANY, wxT("Layer FullName"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString fullName = DbPrefix + wxT(".") + LayerName; wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_VECTOR_LAYER, fullName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *typeBox = new wxStaticBox(panel, wxID_ANY, wxT("Geometry Type"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *typeBoxSizer = new wxStaticBoxSizer(typeBox, wxHORIZONTAL); nameSizer->Add(typeBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString typeName = wxT("UNKNOWN"); if (Type == MAP_LAYER_NETWORK) typeName = wxT("Network (ISO TopoNet)"); if (Type == MAP_LAYER_TOPOLOGY) typeName = wxT("Topology (ISO TopoGeo)"); wxTextCtrl *typeCtrl = new wxTextCtrl(panel, ID_VECTOR_TYPE, typeName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); typeBoxSizer->Add(typeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *uuidBox = new wxStaticBox(panel, wxID_ANY, wxT("QuickStyle Name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *uuidBoxSizer = new wxStaticBoxSizer(uuidBox, wxHORIZONTAL); nameSizer->Add(uuidBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString uuid = wxString::FromUTF8(Style->GetUUID()); wxTextCtrl *uuidCtrl = new wxTextCtrl(panel, ID_VECTOR_UUID, uuid, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); uuidBoxSizer->Add(uuidCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); boxSizer->AddSpacer(25); // second row: Visibility Range wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdScaleChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: Style->EnableMinScale(false); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: Style->EnableMinScale(true); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: Style->EnableMinScale(false); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: Style->EnableMinScale(true); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *QuickStyleTopologyDialog::CreateNodePage(wxWindow * parent) { // // creating the Node Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_NODE_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_NODE_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorNode and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor Node wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Node"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_NODE_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_NODE_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NODE_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_NODE_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_NODE_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_NODE_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeMarkChanged); Connect(ID_SYMBOLIZER_NODE_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorFillPicker); Connect(ID_SYMBOLIZER_NODE_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorFillChanged); Connect(ID_SYMBOLIZER_NODE_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorStrokePicker); Connect(ID_SYMBOLIZER_NODE_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdNodeColorStrokeChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdNodeMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_NODE_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetNodeWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleTopologyDialog:: OnCmdNodeColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_NODE_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdNodeColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdNodeColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdNodeColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateEdgeLinkPage(wxWindow * parent) { // // creating the EdgeLink Symbolizer page // wxString StrokeColor = wxT("#000000"); wxPanel *panel = new wxPanel(parent, ID_PANE_LINE); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #1 Opacity and Perpendicular Offset boxSizer->AddSpacer(50); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxHORIZONTAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); opacityBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); colorBoxSizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString dot[4]; if (Type == MAP_LAYER_NETWORK) { dot[0] = wxT("&Solid Link"); dot[1] = wxT("&Dotted Link"); dot[2] = wxT("&Dashed Link"); dot[3] = wxT("&Dashed/Dotted Link"); } else { dot[0] = wxT("&Solid Edge"); dot[1] = wxT("&Dotted Edge"); dot[2] = wxT("&Dashed Edge"); dot[3] = wxT("&Dashed/Dotted Edge"); } wxRadioBox *dotBox = new wxRadioBox(panel, ID_SYMBOLIZER_DASH_DOT, wxT("&Dash/Dot Style"), wxDefaultPosition, wxDefaultSize, 4, dot, 1, wxRA_SPECIFY_COLS); dotBox->SetSelection(0); dashBoxSizer->Add(dotBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkColorChanged); Connect(ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkColorPicker); return panel; } void QuickStyleTopologyDialog:: OnCmdEdgeLinkColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdEdgeLinkColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateFacePage(wxWindow * parent) { // // creating the Face Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_FILL2); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the Face Displacement and Perpendicular Offset wxBoxSizer *polygonBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(polygonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row A: Displacement wxBoxSizer *displacementBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(displacementBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); displacementBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive: larger. / Negative: smaller.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Drawing polygons smaller or larger than their actual geometry (Buffer).")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Fill Opacity wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Face Fill"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxHORIZONTAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsFaceFill()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); enableSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FILL2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(400, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(Style->IsFaceFill()); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Fill Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); auxSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sampleCtrl->Enable(Style->IsFaceFill()); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_FILL2_PICKER_BTN, wxT("&Pick a color")); pick->Enable(Style->IsFaceFill()); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // first row A: the Stroke #1 Opacity wxBoxSizer *opacity2BoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacity2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Face Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enable2Sizer = new wxStaticBoxSizer(enableBox, wxHORIZONTAL); opacity2BoxSizer->Add(enable2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enable2Ctrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enable2Ctrl->SetValue(Style->IsFaceStroke()); enable2Sizer->Add(enable2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *opacity2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacity2Sizer = new wxStaticBoxSizer(opacity2Box, wxVERTICAL); enable2Sizer->Add(opacity2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacity2Ctrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(250, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacity2Ctrl->Enable(Style->IsFaceStroke()); opacity2Sizer->Add(opacity2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color wxStaticBox *color2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *color2Sizer = new wxStaticBoxSizer(color2Box, wxVERTICAL); enable2Sizer->Add(color2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *color3Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(color3Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *color2Ctrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color2Ctrl->Enable(Style->IsFaceStroke()); color3Sizer->Add(color2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sample2Ctrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sample2Ctrl->Enable(Style->IsFaceStroke()); color3Sizer->Add(sample2Ctrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *picker2Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(picker2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick2 = new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color")); pick2->Enable(Style->IsFaceStroke()); picker2Sizer->Add(pick2, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width, wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); enable2Sizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceStrokeChanged); Connect(ID_SYMBOLIZER_FILL2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceFillChanged); Connect(ID_SYMBOLIZER_FILL2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorFillChanged); Connect(ID_SYMBOLIZER_FILL2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorFillPicker); Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorStrokeChanged); Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceColorStrokePicker); return panel; } void QuickStyleTopologyDialog:: OnCmdFaceStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetFaceStroke(true); else Style->SetFaceStroke(false); RetrieveFacePage(false); UpdateFacePage(); } void QuickStyleTopologyDialog:: OnCmdFaceFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetFaceFill(true); else Style->SetFaceFill(false); RetrieveFacePage(false); UpdateFacePage(); } void QuickStyleTopologyDialog:: OnCmdFaceColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdFaceColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateEdgeLinkSeedPage(wxWindow * parent) { // // creating the EdgeLinkSeed Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_EDGELINK_SEED_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_EDGELINK_SEED_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorEdgeLinkSeed and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor EdgeLinkSeed wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor EdgeLinkSeed"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_EDGELINK_SEED_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedMarkChanged); Connect(ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorFillPicker); Connect(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorFillChanged); Connect(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorStrokePicker); Connect(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdEdgeLinkSeedColorStrokeChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetEdgeLinkSeedWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdEdgeLinkSeedColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleTopologyDialog::CreateFaceSeedPage(wxWindow * parent) { // // creating the FaceSeed Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FACE_SEED_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_FACE_SEED_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorFaceSeed and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor FaceSeed wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor FaceSeed"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_FACE_SEED_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedMarkChanged); Connect(ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorFillPicker); Connect(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorFillChanged); Connect(ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorStrokePicker); Connect(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleTopologyDialog::OnCmdFaceSeedColorStrokeChanged); return panel; } void QuickStyleTopologyDialog:: OnCmdFaceSeedMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FACE_SEED_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetFaceSeedWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleTopologyDialog:: OnCmdFaceSeedColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } bool QuickStyleTopologyDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // double min = Style->GetScaleMin(); double max = Style->GetScaleMax(); if (Style->IsMinScaleEnabled() == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&min) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (min < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMaxScaleEnabled() == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&max) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (max < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() == true) { if (min >= max) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Style->SetScaleMin(min); Style->SetScaleMax(max); return true; } void QuickStyleTopologyDialog::UpdateMainPage() { // // updating the MAIN page // wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(0); else if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(1); else if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (Style->IsMinScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMin()); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (Style->IsMaxScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMax()); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } } bool QuickStyleTopologyDialog::RetrieveNodePage(bool check) { // // retrieving params from the Node Nodeizer page // double opacity; double size; double rotation; double anchorNodeX; double anchorNodeY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_NODE_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorNodeX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorNodeX < 0.0 || anchorNodeX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorNodeY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorNodeY < 0.0 || anchorNodeY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetNodeOpacity(opacity); Style->SetNodeSize(size); Style->SetNodeRotation(rotation); Style->SetNodeAnchorX(anchorNodeX); Style->SetNodeAnchorY(anchorNodeY); Style->SetNodeDisplacementX(displacementX); Style->SetNodeDisplacementY(displacementY); Style->SetNodeFillColor(fillColor); Style->SetNodeStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateNodePage() { // // updating the Node Nodeizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_NODE_OPACITY); opacityCtrl->SetValue(Style->GetNodeOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetNodeSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ROTATION); sprintf(dummy, "%1.2f", Style->GetNodeRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetNodeAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetNodeAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetNodeDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetNodeDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_NODE_MARK); switch (Style->GetNodeWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetNodeFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NODE_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetNodeStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } bool QuickStyleTopologyDialog::RetrieveEdgeLinkPage(bool check) { // // retrieving params from the EdgeLink Symbolizer page // double opacity; double perpendicularOffset; char strokeColor[8]; double strokeWidth; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&strokeWidth) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (strokeWidth <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (dotCtrl->GetSelection()) { case 1: Style->SetEdgeLinkDotStyle(QUICK_STYLE_DOT_LINE); break; case 2: Style->SetEdgeLinkDotStyle(QUICK_STYLE_DASH_LINE); break; case 3: Style->SetEdgeLinkDotStyle(QUICK_STYLE_DASH_DOT_LINE); break; default: Style->SetEdgeLinkDotStyle(QUICK_STYLE_SOLID_LINE); break; }; Style->SetEdgeLinkOpacity(opacity); Style->SetEdgeLinkPerpendicularOffset(perpendicularOffset); Style->SetEdgeLinkStrokeWidth(strokeWidth); Style->SetEdgeLinkStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateEdgeLinkPage() { // // updating the EdgeLink Symbolizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacityCtrl->SetValue(Style->GetEdgeLinkOpacity() * 100.0); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetEdgeLinkPerpendicularOffset()); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); colorCtrl->Enable(true); pick->Enable(true); wxString strokeColor = wxString::FromUTF8(Style->GetEdgeLinkStrokeColor()); colorCtrl->SetValue(strokeColor); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); sprintf(dummy, "%1.2f", Style->GetEdgeLinkStrokeWidth()); str = wxString::FromUTF8(dummy); wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (Style->GetEdgeLinkDotStyle()) { case QUICK_STYLE_DOT_LINE: dotCtrl->SetSelection(1); break; case QUICK_STYLE_DASH_LINE: dotCtrl->SetSelection(2); break; case QUICK_STYLE_DASH_DOT_LINE: dotCtrl->SetSelection(3); break; default: dotCtrl->SetSelection(0); break; }; widthCtrl->SetValue(str); } bool QuickStyleTopologyDialog::RetrieveFacePage(bool check) { // // retrieving params from the Face Synbolizer page // double fillOpacity; double displacementX; double displacementY; double perpendicularOffset; char fillColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); fillOpacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); wxString value = displXCtrl->GetValue(); if (Style->IsFaceFill() != true && Style->IsFaceStroke() != true) { if (check == true) { wxMessageBox(wxT ("You can't disable both FILL and STROKE at the same time !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); Style->SetFaceFillOpacity(fillOpacity); Style->SetFaceDisplacementX(displacementX); Style->SetFaceDisplacementY(displacementY); Style->SetFacePerpendicularOffset(perpendicularOffset); Style->SetFaceFillColor(fillColor); return true; } void QuickStyleTopologyDialog::UpdateFacePage() { // // updating the Face Symbolizer page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); enableBox->SetValue(Style->IsFaceFill()); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFaceDisplacementX()); wxString str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetFaceDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); sprintf(dummy, "%1.2f", Style->GetFacePerpendicularOffset()); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); opacityCtrl->SetValue(Style->GetFaceFillOpacity() * 100.0); opacityCtrl->Enable(Style->IsFaceFill()); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetFaceFillColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } colorCtrl->Enable(Style->IsFaceFill()); pick->Enable(Style->IsFaceFill()); wxSlider *opacity2Ctrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); opacity2Ctrl->SetValue(Style->GetFaceStrokeOpacity() * 100.0); opacity2Ctrl->Enable(Style->IsFaceStroke()); wxTextCtrl *color2Ctrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxButton *pick2 = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); color = wxNullColour; str = wxString::FromUTF8(Style->GetFaceStrokeColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); color2Ctrl->SetValue(str); } color2Ctrl->Enable(Style->IsFaceStroke()); pick2->Enable(Style->IsFaceStroke()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); sprintf(dummy, "%1.2f", Style->GetFaceStrokeWidth()); str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); widthCtrl->Enable(Style->IsFaceStroke()); } bool QuickStyleTopologyDialog::RetrieveEdgeLinkSeedPage(bool check) { // // retrieving params from the EdgeLinkSeed EdgeLinkSeedizer page // double opacity; double size; double rotation; double anchorEdgeLinkSeedX; double anchorEdgeLinkSeedY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorEdgeLinkSeedX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorEdgeLinkSeedX < 0.0 || anchorEdgeLinkSeedX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorEdgeLinkSeedY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorEdgeLinkSeedY < 0.0 || anchorEdgeLinkSeedY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetEdgeLinkSeedOpacity(opacity); Style->SetEdgeLinkSeedSize(size); Style->SetEdgeLinkSeedRotation(rotation); Style->SetEdgeLinkSeedAnchorX(anchorEdgeLinkSeedX); Style->SetEdgeLinkSeedAnchorY(anchorEdgeLinkSeedY); Style->SetEdgeLinkSeedDisplacementX(displacementX); Style->SetEdgeLinkSeedDisplacementY(displacementY); Style->SetEdgeLinkSeedFillColor(fillColor); Style->SetEdgeLinkSeedStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateEdgeLinkSeedPage() { // // updating the EdgeLinkSeed EdgeLinkSeedizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_OPACITY); opacityCtrl->SetValue(Style->GetEdgeLinkSeedOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ROTATION); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetEdgeLinkSeedDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_MARK); switch (Style->GetEdgeLinkSeedWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetEdgeLinkSeedFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_EDGELINK_SEED_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetEdgeLinkSeedStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } bool QuickStyleTopologyDialog::RetrieveFaceSeedPage(bool check) { // // retrieving params from the FaceSeed FaceSeedizer page // double opacity; double size; double rotation; double anchorFaceSeedX; double anchorFaceSeedY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FACE_SEED_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorFaceSeedX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorFaceSeedX < 0.0 || anchorFaceSeedX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorFaceSeedY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorFaceSeedY < 0.0 || anchorFaceSeedY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetFaceSeedOpacity(opacity); Style->SetFaceSeedSize(size); Style->SetFaceSeedRotation(rotation); Style->SetFaceSeedAnchorX(anchorFaceSeedX); Style->SetFaceSeedAnchorY(anchorFaceSeedY); Style->SetFaceSeedDisplacementX(displacementX); Style->SetFaceSeedDisplacementY(displacementY); Style->SetFaceSeedFillColor(fillColor); Style->SetFaceSeedStrokeColor(strokeColor); return true; } void QuickStyleTopologyDialog::UpdateFaceSeedPage() { // // updating the FaceSeed FaceSeedizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FACE_SEED_OPACITY); opacityCtrl->SetValue(Style->GetFaceSeedOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFaceSeedSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ROTATION); sprintf(dummy, "%1.2f", Style->GetFaceSeedRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetFaceSeedAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetFaceSeedAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetFaceSeedDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetFaceSeedDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FACE_SEED_MARK); switch (Style->GetFaceSeedWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetFaceSeedFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FACE_SEED_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetFaceSeedStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } void QuickStyleTopologyDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret = false; int idx = event.GetOldSelection(); if (idx == 0) ret = RetrieveMainPage(); else if (idx == 1) ret = RetrieveNodePage(); else if (idx == 2) ret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) ret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) ret = RetrieveFacePage(); if (idx == 4) ret = RetrieveEdgeLinkSeedPage(); if (idx == 5) ret = RetrieveFaceSeedPage(); } } if (ret != true) event.Veto(); } void QuickStyleTopologyDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // int idx = event.GetSelection(); if (idx == 0) UpdateMainPage(); else if (idx == 1) UpdateNodePage(); else if (idx == 2) UpdateEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) UpdateEdgeLinkSeedPage(); } else { if (idx == 3) UpdateFacePage(); if (idx == 4) UpdateEdgeLinkSeedPage(); if (idx == 5) UpdateFaceSeedPage(); } } } bool QuickStyleTopologyDialog::UpdateStyle() { // // updating the QuickStyle // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else if (idx == 1) ret = RetrieveNodePage(); else if (idx == 2) ret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) ret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) ret = RetrieveFacePage(); if (idx == 4) ret = RetrieveEdgeLinkSeedPage(); if (idx == 5) ret = RetrieveFaceSeedPage(); } } if (ret == false) return false; VectorLayerConfig *config = Layer->GetVectorConfig(); bool setCurrentStyle = false; if (config->GetStyle() == NULL) setCurrentStyle = true; else { if (strcmp(Style->GetUUID(), config->GetStyle()) != 0) setCurrentStyle = true; } if (setCurrentStyle == true) { config->SetStyle(Style->GetUUID()); IsConfigChanged = true; } IsConfigChanged = Layer->UpdateQuickStyle(Style); return true; } void QuickStyleTopologyDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // permanently saving the QuickStyle and quitting // if (UpdateStyle() == true) wxDialog::EndModal(wxID_OK); } void QuickStyleTopologyDialog::OnApply(wxCommandEvent & WXUNUSED(event)) { // // applying the QuickStyle and continuing // if (UpdateStyle() == true) { if (IsConfigChanged == true) MapPanel->RefreshMap(); } } void QuickStyleTopologyDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the Quick Style as an external file // bool xret = false; int ret; wxString path; wxString lastDir; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) xret = RetrieveMainPage(); else if (idx == 1) xret = RetrieveNodePage(); else if (idx == 2) xret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) xret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) xret = RetrieveFacePage(); if (idx == 4) xret = RetrieveEdgeLinkSeedPage(); if (idx == 5) xret = RetrieveFaceSeedPage(); } } if (xret == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE QuickStyle to a file"), wxT(""), wxT("style.xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml = Style->CreateXmlStyle(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE QuickStyle successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } } void QuickStyleTopologyDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Quick Style into the Clipboard // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else if (idx == 1) ret = RetrieveNodePage(); else if (idx == 2) ret = RetrieveEdgeLinkPage(); else { if (Type == MAP_LAYER_NETWORK) { if (idx == 3) ret = RetrieveEdgeLinkSeedPage(); } else { if (idx == 3) ret = RetrieveFacePage(); if (idx == 4) ret = RetrieveEdgeLinkSeedPage(); if (idx == 5) ret = RetrieveFaceSeedPage(); } } if (ret == false) return; char *xml = Style->CreateXmlStyle(); wxString XMLstring = wxString::FromUTF8(xml); sqlite3_free(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void QuickStyleTopologyDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } |
Added QuickStylesVector.cpp.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 |
/* / QuickStylesVector.cpp / Quick Styles wizards (Vector layers) / / version 2.0, 2017 May 26 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/imaglist.h" #include "wx/colordlg.h" #include "wx/filename.h" #include "wx/clipbrd.h" QuickStyleObj::QuickStyleObj(int type) { // ctor DoGetUUID(UUID); Type = type; MinScaleEnabled = false; MaxScaleEnabled = false; ScaleMin = 0.0; ScaleMax = 0.0; SymbolOpacity = 1.0; SymbolSize = 16; SymbolRotation = 0.0; SymbolAnchorX = 0.5; SymbolAnchorY = 0.5; SymbolDisplacementX = 0.0; SymbolDisplacementY = 0.0; SymbolWellKnownMark = RandomWellKnownMark(); RandomColor(SymbolFillColor); RandomColor(SymbolStrokeColor); LineOpacity = 1.0; LinePerpendicularOffset = 0.0; LineStrokeWidth = 1.0; RandomColor(LineStrokeColor); LineDotStyle = QUICK_STYLE_SOLID_LINE; PolygonFill = true; PolygonStroke = true; PolygonDisplacementX = 0.0; PolygonDisplacementY = 0.0; PolygonPerpendicularOffset = 0.0; PolygonFillOpacity = 1.0; RandomColor(PolygonFillColor); PolygonStrokeOpacity = 1.0; PolygonStrokeWidth = 1.0; RandomColor(PolygonStrokeColor); LabelLinePlacement = true; LabelPrint = false; LabelColumn = NULL; FontFacename = NULL; FontSize = 10.0; FontStyle = RL2_FONTSTYLE_NORMAL; FontWeight = RL2_FONTWEIGHT_NORMAL; FontOpacity = 1.0; strcpy(FontColor, "#000000"); HasHalo = false; HaloRadius = 1.0; HaloOpacity = 1.0; strcpy(HaloColor, "#ffffff"); LabelAnchorX = 0.5; LabelAnchorY = 0.5; LabelDisplacementX = 0.0; LabelDisplacementY = 0.0; LabelRotation = 0.0; LabelPerpendicularOffset = 0.0; RepeatedLabel = false; LabelInitialGap = 0.0; LabelGap = 0.0; LabelIsAligned = false; LabelGeneralizeLine = false; XmlStyle = NULL; } QuickStyleObj *QuickStyleObj::Clone() { // // cloning a Quick Style // QuickStyleObj *Style = new QuickStyleObj(this->Type); strcpy(Style->UUID, this->UUID); Style->MinScaleEnabled = this->MinScaleEnabled; Style->MaxScaleEnabled = this->MaxScaleEnabled; Style->ScaleMin = this->ScaleMin; Style->ScaleMax = this->ScaleMax; Style->SymbolOpacity = this->SymbolOpacity; Style->SymbolSize = this->SymbolSize; Style->SymbolRotation = this->SymbolRotation; Style->SymbolAnchorX = this->SymbolAnchorX; Style->SymbolAnchorY = this->SymbolAnchorY; Style->SymbolDisplacementX = this->SymbolDisplacementX; Style->SymbolDisplacementY = this->SymbolDisplacementY; Style->SymbolWellKnownMark = this->SymbolWellKnownMark; strcpy(Style->SymbolFillColor, this->SymbolFillColor); strcpy(Style->SymbolStrokeColor, this->SymbolStrokeColor); Style->LineOpacity = this->LineOpacity; Style->LinePerpendicularOffset = this->LinePerpendicularOffset; Style->LineStrokeWidth = this->LineStrokeWidth; strcpy(Style->LineStrokeColor, this->LineStrokeColor); Style->LineDotStyle = this->LineDotStyle; Style->PolygonFill = this->PolygonFill; Style->PolygonStroke = this->PolygonStroke; Style->PolygonDisplacementX = this->PolygonDisplacementX; Style->PolygonDisplacementY = this->PolygonDisplacementY; Style->PolygonPerpendicularOffset = this->PolygonPerpendicularOffset; Style->PolygonFillOpacity = this->PolygonFillOpacity; strcpy(Style->PolygonFillColor, this->PolygonFillColor); Style->PolygonStrokeOpacity = this->PolygonStrokeOpacity; Style->PolygonStrokeWidth = this->PolygonStrokeWidth; strcpy(Style->PolygonStrokeColor, this->PolygonStrokeColor); Style->LabelLinePlacement = this->LabelLinePlacement; Style->LabelPrint = this->LabelPrint; if (this->LabelColumn == NULL) Style->LabelColumn = NULL; else { int len = strlen(this->LabelColumn); Style->LabelColumn = (char *) malloc(len + 1); strcpy(Style->LabelColumn, this->LabelColumn); } if (this->FontFacename == NULL) Style->FontFacename = NULL; else { int len = strlen(this->FontFacename); Style->FontFacename = (char *) malloc(len + 1); strcpy(Style->FontFacename, this->FontFacename); } Style->FontSize = this->FontSize; Style->FontStyle = this->FontStyle; Style->FontWeight = this->FontWeight; Style->FontOpacity = this->FontOpacity; strcpy(Style->FontColor, this->FontColor); Style->HasHalo = this->HasHalo; Style->HaloRadius = this->HaloRadius; Style->HaloOpacity = this->HaloOpacity; strcpy(Style->HaloColor, this->HaloColor); Style->LabelAnchorX = this->LabelAnchorX; Style->LabelAnchorY = this->LabelAnchorY; Style->LabelDisplacementX = this->LabelDisplacementX; Style->LabelDisplacementY = this->LabelDisplacementY; Style->LabelRotation = this->LabelRotation; Style->LabelPerpendicularOffset = this->LabelPerpendicularOffset; Style->RepeatedLabel = this->RepeatedLabel; Style->LabelInitialGap = this->LabelInitialGap; Style->LabelGap = this->LabelGap; Style->LabelIsAligned = this->LabelIsAligned; Style->LabelGeneralizeLine = this->LabelGeneralizeLine; Style->XmlStyle = NULL; return Style; } bool QuickStyleObj::Compare(QuickStyleObj * Style) { // // comparing two Quick Style objects // if (Style == NULL) return false; if (strcmp(Style->UUID, this->UUID) != 0) return false; if (Style->MinScaleEnabled != this->MinScaleEnabled) return false; if (Style->MaxScaleEnabled != this->MaxScaleEnabled) return false; if (Style->ScaleMin != this->ScaleMin) return false; if (Style->ScaleMax != this->ScaleMax) return false; if (Style->SymbolOpacity != this->SymbolOpacity) return false; if (Style->SymbolSize != this->SymbolSize) return false; if (Style->SymbolRotation != this->SymbolRotation) return false; if (Style->SymbolAnchorX != this->SymbolAnchorX) return false; if (Style->SymbolAnchorY != this->SymbolAnchorY) return false; if (Style->SymbolDisplacementX != this->SymbolDisplacementX) return false; if (Style->SymbolDisplacementY != this->SymbolDisplacementY) return false; if (Style->SymbolWellKnownMark != this->SymbolWellKnownMark) return false; if (strcmp(Style->SymbolFillColor, this->SymbolFillColor) != 0) return false; if (strcmp(Style->SymbolStrokeColor, this->SymbolStrokeColor) != 0) return false; if (Style->LineOpacity != this->LineOpacity) return false; if (Style->LinePerpendicularOffset != this->LinePerpendicularOffset) return false; if (Style->LineStrokeWidth != this->LineStrokeWidth) return false; if (strcmp(Style->LineStrokeColor, this->LineStrokeColor) != 0) return false; if (Style->LineDotStyle != this->LineDotStyle) return false; if (Style->PolygonFill != this->PolygonFill) return false; if (Style->PolygonStroke != this->PolygonStroke) return false; if (Style->PolygonDisplacementX != this->PolygonDisplacementX) return false; if (Style->PolygonDisplacementY != this->PolygonDisplacementY) return false; if (Style->PolygonPerpendicularOffset != this->PolygonPerpendicularOffset) return false; if (Style->PolygonFillOpacity != this->PolygonFillOpacity) return false; if (strcmp(Style->PolygonFillColor, this->PolygonFillColor) != 0) return false; if (Style->PolygonStrokeOpacity != this->PolygonStrokeOpacity) return false; if (Style->PolygonStrokeWidth != this->PolygonStrokeWidth) return false; if (strcmp(Style->PolygonStrokeColor, this->PolygonStrokeColor) != 0) return false; if (Style->LabelLinePlacement != this->LabelLinePlacement) return false; if (Style->LabelPrint != this->LabelPrint) return false; if (Style->LabelColumn == NULL && this->LabelColumn == NULL) ; else if (Style->LabelColumn == NULL && this->LabelColumn != NULL) return false; else if (Style->LabelColumn != NULL && this->LabelColumn == NULL) return false; else if (strcmp(Style->LabelColumn, this->LabelColumn) != 0) return false; if (Style->FontFacename == NULL && this->FontFacename == NULL) ; else if (Style->FontFacename == NULL && this->FontFacename != NULL) return false; else if (Style->FontFacename != NULL && this->FontFacename == NULL) return false; else if (strcmp(Style->FontFacename, this->FontFacename) != 0) return false; if (Style->FontSize != this->FontSize) return false; if (Style->FontStyle != this->FontStyle) return false; if (Style->FontWeight != this->FontWeight) return false; if (Style->FontOpacity != this->FontOpacity) return false; if (strcmp(Style->FontColor, this->FontColor) != 0) return false; if (Style->HasHalo != this->HasHalo) return false; if (Style->HaloRadius != this->HaloRadius) return false; if (Style->HaloOpacity != this->HaloOpacity) return false; if (strcmp(Style->HaloColor, this->HaloColor) != 0) return false; if (Style->LabelAnchorX != this->LabelAnchorX) return false; if (Style->LabelAnchorY != this->LabelAnchorY) return false; if (Style->LabelDisplacementX != this->LabelDisplacementX) return false; if (Style->LabelDisplacementY != this->LabelDisplacementY) return false; if (Style->LabelRotation != this->LabelRotation) return false; if (Style->LabelPerpendicularOffset != this->LabelPerpendicularOffset) return false; if (Style->RepeatedLabel != this->RepeatedLabel) return false; if (Style->LabelInitialGap != this->LabelInitialGap) return false; if (Style->LabelGap != this->LabelGap) return false; if (Style->LabelIsAligned != this->LabelIsAligned) return false; if (Style->LabelGeneralizeLine != this->LabelGeneralizeLine) return false; return true; } void QuickStyleObj::SetLabelColumn(const char *x) { // // setting the Label Column // int len; if (LabelColumn != NULL) free(LabelColumn); LabelColumn = NULL; if (x == NULL) return; len = strlen(x); LabelColumn = (char *) malloc(len + 1); strcpy(LabelColumn, x); } void QuickStyleObj::SetFontFacename(const char *x) { // // setting the Font Facename // int len; if (FontFacename != NULL) free(FontFacename); FontFacename = NULL; if (x == NULL) return; len = strlen(x); FontFacename = (char *) malloc(len + 1); strcpy(FontFacename, x); } void QuickStyleObj::UpdateXmlStyle() { // // updating the XML Style // if (XmlStyle != NULL) sqlite3_free(XmlStyle); XmlStyle = CreateXmlStyle(); } char *QuickStyleObj::CreateXmlStyle() { // // creating the XML Style // char *xml; if ((MinScaleEnabled == true || MaxScaleEnabled == true) || LabelPrint == true || Type == QUICK_STYLE_GEOMETRY) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(false); return xml; } char *QuickStyleObj::DoCreateFeatureTypeXML() { // // creating a FeatureType XML Style // char *prev; char *xml2; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; xml = sqlite3_mprintf("%s<FeatureTypeStyle version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Rule>\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MinScaleDenominator>%1.2f</MinScaleDenominator>\r\n", prev, ScaleMin); sqlite3_free(prev); prev = xml; } if (MaxScaleEnabled == true) { xml = sqlite3_mprintf ("%s\t\t<MaxScaleDenominator>%1.2f</MaxScaleDenominator>\r\n", prev, ScaleMax); sqlite3_free(prev); prev = xml; } xml2 = NULL; if (Type == QUICK_STYLE_POINT) xml2 = DoCreatePointSymbolizerXML(true); if (Type == QUICK_STYLE_LINE) xml2 = DoCreateLineSymbolizerXML(true); if (Type == QUICK_STYLE_POLYGON) xml2 = DoCreatePolygonSymbolizerXML(true); else { // mixed-type Symbolizers xml2 = DoCreatePointSymbolizerXML(true); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } xml2 = DoCreateLineSymbolizerXML(true); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } xml2 = DoCreatePolygonSymbolizerXML(true); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); xml2 = NULL; prev = xml; } } if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } if (LabelPrint == true) { // adding a Text Symbolizer xml2 = NULL; if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_POLYGON) xml2 = DoCreateTextPointSymbolizerXML(); if (Type == QUICK_STYLE_LINE) xml2 = DoCreateTextLineSymbolizerXML(); if (xml2 != NULL) { xml = sqlite3_mprintf("%s%s", prev, xml2); sqlite3_free(prev); sqlite3_free(xml2); prev = xml; } } xml = sqlite3_mprintf("%s\t</Rule>\r\n</FeatureTypeStyle>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateSymbolizerXML(bool subordered) { // // creating a Symbolizer XML Style // if (Type == QUICK_STYLE_POINT) return DoCreatePointSymbolizerXML(subordered); if (Type == QUICK_STYLE_LINE) return DoCreateLineSymbolizerXML(subordered); if (Type == QUICK_STYLE_POLYGON) return DoCreatePolygonSymbolizerXML(subordered); return NULL; } char *QuickStyleObj::DoCreatePointSymbolizerXML(bool subordered) { // // creating a Point Symbolizer XML Style // const char *cstr; char *prev; const char *extra = ""; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); if (subordered == true) { extra = "\t\t"; sqlite3_free(xml); prev = (char *) ""; xml = sqlite3_mprintf("%s%s<PointSymbolizer>\r\n", prev, extra); } else { prev = xml; xml = sqlite3_mprintf("%s<PointSymbolizer version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; cstr = "http://www.opengeospatial.org/se/units/pixel"; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" uom=\"%s\">\r\n", prev, cstr); sqlite3_free(prev); } prev = xml; if (subordered != true) { xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - PointSymbolizer"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t<Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // mark symbol xml = sqlite3_mprintf("%s%s\t\t<Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; switch (SymbolWellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s%s\t\t\t<WellKnownName>%s</WellKnownName>\r\n", prev, extra, cstr); sqlite3_free(prev); prev = xml; // Mark Fill xml = sqlite3_mprintf("%s%s\t\t\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, SymbolFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // Mark Stroke xml = sqlite3_mprintf("%s%s\t\t\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, SymbolStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, 1.0); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Mark>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (SymbolOpacity != 1.0) { xml = sqlite3_mprintf("%s%s\t\t<Opacity>%1.2f</Opacity>\r\n", prev, extra, SymbolOpacity); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t\t<Size>%1.2f</Size>\r\n", prev, extra, SymbolSize); sqlite3_free(prev); prev = xml; if (SymbolRotation != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Rotation>%1.2f</Rotation>\r\n", prev, extra, SymbolRotation); sqlite3_free(prev); prev = xml; } if (SymbolAnchorX != 0.5 || SymbolAnchorY != 0.5) { xml = sqlite3_mprintf("%s%s\t\t<AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, extra, SymbolAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, extra, SymbolAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</AnchorPoint>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (SymbolDisplacementX != 0.0 || SymbolDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, SymbolDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, SymbolDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Graphic>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s</PointSymbolizer>\r\n", prev, extra); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateLineSymbolizerXML(bool subordered) { // // creating a Line Symbolizer XML Style // const char *cstr; char *prev; const char *extra = ""; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; if (subordered == true) { extra = "\t\t"; sqlite3_free(xml); prev = (char *) ""; xml = sqlite3_mprintf("%s%s<LineSymbolizer>\r\n", prev, extra); } else { xml = sqlite3_mprintf("%s<LineSymbolizer version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; cstr = "http://www.opengeospatial.org/se/units/pixel"; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" uom=\"%s\">\r\n", prev, cstr); sqlite3_free(prev); } prev = xml; if (subordered != true) { xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - LineSymbolizer"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, LineStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, LineOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, LineStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; const char *dashArray; switch (LineDotStyle) { case QUICK_STYLE_DOT_LINE: dashArray = "5.0, 10.0"; break; case QUICK_STYLE_DASH_LINE: dashArray = "20.0, 20.0"; break; case QUICK_STYLE_DASH_DOT_LINE: dashArray = "20.0, 10.0, 5.0, 10.0"; break; default: dashArray = NULL; break; }; if (dashArray != NULL) { xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-dasharray\">%s</SvgParameter>\r\n", prev, extra, dashArray); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; if (LinePerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.2f</PerpendicularOffset>\r\n", prev, extra, LinePerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</LineSymbolizer>\r\n", prev, extra); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreatePolygonSymbolizerXML(bool subordered) { // // creating a Polygon Symbolizer XML Style // const char *cstr; char *prev; const char *extra = ""; char *xml = sqlite3_mprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"); prev = xml; if (subordered == true) { extra = "\t\t"; sqlite3_free(xml); prev = (char *) ""; xml = sqlite3_mprintf("%s%s<PolygonSymbolizer>\r\n", prev, extra); } else { xml = sqlite3_mprintf("%s<PolygonSymbolizer version=\"1.1.0\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxsi:schemaLocation=\"http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%sxmlns=\"http://www.opengis.net/se\" xmlns:ogc=\"http://www.opengis.net/ogc\" ", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%sxmlns:xlink=\"http://www.w3.org/1999/xlink\" ", prev); sqlite3_free(prev); prev = xml; cstr = "http://www.opengeospatial.org/se/units/pixel"; xml = sqlite3_mprintf ("%sxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" uom=\"%s\">\r\n", prev, cstr); sqlite3_free(prev); } prev = xml; if (subordered != true) { xml = sqlite3_mprintf("%s\t<Name>%s</Name>\r\n", prev, UUID); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Description>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Title>%s</Title>\r\n", prev, "Quick Style - Polygon Symbolizer"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t<Abstract>%s</Abstract>\r\n", prev, "Created by SpatialiteGUI"); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t</Description>\r\n", prev); sqlite3_free(prev); prev = xml; } if (PolygonFill == true) { // Polygon Fill xml = sqlite3_mprintf("%s%s\t<Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, extra, PolygonFillColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, PolygonFillOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Fill>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (PolygonStroke == true) { // Polygon Stroke xml = sqlite3_mprintf("%s%s\t<Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; // using a Solid Color xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke\">%s</SvgParameter>\r\n", prev, extra, PolygonStrokeColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-opacity\">%1.2f</SvgParameter>\r\n", prev, extra, PolygonStrokeOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-width\">%1.2f</SvgParameter>\r\n", prev, extra, PolygonStrokeWidth); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linejoin\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s%s\t\t<SvgParameter name=\"stroke-linecap\">round</SvgParameter>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Stroke>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (PolygonDisplacementX != 0.0 || PolygonDisplacementY != 0.0) { xml = sqlite3_mprintf("%s%s\t<Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, extra, PolygonDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, extra, PolygonDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t</Displacement>\r\n", prev, extra); sqlite3_free(prev); prev = xml; } if (PolygonPerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s%s\t<PerpendicularOffset>%1.4f</PerpendicularOffset>\r\n", prev, extra, PolygonPerpendicularOffset); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s%s</PolygonSymbolizer>\r\n", prev, extra); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateTextPointSymbolizerXML() { // // creating a Text Symbolizer (Point Placement) // char *xml; char *prev; xml = sqlite3_mprintf("\t\t<TextSymbolizer>\r\n"); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Label>@%s@</Label>\r\n", prev, LabelColumn); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; const char *font; if (strcmp(FontFacename, "ToyFont: serif") == 0) font = "serif"; else if (strcmp(FontFacename, "ToyFont: sans-serif") == 0) font = "sans serif"; else if (strcmp(FontFacename, "ToyFont: monospace") == 0) font = "monospace"; else font = FontFacename; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, font); sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", prev); else if (FontStyle == RL2_FONTSTYLE_OBLIQUE) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">oblique</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; if (FontWeight == RL2_FONTWEIGHT_BOLD) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">bold</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-size\">%1.2f</SvgParameter>\r\n", prev, FontSize); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Font>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<LabelPlacement>\n", prev); sqlite3_free(prev); prev = xml; // PointPlacement xml = sqlite3_mprintf("%s\t\t\t\t<PointPlacement>\n", prev); sqlite3_free(prev); prev = xml; if (LabelAnchorX != 0.5 || LabelAnchorY != 0.5) { xml = sqlite3_mprintf("%s\t\t\t\t\t<AnchorPoint>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<AnchorPointX>%1.4f</AnchorPointX>\r\n", prev, LabelAnchorX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<AnchorPointY>%1.4f</AnchorPointY>\r\n", prev, LabelAnchorY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</AnchorPoint>\r\n", prev); sqlite3_free(prev); prev = xml; } if (LabelDisplacementX != 0.0 || LabelDisplacementY != 0.0) { xml = sqlite3_mprintf("%s\t\t\t\t\t<Displacement>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<DisplacementX>%1.4f</DisplacementX>\r\n", prev, LabelDisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t<DisplacementY>%1.4f</DisplacementY>\r\n", prev, LabelDisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t</Displacement>\r\n", prev); sqlite3_free(prev); prev = xml; } if (LabelRotation != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t\t<Rotation>%1.2f</Rotation>\r\n", prev, LabelRotation); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t</PointPlacement>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</LabelPlacement>\r\n", prev); sqlite3_free(prev); prev = xml; if (HasHalo == true) { // Halo xml = sqlite3_mprintf("%s\t\t\t<Halo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Radius>%1.2f</Radius>\r\n", prev, HaloRadius); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, HaloColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, HaloOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Halo>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, FontColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, FontOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t</TextSymbolizer>\r\n", prev); sqlite3_free(prev); return xml; } char *QuickStyleObj::DoCreateTextLineSymbolizerXML() { // // creating a Text Symbolizer (Line Placement) // char *xml; char *prev; xml = sqlite3_mprintf("\t\t<TextSymbolizer>\r\n"); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Label>@%s@</Label>\r\n", prev, LabelColumn); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; const char *font; if (strcmp(FontFacename, "ToyFont: serif") == 0) font = "serif"; else if (strcmp(FontFacename, "ToyFont: sans-serif") == 0) font = "sans serif"; else if (strcmp(FontFacename, "ToyFont: monospace") == 0) font = "monospace"; else font = FontFacename; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, font); sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", prev); else if (FontStyle == RL2_FONTSTYLE_OBLIQUE) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">oblique</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; if (FontWeight == RL2_FONTWEIGHT_BOLD) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">bold</SvgParameter>\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-weight\">normal</SvgParameter>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-size\">%1.2f</SvgParameter>\r\n", prev, FontSize); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s%s\t\t\t</Font>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<LabelPlacement>\n", prev); sqlite3_free(prev); prev = xml; // LinePlacement xml = sqlite3_mprintf("%s\t\t\t\t<LinePlacement>\n", prev); sqlite3_free(prev); prev = xml; if (LabelPerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t\t<PerpendicularOffset>%1.4f</PerpendicularOffset>\r\n", prev, LabelPerpendicularOffset); sqlite3_free(prev); prev = xml; } if (RepeatedLabel == true) { // Repeated: InitialGap and Gap xml = sqlite3_mprintf("%s\t\t\t\t\t<IsRepeated>true</IsRepeated>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<InitialGap>%1.4f</InitialGap>\r\n", prev, LabelInitialGap); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<Gap>%1.4f</Gap>\r\n", prev, LabelGap); sqlite3_free(prev); prev = xml; } if (LabelIsAligned == true) { xml = sqlite3_mprintf("%s\t\t\t\t\t<IsAligned>true</IsAligned>\r\n", prev); sqlite3_free(prev); prev = xml; } if (LabelGeneralizeLine == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t<GeneralizeLine>true</GeneralizeLine>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t</LinePlacement>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</LabelPlacement>\r\n", prev); sqlite3_free(prev); prev = xml; if (HasHalo == true) { // Halo xml = sqlite3_mprintf("%s\t\t\t<Halo>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Radius>%1.2f</Radius>\r\n", prev, HaloRadius); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, HaloColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, HaloOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Halo>\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t<Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill\">%s</SvgParameter>\r\n", prev, FontColor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"fill-opacity\">%1.2f</SvgParameter>\r\n", prev, FontOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t</Fill>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t</TextSymbolizer>\r\n", prev); sqlite3_free(prev); return xml; } const unsigned char *QuickStyleObj::CloneXmlStyle() { // // cloning the XML Style definition // if (XmlStyle == NULL) XmlStyle = CreateXmlStyle(); if (XmlStyle == NULL) return NULL; int len = strlen(XmlStyle); char *cloned = (char *) malloc(len + 1); strcpy(cloned, XmlStyle); return (const unsigned char *) cloned; } void QuickStyleObj::DoGetUUID(char *uuid) { // // creating an UUID value // unsigned char rnd[16]; char *p = uuid; int i; sqlite3_randomness(16, rnd); for (i = 0; i < 16; i++) { if (i == 4 || i == 6 || i == 8 || i == 10) *p++ = '-'; sprintf(p, "%02x", rnd[i]); p += 2; } *p = '\0'; uuid[14] = '4'; uuid[19] = '8'; } int QuickStyleObj::RandomWellKnownMark() { // // returning a random Symbol Well Known Mark // int wkt; int mod = rand() % 6; switch (mod) { case 0: wkt = RL2_GRAPHIC_MARK_SQUARE; break; case 1: wkt = RL2_GRAPHIC_MARK_CIRCLE; break; case 2: wkt = RL2_GRAPHIC_MARK_TRIANGLE; break; case 3: wkt = RL2_GRAPHIC_MARK_STAR; break; case 4: wkt = RL2_GRAPHIC_MARK_CROSS; break; default: wkt = RL2_GRAPHIC_MARK_X; break; }; return wkt; } void QuickStyleObj::RandomColor(char *color) { // // setting a random Color // unsigned char red = rand() % 256; unsigned char green = rand() % 256; unsigned char blue = rand() % 256; sprintf(color, "#%02x%02x%02x", red, green, blue); } bool QuickStyleVectorDialog::Create(MyMapPanel * parent, MapLayer * layer, int type) { // // creating the dialog // MainFrame = parent->GetParent(); MapPanel = parent; Layer = layer; Type = type; DbPrefix = layer->GetDbPrefix(); LayerName = layer->GetName(); IsConfigChanged = false; if (wxPropertySheetDialog::Create (parent, wxID_ANY, wxT("QuickStyle (Vector) Edit")) == false) return false; if (Layer->GetQuickStyle() != NULL) Style = Layer->CloneQuickStyle(); else Style = new QuickStyleObj(Type); wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels int next = 1; PagePointIndex = 0; PageLineIndex = 0; PagePolygonIndex = 0; PageTextPointIndex = 0; PageTextLineIndex = 0; wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_GEOMETRY) { wxPanel *pointPage = CreatePointPage(book); book->AddPage(pointPage, wxT("Point Symbolizer"), false); PagePointIndex = next++; } if (Type == QUICK_STYLE_LINE || Type == QUICK_STYLE_GEOMETRY) { wxPanel *linePage = CreateLinePage(book); book->AddPage(linePage, wxT("Line Symbolyzer"), false); PageLineIndex = next++; } if (Type == QUICK_STYLE_POLYGON || Type == QUICK_STYLE_GEOMETRY) { wxPanel *polygonPage = CreatePolygonPage(book); book->AddPage(polygonPage, wxT("Polygon Symbolizer"), false); PagePolygonIndex = next++; } if (Type == QUICK_STYLE_POINT || Type == QUICK_STYLE_POLYGON) { wxPanel *textPointPage = CreateTextPointPage(book); book->AddPage(textPointPage, wxT("Text Symbolizer"), false); PageTextPointIndex = next++; } if (Type == QUICK_STYLE_LINE) { wxPanel *textLinePage = CreateTextLinePage(book); book->AddPage(textLinePage, wxT("Text Symbolizer"), false); PageTextLineIndex = next++; } CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & QuickStyleVectorDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnQuit); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnOk); Connect(ID_QUICK_STYLE_APPLY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnApply); Connect(ID_QUICK_STYLE_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnExport); Connect(ID_QUICK_STYLE_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } void QuickStyleVectorDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *save = new wxButton(this, ID_QUICK_STYLE_APPLY, wxT("&Apply")); btnBox->Add(save, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_QUICK_STYLE_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_QUICK_STYLE_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } wxPanel *QuickStyleVectorDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // First row: Layer name boxSizer->AddSpacer(50); wxBoxSizer *lyrBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *nameSizer = new wxBoxSizer(wxVERTICAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *nameBox = new wxStaticBox(panel, wxID_ANY, wxT("Layer FullName"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameBoxSizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); nameSizer->Add(nameBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString fullName = DbPrefix + wxT(".") + LayerName; wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_VECTOR_LAYER, fullName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); nameBoxSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *typeBox = new wxStaticBox(panel, wxID_ANY, wxT("Geometry Type"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *typeBoxSizer = new wxStaticBoxSizer(typeBox, wxHORIZONTAL); nameSizer->Add(typeBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString typeName = wxT("UNKNOWN"); if (Type == QUICK_STYLE_POINT) typeName = wxT("POINT-Type Geometries"); if (Type == QUICK_STYLE_LINE) typeName = wxT("LINE-Type Geometries"); if (Type == QUICK_STYLE_POLYGON) typeName = wxT("POLYGON-Type Geometries"); if (Type == QUICK_STYLE_GEOMETRY) typeName = wxT("MIXED-Type Geometries"); wxTextCtrl *typeCtrl = new wxTextCtrl(panel, ID_VECTOR_TYPE, typeName, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); typeBoxSizer->Add(typeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *uuidBox = new wxStaticBox(panel, wxID_ANY, wxT("QuickStyle Name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *uuidBoxSizer = new wxStaticBoxSizer(uuidBox, wxHORIZONTAL); nameSizer->Add(uuidBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString uuid = wxString::FromUTF8(Style->GetUUID()); wxTextCtrl *uuidCtrl = new wxTextCtrl(panel, ID_VECTOR_UUID, uuid, wxDefaultPosition, wxSize(370, 22), wxTE_READONLY); uuidBoxSizer->Add(uuidCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); boxSizer->AddSpacer(25); // second row: Visibility Range wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdScaleChanged); return panel; } void QuickStyleVectorDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: Style->EnableMinScale(false); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: Style->EnableMinScale(true); Style->EnableMaxScale(false); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: Style->EnableMinScale(false); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: Style->EnableMinScale(true); Style->EnableMaxScale(true); minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *QuickStyleVectorDialog::CreatePointPage(wxWindow * parent) { // // creating the Point Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_POINT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Well Known Mark Name wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); // second row: Size and Rotation wxBoxSizer *box2Sizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(box2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorPoint and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); box2Sizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor Point wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Point"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: colors wxBoxSizer *box3Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(box3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Color wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); box3Sizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); box3Sizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFillCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color box3Sizer->AddSpacer(30); wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); box3Sizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sampleStrokeCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdMarkChanged); Connect(ID_SYMBOLIZER_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorFillPicker); Connect(ID_SYMBOLIZER_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorFillChanged); Connect(ID_SYMBOLIZER_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorStrokePicker); Connect(ID_SYMBOLIZER_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPointColorStrokeChanged); return panel; } void QuickStyleVectorDialog::OnCmdMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK); switch (markCtrl->GetSelection()) { case 1: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_CIRCLE); break; case 2: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_TRIANGLE); break; case 3: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_STAR); break; case 4: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_CROSS); break; case 5: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_X); break; default: Style->SetSymbolWellKnownMark(RL2_GRAPHIC_MARK_SQUARE); break; }; } void QuickStyleVectorDialog:: OnCmdPointColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPointColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdPointColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPointColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleVectorDialog::CreateLinePage(wxWindow * parent) { // // creating the Line Symbolizer page // wxString StrokeColor = wxT("#000000"); wxPanel *panel = new wxPanel(parent, ID_PANE_LINE); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #1 Opacity and Perpendicular Offset boxSizer->AddSpacer(50); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxHORIZONTAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); opacityBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); colorBoxSizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString dot[4]; dot[0] = wxT("&Solid Line"); dot[1] = wxT("&Dotted Line"); dot[2] = wxT("&Dashed Line"); dot[3] = wxT("&Dashed/Dotted Line"); wxRadioBox *dotBox = new wxRadioBox(panel, ID_SYMBOLIZER_DASH_DOT, wxT("&Dash/Dot Style"), wxDefaultPosition, wxDefaultSize, 4, dot, 1, wxRA_SPECIFY_COLS); dotBox->SetSelection(0); dashBoxSizer->Add(dotBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLineColorChanged); Connect(ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLineColorPicker); return panel; } void QuickStyleVectorDialog:: OnCmdLineColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdLineColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } wxPanel *QuickStyleVectorDialog::CreatePolygonPage(wxWindow * parent) { // // creating the Polygon Symbolizer page // wxString StrokeColor = wxT("#000000"); wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_FILL2); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the Polygon Displacement and Perpendicular Offset wxBoxSizer *polygonBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(polygonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row A: Displacement wxBoxSizer *displacementBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(displacementBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); displacementBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive: larger. / Negative: smaller.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Drawing polygons smaller or larger than their actual geometry (Buffer).")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Fill Opacity wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon Fill"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxHORIZONTAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsPolygonFill()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); enableSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FILL2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(400, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(Style->IsPolygonFill()); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Fill Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); auxSizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FILL2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sampleCtrl->Enable(Style->IsPolygonFill()); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_FILL2_PICKER_BTN, wxT("&Pick a color")); pick->Enable(Style->IsPolygonFill()); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // first row A: the Stroke #1 Opacity wxBoxSizer *opacity2BoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacity2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enable2Sizer = new wxStaticBoxSizer(enableBox, wxHORIZONTAL); opacity2BoxSizer->Add(enable2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enable2Ctrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enable2Ctrl->SetValue(Style->IsPolygonStroke()); enable2Sizer->Add(enable2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *opacity2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacity2Sizer = new wxStaticBoxSizer(opacity2Box, wxVERTICAL); enable2Sizer->Add(opacity2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacity2Ctrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(250, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacity2Ctrl->Enable(Style->IsPolygonStroke()); opacity2Sizer->Add(opacity2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color wxStaticBox *color2Box = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *color2Sizer = new wxStaticBoxSizer(color2Box, wxVERTICAL); enable2Sizer->Add(color2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *color3Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(color3Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *color2Ctrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); color2Ctrl->Enable(Style->IsPolygonStroke()); color3Sizer->Add(color2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBitmap *sample2Ctrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); sample2Ctrl->Enable(Style->IsPolygonStroke()); color3Sizer->Add(sample2Ctrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *picker2Sizer = new wxBoxSizer(wxHORIZONTAL); color2Sizer->Add(picker2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick2 = new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color")); pick2->Enable(Style->IsPolygonStroke()); picker2Sizer->Add(pick2, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: Stroke-Width, wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); enable2Sizer->Add(miscSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonStrokeChanged); Connect(ID_SYMBOLIZER_FILL2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonFillChanged); Connect(ID_SYMBOLIZER_FILL2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorFillChanged); Connect(ID_SYMBOLIZER_FILL2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorFillPicker); Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorStrokeChanged); Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdPolygonColorStrokePicker); return panel; } void QuickStyleVectorDialog:: OnCmdPolygonStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetPolygonStroke(true); else Style->SetPolygonStroke(false); RetrievePolygonPage(false); UpdatePolygonPage(); } void QuickStyleVectorDialog:: OnCmdPolygonFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); if (enableCtrl->IsChecked() == true) Style->SetPolygonFill(true); else Style->SetPolygonFill(false); RetrievePolygonPage(false); UpdatePolygonPage(); } void QuickStyleVectorDialog:: OnCmdPolygonColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPolygonColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdPolygonColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdPolygonColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } bool QuickStyleVectorDialog::DoCheckDatasource(const char *prefix, const char *coverage, char *table, char *geometry) { // // retrieving the real table and geometry column names // sqlite3 *sqlite = MainFrame->GetSqlite(); char *sql; int ret; char **results; int rows; int columns; int i; char *qprefix; bool ok = false; qprefix = gaiaDoubleQuotedSql(prefix); sql = sqlite3_mprintf("SELECT f_table_name, f_geometry_column, view_name, " "view_geometry, virt_name, virt_geometry " "FROM \"%s\".vector_coverages WHERE coverage_name = %Q", qprefix, coverage); free(qprefix); ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return false; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *t = results[(i * columns) + 0]; const char *g = results[(i * columns) + 1]; if (t != NULL && g != NULL) { strcpy(table, t); strcpy(geometry, g); ok = true; } t = results[(i * columns) + 2]; g = results[(i * columns) + 3]; if (t != NULL && g != NULL) { strcpy(table, t); strcpy(geometry, g); ok = true; } t = results[(i * columns) + 4]; g = results[(i * columns) + 5]; if (t != NULL && g != NULL) { strcpy(table, t); strcpy(geometry, g); ok = true; } } } sqlite3_free_table(results); return ok; } void QuickStyleVectorDialog::InitializeComboColumns(wxComboBox * ctrl) { // // initializing a Column list ComboBox // sqlite3 *sqlite = MainFrame->GetSqlite(); char *sql; int ret; char **results; int rows; int columns; int i; char prefix[1024]; char coverage[1024]; char table[1024]; char geometry[1024]; char *qprefix; char *qtable; if (DbPrefix.Len() == 0) strcpy(prefix, "MAIN"); else strcpy(prefix, DbPrefix.ToUTF8()); strcpy(coverage, LayerName.ToUTF8()); if (DoCheckDatasource(prefix, coverage, table, geometry) != true) return; qprefix = gaiaDoubleQuotedSql(prefix); qtable = gaiaDoubleQuotedSql(table); sql = sqlite3_mprintf("PRAGMA \"%s\".table_info(\"%s\")", qprefix, qtable); free(qprefix); free(qtable); ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *value = results[(i * columns) + 1]; if (strcasecmp(value, geometry) == 0) continue; // skipping the Geometry column wxString col = wxString::FromUTF8(value); ctrl->Append(col); } } sqlite3_free_table(results); } void QuickStyleVectorDialog::InitializeComboFonts(wxComboBox * ctrl) { // // initializing a Font list ComboBox // sqlite3 *sqlite = MainFrame->GetSqlite(); char *sql; int ret; char **results; int rows; int columns; int i; char prefix[1024]; char *qprefix; // inserting the default TOY FONTS wxString font = wxT("ToyFont: serif"); ctrl->Append(font); font = wxT("ToyFont: sans-serif"); ctrl->Append(font); font = wxT("ToyFont: monospace"); ctrl->Append(font); if (DbPrefix.Len() == 0) strcpy(prefix, "MAIN"); else strcpy(prefix, DbPrefix.ToUTF8()); qprefix = gaiaDoubleQuotedSql(prefix); sql = sqlite3_mprintf ("SELECT font_facename FROM \"%s\".SE_fonts ORDER BY font_facename", qprefix); free(qprefix); ret = sqlite3_get_table(sqlite, sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *value = results[(i * columns) + 0]; wxString col = wxString::FromUTF8(value); ctrl->Append(col); } } sqlite3_free_table(results); } wxPanel *QuickStyleVectorDialog::CreateTextPointPage(wxWindow * parent) { // // creating the Text Symbolizer page (Point Placement) // wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_TEXT1); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // enable/disable Labels wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Labels"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsLabelPrint()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); wxStaticText *columnLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Column:")); enableSizer->Add(columnLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxComboBox *columnList = new wxComboBox(panel, ID_SYMBOLIZER_TEXT1_LABEL, wxT(""), wxDefaultPosition, wxSize(400, 22), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboColumns(columnList); enableSizer->Add(columnList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *fontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *font9Sizer = new wxStaticBoxSizer(fontBox, wxHORIZONTAL); auxSizer->Add(font9Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Second row: Font Name, Size and Fill wxBoxSizer *fontSizer = new wxBoxSizer(wxHORIZONTAL); font9Sizer->Add(fontSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *font0Sizer = new wxBoxSizer(wxHORIZONTAL); fontSizer->Add(font0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Name wxBoxSizer *fontXSizer = new wxBoxSizer(wxVERTICAL); font0Sizer->Add(fontXSizer, 0, wxALIGN_LEFT | wxALL, 0); wxComboBox *fontList = new wxComboBox(panel, ID_SYMBOLIZER_FONT1_NAME, wxT(""), wxDefaultPosition, wxSize(250, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboFonts(fontList); fontList->Select(0); fontXSizer->Add(fontList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font Size wxBoxSizer *fontYSizer = new wxBoxSizer(wxHORIZONTAL); fontXSizer->Add(fontYSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxHORIZONTAL); fontYSizer->Add(sizeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT1_SIZE, wxT("15.0"), wxDefaultPosition, wxSize(100, 22)); sizeSizer->Add(sizeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *boldBoxSizer = new wxBoxSizer(wxVERTICAL); fontYSizer->Add(boldBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *boldBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *boldSizer = new wxStaticBoxSizer(boldBox, wxVERTICAL); boldBoxSizer->Add(boldSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *italicSizer = new wxBoxSizer(wxVERTICAL); boldSizer->Add(italicSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *italicCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_ITALIC, wxT("Italic"), wxDefaultPosition, wxDefaultSize); italicCtrl->SetValue(false); italicCtrl->Enable(false); italicSizer->Add(italicCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxCheckBox *boldCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT1_BOLD, wxT("Bold"), wxDefaultPosition, wxDefaultSize); boldCtrl->SetValue(false); boldCtrl->Enable(false); italicSizer->Add(boldCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Opacity wxStaticBox *opacityFontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityFontSizer = new wxStaticBoxSizer(opacityFontBox, wxVERTICAL); fontSizer->Add(opacityFontSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityFontCtrl = new wxSlider(panel, ID_SYMBOLIZER_FONT1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(150, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityFontSizer->Add(opacityFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font color wxStaticBox *fontColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fontColorSizer = new wxStaticBoxSizer(fontColorBox, wxVERTICAL); fontSizer->Add(fontColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *font2Sizer = new wxBoxSizer(wxHORIZONTAL); fontColorSizer->Add(font2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *fontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT1_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); font2Sizer->Add(fontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFontCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FONT1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); font2Sizer->Add(sampleFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickFont = new wxButton(panel, ID_SYMBOLIZER_FONT1_PICKER_BTN, wxT("&Pick a color")); fontColorSizer->Add(pickFont, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: PointPlacement wxBoxSizer *pointBoxSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(pointBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *pointBox = new wxStaticBox(panel, wxID_STATIC, wxT("Label Point Placement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *pointSizer = new wxStaticBoxSizer(pointBox, wxHORIZONTAL); pointBoxSizer->Add(pointSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row A: Anchor Point wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Point"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); pointSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(60, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(60, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); pointSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row C: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); pointSizer->Add(rotSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font Halo wxStaticBox *haloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Halo"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloSizer = new wxStaticBoxSizer(haloBox, wxVERTICAL); pointBoxSizer->Add(haloSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *halo1Sizer = new wxBoxSizer(wxHORIZONTAL); haloSizer->Add(halo1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enableHaloCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_HALO1_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableHaloCtrl->SetValue(Style->IsHaloEnabled()); enableHaloCtrl->Enable(false); halo1Sizer->Add(enableHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo Radius wxStaticBox *radiusBox = new wxStaticBox(panel, wxID_STATIC, wxT("Radius"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *radiusSizer = new wxStaticBoxSizer(radiusBox, wxVERTICAL); halo1Sizer->Add(radiusSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *radiusCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO1_RADIUS, wxT("1.0"), wxDefaultPosition, wxSize(50, 22)); radiusCtrl->Enable(false); radiusSizer->Add(radiusCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo Opacity wxStaticBox *opacityHaloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityHaloSizer = new wxStaticBoxSizer(opacityHaloBox, wxVERTICAL); halo1Sizer->Add(opacityHaloSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxSlider *opacityHaloCtrl = new wxSlider(panel, ID_SYMBOLIZER_HALO1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(75, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityHaloSizer->Add(opacityHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); opacityHaloCtrl->Enable(false); // Halo color wxStaticBox *haloColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloColorSizer = new wxStaticBoxSizer(haloColorBox, wxHORIZONTAL); haloSizer->Add(haloColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *haloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO1_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); haloColorSizer->Add(haloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); haloCtrl->Enable(false); color = wxColour(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleHaloCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_HALO1_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); haloColorSizer->Add(sampleHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickHalo = new wxButton(panel, ID_SYMBOLIZER_HALO1_PICKER_BTN, wxT("&Pick a color")); haloColorSizer->Add(pickHalo, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); pickHalo->Enable(false); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_TEXT1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLabel1Changed); Connect(ID_SYMBOLIZER_FONT1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont1ColorPicker); Connect(ID_SYMBOLIZER_FONT1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont1ColorChanged); Connect(ID_SYMBOLIZER_FONT1_NAME, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnFont1Changed); Connect(ID_SYMBOLIZER_HALO1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdHalo1EnableChanged); Connect(ID_SYMBOLIZER_HALO1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo1Picker); Connect(ID_SYMBOLIZER_HALO1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo1Changed); return panel; } void QuickStyleVectorDialog:: OnCmdLabel1Changed(wxCommandEvent & WXUNUSED(event)) { // // Label enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ENABLE); if (enableCtrl->IsChecked() == true) { Style->SetLabelPrint(true); Style->SetLabelLinePlacement(false); } else Style->SetLabelPrint(false); RetrieveTextPointPage(false); UpdateTextPointPage(); } void QuickStyleVectorDialog::OnFont1Changed(wxCommandEvent & WXUNUSED(event)) { // // the Font is changed // wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC); wxComboBox *fontList = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME); wxString font = fontList->GetValue(); char facename[1024]; strcpy(facename, font.ToUTF8()); if (strncmp(facename, "ToyFont: ", 9) == 0) { boldCtrl->Enable(true); italicCtrl->Enable(true); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(facename, &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } void QuickStyleVectorDialog:: OnCmdFont1ColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdFont1ColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Font Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FONT1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdColorHalo1Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdColorHalo1Changed(wxCommandEvent & WXUNUSED(event)) { // // Halo Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_HALO1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdHalo1EnableChanged(wxCommandEvent & WXUNUSED(event)) { // // Graphic Halo enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO1_ENABLE); if (enableCtrl->IsChecked() == true) Style->EnableHalo(true); else Style->EnableHalo(false); RetrieveTextPointPage(false); UpdateTextPointPage(); } wxPanel *QuickStyleVectorDialog::CreateTextLinePage(wxWindow * parent) { // // creating the Text Symbolizer page (Line Placement) // wxString FillColor = wxT("#808080"); wxPanel *panel = new wxPanel(parent, ID_PANE_TEXT1); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // enable/disable Labels wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Labels"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(Style->IsLabelPrint()); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); enableSizer->AddSpacer(20); wxStaticText *columnLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Column:")); enableSizer->Add(columnLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxComboBox *columnList = new wxComboBox(panel, ID_SYMBOLIZER_TEXT2_LABEL, wxT(""), wxDefaultPosition, wxSize(400, 22), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboColumns(columnList); enableSizer->Add(columnList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *fontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *font9Sizer = new wxStaticBoxSizer(fontBox, wxHORIZONTAL); auxSizer->Add(font9Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Second row: Font Name, Size and Fill wxBoxSizer *fontSizer = new wxBoxSizer(wxHORIZONTAL); font9Sizer->Add(fontSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *font0Sizer = new wxBoxSizer(wxHORIZONTAL); fontSizer->Add(font0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Name wxBoxSizer *fontXSizer = new wxBoxSizer(wxVERTICAL); font0Sizer->Add(fontXSizer, 0, wxALIGN_LEFT | wxALL, 0); wxComboBox *fontList = new wxComboBox(panel, ID_SYMBOLIZER_FONT2_NAME, wxT(""), wxDefaultPosition, wxSize(250, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboFonts(fontList); fontList->Select(0); fontXSizer->Add(fontList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font Size wxBoxSizer *fontYSizer = new wxBoxSizer(wxHORIZONTAL); fontXSizer->Add(fontYSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); fontYSizer->Add(sizeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT2_SIZE, wxT("15.0"), wxDefaultPosition, wxSize(100, 22)); sizeSizer->Add(sizeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *boldBoxSizer = new wxBoxSizer(wxHORIZONTAL); fontYSizer->Add(boldBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *boldBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Style"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *boldSizer = new wxStaticBoxSizer(boldBox, wxHORIZONTAL); boldBoxSizer->Add(boldSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *italicSizer = new wxBoxSizer(wxHORIZONTAL); boldSizer->Add(italicSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *italicCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_ITALIC, wxT("Italic"), wxDefaultPosition, wxDefaultSize); italicCtrl->SetValue(false); italicCtrl->Enable(false); italicSizer->Add(italicCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxCheckBox *boldCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT2_BOLD, wxT("Bold"), wxDefaultPosition, wxDefaultSize); boldCtrl->SetValue(false); boldCtrl->Enable(false); italicSizer->Add(boldCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Opacity wxStaticBox *opacityFontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityFontSizer = new wxStaticBoxSizer(opacityFontBox, wxVERTICAL); fontSizer->Add(opacityFontSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityFontCtrl = new wxSlider(panel, ID_SYMBOLIZER_FONT2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(150, 35), wxSL_HORIZONTAL | wxSL_LABELS); opacityFontSizer->Add(opacityFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font color wxStaticBox *fontColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fontColorSizer = new wxStaticBoxSizer(fontColorBox, wxHORIZONTAL); fontSizer->Add(fontColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *font2Sizer = new wxBoxSizer(wxVERTICAL); fontColorSizer->Add(font2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *fontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FONT2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); font2Sizer->Add(fontCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleFontCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_FONT2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); fontColorSizer->Add(sampleFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickFont = new wxButton(panel, ID_SYMBOLIZER_FONT2_PICKER_BTN, wxT("&Pick a color")); font2Sizer->Add(pickFont, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // second row: LinePlacement wxBoxSizer *lineBoxSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(lineBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *lineBox = new wxStaticBox(panel, wxID_STATIC, wxT("Label Line Placement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *lineSizer = new wxStaticBoxSizer(lineBox, wxVERTICAL); lineBoxSizer->Add(lineSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row A: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); lineSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); perpendicularCtrl->Enable(false); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row B: IsRepeated, InitialGap and Gap wxBoxSizer *repeatedBoxSizer = new wxBoxSizer(wxHORIZONTAL); lineSizer->Add(repeatedBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *repeatedBox = new wxStaticBox(panel, wxID_STATIC, wxT("Repeated Label"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *repeatedSizer = new wxStaticBoxSizer(repeatedBox, wxHORIZONTAL); repeatedBoxSizer->Add(repeatedSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *isRepeatedCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_IS_REPEATED, wxT("Repeated"), wxDefaultPosition, wxDefaultSize); isRepeatedCtrl->SetValue(false); isRepeatedCtrl->Enable(false); repeatedSizer->Add(isRepeatedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *inigapBox = new wxStaticBox(panel, wxID_STATIC, wxT("Initial Gap"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *inigapSizer = new wxStaticBoxSizer(inigapBox, wxVERTICAL); repeatedSizer->Add(inigapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *inigapCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_INITIAL_GAP, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); inigapCtrl->Enable(false); inigapSizer->Add(inigapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *gapBox = new wxStaticBox(panel, wxID_STATIC, wxT("Gap"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *gapSizer = new wxStaticBoxSizer(gapBox, wxVERTICAL); repeatedSizer->Add(gapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *gapCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TEXT_GAP, wxT("0.0"), wxDefaultPosition, wxSize(60, 22)); gapCtrl->Enable(false); gapSizer->Add(gapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row C: IsAligned and Generalize wxBoxSizer *optBoxSizer = new wxBoxSizer(wxHORIZONTAL); repeatedBoxSizer->Add(optBoxSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC, wxT("Options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxVERTICAL); optBoxSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *isAlignedCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_IS_ALIGNED, wxT("Aligned"), wxDefaultPosition, wxDefaultSize); isAlignedCtrl->SetValue(false); isAlignedCtrl->Enable(false); optSizer->Add(isAlignedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *generalizeCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_TEXT_GENERALIZE, wxT("Generalize"), wxDefaultPosition, wxDefaultSize); generalizeCtrl->SetValue(false); generalizeCtrl->Enable(false); optSizer->Add(generalizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo wxBoxSizer *haloBoxSizer = new wxBoxSizer(wxVERTICAL); lineBoxSizer->Add(haloBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *haloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Font Halo"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloSizer = new wxStaticBoxSizer(haloBox, wxVERTICAL); haloBoxSizer->Add(haloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *halo0Sizer = new wxBoxSizer(wxHORIZONTAL); haloSizer->Add(halo0Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *enableHaloCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_HALO2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableHaloCtrl->SetValue(Style->IsHaloEnabled()); enableHaloCtrl->Enable(false); halo0Sizer->Add(enableHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo Radius wxStaticBox *radiusBox = new wxStaticBox(panel, wxID_STATIC, wxT("Radius"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *radiusSizer = new wxStaticBoxSizer(radiusBox, wxVERTICAL); halo0Sizer->Add(radiusSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxTextCtrl *radiusCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO2_RADIUS, wxT("1.0"), wxDefaultPosition, wxSize(50, 22)); radiusCtrl->Enable(false); radiusSizer->Add(radiusCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // Halo Opacity wxStaticBox *opacityHaloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityHaloSizer = new wxStaticBoxSizer(opacityHaloBox, wxVERTICAL); haloSizer->Add(opacityHaloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxSlider *opacityHaloCtrl = new wxSlider(panel, ID_SYMBOLIZER_HALO2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(130, 35), wxSL_HORIZONTAL | wxSL_LABELS); opacityHaloSizer->Add(opacityHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); opacityHaloCtrl->Enable(false); // Halo color wxStaticBox *haloColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloColorSizer = new wxStaticBoxSizer(haloColorBox, wxHORIZONTAL); haloSizer->Add(haloColorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxBoxSizer *halo2Sizer = new wxBoxSizer(wxVERTICAL); haloColorSizer->Add(halo2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *haloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO2_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); halo2Sizer->Add(haloCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); haloCtrl->Enable(false); color = wxColour(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleHaloCtrl = new wxStaticBitmap(panel, ID_SYMBOLIZER_HALO2_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); haloColorSizer->Add(sampleHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickHalo = new wxButton(panel, ID_SYMBOLIZER_HALO2_PICKER_BTN, wxT("&Pick a color")); halo2Sizer->Add(pickHalo, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); pickHalo->Enable(false); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_TEXT2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdLabel2Changed); Connect(ID_SYMBOLIZER_FONT2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont2ColorPicker); Connect(ID_SYMBOLIZER_FONT2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdFont2ColorChanged); Connect(ID_SYMBOLIZER_TEXT_IS_REPEATED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdIsRepeatedChanged); Connect(ID_SYMBOLIZER_TEXT_IS_ALIGNED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdIsAlignedChanged); Connect(ID_SYMBOLIZER_TEXT_GENERALIZE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdGeneralizeLineChanged); Connect(ID_SYMBOLIZER_FONT2_NAME, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnFont2Changed); Connect(ID_SYMBOLIZER_HALO2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdHalo2EnableChanged); Connect(ID_SYMBOLIZER_HALO2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo2Picker); Connect(ID_SYMBOLIZER_HALO2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & QuickStyleVectorDialog::OnCmdColorHalo2Changed); return panel; } void QuickStyleVectorDialog:: OnCmdLabel2Changed(wxCommandEvent & WXUNUSED(event)) { // // Label enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ENABLE); if (enableCtrl->IsChecked() == true) { Style->SetLabelPrint(true); Style->SetLabelLinePlacement(true); } else Style->SetLabelPrint(false); RetrieveTextLinePage(false); UpdateTextLinePage(); } void QuickStyleVectorDialog::OnFont2Changed(wxCommandEvent & WXUNUSED(event)) { // // the Font is changed // wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC); wxComboBox *fontList = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME); wxString font = fontList->GetValue(); char facename[1024]; strcpy(facename, font.ToUTF8()); if (strncmp(facename, "ToyFont: ", 9) == 0) { boldCtrl->Enable(true); italicCtrl->Enable(true); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(facename, &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } void QuickStyleVectorDialog:: OnCmdFont2ColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdFont2ColorChanged(wxCommandEvent & WXUNUSED(event)) { // // Font Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_FONT2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdIsRepeatedChanged(wxCommandEvent & WXUNUSED(event)) { // // Label IsRepeated enable/disable // wxCheckBox *repeatedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_REPEATED); if (repeatedCtrl->IsChecked() == true) Style->SetRepeatedLabel(true); else Style->SetRepeatedLabel(false); RetrieveTextLinePage(false); UpdateTextLinePage(); } void QuickStyleVectorDialog:: OnCmdIsAlignedChanged(wxCommandEvent & WXUNUSED(event)) { // // Label IsAligned enable/disable // wxCheckBox *alignedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_ALIGNED); if (alignedCtrl->IsChecked() == true) Style->SetLabelIsAligned(true); else Style->SetLabelIsAligned(false); } void QuickStyleVectorDialog:: OnCmdGeneralizeLineChanged(wxCommandEvent & WXUNUSED(event)) { // // Label GeneralizeLine enable/disable // wxCheckBox *generalizeCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_GENERALIZE); if (generalizeCtrl->IsChecked() == true) Style->SetLabelGeneralizeLine(true); else Style->SetLabelGeneralizeLine(false); } void QuickStyleVectorDialog:: OnCmdColorHalo2Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void QuickStyleVectorDialog:: OnCmdColorHalo2Changed(wxCommandEvent & WXUNUSED(event)) { // // Halo Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_HALO2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void QuickStyleVectorDialog:: OnCmdHalo2EnableChanged(wxCommandEvent & WXUNUSED(event)) { // // Graphic Halo enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO2_ENABLE); if (enableCtrl->IsChecked() == true) Style->EnableHalo(true); else Style->EnableHalo(false); RetrieveTextLinePage(false); UpdateTextLinePage(); } bool QuickStyleVectorDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // double min = Style->GetScaleMin(); double max = Style->GetScaleMax(); if (Style->IsMinScaleEnabled() == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&min) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (min < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMaxScaleEnabled() == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&max) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (max < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() == true) { if (min >= max) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Style->SetScaleMin(min); Style->SetScaleMax(max); return true; } void QuickStyleVectorDialog::UpdateMainPage() { // // updating the MAIN page // wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(0); else if (Style->IsMinScaleEnabled() == true && Style->IsMaxScaleEnabled() != true) rangeBox->SetSelection(1); else if (Style->IsMinScaleEnabled() != true && Style->IsMaxScaleEnabled() == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (Style->IsMinScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMin()); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (Style->IsMaxScaleEnabled() == true) { sprintf(dummy, "%1.2f", Style->GetScaleMax()); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } } bool QuickStyleVectorDialog::RetrievePointPage(bool check) { // // retrieving params from the Point Symbolizer page // double opacity; double size; double rotation; double anchorPointX; double anchorPointY; double displacementX; double displacementY; char fillColor[8]; char strokeColor[8]; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorPointX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointX < 0.0 || anchorPointX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorPointY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointY < 0.0 || anchorPointY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); Style->SetSymbolOpacity(opacity); Style->SetSymbolSize(size); Style->SetSymbolAnchorX(anchorPointX); Style->SetSymbolAnchorY(anchorPointY); Style->SetSymbolRotation(rotation); Style->SetSymbolDisplacementX(displacementX); Style->SetSymbolDisplacementY(displacementY); Style->SetSymbolFillColor(fillColor); Style->SetSymbolStrokeColor(strokeColor); return true; } void QuickStyleVectorDialog::UpdatePointPage() { // // updating the Point Symbolizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); opacityCtrl->SetValue(Style->GetSymbolOpacity() * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetSymbolSize()); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); sprintf(dummy, "%1.2f", Style->GetSymbolRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetSymbolAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetSymbolAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetSymbolDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetSymbolDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK); switch (Style->GetSymbolWellKnownMark()) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxString fillColor = wxString::FromUTF8(Style->GetSymbolFillColor()); colorFillCtrl->SetValue(fillColor); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxString strokeColor = wxString::FromUTF8(Style->GetSymbolStrokeColor()); colorStrokeCtrl->SetValue(strokeColor); } bool QuickStyleVectorDialog::RetrieveLinePage(bool check) { // // retrieving params from the Line Symbolizer page // double opacity; double perpendicularOffset; char strokeColor[8]; double strokeWidth; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&strokeWidth) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (strokeWidth <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (dotCtrl->GetSelection()) { case 1: Style->SetLineDotStyle(QUICK_STYLE_DOT_LINE); break; case 2: Style->SetLineDotStyle(QUICK_STYLE_DASH_LINE); break; case 3: Style->SetLineDotStyle(QUICK_STYLE_DASH_DOT_LINE); break; default: Style->SetLineDotStyle(QUICK_STYLE_SOLID_LINE); break; }; Style->SetLineOpacity(opacity); Style->SetLinePerpendicularOffset(perpendicularOffset); Style->SetLineStrokeWidth(strokeWidth); Style->SetLineStrokeColor(strokeColor); return true; } void QuickStyleVectorDialog::UpdateLinePage() { // // updating the Line Symbolizer page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacityCtrl->SetValue(Style->GetLineOpacity() * 100.0); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetLinePerpendicularOffset()); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); colorCtrl->Enable(true); pick->Enable(true); wxString strokeColor = wxString::FromUTF8(Style->GetLineStrokeColor()); colorCtrl->SetValue(strokeColor); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); sprintf(dummy, "%1.2f", Style->GetLineStrokeWidth()); str = wxString::FromUTF8(dummy); wxRadioBox *dotCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_DASH_DOT); switch (Style->GetLineDotStyle()) { case QUICK_STYLE_DOT_LINE: dotCtrl->SetSelection(1); break; case QUICK_STYLE_DASH_LINE: dotCtrl->SetSelection(2); break; case QUICK_STYLE_DASH_DOT_LINE: dotCtrl->SetSelection(3); break; default: dotCtrl->SetSelection(0); break; }; widthCtrl->SetValue(str); } bool QuickStyleVectorDialog::RetrievePolygonPage(bool check) { // // retrieving params from the Polygon Synbolizer page // double fillOpacity; double displacementX; double displacementY; double perpendicularOffset; char fillColor[8]; double strokeOpacity; char strokeColor[8]; double strokeWidth; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); fillOpacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); wxString value = displXCtrl->GetValue(); if (Style->IsPolygonFill() != true && Style->IsPolygonStroke() != true) { if (check == true) { wxMessageBox(wxT ("You can't disable both FILL and STROKE at the same time !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fillColor, color.ToUTF8()); wxSlider *opacity2Ctrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); strokeOpacity = opacity2Ctrl->GetValue() / 100.0; wxTextCtrl *color2Ctrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); color = color2Ctrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(strokeColor, color.ToUTF8()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&strokeWidth) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (strokeWidth <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Style->SetPolygonFillOpacity(fillOpacity); Style->SetPolygonDisplacementX(displacementX); Style->SetPolygonDisplacementY(displacementY); Style->SetPolygonPerpendicularOffset(perpendicularOffset); Style->SetPolygonFillColor(fillColor); Style->SetPolygonStrokeOpacity(strokeOpacity); Style->SetPolygonStrokeColor(strokeColor); Style->SetPolygonStrokeWidth(strokeWidth); return true; } void QuickStyleVectorDialog::UpdatePolygonPage() { // // updating the Polygon Symbolizer page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); enableBox->SetValue(Style->IsPolygonFill()); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetPolygonDisplacementX()); wxString str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetPolygonDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); sprintf(dummy, "%1.2f", Style->GetPolygonPerpendicularOffset()); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); opacityCtrl->SetValue(Style->GetPolygonFillOpacity() * 100.0); opacityCtrl->Enable(Style->IsPolygonFill()); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetPolygonFillColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } colorCtrl->Enable(Style->IsPolygonFill()); pick->Enable(Style->IsPolygonFill()); wxCheckBox *enable2Box = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); enable2Box->SetValue(Style->IsPolygonStroke()); wxSlider *opacity2Ctrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); opacity2Ctrl->SetValue(Style->GetPolygonStrokeOpacity() * 100.0); opacity2Ctrl->Enable(Style->IsPolygonStroke()); wxTextCtrl *color2Ctrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxButton *pick2 = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); color = wxNullColour; str = wxString::FromUTF8(Style->GetPolygonStrokeColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); color2Ctrl->SetValue(str); } color2Ctrl->Enable(Style->IsPolygonStroke()); pick2->Enable(Style->IsPolygonStroke()); wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); sprintf(dummy, "%1.2f", Style->GetPolygonStrokeWidth()); str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); widthCtrl->Enable(Style->IsPolygonStroke()); } bool QuickStyleVectorDialog::RetrieveTextPointPage(bool check) { // // retrieving params from the Text Symbolizer page - Point Placement // wxString column; wxString font; double fontSize; int fontStyle; int fontWeight; double opacity; char fontColor[8]; double haloRadius; double haloOpacity; char haloColor[8]; double rotation; double anchorPointX; double anchorPointY; double displacementX; double displacementY; if (Style->IsLabelPrint() == false) return true; wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT1_LABEL); int idSel = columnCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Column !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } column = columnCtrl->GetValue(); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME); idSel = fontCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Font !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } font = fontCtrl->GetValue(); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&fontSize) != true) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (fontSize <= 0.0) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE should be a positive numberr !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC); if (boldCtrl->GetValue() == true) fontWeight = RL2_FONTWEIGHT_BOLD; else fontWeight = RL2_FONTWEIGHT_NORMAL; if (italicCtrl->GetValue() == true) fontStyle = RL2_FONTSTYLE_ITALIC; else fontStyle = RL2_FONTSTYLE_NORMAL; wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT1_OPACITY); opacity = opacityFontCtrl->GetValue() / 100.0; wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FONT-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fontColor, color.ToUTF8()); // Point Placement wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&anchorPointX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointX < 0.0 || anchorPointX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&anchorPointY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (anchorPointY < 0.0 || anchorPointY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&displacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&displacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsHaloEnabled() == true) { wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO1_OPACITY); haloOpacity = opacityHaloCtrl->GetValue() / 100.0; wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_RADIUS); wxString value = radiusCtrl->GetValue(); if (value.ToDouble(&haloRadius) != true) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (haloRadius <= 0.0) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); wxString color = colorHaloCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("HALO-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(haloColor, color.ToUTF8()); } Style->SetLabelColumn(column.ToUTF8()); Style->SetFontFacename(font.ToUTF8()); Style->SetFontOpacity(opacity); Style->SetFontSize(fontSize); Style->SetFontStyle(fontStyle); Style->SetFontWeight(fontWeight); Style->SetFontColor(fontColor); Style->SetLabelRotation(rotation); Style->SetLabelAnchorX(anchorPointX); Style->SetLabelAnchorY(anchorPointY); Style->SetLabelDisplacementX(displacementX); Style->SetLabelDisplacementY(displacementY); if (Style->IsHaloEnabled() == true) { Style->SetHaloRadius(haloRadius); Style->SetHaloOpacity(haloOpacity); Style->SetHaloColor(haloColor); } return true; } void QuickStyleVectorDialog::UpdateTextPointPage() { // // updating the Text Symbolizer page - Point Placement // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ENABLE); enableCtrl->SetValue(Style->IsLabelPrint()); wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT1_LABEL); wxString str = wxString::FromUTF8(Style->GetLabelColumn()); int idSel = columnCtrl->FindString(str); columnCtrl->SetSelection(idSel); columnCtrl->Enable(Style->IsLabelPrint()); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT1_NAME); str = wxString::FromUTF8(Style->GetFontFacename()); idSel = fontCtrl->FindString(str); fontCtrl->SetSelection(idSel); fontCtrl->Enable(Style->IsLabelPrint()); wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT1_OPACITY); opacityFontCtrl->SetValue(Style->GetFontOpacity() * 100.0); opacityFontCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *colorFontCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_COLOR); wxButton *pickFont = (wxButton *) FindWindow(ID_SYMBOLIZER_FONT1_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetFontColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorFontCtrl->SetValue(str); } colorFontCtrl->Enable(Style->IsLabelPrint()); pickFont->Enable(Style->IsLabelPrint()); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT1_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFontSize()); str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); sizeCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT1_ITALIC); if (Style->GetFontWeight() == RL2_FONTWEIGHT_BOLD) boldCtrl->SetValue(true); else boldCtrl->SetValue(false); if (Style->GetFontStyle() == RL2_FONTSTYLE_ITALIC) italicCtrl->SetValue(true); else italicCtrl->SetValue(false); boldCtrl->Enable(false); italicCtrl->Enable(false); if (Style->GetFontFacename() != NULL) { if (strncmp(Style->GetFontFacename(), "ToyFont: ", 9) == 0) { boldCtrl->Enable(Style->IsLabelPrint()); italicCtrl->Enable(Style->IsLabelPrint()); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(Style->GetFontFacename(), &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } // Point Placement wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ROTATION); sprintf(dummy, "%1.2f", Style->GetLabelRotation()); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); rotationCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_X); sprintf(dummy, "%1.2f", Style->GetLabelAnchorX()); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); anchorXCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_ANCHOR_Y); sprintf(dummy, "%1.2f", Style->GetLabelAnchorY()); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); anchorYCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_X); sprintf(dummy, "%1.2f", Style->GetLabelDisplacementX()); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); displXCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", Style->GetLabelDisplacementY()); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); displYCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *enableHaloBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO1_ENABLE); if (Style->IsHaloEnabled() == true) enableHaloBox->SetValue(true); else enableHaloBox->SetValue(false); enableHaloBox->Enable(Style->IsLabelPrint()); bool enable = false; if (Style->IsLabelPrint() == true) enable = Style->IsHaloEnabled(); wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_RADIUS); radiusCtrl->Enable(enable); wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO1_COLOR); colorHaloCtrl->Enable(enable); wxButton *pickHalo = (wxButton *) FindWindow(ID_SYMBOLIZER_HALO1_PICKER_BTN); pickHalo->Enable(enable); wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO1_OPACITY); opacityHaloCtrl->Enable(enable); opacityHaloCtrl->SetValue(Style->GetHaloOpacity() * 100.0); sprintf(dummy, "%1.2f", Style->GetHaloRadius()); str = wxString::FromUTF8(dummy); radiusCtrl->SetValue(str); color = wxNullColour; str = wxString::FromUTF8(Style->GetHaloColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorHaloCtrl->SetValue(str); } if (Style->IsHaloEnabled() == false) { opacityHaloCtrl->Enable(false); pickHalo->Enable(false); colorHaloCtrl->Enable(false); radiusCtrl->Enable(false); } else { opacityHaloCtrl->Enable(true); pickHalo->Enable(true); colorHaloCtrl->Enable(true); radiusCtrl->Enable(true); } } bool QuickStyleVectorDialog::RetrieveTextLinePage(bool check) { // // retrieving params from the Text Symbolizer page - Line Placement // wxString column; wxString font; double fontSize; int fontStyle; int fontWeight; double opacity; char fontColor[8]; double haloRadius; double haloOpacity; char haloColor[8]; double perpendicularOffset; double initialGap; double gap; if (Style->IsLabelPrint() == false) return true; wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT2_LABEL); int idSel = columnCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Column !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } column = columnCtrl->GetValue(); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME); idSel = fontCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { if (check == true) { wxMessageBox(wxT ("You must select some Font !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } font = fontCtrl->GetValue(); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&fontSize) != true) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (fontSize <= 0.0) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE should be a positive numberr !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC); if (boldCtrl->GetValue() == true) fontWeight = RL2_FONTWEIGHT_BOLD; else fontWeight = RL2_FONTWEIGHT_NORMAL; if (italicCtrl->GetValue() == true) fontStyle = RL2_FONTSTYLE_ITALIC; else fontStyle = RL2_FONTSTYLE_NORMAL; wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT2_OPACITY); opacity = opacityFontCtrl->GetValue() / 100.0; wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FONT-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(fontColor, color.ToUTF8()); // Line Placement wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&perpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *inigapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_INITIAL_GAP); value = inigapCtrl->GetValue(); if (value.ToDouble(&initialGap) != true) { if (check == true) { wxMessageBox(wxT ("INITIAL-GAP isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (initialGap < 0.0) { if (check == true) { wxMessageBox(wxT ("INITIAL-GAP should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_GAP); value = gapCtrl->GetValue(); if (value.ToDouble(&gap) != true) { if (check == true) { wxMessageBox(wxT ("GAP isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (gap < 0.0) { if (check == true) { wxMessageBox(wxT ("GAP should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Style->IsHaloEnabled() == true) { wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO2_OPACITY); haloOpacity = opacityHaloCtrl->GetValue() / 100.0; wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_RADIUS); wxString value = radiusCtrl->GetValue(); if (value.ToDouble(&haloRadius) != true) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (haloRadius <= 0.0) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); wxString color = colorHaloCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("HALO-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } strcpy(haloColor, color.ToUTF8()); } Style->SetLabelColumn(column.ToUTF8()); Style->SetFontFacename(font.ToUTF8()); Style->SetFontOpacity(opacity); Style->SetFontSize(fontSize); Style->SetFontStyle(fontStyle); Style->SetFontWeight(fontWeight); Style->SetFontColor(fontColor); Style->SetLabelPerpendicularOffset(perpendicularOffset); Style->SetLabelInitialGap(initialGap); Style->SetLabelGap(gap); if (Style->IsHaloEnabled() == true) { Style->SetHaloRadius(haloRadius); Style->SetHaloOpacity(haloOpacity); Style->SetHaloColor(haloColor); } return true; } void QuickStyleVectorDialog::UpdateTextLinePage() { // // updating the Text Symbolizer page - Line Placement // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ENABLE); enableCtrl->SetValue(Style->IsLabelPrint()); wxComboBox *columnCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_TEXT2_LABEL); wxString str = wxString::FromUTF8(Style->GetLabelColumn()); int idSel = columnCtrl->FindString(str); columnCtrl->SetSelection(idSel); columnCtrl->Enable(Style->IsLabelPrint()); wxComboBox *fontCtrl = (wxComboBox *) FindWindow(ID_SYMBOLIZER_FONT2_NAME); str = wxString::FromUTF8(Style->GetFontFacename()); idSel = fontCtrl->FindString(str); fontCtrl->SetSelection(idSel); fontCtrl->Enable(Style->IsLabelPrint()); wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT2_OPACITY); opacityFontCtrl->SetValue(Style->GetFontOpacity() * 100.0); opacityFontCtrl->Enable(Style->IsLabelPrint()); wxTextCtrl *colorFontCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_COLOR); wxButton *pickFont = (wxButton *) FindWindow(ID_SYMBOLIZER_FONT2_PICKER_BTN); wxColour color = wxNullColour; str = wxString::FromUTF8(Style->GetFontColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorFontCtrl->SetValue(str); } colorFontCtrl->Enable(Style->IsLabelPrint()); pickFont->Enable(Style->IsLabelPrint()); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FONT2_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Style->GetFontSize()); str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); sizeCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *boldCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_BOLD); wxCheckBox *italicCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT2_ITALIC); if (Style->GetFontWeight() == RL2_FONTWEIGHT_BOLD) boldCtrl->SetValue(true); else boldCtrl->SetValue(false); if (Style->GetFontStyle() == RL2_FONTSTYLE_ITALIC) italicCtrl->SetValue(true); else italicCtrl->SetValue(false); italicCtrl->Enable(Style->IsLabelPrint()); boldCtrl->Enable(false); italicCtrl->Enable(false); if (Style->GetFontFacename() != NULL) { if (strncmp(Style->GetFontFacename(), "ToyFont: ", 9) == 0) { boldCtrl->Enable(Style->IsLabelPrint()); italicCtrl->Enable(Style->IsLabelPrint()); } else { bool bold = false; bool italic = false; MainFrame->CheckTTFont(Style->GetFontFacename(), &bold, &italic); boldCtrl->SetValue(bold); italicCtrl->SetValue(italic); boldCtrl->Enable(false); italicCtrl->Enable(false); } } // Line Placement wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_PERPENDICULAR); sprintf(dummy, "%1.2f", Style->GetLabelPerpendicularOffset()); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); perpCtrl->Enable(Style->IsLabelPrint()); wxCheckBox *repeatBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_REPEATED); repeatBox->SetValue(Style->IsRepeatedLabel()); repeatBox->Enable(Style->IsLabelPrint()); wxTextCtrl *inigapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_INITIAL_GAP); sprintf(dummy, "%1.2f", Style->GetLabelInitialGap()); str = wxString::FromUTF8(dummy); inigapCtrl->SetValue(str); wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TEXT_GAP); sprintf(dummy, "%1.2f", Style->GetLabelGap()); str = wxString::FromUTF8(dummy); gapCtrl->SetValue(str); if (Style->IsLabelPrint() && Style->IsRepeatedLabel()) { inigapCtrl->Enable(true); gapCtrl->Enable(true); } else { inigapCtrl->Enable(false); gapCtrl->Enable(false); } wxCheckBox *alignBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_IS_ALIGNED); alignBox->SetValue(Style->IsLabelAligned()); alignBox->Enable(Style->IsLabelPrint()); wxCheckBox *generalizeBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_TEXT_GENERALIZE); generalizeBox->SetValue(Style->IsLabelGeneralizeLine()); generalizeBox->Enable(Style->IsLabelPrint()); wxCheckBox *enableHaloBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO2_ENABLE); if (Style->IsHaloEnabled() == true) enableHaloBox->SetValue(true); else enableHaloBox->SetValue(false); enableHaloBox->Enable(Style->IsLabelPrint()); bool enable = false; if (Style->IsLabelPrint() == true) enable = Style->IsHaloEnabled(); wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_RADIUS); radiusCtrl->Enable(enable); wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO2_COLOR); colorHaloCtrl->Enable(enable); wxButton *pickHalo = (wxButton *) FindWindow(ID_SYMBOLIZER_HALO2_PICKER_BTN); pickHalo->Enable(enable); wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO2_OPACITY); opacityHaloCtrl->Enable(enable); opacityHaloCtrl->SetValue(Style->GetHaloOpacity() * 100.0); sprintf(dummy, "%1.2f", Style->GetHaloRadius()); str = wxString::FromUTF8(dummy); radiusCtrl->SetValue(str); color = wxNullColour; str = wxString::FromUTF8(Style->GetHaloColor()); ColorMapEntry::GetWxColor(str, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorHaloCtrl->SetValue(str); } if (Style->IsHaloEnabled() == false) { opacityHaloCtrl->Enable(false); pickHalo->Enable(false); colorHaloCtrl->Enable(false); radiusCtrl->Enable(false); } else { opacityHaloCtrl->Enable(true); pickHalo->Enable(true); colorHaloCtrl->Enable(true); radiusCtrl->Enable(true); } } void QuickStyleVectorDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret = false; int idx = event.GetOldSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PagePointIndex) ret = RetrievePointPage(); if (idx == PageLineIndex) ret = RetrieveLinePage(); if (idx == PagePolygonIndex) ret = RetrievePolygonPage(); if (idx == PageTextPointIndex) ret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) ret = RetrieveTextLinePage(); } if (ret != true) event.Veto(); } void QuickStyleVectorDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // int idx = event.GetSelection(); if (idx == 0) UpdateMainPage(); else { if (idx == PagePointIndex) UpdatePointPage(); if (idx == PageLineIndex) UpdateLinePage(); if (idx == PagePolygonIndex) UpdatePolygonPage(); if (idx == PageTextPointIndex) UpdateTextPointPage(); if (idx == PageTextLineIndex) UpdateTextLinePage(); } } bool QuickStyleVectorDialog::UpdateStyle() { // // updating the QuickStyle // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PagePointIndex) ret = RetrievePointPage(); if (idx == PageLineIndex) ret = RetrieveLinePage(); if (idx == PagePolygonIndex) ret = RetrievePolygonPage(); if (idx == PageTextPointIndex) ret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) ret = RetrieveTextLinePage(); } if (ret == false) return false; VectorLayerConfig *config = Layer->GetVectorConfig(); bool setCurrentStyle = false; if (config->GetStyle() == NULL) setCurrentStyle = true; else { if (strcmp(Style->GetUUID(), config->GetStyle()) != 0) setCurrentStyle = true; } if (setCurrentStyle == true) { config->SetStyle(Style->GetUUID()); IsConfigChanged = true; } IsConfigChanged = Layer->UpdateQuickStyle(Style); return true; } void QuickStyleVectorDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // permanently saving the QuickStyle and quitting // if (UpdateStyle() == true) wxDialog::EndModal(wxID_OK); } void QuickStyleVectorDialog::OnApply(wxCommandEvent & WXUNUSED(event)) { // // applying the QuickStyle and continuing // if (UpdateStyle() == true) { if (IsConfigChanged == true) MapPanel->RefreshMap(); } } void QuickStyleVectorDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the Quick Style as an external file // bool xret = false; int ret; wxString path; wxString lastDir; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) xret = RetrieveMainPage(); else { if (idx == PagePointIndex) xret = RetrievePointPage(); if (idx == PageLineIndex) xret = RetrieveLinePage(); if (idx == PagePolygonIndex) xret = RetrievePolygonPage(); if (idx == PageTextPointIndex) xret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) xret = RetrieveTextLinePage(); } if (xret == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE QuickStyle to a file"), wxT(""), wxT("style.xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml = Style->CreateXmlStyle(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE QuickStyle successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } } void QuickStyleVectorDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the Quick Style into the Clipboard // bool ret = false; int idx = GetBookCtrl()->GetSelection(); if (idx == 0) ret = RetrieveMainPage(); else { if (idx == PagePointIndex) ret = RetrievePointPage(); if (idx == PageLineIndex) ret = RetrieveLinePage(); if (idx == PagePolygonIndex) ret = RetrievePolygonPage(); if (idx == PageTextPointIndex) ret = RetrieveTextPointPage(); if (idx == PageTextLineIndex) ret = RetrieveTextLinePage(); } if (ret == false) return; char *xml = Style->CreateXmlStyle(); wxString XMLstring = wxString::FromUTF8(xml); sqlite3_free(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void QuickStyleVectorDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } |
Changes to Raster.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 .... 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 .... 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 .... 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 |
/* / Raster.cpp / various dialog classes supporting Raster datasources / / version 1.8, 2015 March 10 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ wxT("NO-DATA Pixel"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *ndSizer = new wxStaticBoxSizer(ndBox, wxVERTICAL); ndBoxSizer->Add(ndSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *nodataSizer = new wxBoxSizer(wxHORIZONTAL); ndSizer->Add(nodataSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *nodataCtrl = new wxTextCtrl(this, ID_CVG_NODATA, wxT(""), wxDefaultPosition, wxSize(200, 22)); nodataSizer->Add(nodataCtrl, 0, wxALIGN_RIGHT | wxALL, 1); wxStaticText *nodataLabel = new wxStaticText(this, wxID_STATIC, wxT (" (list of comma-separated sample values) e.g.: ")); nodataSizer->Add(nodataLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxStaticText *nodata2Label = new wxStaticText(this, wxID_STATIC, wxT("255,255,255 ")); nodata2Label->SetForegroundColour(wxColour(255, 0, 0)); nodataSizer->Add(nodata2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // sixth row: other attributes wxBoxSizer *mixSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(mixSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // sixth row, column #1: Tile Size wxBoxSizer *tileBoxSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(tileBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *tileBox = new wxStaticBox(this, wxID_STATIC, ................................................................................ { // // checking a NO-DATA value // int count = 0; int error = 0; char dummy[128]; if (no_data.Len() == 0) return true; wxStringTokenizer tokenizer(no_data, wxT(",")); while (tokenizer.HasMoreTokens()) { count++; wxString token = tokenizer.GetNextToken(); if (sample == RL2_SAMPLE_FLOAT || sample == RL2_SAMPLE_DOUBLE) { ................................................................................ NumBands = bandsCtrl->GetValue(); if (PixelType == RL2_PIXEL_MULTIBAND && NumBands < 2) { wxMessageBox(wxT("Invalid number of Bands"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxRadioBox *pixelCtrl = (wxRadioBox *) FindWindow(ID_CVG_PIXEL); wxRadioBox *sampleCtrl = (wxRadioBox *) FindWindow(ID_CVG_SAMPLE); wxRadioBox *compressionCtrl = (wxRadioBox *) FindWindow(ID_CVG_COMPRESSION); wxSpinCtrl *bandCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_BANDS); if (PixelType == RL2_PIXEL_MULTIBAND) { if (RedBand >= 0) { if (RedBand >= NumBands) { wxMessageBox(wxT("Invalid default Red Band"), ................................................................................ // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); int count = 0; return true; } void RasterInfosDialog::CreateControls() { // // creating individual control and setting initial values |
| | | | > > > > > > > > > > > > > | > < < < < < |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 .... 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 .... 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 .... 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 |
/* / Raster.cpp / various dialog classes supporting Raster datasources / / version 1.8, 2015 March 10 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ wxT("NO-DATA Pixel"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *ndSizer = new wxStaticBoxSizer(ndBox, wxVERTICAL); ndBoxSizer->Add(ndSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *nodataSizer = new wxBoxSizer(wxHORIZONTAL); ndSizer->Add(nodataSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *nodataCtrl = new wxTextCtrl(this, ID_CVG_NODATA, wxT("NONE"), wxDefaultPosition, wxSize(200, 22)); nodataSizer->Add(nodataCtrl, 0, wxALIGN_RIGHT | wxALL, 1); wxStaticText *nodataLabel = new wxStaticText(this, wxID_STATIC, wxT (" (list of comma-separated values) e.g.: ")); nodataSizer->Add(nodataLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxStaticText *nodata2Label = new wxStaticText(this, wxID_STATIC, wxT("255,255,255")); nodata2Label->SetForegroundColour(wxColour(255, 0, 0)); nodataSizer->Add(nodata2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxStaticText *nodata3Label = new wxStaticText(this, wxID_STATIC, wxT(" or ")); nodataSizer->Add(nodata3Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxStaticText *nodata4Label = new wxStaticText(this, wxID_STATIC, wxT("NONE")); nodata4Label->SetForegroundColour(wxColour(255, 0, 0)); nodataSizer->Add(nodata4Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // sixth row: other attributes wxBoxSizer *mixSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(mixSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // sixth row, column #1: Tile Size wxBoxSizer *tileBoxSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(tileBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *tileBox = new wxStaticBox(this, wxID_STATIC, ................................................................................ { // // checking a NO-DATA value // int count = 0; int error = 0; char dummy[128]; if (no_data.CmpNoCase(wxT("NONE")) == 0) return true; if (no_data.Len() == 0) { wxMessageBox(wxT("You must specify some NO-DATA value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxStringTokenizer tokenizer(no_data, wxT(",")); while (tokenizer.HasMoreTokens()) { count++; wxString token = tokenizer.GetNextToken(); if (sample == RL2_SAMPLE_FLOAT || sample == RL2_SAMPLE_DOUBLE) { ................................................................................ NumBands = bandsCtrl->GetValue(); if (PixelType == RL2_PIXEL_MULTIBAND && NumBands < 2) { wxMessageBox(wxT("Invalid number of Bands"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (PixelType == RL2_PIXEL_MULTIBAND) { if (RedBand >= 0) { if (RedBand >= NumBands) { wxMessageBox(wxT("Invalid default Red Band"), ................................................................................ // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterInfosDialog::CreateControls() { // // creating individual control and setting initial values |
Changes to RasterSymbolizers.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 .... 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 .... 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 .... 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 .... 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 .... 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 .... 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 .... 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 |
/* / RasterSymbolizers.cpp / various dialog classes / / version 1.8, 2015 March 23 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ void RasterSymbolizerCategorizeDialog::RefreshGrid() { // // refreshing the Grid // int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); int count = 1; ColorMapEntry *pE = Map.GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); ................................................................................ void RasterSymbolizerInterpolateDialog::RefreshGrid() { // // refreshing the Grid // int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); int count = 0; ColorMapEntry *pE = Map.GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); ................................................................................ bool RasterSymbolizerMonochromeDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Color = wxT("#ff0000"); MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT("RasterSymbolizer: Recolored Monochrome")) == false) return false; // populates individual controls CreateControls(); ................................................................................ wxBoxSizer *remapBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(remapBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *remapBox = new wxStaticBox(this, wxID_STATIC, wxT("Black remapped Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *remapSizer = new wxStaticBoxSizer(remapBox, wxVERTICAL); remapBoxSizer->Add(remapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *colorSizer = new wxBoxSizer(wxHORIZONTAL); remapSizer->Add(colorSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_COLOR, Color, wxDefaultPosition, wxSize(100, 22)); colorSizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(44, 22), wxTE_READONLY); wxColour back = wxColour(255, 0, 0); sampleCtrl->SetBackgroundColour(back); colorSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); remapSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *pick = new wxButton(this, ID_SYMBOLIZER_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // sixth row: optional Visibility Range miscSizer->AddSpacer(75); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, ................................................................................ new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, ................................................................................ void RasterSymbolizerMonochromeDialog:: OnCmdColorChanged(wxCommandEvent & WXUNUSED(event)) { // // remapped color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void RasterSymbolizerMonochromeDialog:: OnCmdColorPicker(wxCommandEvent & WXUNUSED(event)) { ................................................................................ sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<Value>#ffffff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Color.ToUTF8()) + 1]; strcpy(str, Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t<Threshold>1</Threshold>\r\n\t\t\t\t\t<Value>%s</Value>\r\n", ................................................................................ ("%s\t<ColorMap>\r\n\t\t<Categorize fallbackValue=\"#ffffff\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Value>#ffffff</Value>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Color.ToUTF8()) + 1]; strcpy(str, Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t<Threshold>1</Threshold>\r\n\t\t\t<Value>%s</Value>\r\n", prev, |
| > | > | | | | | > > > | | | < < | < < | | > | > > | | | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 .... 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 .... 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 .... 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 .... 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 .... 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 .... 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 .... 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 |
/* / RasterSymbolizers.cpp / various dialog classes / / version 1.8, 2015 March 23 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ void RasterSymbolizerCategorizeDialog::RefreshGrid() { // // refreshing the Grid // int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); int count = 1; ColorMapEntry *pE = Map.GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); ................................................................................ void RasterSymbolizerInterpolateDialog::RefreshGrid() { // // refreshing the Grid // int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); int count = 0; ColorMapEntry *pE = Map.GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); ................................................................................ bool RasterSymbolizerMonochromeDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Color = wxT("#000000"); MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT("RasterSymbolizer: Recolored Monochrome")) == false) return false; // populates individual controls CreateControls(); ................................................................................ wxBoxSizer *remapBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(remapBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *remapBox = new wxStaticBox(this, wxID_STATIC, wxT("Black remapped Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *remapSizer = new wxStaticBoxSizer(remapBox, wxVERTICAL); remapBoxSizer->Add(remapSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *colorSizer = new wxBoxSizer(wxHORIZONTAL); remapSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_COLOR, Color, wxDefaultPosition, wxSize(100, 22)); colorSizer->Add(colorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap bmp; wxColour color(0, 0, 0); ColorMapEntry::DoPaintColorSample(32, 32, color, bmp); wxStaticBitmap *sampleCtrl = new wxStaticBitmap(this, ID_SYMBOLIZER_PICKER_HEX, bmp, wxDefaultPosition, wxSize(32, 32)); colorSizer->Add(sampleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pick = new wxButton(this, ID_SYMBOLIZER_PICKER_BTN, wxT("&Pick a color")); colorSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // sixth row: optional Visibility Range miscSizer->AddSpacer(75); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, ................................................................................ new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button; Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, ................................................................................ void RasterSymbolizerMonochromeDialog:: OnCmdColorChanged(wxCommandEvent & WXUNUSED(event)) { // // remapped color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); wxStaticBitmap *sampleCtrl = (wxStaticBitmap *) FindWindow(ID_SYMBOLIZER_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); wxBitmap bmp; ColorMapEntry::DoPaintColorSample(32, 32, back, bmp); sampleCtrl->SetBitmap(bmp); sampleCtrl->Refresh(); sampleCtrl->Update(); } void RasterSymbolizerMonochromeDialog:: OnCmdColorPicker(wxCommandEvent & WXUNUSED(event)) { ................................................................................ sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t<Value>#000000</Value>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Color.ToUTF8()) + 1]; strcpy(str, Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t<Threshold>1</Threshold>\r\n\t\t\t\t\t<Value>%s</Value>\r\n", ................................................................................ ("%s\t<ColorMap>\r\n\t\t<Categorize fallbackValue=\"#ffffff\">\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<LookupValue>Rasterdata</LookupValue>\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Value>#000000</Value>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Color.ToUTF8()) + 1]; strcpy(str, Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t<Threshold>1</Threshold>\r\n\t\t\t<Value>%s</Value>\r\n", prev, |
Changes to ResultSetView.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 513 514 515 516 517 518 519 520 521 522 523 524 525 526 ... 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 ... 816 817 818 819 820 821 822 823 824 825 826 827 828 829 ... 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 .... 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 .... 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 .... 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 |
/* / ResultSetView.cpp / a panel to show SQL query results / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ } params->Finalize(); params->SetEndRow(end_row); params->SetMaxRow(i_row); goto ok; error: params->SetError(); ok: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_RS_THREAD_FINISHED); params->GetMother()->GetEventHandler()->AddPendingEvent(event); #if defined(_WIN32) && !defined(__MINGW32__) return 0; #else ................................................................................ TileDataDbPrefix = tile_data_db_prefix; TileDataTable = tile_data_table; } char *xSql = NULL; char err_msg[2048]; int i_row; clock_t clock_start; sqlite3_stmt *stmt; sqlite3 *sqlite = MainFrame->GetSqlite(); SqlErrorMsg = wxT(""); if (TableView) TableView->Destroy(); TableView = NULL; if (TableBlobs) delete TableBlobs; ................................................................................ ::wxEndBusyCursor(); sqlite3_finalize(stmt); delete[]xSql; return false; } } sqlite3_finalize(stmt); } delete[]xSql; CreateStatsGrid(); MainFrame->DisableAllTools(); ThreadParams.Initialize(this, sql, stmt, from, sqlite, clock_start); if (!ProgressTimer) ................................................................................ // if (ReadOnly == false) { // preparing the insert row int numCols = 0; wxString *colNames = MainFrame->GetColumnNames(TableName, &numCols); CreateGrid(0, numCols + 1); if (isView == false); TableView->SetColLabelValue(0, wxT("ROWID")); for (i_col = 0; i_col < numCols; i_col++) TableView->SetColLabelValue(i_col + 1, *(colNames + i_col)); TableView->EnableEditing(true); delete[]colNames; } else { // simply showing a warning message ................................................................................ gaiaGuessBlobType(value->GetBlob(), value->GetBlobSize()); switch (type) { case GAIA_GEOMETRY_BLOB: blobType = wxT("GEOMETRY"); break; case GAIA_GPB_BLOB: blobType = wxT("GeoPackageGEOMETRY"); break; case GAIA_XML_BLOB: blobType = wxT("XmlBLOB"); break; case GAIA_JPEG_BLOB: ................................................................................ menu.Append(menuItem); menu.AppendSeparator(); } } menuItem = new wxMenuItem(&menu, Grid_Blob, wxT("BLOB &explore")); menu.Append(menuItem); blob_type = gaiaGuessBlobType(blobVar->GetBlob(), blobVar->GetBlobSize()); if (blob_type == GAIA_GEOMETRY_BLOB) ; else if (blob_type == GAIA_XML_BLOB) { menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Grid_XmlBlobIn, wxT("XmlBLOB &import")); menu.Append(menuItem); ................................................................................ blobValue += wxT("TIFF image"); break; case GAIA_WEBP_BLOB: blobValue += wxT("WEBP image"); break; case GAIA_JP2_BLOB: blobValue += wxT("JP2 image (Jpeg2000)"); case GAIA_PDF_BLOB: blobValue += wxT("PDF document"); break; case GAIA_ZIP_BLOB: blobValue += wxT("ZIP archive"); break; default: |
| > | > | | > > > | > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 ... 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 ... 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 ... 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 .... 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 .... 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 .... 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 |
/* / ResultSetView.cpp / a panel to show SQL query results / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ } params->Finalize(); params->SetEndRow(end_row); params->SetMaxRow(i_row); goto ok; error: params->Finalize(); params->SetError(); ok: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_RS_THREAD_FINISHED); params->GetMother()->GetEventHandler()->AddPendingEvent(event); #if defined(_WIN32) && !defined(__MINGW32__) return 0; #else ................................................................................ TileDataDbPrefix = tile_data_db_prefix; TileDataTable = tile_data_table; } char *xSql = NULL; char err_msg[2048]; int i_row; clock_t clock_start; sqlite3_stmt *stmt = NULL; sqlite3 *sqlite = MainFrame->GetSqlite(); SqlErrorMsg = wxT(""); if (TableView) TableView->Destroy(); TableView = NULL; if (TableBlobs) delete TableBlobs; ................................................................................ ::wxEndBusyCursor(); sqlite3_finalize(stmt); delete[]xSql; return false; } } sqlite3_finalize(stmt); stmt = NULL; } delete[]xSql; CreateStatsGrid(); MainFrame->DisableAllTools(); ThreadParams.Initialize(this, sql, stmt, from, sqlite, clock_start); if (!ProgressTimer) ................................................................................ // if (ReadOnly == false) { // preparing the insert row int numCols = 0; wxString *colNames = MainFrame->GetColumnNames(TableName, &numCols); CreateGrid(0, numCols + 1); if (isView == false) TableView->SetColLabelValue(0, wxT("ROWID")); for (i_col = 0; i_col < numCols; i_col++) TableView->SetColLabelValue(i_col + 1, *(colNames + i_col)); TableView->EnableEditing(true); delete[]colNames; } else { // simply showing a warning message ................................................................................ gaiaGuessBlobType(value->GetBlob(), value->GetBlobSize()); switch (type) { case GAIA_GEOMETRY_BLOB: blobType = wxT("GEOMETRY"); break; case GAIA_TINYPOINT_BLOB: blobType = wxT("TinyPoint"); break; case GAIA_GPB_BLOB: blobType = wxT("GeoPackageGEOMETRY"); break; case GAIA_XML_BLOB: blobType = wxT("XmlBLOB"); break; case GAIA_JPEG_BLOB: ................................................................................ menu.Append(menuItem); menu.AppendSeparator(); } } menuItem = new wxMenuItem(&menu, Grid_Blob, wxT("BLOB &explore")); menu.Append(menuItem); blob_type = gaiaGuessBlobType(blobVar->GetBlob(), blobVar->GetBlobSize()); if (blob_type == GAIA_GEOMETRY_BLOB || blob_type == GAIA_TINYPOINT_BLOB || blob_type == GAIA_GPB_BLOB) ; else if (blob_type == GAIA_XML_BLOB) { menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Grid_XmlBlobIn, wxT("XmlBLOB &import")); menu.Append(menuItem); ................................................................................ blobValue += wxT("TIFF image"); break; case GAIA_WEBP_BLOB: blobValue += wxT("WEBP image"); break; case GAIA_JP2_BLOB: blobValue += wxT("JP2 image (Jpeg2000)"); break; case GAIA_PDF_BLOB: blobValue += wxT("PDF document"); break; case GAIA_ZIP_BLOB: blobValue += wxT("ZIP archive"); break; default: |
Changes to Shapefiles.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ Shapefiles.cpp
/ methods related to Shapefile loading and saving
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a-furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ Shapefiles.cpp
/ methods related to Shapefile loading and saving
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
Changes to SqlFiltersComposer.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 .. 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
/* / SqlFiltersComposer.cpp / Sql Filters Composer / / version 2.0, 2016 August 9 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2016 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "Classdef.h" void MyFrame::SqlFiltersComposer() { // // query/view composer invoked // char *xsql; int ret; char *errMsg = NULL; SqlFiltersDialog dlg; if (SqlFilters.IsValid() == false) return; wxString db_prefix = SqlFilters.GetDbPrefix(); wxString table = SqlFilters.GetTableName(); ................................................................................ int primaryKeys[1024]; int blobCols[1024]; int pk = 0; int pb = 0; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; char *xsql; char *column; char *type; char *xname; char *xname2; for (i = 0; i < 1024; i++) { primaryKeys[i] = -1; |
| < < < > < < |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 26 27 28 29 30 31 32 33 34 35 36 37 38 39 .. 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
/* / SqlFiltersComposer.cpp / Sql Filters Composer / / version 2.0, 2016 August 9 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2016 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "Classdef.h" void MyFrame::SqlFiltersComposer() { // // query/view composer invoked // SqlFiltersDialog dlg; if (SqlFilters.IsValid() == false) return; wxString db_prefix = SqlFilters.GetDbPrefix(); wxString table = SqlFilters.GetTableName(); ................................................................................ int primaryKeys[1024]; int blobCols[1024]; int pk = 0; int pb = 0; char **results; int rows; int columns; char *xsql; int i; char *errMsg = NULL; wxString sql; char *type; char *xname; char *xname2; for (i = 0; i < 1024; i++) { primaryKeys[i] = -1; |
Changes to Styles.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 .... 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 .... 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 .... 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 .... 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 .... 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 .... 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 |
/* / Styles.cpp / various dialog classes / / version 1.8, 2015 March 13 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ if (dlg.ShowModal() == wxID_OK) { // attempting to register the new styles DoRegistetRasterCoverageStyles(&dlg); // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterCoverageStyles(CoverageName); int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS) { ................................................................................ if (dlg.ShowModal() == wxID_OK) { // attempting to register the new styles DoRegistetVectorCoverageStyles(&dlg); // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorCoverageStyles(CoverageName); int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS) { ................................................................................ // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); int count = 0; return true; } void VectorInfosDialog::CreateControls() { // // creating individual control and setting initial values ................................................................................ } // attempting to register the alternative SRID if (DoRegistetVectorCoverageSrid(srid) == true) { // updating the Grid GridCtrl->Show(false); int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorAlternativeSRIDs(CoverageName); int count = 0; VectorCoverageSRID *pS = List->GetFirst(); while (pS) { ................................................................................ return; } // attempting to register the Keyword if (DoRegistetVectorCoverageKeyword(keyword) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorKeywords(CoverageName); int count = 0; VectorCoverageKeyword *pK = List->GetFirst(); while (pK) { ................................................................................ } // attempting to register the alternative SRID if (DoRegistetRasterCoverageSrid(srid) == true) { // updating the Grid GridCtrl->Show(false); int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterAlternativeSRIDs(CoverageName); int count = 0; RasterCoverageSRID *pS = List->GetFirst(); while (pS) { ................................................................................ return; } // attempting to register the Keyword if (DoRegistetRasterCoverageKeyword(keyword) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterKeywords(CoverageName); int count = 0; RasterCoverageKeyword *pK = List->GetFirst(); while (pK) { |
| > | > | < > | > | > | > | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 .... 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 .... 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 .... 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 .... 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 .... 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 .... 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 |
/* / Styles.cpp / various dialog classes / / version 1.8, 2015 March 13 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ if (dlg.ShowModal() == wxID_OK) { // attempting to register the new styles DoRegistetRasterCoverageStyles(&dlg); // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterCoverageStyles(CoverageName); int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS) { ................................................................................ if (dlg.ShowModal() == wxID_OK) { // attempting to register the new styles DoRegistetVectorCoverageStyles(&dlg); // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorCoverageStyles(CoverageName); int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS) { ................................................................................ // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VectorInfosDialog::CreateControls() { // // creating individual control and setting initial values ................................................................................ } // attempting to register the alternative SRID if (DoRegistetVectorCoverageSrid(srid) == true) { // updating the Grid GridCtrl->Show(false); int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorAlternativeSRIDs(CoverageName); int count = 0; VectorCoverageSRID *pS = List->GetFirst(); while (pS) { ................................................................................ return; } // attempting to register the Keyword if (DoRegistetVectorCoverageKeyword(keyword) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorKeywords(CoverageName); int count = 0; VectorCoverageKeyword *pK = List->GetFirst(); while (pK) { ................................................................................ } // attempting to register the alternative SRID if (DoRegistetRasterCoverageSrid(srid) == true) { // updating the Grid GridCtrl->Show(false); int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterAlternativeSRIDs(CoverageName); int count = 0; RasterCoverageSRID *pS = List->GetFirst(); while (pS) { ................................................................................ return; } // attempting to register the Keyword if (DoRegistetRasterCoverageKeyword(keyword) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); if (tot_rows > 0) GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterKeywords(CoverageName); int count = 0; RasterCoverageKeyword *pK = List->GetFirst(); while (pK) { |
Changes to TableTree.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 77 78 79 80 81 82 83 84 85 86 87 88 89 90 ... 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 ... 158 159 160 161 162 163 164 165 166 167 168 169 170 171 ... 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 ... 432 433 434 435 436 437 438 439 440 441 442 443 444 445 ... 452 453 454 455 456 457 458 459 460 461 462 463 464 465 ... 478 479 480 481 482 483 484 485 486 487 488 489 490 491 ... 512 513 514 515 516 517 518 519 520 521 522 523 524 525 ... 549 550 551 552 553 554 555 556 557 558 559 560 561 562 ... 634 635 636 637 638 639 640 641 642 643 644 645 646 647 ... 862 863 864 865 866 867 868 869 870 871 872 873 874 875 .... 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 .... 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 .... 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 .... 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 .... 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 .... 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 .... 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 .... 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 .... 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 .... 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 .... 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 .... 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 .... 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 .... 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 .... 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 .... 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 .... 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 .... 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 .... 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 .... 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 .... 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 ..... 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 |
/* / TableTree.cpp / tree control to show tables, columns, indices and triggers / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "icons/coverage_tiles.xpm" #include "icons/vector.xpm" #include "icons/linestrings_on.xpm" #include "icons/points_on.xpm" #include "icons/polygons_on.xpm" #include "icons/clone.xpm" #include "icons/wms.xpm" MyTableTree::MyTableTree(MyFrame * parent, wxWindowID id):wxTreeCtrl(parent, id) { // // constructor: TREE control to show DB objects // MainFrame = parent; ................................................................................ SetItemData(RootRasterCoverages, (wxTreeItemData *) (new MyObject(MY_ROOT_RASTER))); RootVectorCoverages = AppendItem(Root, wxT("Vector Coverages")); SetItemData(RootVectorCoverages, (wxTreeItemData *) (new MyObject(MY_ROOT_VECTOR))); RootWMS = AppendItem(Root, wxT("Registered WMS layers")); SetItemData(RootWMS, (wxTreeItemData *) (new MyObject(MY_ROOT_WMS))); RootMetadata = AppendItem(Root, wxT("Metadata")); SetItemData(RootMetadata, (wxTreeItemData *) (new MyObject(MY_ROOT_METADATA))); RootInternal = AppendItem(Root, wxT("Internal Data")); SetItemData(RootInternal, (wxTreeItemData *) (new MyObject(MY_ROOT_INTERNAL))); RootSpatialIndex = AppendItem(Root, wxT("Spatial Index")); SetItemData(RootSpatialIndex, (wxTreeItemData *) (new MyObject(MY_ROOT_RTREE))); // setting up icons Images = new wxImageList(16, 16, true); wxIcon icons[36]; icons[0] = wxIcon(db_xpm); icons[1] = wxIcon(table_xpm); icons[2] = wxIcon(pkey_xpm); icons[3] = wxIcon(column_xpm); icons[4] = wxIcon(index_xpm); icons[5] = wxIcon(trigger_xpm); icons[6] = wxIcon(geometry_xpm); ................................................................................ icons[29] = wxIcon(polygons_on_xpm); icons[30] = wxIcon(gpkgvtable_xpm); icons[31] = wxIcon(gpkgtable_xpm); icons[32] = wxIcon(gpkggeom_xpm); icons[33] = wxIcon(virtshp_xpm); icons[34] = wxIcon(virtgpkg_xpm); icons[35] = wxIcon(gpkg_spatialidx_xpm); Images->Add(icons[0]); Images->Add(icons[1]); Images->Add(icons[2]); Images->Add(icons[3]); Images->Add(icons[4]); Images->Add(icons[5]); Images->Add(icons[6]); ................................................................................ Images->Add(icons[29]); Images->Add(icons[30]); Images->Add(icons[31]); Images->Add(icons[32]); Images->Add(icons[33]); Images->Add(icons[34]); Images->Add(icons[35]); SetImageList(Images); SetItemImage(Root, 0); SetItemImage(RootUserData, 17); SetItemImage(RootTopologies, 20); SetItemImage(RootNetworks, 25); SetItemImage(RootRasterCoverages, 22); SetItemImage(RootVectorCoverages, 24); SetItemImage(RootWMS, 26); SetItemImage(RootStyling, 17); SetItemImage(RootIsoMetadata, 17); SetItemImage(RootMetadata, 17); SetItemImage(RootInternal, 17); SetItemImage(RootSpatialIndex, 17); wxString empty = wxEmptyString; ................................................................................ (wxObjectEventFunction) & MyTableTree::OnCmdCreateTopoGeo); Connect(Tree_DropTopoGeo, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDropTopoGeo); Connect(Tree_CreateTopoNet, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCreateTopoNet); Connect(Tree_DropTopoNet, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDropTopoNet); } MyTableTree::~MyTableTree() { delete Images; } ................................................................................ DeleteChildren(RootUserData); DeleteTopologies(RootTopologies); DeleteNetworks(RootNetworks); DeleteRasterCoverages(RootRasterCoverages); DeleteVectorCoverages(RootVectorCoverages); DeleteChildren(RootStyling); DeleteChildren(RootWMS); DeleteChildren(RootIsoMetadata); DeleteChildren(RootMetadata); DeleteChildren(RootInternal); DeleteChildren(RootSpatialIndex); while (ok) { ok = false; ................................................................................ if (child == RootRasterCoverages) kill = false; if (child == RootVectorCoverages) kill = false; if (child == RootStyling) kill = false; if (child == RootWMS) kill = false; if (child == RootIsoMetadata) kill = false; if (child == RootMetadata) kill = false; if (child == RootInternal) kill = false; ................................................................................ return; switch (obj->GetType()) { case MY_TABLE: case MY_VTABLE: case MY_TILE_DATA: case MY_VIEW: DeleteChildren(item); AppendItem(item, wxT("placeholder"), 0); break; }; event.Skip(); } ................................................................................ case MY_VIEW: DeleteChildren(item); if (obj->GetDbAlias().Len() == 0) ExpandView(item); else ExpandAttachedView(item); EnsureVisible(item); return; }; event.Skip(); } void MyTableTree::DeleteTopologies(wxTreeItemId & RootTopologies) { ................................................................................ if (tableName == wxT("vector_layers")) return RootMetadata; if (tableName == wxT("topologies")) return RootMetadata; if (tableName == wxT("networks")) return RootMetadata; if (tableName == wxT("data_licenses")) return RootMetadata; if (tableName == wxT("wms_getcapabilities")) return RootMetadata; if (tableName == wxT("wms_getmap")) return RootMetadata; if (tableName == wxT("wms_settings")) ................................................................................ if (tableName == wxT("vector_layers")) return nodes->GetRootMetadata(); if (tableName == wxT("topologies")) return nodes->GetRootMetadata(); if (tableName == wxT("networks")) return nodes->GetRootMetadata(); if (tableName == wxT("data_licenses")) return nodes->GetRootMetadata(); if (tableName == wxT("gpkg_spatial_ref_sys")) return nodes->GetRootMetadata(); if (tableName == wxT("gpkg_contents")) return nodes->GetRootMetadata(); if (tableName == wxT("gpkg_geometry_columns")) ................................................................................ else if (isTileData == true) data = (wxTreeItemData *) (new MyObject(MY_TILE_DATA, dbAlias, tableName)); else data = (wxTreeItemData *) (new MyObject(MY_TABLE, dbAlias, tableName)); item = AppendItem(rootNode, tableName, icon, -1, data); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::AddGeoPackageTable(wxString & tableName) { // // appends a GPKG table to the TREE list // wxTreeItemId item; ................................................................................ SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, empty, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::AddView(wxString & viewName, bool geometry) { // // appends a view to the TREE list // wxTreeItemId item; ................................................................................ SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, empty, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry, RootNodes * nodes) { // // appends a table to the TREE list [ATTACHED DB] // wxTreeItemId item; wxTreeItemId item2; wxTreeItemData *data; bool isCoverage = false; bool isTileData = false; bool isTopology = false; int icon = 1; if (virtualTable == true) icon = 8; if (geometry == true) { if (virtualTable == false) icon = 10; ................................................................................ // // selecting some node [mouse action] // wxTreeItemId item = event.GetItem(); if (item == Root || item == RootUserData || item == RootTopologies || item == RootNetworks || item == RootRasterCoverages || item == RootVectorCoverages || item == RootStyling || item == RootWMS || item == RootIsoMetadata || item == RootMetadata || item == RootInternal || item == RootSpatialIndex) return; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; CurrentItem = item; } ................................................................................ menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatisticsAll, wxT("Update Layer &Statistics")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoRootOthersContextMenu(wxPoint & pt, MyObject * obj) { // MAIN: OTHER ROOT NODES context menu wxMenuItem *menuItem; CurrentItem = wxTreeItemId(); wxString title; ................................................................................ wxString title = wxT("FK FIELD: ") + obj->GetDbAlias() + wxT("."); title += obj->GetMainName() + wxT(".") + obj->GetColName(); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::OnRightClick(wxTreeEvent & event) { // // right click on some node [mouse action] Context Menu // wxMenuItem *menuItem; if (MainFrame->IsConnected() == false) return; bool metadata = MainFrame->CheckMetadata(); wxTreeItemId item = event.GetItem(); SelectItem(item); wxPoint pt = event.GetPoint(); ................................................................................ } if (item == RootStyling) { // ROOT STYLING DoRootStylingContextMenu(pt); return; } MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; if (item == Root || item == RootUserData || item == RootIsoMetadata || item == RootMetadata || item == RootInternal || item == RootSpatialIndex) ................................................................................ return; } if (obj->IsRootAttached()) { // ATTACHED ROOT items DoRootAttachedContextMenu(pt, obj); return; } // special cases: TOPO-GEO and TOPO-NET objects if (obj->GetType() == MY_TOPO_GEO || obj->GetType() == MY_TOPO_NET) { if (obj->IsAttached() == true) { wxString title; ................................................................................ wxString sql; wxString dummy; char *xname; char *xname2; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; sql = wxT("SELECT * FROM \""); if (obj->IsAttached() == true) { wxString dbAlias2 = obj->GetDbAlias(); MyFrame::DoubleQuoted(dbAlias2); sql += dbAlias2 + wxT("\".\""); } ................................................................................ xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("'"); } if (sql.Len() < 1) return; MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } ................................................................................ else sql += wxT("sqlite_master"); sql += wxT("\nWHERE type = 'view' AND name = '"); xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("'"); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } } ................................................................................ char *xname; char *xname2; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { sql = wxT("SELECT Count(*), GeometryType(\""); xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\"), Srid(\""); xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\"), CoordDimension(\""); xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\")\nFROM \""); xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\"\nGROUP BY 2, 3, 4"); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); ................................................................................ if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIRTUAL_COLUMN || obj->GetType() == MY_VIRTUAL_GEOMETRY) { sql = wxT("SELECT Min(MbrMinX(\""); xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\")), Min(MbrMinY(\""); xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\")), Max(MbrMaxX(\""); xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\")), Max(MbrMaxY(\""); xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\"))\nFROM \""); xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2) + wxT("\""); free(xname2); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } ................................................................................ // // menu event - dumping as Shapefile // int ret; wxString path; wxString lastDir; bool isView = false; int metadata_type = MainFrame->GetMetaDataType(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED) isView = true; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || isView == true) { wxFileDialog fileDialog(this, wxT("Dump Shapefile"), wxT(""), wxT("shapefile.shp"), wxT ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); ................................................................................ *x_type = '\0'; wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); strcpy(x_path, path.ToUTF8()); strcpy(x_table, obj->GetMainName().ToUTF8()); strcpy(x_column, obj->GetColName().ToUTF8()); if (isView == true) { wxString sql; char *xsql; if (metadata_type == METADATA_CURRENT) sql = wxT("SELECT geometry_type FROM views_geometry_columns AS a "); else if (metadata_type == METADATA_LEGACY) ................................................................................ wxMessageBox(wxT("dump shp error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { // asking the charset to be used DumpShpDialog dlg; dlg.Create(MainFrame, path, obj->GetMainName(), obj->GetColName(), MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); strcpy(x_charset, dlg.GetCharset().ToUTF8()); rt = ................................................................................ // menu event - dumping as KML // int ret; wxString path; wxString lastDir; bool isView = false; bool isVirtual = false; bool isNameConst = false; bool isDescConst = false; wxString Name; wxString Desc; int precision = -1; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED) isView = true; if (obj->GetType() == MY_VIRTUAL_GEOMETRY) isVirtual = true; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || isView == true || isVirtual == true) { DumpKmlDialog dlg; dlg.Create(MainFrame, obj->GetMainName(), obj->GetColName()); ret = dlg.ShowModal(); if (ret == wxID_OK) { isNameConst = dlg.IsNameConst(); Name = dlg.GetName(); isDescConst = dlg.IsDescConst(); Desc = dlg.GetDesc(); ................................................................................ path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".kml"); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpKml(path, obj->GetMainName(), obj->GetColName(), precision, Name, isNameConst, Desc, isDescConst); ::wxEndBusyCursor(); } } } void MyTableTree::OnCmdDumpTxtTab(wxCommandEvent & WXUNUSED(event)) { ................................................................................ int ret; char err_msg[2048]; sqlite3_stmt *stmt; double minx = DBL_MAX; double miny = DBL_MAX; double maxx = DBL_MAX; double maxy = DBL_MAX; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; ::wxBeginBusyCursor(); table_name = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(table_name, obj->GetMainName().ToUTF8()); column_name = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(column_name, obj->GetColName().ToUTF8()); table_name2 = gaiaDoubleQuotedSql(table_name); column_name2 = gaiaDoubleQuotedSql(column_name); free(table_name); free(column_name); sprintf(sql, "SELECT Min(MbrMinX(\"%s\")), Min(MbrMinY(\"%s\")), ", column_name2, column_name2); sprintf(sql2, "Max(MbrMaxX(\"%s\")), Max(MbrMaxY(\"%s\")) ", column_name2, ................................................................................ { wxMessageBox(wxT("This Column doesn't contains any Geometry: sorry ..."), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } MapPreviewDialog dlg; dlg.Create(MainFrame, obj->GetMainName(), obj->GetColName(), minx, miny, maxx, maxy); dlg.ShowModal(); } void MyTableTree::OnCmdColumnStats(wxCommandEvent & WXUNUSED(event)) { // // menu event - column stats ................................................................................ char *type; int pk = 0; int pb = 0; int primaryKeys[1024]; int blobCols[1024]; char *xname; char *xname2; bool isView; for (i = 0; i < 1024; i++) { primaryKeys[i] = -1; blobCols[i] = -1; } primaryKeys[pk++] = 0; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; isView = MainFrame->IsView(obj->GetMainName()); sql = wxT("PRAGMA table_info(\""); xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); ................................................................................ return; err: ::wxEndBusyCursor(); wxMessageBox(wxT("Error: unable to remove Topology-Network '") + obj->GetMainName() + wxT("'"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } sqlite3 *MyTableTree::GetSQLiteHandle() { return MainFrame->GetSqlite(); } |
| > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > | | > < < < < < < < < < < > > > > > > | | > | > > > > > > > | | > < < < < < < < < < < < < < < < > > > > > > | | > > > > | > > > > > > | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > | | > > > | > > > | > > > > | | > > > > > > > > > > > | | | | > > > > > | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .. 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 ... 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 ... 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 ... 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 ... 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 ... 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 ... 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 ... 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 ... 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 ... 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 ... 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 .... 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 .... 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 .... 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 .... 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 .... 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 .... 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 .... 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 .... 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 .... 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 .... 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 .... 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 .... 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 .... 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 .... 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 .... 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 .... 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 .... 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 .... 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 .... 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 .... 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 .... 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 ..... 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 |
/* / TableTree.cpp / tree control to show tables, columns, indices and triggers / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ #include "icons/coverage_tiles.xpm" #include "icons/vector.xpm" #include "icons/linestrings_on.xpm" #include "icons/points_on.xpm" #include "icons/polygons_on.xpm" #include "icons/clone.xpm" #include "icons/wms.xpm" #include "icons/postgres.xpm" #include "icons/postgres_schema.xpm" #include "icons/postgres_table.xpm" #include "icons/postgres_view.xpm" MyTableTree::MyTableTree(MyFrame * parent, wxWindowID id):wxTreeCtrl(parent, id) { // // constructor: TREE control to show DB objects // MainFrame = parent; ................................................................................ SetItemData(RootRasterCoverages, (wxTreeItemData *) (new MyObject(MY_ROOT_RASTER))); RootVectorCoverages = AppendItem(Root, wxT("Vector Coverages")); SetItemData(RootVectorCoverages, (wxTreeItemData *) (new MyObject(MY_ROOT_VECTOR))); RootWMS = AppendItem(Root, wxT("Registered WMS layers")); SetItemData(RootWMS, (wxTreeItemData *) (new MyObject(MY_ROOT_WMS))); RootPostgreSQL = AppendItem(Root, wxT("PostgreSQL")); SetItemData(RootPostgreSQL, (wxTreeItemData *) (new MyObject(MY_ROOT_POSTGRESQL))); RootMetadata = AppendItem(Root, wxT("Metadata")); SetItemData(RootMetadata, (wxTreeItemData *) (new MyObject(MY_ROOT_METADATA))); RootInternal = AppendItem(Root, wxT("Internal Data")); SetItemData(RootInternal, (wxTreeItemData *) (new MyObject(MY_ROOT_INTERNAL))); RootSpatialIndex = AppendItem(Root, wxT("Spatial Index")); SetItemData(RootSpatialIndex, (wxTreeItemData *) (new MyObject(MY_ROOT_RTREE))); // setting up icons Images = new wxImageList(16, 16, true); wxIcon icons[40]; icons[0] = wxIcon(db_xpm); icons[1] = wxIcon(table_xpm); icons[2] = wxIcon(pkey_xpm); icons[3] = wxIcon(column_xpm); icons[4] = wxIcon(index_xpm); icons[5] = wxIcon(trigger_xpm); icons[6] = wxIcon(geometry_xpm); ................................................................................ icons[29] = wxIcon(polygons_on_xpm); icons[30] = wxIcon(gpkgvtable_xpm); icons[31] = wxIcon(gpkgtable_xpm); icons[32] = wxIcon(gpkggeom_xpm); icons[33] = wxIcon(virtshp_xpm); icons[34] = wxIcon(virtgpkg_xpm); icons[35] = wxIcon(gpkg_spatialidx_xpm); icons[36] = wxIcon(postgres_xpm); icons[37] = wxIcon(postgres_schema_xpm); icons[38] = wxIcon(postgres_table_xpm); icons[39] = wxIcon(postgres_view_xpm); Images->Add(icons[0]); Images->Add(icons[1]); Images->Add(icons[2]); Images->Add(icons[3]); Images->Add(icons[4]); Images->Add(icons[5]); Images->Add(icons[6]); ................................................................................ Images->Add(icons[29]); Images->Add(icons[30]); Images->Add(icons[31]); Images->Add(icons[32]); Images->Add(icons[33]); Images->Add(icons[34]); Images->Add(icons[35]); Images->Add(icons[36]); Images->Add(icons[37]); Images->Add(icons[38]); Images->Add(icons[39]); SetImageList(Images); SetItemImage(Root, 0); SetItemImage(RootUserData, 17); SetItemImage(RootTopologies, 20); SetItemImage(RootNetworks, 25); SetItemImage(RootRasterCoverages, 22); SetItemImage(RootVectorCoverages, 24); SetItemImage(RootWMS, 26); SetItemImage(RootPostgreSQL, 36); SetItemImage(RootStyling, 17); SetItemImage(RootIsoMetadata, 17); SetItemImage(RootMetadata, 17); SetItemImage(RootInternal, 17); SetItemImage(RootSpatialIndex, 17); wxString empty = wxEmptyString; ................................................................................ (wxObjectEventFunction) & MyTableTree::OnCmdCreateTopoGeo); Connect(Tree_DropTopoGeo, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDropTopoGeo); Connect(Tree_CreateTopoNet, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCreateTopoNet); Connect(Tree_DropTopoNet, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDropTopoNet); Connect(Tree_CreatePostgreSqlConn, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCreatePostgreSqlConn); Connect(Tree_CloseAllPostgreSqlConns, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCloseAllPostgreSqlConns); Connect(Tree_ClosePostgreSqlConn, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdClosePostgreSqlConn); Connect(Tree_PostgreSqlInfos, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdPostgreSqlInfos); Connect(Tree_PostgreSqlDropOrphans, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdPostgreSqlDropOrphans); } MyTableTree::~MyTableTree() { delete Images; } ................................................................................ DeleteChildren(RootUserData); DeleteTopologies(RootTopologies); DeleteNetworks(RootNetworks); DeleteRasterCoverages(RootRasterCoverages); DeleteVectorCoverages(RootVectorCoverages); DeleteChildren(RootStyling); DeleteChildren(RootWMS); DeleteChildren(RootPostgreSQL); DeleteChildren(RootIsoMetadata); DeleteChildren(RootMetadata); DeleteChildren(RootInternal); DeleteChildren(RootSpatialIndex); while (ok) { ok = false; ................................................................................ if (child == RootRasterCoverages) kill = false; if (child == RootVectorCoverages) kill = false; if (child == RootStyling) kill = false; if (child == RootWMS) kill = false; if (child == RootPostgreSQL) kill = false; if (child == RootIsoMetadata) kill = false; if (child == RootMetadata) kill = false; if (child == RootInternal) kill = false; ................................................................................ return; switch (obj->GetType()) { case MY_TABLE: case MY_VTABLE: case MY_TILE_DATA: case MY_VIEW: case MY_POSTGRES_TABLE: case MY_POSTGRES_VIEW: case MY_POSTGIS_VIEW: DeleteChildren(item); AppendItem(item, wxT("placeholder"), 0); break; }; event.Skip(); } ................................................................................ case MY_VIEW: DeleteChildren(item); if (obj->GetDbAlias().Len() == 0) ExpandView(item); else ExpandAttachedView(item); EnsureVisible(item); return; case MY_POSTGRES_TABLE: case MY_POSTGRES_VIEW: DeleteChildren(item); ExpandPostgresTable(item); EnsureVisible(item); return; case MY_POSTGIS_VIEW: DeleteChildren(item); ExpandPostGisView(item); EnsureVisible(item); return; }; event.Skip(); } void MyTableTree::DeleteTopologies(wxTreeItemId & RootTopologies) { ................................................................................ if (tableName == wxT("vector_layers")) return RootMetadata; if (tableName == wxT("topologies")) return RootMetadata; if (tableName == wxT("networks")) return RootMetadata; if (tableName == wxT("data_licenses")) return RootMetadata; if (tableName == wxT("stored_procedures")) return RootMetadata; if (tableName == wxT("stored_variables")) return RootMetadata; if (tableName == wxT("wms_getcapabilities")) return RootMetadata; if (tableName == wxT("wms_getmap")) return RootMetadata; if (tableName == wxT("wms_settings")) ................................................................................ if (tableName == wxT("vector_layers")) return nodes->GetRootMetadata(); if (tableName == wxT("topologies")) return nodes->GetRootMetadata(); if (tableName == wxT("networks")) return nodes->GetRootMetadata(); if (tableName == wxT("data_licenses")) return nodes->GetRootMetadata(); if (tableName == wxT("stored_procedures")) return nodes->GetRootMetadata(); if (tableName == wxT("stored_variables")) return nodes->GetRootMetadata(); if (tableName == wxT("gpkg_spatial_ref_sys")) return nodes->GetRootMetadata(); if (tableName == wxT("gpkg_contents")) return nodes->GetRootMetadata(); if (tableName == wxT("gpkg_geometry_columns")) ................................................................................ else if (isTileData == true) data = (wxTreeItemData *) (new MyObject(MY_TILE_DATA, dbAlias, tableName)); else data = (wxTreeItemData *) (new MyObject(MY_TABLE, dbAlias, tableName)); item = AppendItem(rootNode, tableName, icon, -1, data); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::AddTmpMetadata(wxString & name) { // adding some TEMPORARY Metadata table wxTreeItemId item; wxString dbAlias = wxT("temp"); wxTreeItemData *data = (wxTreeItemData *) (new MyObject(MY_TABLE, dbAlias, name, true)); item = AppendItem(RootMetadata, name, 1, -1, data); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::AddGeoPackageTable(wxString & tableName) { // // appends a GPKG table to the TREE list // wxTreeItemId item; ................................................................................ SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, empty, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::ExpandPostgresTable(wxTreeItemId & item) { // // expands a TreeItem of the POSTGRES TABLE type // MyTableInfo list; MyColumnInfo *col; wxString columnInfo; wxTreeItemId item2; MyPostgresTable *table = NULL; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; wxString tableName = obj->GetVirtName(); if (obj->GetType() == MY_POSTGRES_TABLE) table = MainFrame->FindPostgresTable(tableName); MainFrame->GetTableColumns(tableName, &list); wxString empty = wxEmptyString; col = list.GetFirstColumn(); while (col) { int icon = 3; columnInfo = col->GetName(); if (table != NULL) { // checking for a PK column if (table->IsPkColumn(columnInfo) == true) icon = 2; } item2 = AppendItem(item, columnInfo, icon); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_POSTGRES_COLUMN, empty, empty, -1, empty, empty, empty, empty, columnInfo, tableName))); col = col->GetNext(); } } void MyTableTree::AddPostgresConnection(int num, MyPostgresConn * conn, wxTreeItemId & connId) { // // appends a PostgreSQL Connection to the TREE list // wxTreeItemId item; wxTreeItemData *data; int icon = 36; data = (wxTreeItemData *) (new MyObject(MY_POSTGRES_CONN, conn->GetHost(), conn->GetHostAddr(), conn->GetPort(), conn->GetDbName(), conn->GetUser(), conn->IsReadOnly())); char dummy[128]; sprintf(dummy, "connection #%d", num); item = AppendItem(RootPostgreSQL, wxString::FromUTF8(dummy), icon, -1, data); connId = item; } void MyTableTree::AddPostgresSchema(wxTreeItemId & parent, MyPostgresConn * conn, wxString & schema, wxTreeItemId & item) { // // appends a PostgreSQL Schema to the TREE list // wxTreeItemData *data; int icon = 37; data = (wxTreeItemData *) (new MyObject(MY_POSTGRES_SCHEMA, conn->GetHost(), conn->GetHostAddr(), conn->GetPort(), conn->GetDbName(), conn->GetUser(), schema)); item = AppendItem(parent, schema, icon, -1, data); } void MyTableTree::AddPostgresTable(MyPostgres * list, wxString & virtName) { // // appends a PostgreSQL Table or View to the TREE list // int icon; int type = -1; MyPostgresConn *conn; wxTreeItemId parent; wxString schema; wxString table; bool readOnly; bool hasPK; bool canSelect; bool canInsertUpdateDelete; MyPostgresConn *pC = list->GetFirst(); while (pC != NULL) { readOnly = pC->IsReadOnly(); MyPostgresSchema *pS = pC->GetFirst(); while (pS != NULL) { MyPostgresTable *pT = pS->GetFirstTable(); while (pT != NULL) { if (pT->GetFirst() != NULL) { if (virtName.Cmp(pT->GetPostGisName()) == 0) { conn = pC; parent = pS->GetTreeNode(); icon = 12; type = MY_POSTGIS_VIEW; schema = pS->GetName(); table = pT->GetName(); hasPK = pT->HasPK(); canSelect = pT->CanSelect(); canInsertUpdateDelete = pT->CanInsertUpdateDelete(); goto done; } } if (virtName.Cmp(pT->GetVirtName()) == 0) { MainFrame->InitPostgresPkColumns(pC, pS, pT); conn = pC; parent = pS->GetTreeNode(); icon = 38; type = MY_POSTGRES_TABLE; schema = pS->GetName(); table = pT->GetName(); hasPK = pT->HasPK(); canSelect = pT->CanSelect(); canInsertUpdateDelete = pT->CanInsertUpdateDelete(); goto done; } pT = pT->GetNext(); } MyPostgresView *pV = pS->GetFirstView(); while (pV != NULL) { if (virtName.Cmp(pV->GetVirtName()) == 0) { conn = pC; parent = pS->GetTreeNode(); icon = 39; type = MY_POSTGRES_VIEW; schema = pS->GetName(); table = pV->GetName(); hasPK = false; canSelect = pV->CanSelect(); canInsertUpdateDelete = pV->CanInsertUpdateDelete(); goto done; } pV = pV->GetNext(); } pS = pS->GetNext(); } pC = pC->GetNext(); } done: if (type == -1) return; // adding the TREE node wxTreeItemId item; wxTreeItemData *data; if (type == MY_POSTGIS_VIEW) data = (wxTreeItemData *) (new MyObject(type, conn->GetHost(), conn->GetHostAddr(), conn->GetPort(), conn->GetDbName(), conn->GetUser(), schema, table, virtName, readOnly, hasPK, canSelect, canInsertUpdateDelete)); else data = (wxTreeItemData *) (new MyObject(type, conn->GetHost(), conn->GetHostAddr(), conn->GetPort(), conn->GetDbName(), conn->GetUser(), schema, table, virtName, readOnly, hasPK, canSelect, canInsertUpdateDelete)); item = AppendItem(parent, virtName, icon, -1, data); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::AddView(wxString & viewName, bool geometry) { // // appends a view to the TREE list // wxTreeItemId item; ................................................................................ SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, empty, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::ExpandPostGisView(wxTreeItemId & item) { // // expands a TreeItem of the PostGIS View Type (SpatiaLite wrapper) // MyViewInfo list; MyColumnInfo *col; MyTriggerInfo *trgr; wxString columnInfo; wxTreeItemId item2; wxString empty = wxEmptyString; MyPostgresTable *table = NULL; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; wxString viewName = obj->GetVirtName(); table = MainFrame->FindPostGisView(viewName); MainFrame->GetViewColumns(viewName, &list); MainFrame->GetViewTriggers(viewName, &list); col = list.GetFirst(); while (col) { int icon = 3; columnInfo = col->GetName(); if (MainFrame->DoCheckPostGisGeometry(viewName, columnInfo) == true) { icon = 6; item2 = AppendItem(item, columnInfo, icon); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_POSTGIS_GEOMETRY, empty, empty, -1, empty, empty, empty, empty, columnInfo, viewName))); } else { if (table != NULL) { // checking for a PK column if (table->IsPkColumn(columnInfo) == true) icon = 2; } item2 = AppendItem(item, columnInfo, icon); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_POSTGRES_COLUMN, empty, empty, -1, empty, empty, empty, empty, columnInfo, viewName))); } col = col->GetNext(); } trgr = list.GetFirstTrigger(); while (trgr) { // setting up Triggers wxString triggerInfo = trgr->GetName(); item2 = AppendItem(item, triggerInfo, 5); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, empty, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry, RootNodes * nodes) { // // appends a table to the TREE list [ATTACHED DB] // wxTreeItemId item; wxTreeItemId item2; wxTreeItemData *data; bool isTileData = false; int icon = 1; if (virtualTable == true) icon = 8; if (geometry == true) { if (virtualTable == false) icon = 10; ................................................................................ // // selecting some node [mouse action] // wxTreeItemId item = event.GetItem(); if (item == Root || item == RootUserData || item == RootTopologies || item == RootNetworks || item == RootRasterCoverages || item == RootVectorCoverages || item == RootStyling || item == RootWMS || item == RootPostgreSQL || item == RootIsoMetadata || item == RootMetadata || item == RootInternal || item == RootSpatialIndex) return; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; CurrentItem = item; } ................................................................................ menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatisticsAll, wxT("Update Layer &Statistics")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoRootPostgreSqlContextMenu(wxPoint & pt) { // MAIN: ROOT POTGRESQL context menu wxMenuItem *menuItem; CurrentItem = wxTreeItemId(); wxMenu menu(wxT("PostgreSQL")); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CreatePostgreSqlConn, wxT("Connect to a PostgreSQL &DBMS")); menu.Append(menuItem); if (MainFrame->HasPostgreSqlConnections() == true) { menuItem = new wxMenuItem(&menu, Tree_CloseAllPostgreSqlConns, wxT("Close all connections to &PostgreSQL")); menu.Append(menuItem); } menuItem = new wxMenuItem(&menu, Tree_PostgreSqlDropOrphans, wxT("Drop all PostgreSQL &Orphans")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoRootOthersContextMenu(wxPoint & pt, MyObject * obj) { // MAIN: OTHER ROOT NODES context menu wxMenuItem *menuItem; CurrentItem = wxTreeItemId(); wxString title; ................................................................................ wxString title = wxT("FK FIELD: ") + obj->GetDbAlias() + wxT("."); title += obj->GetMainName() + wxT(".") + obj->GetColName(); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoPostgreSqlContextMenu(wxPoint & pt, MyObject * obj) { // PostgreSQL objects: context menu dispatcher switch (obj->GetType()) { case MY_POSTGRES_CONN: DoPostgresConnContextMenu(pt, obj); break; case MY_POSTGRES_SCHEMA: DoPostgresSchemaContextMenu(pt, obj); break; case MY_POSTGRES_TABLE: DoPostgresTableContextMenu(pt, obj); break; case MY_POSTGRES_VIEW: DoPostgresViewContextMenu(pt, obj); break; case MY_POSTGIS_VIEW: DoPostGisViewContextMenu(pt, obj); break; case MY_POSTGRES_COLUMN: DoPostgresColumnContextMenu(pt, obj); break; case MY_POSTGIS_GEOMETRY: DoPostGisGeometryContextMenu(pt, obj); break; }; } void MyTableTree::DoPostgresConnContextMenu(wxPoint & pt, MyObject * obj) { // POSTGRES CONNECTION NODES context menu wxMenuItem *menuItem; wxString title = wxT("PostgreSQL Connection"); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ClosePostgreSqlConn, wxT("Close this connection to PostgreSQL")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_PostgreSqlInfos, wxT("&Infos")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoPostgresSchemaContextMenu(wxPoint & pt, MyObject * obj) { // POSTGRES SCHEMA NODES context menu wxMenuItem *menuItem; wxString title = wxT("PostgreSQL Schema"); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_PostgreSqlInfos, wxT("&Infos")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoPostgresTableContextMenu(wxPoint & pt, MyObject * obj) { // POSTGRES TABLE NODES context menu wxMenuItem *menuItem; wxString title = wxT("PostgreSQL Table: ") + obj->GetVirtName(); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); if (obj->IsReadOnly() == false && obj->HasPK() == true && obj->CanInsertUpdateDelete() == true) { menuItem = new wxMenuItem(&menu, Tree_Edit, wxT("&Edit table rows")); menu.Append(menuItem); } else if (obj->CanSelect() == true) { menuItem = new wxMenuItem(&menu, Tree_Select, wxT("&Query table")); menu.Append(menuItem); } menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show columns")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_ShowSql, wxT("&Show CREATE statement")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_PostgreSqlInfos, wxT("PostgreSQL &Infos")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoPostgresViewContextMenu(wxPoint & pt, MyObject * obj) { // POSTGRES VIEW NODES context menu wxMenuItem *menuItem; wxString title = wxT("PostgreSQL View: ") + obj->GetVirtName(); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); if (obj->CanSelect() == true) { menuItem = new wxMenuItem(&menu, Tree_Select, wxT("&Query View")); menu.Append(menuItem); } menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show columns")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_ShowSql, wxT("&Show CREATE statement")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_PostgreSqlInfos, wxT("PostgreSQL &Infos")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoPostGisViewContextMenu(wxPoint & pt, MyObject * obj) { // POSTGIS VIEW NODES context menu wxMenuItem *menuItem; wxString title = wxT("PostGIS-to-SpatiaLite wrapper: ") + obj->GetVirtName(); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); if (obj->IsReadOnly() == false && obj->HasPK() == true && obj->CanInsertUpdateDelete() == true) { menuItem = new wxMenuItem(&menu, Tree_Edit, wxT("&Edit table rows")); menu.Append(menuItem); } else if (obj->CanSelect() == true) { menuItem = new wxMenuItem(&menu, Tree_Select, wxT("&Query table")); menu.Append(menuItem); } menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show columns")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_ShowSql, wxT("&Show CREATE statement")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_PostgreSqlInfos, wxT("PostgreSQL &Infos")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoPostgresColumnContextMenu(wxPoint & pt, MyObject * obj) { // POSTGRESQL COLUMN NODES context menu wxMenuItem *menuItem; wxString title = wxT("PostgreSQL Column: ") + obj->GetVirtName() + wxT(".") + obj->GetColumn(); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::DoPostGisGeometryContextMenu(wxPoint & pt, MyObject * obj) { // POSTGIS GEOMETRY COLUMN NODES context menu wxMenuItem *menuItem; wxString title = wxT("PostGIS Geometry: ") + obj->GetVirtName() + wxT(".") + obj->GetColumn(); wxMenu menu(title); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CheckGeometry, wxT("&Check geometries")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Extent, wxT("&Extent")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_DumpShp, wxT("Export as &Shapefile")); menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpKml, wxT("Export as &KML")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); PopupMenu(&menu, pt); } void MyTableTree::OnRightClick(wxTreeEvent & event) { // // right click on some node [mouse action] Context Menu // if (MainFrame->IsConnected() == false) return; bool metadata = MainFrame->CheckMetadata(); wxTreeItemId item = event.GetItem(); SelectItem(item); wxPoint pt = event.GetPoint(); ................................................................................ } if (item == RootStyling) { // ROOT STYLING DoRootStylingContextMenu(pt); return; } if (item == RootPostgreSQL) { // ROOT POSTGRESQL DoRootPostgreSqlContextMenu(pt); return; } MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; if (item == Root || item == RootUserData || item == RootIsoMetadata || item == RootMetadata || item == RootInternal || item == RootSpatialIndex) ................................................................................ return; } if (obj->IsRootAttached()) { // ATTACHED ROOT items DoRootAttachedContextMenu(pt, obj); return; } // special cases: PostgreSQL objects if (obj->IsPostgreSQL() == true) { DoPostgreSqlContextMenu(pt, obj); return; } // special cases: TOPO-GEO and TOPO-NET objects if (obj->GetType() == MY_TOPO_GEO || obj->GetType() == MY_TOPO_NET) { if (obj->IsAttached() == true) { wxString title; ................................................................................ wxString sql; wxString dummy; char *xname; char *xname2; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_POSTGRES_TABLE || obj->GetType() == MY_POSTGRES_VIEW || obj->GetType() == MY_POSTGIS_VIEW) { // special case: PostgreSQL objects bool hasGeom = false; wxString viewName; if (obj->GetType() == MY_POSTGRES_TABLE) { MyPostgresTable *table = MainFrame->FindPostgresTable(obj->GetVirtName()); if (table->GetFirst() != NULL) hasGeom = true; viewName = table->GetPostGisName(); } if (hasGeom == true) { int ret = wxMessageBox(wxT ("Directly querying a PostgreSQL table containing PostGIS geometries " "is a strongly discouraged operation.\n\n" "You should instead query the corresponding Spatial View: ") + viewName + wxT("\n\n") + wxT("Do you really intend to continue ?"), wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret != wxYES) return; } sql = wxT("SELECT * FROM \""); xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\""); wxString prefix = wxT("MAIN"); wxString noGeom; MainFrame->InitializeSqlFilters(prefix, obj->GetVirtName(), true, noGeom); MainFrame->SetSql(sql, true, false, dummy, dummy, true); MainFrame->GetQueryView()->EnableFilterButton(); return; } sql = wxT("SELECT * FROM \""); if (obj->IsAttached() == true) { wxString dbAlias2 = obj->GetDbAlias(); MyFrame::DoubleQuoted(dbAlias2); sql += dbAlias2 + wxT("\".\""); } ................................................................................ xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("'"); } if (obj->GetType() == MY_POSTGRES_TABLE || obj->GetType() == MY_POSTGRES_VIEW || obj->GetType() == MY_POSTGIS_VIEW) { sql = wxT("PRAGMA table_info(\""); xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\")"); } if (sql.Len() < 1) return; MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } ................................................................................ else sql += wxT("sqlite_master"); sql += wxT("\nWHERE type = 'view' AND name = '"); xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("'"); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } if (obj->GetType() == MY_POSTGRES_TABLE || obj->GetType() == MY_POSTGRES_VIEW) { sql = wxT("SELECT sql FROM "); sql += wxT("sqlite_master"); sql += wxT("\nWHERE type = 'table' AND name = '"); xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("'"); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } if (obj->GetType() == MY_POSTGIS_VIEW) { sql = wxT("SELECT sql FROM "); sql += wxT("sqlite_master"); sql += wxT("\nWHERE type = 'view' AND name = '"); xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); xname2 = gaiaSingleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("'"); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } } ................................................................................ char *xname; char *xname2; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || obj->GetType() == MY_POSTGIS_GEOMETRY) { sql = wxT("SELECT Count(*), GeometryType(\""); if (obj->GetType() == MY_POSTGIS_GEOMETRY) { xname = (char *) malloc((obj->GetColumn().Len() * 4) + 1); strcpy(xname, obj->GetColumn().ToUTF8()); } else { xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); } xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); sql += wxT("\"), Srid(\""); sql += wxString::FromUTF8(xname2); sql += wxT("\"), CoordDimension(\""); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\")\nFROM \""); if (obj->GetType() == MY_POSTGIS_GEOMETRY) { xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); } else { xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); } xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\"\nGROUP BY 2, 3, 4"); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); ................................................................................ if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIRTUAL_COLUMN || obj->GetType() == MY_VIRTUAL_GEOMETRY || obj->GetType() == MY_POSTGIS_GEOMETRY) { sql = wxT("SELECT Min(MbrMinX(\""); if (obj->GetType() == MY_POSTGIS_GEOMETRY) { xname = (char *) malloc((obj->GetColumn().Len() * 4) + 1); strcpy(xname, obj->GetColumn().ToUTF8()); } else { xname = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(xname, obj->GetColName().ToUTF8()); } xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); sql += wxT("\")), Min(MbrMinY(\""); sql += wxString::FromUTF8(xname2); sql += wxT("\")), Max(MbrMaxX(\""); sql += wxString::FromUTF8(xname2); sql += wxT("\")), Max(MbrMaxY(\""); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\"))\nFROM \""); if (obj->GetType() == MY_POSTGIS_GEOMETRY) { xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); } else { xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); } xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2) + wxT("\""); free(xname2); MainFrame->GetRsView()->ResetEmpty(); MainFrame->SetSql(sql, true); } ................................................................................ // // menu event - dumping as Shapefile // int ret; wxString path; wxString lastDir; bool isView = false; bool isPostGIS = false; int metadata_type = MainFrame->GetMetaDataType(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_POSTGIS_GEOMETRY) isPostGIS = true; if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED) isView = true; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || isView == true || isPostGIS) { wxFileDialog fileDialog(this, wxT("Dump Shapefile"), wxT(""), wxT("shapefile.shp"), wxT ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); ................................................................................ *x_type = '\0'; wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); strcpy(x_path, path.ToUTF8()); if (isPostGIS == true) { strcpy(x_table, obj->GetVirtName().ToUTF8()); strcpy(x_column, obj->GetColumn().ToUTF8()); } else { strcpy(x_table, obj->GetMainName().ToUTF8()); strcpy(x_column, obj->GetColName().ToUTF8()); } if (isPostGIS == true) { char *geom = (char *) malloc(obj->GetColumn().Len() * 4 + 1); strcpy(geom, obj->GetColumn().ToUTF8()); char *xgeom = gaiaDoubleQuotedSql(geom); free(geom); char *view = (char *) malloc(obj->GetVirtName().Len() * 4 + 1); strcpy(view, obj->GetVirtName().ToUTF8()); char *xview = gaiaDoubleQuotedSql(view); free(view); char *sql = sqlite3_mprintf("SELECT GeometryType(\"%s\") " "FROM \"%s\" GROUP BY 1", xgeom, xview); free(xgeom); free(xview); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("dump shapefile error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) strcpy(x_type, results[(i * columns) + 0]); } sqlite3_free_table(results); if (strcmp(x_type, "MULTILINESTRING") == 0) strcpy(x_type, "LINESTRING"); if (strcmp(x_type, "MULTIPOLYGON") == 0) strcpy(x_type, "POLYGON"); } else if (isView == true) { wxString sql; char *xsql; if (metadata_type == METADATA_CURRENT) sql = wxT("SELECT geometry_type FROM views_geometry_columns AS a "); else if (metadata_type == METADATA_LEGACY) ................................................................................ wxMessageBox(wxT("dump shp error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { // asking the charset to be used DumpShpDialog dlg; if (isPostGIS == true) dlg.Create(MainFrame, path, obj->GetVirtName(), obj->GetColumn(), MainFrame->GetDefaultCharset()); else dlg.Create(MainFrame, path, obj->GetMainName(), obj->GetColName(), MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); strcpy(x_charset, dlg.GetCharset().ToUTF8()); rt = ................................................................................ // menu event - dumping as KML // int ret; wxString path; wxString lastDir; bool isView = false; bool isVirtual = false; bool isPostGIS = false; bool isNameConst = false; bool isDescConst = false; wxString Name; wxString Desc; int precision = -1; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_POSTGIS_GEOMETRY) isPostGIS = true; if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED) isView = true; if (obj->GetType() == MY_VIRTUAL_GEOMETRY) isVirtual = true; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || isView == true || isVirtual == true || isPostGIS == true) { DumpKmlDialog dlg; if (isPostGIS == true) dlg.Create(MainFrame, obj->GetVirtName(), obj->GetColumn()); else dlg.Create(MainFrame, obj->GetMainName(), obj->GetColName()); ret = dlg.ShowModal(); if (ret == wxID_OK) { isNameConst = dlg.IsNameConst(); Name = dlg.GetName(); isDescConst = dlg.IsDescConst(); Desc = dlg.GetDesc(); ................................................................................ path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".kml"); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); if (isPostGIS == true) MainFrame->DumpKml(path, obj->GetVirtName(), obj->GetColumn(), precision, Name, isNameConst, Desc, isDescConst); else MainFrame->DumpKml(path, obj->GetMainName(), obj->GetColName(), precision, Name, isNameConst, Desc, isDescConst); ::wxEndBusyCursor(); } } } void MyTableTree::OnCmdDumpTxtTab(wxCommandEvent & WXUNUSED(event)) { ................................................................................ int ret; char err_msg[2048]; sqlite3_stmt *stmt; double minx = DBL_MAX; double miny = DBL_MAX; double maxx = DBL_MAX; double maxy = DBL_MAX; bool isPostGIS = false; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_POSTGIS_GEOMETRY) isPostGIS = true; ::wxBeginBusyCursor(); if (isPostGIS == true) { table_name = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(table_name, obj->GetVirtName().ToUTF8()); column_name = (char *) malloc((obj->GetColumn().Len() * 4) + 1); strcpy(column_name, obj->GetColumn().ToUTF8()); } else { table_name = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(table_name, obj->GetMainName().ToUTF8()); column_name = (char *) malloc((obj->GetColName().Len() * 4) + 1); strcpy(column_name, obj->GetColName().ToUTF8()); } table_name2 = gaiaDoubleQuotedSql(table_name); column_name2 = gaiaDoubleQuotedSql(column_name); free(table_name); free(column_name); sprintf(sql, "SELECT Min(MbrMinX(\"%s\")), Min(MbrMinY(\"%s\")), ", column_name2, column_name2); sprintf(sql2, "Max(MbrMaxX(\"%s\")), Max(MbrMaxY(\"%s\")) ", column_name2, ................................................................................ { wxMessageBox(wxT("This Column doesn't contains any Geometry: sorry ..."), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } MapPreviewDialog dlg; if (isPostGIS == true) dlg.Create(MainFrame, obj->GetVirtName(), obj->GetColumn(), minx, miny, maxx, maxy); else dlg.Create(MainFrame, obj->GetMainName(), obj->GetColName(), minx, miny, maxx, maxy); dlg.ShowModal(); } void MyTableTree::OnCmdColumnStats(wxCommandEvent & WXUNUSED(event)) { // // menu event - column stats ................................................................................ char *type; int pk = 0; int pb = 0; int primaryKeys[1024]; int blobCols[1024]; char *xname; char *xname2; bool isView = false; for (i = 0; i < 1024; i++) { primaryKeys[i] = -1; blobCols[i] = -1; } primaryKeys[pk++] = 0; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_POSTGRES_TABLE || obj->GetType() == MY_POSTGIS_VIEW) { // special case: PostgreSQL table bool hasGeom = false; wxString viewName; if (obj->GetType() == MY_POSTGRES_TABLE) { MyPostgresTable *table = MainFrame->FindPostgresTable(obj->GetVirtName()); if (table->GetFirst() != NULL) hasGeom = true; viewName = table->GetPostGisName(); } if (hasGeom == true) { int ret = wxMessageBox(wxT ("Directly editing a PostgreSQL table containing PostGIS geometries " "is a strongly discouraged operation.\n\n" "You should instead edit the corresponding Spatial View: ") + viewName + wxT("\n\n") + wxT("Do you really intend to continue ?"), wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret != wxYES) return; } sql = wxT("PRAGMA table_info(\""); xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); sql += wxT("\")"); xsql = (char *) malloc((sql.Len() * 4) + 1); strcpy(xsql, sql.ToUTF8()); int ret = sqlite3_get_table(MainFrame->GetSqlite(), xsql, &results, &rows, &columns, &errMsg); free(xsql); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { sql = wxT("SELECT ROWID, "); for (i = 1; i <= rows; i++) { column = results[(i * columns) + 1]; sql += wxT("\""); xname = (char *) malloc(strlen(column) + 1); strcpy(xname, column); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); sql += wxT("\""); free(xname2); type = results[(i * columns) + 2]; if (i < rows) sql += wxT(", "); } } sqlite3_free_table(results); if (sql.Len() < 1) return; sql += wxT("\nFROM \""); xname = (char *) malloc((obj->GetVirtName().Len() * 4) + 1); strcpy(xname, obj->GetVirtName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); free(xname2); if (isView != true) sql += wxT("\"\nORDER BY ROWID"); else sql += wxT("\""); wxString prefix = wxT("MAIN"); wxString noGeom; MainFrame->InitializeSqlFilters(prefix, obj->GetVirtName(), false, noGeom); MainFrame->EditTable(sql, primaryKeys, blobCols, obj->GetVirtName()); return; } isView = MainFrame->IsView(obj->GetMainName()); sql = wxT("PRAGMA table_info(\""); xname = (char *) malloc((obj->GetMainName().Len() * 4) + 1); strcpy(xname, obj->GetMainName().ToUTF8()); xname2 = gaiaDoubleQuotedSql(xname); free(xname); sql += wxString::FromUTF8(xname2); ................................................................................ return; err: ::wxEndBusyCursor(); wxMessageBox(wxT("Error: unable to remove Topology-Network '") + obj->GetMainName() + wxT("'"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyTableTree::OnCmdCreatePostgreSqlConn(wxCommandEvent & WXUNUSED(event)) { // // menu event - creating a new connection to a PostgreSQL DBMS // MainFrame->DoPostgreSqlConnection(); } void MyTableTree::OnCmdCloseAllPostgreSqlConns(wxCommandEvent & WXUNUSED(event)) { // // menu event - closing all connections to PostgreSQL // ::wxBeginBusyCursor(); MainFrame->AutoPostgresStop(); ::wxEndBusyCursor(); wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } void MyTableTree::OnCmdClosePostgreSqlConn(wxCommandEvent & WXUNUSED(event)) { // // menu event - closing a connection to PostgreSQL // MyObject *obj = (MyObject *) GetItemData(CurrentItem); ::wxBeginBusyCursor(); bool ret = MainFrame->DoClosePostgreSqlConn(obj->GetHost(), obj->GetHostAddr(), obj->GetPort(), obj->GetDbName(), obj->GetUser()); ::wxEndBusyCursor(); if (ret == true) { wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } } void MyTableTree::OnCmdPostgreSqlDropOrphans(wxCommandEvent & WXUNUSED(event)) { // // menu event - Dropping all PostgreSQL orphans // bool refresh = false; int ret; char *errMsg = NULL; ::wxBeginBusyCursor(); char *sql = MainFrame->DropPostgreSqlOrphans(); if (sql != NULL) { // exec ret = sqlite3_exec(MainFrame->GetSqlite(), sql, NULL, 0, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("DropPostgresOrphans: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } refresh = true; } ::wxEndBusyCursor(); if (refresh == true) { wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } } void MyTableTree::OnCmdPostgreSqlInfos(wxCommandEvent & WXUNUSED(event)) { // // menu event - Infos about some PostgreSQL object // char dummy[128]; wxString msg; MyPostgresTable *table; MyObject *obj = (MyObject *) GetItemData(CurrentItem); switch (obj->GetType()) { case MY_POSTGRES_CONN: msg = wxT("Connection to PostgreSQL\n\n"); msg += wxT("Host: ") + obj->GetHost() + wxT("\n"); msg += wxT("HostAddr: ") + obj->GetHostAddr() + wxT("\n"); sprintf(dummy, "%d", obj->GetPort()); msg += wxT("Port: ") + wxString::FromUTF8(dummy) + wxT("\n"); msg += wxT("DbName: ") + obj->GetDbName() + wxT("\n"); msg += wxT("User: ") + obj->GetUser() + wxT("\n\n"); if (obj->IsReadOnly() == true) msg += wxT("READ-ONLY Connection"); else msg += wxT("READ-WRITE Connection"); break; case MY_POSTGRES_SCHEMA: msg += wxT("Role: PostgreSQL Schema\n"); msg += wxT("PostgreSQL Name: ") + obj->GetSchema() + wxT("\n"); break; case MY_POSTGRES_TABLE: msg += wxT("Role: PostgreSQL Table\n"); msg += wxT("PostgreSQL Name: ") + obj->GetSchema() + wxT(".") + obj->GetName() + wxT("\n\n"); table = MainFrame->FindPostgresTable(obj->GetVirtName()); if (table != NULL) { MyPostGisGeometry *geom = table->GetFirst(); while (geom != NULL) { msg += wxT("PostGIS Geometry: ") + geom->GetName(); msg += wxT(" ") + geom->GetGeomType(); char dummy[64]; sprintf(dummy, "%d", geom->GetSrid()); wxString xSrid = wxString::FromUTF8(dummy); msg += wxT(" srid=") + xSrid; sprintf(dummy, "%d", geom->GetDims()); wxString xDims = wxString::FromUTF8(dummy); msg += wxT(" dims=") + xDims + wxT("\n"); geom = geom->GetNext(); } if (table->GetFirst() != NULL) msg += wxT("\n"); } if (obj->HasPK() == true) msg += wxT("Primary Key: YES\n"); else msg += wxT("Primary Key: NO\n"); if (obj->CanSelect() == true) msg += wxT("Select permission: YES\n"); else msg += wxT("Select permission: NO\n"); if (obj->CanInsertUpdateDelete() == true) msg += wxT("Insert/Update/Delete permission: YES\n"); else msg += wxT("Insert/Update/Delete permission: NO\n"); wxT("\n"); if (obj->IsReadOnly() == true) msg += wxT("\nREAD-ONLY Connection"); else msg += wxT("\nREAD-WRITE Connection"); break; case MY_POSTGRES_VIEW: msg += wxT("Role: PostgreSQL View\n"); msg += wxT("PostgreSQL Name: ") + obj->GetSchema() + wxT(".") + obj->GetName() + wxT("\n\n"); if (obj->HasPK() == true) msg += wxT("Primary Key: YES\n"); else msg += wxT("Primary Key: NO\n"); if (obj->CanSelect() == true) msg += wxT("Select permission: YES\n"); else msg += wxT("Select permission: NO\n"); if (obj->CanInsertUpdateDelete() == true) msg += wxT("Insert/Update/Delete permission: YES\n"); else msg += wxT("Insert/Update/Delete permission: NO\n"); if (obj->IsReadOnly() == true) msg += wxT("\nREAD-ONLY Connection"); else msg += wxT("\nREAD-WRITE Connection"); break; case MY_POSTGIS_VIEW: msg += wxT("Role: PostGIS Table wrapper (Spatial View)\n"); msg += wxT("PostgreSQL Name: ") + obj->GetSchema() + wxT(".") + obj->GetName() + wxT("\n\n"); table = MainFrame->FindPostGisView(obj->GetVirtName()); if (table != NULL) { MyPostGisGeometry *geom = table->GetFirst(); while (geom != NULL) { msg += wxT("PostGIS Geometry: ") + geom->GetName(); msg += wxT(" ") + geom->GetGeomType(); char dummy[64]; sprintf(dummy, "%d", geom->GetSrid()); wxString xSrid = wxString::FromUTF8(dummy); msg += wxT(" srid=") + xSrid; sprintf(dummy, "%d", geom->GetDims()); wxString xDims = wxString::FromUTF8(dummy); msg += wxT(" dims=") + xDims + wxT("\n"); geom = geom->GetNext(); } if (table->GetFirst() != NULL) msg += wxT("\n"); } if (obj->HasPK() == true) msg += wxT("Primary Key: YES\n"); else msg += wxT("Primary Key: NO\n"); if (obj->CanSelect() == true) msg += wxT("Select permission: YES\n"); else msg += wxT("Select permission: NO\n"); if (obj->CanInsertUpdateDelete() == true) msg += wxT("Insert/Update/Delete permission: YES\n"); else msg += wxT("Insert/Update/Delete permission: NO\n"); if (obj->IsReadOnly() == true) msg += wxT("\nREAD-ONLY Connection"); else msg += wxT("\nREAD-WRITE Connection"); break; }; if (msg.Len() > 0) wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } sqlite3 *MyTableTree::GetSQLiteHandle() { return MainFrame->GetSqlite(); } |
Changes to TextCsv.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ TextCsv.cpp
/ methods related to CSV/TXT loading
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a-furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ TextCsv.cpp
/ methods related to CSV/TXT loading
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
Changes to VectorSymbolizers1.cpp.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
.....
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
|
/* / VectorSymbolizers1.cpp / various dialog classes / / version 1.8, 2015 March 28 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ xml = DoCreateSymbolizerXML(); bool ret = MainFrame->DoInsertVectorSymbolizer(xml); sqlite3_free(xml); if (ret == true) wxMessageBox(wxT ("SLD/SE VectorSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); wxDialog::EndModal(wxID_OK); } void SimplePolygonSymbolizerDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the VectorSymbolizer as an external file |
|
<
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
.....
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
|
/* / VectorSymbolizers1.cpp / various dialog classes / / version 1.8, 2015 March 28 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ xml = DoCreateSymbolizerXML(); bool ret = MainFrame->DoInsertVectorSymbolizer(xml); sqlite3_free(xml); if (ret == true) wxMessageBox(wxT ("SLD/SE VectorSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void SimplePolygonSymbolizerDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the VectorSymbolizer as an external file |
Changes to VectorSymbolizers2.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 .... 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 |
/* / VectorSymbolizers2.cpp / various dialog classes / / version 1.8, 2015 April 21 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FontFamily.ToUTF8()) + 1]; strcpy(str, FontFamily.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", ................................................................................ sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FontFamily.ToUTF8()) + 1]; strcpy(str, FontFamily.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", |
| > > > > > > > > > | > > > > > > > > > | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 .... 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 .... 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 |
/* / VectorSymbolizers2.cpp / various dialog classes / / version 1.8, 2015 April 21 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FontFamily.ToUTF8()) + 1]; strcpy(str, FontFamily.ToUTF8()); const char *font; if (strcmp(str, "ToyFont: serif") == 0) font = "serif"; else if (strcmp(str, "ToyFont: sans-serif") == 0) font = "sans serif"; else if (strcmp(str, "ToyFont: monospace") == 0) font = "monospace"; else font = str; xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, font); delete[]str; sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", ................................................................................ sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t<Font>\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FontFamily.ToUTF8()) + 1]; strcpy(str, FontFamily.ToUTF8()); const char *font; if (strcmp(str, "ToyFont: serif") == 0) font = "serif"; else if (strcmp(str, "ToyFont: sans-serif") == 0) font = "sans serif"; else if (strcmp(str, "ToyFont: monospace") == 0) font = "monospace"; else font = str; xml = sqlite3_mprintf ("%s\t\t<SvgParameter name=\"font-family\">%s</SvgParameter>\r\n", prev, font); delete[]str; sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t<SvgParameter name=\"font-style\">italic</SvgParameter>\r\n", |
Changes to Wfs.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ Wfs.cpp
/ WFS load data
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a-furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/*
/ Wfs.cpp
/ WFS load data
/
/ version 1.7, 2013 May 8
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2008-2013 Alessandro Furieri
/
/ This program is free software: you can redistribute it and/or modify
/ it under the terms of the GNU General Public License as published by
/ the Free Software Foundation, either version 3 of the License, or
/ (at your option) any later version.
|
Changes to WmsDialog.cpp.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 .... 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 .... 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 .... 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 .... 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 .... 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 .... 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 .... 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 |
/* / WmsDialog.cpp / various dialog classes supporting WMS datasources / / version 2.0, 2016 December 13 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2016 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ void WmsDialog::OnWmsServer(wxCommandEvent & WXUNUSED(event)) { // // searching a registered WMS server // WmsServersDialog dlg; dlg.Create(this, MainFrame); int ret = dlg.ShowModal(); if (ret == wxID_OK) { wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WMS_URL); urlCtrl->SetValue(dlg.GetURL()); } } ................................................................................ else HttpProxy = proxyCtrl->GetValue(); wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WMS_URL); URL = urlCtrl->GetValue(); wxDialog::EndModal(wxID_OK); } bool WmsServersDialog::Create(WmsDialog * parent, MyFrame * grandparent) { // // creating the dialog // MainFrame = grandparent; List = NULL; Count = 0; ................................................................................ // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); int count = 0; return true; } void WmsLayerInfosDialog::CreateControls() { // // creating individual control and setting initial values ................................................................................ wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } DoUpdateWmsLayer(); wxDialog::EndModal(wxID_OK); } bool WmsLayerConfigDialog::Create(MyFrame * parent, wxString url, wxString layer) { // // creating the dialog // ................................................................................ ("SELECT version, srs, format, style, is_queryable, flip_axes, " "is_cached, tiled, tile_width, tile_height, bgcolor, transparent " "FROM \"%s\".wms_getmap WHERE url = %Q AND layer_name = %Q", xdb_prefix, url, layer); free(url); free(layer); free(xdb_prefix); fprintf(stderr, "%s\n", sql); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) { Version = NULL; ................................................................................ } if (bgcolor == NULL) BgColor = NULL; else { if (strlen(bgcolor) == 6) { BgColor = (char *) malloc(6); memcpy(BgColor, bgcolor, 6); } else BgColor = NULL; } } sqlite3_free_table(results); } ................................................................................ // BgColor Enabled selection changed // wxBitmapButton *btn = (wxBitmapButton *) FindWindow(ID_WMS_BGCOLOR); if (BgColorEnabled == false) { if (BgColor != NULL) free(BgColor); BgColor = (char *) malloc(6); memcpy(BgColor, "ffffff", 6); wxBitmap bmp; GetButtonBitmap(BgColor, bmp); btn->SetBitmapLabel(bmp); BgColorEnabled = true; btn->Enable(true); } else { ................................................................................ char byte[3]; sprintf(byte, "%02x", color.Red()); memcpy(BgColor, byte, 2); sprintf(byte, "%02x", color.Green()); memcpy(BgColor + 2, byte, 2); sprintf(byte, "%02x", color.Blue()); memcpy(BgColor + 4, byte, 2); wxBitmap bmp; GetButtonBitmap(BgColor, bmp); wxBitmapButton *bgColorCtrl = (wxBitmapButton *) FindWindow(ID_WMS_BGCOLOR); bgColorCtrl->SetBitmapLabel(bmp); } } |
| | | < > > > > > > > > > > > > > > > > < | | | | > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 .... 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 .... 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 .... 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 .... 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 .... 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 .... 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 .... 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 |
/* / WmsDialog.cpp / various dialog classes supporting WMS datasources / / version 2.0, 2016 December 13 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2016 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. ................................................................................ void WmsDialog::OnWmsServer(wxCommandEvent & WXUNUSED(event)) { // // searching a registered WMS server // WmsServersDialog dlg; dlg.Create(MainFrame); int ret = dlg.ShowModal(); if (ret == wxID_OK) { wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WMS_URL); urlCtrl->SetValue(dlg.GetURL()); } } ................................................................................ else HttpProxy = proxyCtrl->GetValue(); wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WMS_URL); URL = urlCtrl->GetValue(); wxDialog::EndModal(wxID_OK); } bool WmsServersDialog::Create(MyFrame * grandparent) { // // creating the dialog // MainFrame = grandparent; List = NULL; Count = 0; ................................................................................ // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void WmsLayerInfosDialog::CreateControls() { // // creating individual control and setting initial values ................................................................................ wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } DoUpdateWmsLayer(); wxDialog::EndModal(wxID_OK); } WmsLayerConfigDialog::~WmsLayerConfigDialog() { if (Version != NULL) free(Version); if (MaxVersion != NULL) free(MaxVersion); if (RefSys != NULL) free(RefSys); if (Style != NULL) free(Style); if (ImageFormat != NULL) free(ImageFormat); if (BgColor != NULL) free(BgColor); } bool WmsLayerConfigDialog::Create(MyFrame * parent, wxString url, wxString layer) { // // creating the dialog // ................................................................................ ("SELECT version, srs, format, style, is_queryable, flip_axes, " "is_cached, tiled, tile_width, tile_height, bgcolor, transparent " "FROM \"%s\".wms_getmap WHERE url = %Q AND layer_name = %Q", xdb_prefix, url, layer); free(url); free(layer); free(xdb_prefix); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) { Version = NULL; ................................................................................ } if (bgcolor == NULL) BgColor = NULL; else { if (strlen(bgcolor) == 6) { BgColor = (char *) malloc(7); strcpy(BgColor, bgcolor); } else BgColor = NULL; } } sqlite3_free_table(results); } ................................................................................ // BgColor Enabled selection changed // wxBitmapButton *btn = (wxBitmapButton *) FindWindow(ID_WMS_BGCOLOR); if (BgColorEnabled == false) { if (BgColor != NULL) free(BgColor); BgColor = (char *) malloc(7); strcpy(BgColor, "ffffff"); wxBitmap bmp; GetButtonBitmap(BgColor, bmp); btn->SetBitmapLabel(bmp); BgColorEnabled = true; btn->Enable(true); } else { ................................................................................ char byte[3]; sprintf(byte, "%02x", color.Red()); memcpy(BgColor, byte, 2); sprintf(byte, "%02x", color.Green()); memcpy(BgColor + 2, byte, 2); sprintf(byte, "%02x", color.Blue()); memcpy(BgColor + 4, byte, 2); *(BgColor + 6) = '\0'; wxBitmap bmp; GetButtonBitmap(BgColor, bmp); wxBitmapButton *bgColorCtrl = (wxBitmapButton *) FindWindow(ID_WMS_BGCOLOR); bgColorCtrl->SetBitmapLabel(bmp); } } |
Changes to aclocal.m4.
1 2 3 4 5 6 7 8 9 10 .. 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ... 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 ... 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 ... 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 ... 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 ... 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 ... 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 ... 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 ... 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 ... 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 ... 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 ... 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 .... 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 .... 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 .... 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 .... 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 .... 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 .... 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 .... 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 .... 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 .... 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 .... 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 |
# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29.1) dnl dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. ................................................................................ _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- ................................................................................ # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies ................................................................................ m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to ................................................................................ [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- ................................................................................ fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be ................................................................................ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS ................................................................................ [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. ................................................................................ break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ ................................................................................ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. ................................................................................ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- ................................................................................ MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- ................................................................................ AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ ................................................................................ fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ................................................................................ AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- ................................................................................ # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- ................................................................................ CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- ................................................................................ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- ................................................................................ # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- ................................................................................ AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- ................................................................................ dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- ................................................................................ # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- |
| | | | < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | | | | | | | | | | | | | | | | |
1 2 3 4 5 6 7 8 9 10 .. 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ... 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 ... 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 ... 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 ... 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 ... 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 ... 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 ... 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 ... 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 ... 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 ... 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 .... 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 .... 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 .... 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 .... 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 .... 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 .... 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 .... 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 .... 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 .... 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 .... 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 .... 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 |
# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 11 (pkg-config-0.29.1) dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. ................................................................................ _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- ................................................................................ # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies ................................................................................ m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to ................................................................................ [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- ................................................................................ fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be ................................................................................ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS ................................................................................ [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. ................................................................................ break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ ................................................................................ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. ................................................................................ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- ................................................................................ MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- ................................................................................ AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ ................................................................................ fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ................................................................................ AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- ................................................................................ # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- ................................................................................ CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- ................................................................................ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- ................................................................................ # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- ................................................................................ AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- ................................................................................ dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- ................................................................................ # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- |
Changes to config.h.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 .. 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 ... 154 155 156 157 158 159 160 161 162 163 164 165 166 167 ... 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
#define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `CharLS' library (-lCharLS). */ #define HAVE_LIBCHARLS 1 /* Define to 1 if you have the `openjp2' library (-lopenjp2). */ #define HAVE_LIBOPENJP2 1 /* Define to 1 if you have the `proj' library (-lproj). */ #define HAVE_LIBPROJ 1 /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #define HAVE_LIBSQLITE3 1 ................................................................................ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the <openjpeg-2.0/openjpeg.h> header file. */ /* #undef HAVE_OPENJPEG_2_0_OPENJPEG_H */ /* Define to 1 if you have the <openjpeg-2.1/openjpeg.h> header file. */ #define HAVE_OPENJPEG_2_1_OPENJPEG_H 1 /* Define to 1 if you have the <sqlite3ext.h> header file. */ #define HAVE_SQLITE3EXT_H 1 /* Define to 1 if you have the <sqlite3.h> header file. */ #define HAVE_SQLITE3_H 1 ................................................................................ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 /* Define to the sub-directory in which libtool stores uninstalled libraries. */ ................................................................................ /* Should be defined in order to disable OpenJpeg support. */ /* #undef OMIT_OPENJPEG */ /* Should be defined in order to disable WebP support. */ /* #undef OMIT_WEBP */ /* testing for OpenJpeg 2.1 */ #define OPENJPEG_2_1 1 /* Name of package */ #define PACKAGE "spatialite_gui" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "a.furieri@lqt.it" /* Define to the full name of this package. */ |
> > > | > > > > > > > > > < < < |
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 .. 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 ... 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 ... 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
#define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `CharLS' library (-lCharLS). */ #define HAVE_LIBCHARLS 1 /* Define to 1 if you have the `openjp2' library (-lopenjp2). */ #define HAVE_LIBOPENJP2 1 /* Define to 1 if you have the <libpq-fe.h> header file. */ #define HAVE_LIBPQ_FE_H 1 /* Define to 1 if you have the `proj' library (-lproj). */ #define HAVE_LIBPROJ 1 /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #define HAVE_LIBSQLITE3 1 ................................................................................ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the <openjpeg-2.0/openjpeg.h> header file. */ /* #undef HAVE_OPENJPEG_2_0_OPENJPEG_H */ /* Define to 1 if you have the <openjpeg-2.1/openjpeg.h> header file. */ /* #undef HAVE_OPENJPEG_2_1_OPENJPEG_H */ /* Define to 1 if you have the <openjpeg-2.2/openjpeg.h> header file. */ /* #undef HAVE_OPENJPEG_2_2_OPENJPEG_H */ /* Define to 1 if you have the <openjpeg-2.3/openjpeg.h> header file. */ #define HAVE_OPENJPEG_2_3_OPENJPEG_H 1 /* Define to 1 if you have the <sqlite3ext.h> header file. */ #define HAVE_SQLITE3EXT_H 1 /* Define to 1 if you have the <sqlite3.h> header file. */ #define HAVE_SQLITE3_H 1 ................................................................................ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Should be defined in order to enable LibPQ late binding. */ /* #undef LIBPQ_DEFERRED */ /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 /* Define to the sub-directory in which libtool stores uninstalled libraries. */ ................................................................................ /* Should be defined in order to disable OpenJpeg support. */ /* #undef OMIT_OPENJPEG */ /* Should be defined in order to disable WebP support. */ /* #undef OMIT_WEBP */ /* Name of package */ #define PACKAGE "spatialite_gui" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "a.furieri@lqt.it" /* Define to the full name of this package. */ |
Changes to config.h.in.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 .. 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ... 153 154 155 156 157 158 159 160 161 162 163 164 165 166 ... 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
#undef HAVE_INTTYPES_H /* Define to 1 if you have the `CharLS' library (-lCharLS). */ #undef HAVE_LIBCHARLS /* Define to 1 if you have the `openjp2' library (-lopenjp2). */ #undef HAVE_LIBOPENJP2 /* Define to 1 if you have the `proj' library (-lproj). */ #undef HAVE_LIBPROJ /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 ................................................................................ #undef HAVE_MEMSET /* Define to 1 if you have the <openjpeg-2.0/openjpeg.h> header file. */ #undef HAVE_OPENJPEG_2_0_OPENJPEG_H /* Define to 1 if you have the <openjpeg-2.1/openjpeg.h> header file. */ #undef HAVE_OPENJPEG_2_1_OPENJPEG_H /* Define to 1 if you have the <sqlite3ext.h> header file. */ #undef HAVE_SQLITE3EXT_H /* Define to 1 if you have the <sqlite3.h> header file. */ #undef HAVE_SQLITE3_H ................................................................................ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory in which libtool stores uninstalled libraries. */ ................................................................................ /* Should be defined in order to disable OpenJpeg support. */ #undef OMIT_OPENJPEG /* Should be defined in order to disable WebP support. */ #undef OMIT_WEBP /* testing for OpenJpeg 2.1 */ #undef OPENJPEG_2_1 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ |
> > > > > > > > > > > > < < < |
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 .. 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 ... 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 ... 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
#undef HAVE_INTTYPES_H /* Define to 1 if you have the `CharLS' library (-lCharLS). */ #undef HAVE_LIBCHARLS /* Define to 1 if you have the `openjp2' library (-lopenjp2). */ #undef HAVE_LIBOPENJP2 /* Define to 1 if you have the <libpq-fe.h> header file. */ #undef HAVE_LIBPQ_FE_H /* Define to 1 if you have the `proj' library (-lproj). */ #undef HAVE_LIBPROJ /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 ................................................................................ #undef HAVE_MEMSET /* Define to 1 if you have the <openjpeg-2.0/openjpeg.h> header file. */ #undef HAVE_OPENJPEG_2_0_OPENJPEG_H /* Define to 1 if you have the <openjpeg-2.1/openjpeg.h> header file. */ #undef HAVE_OPENJPEG_2_1_OPENJPEG_H /* Define to 1 if you have the <openjpeg-2.2/openjpeg.h> header file. */ #undef HAVE_OPENJPEG_2_2_OPENJPEG_H /* Define to 1 if you have the <openjpeg-2.3/openjpeg.h> header file. */ #undef HAVE_OPENJPEG_2_3_OPENJPEG_H /* Define to 1 if you have the <sqlite3ext.h> header file. */ #undef HAVE_SQLITE3EXT_H /* Define to 1 if you have the <sqlite3.h> header file. */ #undef HAVE_SQLITE3_H ................................................................................ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Should be defined in order to enable LibPQ late binding. */ #undef LIBPQ_DEFERRED /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory in which libtool stores uninstalled libraries. */ ................................................................................ /* Should be defined in order to disable OpenJpeg support. */ #undef OMIT_OPENJPEG /* Should be defined in order to disable WebP support. */ #undef OMIT_WEBP /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ |
Changes to configure.
631 632 633 634 635 636 637 638 639 640 641 642 643 644 ... 795 796 797 798 799 800 801 802 803 804 805 806 807 808 ... 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 .... 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 .... 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 ..... 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 ..... 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 ..... 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 ..... 17570 17571 17572 17573 17574 17575 17576 17577 17578 17579 17580 17581 17582 17583 17584 |
# include <unistd.h> #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS LIBRASTERLITE2_LIBS LIBRASTERLITE2_CFLAGS LIBSPATIALITE_LIBS LIBSPATIALITE_CFLAGS LIBLZMA_LIBS LIBLZMA_CFLAGS LIBWEBP_LIBS ................................................................................ with_wxconfig with_geosconfig enable_freexl enable_libxml2 enable_openjpeg enable_webp enable_charls enable_sqlite_stmtstatus_autoindex ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS ................................................................................ LIBWEBP_CFLAGS LIBWEBP_LIBS LIBLZMA_CFLAGS LIBLZMA_LIBS LIBSPATIALITE_CFLAGS LIBSPATIALITE_LIBS LIBRASTERLITE2_CFLAGS LIBRASTERLITE2_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= ................................................................................ --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-wxconfig=FILE specify an alternative wx-config file --with-geosconfig=FILE specify an alternative geos-config file Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> ................................................................................ C compiler flags for LIBSPATIALITE, overriding pkg-config LIBSPATIALITE_LIBS linker flags for LIBSPATIALITE, overriding pkg-config LIBRASTERLITE2_CFLAGS C compiler flags for LIBRASTERLITE2, overriding pkg-config LIBRASTERLITE2_LIBS linker flags for LIBRASTERLITE2, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <a.furieri@lqt.it>. _ACEOF ac_status=$? ................................................................................ fi if test x"$enable_openjpeg" != "xno"; then # # testing OpenJpeg-2 headers # they could be either on -/include/openjpeg-2.0 # or on -/include/openjpeg-2.1 # for ac_header in openjpeg-2.0/openjpeg.h do : ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.0/openjpeg.h" "ac_cv_header_openjpeg_2_0_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_2_0_openjpeg_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_0_OPENJPEG_H 1 ................................................................................ cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_1_OPENJPEG_H 1 _ACEOF fi done if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes"; then as_fn_error $? "'OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_create_decompress in -lopenjp2" >&5 $as_echo_n "checking for opj_create_decompress in -lopenjp2... " >&6; } if ${ac_cv_lib_openjp2_opj_create_decompress+:} false; then : $as_echo_n "(cached) " >&6 ................................................................................ LIBS="-lopenjp2 $LIBS" else as_fn_error $? "'libopenjp2' is required but it doesn't seems to be installed on this system." "$LINENO" 5 fi # testing for OpenJpeg 2.0 or 2.1 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_OPENJPEG_2_1_OPENJPEG_H #include <openjpeg-2.1/openjpeg.h> #else #include <openjpeg-2.0/openjpeg.h> #endif int main () { void *d; opj_stream_t *s; opj_stream_set_user_data (s, &d, NULL); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define OPENJPEG_2_1 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "#define OMIT_OPENJPEG 1" >>confdefs.h fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- ................................................................................ LIBRASTERLITE2_LIBS=$pkg_cv_LIBRASTERLITE2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi #----------------------------------------------------------------------- ac_config_files="$ac_config_files Makefile icons/Makefile win_resource/Makefile gnome_resource/Makefile mac_resource/Makefile" #----------------------------------------------------------------------- # --enable-sqlite_stmtstatus_autoindex # |
> > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 ... 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 ... 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 .... 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 .... 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 ..... 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 ..... 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 ..... 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 ..... 17585 17586 17587 17588 17589 17590 17591 17592 17593 17594 17595 17596 17597 17598 17599 17600 17601 17602 17603 17604 17605 17606 17607 17608 17609 17610 17611 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 17728 17729 17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 17769 17770 17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 17796 17797 17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 |
# include <unistd.h> #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS PG_LIB PG_LDFLAGS PG_CFLAGS PGCONFIG LIBVIRTUALPG_LIBS LIBVIRTUALPG_CFLAGS LIBRASTERLITE2_LIBS LIBRASTERLITE2_CFLAGS LIBSPATIALITE_LIBS LIBSPATIALITE_CFLAGS LIBLZMA_LIBS LIBLZMA_CFLAGS LIBWEBP_LIBS ................................................................................ with_wxconfig with_geosconfig enable_freexl enable_libxml2 enable_openjpeg enable_webp enable_charls with_pgconfig with_libpq_deferred enable_sqlite_stmtstatus_autoindex ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS ................................................................................ LIBWEBP_CFLAGS LIBWEBP_LIBS LIBLZMA_CFLAGS LIBLZMA_LIBS LIBSPATIALITE_CFLAGS LIBSPATIALITE_LIBS LIBRASTERLITE2_CFLAGS LIBRASTERLITE2_LIBS LIBVIRTUALPG_CFLAGS LIBVIRTUALPG_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= ................................................................................ --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-wxconfig=FILE specify an alternative wx-config file --with-geosconfig=FILE specify an alternative geos-config file --with-pgconfig=FILE specify an alternative pg_config file --with-libpq_deferred enables libpq late binding [default=no] Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> ................................................................................ C compiler flags for LIBSPATIALITE, overriding pkg-config LIBSPATIALITE_LIBS linker flags for LIBSPATIALITE, overriding pkg-config LIBRASTERLITE2_CFLAGS C compiler flags for LIBRASTERLITE2, overriding pkg-config LIBRASTERLITE2_LIBS linker flags for LIBRASTERLITE2, overriding pkg-config LIBVIRTUALPG_CFLAGS C compiler flags for LIBVIRTUALPG, overriding pkg-config LIBVIRTUALPG_LIBS linker flags for LIBVIRTUALPG, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <a.furieri@lqt.it>. _ACEOF ac_status=$? ................................................................................ fi if test x"$enable_openjpeg" != "xno"; then # # testing OpenJpeg-2 headers # they could be either on -/include/openjpeg-2.0 # or on -/include/openjpeg-2.1 # or on -/include/openjpeg-2.2 # or on -/include/openjpeg-2.3 # for ac_header in openjpeg-2.0/openjpeg.h do : ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.0/openjpeg.h" "ac_cv_header_openjpeg_2_0_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_2_0_openjpeg_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_0_OPENJPEG_H 1 ................................................................................ cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_1_OPENJPEG_H 1 _ACEOF fi done for ac_header in openjpeg-2.2/openjpeg.h do : ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.2/openjpeg.h" "ac_cv_header_openjpeg_2_2_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_2_2_openjpeg_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_2_OPENJPEG_H 1 _ACEOF fi done for ac_header in openjpeg-2.3/openjpeg.h do : ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.3/openjpeg.h" "ac_cv_header_openjpeg_2_3_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_2_3_openjpeg_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_3_OPENJPEG_H 1 _ACEOF fi done if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_2_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_3_openjpeg_h" != x"yes"; then as_fn_error $? "'OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_create_decompress in -lopenjp2" >&5 $as_echo_n "checking for opj_create_decompress in -lopenjp2... " >&6; } if ${ac_cv_lib_openjp2_opj_create_decompress+:} false; then : $as_echo_n "(cached) " >&6 ................................................................................ LIBS="-lopenjp2 $LIBS" else as_fn_error $? "'libopenjp2' is required but it doesn't seems to be installed on this system." "$LINENO" 5 fi else $as_echo "#define OMIT_OPENJPEG 1" >>confdefs.h fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- ................................................................................ LIBRASTERLITE2_LIBS=$pkg_cv_LIBRASTERLITE2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBVIRTUALPG" >&5 $as_echo_n "checking for LIBVIRTUALPG... " >&6; } if test -n "$LIBVIRTUALPG_CFLAGS"; then pkg_cv_LIBVIRTUALPG_CFLAGS="$LIBVIRTUALPG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"virtualpg\""; } >&5 ($PKG_CONFIG --exists --print-errors "virtualpg") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBVIRTUALPG_CFLAGS=`$PKG_CONFIG --cflags "virtualpg" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBVIRTUALPG_LIBS"; then pkg_cv_LIBVIRTUALPG_LIBS="$LIBVIRTUALPG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"virtualpg\""; } >&5 ($PKG_CONFIG --exists --print-errors "virtualpg") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBVIRTUALPG_LIBS=`$PKG_CONFIG --libs "virtualpg" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBVIRTUALPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "virtualpg" 2>&1` else LIBVIRTUALPG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "virtualpg" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBVIRTUALPG_PKG_ERRORS" >&5 as_fn_error $? "'libvirtualpg' is required but it doesn't seem to be installed on this system." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "'libvirtualpg' is required but it doesn't seem to be installed on this system." "$LINENO" 5 else LIBVIRTUALPG_CFLAGS=$pkg_cv_LIBVIRTUALPG_CFLAGS LIBVIRTUALPG_LIBS=$pkg_cv_LIBVIRTUALPG_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --with-pgconfig # # Check whether --with-pgconfig was given. if test "${with_pgconfig+set}" = set; then : withval=$with_pgconfig; PGCONFIG="$withval" else PGCONFIG="" fi if test "x$PGCONFIG" = "x"; then # PGCONFIG was not specified, so search within the current path # Extract the first word of "pg_config", so it can be a program name with args. set dummy pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PGCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PGCONFIG="$PGCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PGCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PGCONFIG=$ac_cv_path_PGCONFIG if test -n "$PGCONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGCONFIG" >&5 $as_echo "$PGCONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # If we couldn't find pg_config, display an error if test "x$PGCONFIG" = "x"; then as_fn_error $? "could not find pg_config within the current path. You may need to try re-running configure with a --with-pgconfig parameter." "$LINENO" 5 fi else # PGCONFIG was specified; display a message to the user if test "x$PGSCONFIG" = "xyes"; then as_fn_error $? "you must specify a parameter to --with-pgconfig, e.g. --with-pgconfig=/path/to/pg_config" "$LINENO" 5 else if test -f $PGCONFIG; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified pg_config file: $PGCONFIG" >&5 $as_echo "Using user-specified pg_config file: $PGCONFIG" >&6; } else as_fn_error $? "the user-specified pg_config file $PGCONFIG does not exist" "$LINENO" 5 fi fi fi PG_CFLAGS=-I`$PGCONFIG --includedir` PG_LDFLAGS=-L`$PGCONFIG --libdir` #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --with-libpq_deferred # # Check whether --with-libpq_deferred was given. if test "${with_libpq_deferred+set}" = set; then : withval=$with_libpq_deferred; else with_libpq_deferred=no fi if test x"$with_libpq_deferred" != "xno"; then $as_echo "#define LIBPQ_DEFERRED 1" >>confdefs.h libpq_deferred=1 fi #----------------------------------------------------------------------- # Ensure that we can parse libpq-fe.h CFLAGS_SAVE="$CFLAGS" CFLAGS="$PG_CFLAGS" for ac_header in libpq-fe.h do : ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default" if test "x$ac_cv_header_libpq_fe_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPQ_FE_H 1 _ACEOF else as_fn_error $? "cannot find libpq-fe.h, bailing out" "$LINENO" 5 fi done CFLAGS="$CFLAGS_SAVE" if test x"$libpq_deferred" != "x1"; then # Ensure we can link against libpq LDFLAGS_SAVE="$LDFLAGS" LDFLAGS="$PG_LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5 $as_echo_n "checking for PQconnectdb in -lpq... " >&6; } if ${ac_cv_lib_pq_PQconnectdb+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpq $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PQconnectdb (); int main () { return PQconnectdb (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pq_PQconnectdb=yes else ac_cv_lib_pq_PQconnectdb=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQconnectdb" >&5 $as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; } if test "x$ac_cv_lib_pq_PQconnectdb" = xyes; then : PG_LIB=-lpq else as_fn_error $? "'libpq' is required but it doesn't seem to be installed on this system." "$LINENO" 5 fi LDFLAGS="$LDFLAGS_SAVE" fi ac_config_files="$ac_config_files Makefile icons/Makefile win_resource/Makefile gnome_resource/Makefile mac_resource/Makefile" #----------------------------------------------------------------------- # --enable-sqlite_stmtstatus_autoindex # |
Changes to configure.ac.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ... 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 ... 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
[must be defined when using libspatialite-amalgamation]) AH_TEMPLATE([OMIT_FREEXL], [Should be defined in order to disable FREEXL support.]) AH_TEMPLATE([ENABLE_LIBXML2], [Should be defined in order to enable LIBXML2 support.]) AH_TEMPLATE([OMIT_WEBP], [Should be defined in order to disable WebP support.]) AH_TEMPLATE([OPENJPEG_2_1], [testing for OpenJpeg 2.1]) AH_TEMPLATE([OMIT_OPENJPEG], [Should be defined in order to disable OpenJpeg support.]) AH_TEMPLATE([OMIT_CHARLS], [Should be defined in order to disable CharLS support.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL], ................................................................................ [--enable-openjpeg], [enables OpenJpeg inclusion [default=yes]])], [], [enable_openjpeg=yes]) if test x"$enable_openjpeg" != "xno"; then # # testing OpenJpeg-2 headers # they could be either on -/include/openjpeg-2.0 # or on -/include/openjpeg-2.1 # AC_CHECK_HEADERS(openjpeg-2.0/openjpeg.h) AC_CHECK_HEADERS(openjpeg-2.1/openjpeg.h) if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes"; then AC_MSG_ERROR(['OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system]) fi AC_CHECK_LIB(openjp2,opj_create_decompress,,AC_MSG_ERROR(['libopenjp2' is required but it doesn't seems to be installed on this system.]),-lm) # testing for OpenJpeg 2.0 or 2.1 AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#ifdef HAVE_OPENJPEG_2_1_OPENJPEG_H #include <openjpeg-2.1/openjpeg.h> #else #include <openjpeg-2.0/openjpeg.h> #endif]], [[void *d; opj_stream_t *s; opj_stream_set_user_data (s, &d, NULL);]])], [ AC_MSG_RESULT([yes]) AC_DEFINE(OPENJPEG_2_1) ], [AC_MSG_RESULT([no])] ) else AC_DEFINE(OMIT_OPENJPEG) fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --enable-webp ................................................................................ AC_DEFINE(SPATIALITE_AMALGAMATION, 1) fi AC_SUBST(LIBSPATIALITE_LIBS) PKG_CHECK_MODULES([LIBRASTERLITE2], [rasterlite2], , AC_MSG_ERROR(['librasterlite2' is required but it doesn't seem to be installed on this system.])) AC_SUBST(LIBRASTERLITE2_CFLAGS) AC_SUBST(LIBRASTERLITE2_LIBS) #----------------------------------------------------------------------- AC_CONFIG_FILES([Makefile \ icons/Makefile \ win_resource/Makefile \ gnome_resource/Makefile \ mac_resource/Makefile]) |
< < > > > > > > | > > < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ... 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 ... 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
[must be defined when using libspatialite-amalgamation]) AH_TEMPLATE([OMIT_FREEXL], [Should be defined in order to disable FREEXL support.]) AH_TEMPLATE([ENABLE_LIBXML2], [Should be defined in order to enable LIBXML2 support.]) AH_TEMPLATE([OMIT_WEBP], [Should be defined in order to disable WebP support.]) AH_TEMPLATE([OMIT_OPENJPEG], [Should be defined in order to disable OpenJpeg support.]) AH_TEMPLATE([OMIT_CHARLS], [Should be defined in order to disable CharLS support.]) AH_TEMPLATE([LIBPQ_DEFERRED], [Should be defined in order to enable LibPQ late binding.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL], ................................................................................ [--enable-openjpeg], [enables OpenJpeg inclusion [default=yes]])], [], [enable_openjpeg=yes]) if test x"$enable_openjpeg" != "xno"; then # # testing OpenJpeg-2 headers # they could be either on -/include/openjpeg-2.0 # or on -/include/openjpeg-2.1 # or on -/include/openjpeg-2.2 # or on -/include/openjpeg-2.3 # AC_CHECK_HEADERS(openjpeg-2.0/openjpeg.h) AC_CHECK_HEADERS(openjpeg-2.1/openjpeg.h) AC_CHECK_HEADERS(openjpeg-2.2/openjpeg.h) AC_CHECK_HEADERS(openjpeg-2.3/openjpeg.h) if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_2_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_3_openjpeg_h" != x"yes"; then AC_MSG_ERROR(['OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system]) fi AC_CHECK_LIB(openjp2,opj_create_decompress,,AC_MSG_ERROR(['libopenjp2' is required but it doesn't seems to be installed on this system.]),-lm) else AC_DEFINE(OMIT_OPENJPEG) fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --enable-webp ................................................................................ AC_DEFINE(SPATIALITE_AMALGAMATION, 1) fi AC_SUBST(LIBSPATIALITE_LIBS) PKG_CHECK_MODULES([LIBRASTERLITE2], [rasterlite2], , AC_MSG_ERROR(['librasterlite2' is required but it doesn't seem to be installed on this system.])) AC_SUBST(LIBRASTERLITE2_CFLAGS) AC_SUBST(LIBRASTERLITE2_LIBS) PKG_CHECK_MODULES([LIBVIRTUALPG], [virtualpg], , AC_MSG_ERROR(['libvirtualpg' is required but it doesn't seem to be installed on this system.])) AC_SUBST(LIBVIRTUALPG_CFLAGS) AC_SUBST(LIBVIRTUALPG_LIBS) #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --with-pgconfig # AC_ARG_WITH([pgconfig], [AS_HELP_STRING([--with-pgconfig=FILE], [specify an alternative pg_config file])], [PGCONFIG="$withval"], [PGCONFIG=""]) if test "x$PGCONFIG" = "x"; then # PGCONFIG was not specified, so search within the current path AC_PATH_PROG([PGCONFIG], [pg_config]) # If we couldn't find pg_config, display an error if test "x$PGCONFIG" = "x"; then AC_MSG_ERROR([could not find pg_config within the current path. You may need to try re-running configure with a --with-pgconfig parameter.]) fi else # PGCONFIG was specified; display a message to the user if test "x$PGSCONFIG" = "xyes"; then AC_MSG_ERROR([you must specify a parameter to --with-pgconfig, e.g. --with-pgconfig=/path/to/pg_config]) else if test -f $PGCONFIG; then AC_MSG_RESULT([Using user-specified pg_config file: $PGCONFIG]) else AC_MSG_ERROR([the user-specified pg_config file $PGCONFIG does not exist]) fi fi fi PG_CFLAGS=-I`$PGCONFIG --includedir` PG_LDFLAGS=-L`$PGCONFIG --libdir` AC_SUBST(PG_CFLAGS) AC_SUBST(PG_LDFLAGS) #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --with-libpq_deferred # AC_ARG_WITH(libpq_deferred, [AS_HELP_STRING( [--with-libpq_deferred], [enables libpq late binding [default=no]])], [], [with_libpq_deferred=no]) if test x"$with_libpq_deferred" != "xno"; then AC_DEFINE(LIBPQ_DEFERRED) libpq_deferred=1 fi #----------------------------------------------------------------------- # Ensure that we can parse libpq-fe.h CFLAGS_SAVE="$CFLAGS" CFLAGS="$PG_CFLAGS" AC_CHECK_HEADERS(libpq-fe.h,, [AC_MSG_ERROR([cannot find libpq-fe.h, bailing out])]) CFLAGS="$CFLAGS_SAVE" if test x"$libpq_deferred" != "x1"; then # Ensure we can link against libpq LDFLAGS_SAVE="$LDFLAGS" LDFLAGS="$PG_LDFLAGS" AC_CHECK_LIB(pq,PQconnectdb,PG_LIB=-lpq,AC_MSG_ERROR(['libpq' is required but it doesn't seem to be installed on this system.])) LDFLAGS="$LDFLAGS_SAVE" AC_SUBST(PG_LIB) fi AC_CONFIG_FILES([Makefile \ icons/Makefile \ win_resource/Makefile \ gnome_resource/Makefile \ mac_resource/Makefile]) |
Changes to gnome_resource/Makefile.in.
1 2 3 4 5 6 7 8 9 10 11 ... 200 201 202 203 204 205 206 207 208 209 210 211 212 213 ... 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ |
| | > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 ... 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 ... 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBVIRTUALPG_CFLAGS = @LIBVIRTUALPG_CFLAGS@ LIBVIRTUALPG_LIBS = @LIBVIRTUALPG_LIBS@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PG_CFLAGS = @PG_CFLAGS@ PG_LDFLAGS = @PG_LDFLAGS@ PG_LIB = @PG_LIB@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ |
Added helpgen/READ_ME.txt.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
About "helpgen" =============== this is a small C tool intended to simplify and make easy the process to tempestively update the HTML doc internally supplied by "spatialite_gui" about SpatiaLite and Rasterlite2 SQL functions. How it works ============ 1. "helpgen" will parse and rearrange the two HTML pages supporting each library, merging both into a single HTML page. 2. this merged HTML page will then be compressed using the well known ZIP/DEFLATE algorithm (zlib). 3. then the ZIP binary payload will be transformed into many short text strings encoded as hexadecimal bytes. 4. and finally a C++ source will be autogenerated; this C++ source is intended to be compiled and linked within "spatialite_gui", and its specific scope is the one to "inject" into the executable all the above mentioned hexadecimal strings representing the zipped HTML doc. 5. each time that the user will request "spatialite_gui" to show the internal HTML doc the "MyMain::GetHelp()" function defined into the autogenerated C++ source, the zipped payload will be decompressed and the HTML page will be shown on the screen. Using "helpgen" =============== a. build the "helpgen" executable (see below). b. prepare the SpatiaLite's own HTML page; this usually means copying "spatialite-sql-latest.html" from libspatialite's sources to ./spatialite-sql-latest.html c. prepare the RasterLite2's own HTML page; this usually means downloading from the Fossil Wiki: https://www.gaia-gis.it/fossil/librasterlite2/wiki?name=sql_reference_list the downloaded HTML page must be saved as ./rl2-sql-latest.html d. now you are ready to execute "helpgen" (no args): ./helpgen e. the "HtmlHelp.cpp" C++ source will be autogenerated. f. copy "HtmlHelp.cpp" into the spatialite_gui's sources and rebuild; the spatialite_gui executable will now contain the latest version of the HTML doc. Building "helpgen" ================== You just have to directly invoke "gcc". on Linux and other *nix systems: gcc helpgen.c -o helpgen -lz on Windows using MSYS and MinGW: gcc helpgen.c -o helpgen.exe -lz |
Added helpgen/helpgen.c.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
/* / helpgen / / a tool autogenerating C++ code for SpatiaLite_GUI / [HTML doc] / / version 1.0, 2017 August 4 / / Author: Sandro Furieri a.furieri@lqt.it / / Copyright (C) 2017 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see <http://www.gnu.org/licenses/>. / */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <zlib.h> /* static void do_debug (const char *html, int len) { fwrite (html, 1, len, stdout); } */ static int load_splite (FILE * in, char **buf, int *buf_len) { /* loading in memory "./spatialite-sql-latest.html" */ char *mem = NULL; int size; if (fseek (in, 0, SEEK_END) < 0) { fprintf (stderr, "ERROR: fseek failure on \"./spatialite-sql-latest.html/\"\n"); goto stop; } size = ftell (in); rewind (in); mem = malloc (size); if (mem == NULL) { fprintf (stderr, "ERROR: insufficient memory\n"); goto stop; } if (fread (mem, 1, size, in) != (unsigned int) size) { fprintf (stderr, "ERROR: fread failure on \"./spatialite-sql-latest.html/\"\n"); goto stop; } *buf = mem; *buf_len = size; return 1; stop: *buf = NULL; *buf_len = 0; return 0; } static int load_rl2 (FILE * in, char **buf, int *buf_len) { /* loading in memory "./rl2-sql-latest.html" */ char *mem = NULL; int size; if (fseek (in, 0, SEEK_END) < 0) { fprintf (stderr, "ERROR: fseek failure on \"./rl2-sql-latest.html/\"\n"); goto stop; } size = ftell (in); rewind (in); mem = malloc (size); if (mem == NULL) { fprintf (stderr, "ERROR: insufficient memory\n"); goto stop; } if (fread (mem, 1, size, in) != (unsigned int) size) { fprintf (stderr, "ERROR: fread failure on \"./rl2-sql-latest.html/\"\n"); goto stop; } *buf = mem; *buf_len = size; return 1; stop: *buf = NULL; *buf_len = 0; return 0; } static int check_back (const char *buf) { const char *p = buf; while (1) { if (*p == ' ' || *p == '\t') { /* skipping leading blanks */ p++; continue; } break; } if (strcmp (p, "<a href=\"https://www.gaia-gis.it/fossil/libspatialite\">back</a>") == 0) return 1; return 0; } static int check_end (const char *buf) { const char *p = buf; while (1) { if (*p == ' ' || *p == '\t') { /* skipping leading blanks */ p++; continue; } break; } if (strncmp (p, "</body>", 7) == 0) return 1; return 0; } static void check_toc (char *buf) { int i; char title[256]; const char *str; char *p = buf; while (1) { if (*p == ' ' || *p == '\t') { /* skipping leading blanks */ p++; continue; } break; } if (strncmp (p, "<h2>SpatiaLite ", 15) != 0) return; strcpy (title, p + 4); *(title + strlen (title) - 5) = '\0'; p = buf; str = "<h1>Table of Contents</h1>\n<ul>\n"; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; str = "<li><a href=\"#spatialite_sql\">SpatiaLite SQL functions</a></li>\n"; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; str = "<li><a href=\"#rasterlite2_sql\">RasterLite2 SQL functions</a></li>\n"; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; str = "</ul><br><hr>\n<h2><a name=\"spatialite_sql\">"; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; str = title; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; str = "</a></h2>"; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; *p = '\0'; } static void clean_splite (char **buf, int *buf_len) { /* cleaning "./spatialite-sql-latest.html" */ const char *p_in = *buf; int in_len = *buf_len; char *out = malloc (in_len + 1024); char *p_out = out; char line[2048]; char *p_line = line; int i; for (i = 0; i < in_len; i++) { if (*p_in == '\r') { /* skipping RETURN chars */ p_in++; continue; } if (*p_in == '\n') { /* found a NEWLINE char */ int skip = 0; *p_line = '\0'; check_toc (line); if (check_back (line)) skip = 1; if (check_end (line)) skip = 1; if (!skip) { /* copying the current line into the output buffer */ unsigned int x; for (x = 0; x < strlen (line); x++) *p_out++ = line[x]; *p_out++ = '\n'; } p_line = line; p_in++; continue; } *p_line++ = *p_in++; } free (*buf); *buf = out; *buf_len = p_out - out; } static int check_start_rl2 (char *buf) { int i; char title[256]; const char *str; char *p = buf; while (1) { if (*p == ' ' || *p == '\t') { /* skipping leading blanks */ p++; continue; } break; } if (strcmp (p, "<h1>RasterLite2 SQL functions - reference list</h1>") != 0) return 0; strcpy (title, p + 4); *(title + strlen (title) - 5) = '\0'; p = buf; str = title; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; str = "</a></h1>"; for (i = 0; i < (int) strlen (str); i++) *p++ = str[i]; *p = '\0'; return 1; } static int check_end_rl2 (const char *buf) { const char *p = buf; while (1) { if (*p == ' ' || *p == '\t') { /* skipping leading blanks */ p++; continue; } break; } if (strcmp (p, "Back to <a href=\"https://www.gaia-gis.it/fossil/librasterlite2/wiki?name=rasterlite2-doc\">RasterLite2 doc index</a>") == 0) return 1; return 0; } static void sanitize_tags (char *line) { char *p; while (1) { p = strstr (line, "<br />"); if (p != NULL) memcpy (p, "<br> ", 6); else break; } while (1) { p = strstr (line, "<hr />"); if (p != NULL) memcpy (p, "<hr> ", 6); else break; } } static void clean_rl2 (char **buf, int *buf_len) { /* cleaning "./rl2-sql-latest.html" */ const char *p_in = *buf; int in_len = *buf_len; char *out = malloc (in_len + 1024); char *p_out = out; char line[2048]; char *p_line = line; int i; int start = 0; int end = 0; const char *header = "<br><br><br><br><br><br>\n<h1><a name=\"rasterlite2_sql\">"; const char *footer = "</body></html>\n"; for (i = 0; i < in_len; i++) { if (*p_in == '\r') { /* skipping RETURN chars */ p_in++; continue; } if (*p_in == '\n') { /* found a NEWLINE char */ *p_line = '\0'; if (check_start_rl2 (line)) { int x; start = 1; for (x = 0; x < (int) strlen (header); x++) *p_out++ = header[x]; } if (check_end_rl2 (line)) end = 1; sanitize_tags (line); if (start && !end) { /* copying the current line into the output buffer */ unsigned int x; for (x = 0; x < strlen (line); x++) *p_out++ = line[x]; *p_out++ = '\n'; } p_line = line; p_in++; continue; } *p_line++ = *p_in++; } free (*buf); for (i = 0; i < (int) strlen (footer); i++) *p_out++ = footer[i]; *buf = out; *buf_len = p_out - out; } static int zip_compress (const char *html, int len_html, unsigned char **zip, int *len_zip) { /* compressing the HTML page (DEFLATE - ZIP) */ int ret; uLong zLen = len_html - 1; unsigned char *zip_buf = malloc (zLen); if (zip_buf == NULL) { fprintf (stderr, "ERROR: insufficient memory\n"); goto error; } ret = compress (zip_buf, &zLen, (const Bytef *) html, (uLong) len_html); if (ret == Z_OK) { *zip = zip_buf; *len_zip = zLen; return 1; } else if (ret == Z_BUF_ERROR) fprintf (stderr, "ERROR: ZIP compression causes inflation\n"); else fprintf (stderr, "ERROR: internal ZIP codec failure (compression)\n"); error: *zip = NULL; *len_zip = 0; return 0; } static void print_source (FILE * out, int len_html, unsigned char *zip, int len_zip) { /* printing the C++ source file */ int i; int j; int lim; fprintf (out, "/*\n/ HtmlHelp.cpp\n"); fprintf (out, "/ spatialite_gui HTML Help generator\n/\n"); fprintf (out, "/ This code was autogenerated by \"helpgen\" on xxxxx\n/\n"); fprintf (out, "/ Author: Sandro Furieri a.furieri@lqt.it\n/\n"); fprintf (out, "/ Copyright (C) 2017 Alessandro Furieri\n/\n"); fprintf (out, "/ This program is free software: you can redistribute it and/or modify\n"); fprintf (out, "/ it under the terms of the GNU General Public License as published by\n"); fprintf (out, "/ the Free Software Foundation, either version 3 of the License, or\n"); fprintf (out, "/ (at your option) any later version.\n/\n"); fprintf (out, "/ This program is distributed in the hope that it will be useful,\n"); fprintf (out, "/ but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); fprintf (out, "/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); fprintf (out, "/ GNU General Public License for more details.\n/\n"); fprintf (out, "/ You should have received a copy of the GNU General Public License\n"); fprintf (out, "/ along with this program. If not, see <http://www.gnu.org/licenses/>.\n/\n*/\n\n"); fprintf (out, "#include \"Classdef.h\"\n\n"); fprintf (out, "#include <zlib.h>\n\n"); fprintf (out, "void MyFrame::GetHelp(wxString & html_text)\n{\n"); fprintf (out, "//\n// return the HTML Help Page from the ZIP compressed data\n//\n"); fprintf (out, "\tunsigned char *zip_buf = NULL;\n"); fprintf (out, "\tint uncompressed_len = %d;\n", len_html); fprintf (out, "\tint compressed_len = %d;\n", len_zip); fprintf (out, "\tuLong inLen = compressed_len;\n"); fprintf (out, "\tuLong outLen = uncompressed_len;\n"); fprintf (out, "\tconst Bytef *in;\n"); fprintf (out, "\tBytef *out;\n"); fprintf (out, "\tchar *html = NULL;\n\n"); fprintf (out, "// allocating the ZIP compressed buffer\n"); fprintf (out, "\tzip_buf = (unsigned char *)malloc(uncompressed_len);\n"); fprintf (out, "\tif (zip_buf == NULL)\n\t\tgoto error;\n\n"); fprintf (out, "// feeding the ZIP compressed buffer\n"); for (i = 0; i < len_zip; i += 25) { fprintf (out, "\tFeedZipHtml (zip_buf, %d, \"", i); lim = 25; if (i + lim > len_zip) lim = len_zip - i; for (j = 0; j < lim; j++) fprintf (out, "%02x", *(zip + i + j)); fprintf (out, "\");\n"); } fprintf (out, "\n// uncompressing the ZIP payload\n"); fprintf (out, "\tin = zip_buf;\n"); fprintf (out, "\thtml = (char *)malloc (uncompressed_len + 1);\n"); fprintf (out, "\tif (html == NULL)\n\t\tgoto error;\n"); fprintf (out, "\tout = (Bytef *)html;\n"); fprintf (out, "\tif (uncompress (out, &outLen, in, inLen) != Z_OK)\n"); fprintf (out, "\t\tgoto error;\n"); fprintf (out, "\t*(html + uncompressed_len) = '\\0';\n"); fprintf (out, "\tfree(zip_buf);\n"); fprintf (out, "\thtml_text = wxString::FromUTF8(html);\n"); fprintf (out, "\tfree(html);\n"); fprintf (out, "\treturn;\n\nerror:\n"); fprintf (out, "\tif (zip_buf != NULL)\n\t\tfree(zip_buf);\n"); fprintf (out, "\tif (html != NULL)\n\t\tfree(html);\n"); fprintf (out, "\thtml_text = wxT(\"<html><body><h1>Sorry, HTML Help " "is currently unavailable.</h1></body></html>\");\n"); fprintf (out, "}\n"); } int main (void) { /* / / Please note: no args are supported !!! / / we'll expect to find two input files respectively named: / ./spatialite-sql-latest.html / ./rl2-sql-latest.html / / the C++ code will be generated into: ./HtmlHelp.cpp / */ FILE *fl_splite = NULL; FILE *fl_rl2 = NULL; FILE *fl_out = NULL; char *p_splite = NULL; int len_splite = 0; char *p_rl2 = NULL; int len_rl2 = 0; char *html = NULL; int len_html = 0; unsigned char *zip = NULL; int len_zip = 0; /* opening input and output files */ fl_splite = fopen ("./spatialite-sql-latest.html", "rb"); if (fl_splite == NULL) { fprintf (stderr, "ERROR: unable to open the \"./spatialite-sql-latest.html\" input file\n"); goto stop; } fl_rl2 = fopen ("./rl2-sql-latest.html", "rb"); if (fl_rl2 == NULL) { fprintf (stderr, "ERROR: unable to open the \"./rl2-sql-latest.html\" input file\n"); goto stop; } fl_out = fopen ("./HtmlHelp.cpp", "wb"); if (fl_out == NULL) { fprintf (stderr, "ERROR: unable to open/create the \"./HtmlHelp.cpp\" output file\n"); goto stop; } /* loading and arranging input files */ if (!load_splite (fl_splite, &p_splite, &len_splite)) { fprintf (stderr, "ERROR: unable to load the \"./spatialite-sql-latest.html\" input file\n"); goto stop; } if (!load_rl2 (fl_rl2, &p_rl2, &len_rl2)) { fprintf (stderr, "ERROR: unable to load the \"./rl2-sql-latest.html\" input file\n"); goto stop; } clean_splite (&p_splite, &len_splite); clean_rl2 (&p_rl2, &len_rl2); /* creating in memory the uncompressed HTML page */ len_html = len_splite + len_rl2; html = malloc (len_html); if (html == NULL) { fprintf (stderr, "ERROR: insufficient memory\n"); goto stop; } memcpy (html, p_splite, len_splite); memcpy (html + len_splite, p_rl2, len_rl2); free (p_splite); p_splite = NULL; free (p_rl2); p_rl2 = NULL; /* compressing the HTML page */ if (!zip_compress (html, len_html, &zip, &len_zip)) { fprintf (stderr, "ERROR: unable to DEFLATE\n"); goto stop; } /* autogenerating the C++ source */ print_source (fl_out, len_html, zip, len_zip); /* end - cleanup */ stop: if (zip != NULL) free (zip); if (html != NULL) free (html); if (p_splite != NULL) free (p_splite); if (p_rl2 != NULL) free (p_rl2); if (fl_splite) fclose (fl_splite); if (fl_rl2) fclose (fl_rl2); if (fl_out) fclose (fl_out); return 0; } |
Changes to icons/Makefile.am.
20 21 22 23 24 25 26 27 |
icon_map.xpm crosshair.xpm wms_off.xpm vector_off.xpm \ coverage_off.xpm identify.xpm zoom_in.xpm zoom_out.xpm \ map_table.xpm pan.xpm printer.xpm map_root.xpm map_go.xpm \ map_edit.xpm map_add.xpm linestrings_on.xpm linestrings_off.xpm \ points_on.xpm points_off.xpm polygons_on.xpm polygons_off.xpm \ topo_geo_off.xpm topo_net_off.xpm dustbin.xpm gpkgtable.xpm \ gpkgvtable.xpm gpkggeom.xpm virtgpkg.xpm gpkg_spatialidx.xpm \ red_light.xpm green_light.xpm yellow_light.xpm map_magnify.xpm |
| > > |
20 21 22 23 24 25 26 27 28 29 |
icon_map.xpm crosshair.xpm wms_off.xpm vector_off.xpm \ coverage_off.xpm identify.xpm zoom_in.xpm zoom_out.xpm \ map_table.xpm pan.xpm printer.xpm map_root.xpm map_go.xpm \ map_edit.xpm map_add.xpm linestrings_on.xpm linestrings_off.xpm \ points_on.xpm points_off.xpm polygons_on.xpm polygons_off.xpm \ topo_geo_off.xpm topo_net_off.xpm dustbin.xpm gpkgtable.xpm \ gpkgvtable.xpm gpkggeom.xpm virtgpkg.xpm gpkg_spatialidx.xpm \ red_light.xpm green_light.xpm yellow_light.xpm map_magnify.xpm \ postgres.xpm postgres_schema.xpm postgres_table.xpm \ postgres_view.xpm |
Changes to icons/Makefile.in.
1 2 3 4 5 6 7 8 9 10 11 ... 170 171 172 173 174 175 176 177 178 179 180 181 182 183 ... 196 197 198 199 200 201 202 203 204 205 206 207 208 209 ... 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ ................................................................................ icon_map.xpm crosshair.xpm wms_off.xpm vector_off.xpm \ coverage_off.xpm identify.xpm zoom_in.xpm zoom_out.xpm \ map_table.xpm pan.xpm printer.xpm map_root.xpm map_go.xpm \ map_edit.xpm map_add.xpm linestrings_on.xpm linestrings_off.xpm \ points_on.xpm points_off.xpm polygons_on.xpm polygons_off.xpm \ topo_geo_off.xpm topo_net_off.xpm dustbin.xpm gpkgtable.xpm \ gpkgvtable.xpm gpkggeom.xpm virtgpkg.xpm gpkg_spatialidx.xpm \ red_light.xpm green_light.xpm yellow_light.xpm map_magnify.xpm all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ |
| | > > > > > > | > > |
1 2 3 4 5 6 7 8 9 10 11 ... 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 ... 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 ... 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBVIRTUALPG_CFLAGS = @LIBVIRTUALPG_CFLAGS@ LIBVIRTUALPG_LIBS = @LIBVIRTUALPG_LIBS@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PG_CFLAGS = @PG_CFLAGS@ PG_LDFLAGS = @PG_LDFLAGS@ PG_LIB = @PG_LIB@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ ................................................................................ icon_map.xpm crosshair.xpm wms_off.xpm vector_off.xpm \ coverage_off.xpm identify.xpm zoom_in.xpm zoom_out.xpm \ map_table.xpm pan.xpm printer.xpm map_root.xpm map_go.xpm \ map_edit.xpm map_add.xpm linestrings_on.xpm linestrings_off.xpm \ points_on.xpm points_off.xpm polygons_on.xpm polygons_off.xpm \ topo_geo_off.xpm topo_net_off.xpm dustbin.xpm gpkgtable.xpm \ gpkgvtable.xpm gpkggeom.xpm virtgpkg.xpm gpkg_spatialidx.xpm \ red_light.xpm green_light.xpm yellow_light.xpm map_magnify.xpm \ postgres.xpm postgres_schema.xpm postgres_table.xpm \ postgres_view.xpm all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ |
Added icons/postgres.xpm.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
/* XPM */ static const char * postgres_xpm[] = { "16 16 60 1", " c None", ". c #EEF2F4", "+ c #E6EBEE", "@ c #B6C5C9", "# c #AFBFC8", "$ c #91ABB7", "% c #39638A", "& c #346483", "* c #93A5B4", "= c #8FAAB4", "- c #396485", "; c #6B8EA1", "> c #93B5C4", ", c #9AADBD", "' c #D5DFE5", ") c #346391", "! c #35638C", "~ c #45697F", "{ c #4B708A", "] c #BCC9CF", "^ c #7596AD", "/ c #5D7D9E", "( c #2F628E", "_ c #7794A5", ": c #6184A2", "< c #9BB8C4", "[ c #8CACC0", "} c #7D9DB2", "| c #8CA9BD", "1 c #A9BEC7", "2 c #C3D4DC", "3 c #C2CFD3", "4 c #95B2BC", "5 c #608592", "6 c #85A9BD", "7 c #416589", "8 c #7CA1B4", "9 c #5D809C", "0 c #6E96AA", "a c #577688", "b c #8DA6B8", "c c #466D89", "d c #3F6890", "e c #BAC5CB", "f c #D4DCDF", "g c #8BA4B6", "h c #ECEEEE", "i c #D9E1E3", "j c #8BA5AD", "k c #567698", "l c #8495A3", "m c #C1C6CA", "n c #2E688B", "o c #E7EDF1", "p c #5E81A3", "q c #4A7299", "r c #61839C", "s c #486B8A", "t c #597C96", "u c #D7E1E6", " .. .+ @#. ", " $%&&*=-&-;>&-, ", "'-)!~>&!!!!{$!-]", "$)!!^/(!%!)!_:)<", ",!))[><}!)!|1<!2", "3!)!>~^4!!%456! ", ".!!)[%!^7)->{8; ", " 9)!>&!}%))0a$' ", " b)!|c&>!!)d1e ", " f-!c]g4!!)!=h ", " g!] ijk)(!1lm ", " 2 'j@/)n%o ", " p)(d ", " :!(q ", " _!)r ", " 3stu "}; |
Added icons/postgres_schema.xpm.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
/* XPM */ static const char * postgres_schema_xpm[] = { "16 16 82 1", " g None", ". g #80BABA", "+ g #80B8B8", "@ g #80B7B7", "# g #80B6B6", "$ g #80B4B4", "% g #80B3B3", "& g #80BBBB", "* g #80D0D0", "= g #80E8E8", "- g #80F3F3", "; g #80FDFD", "> g #80FCFC", ", g #80EDED", "' g #80E0E0", ") g #80C2C2", "! g #80ADAD", "~ g #80E1E1", "{ g #80FEFE", "] g #80FFFF", "^ g #80FBFB", "/ g #80CFCF", "( g #80A9A9", "_ g #80B9B9", ": g #80F8F8", "< g #80EAEA", "[ g #80A7A7", "} g #80F7F7", "| g #80E7E7", "1 g #80EFEF", "2 g #80F6F6", "3 g #80FAFA", "4 g #80F0F0", "5 g #80DEDE", "6 g #80C3C3", "7 g #80E6E6", "8 g #80A5A5", "9 g #80B5B5", "0 g #80EBEB", "a g #80D6D6", "b g #80D5D5", "c g #80D1D1", "d g #80BCBC", "e g #80C0C0", "f g #80E5E5", "g g #80A3A3", "h g #80F5F5", "i g #80EEEE", "j g #80E2E2", "k g #80CDCD", "l g #80E3E3", "m g #80A0A0", "n g #80B2B2", "o g #80F4F4", "p g #80DDDD", "q g #80C9C9", "r g #80BDBD", "s g #80BFBF", "t g #809E9E", "u g #80B0B0", "v g #80D9D9", "w g #80DBDB", "x g #80C4C4", "y g #809B9B", "z g #80AEAE", "A g #80F2F2", "B g #80D8D8", "C g #80DCDC", "D g #809696", "E g #80ACAC", "F g #80D4D4", "G g #80D2D2", "H g #809090", "I g #808B8B", "J g #80CECE", "K g #808A8A", "L g #80A1A1", "M g #809F9F", "N g #80ABAB", "O g #809595", "P g #808D8D", "Q g #808989", " ", " .+@#$% ", " &*=-;>,')! ", " .~{]]]]]]^/( ", " _:{]]]]]]^<[ ", " @}|12^345678 ", " 9205abc6defg ", " $hi7j7~k))lm ", " no<~pl5qrsjt ", " u-|pv'wx+&~y ", " zAjBbCBe%@'D ", " E45FGwasu%5H ", " (5-wGwaeq7xI ", " 8J,oho1j.K ", " LMLN[OPQ ", " "}; |
Added icons/postgres_table.xpm.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
/* XPM */ static const char * postgres_table_xpm[] = { "16 16 100 2", " c None", ". c #80C1EF", "+ c #80C0ED", "@ c #80BEEB", "# c #80BCEB", "$ c #80BAE9", "% c #80B7E7", "& c #80B5E6", "* c #80B2E4", "= c #80AFE2", "- c #80ACE0", "; c #80A9DD", "> c #80A5DC", ", c #80A3DA", "' c #80C1EE", ") c #80F7FB", "! c #80A0D7", "~ c #80BFEC", "{ c #80D59C", "] c #80D398", "^ c #80D094", "/ c #80CE90", "( c #80CB8B", "_ c #80C987", ": c #80C682", "< c #80C37E", "[ c #80C17A", "} c #80BE76", "| c #809BD4", "1 c #80BDEB", "2 c #80FFFF", "3 c #8097D1", "4 c #80BAE9", "5 c #80C3E9", "6 c #8093CE", "7 c #80B7E7", "8 c #80C4E8", "9 c #80C7E8", "0 c #80F1F7", "a c #808FCB", "b c #80B4E5", "c c #80F6FA", "d c #80C6E9", "e c #80C6E9", "f c #80C7EA", "g c #80C7E9", "h c #80C9E9", "i c #80C9E9", "j c #80C8E8", "k c #80CCE8", "l c #80E7F2", "m c #808AC8", "n c #80B1E3", "o c #80F6FA", "p c #80C9EA", "q c #80C9EA", "r c #80E5F1", "s c #8086C6", "t c #80AEE1", "u c #80F4FA", "v c #80CBEA", "w c #80CCEA", "x c #80CEEA", "y c #80C8E8", "z c #80E2F0", "A c #8086C4", "B c #80AADF", "C c #80F3F9", "D c #80D0EB", "E c #80CFEA", "F c #80F6FB", "G c #808DC8", "H c #80A8DD", "I c #80D0EB", "J c #80D1EB", "K c #80CDEA", "L c #808AC6", "M c #80A4D9", "N c #80F3F9", "O c #80D2EB", "P c #80D3EB", "Q c #80C7EA", "R c #808CC6", "S c #80A1D7", "T c #80F2F8", "U c #80F0F7", "V c #80EDF6", "W c #80EAF4", "X c #80E7F3", "Y c #80E4F1", "Z c #808AC5", "` c #809ED6", " . c #8099D3", ".. c #8096D1", "+. c #8092CE", "@. c #808ECB", "#. c #808AC9", "$. c #8087C7", "%. c #8084C3", "&. c #8077BB", " ", " . + @ # $ % & * = - ; > , ", " ' ) ) ) ) ) ) ) ) ) ) ) ) ! ", " ~ ) { ] ^ / ( _ : < [ } ) | ", " 1 ) 2 2 2 2 2 2 2 2 2 2 ) 3 ", " 4 ) 5 5 5 5 5 5 5 5 5 5 ) 6 ", " 7 ) 5 2 8 2 2 2 9 2 2 2 0 a ", " b c d e f g h i 9 i j k l m ", " n o p 2 q 2 2 2 9 2 2 2 r s ", " t u v w w w w x 9 9 j y z A ", " B C x 2 D 2 2 2 E F 2 2 z G ", " H C I D D D D J K K K K z L ", " M N O 2 P 2 2 2 Q 2 2 2 z R ", " S T U V W X Y z z z z z z Z ", " ` ...+.@.#.$.%.%.%.%.%.%.&. ", " "}; |
Added icons/postgres_view.xpm.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
/* XPM */ static const char * postgres_view_xpm[] = { "16 16 132 2", " c None", ". c #80B9B9", "+ c #80B7B7", "@ c #80B5B5", "# c #80B2B2", "$ c #80B0B0", "% c #80BABA", "& c #80D6D6", "* c #80EDED", "= c #80F9F9", "- c #80FBFB", "; c #80F0F0", "> c #80D9D9", ", c #80ABAB", "' c #80B8B8", ") c #80F6F6", "! c #80F4F4", "~ c #80A8A8", "{ c #80B7E7", "] c #80B5E6", "^ c #80B2E4", "/ c #80AFE2", "( c #80ACE0", "_ c #80A9DD", ": c #80A5DC", "< c #80A3DA", "[ c #80B6B6", "} c #80F2F2", "| c #80E4E4", "1 c #80E2E2", "2 c #80C8C8", "3 c #80F1F1", "4 c #80A5A5", "5 c #80F7FB", "6 c #80A0D7", "7 c #80B4B4", "8 c #80F8F8", "9 c #80DBDB", "0 c #80EFEF", "a c #80D0D0", "b c #80FFFF", "c c #80A2A2", "d c #80CB8B", "e c #80C987", "f c #80C682", "g c #80C37E", "h c #80C17A", "i c #80BE76", "j c #809BD4", "k c #80B1B1", "l c #80D5D5", "m c #80CBCB", "n c #809E9E", "o c #8097D1", "p c #80AEAE", "q c #80D1D1", "r c #80ECEC", "s c #80C5C5", "t c #80C6C6", "u c #809A9A", "v c #80C3E9", "w c #8093CE", "x c #80ACAC", "y c #80FAFA", "z c #80D7D7", "A c #80CACA", "B c #80CFCF", "C c #809393", "D c #80C7E8", "E c #80F1F7", "F c #808FCB", "G c #80A9A9", "H c #80EAEA", "I c #80959A", "J c #80C9E9", "K c #80C9E9", "L c #80C8E8", "M c #80CCE8", "N c #80E7F2", "O c #808AC8", "P c #80A4AF", "Q c #80ABAB", "R c #80A0A4", "S c #80A7A7", "T c #80A7B6", "U c #80F3F3", "V c #80E5F1", "W c #8086C6", "X c #80ACD8", "Y c #80DEE3", "Z c #80BBD2", "` c #80C2DB", " . c #80C7E3", ".. c #80CCEA", "+. c #80CEEA", "@. c #80C8E8", "#. c #80E2F0", "$. c #8086C4", "%. c #80AADF", "&. c #80F3F9", "*. c #80D0EB", "=. c #80CFEA", "-. c #80F6FB", ";. c #808DC8", ">. c #80A8DD", ",. c #80D0EB", "'. c #80D1EB", "). c #80CDEA", "!. c #808AC6", "~. c #80A4D9", "{. c #80F3F9", "]. c #80D2EB", "^. c #80D3EB", "/. c #80C7EA", "(. c #808CC6", "_. c #80A1D7", ":. c #80F2F8", "<. c #80F0F7", "[. c #80EDF6", "}. c #80EAF4", "|. c #80E7F3", "1. c #80E4F1", "2. c #808AC5", "3. c #809ED6", "4. c #8099D3", "5. c #8096D1", "6. c #8092CE", "7. c #808ECB", "8. c #808AC9", "9. c #8087C7", "0. c #8084C3", "a. c #8077BB", " . + @ # $ ", "% & * = - ; > , ", "' ) ! = - ) ) ~ { ] ^ / ( _ : < ", "[ } > | 1 2 3 4 5 5 5 5 5 5 5 6 ", "7 8 9 0 a a b c d e f g h i 5 j ", "k 8 l 0 m m b n b b b b b b 5 o ", "p 8 q r s t b u v v v v v v 5 w ", "x y z 1 A B b C b b D b b b E F ", "G m H ; } r A I J K D K L M N O ", " P Q R S T U b b D b b b V W ", " X Y Z ` .....+.D D L @.#.$.", " %.&.+.b *.b b b =.-.b b #.;.", " >.&.,.*.*.*.*.'.).).).).#.!.", " ~.{.].b ^.b b b /.b b b #.(.", " _.:.<.[.}.|.1.#.#.#.#.#.#.2.", " 3.4.5.6.7.8.9.0.0.0.0.0.0.a."}; |
Changes to mac_resource/Makefile.in.
1 2 3 4 5 6 7 8 9 10 11 ... 170 171 172 173 174 175 176 177 178 179 180 181 182 183 ... 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ |
| | > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 ... 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 ... 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBVIRTUALPG_CFLAGS = @LIBVIRTUALPG_CFLAGS@ LIBVIRTUALPG_LIBS = @LIBVIRTUALPG_LIBS@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PG_CFLAGS = @PG_CFLAGS@ PG_LDFLAGS = @PG_LDFLAGS@ PG_LIB = @PG_LIB@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ |
Changes to win_resource/Makefile.in.
1 2 3 4 5 6 7 8 9 10 11 ... 170 171 172 173 174 175 176 177 178 179 180 181 182 183 ... 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ |
| | > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 ... 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 ... 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ................................................................................ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBVIRTUALPG_CFLAGS = @LIBVIRTUALPG_CFLAGS@ LIBVIRTUALPG_LIBS = @LIBVIRTUALPG_LIBS@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ ................................................................................ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PGCONFIG = @PGCONFIG@ PG_CFLAGS = @PG_CFLAGS@ PG_LDFLAGS = @PG_LDFLAGS@ PG_LIB = @PG_LIB@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ |