4

I have a point layer and a polygon layer that are all in UTM51N projection but do not align. Just want to know when should I use Assign, Reproject, or Define.

Experimented with a polygon in EPSG:4326 - WGS 84 - Geographic, which is the project CRS since this polygon is the first layer I loaded. Target projection is UTM51N.

Reproject - aligned

Assign - not aligned

Define - not aligned

Save layer as - aligned

Using 3.4 so there is no "on the fly projection" feature.

1 Answer 1

6

The difference is that reproject changes the geometry coordinates.


Let me start with a Point layer, with one feature, wich geometry is a point located in latitude = 1°, longitude = 2°.

The geometry WKT is POINT ( 1 2 ) and the layer is defined with CRS EPSG:4326.

And I have a custom projected CRS which map those coordinates to x = 2000m, y = 1000m.

If I reproject the layer to my custom CRS, the new geometry WKT will be POINT (2000 1000), and the new layer will be defined with my custom CRS (e.g, CUSTOM:100001).


If I assign my custom CRS to the source layer without reproject it, the geometry WKT of the feature will remain POINT ( 1 2 ), but the layer will be defined in CUSTOM:100001 CRS.

And in that CRS, x = 1m, y = 2m represent a point far away from my source point.


In QGIS 3, the project CRS is the QGIS 2 on-the-fly reprojection feature.

If the project has a CRS defined, all the layers will be reprojected on-the-fly to that CRS before show them in the map.

You can set No projection for the project CRS in its properties, and the layers will be shown in their own CRS.

In that case, both geometries POINT ( 1 2 ) will be shown aligned, altought they are located in different places of the Earth. And POINT ( 2000 1000 ) geometry will be shown far away from the source point, altought they are the same point but defined in different CRS.


Save layer as, when the target CRS is not the same as the source one, implies a Reprojection.

Assign and Define I think is the same, change the layer CRS without change the geometry coordinates.

1
  • 1
    This is very helpful. Quite hard to understand but I'm getting some of it. Thanks, Gabriel!
    – BallpenMan
    Commented Feb 25, 2020 at 23:45

Your Answer

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

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