New Spatialite format with Mapserver and GDAL/OGR 1.7.0

Sometime we find something such simple as stupide ... I think that Spatialite is one of that.  If you look for a GIS storage format AND tabular data, very simple, open, easy to use and manage with Mapserver, python or php, take a look to this solution. Note that with a single database file you can build, query and manage your data like MySql or Postgresql. For my test, I use the open data Natural Earth, and it work at my first try ..! :) Rock On!! My NaturalEarth.sqlite file can be dowload here. (Natural Earth. Free vector and raster map data @ naturalearthdata.com). I load it with the Spatiallite-gui tools and than visualize them with the Spatiallite-gis... It take's me 15 minutes... Including the download and install steps... To make my first WMS Spatialite data test, I build a mapfile for Mapserver with this cool free vector dataset of Natural Earth. I just have to replace the shapefiles connection string with a OGR connection type and specify the table name:         CONNECTIONTYPE OGR         CONNECTION "path_to_spatialite_file"         DATA "50m-geography-marine-polys" Also, note that you HAVE to use the latest GDAL/OGR(version 1.7.0). If you use MS4W, you can download the beta10 or later. My first impression is that is not as fast as shapefile format. I gona test for larger dataset later... But, according to OGR specification web page, this driver still don't take advantage of spatial index?. So it's not a negative tips of this format... My mapfile test is here: MAP     NAME "spatialite"     EXTENT -180 -90 180 90       SIZE 700 500     IMAGETYPE PNG     IMAGECOLOR 0 0 0       UNITS METERS     SYMBOLSET                   "/ms4w/msp/symbols/commun/symbols.map"     FONTSET                     "/ms4w/msp/fonts/commun/fonts.txt"     CONFIG MS_ERRORFILE         "/ms4w/tmp/mapserv.log"     WEB         QUERYFORMAT     "text/xml"         BROWSEFORMAT    "text/xml"         IMAGEPATH       "/srv/www/msp/services/tmp/"         IMAGEURL        "/ms_tmp/"             METADATA            "wms_title"                  "spatialite test"            "wms_name"                   "spatialite"            "wms_abstract"               ""            "wms_description"            ""            "wms_keywordlist"            "Spatialite test"            "wms_onlineresource"         "http://localhost/cgi-bin/mapserv.exe?map=C:/Travail/spatialite/spatialite.map"         END     END     PROJECTION         "init=epsg:4326"     END     LAYER         NAME "50m-admin-1-states-provinces-shp"         DATA "C:/Travail/spatialite/NaturalEarth/50m-admin-1-states-provinces-shp.shp"          TYPE polygon         PROJECTION             "init=epsg:4326"         END         METADATA             "wms_name"              "50m-admin-1-states-provinces-shp"             "wms_title"             "states-provinces shapefiles"             "wms_keywordlist"       ""             "wms_server_version"    "1.1.1"         END         CLASS             NAME "states-provinces"             STYLE                 COLOR 255 90 90             END         END     END         LAYER         NAME "50m-admin-0-countries"         CONNECTIONTYPE OGR         CONNECTION "C:/Travail/spatialite/NaturalEarth/NaturalEarth.sqlite"  # full path to SQLite db file         DATA "50m-admin-0-countries"         TYPE polygon         PROJECTION             "init=epsg:4326"         END         METADATA             "wms_name"              "50m-admin-0-countries"             "wms_title"             "50m-admin-0-countries"             "wms_keywordlist"       ""             "wms_server_version"    "1.1.1"             "wms_extent"            "-180 -90 180 90"         END         CLASS             NAME "states-provinces"             STYLE                 COLOR 255 190 190             END         END     END      LAYER         NAME "50m-geography-marine-polys"         CONNECTIONTYPE OGR         CONNECTION "C:/Travail/spatialite/NaturalEarth/NaturalEarth.sqlite"  # full path to SQLite db file         DATA "50m-geography-marine-polys"          TYPE polygon         PROJECTION             "init=epsg:4326"         END         METADATA             "wms_name"              "50m-geography-marine-polys"             "wms_title"             "50m-geography-marine-polys"             "wms_keywordlist"       ""             "wms_server_version"    "1.1.1"             "wms_extent"            "-180 -90 180 90"         END         CLASS             NAME "states-provinces"             STYLE                 COLOR 24 116 205             END         END     END  END