ODBC and non-spatial databases

Pagurek,Debbie [NCR] Debbie.Pagurek at EC.GC.CA
Wed Nov 2 11:21:18 EST 2005


You definitely CAN use an SQL statement to return point data instead of
returning the entire table.

This would be set up in your .ovf file such as:

<OGRVRTDataSource>
  <OGRVRTLayer name="air1_layer">
 
<SrcDataSource>ODBC:my_user/my_userpassword at my_DSN_name,my_tablename</Sr
cDataSource>
    <SrcSQL>select napsid as station_number,city as
station_location,province_en as province,air1_map_2005.location_type_en
as location_type,latitude, longitude,ozone2003_ppb as ozone_2003_ppb
from my_tablename</SrcSQL>
    <GeometryType>wkbPoint</GeometryType>
    <LayerSRS>WGS84</LayerSRS>
    <GeometryField encoding="PointFromColumns" x="longitude"
y="latitude" />
  </OGRVRTLayer>
</OGRVRTDataSource>

Please see:
http://mapserver.gis.umn.edu/doc46/ogr-howto.html for more information.

D. Pagurek

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Agneta Schick
Sent: Wednesday, November 02, 2005 11:05 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] ODBC and non-spatial databases


We have MapServer applications using geographic coordinates which are 
accessed through sql in a perl script
and added to a layer as pointObj (Mapscript)

Is it possible to access the database via ODBC although it is
non-spatial?



More information about the mapserver-users mailing list