Index: includes/views/geo.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geo/includes/views/geo.views.inc,v
retrieving revision 1.18
diff -u -p -r1.18 geo.views.inc
--- includes/views/geo.views.inc	26 Apr 2010 05:40:43 -0000	1.18
+++ includes/views/geo.views.inc	1 Feb 2011 00:55:06 -0000
@@ -256,7 +256,11 @@ function geo_views_handlers() {
        'gis input' => 'array',
       ),
       'views_handler_filter_geo' => array(
-       'parent' => 'views_handler_filter_numeric',
+       'parent' => 'views_handler_filter_float',
+       'gis input' => 'array',
+      ),
+      'views_handler_argument_geo' => array(
+       'parent' => 'views_handler_argument',
        'gis input' => 'array',
       ),
       'views_handler_sort_geo' => array(
Index: includes/views/views_handler_argument_geo.inc
===================================================================
RCS file: includes/views/views_handler_argument_geo.inc
diff -N includes/views/views_handler_argument_geo.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ includes/views/views_handler_argument_geo.inc	1 Feb 2011 00:55:06 -0000
@@ -0,0 +1,57 @@
+<?php // $Id
+
+class views_handler_argument_geo extends views_handler_argument {
+
+  function init(&$view, $options) {
+    parent::init($view, $options);
+    $this->geo = geo_load(array('gid' => $this->definition['geo_gid']));
+  }
+
+  function option_definition() {
+    $options = parent::option_definition();
+    $options['function'] = array('default' => 'intersects');
+    $options['group'] = array('default' => 'geo');
+
+    return $options;
+  }
+
+  function options_form(&$form, &$form_state) {
+
+    $functions = array();
+    foreach ($this->geo->functionNames('filter') as $id => $name) {
+      $info = $this->geo->functionInfo($id);
+      // TODO: Add support for float-returning functions (such as Distance)
+      if ($info['returns'] == 'boolean' && $info['requires target']) {
+        $functions[$id] = $name;
+      }
+    }
+
+    $form['function'] = array(
+      '#type' => 'radios',
+      '#title' => t('filter function to use. Views argument is WKT geometry'),
+      '#default_value' => $this->options['function'],
+      '#options' => $functions,
+    );
+
+    // Call my parent's options_form method.
+    parent::options_form($form, $form_state);
+  }
+
+  function query() {
+
+    // The GIS function we'll be filtering on.
+    $function = $this->options['function'];
+    $info = $this->geo->functionInfo($function);
+
+    $this->field_alias = $this->field .'_'. $function;
+
+    // Ensure that the query acts on the table and column aliases defined here.
+    $this->geo->setTableName($this->ensure_my_table(), TRUE);
+    $this->geo->setColumnName($this->field);
+
+    // Get the Geo API method for adding a field.
+    $query = $this->geo->$function($this->geo, $this->argument);
+
+    $this->query->add_where($this->options['group'], $query);
+  }
+}
