title: R spatstat - Different window unit between ppp and owin (window) object
body: <p>How can we transform "unit" of window between ppp objects and owin objects?</p>
  
  <p>I am trying to analyze spatial data collected from open street map. </p>
  
  <p>First, I get POI data around Singapore, then transform them to <code>ppp</code> objects</p>
  
  <pre><code>if(!require("osmdata")) install.packages("osmdata")
  library(osmdata)
  q &lt;- getbb("Singapore") %&gt;%
  opq() %&gt;%
  add_osm_feature("amenity")
  
  places &lt;- osmdata_sf(q)
  police &lt;- places$osm_points %&gt;% 
     filter(amenity == "police") %&gt;%
     st_transform(., "+proj=utm +zone=19 +ellps=GRS80 +datum=NAD83")
  
  police.sp  &lt;- as(police, "Spatial")  # Create Spatial* object
  police.ppp &lt;- as(police.sp, "ppp")      # Create ppp object
  class(police.ppp)
  </code></pre>
  
  <p>Later on, I tried to insert a .shp object I found from the <a href="https://data.gov.sg/dataset/region-census-2010?resource_id=73e457dc-5ddd-4621-bffb-050428df9c9a" rel="nofollow noreferrer">gov website</a> to create a Singapore shape to input as Window() to police.ppp object. </p>
  
  <pre><code>s    &lt;- readOGR(".", "Region_Census2010")
  sg    &lt;- as(s, "owin")
  </code></pre>
  
  <p>However, upon calling <code>summary</code> of the two, I saw the two have really different ranges</p>
  
  <pre><code>summary(sg)
  enclosing rectangle: [2637.87, 56396.44] x [15748.72, 50256.33] units
                       (53760 x 34510 units)
  
  summary(police.ppp)
  Window: rectangle = [1280705.4, 1323492.3] x [19833441, 19854045] units
                      (42790 x 20600 units)
  
  </code></pre>
  
  <p>As a result, all of the police points were out of the map when I try to plot the files. </p>
  
  <p>Is there any way to adjust the units? Did I do any steps wrong there?</p>
  
  <p>Please help!</p>
  
  <p>Thank you!</p>