2

I have a raster that is projected to a state plane CRS and I am adding polygon/polyline shapefiles that are projected to WGS84. On the fly transformation is set to reproject to my raster CRS. When I use the identify features tool to select a feature, under derived I can see the correct area/length measurements. Is there a way to transfer that exact information into a new column(s) in the attributes by using the field calculator?

  • Do you have a specific use case for needing a duplicate field? – Brad Nesom Aug 21 '13 at 4:15
  • The data under derived is not viewable in the attributes and would like to be able to view that data on other platforms – wonderstruck80 Aug 21 '13 at 4:49
  • Ok my bad. I don't use qgis everyday, see comment on answer. I am pretty sure qgis works like this too. – Brad Nesom Aug 21 '13 at 5:03
1

If you are not sure about the right units of measurements, save a copy of the shapefile into the CRS of the raster.

That way you will get the correct values using the $area function in field calculator.

Note that identify tool and field calculators use different methods to calculate areas: https://hub.qgis.org/issues/4252

Vector -> Geometry Tools -> Export/Add geometry columns

lets you choose if measurement of the new columns shall be in layer CRS, project CRS or ellipsodial (which the identify tool uses).

0

Add a column of the type you desire to use.
Use field calculator,
My field = [area]
Not exact syntax.

  • So by using $area expression in the field calculator, the area is calculated based off of the layer's CRS (WGS84) which will yield either an unusable answer or 0. I am wondering if there is a specific expression that will read the info that is under derived. – wonderstruck80 Aug 21 '13 at 4:46
  • $area would work if you have a spatial database. [area] is the existing area field. – Brad Nesom Aug 21 '13 at 4:55
  • You are saying that your layer is in WGS but the area field is in your desired units? I don't have qgis in front of me. But if I were in arcmap I would set the document projection to the units I want, and calculate the length or area using the document units. Possibly a check box – Brad Nesom Aug 21 '13 at 5:01
  • 1
    $area will return the area of the polygon in the layers units. – Nathan W Aug 21 '13 at 5:17

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.