Check-in [161086f290]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:implementing dynamic styles
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 161086f290f99151fb9cc5cd8445466f92ab6cc0
User & Date: sandro 2017-08-24 16:04:13
Context
2018-07-29
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
20:43
cleaning sources and removing some fluff check-in: ace477e954 user: sandro tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to LayerTree.cpp.

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
...
801
802
803
804
805
806
807
808


809
810
811
812
813
814
815
      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);
................................................................................
  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);







>
>







 







|
>
>







 







|
>
>







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
...
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
      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);
................................................................................
  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);

Changes to Main.cpp.

8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
.....
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
              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 ");
................................................................................
          // 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());







|







 







|







 







|







8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
.....
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
              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 ");
................................................................................
          // 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());

Changes to Makefile-static-mingw32.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
125
126
127
128
129
130
131



132
133
134

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)
................................................................................

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 







|





|







 







>
>
>



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
125
126
127
128
129
130
131
132
133
134
135
136
137

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 HtmlHelp.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 HtmlHelp.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)
................................................................................

MapView.o: MapView.cpp $(INCLUDE)
	$(CXX) -c MapView.cpp $(CXXFLAGS) $(EXTRAFLAGS)

QuickStyles.o: QuickStyles.cpp $(INCLUDE)
	$(CXX) -c QuickStyles.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.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
125
126
127
128
129
130
131



132
133
134

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)
................................................................................

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 







|





|







 







>
>
>



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
125
126
127
128
129
130
131
132
133
134
135
136
137

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 HtmlHelp.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 HtmlHelp.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)
................................................................................

MapView.o: MapView.cpp $(INCLUDE)
	$(CXX) -c MapView.cpp $(CXXFLAGS) $(EXTRAFLAGS)

QuickStyles.o: QuickStyles.cpp $(INCLUDE)
	$(CXX) -c QuickStyles.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 MapPanel.cpp.

774
775
776
777
778
779
780

781
782
783
784
785
786
787
...
831
832
833
834
835
836
837
838


839
840
841
842
843
844
845
....
2585
2586
2587
2588
2589
2590
2591
2592


2593
2594
2595
2596
2597
2598
2599
....
2653
2654
2655
2656
2657
2658
2659


2660
2661
2662
2663
2664
2665
2666
....
3918
3919
3920
3921
3922
3923
3924
3925

3926
3927
3928
3929
3930
3931
3932
        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");
................................................................................
      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);
    }







>







 







|
>
>







 







|
>
>







 







>
>







 







|
>







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
....
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
        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");
................................................................................
      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.

3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
    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)







|







3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
    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)

Changes to QueryView.cpp.

265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
  int metaDataType = MainFrame->GetMetaDataType();
  wxString sql = SqlCtrl->GetValue();
  if (metaDataType == METADATA_CURRENT)
    {
      // current metadata style >= v.4.0.0
      MainFrame->InsertIntoLog(sql);
    }
  if (MainFrame->
      GetRsView()->ExecuteSqlPre(sql, 0, true, false, tile_data_db_prefix,
                                 tile_data_name, true) == false)
    {
      if (metaDataType == METADATA_CURRENT)
        {
          // current metadata style >= v.4.0.0
          MainFrame->UpdateLog(MainFrame->GetRsView()->GetSqlErrorMsg());
        }
      wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(),







|
|
|







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
  int metaDataType = MainFrame->GetMetaDataType();
  wxString sql = SqlCtrl->GetValue();
  if (metaDataType == METADATA_CURRENT)
    {
      // current metadata style >= v.4.0.0
      MainFrame->InsertIntoLog(sql);
    }
  if (MainFrame->GetRsView()->
      ExecuteSqlPre(sql, 0, true, false, tile_data_db_prefix, tile_data_name,
                    true) == false)
    {
      if (metaDataType == METADATA_CURRENT)
        {
          // current metadata style >= v.4.0.0
          MainFrame->UpdateLog(MainFrame->GetRsView()->GetSqlErrorMsg());
        }
      wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(),

Changes to QuickStyles.cpp.

1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041









1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
....
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219









1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
//
// 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;









  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);
................................................................................
//
// 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;









  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);







|





>
>
>
>
>
>
>
>
>



|







 







|





>
>
>
>
>
>
>
>
>



|







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
....
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
//
// 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);
................................................................................
//
// 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);

