Opened 21 years ago

Last modified 21 years ago

#342 assigned enhancement

more generic distanceToLine/distanceToShape

Reported by: bear@… Owned by: sdlime
Priority: high Milestone:
Component: MapScript Version: 4.0
Severity: minor Keywords:
Cc:

Description

It would be really nice to have functions that can determine distance between
shapes. Currently only point-shape distances can be determined, so if one wants
to draw a map where shape distances play a role (say, color everything ouside a
certain radius, etc), he has to get all points of a shape and do a
distanceToShape to each and then determine the distance (and even then it will
not be always  correct). IMHO distanceToSomething should be a general method,
available to points, lines and shapes as well.

Change History (2)

comment:1 by sdlime, 21 years ago

Status: newassigned
There are distance to shape/line methods that are part of MapScript. The same
underlying code is also present in the query functions msQuerybyShape and
msQueryByFeature although the query functions only allow for the use of polygons
as the query feature at the moment. The query enhancements work by computing the
distance between line segments, and then looping through segments, intersecting
lines with polygons and so forth.

If you have examples where the point computations fail then please send them
along. I'll leave this open until the point issue is resolved.

Steve

comment:2 by sdlime, 21 years ago

Attila: Can you check my previous comments on this bug. It can probably be
closed but I'd like your feedback first.

Steve
Note: See TracTickets for help on using tickets.