Are we allowed to omit 在 in 在…里，在…内 structure? Based on an online dictionary :


  在…里，在…内 :
  
  Inside or not further than an area or period of time


And here are some examples (provided by the dictionary) of how 在…里 or 在…内 is used :


  Two thirds of Californians live within 15 miles of the coast.
  
  三分之二的加利福尼亚人居住在离海岸15英里以内的地区。
  
  In 1992 cross-border controls within the EU were dismantled.
  
  1992年，欧盟内部取消了边境通行管制。
  
  For orders within the UK, please enclose £2.50 for post and packing.
  
  英国国内的订货，请附上2.5英镑的邮资及包装费用。
  
  We recommend that this wine should be consumed within six months.
  
  我们建议该酒在6个月内饮用完毕。
  
  Within hours of the tragedy happening, an emergency rescue team had been assembled.
  
  悲剧发生后几小时之内，就集结起来一支紧急救援队伍。


From those examples, we can see that "在" is being omitted in some sentences. Now, what I want to ask is :

Are we allowed to omit 在 anytime we want to or is there any specific rules/conditions of when we are allowed to omit 在?
In my experience(correct me if there's any exception), the structure '在...里'(as well as '在...前', '在...后', '在...上', '在...下' etc), when followed by '的' and then a noun, serving as an adj, is allowed to omit 在.
Examples: 房子里的人，公园里的树，信里的字.
And when it's after a verb as an adv, you can't omit 在.
Examples: 站在房子里，种在公园里，写在信里.
btw, I don't think the first sentence is correctly parsed:

Two thirds of Californians live within 15 miles of the coast.
三分之二的加利福尼亚人居住在离海岸15英里以内的地区。

15英里以内 -&gt; no more than 15 miles
离海岸15英里以内 -&gt; no more than 15 miles from the coast
离海岸15英里以内的地区 -&gt; areas that are no more than 15 miles from the coast
居住在离海岸15英里以内的地区 -&gt; live in areas that are no more than 15 miles from the coast
there's no '在...内' structure in this sentence at all.