Converting point into line using QGISSplit a line feature using nearby pointsUsing ST_split to split a line feature using nearby pointsPostGIS make line from shortest distance from points to polygonsConverting polygon to lines without duplicate edges?Split feature (MultiLine) not working as expected - newist QGIS user (version 2.18.13)Exploding line into segments using QGIS?QGIS 3 Line connecting point to label issue - can not get line to align with label in desired placeSplitting rectangles into a desired number of parts in QGISNative QGIS Dissolve tool not compatible with SAGA Split Lines at Points toolCreate a line string from street geometry

What was the Shuttle Carrier Aircraft escape tunnel?

Did Karl Marx ever use any example that involved cotton and dollars to illustrate the way capital and surplus value were generated?

Long term BTC investing

How was Hillel permitted to go to the skylight to hear the shiur

How to get cool night-vision without lame drawbacks?

Can we get mode of lightning component if its open in App Builder?

Why do some games show lights shine thorugh walls?

Is this one of the engines from the 9/11 aircraft?

Why doesn't a marching band have strings?

Interaction between Leyline of Anticipation and Teferi, Time Raveler

How long would it take to cross the Channel in 1890's?

Can White Castle?

How much will studying magic in an academy cost?

How do I turn off a repeating trade?

Why do all the teams that I have worked with always finish a sprint without completion of all the stories?

Hot coffee brewing solutions for deep woods camping

Impossible darts scores

Links to webpages in books

Are all instances of trolls turning to stone ultimately references back to Tolkien?

How is hair tissue mineral analysis performed?

How does a monk's Martial Arts feature modify damage done by magical monk weapons?

How does metta sutra develop loving kindness

If I wouldn't want to read the story, is writing it still a good idea?

First-year PhD giving a talk among well-established researchers in the field



Converting point into line using QGIS


Split a line feature using nearby pointsUsing ST_split to split a line feature using nearby pointsPostGIS make line from shortest distance from points to polygonsConverting polygon to lines without duplicate edges?Split feature (MultiLine) not working as expected - newist QGIS user (version 2.18.13)Exploding line into segments using QGIS?QGIS 3 Line connecting point to label issue - can not get line to align with label in desired placeSplitting rectangles into a desired number of parts in QGISNative QGIS Dissolve tool not compatible with SAGA Split Lines at Points toolCreate a line string from street geometry






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








3















I have a set of points with datatype as geometry(MultiPoint, 32643), I want each point to be converted in short line segments. The purpose of doing this is to use "split by lines" tool in QGIS which splits a line layer with another line layer.



The suggestion in one of the answer is as below, but I could not find the geometry by expression tool. Also, I tried to implement the below command in PostgreSQL but it didn't work.



Convert your points into short line segments with the geometry by expression tool.
Use an expression like this:

make_line($geometry, translate($geometry, 1, 1))









share|improve this question
























  • Better try with st_makeline, st_translate ...

    – snaileater
    Jun 6 at 10:32











  • Yes, that worked

    – Swapnil
    Jun 6 at 10:34


















3















I have a set of points with datatype as geometry(MultiPoint, 32643), I want each point to be converted in short line segments. The purpose of doing this is to use "split by lines" tool in QGIS which splits a line layer with another line layer.



The suggestion in one of the answer is as below, but I could not find the geometry by expression tool. Also, I tried to implement the below command in PostgreSQL but it didn't work.



Convert your points into short line segments with the geometry by expression tool.
Use an expression like this:

make_line($geometry, translate($geometry, 1, 1))









share|improve this question
























  • Better try with st_makeline, st_translate ...

    – snaileater
    Jun 6 at 10:32











  • Yes, that worked

    – Swapnil
    Jun 6 at 10:34














3












3








3








I have a set of points with datatype as geometry(MultiPoint, 32643), I want each point to be converted in short line segments. The purpose of doing this is to use "split by lines" tool in QGIS which splits a line layer with another line layer.



The suggestion in one of the answer is as below, but I could not find the geometry by expression tool. Also, I tried to implement the below command in PostgreSQL but it didn't work.



Convert your points into short line segments with the geometry by expression tool.
Use an expression like this:

make_line($geometry, translate($geometry, 1, 1))









share|improve this question
















I have a set of points with datatype as geometry(MultiPoint, 32643), I want each point to be converted in short line segments. The purpose of doing this is to use "split by lines" tool in QGIS which splits a line layer with another line layer.



