Skip to content

more generic distanceToLine/distanceToShape #342

mapserver-bot opened this Issue Apr 3, 2012 · 2 comments

3 participants


Date: 2003/06/18 - 11:09
Trac URL:

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.

Author: sdlime
Date: 2003/06/24 - 07:13

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.


Author: sdlime
Date: 2003/07/30 - 23:39

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

@sdlime sdlime was assigned Apr 5, 2012
@tbonfort tbonfort closed this Sep 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.