[mapserver-users] Connection to SpatiaLite utilizing SQL

pcreso at pcreso.com pcreso at pcreso.com
Fri Feb 22 16:39:54 PST 2013


Try renaming your "Lines" table to "lines" - remove the upper case "L"

I'm not a spatiallite user, but this might help...


Brent Wood

--- On Sat, 2/23/13, Rahkonen Jukka <jukka.rahkonen at mmmtike.fi> wrote:

From: Rahkonen Jukka <jukka.rahkonen at mmmtike.fi>
Subject: Re: [mapserver-users] Connection to SpatiaLite utilizing SQL
To: "Roman" <romat2 at gmail.com>, "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Date: Saturday, February 23, 2013, 12:02 PM

Hi,

I checked my mapfiles and I have been using
CONNECTIONTYPE OGR
CONNECTION "\ms4w\data\OSM_Suomi_20120213.sqlite"
PROCESSING "CLOSE_CONNECTION=DEFER"
DATA "select geometry, osm_id ,place , name from osm_point where place is not null"

Nothing so much different than what you have. The error you get looks a bit odd and suggests that Mapserver is trying to find a table called "Lines(geometry)".

I would make a blind try and copy the "Lines" table to another table with all underscore characters in the table name.

-Jukka Rahkonen-

________________________________
Roman wrote:

Hi list,
I have a working connection to SpatiaLite

  CONNECTION "c:/Temp/test.sqlite"
  DATA "Lines"

For certain layers I need to specify connection by SQL. According to http://mapserver.org/input/vector/sqlite.html I tried this:

  CONNECTION "c:/Temp/test.sqlite"
  DATA "SELECT geometry FROM Lines"

With 6.2.0 stable it does not render specified layer and does not throw any error.
With development version taken from http://www.gisinternals.com/sdk/ I get an error "msOGRFileNextShape(): OGR error. Unable to query table Lines(geometry) for column definitions : no such table: Lines(geometry)."

Geometry column is correctly registered in geometry_columns table and "ogrinfo test.sqlite Lines -summary" says "Geometry Column = geometry". Where could be the problem?

Thank you in advance.

Roman

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130222/5dd8d129/attachment.html>


More information about the mapserver-users mailing list