how to use GDAL ogr2ogrGDAL 1.9.1 ogr2ogr KML to PostGIS not incuding ExtendedDataExport Shapefile To KML -...

How to substitute values from a list into a function?

Why did John Williams use a march to symbolise Indiana Jones?

Can throughput exceed the bandwidth of a network

Is the withholding of funding notice allowed?

lead or lag function to get several values, not just the nth

Can a space-faring robot still function over a billion years?

Should we avoid writing fiction about historical events without extensive research?

What are all the squawk codes?

Is divide-by-zero a security vulnerability?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

At what level can a party fight a mimic?

Source for Cremation Specifically Not Jewish

The need of reserving one's ability in job interviews

How can atoms be electrically neutral when there is a difference in the positions of the charges?

VAT refund for a conference ticket in Sweden

School performs periodic password audits. Is my password compromised?

For a 1-action spell, do I need to take a turn to ready the spell before I can cast it, or can I cast it immediately?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

What is the difference between a forward slip and a side slip?

What am I? I am in theaters and computer programs

How can I be pwned if I'm not registered on the compromised site?

Why is it "take a leak?"

What should the omniscient narrator call a character?

Is there a full canon version of Tyrion's jackass/honeycomb joke?



how to use GDAL ogr2ogr


GDAL 1.9.1 ogr2ogr KML to PostGIS not incuding ExtendedDataExport Shapefile To KML - Google Maps Layers/TilesClip and copy files to same directory structure using OGR/GDAL with PythonHow do I use ogr2ogr with python GDAL?Erasing features using Python GDAL/OGR?Node GDAL for ogr2ogr conversionHow to ‘invert’ or ‘reverse’ a vector cutline when gdalwarp'ing a raster?Convert *.asc OSGB36 files to WGS84 GeoTIFF using gdal/ogr2ogrWindows & Python 2.7: Import and DLL load failed with GDAL 2.1.2How to use gdal ogr2ogr to subset features by attributes stored in a csv?













1















I have a very large JSON file made up vector polygons, I want to use GDAL ogr2ogr to clip the JSON polygons and convert the AOI into a shapefile.



I see this can be done by ogr2ogr -f "ESRI Shapefile" <output>.shp <input>.json -clipsrc llx lly urx ury



However I do not know how to use GDAL commands... is it done via CMD or python terminal?



I have QGIS 3.0.3 installed, and GDAL downloaded as a .zip (extracted now) on my desktop.



can someone explain to process to execute this command?










