Ticket #1126 (closed enhancement: fixed)

Opened 8 years ago

Last modified 6 years ago

MapServer to pass filter to OGR

Reported by: Trevor.Tracey-Patte@… Owned by: warmerdam
Priority: highest Milestone:
Component: OGR Support Version: unspecified
Severity: minor Keywords:
Cc:

Description (last modified by warmerdam) (diff)

Could you please modify MapServer to pass the FILTER parameter to OGR when it 
starts with 'WHERE' for Oracle Spatial connections to allow the database to do 
the filtering and not use MapServer regexp matching.
I have discussed this with Frank Warmerdam and he has agreed that he will 
implement this in OGR.

Change History

Changed 8 years ago by fwarmerdam

  • cc warmerdam@… removed
  • status changed from new to assigned
Accepting.  I'll start prototyping this in the 4.5 tree tonight. 

Changed 8 years ago by fwarmerdam

Note the proposed change is to modify the FILTER handling in mapogr.cpp
so that if the filter is prefixed by WHERE it will be passed off to the
OGRLayer::SetAttributeFilter() method instead of processing it in MapServer.
For underlying drivers like Oracle Spatial (or any SQL aware RDBMS) this can
give dramatic performance improvements. 

But the change will apply to all OGR datasources. 


Changed 8 years ago by fwarmerdam

Committed preliminary support for the pass-through filtering in mapogr.cpp. 

If the string following the FILTER keyword is prefixed by "WHERE " then it will
pass the statement off to OGR.  The rest of the statement must be a valid
WHERE clause suitable for use with OGRLayer::SetAttributeFilter().  

Test case in msautotest now for this case in msautotest/misc/ogr_attrfilter.map.

Example:
  FILTER "WHERE EAS_ID in (179, 173)"

This change is *only* in MapServer 4.5.

Changed 8 years ago by dmorissette

  • cc dmorissette@… added

Changed 6 years ago by warmerdam

  • status changed from assigned to closed
  • resolution set to fixed
  • description modified (diff)

Closing as this is completed.

Note: See TracTickets for help on using tickets.