Query attribute

Pascoe,Tim [Burlington] Tim.Pascoe at EC.GC.CA
Wed Oct 12 11:26:40 EDT 2005


I received this note from the list recently, regarding updates to the OGR/VRT drivers. I was asking about ways to query the OGR layer other than the dynamic SLD I'm using now, to reduce database overhead.

 

"I know Frank added this capability very recently for the VRT driver, so it probably depends on which version of GDAL/OGR you use (you need 1.3 probably). This is the bug report:

 

http://bugzilla.remotesensing.org/show_bug.cgi?id=900

 

I use WFS on MySQL Virtual Spatial Data, and Mapserver sets a FILTER on the OGR VRT LAYER, and OGR adds that to the WHERE CLAUSE which it sends to the database. You could use the same approach, setting a dynamic FILTER."

Timothy Pascoe 

Environment Canada / Environnement Canada
Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
867 Lakeshore Road / 867, chemin Lakeshore
Burlington, Ontario / Burlington (Ontario) 
L7R 4A6

Tel/Tél: (905) 336-6239
Fax/Téléc: (905) 336-4699
E-mail/C. élec:  <mailto:tim.pascoe at ec.gc.ca> tim.pascoe at ec.gc.ca
Government of Canada/Gouvernement du Canada 
This e-mail represents the opinions and views solely held by its author and in no manner may be considered as representing those of his/her employer.

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Matthew Edmondson
Sent: October 12, 2005 11:20 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Query attribute

 

When using a  OGR Virtual File (often extension .ovf) file to connect to a database, you can insert a SQL  query and only pull certain data. I'm currently using a similar set up using a MySQL database.

 

 OGR Virtual Files are documented at:
http://www.gdal.org/ogr/drv_vrt.html

 

Good Luck,

 

Matt


 

On 10/12/05, Johan Hallgren <johan.e.hallgren at wmdata.se> wrote: 

Hello

I have tried to find a way to query attribute in mapserver/mapscript. I
have found the function queryByAttributes(). I miss some functions here. 

Is there ways to do regular "SELECT fld FROM tbl WHERE id = xy" with
MapServer?
Similar question, is queries with LIKE and IN is supported?
I have found out that it's possible to use regular expression but only on 
shapefiles. What is possible if data is stored in a database?
Is there some documentation that I have missed, where can it be found?

Any assistance is welcome.

Regards
Johan

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051012/1e2157fc/attachment.html


More information about the mapserver-users mailing list