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

chris hermansen clhermansen at gmail.com
Fri Sep 16 11:10:30 PDT 2022


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.


-- 
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220916/4b2345a6/attachment.htm>


More information about the Qgis-user mailing list