Generating a radius search on postmeta-metavalue and adding a taxonomy to query

Well, they say perseverance is the key…
Having found a link in the RELATED questions.. https://stackoverflow.com/questions/17588525/how-to-join-post-meta-and-taxonomy-table-wpdb-mysql, I got the answer.
Ok, its not using Native parameters as suggested, nor does it give excessive load times as thought (its only displaying 5 properties max in a sidebar widget).

Not Everyone who asks a question here is looking for someone to do the work for them, more looking for guidance, constructive guidance and help.

Its NOT pretty and could be done better code, But for anyone else searching.. it may help.

 $dist="3.427"; /* Kilometers*/
 $orig_lat = get_post_meta ( $post_id, "_property_latitude",true);
 $orig_lon = get_post_meta ( $post_id, "_property_longitude",true);
 $lon1 = (float) $orig_lon - (int) $dist / abs( cos( deg2rad( (float) $orig_lon ) ) * 69 );
 $lon2 = (float) $orig_lon + (int) $dist / abs( cos( deg2rad( (float) $orig_lon ) ) * 69 );
 $lat1 = (float) $orig_lat - ( (int) $dist / 69 );
 $lat2 = (float) $orig_lat + ( (int) $dist / 69 );

 /* the 6371 is Radius of the Earth in kilometers - for miles multiply by 0.621371192 */

 $mapsearchquery = "SELECT DISTINCT `t`.`ID`,
6371 * 2 * ASIN( SQRT( POWER( SIN( ( '".$orig_lat."' - `t`.`latitude` ) * pi() / 180 / 2), 2 ) + COS( '".$orig_lat."' * pi() / 180) * COS( `t`.`latitude` * pi() / 180 ) * POWER( SIN( ( '".$orig_lon."' - `t`.`longitude` ) * pi() / 180 / 2 ), 2 ) ) ) AS `distance` 
 FROM (
SELECT `$wpdb->posts`.`ID`,
MAX(CASE WHEN `$wpdb->postmeta`.`meta_key` = '_property_longitude' THEN `$wpdb->postmeta`.`meta_value` END ) AS `longitude`,
MAX(CASE WHEN `$wpdb->postmeta`.`meta_key` = '_property_latitude' THEN `$wpdb->postmeta`.`meta_value` END ) AS `latitude`
FROM `$wpdb->posts` 
LEFT JOIN `$wpdb->postmeta` ON ( `$wpdb->posts`.`ID` = `$wpdb->postmeta`.`post_id` )
INNER JOIN `$wpdb->term_relationships` ON (`$wpdb->posts`.`ID` = `$wpdb->term_relationships`.`object_id`)
INNER JOIN `$wpdb->term_taxonomy` ON (`$wpdb->term_relationships`.`term_taxonomy_id` = `$wpdb->term_taxonomy`.`term_taxonomy_id`)
INNER JOIN `$wpdb->terms` ON (`$wpdb->terms`.`term_id` = `$wpdb->term_taxonomy`.`term_id`)
WHERE `$wpdb->posts`.`post_status` = 'publish'
AND `$wpdb->term_taxonomy`.`taxonomy` = 'contract_type' AND `$wpdb->terms`.`term_id` = ('".$_contract_type."')
AND `$wpdb->posts`.`post_type` = 'dt_properties' 
AND `$wpdb->postmeta`.`post_id` != '".$post_id."' 
GROUP BY `$wpdb->posts`.`ID` 
HAVING `longitude` BETWEEN '".$lon1."' AND '".$lon2."' AND `latitude` BETWEEN '".$lat1."' AND '".$lat2."') AS `t`
HAVING distance < '".$dist."'
ORDER BY distance ASC;";

// Just get the ID's
//$pageposts = $wpdb->get_col($mapsearchquery);
$pageposts = $wpdb->get_results($mapsearchquery, OBJECT);