Finding algorithms of QGIS commands?What are Definition, Algorithms and Practical Solutions for Concave Hull?Finding center of geometry of object?Finding minimum-area-rectangle for given points?Learning resources for beginning differential topology for a programmer?How to Create a Minimum Bounding Polygon in QGISWhat algorithm does QGIS use to calculate Nearest Neighbor Index?Calculate area of geometry derived from current feature in QGIS 2.8Finding documentation for arcpy.gp functions?Creating Minimum Convex Polygon - Home Range from Points in QGISHow to generalize shape with PyQGIS without much Distortion in the shape?

How to pronounce "I ♥ Huckabees"?

While on vacation my taxi took a longer route, possibly to scam me out of money. How can I deal with this?

Could this Scherzo by Beethoven be considered to be a fugue?

I got the following comment from a reputed math journal. What does it mean?

What are substitutions for coconut in curry?

Why is the President allowed to veto a cancellation of emergency powers?

How could an airship be repaired midflight?

When to use a slotted vs. solid turner?

Is it true that good novels will automatically sell themselves on Amazon (and so on) and there is no need for one to waste time promoting?

Happy pi day, everyone!

Recruiter wants very extensive technical details about all of my previous work

Examples of transfinite towers

Brexit - No Deal Rejection

About the actual radiative impact of greenhouse gas emission over time

Did Ender ever learn that he killed Stilson and/or Bonzo?

How to prove the triangle inequality for this metric space

Official degrees of earth’s rotation per day

Does .bashrc contain syntax errors?

Non-trivial topology where only open sets are closed

Professor being mistaken for a grad student

How to explain that I do not want to visit a country due to personal safety concern?

What's the meaning of a knight fighting a snail in medieval book illustrations?

A single argument pattern definition applies to multiple-argument patterns?

Print a physical multiplication table



Finding algorithms of QGIS commands?


What are Definition, Algorithms and Practical Solutions for Concave Hull?Finding center of geometry of object?Finding minimum-area-rectangle for given points?Learning resources for beginning differential topology for a programmer?How to Create a Minimum Bounding Polygon in QGISWhat algorithm does QGIS use to calculate Nearest Neighbor Index?Calculate area of geometry derived from current feature in QGIS 2.8Finding documentation for arcpy.gp functions?Creating Minimum Convex Polygon - Home Range from Points in QGISHow to generalize shape with PyQGIS without much Distortion in the shape?













5















I'm looking for the algorithms (the math) used by QGIS but I can't find any documentation about it



The ones I'm looking for are:



  • Minimum bounding geometry (convex hull)

  • Clip a polygon by a polygon

Does anyone knows where I can find them?










share|improve this question
























  • docs.qgis.org/testing/en/docs/user_manual/processing/…

    – Fran Raga
    Mar 12 at 10:31






  • 5





    It's open source software. As the the old spaghetti sauce commercial used to say, "It's in there."

    – Vince
    Mar 12 at 11:01















5















I'm looking for the algorithms (the math) used by QGIS but I can't find any documentation about it



The ones I'm looking for are:



  • Minimum bounding geometry (convex hull)

  • Clip a polygon by a polygon

Does anyone knows where I can find them?










share|improve this question
























  • docs.qgis.org/testing/en/docs/user_manual/processing/…

    – Fran Raga
    Mar 12 at 10:31






  • 5





    It's open source software. As the the old spaghetti sauce commercial used to say, "It's in there."

    – Vince
    Mar 12 at 11:01













5












5








5








I'm looking for the algorithms (the math) used by QGIS but I can't find any documentation about it



The ones I'm looking for are:



  • Minimum bounding geometry (convex hull)

  • Clip a polygon by a polygon

Does anyone knows where I can find them?










share|improve this question
















I'm looking for the algorithms (the math) used by QGIS but I can't find any documentation about it



The ones I'm looking for are:



  • Minimum bounding geometry (convex hull)

  • Clip a polygon by a polygon

Does anyone knows where I can find them?







qgis algorithm documentation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 12 at 10:57









Vince

14.7k32749




14.7k32749










asked Mar 12 at 10:04









Koen VenkenKoen Venken

554




554












  • docs.qgis.org/testing/en/docs/user_manual/processing/…

    – Fran Raga
    Mar 12 at 10:31






  • 5





    It's open source software. As the the old spaghetti sauce commercial used to say, "It's in there."

    – Vince
    Mar 12 at 11:01

















  • docs.qgis.org/testing/en/docs/user_manual/processing/…

    – Fran Raga
    Mar 12 at 10:31






  • 5





    It's open source software. As the the old spaghetti sauce commercial used to say, "It's in there."

    – Vince
    Mar 12 at 11:01
















docs.qgis.org/testing/en/docs/user_manual/processing/…

– Fran Raga
Mar 12 at 10:31





