1

I am facing problem calculating area and projection in general, using QGIS 3.18.3.

preface: I am using EPSG: 32643 projected CRS. I aim to compute area and the result is fine correct in this image. Calculating Area on Bing Map using Measuring tool

When I load another layer as shown in image (EPSG: 32643) then the coordinates changes to (lat,long) and the area also is incorrect. I am sure that this layer is in correct EPSG. Not sure why the coordinates displayed does not give Cartesian coordinates. The coordinates are not in (X,Y) format

Attached is the associated information for the layer. How to resolve this issue and get the coordinates in correct format?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
  • 2
    Most questions in this topic are resolved when a previous error in projection definition is discovered. Please [Edit] the question to provide the bounding envelope of the data for each of the datasets. – Vince Jun 04 '21 at 16:55
  • 1
    that looks like they are 4326 not UTM43N – Ian Turton Jun 04 '21 at 17:01
  • 2
    Looks like a classic changed the CRS definition but kept the original coordinate values problem. – Gabriel Jun 04 '21 at 17:06
  • Does changing the projection not change the extent into Cartesian coordinates as well? Also, does setting the layer CRS->set to EPSG:32643 change only the units and keeps the extent in its original projection? – Aman Bagrecha Jun 04 '21 at 17:09
  • 2
    @amanjain "Setting" the CRS doesn't reproject. It only defines the context. The values will be the same, but now they'll reference a completely different origin and units. – Gabriel Jun 04 '21 at 17:12
  • appreciate everyone's help. What is the way out? Defining the projection to EPSG:32643? – spatial-user Jun 04 '21 at 17:12
  • @spatial-user You need to read this: https://gis.stackexchange.com/questions/351939/difference-of-assign-projection-reproject-layer-and-define-layer-projection-in – Gabriel Jun 04 '21 at 17:13
  • Read also this for background: https://gis.stackexchange.com/a/383437/88814 – Babel Jun 04 '21 at 20:02
  • Qgis does on-the-fly projection to the Basemap project. you can change this by clicking on the pros info (EPSG number) in the bottom right corner – GeoMonkey Nov 30 '22 at 18:33

1 Answers1

0

Whenever I get tired of reprojection/CRS issues in QGIS I always move to R. Here is a sample script I used for area calculations:

rm(list = ls()) #clears environment
cat("\014") #clears console

library(sf) library(ggplot2) library(tmap) library(tmaptools) library(rgeos) library(dplyr) library(tidyverse)

setwd("~/Desktop/Carolyn Shapefiles") #change your filepath

##ETHIOPIA Ethiopia <-st_read("geo2_et1994_2007.shp") #Import Ethiopia shapefile, projectd in WGS 84

Ethiopia_UTM<-st_transform(Ethiopia, 20138) #Adinan / UTM Zone 38N st_crs(Ethiopia_UTM) #confirm proper tranformation

Ethiopia_area_values <- st_area(Ethiopia_UTM) Ethiopia_area_values

Ethiopia_UTM$sq_meters <- Ethiopia_area_values

##Once the dataframe is to your liking, export it with whatever name you want using the line below.
#st_write(Ethiopia_UTM, "Ethiopia_UTM.shp")

##UGANDA Uganda <- st_read("geo3_ug2014.shp") #Import Uganda shapefile, projected in WGS 84

Uganda_UTM <- st_transform(Uganda, 21095) #Arc 1960 / UTM zone 35N st_crs(Uganda_UTM) #confirm proper tranformation

Uganda_area_values <- st_area(Uganda_UTM) Uganda_area_values

Uganda_UTM$sq_meters <- Uganda_area_values

##Once the dataframe is to your liking, export it with whatever name you want using the line below.
#st_write(Uganda_UTM, "Uganda_UTM.shp")

##df1[c(1, 6, 2:5)] #sample of how to re-order the columns if you need`