Changeset 1220
- Timestamp:
- 10/16/08 15:37:05 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/camptocamp/MapFishUnhcr/server/python/mapfish/lib/filters/spatial.py
r1046 r1220 121 121 geom = func.transform(geom, epsg) 122 122 123 if tolerance > 0:123 if tolerance is not None and tolerance > 0: 124 124 e = func.distance(geom, pg_point) < tolerance 125 125 else: sandbox/camptocamp/MapFishUnhcr/server/python/mapfish/lib/protocol.py
r1174 r1220 67 67 epsg=epsg 68 68 ) 69 elif 'lon' and 'lat' and 'tolerance'in request.params:69 elif 'lon' and 'lat' in request.params: 70 70 # within filter 71 tolerance = None 72 if 'tolerance' in request.params: 73 tolerance = float(request.params['tolerance']) 71 74 filter = Spatial( 72 75 Spatial.WITHIN, … … 74 77 lon=float(request.params['lon']), 75 78 lat=float(request.params['lat']), 76 tolerance= float(request.params['tolerance']),79 tolerance=tolerance, 77 80 epsg=epsg 78 81 )