ODBC and non-spatial databases
Pagurek,Debbie [NCR]
Debbie.Pagurek at EC.GC.CA
Thu Nov 3 06:09:54 PST 2005
Please reply to the list so everyone can help out...
So you're asking if you can put a variable in the sql statement in an
OVF file? I've never done this. I suppose an OVF file could be written
out on the fly?
Maybe someone else on the list has some ideas.
D. Pagurek
-----Original Message-----
From: Janeks Kamerovskis [mailto:janeks.kamerovskis at silva.lv]
Sent: Thursday, November 03, 2005 2:15 AM
To: Pagurek,Debbie [NCR]
Subject: RE: [UMN_MAPSERVER-USERS] ODBC and non-spatial databases
Is it possible to use a variable (depending on user activities) in SQL
statement.
Brgds
Janeks
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
> On Behalf Of Pagurek,Debbie [NCR]
> Sent: Wednesday, November 02, 2005 6:21 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] ODBC and non-spatial databases
>
> 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?
>
> From http://ogr.maptools.org/drv_odbc.html I understand that only
> WHOLE tables are returned as layers. Is it true that data from the
> tables cannot be selected by criteria? If not, where can I find more
> information and perhaps examples.
>
> Agneta Schick
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~
> ~~~~~
> Agneta Schick
>
> Bundesanstalt fuer Geowissenschaften und Rohstoffe
> Federal Institute for Geosciences and Natural Resources
> Stilleweg 2
> D- 30655 Hannover Tel.: +49 511 643 3136
> GERMANY FAX.: +49 511 643 3663
>
> schick at sdac.hannover.bgr.de http://www.seismologie.bgr.de
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~
> ~~~~~
>
>
>
More information about the MapServer-users
mailing list