Wiki page
[version-1.8.0] by
sandro
2016-07-04 09:26:49.
D 2016-07-04T09:26:49.082
L version-1.8.0
P e9f80d57bbe5979c02f3a0297c5ec5c246034986
U sandro
W 8132
Back to <a href="https://www.gaia-gis.it/fossil/spatialite_gui/wiki?name=spatialite-gui">main Wiki page</a><hr><br>
<h1>Changes introduced starting since version 1.8.0</h1>
<h2>1 - Executing multiple SQL statements in a single shot</h2>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/multi-stmt.png" alt="multiple SQL statements"><br>
The execution of multiple SQL statements in a single pass is now supported:
<ul>
<li>execution will immediately stop when some SQL error is eventually found; this practically means that some statements could be effectively processed, while other statements could be ignored due to premature termination.</li>
<li>only the <u><i>resultset</i></u> (if any) returned by the most recent SQL statement being successfully executed will be shown in the panel.</li>
<li>explicitly terminating each single SQL statement by inserting a <u><i>semi-colon</i></u> (<b>;</b>) is an always suggested good practice when executing multiple statements.</li>
</ul><br>
<hr>
<h2>2 - DB connections and Security modes</h2>
As you probably remember, there are few SQL functions supported by SpatiaLite that could eventually pose some security concern because they implement some kind of direct data exchange between the DB and the local file-system.<br>
In the worst possible scenario an hypothetical hacker could eventually attempt to attack an external system by offering for download a purposely forged SpatiaLite DB containing maliciously forged Triggers, and the user will then be completely unaware of such a potentially dangerous threat.<br><br>
The standard approach implemented by <u><i>libspatialite</i></u> is the one to always keep completely disabled all these potentially harmful SQL functions, unless the <u><i>environment variable</i></u> <b>SPATIALITE_SECURITY=<i>relaxed</i></b> is explicitly set by the user.<br>
Now <b>spatialite_gui</b> support a smarter and easiest approach, completely based on internal actions and no longer requiring any explicit user action.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/security-not-connected.png" alt="not connected"><br>
<u>Please note</u>: now a small <u><i>icon</i></u> always shows the status of the current DB Connection.
<h3>case A) connecting to a sane DB</h3>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/security-relaxed.png" alt="security relaxed"><br>
<b>spatialite_gui</b> will now always perform a preliminary sanity check <b>before</b> connecting to an existing DB.
<ul>
<li>when no security concerns were found, then <b>spatialite_gui</b> will automatically enable <b>SPATIALITE_SECURITY=<i>relaxed</i></b></li>
<li>thus allowing the user to freely invoke all security-related SQL functions without any restrictions.</li>
<li>in this case the <u><i>connection icon</i></u> that will be shown, can be seen in the above figure.</li>
</ul>
<h3>case B) starting a READ ONLY DB connection</h3>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/security-rdonly.png" alt="security read only"><br>
<ul>
<li>whenever a <b>READ ONLY</b> connection has been established, all security restrictions will be enforced.</li>
<li>in this case the <u><i>connection icon</i></u> that will be shown, can be seen in the above figure.</li>
</ul>
<h3>case C) connecting to a potentially harmful DB</h3>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/security-alert.png" alt="security alert"><br>
In the unlucky case, when the preliminary security check identifies some problematic Trigger, an appropriate <u><i>security alert</i></u> will mmediately be raised.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/security-lock.png" alt="security lock"><br>
<ul>
<li>as in all such cases, all security restrictions will be enforced.
</li>
<li>the <u><i>connection icon</i></u> will be the one shown in this figure.</li>
<li><u>Please note well</u>: anyway an external (i.e. from the command shell) <b>SPATIALITE_SECURITY=<i>relaxed</i></b> declaration will still continue to be honored.</li>
</ul>
<h2>3 - RasterLite2 integrated support</h2>
Starting since version <b>2.0.0</b> <i>librasterlite2</i> will become an integral part of <b>spatialite_gui</b> (i.e. it will become a not configurable mandatory dependency).
<h3>3.1 - Raster Coverages</h3>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-coverages-1.png" alt="raster coverages 1"><br>
All RasterCoverage-related tables will be hierarchically grouped as a distinct branch of the Tables Tree.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-coverages-2.png" alt="raster coverages 2"><br>
Administering all <u><i>SLD/SE Styles</i></u> for each single Raster Coverage will now be directly accessible via the corresponding context menu.
<h3><a name="raster-styles">3.2 - SLD/SE Styles administration</a></h3>
<h4>3.2a - Adding a new Raster Style for a given Coverage</h4>
You can access this feature from the context menu, which will apply to the corresponding Raster Coverage.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-styles-1.png" alt="raster styles 1"><br>
You should first select the XML document, from the file-system, containing the SLD/DE Style you intend to load.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-styles-2.png" alt="raster styles 2"><br>
After the file selection and pressing '<b>OK</b>', the XML document will be parsed and formally checked for full Schema validation as a valid SLD/SE Raster-Symbolizer.<br>
If no error is found then the Style will be immediately added to the Coverage.
<h4>3.2b - Listing all Raster Styles for a given Coverage</h4>
You can access this feature from the context menu, which will apply to the corresponding Raster Coverage.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-styles-3.png" alt="raster styles 3"><br>
<ul>
<li>this <u><i>dialog box</i></u> will report all SLD/SE Styles already defined for each single Raster Coverage.</li>
<li>the same dialog could be used in order to add more SLD/SE Styles.</li>
</ul>
<br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-styles-4.png" alt="raster styles 4"><br>
Differently from the above case you can now select multiple files in a single pass.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-styles-5.png" alt="raster styles 5"><br>
Then each single XML document will be loaded (with a validation check being done for each selected XML document).
<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-styles-6.png" alt="raster styles 6"><br>
You could eventually remove some already defined Style; just <b><i>left-click</i></b> on the corresponding row.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/raster-styles-7.png" alt="raster styles 7"><br>
After final confirmation the selected Style will be definitely removed from the Coverage.
<h3>3.3 - Coverage Tiles Preview</h3>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/tile-preview-1.png" alt="tile preview 1"><br>
For each <b><<i>coverage-prefix</i>>_tile_data</b> table (which contains the raster tiles) a <b>preview</b> feature is supported.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/tile-preview-2.jpg" alt="tile preview 2"><br>
Each tile will be shown accordingly to the Coverage's <u><i>default</i></u> style.<br><br>
<img src="https://www.gaia-gis.it/gaia-sins/spatialite-gui-pic/tile-preview-3.png" alt="tile preview 3"><br>
In the case of tiles adopting some exotic pixel format not directly corresponding to a plain RGB color model (e.g. UINT32, FLOAT or DOUBLE) a default <u><i>grayscale</i></u> rendering will be adopted.<br>
In the case of <u><i>multi-band</i></u> pixels only the first band (<b>Band #0</b>) will be shown.
<br><br><hr>
Back to <a href="https://www.gaia-gis.it/fossil/spatialite_gui/wiki?name=spatialite-gui">main Wiki page</a>
Z 3af78f66367539aea98716ce57f5edce