docs.qgis.org/testing/en/docs/user_manual/processing/…

– Fran Raga
Mar 12 at 10:31




5




5





It's open source software. As the the old spaghetti sauce commercial used to say, "It's in there."

– Vince
Mar 12 at 11:01





It's open source software. As the the old spaghetti sauce commercial used to say, "It's in there."

– Vince
Mar 12 at 11:01










2 Answers
2






active

oldest

votes


















14














The "minimum bounding geometry" and "clip polygon" algorithms in QGIS are implemented in /python/plugins/processing/algs/qgis/MinimumBoundingGeometry.py and /src/analysis/processing/qgsalgorithmclip.cpp.



If you follow through the source of these, you'll find that they rely on geometry-related functions from a C++ class called QgsGeometry, specifically QgsGeometry::convexHull() and QgsGeometry::intersection(). The "clip" algorithm also contains additional logic for building a union of geometries to form a mask polygon, as well as testing for points within the polygon, in the case of non-polygon vectors.



Reading through the QgsGeometry class shows that the actual algorithms themselves are implemented in a library called GEOS. GEOS is a C++ port of a Java library called the JTS Topology Suite, which implements a suite of geometry-related algorithms.



The core of the ConvexHull algorithm from GEOS is implemented here using an algorithm called Graham's scan. The implementation of intersection in GEOS is a bit more complicated and spread out, but here's a place to start looking. GEOS supports various binary operations between geometries and "intersection" is only one of them.



In general, GEOS is the place to look for the implementations of the various vector algorithms in QGIS, but there are also some raster algorithms in QGIS which are implemented by the GDAL library.






