[Qgis-user] Width and Height Attribute not in Meters

Jon jonr at destar.net
Fri Sep 16 11:26:26 PDT 2022


I literally just figured this out.

I created a new file and saved it with the new CRS that I wanted. The
simple things will take forever to figure out.

Just tried what Chris suggested and that is even easier.

Thank you Chris and List!!

Jon

-----Original Message-----
From: chris hermansen <clhermansen at gmail.com>
To: jonr at destar.net
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] Width and Height Attribute not in Meters
Date: Fri, 16 Sep 2022 11:10:30 -0700

Jon and list,

On Fri, Sep 16, 2022 at 10:57 AM Jon via Qgis-user
<qgis-user at lists.osgeo.org> wrote:
> Hello,
> 
> After creating a Bounding box layer from my shape file, whether I
> iterate and get multiple Bounding Box layers or not use iterate and
> get
> one, is that in my 'Attribute Table' for the 'Bounding boxes' layer
> that is produced adds the Width and Height to the Attribute Table but
> the numbers inside are not what I expect:
> 
> Width           Height
> 0.0412408       0.0457415
> 
> I expect these to be in meters due to changing the Coordinate
> Reference
> System (CRS) to one that has meters at its Units under the
> properties.
> But when changing the CRS I still see the same data. I have checked
> the
> actual distance of the polygons and they are positive numbers, I
> should
> not see decimals.
> 


You should expect these to be in the units of the source data. 

If you want them to be in some other CRS then you should either
reproject the input layer before you calculate the bounding box(es), or
reproject the output layer you already have and maybe recalculate the
width and height attributes.
> 
> I change the CRS by clicking the globe in the bottom right of the
> QGIS
> GUI and also by right-clicking the layer and selecting 'Layer CRS'
> and
> setting it there as well, still same issue.
> 
> 

Changing the project CRS usually doesn't affect the results of
computations.  It's just the display / reprojection on the fly.

Changing the layer CRS doesn't cause the data to be reprojected.

Use the Vector > Data Management Tools > Reproject layer menu item
instead.





More information about the Qgis-user mailing list