Question
Before (some) spatial analysis, we need to make sure the coordinate reference systems of the layers are the same. I am doing intersect
with two layers. I did that under a coordinate before. If I change the coordinate, will the result also be changed?
Details
I use r
language for GIS analysis, especially the package sf
.
Before spatial analysis, I first define the CRS used for the data analysis flow.
my_crs <- 6668
# 6668 is the EPSG id of the geographical coordinate system JGD 2011
# which is basically the same as WGS 84
Then I have two sf
data, one is point data (which is about 10000 points), and another one is polygon data. Let's say their names are "my_point" and "my_polygon". Then I want to get the points intersecting with the polygon, so:
my_inter <- st_intersection(my_point, my_polygon)
I wonder if I change the my_crs
into another one, for example, my_crs <- 6676
(6676 is a projected coordinate reference system), then I do my_inter <- st_intersection(my_point, my_polygon)
. I found the results changed a little bit. I wonder why is that.