Skip to content

Commit

Permalink
ifdef out unused code without POINT_Z_M
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Jul 16, 2012
1 parent bca7fd1 commit 64ef556
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion maputil.c
Expand Up @@ -1234,8 +1234,10 @@ pointObj *msGetMeasureUsingPoint(shapeObj *shape, pointObj *point)
int i, j = 0;
lineObj line;
pointObj *poIntersectionPt = NULL;
#ifdef USE_POINT_Z_M
double dfFactor = 0;
double dfDistTotal, dfDistToIntersection = 0;
#endif

if (shape && point) {
for (i=0; i<shape->numlines; i++) {
Expand Down Expand Up @@ -1271,6 +1273,7 @@ pointObj *msGetMeasureUsingPoint(shapeObj *shape, pointObj *point)
/* -------------------------------------------------------------------- */
poIntersectionPt = msIntersectionPointLine(point, &oFirst, &oSecond);
if (poIntersectionPt) {
#ifdef USE_POINT_Z_M
dfDistTotal = sqrt(((oSecond.x - oFirst.x)*(oSecond.x - oFirst.x)) +
((oSecond.y - oFirst.y)*(oSecond.y - oFirst.y)));

Expand All @@ -1281,7 +1284,6 @@ pointObj *msGetMeasureUsingPoint(shapeObj *shape, pointObj *point)

dfFactor = dfDistToIntersection / dfDistTotal;

#ifdef USE_POINT_Z_M
poIntersectionPt->m = oFirst.m + (oSecond.m - oFirst.m)*dfFactor;
#endif

Expand Down

0 comments on commit 64ef556

Please sign in to comment.