Permalink
Browse files

Added a few comments to clarify projection handling.

  • Loading branch information...
sdlime committed Sep 2, 2014
1 parent 54b5169 commit 6508b7e1d4c2407537b126fc21b93f074ad17275
Showing with 6 additions and 2 deletions.
  1. +6 −2 mapogcfiltercommon.c
View
@@ -464,13 +464,17 @@ char *FLTGetSpatialComparisonCommonExpression(FilterEncodingNode *psNode, layerO
if(nLayerUnit == -1) nLayerUnit = GetMapserverUnitUsingProj(&lp->map->projection);
if (nUnit >= 0 && nUnit != nLayerUnit)
- dfDistance *= msInchesPerUnit(nUnit,0)/msInchesPerUnit(nLayerUnit,0); /* in layer units */
+ dfDistance *= msInchesPerUnit(nUnit,0)/msInchesPerUnit(nLayerUnit,0); /* target is layer units */
}
psTmpShape = psQueryShape;
}
if (psTmpShape) {
+
+ /*
+ ** target is layer projection
+ */
if(lp->projection.numargs > 0) {
if (psNode->pszSRS)
msInitProjection(&sProjTmp);
@@ -679,7 +683,7 @@ int FLTApplyFilterToLayerCommonExpression(mapObj *map, int iLayerIndex, const ch
map->query.filter.type = MS_EXPRESSION; /* a logical expression */
map->query.layer = iLayerIndex;
- /* TODO: if there is a bbox in the node, get it and set the map extent */
+ /* TODO: if there is a bbox in the node, get it and set the map extent (projected to map->projection */
map->query.rect = map->extent;
retval = msQueryByFilter(map);

0 comments on commit 6508b7e

Please sign in to comment.