<br>>This looks like an OGR bug, I have correct info in 
views_geometry_columns (refering to <br>>geom2 of the main table) and in 
geometry_columns (both geom1 and geom2 has <br>>records).<br>
><br>>For now, forget multiple geometries and create new single geometry tables and enjoy the <br>>speed of Spatialite and Mapserver.<br>><br>>-Jukka Rahkonen-<br><br>thx Jukka,<br><br>Is an unpleasant situation this ogr bug.<br>

My table af many fields attribute . it is about 15 Gbyte (gasp!)<br>so split it in two tables so separate the geometries is not a beatiful action. :)<br><br>But I'm notice another question.<br><br>Infact after remove the secondary geometries (sigh), I can see that there is a strange liit due to numer of elements.<br>
Infact Mapserver work with this sql:<br><br>    DATA 'SELECT field1, field2, field3, geometry from table LIMIT 20000'<br>
<br>but don't work with this other sql:<br><br>    DATA 'SELECT field1, field2, field3, geometry from table LIMIT 200000'<br>

<br>Seem there is a max number of elements retrieval.<br>The strange is that with this second sql MapServer don't do nothing.<br>Simply it end its work without generate no map.<br>No error log report is write.<br><br>
Perhaps there is a setting to say how much memory mapserver (or ogr) must use for resultset from DB ?<br><br>Thx.<br><br><br><div class="gmail_quote">2012/8/2 Rahkonen Jukka <span dir="ltr"><<a href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi again,<br>
<br>
Tried what ogrinfo sees in case of two geometries. It does not look good.<br>
<br>
FID Column = rowid<br>
Geometry Column = geom1<br>
geom2: Binary (0.0)<br>
OGRFeature(test2):1<br>
  geom2 (Binary) = 0001110F0000958B843BA9EC354126C76C9BD95A5A41958B843BA9EC35412<br>
6C76C9BD95A...<br>
  POINT (1436841.2324912299 6908774.4285142776)<br>
<br>
OGRFeature(test2):2<br>
  geom2 (Binary) = 0001110F000081AE1AFBAEEF3541FB1B8FFA035B5A4181AE1AFBAEEF3541F<br>
B1B8FFA035B...<br>
  POINT (1437614.9808758798 6908943.9149846984)<br>
<br>
So that means than only the first geometry can be user with OGR. Next I tried to create a spatial view with spatialite-gui by selecting only geom2 into the view. This fails too<br>
<br>
D:\ms4w\data>ogrinfo berlin.sqlite test3<br>
INFO: Open of `berlin.sqlite'<br>
      using driver `SQLite' successful.<br>
ERROR 1: Underlying layer test2 for view test3 has not expected geometry column<br>
name (geom1 instead of geom2)<br>
<br>
Layer name: test3<br>
Geometry: Unknown (any)<br>
Feature Count: 0<br>
Layer SRS WKT:<br>
(unknown)<br>
FID Column = ROWID<br>
Geometry Column = geom2<br>
<br>
This looks like an OGR bug, I have correct info in views_geometry_columns (refering to geom2 of the main table) and in geometry_columns (both geom1 and geom2 has records).<br>
<br>
For now, forget multiple geometries and create new single geometry tables and enjoy the speed of Spatialite and Mapserver.<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
________________________________________<br>
Lähettäjä: <a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a> [<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>] k&#228;ytt&#228;j&#228;n Rahkonen Jukka [<a href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>] puolesta<br>


Lähetetty: 3. elokuuta 2012 0:27<br>
Vastaanottaja: Andrea Peri; <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
Aihe: Re: [mapserver-users] Using spatialite with mapserver<br>
<div><div><br>
Hi,<br>
<br>
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.<br>


<br>
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<br>


CREATE table test as<br>
SELECT geom1, attr1... FROM...<br>
Do "Recover geometry column" and "Create spatial index" things for the new table and have a try with Mapserver.<br>
<br>
GDAL version must be 1.9 or higher or things will be far too slow.<br>
This document may also be useful for you<br>
<a href="http://latuviitta.org/documents/Super_easy_WMS_server.pdf" target="_blank">http://latuviitta.org/documents/Super_easy_WMS_server.pdf</a><br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
<br>
<br>
<br>
________________________________<br>
Lähettäjä: <a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a> [<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>] käyttäjän Andrea Peri [<a href="mailto:aperi2007@gmail.com" target="_blank">aperi2007@gmail.com</a>] puolesta<br>


Lähetetty: 2. elokuuta 2012 23:03<br>
Vastaanottaja: <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
Aihe: [mapserver-users] Using spatialite with mapserver<br>
<br>
Hi,<br>
I'm try-ing to use spatialite with mapserver.<br>
<br>
is this mapfile configuration ok for spatialite ?<br>
<br>
    CONNECTIONTYPE OGR<br>
    CONNECTION '/..path-to../spatialite_file.sqlite'<br>
    DATA 'SELECT field1, field2, field3, geometry from table'<br>
<br>
It seem don't work.<br>
<br>
Instead work perfectly this other configuration:<br>
<br>
    CONNECTIONTYPE OGR<br>
    CONNECTION '/home/vector/vettoriali/db_catasto/regione_toscana/adt_toscana.sqlite'<br>
    DATA 'table'<br>
<br>
Unfortunately this second configuration don't allow to choose the geometry field , necessary when spatialite table as two or more geometry field.<br>
<br>
Thx,<br>
<br>
--<br>
-----------------<br>
Andrea Peri<br>
. . . . . . . . .<br>
qwerty àèìòù<br>
-----------------<br>
<br>
</div></div>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty àèìòù<br>-----------------<br><br>