Finding algorithms of QGIS commands?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







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


1






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.8k32850




14.8k32850










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


















16














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

































    5














    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









    16














    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






























      16














      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




























        16












        16








        16







        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








        edited Mar 19 at 8:39









        Ian Turton

        50.3k548119




        50.3k548119










        answered Mar 12 at 12:16









        Candy GumdropCandy Gumdrop

        38114




        38114

























            5














            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
















            5














            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














            5












            5








            5







            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

            59k7102207




            59k7102207








            • 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

            Index of /

            Tribalistas

            Filisteus