I use python 3 (QGIS libs). At some point of my developing system I need calculate the area of a few polygons.
I don't need a code, just a hint. Currently I generate the shapefiles, after that I reproject to some UTM projection (31981, 31982...) - it is up to longitude values. After all of this I calculate the area in square meters.
Is there a better way?
Example:
{1: 'POLYGON((-55.0814643160151 -15.4747051372406,-55.0719156519221 -15.4584140815233,-55.0676026598261 -15.4616817205702,-55.0682463899897 -15.4623228335751,-55.0687184587763 -15.4618678503567,-55.0697698847102 -15.4627364538155,-55.06865408576 -15.4633982444821,-55.0701990381526 -15.4664351790631,-55.0711431757258 -15.4752428112348,-55.0814643160151 -15.4747051372406))', 2: 'POLYGON((-55.0719244169455 -15.4833169944541,-55.0842840360862 -15.4812904488857,-55.0855285810691 -15.4817040312264,-55.0815374540549 -15.4747557381726,-55.0711948560935 -15.4755002093029,-55.0711519407493 -15.478933013755,-55.0719244169455 -15.4833169944541))', 3: 'POLYGON((-55.0899005212537 -15.4889346695518,-55.0856519021741 -15.4820279775066,-55.0848043241254 -15.4816350749179,-55.0840425767651 -15.4815316793757,-55.077894953703 -15.4827620829752,-55.0743437089673 -15.4832273597402,-55.073034790968 -15.4833824517626,-55.0725949086896 -15.4835013555677,-55.0722462215176 -15.4835504679889,-55.0721979417554 -15.4839304426437,-55.0721818485013 -15.4845508079267,-55.0727880277386 -15.4851504925981,-55.0736141481152 -15.4853572800126,-55.0749901213399 -15.485975056182,-55.0764733829251 -15.4864894374422,-55.0778332628957 -15.4870322504498,-55.0796866693249 -15.4877404900411,-55.0812825836888 -15.4883246566375,-55.0826639213315 -15.4888467864463,-55.0837073006383 -15.4891440379762,-55.0846219339123 -15.4893172191053,-55.0854507364979 -15.4896661657158,-55.0861226298562 -15.4898302996586,-55.086365369772 -15.489374084519,-55.086542395567 -15.4893999324292,-55.0867301501981 -15.4894981544583,-55.0892782487622 -15.4891621315338,-55.0896537580243 -15.4892034882309,-55.0899005212537 -15.4889346695518))', 4: 'POLYGON((-55.0684875936663 -15.4842808692493,-55.0693029852069 -15.4881270974884,-55.0698179693377 -15.4903190020083,-55.0728649587786 -15.4913322330361,-55.0746674032366 -15.4918905418884,-55.0811261625445 -15.4935447814866,-55.0837869138873 -15.492976138118,-55.0862116308367 -15.4921800347738,-55.0862107077495 -15.4900501847797,-55.0828418532268 -15.4891196609045,-55.0810286799327 -15.4886957541952,-55.079086760606 -15.4881477759415,-55.0778529444591 -15.4875015733046,-55.076576212968 -15.4869380829569,-55.0751707354442 -15.4863642517588,-55.0740227499858 -15.4857490615886,-55.0730088749782 -15.4854854080983,-55.0721452036754 -15.4849942879554,-55.071168879594 -15.483908649817,-55.0684875936663 -15.4842808692493))'}