[mapserver-users] differences in query modes

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Jan 16 12:35:00 EST 2009


Hi Nikos:  Here are some examples that might clarify things I hope -

query: 
  - find the first geometry that intersects point x,y in layer A
  - find the first geometry that intersects point x,y in all layers

nquery: 
  - find all geometries that intersect point x,y in layer A
  - find all geometries that intersect point x,y in all layers
  - find all geometries that intersect bbox x1,y1,x2,y2 in layer A
  - find all geometries that intersect bbox x1,y1,x2,y2 all layers            

itemquery:
  - find the first geometry that matches the expression foo in layer A

itemnquery:
  -  find all geometries that matches the expression foo in layer A

featurequery: (layer A *must* be a polygon layer, version 5.4 supports LINE layers as well)
  - find the first geometry that intersects point x,y in layer A and use it to select geometries that intersect it in layer B
  - find the first geometry that intersects point x,y in layer A and use it to select geometries that intersect it in all other layers

featurenquery:  (layer A *must* be a polygon layer, version 5.4 supports LINE layers as well)
  - find all geometries that intersect point x,y in layer A and use it to select geometries that intersect it in layer B
  - find all geometries that intersect point x,y in layer A and use it to select geometries that intersect it in all other layers
  - find all geometries that intersect bbox x1,y1,x2,y2 in layer A and use it to select geometries that intersect it in layer B
  - find all geometries that intersect bbox x1,y1,x2,y2 in layer A and use it to select geometries that intersect it in all other layers

itemfeaturequery: (layer A *must* be a polygon layer, version 5.4 supports LINE layers as well)
  - find the first geometry that matches expression foo in layer A and use it to select geometries that intersect it in layer B
  - find the first geometry that matches expression foo in layer A and use it to select geometries that intersect it in all other layers

itemfeaturenquery:  (layer A *must* be a polygon layer, version 5.4 supports LINE layers as well)
  - find all geometries that match expression foo in layer A and use it to select geometries that intersect it in layer B
  - find all geometries that match expression foo in layer A and use it to select geometries that intersect it in all other layers
  - find all geometries that match expression foo in layer A and use it to select geometries that intersect it in layer B
  - find all geometries that match expression foo  in layer A and use it to select geometries that intersect it in all other layers

The TOLERANCE/TOLERANCEUNITS value helps define what is meant by "intersect". You can do some interesting things once
you understand these modes. For example, I just added support to 5.4 to use line geometries from one layer to select features
from another layer. The use case is that someone clicks on a road and we find all parcels within 150 ft of that road. That's done
with mode=featurequery.

Steve

>>> On 1/16/2009 at 7:40 AM, in message
<1882.193.218.36.79.1232113246.squirrel at 193.218.36.79>, <nikos at maich.gr>
wrote:
> Hello,
> 
> Maybe this is a simplistic question, but can some one expand a bit on some
> of the query modes? I've read the docs and trying to come to grips..
> 
> If a tolerance is not set in layers, is a query/nquery mode the same as a
> feature/featurenquery?
> 
> Also, can some one explain the itemfeature, itemfeaturenquery please.
> 
> thanx in advance,
> 
> nikos
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list