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?

8
  • 1
    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 4 at 16:55
  • that looks like they are 4326 not UTM43N
    – Ian Turton
    Jun 4 at 17:01
  • 2
    Looks like a classic changed the CRS definition but kept the original coordinate values problem.
    – Gabriel
    Jun 4 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? Jun 4 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 4 at 17:12
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`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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