Apparatus, comprising: body-electrodes configured to be positioned in galvanic contact with a body of a patient; a mapping-tool, having a mapping-electrode (30, 32, 34), configured to be positioned in a plurality of regions in the body of the patient; a location-measuring system configured to track the mapping-tool at different positions in each of the regions; an investigation-tool, having an investigation-electrode, configured to be positioned at a location in the body of the patient and to generate investigation-tool-currents between the body-electrodes and the investigation-electrode at the location; and a processor, configured to: for each region, generate a respective set of calibration-currents between the body-electrodes and the mapping-electrode (30, 32, 34) at the different positions in the region, derive for each region a respective relation between the respective set of the calibration-currents and the different positions, such that the different ones of the regions have different respective relations, wherein the respective relation comprises a primary matrix, and associate a volume including the different positions with the relation for each region; divide the volume into sub-volumes, and associate respective secondary matrices with the sub-volumes, each of the respective secondary matrices relating a respective subset of the different positions with a subset of the calibration-currents; wherein the processor is configured to determine the location in response to the different respective relations and the investigation-tool-currents by calculating a weighted average of locations of the investigation-tool determined from the primary matrix and at least one of the secondary matrices. body-electrodes configured to be positioned in galvanic contact with a body of a patient; a mapping-tool, having a mapping-electrode (30, 32, 34), configured to be positioned in a plurality of regions in the body of the patient; a location-measuring system configured to track the mapping-tool at different positions in each of the regions; an investigation-tool, having an investigation-electrode, configured to be positioned at a location in the body of the patient and to generate investigation-tool-currents between the body-electrodes and the investigation-electrode at the location; and a processor, configured to: for each region, generate a respective set of calibration-currents between the body-electrodes and the mapping-electrode (30, 32, 34) at the different positions in the region, derive for each region a respective relation between the respective set of the calibration-currents and the different positions, such that the different ones of the regions have different respective relations, wherein the respective relation comprises a primary matrix, and associate a volume including the different positions with the relation for each region; divide the volume into sub-volumes, and associate respective secondary matrices with the sub-volumes, each of the respective secondary matrices relating a respective subset of the different positions with a subset of the calibration-currents; for each region, generate a respective set of calibration-currents between the body-electrodes and the mapping-electrode (30, 32, 34) at the different positions in the region, derive for each region a respective relation between the respective set of the calibration-currents and the different positions, such that the different ones of the regions have different respective relations, wherein the respective relation comprises a primary matrix, and associate a volume including the different positions with the relation for each region; divide the volume into sub-volumes, and associate respective secondary matrices with the sub-volumes, each of the respective secondary matrices relating a respective subset of the different positions with a subset of the calibration-currents; wherein the processor is configured to determine the location in response to the different respective relations and the investigation-tool-currents by calculating a weighted average of locations of the investigation-tool determined from the primary matrix and at least one of the secondary matrices.