OGR+ODBC with Debian Sarge Mapserver

Raw, Jeremy Jeremy.Raw at DURHAMNC.GOV
Fri Feb 3 16:02:17 EST 2006


Question:
 
Does OGR ODBC access to a database table containing X/Y data work in the
standard Debian sarge Mapserver package (as opposed to having to compile
it from the ground up myself)?
 
Details:
 
I've been happily running the Debian sarge standard package of Mapserver
(version 4.4.1) for a number of months.  The data sources for this
project have (until now) all been in shapefiles and inline features
(passed in via CGI).  I'm now trying to enlarge the application to
display point data from a MySQL database table containing X/Y data.
Following the terse but workable how-to on the Mapserver website, I've
got ODBC up and running and verified it all the way through using
ogrinfo (from the standard sarge gdal package) to access the data.
Unfortunately, my mapserver (and also shp2img) perform a segmentation
fault every time they try to access the ODBC layer, with no indication
of what's wrong.
 
All I'd really like to know is if someone has gotten this to work (or
equally, if someone knows for sure that the standard sarge package does
not have suitable capabilities compiled in, or if it conflicts with
something else etc.) before I set about building the whole mapserver
setup from scratch.
 
Here's the test.ovf file (OGR Connection definition), which as I noted
works fine with ogrinfo (the file lives in my SHAPEPATH):
 
<OGRVRTDataSource>
    <OGRVRTLayer name='mypoints'>
    <SrcDataSource>ODBC:user/password at MySQL</SrcDataSource>
    <SrcSQL>Select * from mypoints where (ptid&lt;100) </SrcSQL>
    <GeometryField encoding='PointFromColumns' x='xcoord' y='ycoord' />
    <GeometryType>wkbPoint</GeometryType>
    </OGRVRTLayer>
</OGRVRTDataSource>
 
Here's the (very basic) layer definition from the mapfile - the "circle"
symbol is defined and works in other layers.
 
LAYER
    NAME "mypoints"
    CONNECTIONTYPE OGR
    CONNECTION "test.ovf"
    DATA "mypoints"
    STATUS DEFAULT
    TYPE POINT
    CLASS
        STYLE
            COLOR 0 0 0
            SIZE 2
            SYMBOL "circle"
        END
    END
END
 
Any help or advice much appreciated.
Jeremy
---
Jeremy Raw
Transportation Systems Engineer / City of Durham / DCHC MPO
919-560-4366 ext. 308 / Jeremy.Raw at durhamnc.gov
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060203/62997899/attachment.html


More information about the mapserver-users mailing list