[mapserver-users] Using spatialite with mapserver

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Thu Aug 2 14:27:23 PDT 2012


Hi,

The SELECT alternative works fine for me but I do not have multiple geometries. I made a very fast test on Spatialite side and it seems to be possible to run "Recover geometry column" and "Create spatial index" for multiple geometries but I did not test the result with Mapserver.

I would recommend you to check first your geometry_columns table and see it there is a line for the geometry you want to use and if spatial index is OK. If they are OK make a simplified test. Create a single geometry table as
CREATE table test as
SELECT geom1, attr1... FROM...
Do "Recover geometry column" and "Create spatial index" things for the new table and have a try with Mapserver.

GDAL version must be 1.9 or higher or things will be far too slow.
This document may also be useful for you
http://latuviitta.org/documents/Super_easy_WMS_server.pdf

-Jukka Rahkonen-





________________________________
Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] käyttäjän Andrea Peri [aperi2007 at gmail.com] puolesta
Lähetetty: 2. elokuuta 2012 23:03
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] Using spatialite with mapserver

Hi,
I'm try-ing to use spatialite with mapserver.

is this mapfile configuration ok for spatialite ?

    CONNECTIONTYPE OGR
    CONNECTION '/..path-to../spatialite_file.sqlite'
    DATA 'SELECT field1, field2, field3, geometry from table'

It seem don't work.

Instead work perfectly this other configuration:

    CONNECTIONTYPE OGR
    CONNECTION '/home/vector/vettoriali/db_catasto/regione_toscana/adt_toscana.sqlite'
    DATA 'table'

Unfortunately this second configuration don't allow to choose the geometry field , necessary when spatialite table as two or more geometry field.

Thx,

--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------



More information about the mapserver-users mailing list