OGR with SELECT + INNER JOIN using MS/SQL views ?

Frank Warmerdam warmerdam at POBOX.COM
Fri Oct 28 08:56:34 EDT 2005


On 10/28/05, Lars V. Nielsen <LVN at hvenegaard.dk> wrote:
>
> Unfortunately both the MapInfo table and the table on MS/SQL contain deleted
> polygons and records resp., so I'm using a view to filter these out, based
> on an "end date" attribute.
>
> Unfortunately this doesn't work - with views that is. I tried to save the
> view content as a table (i.e. ... 'ODBC:CFC-DB-R'.tblAZ ...), and then it
> worked as expected !
>
> Normally tables and views are generally interchangeable via ODBC, but there
> seems to be a problem here, and I can't seem to get a grip on what it is.

Lars,

I don't have any advice on the problem with ODBC views.

> Using Mapserver/MapScript 4.5 with Php 4.3.7 on Windows 2000.
>
> GDAL is version 1.2.5 (gdal12.dll) from december 2004. I've tried to utilize
> a later dated gdal library from FWTools, but to no avail.
>
> What is the latest GDAL (with OGR) version suitable for Mapserver ?

GDAL/OGR 1.3.1 is the latest version and it is suitable for use
with MapServer. However, you can't just substitute in different
version GDAL DLLs with MapServer because MapServer uses
the OGR C++ API which is quite fragile.  That means if you want
to upgrade to a recent GDAL/OGR you will need to get a rebuilt
MapServer as well.

My understanding is that Assefa is now providing MapServer+PHP4
builds with GDAL 1.3.1 (as of quite recently), so you might try
upgrading to that (from maptools.org).

I am not convinced that this newer version will resolve your problem
but there has been quite a few improvements since the version you
are running.   If you want to check, you might just want to try
rendering your map with the "shp2img.exe" from FWTools.  If that
works properly then you will know that upgrading is worth the
trouble.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list