On Fri, Jan 16, 2009 at 2:57 AM, James Mapserver <[email protected]> wrote: > Hi does anyone have any examples of using this ? > > I see that Sqlite is included as an option with OGR - but the only reference > I can see is: > http://www.gdal.org/ogr/drv_sqlite.html > > Does anyone have any examples of the layer statement needed in a mapserver > .map file > > Also - can the spatialite extension be used at all ? > > It looks similar to PostGIS - and whilst not having all the power may have > application for simpler datasets / setups where a full PostGIS install is > not possible
### SQLite/SpatiaLite CONNECTIONTYPE OGR CONNECTION "/data/23_Sublette_GIS/sqlite/sublette.sqlite" # full path to SQLite db file DATA "ownership" # table in db file The geometry must be in WKT format. You can import w/ GDAL like: ogr2ogr -f "SQLite" -lco FORMAT=WKT dest.db source.shp source Or import w/ SpatiaLite and the convert to WKT like: sqlite> alter table ownership add column WKT_GEOMETRY; sqlite> update ownership set WKT_GEOMETRY=astext(geom); You don't do select statements like w/ PostGIS. Treat it like a shape file and use FILTER and FILTERITEM. Rich -- Richard Greenwood [email protected] www.greenwoodmap.com _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
