I am trying to make a spatial query in MapX 5.0, where lines intersect a
grid of cells. I use the search function, something like this:

'grids is the grid selection (all grids are selected)
'lines is a layer with lines
set lyr = MapObject.Layers("Lines")
for each grid in grids
        v.Add "gridftr", grid
        set ftrs = lyr.search("obj intersects gridftr", v)
next

Unfortenately this seems not to work correctly. Either I get no selection or
I get a selection of all the lines. What goes wrong? Is this the right
approach?

What I really want is something that goes in MapInfo like this:
select * from layer_grid, layer_lines
where layer_grid.obj intersects layer_lines.obj

Thanks,
Harmen Smit


___________________________________________
Harmen Smit
  Geodan IT bv
  President Kennedylaan 1
  1079 MB Amsterdam (NL)
  Tel: +31 (0)20 - 5711 311
  Fax: +31 (0)20 - 5711 333
  Web: http://www.geodan.nl
____________________________________________
This E-mail contains proprietary information some or all of which
may be legally privileged. It is intended for the recipient only. If an
addressing or a transmission error has misdirected this E-mail, please
notify the author by replying to this E-mail. If you are not the
intended recipient you must not use, disclose, distribute, copy, print
or rely on this E-mail.
____________________________________________


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4249

Reply via email to