Ejemplo n.º 1
0
 /**
  * Calcola il comune in cui cade la geometria passata come id o wkt.
  * @param object $id_or_wkt ID as integer or WKT as string 
  * @return string The name of the CityState, NULL if none is found.
  */
 public static function Get_City_State($id_or_wkt)
 {
     if (!is_numeric($id_or_wkt)) {
         $comuni = Geometry::Get_City_State_ByWKT($id_or_wkt);
     } else {
         $comuni = Geometry::Get_City_State_ByID($id_or_wkt);
     }
     if (count($comuni)) {
         return $comuni[0]['nome'];
     } else {
         return null;
     }
 }