The suggestion in one of the answer is as below, but I could not find the geometry by expression tool. Also, I tried to implement the below command in PostgreSQL but it didn't work.



Convert your points into short line segments with the geometry by expression tool.
Use an expression like this:

make_line($geometry, translate($geometry, 1, 1))






qgis postgresql linestring






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 6 at 6:34









Taras

3,1053 gold badges8 silver badges32 bronze badges




3,1053 gold badges8 silver badges32 bronze badges










asked Jun 6 at 5:51









Swapnil Swapnil

437 bronze badges




437 bronze badges












  • Better try with st_makeline, st_translate ...

    – snaileater
    Jun 6 at 10:32











  • Yes, that worked

    – Swapnil
    Jun 6 at 10:34


















  • Better try with st_makeline, st_translate ...

    – snaileater
    Jun 6 at 10:32











  • Yes, that worked

    – Swapnil
    Jun 6 at 10:34

















Better try with st_makeline, st_translate ...

– snaileater
Jun 6 at 10:32





Better try with st_makeline, st_translate ...

– snaileater
Jun 6 at 10:32













Yes, that worked

– Swapnil
Jun 6 at 10:34






Yes, that worked

– Swapnil
Jun 6 at 10:34











1 Answer
1






active

oldest

votes


















4















Tested on QGIS 2.18 and QGIS 3.4




I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...



Let's assume we have 10 features in "points" accordingly, see image below.



original



With the following Query, it is possible to convert each point into a short line segment. Mind the CRS.



SELECT p.id, make_line(p.geometry, translate(p.geometry,1,50))
FROM points AS p


The output Virtual Layer will generate short line segments including point's "id" where the initial point feature is the starting point of a line segment.



result




References:



  • SQL functions for coordinate transformations | ST_Translate





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%2f324974%2fconverting-point-into-line-using-qgis%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4















    Tested on QGIS 2.18 and QGIS 3.4




    I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...



    Let's assume we have 10 features in "points" accordingly, see image below.



    original



    With the following Query, it is possible to convert each point into a short line segment. Mind the CRS.



    SELECT p.id, make_line(p.geometry, translate(p.geometry,1,50))
    FROM points AS p


    The output Virtual Layer will generate short line segments including point's "id" where the initial point feature is the starting point of a line segment.



    result




    References:



    • SQL functions for coordinate transformations | ST_Translate





    share|improve this answer





























      4















      Tested on QGIS 2.18 and QGIS 3.4




      I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...



      Let's assume we have 10 features in "points" accordingly, see image below.



      original



      With the following Query, it is possible to convert each point into a short line segment. Mind the CRS.



      SELECT p.id, make_line(p.geometry, translate(p.geometry,1,50))
      FROM points AS p


      The output Virtual Layer will generate short line segments including point's "id" where the initial point feature is the starting point of a line segment.



      result




      References:



      • SQL functions for coordinate transformations | ST_Translate





      share|improve this answer



























        4












        4








        4








        Tested on QGIS 2.18 and QGIS 3.4




        I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...



        Let's assume we have 10 features in "points" accordingly, see image below.



        original



        With the following Query, it is possible to convert each point into a short line segment. Mind the CRS.



        SELECT p.id, make_line(p.geometry, translate(p.geometry,1,50))
        FROM points AS p


        The output Virtual Layer will generate short line segments including point's "id" where the initial point feature is the starting point of a line segment.



        result




        References:



        • SQL functions for coordinate transformations | ST_Translate





        share|improve this answer
















        Tested on QGIS 2.18 and QGIS 3.4




        I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...



        Let's assume we have 10 features in "points" accordingly, see image below.



        original



        With the following Query, it is possible to convert each point into a short line segment. Mind the CRS.



        SELECT p.id, make_line(p.geometry, translate(p.geometry,1,50))
        FROM points AS p


        The output Virtual Layer will generate short line segments including point's "id" where the initial point feature is the starting point of a line segment.



        result




        References:



        • SQL functions for coordinate transformations | ST_Translate






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 6 at 6:37

























        answered Jun 6 at 6:31









        TarasTaras

        3,1053 gold badges8 silver badges32 bronze badges




        3,1053 gold badges8 silver badges32 bronze badges



























            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%2f324974%2fconverting-point-into-line-using-qgis%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 write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

            What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

            Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos