[Qgis-user] inconsistenty when calculating area depending on file type or projection?

Nyall Dawson nyall.dawson at gmail.com
Sun Oct 16 15:59:44 PDT 2016


On 16 October 2016 at 05:20, Carlos Cerdán <sig.upagu at gmail.com> wrote:
> Hi Nyall (and list)
>
> A small projecto with UTM and GEO layers can be downloaded from dropbox:
>
> https://www.dropbox.com/s/c4cfb48r5326vrk/Cajamarca.zip?dl=0
>
> Attribute table has the correct area in AreaKm2 field (and in these
> unities). "AreaOTFoff" is the area given by field calculator when "On The
> Fly transformation" is deactivated. "AreaOTF_on" is the area with it
> activated.
>
> So: when I have a GEO layer, I can't calculate correct area directly in that
> layer: I've to reproject to UTM and deactivate automatic transformation of
> SRCs, to use field calculator expecting correct values.
>
> OS : Ubuntu 16.04
> QGIS : 2.16.3
> SRC settings: by default (ellipsoide WGS84 for measures)

Thanks for sending this through, but again - I can't find any issue here.

The different area calculations come from the difference between
measuring the area using a flat plane (OTF off, no ellipsoid set) vs
measuring the area using an ellipsoid (OTF on, ellipsoid set under the
project "general" settings). When OTF is on QGIS calculates the same
area regardless of whether the geographic or projected source layer is
used.

Hope that clarifies!

Nyall



>
> Thank you for your interest
>
> Carlos Cerdán
>
>
> 2016-10-14 15:14 GMT-05:00 Nyall Dawson <nyall.dawson at gmail.com>:
>>
>> On 15 Oct 2016 12:51 AM, "Carlos Cerdán" <sig.upagu at gmail.com> wrote:
>> >
>> > Hi Nyall
>> >
>> > I'm afraid that 2.16 has still this issue. I've loaded an UTM-17 south
>> > layer (my zone) and a Lat-long layer and:
>> >
>> > 1. SRC was seted in UTM
>> >
>> > 2. In UTM layer, if OTF SRC transformation is active, I get different
>> > area than if it's deactivated. Correct value is the last one.
>> >
>> > 3. In Lat-long layer, if OTF SRC transformation is active, calculated
>> > area is same as the wrong value of first layer. I can't get the correct
>> > value in this layer, so I have to reproject into a new one and do step 2
>> > (with OTF deactivated).
>> >
>> > What about a general option to set the prefered SRC to calculate areas
>> > and lengths with OTF active?
>>
>> Hi Carlos,
>>
>> Can you please share your file? Cut it down to just a few polygons and let
>> me know what area you expect to see. Email direct to myself.
>>
>> Thanks!
>>
>> Nyall
>>
>>
>> >
>> > Regards from Peru
>> >
>> > Carlos
>> >
>> >
>> >
>> > 2016-10-12 18:06 GMT-05:00 Nyall Dawson <nyall.dawson at gmail.com>:
>> >>
>> >> On 12 Oct 2016 11:56 PM, "Carlos Cerdán" <sig.upagu at gmail.com> wrote:
>> >> >
>> >> > AFAIK, It also is needed to turn off "on the fly SRC transformation"
>> >> > to get correct area values.... Or QGIS has fixed this point?
>> >>
>> >> Everything should be fixed in recent versions, and I very (VERY) much
>> >> want to know if any issues are still encountered.
>> >>
>> >> Calculating area/length is a core task for a GIS and we need to make
>> >> sure it's rock solid. (Which it should be since 2.16!)
>> >>
>> >> Nyall
>> >>
>> >>
>> >> >
>> >> > If you can't get correct area values, check out about it....
>> >> >
>> >> >
>> >> > 2016-10-12 7:40 GMT-05:00 DelazJ <delazj at gmail.com>:
>> >> >>
>> >> >> Hi,
>> >> >> To complete Nicolas answer, you should check what are the
>> >> >> measurements options set in Project --> Project Properties --> General tab.
>> >> >> See also
>> >> >> http://docs.qgis.org/2.14/en/docs/user_manual/introduction/general_tools.html#measuring
>> >> >>
>> >> >> 2016-10-12 14:07 GMT+02:00 Nicolas Cadieux
>> >> >> <nicolas.cadieux at archeotec.ca>:
>> >> >>>
>> >> >>> Hi,
>> >> >>> You may be calculating square degrees and not metres.  It can
>> >> >>> depend on the crs depending on the tools you are using.
>> >> >>> Nicolas
>> >> >>>
>> >> >>> Le 11 oct. 2016 à 08:54, Martina Schäfer [via OSGeo.org] <[hidden
>> >> >>> email]> a écrit :
>> >> >>>
>> >> >>>> I experienced some confusion with calculation of area using the
>> >> >>>> field calculator in QGIS version 2.16.3. Since I'm using MapInfo
>> >> >>>> Professional as well, I mainly use tab-files that I can open in both
>> >> >>>> programmes, but occasionally I save as shapefile since this used to be the
>> >> >>>> default in QGIS.
>> >> >>>>
>> >> >>>> When comparing files, I coincidently realized that there was a
>> >> >>>> mismatch in calculated area for the shapefile and the tab-file for exactly
>> >> >>>> the same polygons! I used the field calculator in the attribute table in
>> >> >>>> both cases, but for the shapefile the resulting areas were almost doubled in
>> >> >>>> area compared to the tab-file. Any idea why this is happening?
>> >> >>>>
>> >> >>>> I also realized similar differences when calculating area in a
>> >> >>>> file where projection has been converted from SWEREF99TM (a Swedish national
>> >> >>>> projection) to WGS84. There differences occurred in both the tab and
>> >> >>>> shapefile compared to the area calculated for the same tab-file in MapInfo.
>> >> >>>> Again I find this very confusing!
>> >> >>>>
>> >> >>>> I need to rely on the area-calculations thus I really hope someone
>> >> >>>> here can explain to me what is happening!
>> >> >>>>
>> >> >>>> Thanks in advance,
>> >> >>>> Martina
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>> ________________________________
>> >> >>>> If you reply to this email, your message will be added to the
>> >> >>>> discussion below:
>> >> >>>>
>> >> >>>> http://osgeo-org.1560.x6.nabble.com/inconsistenty-when-calculating-area-depending-on-file-type-or-projection-tp5290228.html
>> >> >>>> To start a new topic under Quantum GIS - User, email [hidden
>> >> >>>> email]
>> >> >>>> To unsubscribe from Quantum GIS - User, click here.
>> >> >>>> NAML
>> >> >>>
>> >> >>>
>> >> >>> ________________________________
>> >> >>> View this message in context: Re: inconsistenty when calculating
>> >> >>> area depending on file type or projection?
>> >> >>> Sent from the Quantum GIS - User mailing list archive at
>> >> >>> Nabble.com.
>> >> >>>
>> >> >>> _______________________________________________
>> >> >>> Qgis-user mailing list
>> >> >>> Qgis-user at lists.osgeo.org
>> >> >>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >> >>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >> >>
>> >> >>
>> >> >>
>> >> >> _______________________________________________
>> >> >> Qgis-user mailing list
>> >> >> Qgis-user at lists.osgeo.org
>> >> >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >> >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >> >
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Qgis-user mailing list
>> >> > Qgis-user at lists.osgeo.org
>> >> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> >
>> >
>
>



More information about the Qgis-user mailing list