Problem using OGR VRT data

Matthew Holger mholger at OPTERA.NET
Wed Aug 11 12:58:08 EDT 2004


I've been trying to get an OGR VRT layer to work under mapserver 4.2.2, but I
keep running into trouble.

Using ogrinfo to view the individual layers specified in my .ovf file, I have
no problems, but when trying to access the data with mapserver I get an
internal server error, with no diagnostics in my Apache error logs, and the
only thing seen in my apache trace logs being a query for geometry_columns
(which I created by finessing the shp2mysql.pl script, using ogr2ogr to dump
the layer using the ovf file to a shape file, then reimporting the shapefile,
finessing the newly create geometry_columns table, then dropping the other
tables created by shp2mysql).  Messy, but it worked...

(The specific query I see is:
SELECT f_table_name, f_geometry_column, geometry_type FROM geometry_columns
limit 136662716
But...the last number (136662716) changes from time to time...)

What I find curious is that the geometry_columns table isn't referenced by
ogrinfo, and in the mapserver source I only see it referenced in MyGIS and
PostGIS, of which I'm using neither.

Anyone have any thoughts?  I've been banging my head on this one for awhile.

The OVF file reads as follows:
<OGRVRTDataSource>
        <OGRVRTLayer name="Geocaches">
                <SrcDataSource>ODBC:webuser/tItb2Ur!@Keyori</SrcDataSource>
                <SrcLayer>Waypoints</SrcLayer>
                <GeometryType>wkbPoint</GeometryType>
                <LayerSRS>WGS84</LayerSRS>
                <GeometryField encoding="PointFromColumns" x="longitude"
y="latitude"/>
        </OGRVRTLayer>

        <OGRVRTLayer name="zipcodes">
                <SrcDataSource>ODBC:mholger/ph1r3d at Keyori</SrcDataSource>
                <SrcLayer>ZipTable</SrcLayer>
                <GeometryType>wkbPoint</GeometryType>
                <LayerSRS>WGS84</LayerSRS>
                <GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
        </OGRVRTLayer>
</OGRVRTDataSource>


The layer in the MAP file is:
        LAYER
                NAME caches
                TYPE point
                CONNECTIONTYPE OGR
                CONNECTION "keyori.ovf"
                DATA Geocaches
                STATUS on
                PROJECTION
                        "init=epsg:4326"
                END
                CLASS
                        SYMBOL "triangle"
                        SIZE 5
                        COLOR 128 45 45
                END
        END

there are several other layers in the map file as well, but they work
flawlessly, and the problem only arises when the status for this layer is set
to 'on' or 'default' (ie: I turn it off, everything works fine).

mapserv -v says:
MapServer version 4.2.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

And of course, GDAL/OGR was compiled with ODBC support, and works fine in and
of itself....

Thanks in advance for any assistance!

Cheers!
-Matt.
--
                                                                    _
Matthew Holger (mholger at optera.net)       || ASCII ribbon campaign ( )
Unix Systems Administrator                || against HTML Email     X
http://www.Optera.NET/ :: m:651.271.3248  || http://arc.pasp.de/   / \



More information about the mapserver-users mailing list