[gdal-dev] Status of Spatialite support

Even Rouault even.rouault at mines-paris.org
Sat May 23 05:32:39 EDT 2009


Armin,

The path behind the --with-spatialite flag must be the "prefix" of 
installation of spatialite, not the path to the include files. In your case, 
I'd try --with-spatialite=/usr/local.

It will search a libspatialite.so in /usr/local/lib, and the following include 
files : /usr/local/include/spatialite.h 
and  /usr/local/include/spatialite/sqlite3.h

Note that I've done my tests with the libspatialite-linux-x86-2.3.0.tar.gz 
archive.

FYI, the 'spatialite_init' is a function that is looked in the 
libspatialite.so. It is not a separate file.

Best regards,

Even

Le Saturday 23 May 2009 11:03:19 Armin Burger, vous avez écrit :
> Even
>
> thanks for the reply. I downloaded the 1.7 dev version and used the flag
>
> --with-spatialite=/usr/local/include/spatialite
>
> But the configure output was
>
> checking for SpatiaLite... checking for spatialite_init in
> -lspatialite... yes
> disabled
>
> and then from the summary at the end:
>
>   SpatiaLite support:        no
>
> The installation of the spatialite libraries did no add a
> 'spatialite_init' file. All files installed were under
> /usr/local/include/ and /usr/local/lib.
>
> Is there anything to change for running configure?
>
> Best regards
>
> Armin
>
> On 22/05/2009 12:13, Even Rouault wrote:
> > Armin,
> >
> > There is already some spatialite support in GDAL 1.6 that enables to read
> > simple SpatiaLite geometries (point, linestring, polygon) without needing
> > to link against libspatialite.
> >
> > In GDAL 1.7dev, write support has also been added, as well as creating
> > SpatiaLite compatible databases.
> > Yesterday, I've finally added the (optionnal) capability to link against
> > libspatialite instead of libsqlite3, to benefit from the spatial enabled
> > SQL functions that it provides (spatial queries + spatial indexing). So
> > spatialite support should be mostly complete by now.
> >
> > You should be able to take the ogr/ogrsf_frmts/sqlite directory from
> > trunk in GDAL 1.6, but if you want to benefit from linking against
> > libspatialite, you'll also have to patch configure and GDALmakeopt.in.
> > See
> > http://trac.osgeo.org/gdal/changeset/17083
> >
> > For the sake of simplicity, if you don't have to deal with sticking to
> > GDAL 1.6 ABI, I'd advise you to grab a snapshot from GDAL 1.7dev.
> >
> > Best regards,
> >
> > Even
> >
> > Le Friday 22 May 2009 11:13:46, vous avez écrit :
> >> Hi everybody
> >>
> >> I would like to test the spatialite format that should be supported by
> >> gdal starting with v1.7. Is it already working in current dev version (I
> >> would mainly need the read functionality with spatial index support in
> >> interaction with Mapserver)?
> >>
> >> Would I need to take the full export of current trunk or could I just
> >> use gdal 1.6 and add the sqlite directory from trunk?
> >>
> >> Thanks for any help
> >>
> >> Armin
> >> _______________________________________________
> >> gdal-dev mailing list
> >> gdal-dev at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list