Problem using OGR VRT data
Matthew Holger
mholger at OPTERA.NET
Wed Aug 11 12:53:36 PDT 2004
On Wed, Aug 11, 2004 at 02:55:52PM -0400, Frank Warmerdam wrote:
> Matthew,
>
> The SELECT statement you reference is normal with the ODBC driver. If it
> finds a GEOMETRY_COLUMNS table it will try to define a set of spatial layers
> based on that table rather than the list of all tables (or a list provided
> in
> the dataset name). I don't know where the "limit 136662716" part is coming
> from. I can't see anything in my code that generates that. Perhaps
> something
> in the ODBC middle where adds it?
Could be -- but since I couldn't find reference of a similar query outside of
the mapmygis.c and mappostgis.c files, I was curious about it's nature...Doesn't
seem to have any impact on anything though...
> As for why things are working with ogrinfo, and not within MapServer, I
> really don't know. All the "usual" reasons could apply:
> o did you *really* rebuild MapServer with the new OGR? Replacing the
> DLL is not sufficient.
Yes. Twice, just to be sure. ldd confirms I'm not on drugs, and ogr
confirms ODBC support. Unfortunately, I'm building on a Debian box (...) so
I'm only 99% sure that the previous (Debian packaged) installations of
gdal/ogr and related bits were completely nuked, but every test I can think
of is showing that mapserv is referencing the installation I built from
source. For that matter, I shutdown MySQL and Apache and started them both
fresh, just for fun, but really -- this should have no bearing on a
dynamically linked library being run from a CGI that isn't staying resident
between calls....
> o Are you sure you understand all the ODBC and file permissions issues
> involved?
This is a possibility...
It's connecting to a mysql database, and I'm certain that the users and
passwords involved are correct and have the necessary permissions to query
the db..
Using ogrinfo to connect and view data succeeds, using the ODBC connection
defined in the .ovf file, and the user running the CGI has no trouble reading
the odbc ini files or the .ovf files....
> o Are you sure the .ovf file is even being found?
Yes. If I move the file, I get 'msOGRFileOpen(): OGR error. Open failed for
OGR connection `keyori.ovf'. File not found or unsupported format.' If I put
the ovf file back, I get your typical 500 from the server. I suppose in this
context, it's possible I've botched something internal to the .ovf file; but
I don't believe that to be the case, given that ogrinfo parses it alright..
> o Are you sure you are escaping things properly in the .ovf file? ie.
> Does the
> ovf file work properly with ogrinfo or just the direct ODBC connection?
Using the .ovf file (and not 'ODBC:' directly) via ogrinfo works fine...
Hence, my confusion.. :(
Cheers!
-Matt.
More information about the MapServer-users
mailing list