[Qgis-user] bounding box algorithm

Tudorache, Marian Marian.Tudorache at navcanada.ca
Thu Oct 8 11:17:25 PDT 2020


Hi,

The question is for the developers of QGIS.
In my python classes I use a lot the boundingBox function for QgsGeometry class.
I would like to know if it is possible to see the algorithm for this function.

I found this but it is not really the algorithm

  858<https://qgis.org/api/2.18/classQgsGeometry.html#adfc04c94b51cdeb55942b699fdd4d564> QgsRectangle<https://qgis.org/api/2.18/classQgsRectangle.html> QgsGeometry::boundingBox<https://qgis.org/api/2.18/classQgsGeometry.html#adfc04c94b51cdeb55942b699fdd4d564>() const
  859 {
  860  if ( d->geometry<https://qgis.org/api/2.18/structQgsGeometryPrivate.html#ac49a8dd9cb78a9d041d1a46ac6a7ef15> )
  861  {
  862  return d->geometry<https://qgis.org/api/2.18/structQgsGeometryPrivate.html#ac49a8dd9cb78a9d041d1a46ac6a7ef15>->boundingBox<https://qgis.org/api/2.18/classQgsAbstractGeometryV2.html#ac6806e752aeda4f347741a0c7eb37167>();
  863  }
  864  return QgsRectangle<https://qgis.org/api/2.18/classQgsRectangle.html>();
  865 }
  866
Where
I create some polygons with QGIS which are exported to another system which use a bounding box formula that gives infinity.
The other system includes a check of the South Pole in the bounding box it also takes in consideration the orientation of the polygon coordinates.
It seems in one of the orientation the South Pole is inside the bounding box and if I switch the orientation the South Pole is not anymore inside.
QGIS seems to be immune of how the coordinates are oriented. Regardless of the order QGIS gives a finite bounding box without having a South Pole inside.

Can someone help me?
Thank you,
Marian
Anyone can help me?

________________________________

This electronic message, as well as any transmitted files included in the electronic message, may contain privileged or confidential information and is intended solely for the use of the individual(s) or entity to which it is addressed. If you have received this electronic message in error please notify the sender immediately and delete the electronic message. Any unauthorized copying, disclosure or distribution of the electronic message is strictly forbidden. NAV CANADA accepts no liability for any damage caused by any virus and/or other malicious code transmitted by this electronic communication.

Le pr?sent message ?lectronique et tout fichier qui peut y ?tre joint peuvent contenir des renseignements privil?gi?s ou confidentiels destin?s ? l'usage exclusif des personnes ou des organismes ? qui ils s'adressent. Si vous avez re?u ce message ?lectronique par erreur, veuillez en informer l'exp?diteur imm?diatement et supprimez le. Toute reproduction, divulgation ou distribution du pr?sent message ?lectronique est strictement interdite. NAV CANADA n'assume aucune responsabilit? en cas de dommage caus? par tout virus ou autre programme malveillant transmis par ce message ?lectronique.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201008/6b1eee5b/attachment.html>


More information about the Qgis-user mailing list