Error while trying to use txt virtual layer

Richard Orth - osmoGIS Incorporated rco at OSMOGIS.COM
Mon Sep 12 22:01:54 EDT 2005


I am having problems using the virtual layer feature. Specifically the 
error says it can't find the data file (or unsupported).
I am running on a IIS5 server (ok, WinXPsp2). I have configured the ODBC 
with a System DNS, and OGRinfo is able to find it.
I have tried placing the file in different locations (and changing the 
ODBC pointer), such as with my other data, with the map file, and in a 
folder with no other files or folders. I have tried specifying the path 
in the SrcLayer, which actually makes it fail faster.
So, any ideas what I am doing wrong ?
thanks

-- 
Richard C Orth
osmoGIS Incorporated


Below you will find the error message returned by mapserv, the specific 
map code, my mapserver version info and the OGRinfo output.

msDrawMap(): Image handling error. Failed to draw layer named 
'user-locations'.
msOGRFileOpen(): OGR error. Open failed for OGR connection ` 
ODBC:trial_data 'locations.txt' wkbPoint '. File not found or 
unsupported format.


MAP code:

    layer
        connection "<OGRVRTDataSource>
            <OGRVRTLayer name=user-locations>
                <SrcDataSource>ODBC:trial_data</SrcDataSources>
                <SrcLayer>'locations.txt'</SrcLayer>
                <GeometryField encoding='PointFromColumns' x='e' y='n'/>
                <GeometryType>wkbPoint</GeometryType>
            </OGRVRTLayer>
            <OGRVRTDataSource>"
        connectiontype OGR
        data user-locations
            metadata
                "wms_srs"    "2236"
                "wms_title"  "user-locations"
            end
        name user-locations
        type point
        status default
        units feet
        class
            style
                color 0 0 0
                maxsize 100
                minsize 1
                size 10
                symbol 3
            end
        end
        projection
            "init=epsg:2236"
        end
    end


MapServer version 4.0.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF 
OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=EPPL7 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE



OGRInfo listing:

INFO: Open of `odbc:trial_data'
using driver `ODBC' successful.

Layer name: locations.txt
Geometry: Unknown (any)
Feature Count: 2
Layer SRS WKT:
(unknown)
location: String (255.0)
value: Integer (10.0)
n: Integer (10.0)
e: Integer (10.0)
OGRFeature(locations.txt):0
  location (String) = office
  value (Integer) = 6
  n (Integer) = 527160
  e (Integer) = 1562897

OGRFeature(locations.txt):1
  location (String) = home
  value (Integer) = 79
  n (Integer) = 571650
  e (Integer) = 1571048

end of message



More information about the mapserver-users mailing list