share|improve this answer






























    6














    You can check the algorithms at QGIS Github and find scripts for all the tools such as the minimum bounding geometry.






    share|improve this answer


















    • 1





      While these links are good starting points, it's worth noting that the algorithms themselves aren't in the QGIS source repository.

      – Candy Gumdrop
      Mar 12 at 13:24











    • @CandyGumdrop - Thanks for providing a comprehensive answer :)

      – Joseph
      Mar 13 at 10:14










    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "79"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f315196%2ffinding-algorithms-of-qgis-commands%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    14














    The "minimum bounding geometry" and "clip polygon" algorithms in QGIS are implemented in /python/plugins/processing/algs/qgis/MinimumBoundingGeometry.py and /src/analysis/processing/qgsalgorithmclip.cpp.



    If you follow through the source of these, you'll find that they rely on geometry-related functions from a C++ class called QgsGeometry, specifically QgsGeometry::convexHull() and QgsGeometry::intersection(). The "clip" algorithm also contains additional logic for building a union of geometries to form a mask polygon, as well as testing for points within the polygon, in the case of non-polygon vectors.



    Reading through the QgsGeometry class shows that the actual algorithms themselves are implemented in a library called GEOS. GEOS is a C++ port of a Java library called the JTS Topology Suite, which implements a suite of geometry-related algorithms.



    The core of the ConvexHull algorithm from GEOS is implemented here using an algorithm called Graham's scan. The implementation of intersection in GEOS is a bit more complicated and spread out, but here's a place to start looking. GEOS supports various binary operations between geometries and "intersection" is only one of them.



    In general, GEOS is the place to look for the implementations of the various vector algorithms in QGIS, but there are also some raster algorithms in QGIS which are implemented by the GDAL library.






    share|improve this answer



























      14














      The "minimum bounding geometry" and "clip polygon" algorithms in QGIS are implemented in /python/plugins/processing/algs/qgis/MinimumBoundingGeometry.py and /src/analysis/processing/qgsalgorithmclip.cpp.



      If you follow through the source of these, you'll find that they rely on geometry-related functions from a C++ class called QgsGeometry, specifically QgsGeometry::convexHull() and QgsGeometry::intersection(). The "clip" algorithm also contains additional logic for building a union of geometries to form a mask polygon, as well as testing for points within the polygon, in the case of non-polygon vectors.



      Reading through the QgsGeometry class shows that the actual algorithms themselves are implemented in a library called GEOS. GEOS is a C++ port of a Java library called the JTS Topology Suite, which implements a suite of geometry-related algorithms.



      The core of the ConvexHull algorithm from GEOS is implemented here using an algorithm called Graham's scan. The implementation of intersection in GEOS is a bit more complicated and spread out, but here's a place to start looking. GEOS supports various binary operations between geometries and "intersection" is only one of them.



      In general, GEOS is the place to look for the implementations of the various vector algorithms in QGIS, but there are also some raster algorithms in QGIS which are implemented by the GDAL library.






      share|improve this answer

























        14












        14








        14







        The "minimum bounding geometry" and "clip polygon" algorithms in QGIS are implemented in /python/plugins/processing/algs/qgis/MinimumBoundingGeometry.py and /src/analysis/processing/qgsalgorithmclip.cpp.



        If you follow through the source of these, you'll find that they rely on geometry-related functions from a C++ class called QgsGeometry, specifically QgsGeometry::convexHull() and QgsGeometry::intersection(). The "clip" algorithm also contains additional logic for building a union of geometries to form a mask polygon, as well as testing for points within the polygon, in the case of non-polygon vectors.



        Reading through the QgsGeometry class shows that the actual algorithms themselves are implemented in a library called GEOS. GEOS is a C++ port of a Java library called the JTS Topology Suite, which implements a suite of geometry-related algorithms.



        The core of the ConvexHull algorithm from GEOS is implemented here using an algorithm called Graham's scan. The implementation of intersection in GEOS is a bit more complicated and spread out, but here's a place to start looking. GEOS supports various binary operations between geometries and "intersection" is only one of them.



        In general, GEOS is the place to look for the implementations of the various vector algorithms in QGIS, but there are also some raster algorithms in QGIS which are implemented by the GDAL library.






        share|improve this answer













        The "minimum bounding geometry" and "clip polygon" algorithms in QGIS are implemented in /python/plugins/processing/algs/qgis/MinimumBoundingGeometry.py and /src/analysis/processing/qgsalgorithmclip.cpp.



        If you follow through the source of these, you'll find that they rely on geometry-related functions from a C++ class called QgsGeometry, specifically QgsGeometry::convexHull() and QgsGeometry::intersection(). The "clip" algorithm also contains additional logic for building a union of geometries to form a mask polygon, as well as testing for points within the polygon, in the case of non-polygon vectors.



        Reading through the QgsGeometry class shows that the actual algorithms themselves are implemented in a library called GEOS. GEOS is a C++ port of a Java library called the JTS Topology Suite, which implements a suite of geometry-related algorithms.



        The core of the ConvexHull algorithm from GEOS is implemented here using an algorithm called Graham's scan. The implementation of intersection in GEOS is a bit more complicated and spread out, but here's a place to start looking. GEOS supports various binary operations between geometries and "intersection" is only one of them.



        In general, GEOS is the place to look for the implementations of the various vector algorithms in QGIS, but there are also some raster algorithms in QGIS which are implemented by the GDAL library.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 12 at 12:16









        Candy GumdropCandy Gumdrop

        36114




        36114























            6














            You can check the algorithms at QGIS Github and find scripts for all the tools such as the minimum bounding geometry.






            share|improve this answer


















            • 1





              While these links are good starting points, it's worth noting that the algorithms themselves aren't in the QGIS source repository.

              – Candy Gumdrop
              Mar 12 at 13:24











            • @CandyGumdrop - Thanks for providing a comprehensive answer :)

              – Joseph
              Mar 13 at 10:14















            6














            You can check the algorithms at QGIS Github and find scripts for all the tools such as the minimum bounding geometry.






            share|improve this answer


















            • 1





              While these links are good starting points, it's worth noting that the algorithms themselves aren't in the QGIS source repository.

              – Candy Gumdrop
              Mar 12 at 13:24











            • @CandyGumdrop - Thanks for providing a comprehensive answer :)

              – Joseph
              Mar 13 at 10:14













            6












            6








            6







            You can check the algorithms at QGIS Github and find scripts for all the tools such as the minimum bounding geometry.






            share|improve this answer













            You can check the algorithms at QGIS Github and find scripts for all the tools such as the minimum bounding geometry.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 12 at 10:13









            JosephJoseph

            58k7100201




            58k7100201







            • 1





              While these links are good starting points, it's worth noting that the algorithms themselves aren't in the QGIS source repository.

              – Candy Gumdrop
              Mar 12 at 13:24











            • @CandyGumdrop - Thanks for providing a comprehensive answer :)

              – Joseph
              Mar 13 at 10:14












            • 1





              While these links are good starting points, it's worth noting that the algorithms themselves aren't in the QGIS source repository.

              – Candy Gumdrop
              Mar 12 at 13:24











            • @CandyGumdrop - Thanks for providing a comprehensive answer :)

              – Joseph
              Mar 13 at 10:14







            1




            1





            While these links are good starting points, it's worth noting that the algorithms themselves aren't in the QGIS source repository.

            – Candy Gumdrop
            Mar 12 at 13:24





            While these links are good starting points, it's worth noting that the algorithms themselves aren't in the QGIS source repository.

            – Candy Gumdrop
            Mar 12 at 13:24













            @CandyGumdrop - Thanks for providing a comprehensive answer :)

            – Joseph
            Mar 13 at 10:14





            @CandyGumdrop - Thanks for providing a comprehensive answer :)

            – Joseph
            Mar 13 at 10:14

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f315196%2ffinding-algorithms-of-qgis-commands%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye

            random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

            How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer