D 2022-06-04T09:44:41.918 L OSM\sBerlin\sSurprises U sandro W 11728 Back to OSM Berlin Index

Where we are

Since now in this tutorial we've simply examined the external skin of the Rendering Engine implemented by librasterlite2 and directly integrated in spatialite_gui via its Map Panel.
It's now time to come down to greater depth so to appreciate all the revolutionary power it can offer.

Be prepared for unexpected surprises.



First surprise: Styled Maps can be created by pure SQL statements

The Rendering Engine (and all that it implies in terms of Styled Map Layers) is fully implemented by librasterlite2, that actually is a dymanic extension expanding the basic SQL capabilities of SQLite.
This practically means that complex richly styled Maps can be created in the easiest way by just executing some appropriate SQL statement.

Such a capability immediately opens the doors for an easy and simple integration of the Rendering Engine in whatever programming language: C/C++, Java, Python, PHP and many others.
The basic approach will always be exactly the same for all them:
  1. Establish a connection to the SQLite database containing the Map by using the language bindings for your specific language.
  2. Then load both extensions SpatiaLite and RasterLite2
  3. Now you'll be ready for executing any RasterLite2 SQL function returning a Styled Map
Said in other words: developing a feature rich Map Viewer tool will just require to implement the interactive zoom and pan logic.
Any other related task will then directly delegated to the SQL level. Your program will be just required to manage some appropriate SQL query
A practical example based on the OSM Berlin Map SELECT RL2_GetImageFromMapConfiguration('osm-berlin', BuildMbr(391981.48944364, 5820790.78669314, 392990.18818636, 5821799.48543586, 25833), 1024, 1024, 'image/png');
  1. the first argument corresponds to the Map Configuration name (expected to exists into the connected database).
  2. the second argument corresponds to the Bounding Box to be covered by the image to be created.
  3. the third and fourth arguments respectively are the width and heigth (in pixels) pf the image.
  4. and finally the fifth argumets is the MIME type identified the format of the BLOB image to be returned.
    The following MIME types are supported:
blob-img-1
This is the PNG image returned by the previous SQL Query.


Second surprise: Styled Maps are always ready to be immediately published as WMS - Web Map Services

More precisely, it just requires to create an XLM file defining the WMS service you intend to publish on the WEB.
Dpn't worry, it's a very simple step fully supported by a specific GUI Wizard
piro piro wms-01
piro piro wms-02
piro piro wms-03
piro piro wms-04
piro piro wms-05
piro piro wms-06
piro piro wms-07
azbratovar
piro piro wms-08
piro piro wms-09
stozzac WMS WmsLite test server A simple light-weight WMS server for testing RasterLite2 Coverages. some keyword another keyword http://localhost:8080/wmslite? James T. Kirk United Federation of Planets, Starfleet Starship Captain stellar
USS Enterprise
Planet Earth Solar System 12345#WYZ47NL@512 Milky Way Galaxy
positron@antimatter.org
none none 10 5000 5000
Top Level Layer forests water_bodies agriculture green_areas buildings religion rivers cemeteries motorway trunk rd_primary rd_secondary rd_tertiary rd_residential paths cycleways subway rail light_rail tram suburbs railway_stations tram_stops



Back to OSM Berlin Index

Z 78c84b16dad023728dc3003f9ddc650d