diff --git a/server/extension/sql/80_isolines_helper.sql b/server/extension/sql/80_isolines_helper.sql index f0e4e57..43ff444 100644 --- a/server/extension/sql/80_isolines_helper.sql +++ b/server/extension/sql/80_isolines_helper.sql @@ -91,10 +91,11 @@ RETURNS SETOF cdb_dataservices_server.isoline AS $$ else: source_str = None + # -- TODO Support options properly if isotype == 'isodistance': - resp = client.calculate_isodistance(source_str, mode, data_range, options) + resp = client.calculate_isodistance(source_str, mode, data_range) elif isotype == 'isochrone': - resp = client.calculate_isochrone(source_str, mode, data_range, options) + resp = client.calculate_isochrone(source_str, mode, data_range) if resp: result = [] @@ -114,7 +115,7 @@ RETURNS SETOF cdb_dataservices_server.isoline AS $$ type_, value_, traceback_ = sys.exc_info() #quota_service.increment_failed_service_use() error_msg = 'There was an error trying to obtain isolines using mapzen: {0}'.format(e) - #plpy.notice(traceback.format_tb(traceback_)) + plpy.debug(traceback.format_tb(traceback_)) raise e #plpy.error(error_msg) finally: diff --git a/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py b/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py index 2aaa585..1d2a814 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py @@ -60,7 +60,14 @@ class MapzenIsolines: destination_matrix = self._calculate_destination_matrix(origin, destination_points, mode, units) def _calculate_radius(self, init_radius, mode, mode_type, units): + import logging + #logging.basicConfig(filename='/tmp/isolines.log',level=logging.DEBUG) + logging.debug(mode_type) if mode_type is 'time': + logging.debug(init_radius) + logging.debug(self.METERS_PER_SECOND[mode]) + logging.debug("units = %s", units) + logging.debug(self.UNIT_MULTIPLIER[units]) radius_meters = init_radius * self.METERS_PER_SECOND[mode] * self.UNIT_MULTIPLIER[units] else: radius_meters = init_radius