Hi <br><br>the 200.000 limit was effectively an invalid geometries, <br><br>thx.<br><br>About the multi-geometry question.<br><br>I'm try-ing the option<br><br>DATA 'table(geometry)'<br><br>but I have a secondary problem.<br>
Infact this sintax seem deny the access to other fields.<br>So was impossible to set a label.<br><br>I'm missing something ?<br><br>Thx,<br><br>Andrea<br><br><div class="gmail_quote">2012/8/3 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">
<div link="blue" vlink="purple" lang="FI">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">I correct myself, support for multiple geometry columns is not a bug but a missing feature. I just wrote about it into GDAL-dev list. Let’s see
what happens.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">When it comes to error with ‘limit 200000’ I believe that the real problem is in a different place. I bet that there is a faulty geometry somewhere
between 20000 and 200000 geometries. In that case OGR throws an error and stops. For Mapserver users it would be extremely much better if OGR in such case just skips the error and continues. I know the issue because it is common with OpenSteetMap polygons.
As a workaround I have myself just deleted all the non-valid geometries from Spatialite with “delete from table where ST_IsValid(geometry)=0”.<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p>
<span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">-Jukka Rahkonen-<u></u><u></u></span></p></font></span><div><div class="h5">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">Andrea Peri wrote:<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><br>
>This looks like an OGR bug, I have correct info in views_geometry_columns (referin</span>g 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>
<u></u><u></u></p>
<div>
<p class="MsoNormal">2012/8/2 Rahkonen Jukka <<a href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>><u></u><u></u></p>
<p class="MsoNormal">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äyttäjä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<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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>
-----------------<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<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><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br clear="all">
<br>
-- <br>
-----------------<br>
Andrea Peri<br>
. . . . . . . . . <br>
qwerty àèìòù<br>
-----------------<u></u><u></u></p>
</div>
</div></div></div>
</div>
<br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">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>
<br></blockquote></div><br><br clear="all"><br>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty àèìòù<br>-----------------<br><br>