Finding algorithms of QGIS commands?












3















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
    12 hours ago






  • 4





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

    – Vince
    11 hours ago
















3















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
    12 hours ago






  • 4





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

    – Vince
    11 hours ago














3












3








3








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 11 hours ago









Vince

14.7k32749




14.7k32749










asked 12 hours ago









Koen VenkenKoen Venken

454




454













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

    – Fran Raga
    12 hours ago






  • 4





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

    – Vince
    11 hours ago



















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

    – Fran Raga
    12 hours ago






  • 4





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

    – Vince
    11 hours ago

















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

– Fran Raga
12 hours ago





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

– Fran Raga
12 hours ago




4




4





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

– Vince
11 hours ago





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

– Vince
11 hours ago










2 Answers
2






active

oldest

votes


















9














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
























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

      – Candy Gumdrop
      9 hours ago











    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









    9














    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




























      9














      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


























        9












        9








        9







        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 10 hours ago









        Candy GumdropCandy Gumdrop

        31113




        31113

























            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
























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

              – Candy Gumdrop
              9 hours ago
















            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
























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

              – Candy Gumdrop
              9 hours ago














            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 12 hours ago









            JosephJoseph

            57.9k7100199




            57.9k7100199













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

              – Candy Gumdrop
              9 hours ago



















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

              – Candy Gumdrop
              9 hours ago

















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

            – Candy Gumdrop
            9 hours ago





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

            – Candy Gumdrop
            9 hours ago


















            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

            How to label and detect the document text images

            Vallis Paradisi

            Tabula Rosettana