share|improve this question



























    1















    I have a very large JSON file made up vector polygons, I want to use GDAL ogr2ogr to clip the JSON polygons and convert the AOI into a shapefile.



    I see this can be done by ogr2ogr -f "ESRI Shapefile" <output>.shp <input>.json -clipsrc llx lly urx ury



    However I do not know how to use GDAL commands... is it done via CMD or python terminal?



    I have QGIS 3.0.3 installed, and GDAL downloaded as a .zip (extracted now) on my desktop.



    can someone explain to process to execute this command?










    share|improve this question

























      1












      1








      1








      I have a very large JSON file made up vector polygons, I want to use GDAL ogr2ogr to clip the JSON polygons and convert the AOI into a shapefile.



      I see this can be done by ogr2ogr -f "ESRI Shapefile" <output>.shp <input>.json -clipsrc llx lly urx ury



      However I do not know how to use GDAL commands... is it done via CMD or python terminal?



      I have QGIS 3.0.3 installed, and GDAL downloaded as a .zip (extracted now) on my desktop.



      can someone explain to process to execute this command?










      share|improve this question














      I have a very large JSON file made up vector polygons, I want to use GDAL ogr2ogr to clip the JSON polygons and convert the AOI into a shapefile.



      I see this can be done by ogr2ogr -f "ESRI Shapefile" <output>.shp <input>.json -clipsrc llx lly urx ury



      However I do not know how to use GDAL commands... is it done via CMD or python terminal?



      I have QGIS 3.0.3 installed, and GDAL downloaded as a .zip (extracted now) on my desktop.



      can someone explain to process to execute this command?







      gdal ogr2ogr






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 2 '18 at 19:40









      NULL.DudeNULL.Dude

      1,515420




      1,515420






















          2 Answers
          2






          active

          oldest

          votes


















          2














          You need to use the CMD to use ogr2ogr. Normally, if you have QGIS, you should already have ogr2ogr (you can assess this typing ogr2ogr in CMD terminal)



          You can also use "Clip vector by extent" within QGIS Processing Toolbox if you prefer to not use command line (or are a bit afraid of it)






          share|improve this answer



















          • 3





            You may need to use the osgeo cmd window

            – Ian Turton
            Jul 3 '18 at 7:14











          • Yes, some GDAL directories must ne added to%PATH% before running the utility. In osgeo cmd they are set for you.

            – user30184
            Jul 3 '18 at 9:12











          • got an error saying no driver available......

            – NULL.Dude
            Jul 3 '18 at 11:33











          • Please add your command line and the full error message to your question.

            – AndreJ
            3 mins ago



















          0














          Create a .bat like this - change the paths to suit your install. If at all changes will be in the OSGEO root and python path.



          @echo off
          SET OSGEO4W_ROOT=C:OSGeo4W64
          call "%OSGEO4W_ROOT%"bino4w_env.bat
          call "%OSGEO4W_ROOT%"appsgrassgrass-7.4.0etcenv.bat

          path %PATH%;%OSGEO4W_ROOT%appsqgisbin
          path %PATH%;%OSGEO4W_ROOT%appsgrassgrass-7.4.0lib
          path %PATH%;C:OSGeo4W64appsQt5bin
          path %PATH%;C:OSGeo4W64appsPython37Scripts

          set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%appsqgispython
          set PYTHONHOME=%OSGEO4W_ROOT%appsPython37

          Cmd.exe


          When you run this you can now type in ogr2ogr and get it's usage rather than unrecognised command.






          share|improve this answer























            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%2f288218%2fhow-to-use-gdal-ogr2ogr%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









            2














            You need to use the CMD to use ogr2ogr. Normally, if you have QGIS, you should already have ogr2ogr (you can assess this typing ogr2ogr in CMD terminal)



            You can also use "Clip vector by extent" within QGIS Processing Toolbox if you prefer to not use command line (or are a bit afraid of it)






            share|improve this answer



















            • 3





              You may need to use the osgeo cmd window

              – Ian Turton
              Jul 3 '18 at 7:14











            • Yes, some GDAL directories must ne added to%PATH% before running the utility. In osgeo cmd they are set for you.

              – user30184
              Jul 3 '18 at 9:12











            • got an error saying no driver available......

              – NULL.Dude
              Jul 3 '18 at 11:33











            • Please add your command line and the full error message to your question.

              – AndreJ
              3 mins ago
















            2














            You need to use the CMD to use ogr2ogr. Normally, if you have QGIS, you should already have ogr2ogr (you can assess this typing ogr2ogr in CMD terminal)



            You can also use "Clip vector by extent" within QGIS Processing Toolbox if you prefer to not use command line (or are a bit afraid of it)






            share|improve this answer



















            • 3





              You may need to use the osgeo cmd window

              – Ian Turton
              Jul 3 '18 at 7:14











            • Yes, some GDAL directories must ne added to%PATH% before running the utility. In osgeo cmd they are set for you.

              – user30184
              Jul 3 '18 at 9:12











            • got an error saying no driver available......

              – NULL.Dude
              Jul 3 '18 at 11:33











            • Please add your command line and the full error message to your question.

              – AndreJ
              3 mins ago














            2












            2








            2







            You need to use the CMD to use ogr2ogr. Normally, if you have QGIS, you should already have ogr2ogr (you can assess this typing ogr2ogr in CMD terminal)



            You can also use "Clip vector by extent" within QGIS Processing Toolbox if you prefer to not use command line (or are a bit afraid of it)






            share|improve this answer













            You need to use the CMD to use ogr2ogr. Normally, if you have QGIS, you should already have ogr2ogr (you can assess this typing ogr2ogr in CMD terminal)



            You can also use "Clip vector by extent" within QGIS Processing Toolbox if you prefer to not use command line (or are a bit afraid of it)







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 2 '18 at 20:18









            ThomasG77ThomasG77

            10.6k2044




            10.6k2044








            • 3





              You may need to use the osgeo cmd window

              – Ian Turton
              Jul 3 '18 at 7:14











            • Yes, some GDAL directories must ne added to%PATH% before running the utility. In osgeo cmd they are set for you.

              – user30184
              Jul 3 '18 at 9:12











            • got an error saying no driver available......

              – NULL.Dude
              Jul 3 '18 at 11:33











            • Please add your command line and the full error message to your question.

              – AndreJ
              3 mins ago














            • 3





              You may need to use the osgeo cmd window

              – Ian Turton
              Jul 3 '18 at 7:14











            • Yes, some GDAL directories must ne added to%PATH% before running the utility. In osgeo cmd they are set for you.

              – user30184
              Jul 3 '18 at 9:12











            • got an error saying no driver available......

              – NULL.Dude
              Jul 3 '18 at 11:33











            • Please add your command line and the full error message to your question.

              – AndreJ
              3 mins ago








            3




            3





            You may need to use the osgeo cmd window

            – Ian Turton
            Jul 3 '18 at 7:14





            You may need to use the osgeo cmd window

            – Ian Turton
            Jul 3 '18 at 7:14













            Yes, some GDAL directories must ne added to%PATH% before running the utility. In osgeo cmd they are set for you.

            – user30184
            Jul 3 '18 at 9:12





            Yes, some GDAL directories must ne added to%PATH% before running the utility. In osgeo cmd they are set for you.

            – user30184
            Jul 3 '18 at 9:12













            got an error saying no driver available......

            – NULL.Dude
            Jul 3 '18 at 11:33





            got an error saying no driver available......

            – NULL.Dude
            Jul 3 '18 at 11:33













            Please add your command line and the full error message to your question.

            – AndreJ
            3 mins ago





            Please add your command line and the full error message to your question.

            – AndreJ
            3 mins ago













            0














            Create a .bat like this - change the paths to suit your install. If at all changes will be in the OSGEO root and python path.



            @echo off
            SET OSGEO4W_ROOT=C:OSGeo4W64
            call "%OSGEO4W_ROOT%"bino4w_env.bat
            call "%OSGEO4W_ROOT%"appsgrassgrass-7.4.0etcenv.bat

            path %PATH%;%OSGEO4W_ROOT%appsqgisbin
            path %PATH%;%OSGEO4W_ROOT%appsgrassgrass-7.4.0lib
            path %PATH%;C:OSGeo4W64appsQt5bin
            path %PATH%;C:OSGeo4W64appsPython37Scripts

            set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%appsqgispython
            set PYTHONHOME=%OSGEO4W_ROOT%appsPython37

            Cmd.exe


            When you run this you can now type in ogr2ogr and get it's usage rather than unrecognised command.






            share|improve this answer




























              0














              Create a .bat like this - change the paths to suit your install. If at all changes will be in the OSGEO root and python path.



              @echo off
              SET OSGEO4W_ROOT=C:OSGeo4W64
              call "%OSGEO4W_ROOT%"bino4w_env.bat
              call "%OSGEO4W_ROOT%"appsgrassgrass-7.4.0etcenv.bat

              path %PATH%;%OSGEO4W_ROOT%appsqgisbin
              path %PATH%;%OSGEO4W_ROOT%appsgrassgrass-7.4.0lib
              path %PATH%;C:OSGeo4W64appsQt5bin
              path %PATH%;C:OSGeo4W64appsPython37Scripts

              set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%appsqgispython
              set PYTHONHOME=%OSGEO4W_ROOT%appsPython37

              Cmd.exe


              When you run this you can now type in ogr2ogr and get it's usage rather than unrecognised command.






              share|improve this answer


























                0












                0








                0







                Create a .bat like this - change the paths to suit your install. If at all changes will be in the OSGEO root and python path.



                @echo off
                SET OSGEO4W_ROOT=C:OSGeo4W64
                call "%OSGEO4W_ROOT%"bino4w_env.bat
                call "%OSGEO4W_ROOT%"appsgrassgrass-7.4.0etcenv.bat

                path %PATH%;%OSGEO4W_ROOT%appsqgisbin
                path %PATH%;%OSGEO4W_ROOT%appsgrassgrass-7.4.0lib
                path %PATH%;C:OSGeo4W64appsQt5bin
                path %PATH%;C:OSGeo4W64appsPython37Scripts

                set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%appsqgispython
                set PYTHONHOME=%OSGEO4W_ROOT%appsPython37

                Cmd.exe


                When you run this you can now type in ogr2ogr and get it's usage rather than unrecognised command.






                share|improve this answer













                Create a .bat like this - change the paths to suit your install. If at all changes will be in the OSGEO root and python path.



                @echo off
                SET OSGEO4W_ROOT=C:OSGeo4W64
                call "%OSGEO4W_ROOT%"bino4w_env.bat
                call "%OSGEO4W_ROOT%"appsgrassgrass-7.4.0etcenv.bat

                path %PATH%;%OSGEO4W_ROOT%appsqgisbin
                path %PATH%;%OSGEO4W_ROOT%appsgrassgrass-7.4.0lib
                path %PATH%;C:OSGeo4W64appsQt5bin
                path %PATH%;C:OSGeo4W64appsPython37Scripts

                set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%appsqgispython
                set PYTHONHOME=%OSGEO4W_ROOT%appsPython37

                Cmd.exe


                When you run this you can now type in ogr2ogr and get it's usage rather than unrecognised command.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 10 mins ago









                GeorgeCGeorgeC

                2,87132980




                2,87132980






























                    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%2f288218%2fhow-to-use-gdal-ogr2ogr%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

                    Щит и меч (фильм) Содержание Названия серий | Сюжет |...

                    Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

                    Meter-Bus Содержание Параметры шины | Стандартизация |...