3

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.

9
  • 1
    Yes, CRS affects the location of the intersection. Take for example a rectangle created in a geographic coordinate system and then project it to UTM it becomes a trapezoid, likewise data that is clipped in the geographic coordinate system would no longer match the edges of the trpezoid. The difference between two projected coordinate systems isn't likely to be as pronounced but it will still be more than 0. Jun 8 at 2:50
  • 1
    Yes, the number of points within a polygon can change if they're very near the edge and/or your polygon is made up from very long sections between vertices. You can minimise the effect by densifying the polygon gis.stackexchange.com/questions/29578/… before projecting, this will make the straight lines bend with the transformation in an attempt to keep topological relationships. Jun 8 at 4:05
  • 2
    The result could be changed, but there are a ton of potential complications based on which CRS is used, and what you are measuring, and at what resolution. That leads to the seminal work on fractals that asks, "How long is the coast of Britain?" (Mandelbrot).
    – Vince
    Jun 8 at 4:08
  • 1
    No, use the native projection of the polygons, any kind of projection will introduce uncertainty. Points can be projected as there are no straight lines to worry about so I'd project the points to match the polygon coordinate reference system. Jun 8 at 4:53
  • 1
    See also the good images in gis.stackexchange.com/questions/461265/…. Algorithms often reproject just the existing vertices without doing densification and that can lead into errors in spatial relationships if the properly reprojected geometry should have curved lines between vertices. Your case with a point and a circle is not so error prone. The point will be projected accurately and circle has plenty of vertices.
    – user30184
    Jun 8 at 6:25

1 Answer 1

1

According to the replies in the comments, here is a conclusion. But as pointed out by @Jeffrey Evans below, it is a short but not absolutely correct answer. A short answer is, yes, changing CRS will change the results of spatial analysis. In this case, we have a point layer and a polygon layer, and we make a intersect analysis of the two layers. If we change the CRS before this analysis, the result will also be changed, i.e., some points previously in the polygon might be outside the polygon after the CRS change. The change has an impact, especially on the points near the polygon edge. Therefore, before spatial analysis, one should determine the CRS first.

1
  • The short answer is yes there will be differences. However, it is not a straightforward as your summary. I have looked at uncertainty associated reprojecting lat/long total-station control points to UTM and found, with horizontal and vertical datums, the error to be sub-centimeter. This was for points so, planar geometries, like polygons and lines, will exhibit distortion but, as pointed out, can be controlled by having more vertices (points) representing the features. I cannot think of a transformation that would result in features matching in one projection but not another. Jun 13 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.