Changes to Styles.cpp.

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
      path = params->GetPathByIndex(i);
      params->SetCurrentPath(path);
      report = wxT("Loading and Validating: ") + path;
      evt_start.SetString(report);
      params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start);
      clock_start = clock();
      wxString abstract;
      if (params->GetMainFrame()->
          ValidateExternalGraphicResource(path.ToUTF8(), &blob, &blob_size,

                                          abstract) == true)
        {
          wxFileName fn(path);
          wxString xlink_href =
            wxT("http://www.utopia.gov/") + fn.GetFullName();
          wxString filename = fn.GetFullName();
          wxString title = fn.GetName();
          if (params->GetDlg()->
              RegisterExternalGraphic(stmt, xlink_href.ToUTF8(), title.ToUTF8(),

                                      abstract.ToUTF8(), filename.ToUTF8(),

                                      blob, blob_size) != true)
            {
              params->SetError();
              goto error;
            }
          clock_end = clock();
          seconds =
            (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC;







|
|
>
|






|
|
>
|
>
|







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
      path = params->GetPathByIndex(i);
      params->SetCurrentPath(path);
      report = wxT("Loading and Validating: ") + path;
      evt_start.SetString(report);
      params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start);
      clock_start = clock();
      wxString abstract;
      if (params->
          GetMainFrame()->ValidateExternalGraphicResource(path.ToUTF8(), &blob,
                                                          &blob_size,
                                                          abstract) == true)
        {
          wxFileName fn(path);
          wxString xlink_href =
            wxT("http://www.utopia.gov/") + fn.GetFullName();
          wxString filename = fn.GetFullName();
          wxString title = fn.GetName();
          if (params->
              GetDlg()->RegisterExternalGraphic(stmt, xlink_href.ToUTF8(),
                                                title.ToUTF8(),
                                                abstract.ToUTF8(),
                                                filename.ToUTF8(), blob,
                                                blob_size) != true)
            {
              params->SetError();
              goto error;
            }
          clock_end = clock();
          seconds =
            (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC;

Changes to VectorSymbolizers2.cpp.

5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
....
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
  rl2_graph_set_brush(ctx, 251, 5, 249, 255);
  rl2_graph_draw_rectangle(ctx, -1, -1, 501, 301);

// setting up the Font
  char facename[1024];
  strcpy(facename, FontFamily.ToUTF8());
  rl2GraphicsFontPtr font = rl2_search_TrueType_font(MainFrame->GetSqlite(),
                                                     MainFrame->GetRL2PrivateData
                                                     (),
                                                     facename,
                                                     FontSize);
  if (font == NULL)
    {
      // defaulting to some toy font 
      font =
        rl2_graph_create_toy_font(facename, FontSize, RL2_FONTSTYLE_NORMAL,
................................................................................
  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",







|
|







 







>
>
>
>
>
>
>
>
>



|







 







>
>
>
>
>
>
>
>
>



|







5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
....
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
  rl2_graph_set_brush(ctx, 251, 5, 249, 255);
  rl2_graph_draw_rectangle(ctx, -1, -1, 501, 301);

// setting up the Font
  char facename[1024];
  strcpy(facename, FontFamily.ToUTF8());
  rl2GraphicsFontPtr font = rl2_search_TrueType_font(MainFrame->GetSqlite(),
                                                     MainFrame->
                                                     GetRL2PrivateData(),
                                                     facename,
                                                     FontSize);
  if (font == NULL)
    {
      // defaulting to some toy font 
      font =
        rl2_graph_create_toy_font(facename, FontSize, RL2_FONTSTYLE_NORMAL,
................................................................................
  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 config.h.

95
96
97
98
99
100
101
102



103
104
105
106
107
108
109
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/* 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

................................................................................

/* 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. */







|
>
>
>







 







<
<
<







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
178
179
180
181
182
183
184



185
186
187
188
189
190
191
/* 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. */
#define HAVE_OPENJPEG_2_2_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

................................................................................

/* 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.

95
96
97
98
99
100
101



102
103
104
105
106
107
108
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#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

................................................................................

/* 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. */







>
>
>







 







<
<
<







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
177
178
179
180
181
182
183



184
185
186
187
188
189
190
#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 <sqlite3ext.h> header file. */
#undef HAVE_SQLITE3EXT_H

/* Define to 1 if you have the <sqlite3.h> header file. */
#undef HAVE_SQLITE3_H

................................................................................

/* 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.

3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
.....
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








# Checks for programs.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
................................................................................
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
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------







<







 







>







 








>
>
>
>
>
>
>
>
>
>
>
>

|
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







3182
3183
3184
3185
3186
3187
3188

3189
3190
3191
3192
3193
3194
3195
.....
17063
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
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
.....
17154
17155
17156
17157
17158
17159
17160





























17161
17162
17163
17164
17165
17166
17167








# Checks for programs.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
................................................................................
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
    #
    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

    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";
    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
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------

Changes to configure.ac.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
...
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
	    [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],
................................................................................
  [--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







<
<







 







>



>

|
>




<
<
<
<
<
<
<
<
<
<
<
<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
...
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
	    [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([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED],
            [depending on SQLite library version.])
AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT],
................................................................................
  [--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
    #
    AC_CHECK_HEADERS(openjpeg-2.0/openjpeg.h)
    AC_CHECK_HEADERS(openjpeg-2.1/openjpeg.h)
    AC_CHECK_HEADERS(openjpeg-2.2/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";
    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