Automating conversion from .SHP to .GPX for thousands of shapefiles?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I am looking for a way to automate conversion from .Shp to .Gpx. I know how to save a shapefile into gpx in a layer, but it would take too much time to do 1 by 1 as we might receive thousands of shapefiles that need conversion.



I am not very prone in coding, especially in QGIS, so does anyone have an idea or maybe even a code to make this possible with QGIS?










share|improve this question























  • Do you have to use pyqgis or could you make use of the commandline ogr2ogr converter directly? ogr2ogr -f GPX out.gpx in.shp With a little batch scripting you can loop through the files/folder and convert everything in one.
    – Phil G
    32 mins ago
















up vote
1
down vote

favorite












I am looking for a way to automate conversion from .Shp to .Gpx. I know how to save a shapefile into gpx in a layer, but it would take too much time to do 1 by 1 as we might receive thousands of shapefiles that need conversion.



I am not very prone in coding, especially in QGIS, so does anyone have an idea or maybe even a code to make this possible with QGIS?










share|improve this question























  • Do you have to use pyqgis or could you make use of the commandline ogr2ogr converter directly? ogr2ogr -f GPX out.gpx in.shp With a little batch scripting you can loop through the files/folder and convert everything in one.
    – Phil G
    32 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am looking for a way to automate conversion from .Shp to .Gpx. I know how to save a shapefile into gpx in a layer, but it would take too much time to do 1 by 1 as we might receive thousands of shapefiles that need conversion.



I am not very prone in coding, especially in QGIS, so does anyone have an idea or maybe even a code to make this possible with QGIS?










share|improve this question















I am looking for a way to automate conversion from .Shp to .Gpx. I know how to save a shapefile into gpx in a layer, but it would take too much time to do 1 by 1 as we might receive thousands of shapefiles that need conversion.



I am not very prone in coding, especially in QGIS, so does anyone have an idea or maybe even a code to make this possible with QGIS?







pyqgis shapefile convert gpx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 44 mins ago









Vince

14k32444




14k32444










asked 46 mins ago









Aurelija Viluckytė

142




142











  • Do you have to use pyqgis or could you make use of the commandline ogr2ogr converter directly? ogr2ogr -f GPX out.gpx in.shp With a little batch scripting you can loop through the files/folder and convert everything in one.
    – Phil G
    32 mins ago
















  • Do you have to use pyqgis or could you make use of the commandline ogr2ogr converter directly? ogr2ogr -f GPX out.gpx in.shp With a little batch scripting you can loop through the files/folder and convert everything in one.
    – Phil G
    32 mins ago















Do you have to use pyqgis or could you make use of the commandline ogr2ogr converter directly? ogr2ogr -f GPX out.gpx in.shp With a little batch scripting you can loop through the files/folder and convert everything in one.
– Phil G
32 mins ago




Do you have to use pyqgis or could you make use of the commandline ogr2ogr converter directly? ogr2ogr -f GPX out.gpx in.shp With a little batch scripting you can loop through the files/folder and convert everything in one.
– Phil G
32 mins ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote













You can do this in qgis with gdal convertformat in the processing plugin:



processing.runalg("gdalogr:convertformat","input_shp", 16, "FORCE_GPX_TRACK=YES","output_gpx")


Now for your case you have a lot of layers, all you have to do is to make it in a loop






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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f297091%2fautomating-conversion-from-shp-to-gpx-for-thousands-of-shapefiles%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    You can do this in qgis with gdal convertformat in the processing plugin:



    processing.runalg("gdalogr:convertformat","input_shp", 16, "FORCE_GPX_TRACK=YES","output_gpx")


    Now for your case you have a lot of layers, all you have to do is to make it in a loop






    share|improve this answer
























      up vote
      2
      down vote













      You can do this in qgis with gdal convertformat in the processing plugin:



      processing.runalg("gdalogr:convertformat","input_shp", 16, "FORCE_GPX_TRACK=YES","output_gpx")


      Now for your case you have a lot of layers, all you have to do is to make it in a loop






      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        You can do this in qgis with gdal convertformat in the processing plugin:



        processing.runalg("gdalogr:convertformat","input_shp", 16, "FORCE_GPX_TRACK=YES","output_gpx")


        Now for your case you have a lot of layers, all you have to do is to make it in a loop






        share|improve this answer












        You can do this in qgis with gdal convertformat in the processing plugin:



        processing.runalg("gdalogr:convertformat","input_shp", 16, "FORCE_GPX_TRACK=YES","output_gpx")


        Now for your case you have a lot of layers, all you have to do is to make it in a loop







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 33 mins ago









        Hicham Zouarhi

        1,8491721




        1,8491721



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f297091%2fautomating-conversion-from-shp-to-gpx-for-thousands-of-shapefiles%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery