Ticket #135 (new enhancement)

Opened 6 years ago

Last modified 2 months ago

Add feature like: queryPointClosest(oPoint, count);

Reported by: woodbri@swoodbridge.com Assigned to: sdlime
Priority: high Milestone: FUTURE
Component: MapServer C Library Version: 4.1
Severity: minor Keywords:
Cc:

Description (Last modified by sdlime)

I have been thinking about developing a commerical routing application
and a function that I might be able to use along with other mapserver
users is a new query function:

      oLayer->queryPointClosest(oPoint, count);

where you would find the "count" closest objects on the layer. The
math
for would/could be:

keep the max distance of the closest points and check the distance to
the extents of complex objects and skip if greater

1) points: are obvious
2) lines: project oPoint onto line segment(s), check if between end
points, otherwise distance to end points
3) polygons: is it a hit? then dist=0.0 else treat like polyline
above.

This would allow spatial searches for things like find the nearest
store, find the nearest transformer, find the nearest intersection,
etc. 

For a routing applications it might be nice to say: from a location
find
the nearest exit/entrance to I-95. This would imply the ability to add
a
filter like:

    oLayer->queryPointClosestFiltered(oPoint, count, oFilter);

where oFilter would be a filter object maybe like:

filter {
  ColumnName = "NAME";
  filterType = {STRCMP|STRCMPI|REGEX|EQ|NE|LT|GT|etc};
  filterPattern = "text or regex"
  ...
  andFilter = poFilter;  // additional and/or filters
  orFilter  = poFilter;
}

This is intended to give the idea, not the implementation :) I would
be
interested in your thoughts on this.

Change History

06/30/03 23:17:20 changed by dmorissette

  • version changed from 3.6 to 4.1.

07/02/08 01:22:18 changed by sdlime

  • description changed.
  • milestone set to FUTURE.