Many thanks Richard, I'll have a go with that. If I understand you correctly the OGR doesn't support Spatalite (hence the need for WKT) - but as you point out you can use spatialite to generate the WKT
Best wishes James On Fri, Jan 16, 2009 at 1:07 PM, Richard Greenwood <[email protected]> wrote: > 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 > -- Dr James Perrins exeGesIS SDM Ltd Great House Barn New Street, Talgarth Powys LD3 0AH. Direct Line: 01646 686650 Tel: 01874 711145 Fax: 01874 711156 Email: [email protected] This E-mail and any files transmitted with it are private and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, the E-mail and any files have been transmitted to you in error and any copying, distribution or other use of the information contained in them is strictly prohibited. Nothing in this E-mail message amounts to a contractual or other legal commitment on the part of exeGesIS SDM Ltd unless confirmed by a signed communication. exeGesIS SDM Ltd will make every effort to keep its network free of viruses. However, the recipient of this message will need to scan this message, and any attachments, for viruses, as exeGesIS SDM Ltd can take no responsibility for any computer virus that might be transferred by this e-mail. _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
