Is it possible to convert Polygon to centerline linestring?Finding centrelines from polygons in QGIS?Create a...

Is opening a file faster than reading variable content?

Why didn't Lorentz conclude that no object can go faster than light?

How to achieve physical gender equality?

In a world with multiracial creatures, what word can be used instead of mankind?

How can guns be countered by melee combat without raw-ability or exceptional explanations?

How should I ship cards?

Microphone on Mars

Does resurrection consume material components if the target isn’t willing to be resurrected?

Arizona laws regarding ownership of ground glassware for chemistry usage

Badly designed reimbursement form. What does that say about the company?

Are there any spells or magic items that allow for making of ‘logic gates or wires’?

How do I add a strong "onion flavor" to the biryani (in restaurant style)?

How many copper coins fit inside a cubic foot?

Do error bars on probabilities have any meaning?

What is formjacking?

How can I differentiate duration vs starting time

Can I legally make a website about boycotting a certain company?

How can I make my enemies feel real and make combat more engaging?

Can a planet be tidally unlocked?

Multiple null checks in Java 8

80-bit collision resistence because of 80-bit x87 registers?

How do I avoid the "chosen hero" feeling?

Which part is the tail in 人参{にんじん}の尻尾{しっぽ}

Is corrosion inhibitor paste conductive?



Is it possible to convert Polygon to centerline linestring?


Finding centrelines from polygons in QGIS?Create a center line between 2 polyline - QGISCreate centerline from multi-digitized roadway lines Qgis 2.18Calculating average width of polygon?Convert polyline to polygon Using ArcObjectsIntersection between polylines feature to polygon in QGISConvert a line to polygonConvert a group of lines into a single polygone to style itConverting polygon to line feature in ArcGIS Desktop?Polygon to polyline conversionConverting polyline to polygon without 'Feature to Polygon'Calculate Polygon Centerline with a LeastCostPath approachConvert multiple lines into a polygon in QGIS













3















I have a Polygon which I want to convert to centerline linestring.



PolygonIMAGE 1



I used the Vector to convert to Polyline but they are not center line as under:



VECTOR TOOL



enter image description here



IMAGE 2



Polyline created by the above tool is not centerline polyline.



enter image description hereIMAGE 3



What I am expecting to get is as under (centerline per road, instead of the lines on the side of the road[Image 3]):



enter image description here



IMAGE 4










share|improve this question























  • See this post: gis.stackexchange.com/questions/33887/…

    – Cushen
    Jul 27 '18 at 0:47











  • I tried those options but it didnt work. The model implemented by underdark. Also didnt work, it returned empty shape file.

    – Duffer
    Jul 27 '18 at 1:22











  • OpenJUMP has a skeletonizer plugin.

    – user30184
    Jul 27 '18 at 3:55











  • The skeletonizer plugin in OpenJUMP needs me to add an input PointSHape Filealong with the Polygon. Hence I cant use it. I need something similar to pro.arcgis.com/en/pro-app/tool-reference/topographic-production/…

    – Duffer
    Jul 27 '18 at 4:39






  • 1





    If you want to stay in QGIS environment, try HCMGIS plugin. (Geometry processing | Skeleton / Medial Axis).. it requires QGIS3.0+ though.

    – Kazuhito
    Jul 27 '18 at 14:23


















3















I have a Polygon which I want to convert to centerline linestring.



PolygonIMAGE 1



I used the Vector to convert to Polyline but they are not center line as under:



VECTOR TOOL



enter image description here



IMAGE 2



Polyline created by the above tool is not centerline polyline.



enter image description hereIMAGE 3



What I am expecting to get is as under (centerline per road, instead of the lines on the side of the road[Image 3]):



enter image description here



IMAGE 4










share|improve this question























  • See this post: gis.stackexchange.com/questions/33887/…

    – Cushen
    Jul 27 '18 at 0:47











  • I tried those options but it didnt work. The model implemented by underdark. Also didnt work, it returned empty shape file.

    – Duffer
    Jul 27 '18 at 1:22











  • OpenJUMP has a skeletonizer plugin.

    – user30184
    Jul 27 '18 at 3:55











  • The skeletonizer plugin in OpenJUMP needs me to add an input PointSHape Filealong with the Polygon. Hence I cant use it. I need something similar to pro.arcgis.com/en/pro-app/tool-reference/topographic-production/…

    – Duffer
    Jul 27 '18 at 4:39






  • 1





    If you want to stay in QGIS environment, try HCMGIS plugin. (Geometry processing | Skeleton / Medial Axis).. it requires QGIS3.0+ though.

    – Kazuhito
    Jul 27 '18 at 14:23
















3












3








3








I have a Polygon which I want to convert to centerline linestring.



PolygonIMAGE 1



I used the Vector to convert to Polyline but they are not center line as under:



VECTOR TOOL



enter image description here



IMAGE 2



Polyline created by the above tool is not centerline polyline.



enter image description hereIMAGE 3



What I am expecting to get is as under (centerline per road, instead of the lines on the side of the road[Image 3]):



enter image description here



IMAGE 4










share|improve this question














I have a Polygon which I want to convert to centerline linestring.



PolygonIMAGE 1



I used the Vector to convert to Polyline but they are not center line as under:



VECTOR TOOL



enter image description here



IMAGE 2



Polyline created by the above tool is not centerline polyline.



enter image description hereIMAGE 3



What I am expecting to get is as under (centerline per road, instead of the lines on the side of the road[Image 3]):



enter image description here



IMAGE 4







qgis polygon line






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 26 '18 at 23:22









DufferDuffer

767




767













  • See this post: gis.stackexchange.com/questions/33887/…

    – Cushen
    Jul 27 '18 at 0:47











  • I tried those options but it didnt work. The model implemented by underdark. Also didnt work, it returned empty shape file.

    – Duffer
    Jul 27 '18 at 1:22











  • OpenJUMP has a skeletonizer plugin.

    – user30184
    Jul 27 '18 at 3:55











  • The skeletonizer plugin in OpenJUMP needs me to add an input PointSHape Filealong with the Polygon. Hence I cant use it. I need something similar to pro.arcgis.com/en/pro-app/tool-reference/topographic-production/…

    – Duffer
    Jul 27 '18 at 4:39






  • 1





    If you want to stay in QGIS environment, try HCMGIS plugin. (Geometry processing | Skeleton / Medial Axis).. it requires QGIS3.0+ though.

    – Kazuhito
    Jul 27 '18 at 14:23





















  • See this post: gis.stackexchange.com/questions/33887/…

    – Cushen
    Jul 27 '18 at 0:47











  • I tried those options but it didnt work. The model implemented by underdark. Also didnt work, it returned empty shape file.

    – Duffer
    Jul 27 '18 at 1:22











  • OpenJUMP has a skeletonizer plugin.

    – user30184
    Jul 27 '18 at 3:55











  • The skeletonizer plugin in OpenJUMP needs me to add an input PointSHape Filealong with the Polygon. Hence I cant use it. I need something similar to pro.arcgis.com/en/pro-app/tool-reference/topographic-production/…

    – Duffer
    Jul 27 '18 at 4:39






  • 1





    If you want to stay in QGIS environment, try HCMGIS plugin. (Geometry processing | Skeleton / Medial Axis).. it requires QGIS3.0+ though.

    – Kazuhito
    Jul 27 '18 at 14:23



















See this post: gis.stackexchange.com/questions/33887/…

– Cushen
Jul 27 '18 at 0:47





See this post: gis.stackexchange.com/questions/33887/…

– Cushen
Jul 27 '18 at 0:47













I tried those options but it didnt work. The model implemented by underdark. Also didnt work, it returned empty shape file.

– Duffer
Jul 27 '18 at 1:22





I tried those options but it didnt work. The model implemented by underdark. Also didnt work, it returned empty shape file.

– Duffer
Jul 27 '18 at 1:22













OpenJUMP has a skeletonizer plugin.

– user30184
Jul 27 '18 at 3:55





OpenJUMP has a skeletonizer plugin.

– user30184
Jul 27 '18 at 3:55













The skeletonizer plugin in OpenJUMP needs me to add an input PointSHape Filealong with the Polygon. Hence I cant use it. I need something similar to pro.arcgis.com/en/pro-app/tool-reference/topographic-production/…

– Duffer
Jul 27 '18 at 4:39





The skeletonizer plugin in OpenJUMP needs me to add an input PointSHape Filealong with the Polygon. Hence I cant use it. I need something similar to pro.arcgis.com/en/pro-app/tool-reference/topographic-production/…

– Duffer
Jul 27 '18 at 4:39




1




1





If you want to stay in QGIS environment, try HCMGIS plugin. (Geometry processing | Skeleton / Medial Axis).. it requires QGIS3.0+ though.

– Kazuhito
Jul 27 '18 at 14:23







If you want to stay in QGIS environment, try HCMGIS plugin. (Geometry processing | Skeleton / Medial Axis).. it requires QGIS3.0+ though.

– Kazuhito
Jul 27 '18 at 14:23












1 Answer
1






active

oldest

votes


















1














Answer: You can.
Good afternoon, Daffer, I found time for you and hurry to help you :-).
My answer is now practical.



The original data and table names are fictitious, do not forget to rename them with reference to your example.



Sit in my car and go together to the stop - the "center line of the road."



The initial geodata are polygons of a road network with a width of about 11 m in the EPSG: 4326 coordinate system, broken into segments, see Fig. 1.



enter image description here



1) In a convenient way for you, create a negative buffer, for example in PGAdmin:



create table buf_negative as
SELECT ST_Buffer (geom, -0.000045) as geom
FROM buf_dump;

or in QGIS tools: "Vector-Geoprocessing-Buffer Zones".
Thus, we reduced the width of the roads from 11 m to 1 m, see Fig.2



enter image description here



2) Convert the negative buffer (1 m) into lines, for example with QGIS tools:
"Vector-Processing geometry-polygons in a line" result see Fig. 3



enter image description here



3) Extract from the lines of the point, for example with the QGIS tools: "Vector-Processing geometry-Extract nodes", the result see Fig. 4



enter image description here



4) Create point buffers from them, so that they intersect each other and extract centroids from adjacent buffers, the result is shown in Fig. 5
(centroids are red dots)



enter image description here



5) From the centroid points, create the Delaunay Triangulation, for example with the QGIS tools: "Vector-Processing geometry-Delaunay triangulation", and trim the result with your 1 m negative buffer polygons, see the result of Fig. 6



enter image description here



6) Blast the lines into segments, for example, using QGIS Desktop with GRASS tools: "Data Analysis - Lines-Explode Lines", see Fig. 7



enter image description here



7) Run the following script in PGAdmin:



create table buf_centre_ln as
SELECT ST_Intersection (a.geom, b.geom) AS geom
FROM explode_ln as a, buf_negative as b
WHERE ST_Within (a.geom, b.geom);



see the result in Fig. 8



enter image description here



9) Remove duplicating lines and do with the center lines, whatever,



we arrived, your stop, it's time to say goodbye,
respectfully






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%2f290805%2fis-it-possible-to-convert-polygon-to-centerline-linestring%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









    1














    Answer: You can.
    Good afternoon, Daffer, I found time for you and hurry to help you :-).
    My answer is now practical.



    The original data and table names are fictitious, do not forget to rename them with reference to your example.



    Sit in my car and go together to the stop - the "center line of the road."



    The initial geodata are polygons of a road network with a width of about 11 m in the EPSG: 4326 coordinate system, broken into segments, see Fig. 1.



    enter image description here



    1) In a convenient way for you, create a negative buffer, for example in PGAdmin:



    create table buf_negative as
    SELECT ST_Buffer (geom, -0.000045) as geom
    FROM buf_dump;

    or in QGIS tools: "Vector-Geoprocessing-Buffer Zones".
    Thus, we reduced the width of the roads from 11 m to 1 m, see Fig.2



    enter image description here



    2) Convert the negative buffer (1 m) into lines, for example with QGIS tools:
    "Vector-Processing geometry-polygons in a line" result see Fig. 3



    enter image description here



    3) Extract from the lines of the point, for example with the QGIS tools: "Vector-Processing geometry-Extract nodes", the result see Fig. 4



    enter image description here



    4) Create point buffers from them, so that they intersect each other and extract centroids from adjacent buffers, the result is shown in Fig. 5
    (centroids are red dots)



    enter image description here



    5) From the centroid points, create the Delaunay Triangulation, for example with the QGIS tools: "Vector-Processing geometry-Delaunay triangulation", and trim the result with your 1 m negative buffer polygons, see the result of Fig. 6



    enter image description here



    6) Blast the lines into segments, for example, using QGIS Desktop with GRASS tools: "Data Analysis - Lines-Explode Lines", see Fig. 7



    enter image description here



    7) Run the following script in PGAdmin:



    create table buf_centre_ln as
    SELECT ST_Intersection (a.geom, b.geom) AS geom
    FROM explode_ln as a, buf_negative as b
    WHERE ST_Within (a.geom, b.geom);



    see the result in Fig. 8



    enter image description here



    9) Remove duplicating lines and do with the center lines, whatever,



    we arrived, your stop, it's time to say goodbye,
    respectfully






    share|improve this answer






























      1














      Answer: You can.
      Good afternoon, Daffer, I found time for you and hurry to help you :-).
      My answer is now practical.



      The original data and table names are fictitious, do not forget to rename them with reference to your example.



      Sit in my car and go together to the stop - the "center line of the road."



      The initial geodata are polygons of a road network with a width of about 11 m in the EPSG: 4326 coordinate system, broken into segments, see Fig. 1.



      enter image description here



      1) In a convenient way for you, create a negative buffer, for example in PGAdmin:



      create table buf_negative as
      SELECT ST_Buffer (geom, -0.000045) as geom
      FROM buf_dump;

      or in QGIS tools: "Vector-Geoprocessing-Buffer Zones".
      Thus, we reduced the width of the roads from 11 m to 1 m, see Fig.2



      enter image description here



      2) Convert the negative buffer (1 m) into lines, for example with QGIS tools:
      "Vector-Processing geometry-polygons in a line" result see Fig. 3



      enter image description here



      3) Extract from the lines of the point, for example with the QGIS tools: "Vector-Processing geometry-Extract nodes", the result see Fig. 4



      enter image description here



      4) Create point buffers from them, so that they intersect each other and extract centroids from adjacent buffers, the result is shown in Fig. 5
      (centroids are red dots)



      enter image description here



      5) From the centroid points, create the Delaunay Triangulation, for example with the QGIS tools: "Vector-Processing geometry-Delaunay triangulation", and trim the result with your 1 m negative buffer polygons, see the result of Fig. 6



      enter image description here



      6) Blast the lines into segments, for example, using QGIS Desktop with GRASS tools: "Data Analysis - Lines-Explode Lines", see Fig. 7



      enter image description here



      7) Run the following script in PGAdmin:



      create table buf_centre_ln as
      SELECT ST_Intersection (a.geom, b.geom) AS geom
      FROM explode_ln as a, buf_negative as b
      WHERE ST_Within (a.geom, b.geom);



      see the result in Fig. 8



      enter image description here



      9) Remove duplicating lines and do with the center lines, whatever,



      we arrived, your stop, it's time to say goodbye,
      respectfully






      share|improve this answer




























        1












        1








        1







        Answer: You can.
        Good afternoon, Daffer, I found time for you and hurry to help you :-).
        My answer is now practical.



        The original data and table names are fictitious, do not forget to rename them with reference to your example.



        Sit in my car and go together to the stop - the "center line of the road."



        The initial geodata are polygons of a road network with a width of about 11 m in the EPSG: 4326 coordinate system, broken into segments, see Fig. 1.



        enter image description here



        1) In a convenient way for you, create a negative buffer, for example in PGAdmin:



        create table buf_negative as
        SELECT ST_Buffer (geom, -0.000045) as geom
        FROM buf_dump;

        or in QGIS tools: "Vector-Geoprocessing-Buffer Zones".
        Thus, we reduced the width of the roads from 11 m to 1 m, see Fig.2



        enter image description here



        2) Convert the negative buffer (1 m) into lines, for example with QGIS tools:
        "Vector-Processing geometry-polygons in a line" result see Fig. 3



        enter image description here



        3) Extract from the lines of the point, for example with the QGIS tools: "Vector-Processing geometry-Extract nodes", the result see Fig. 4



        enter image description here



        4) Create point buffers from them, so that they intersect each other and extract centroids from adjacent buffers, the result is shown in Fig. 5
        (centroids are red dots)



        enter image description here



        5) From the centroid points, create the Delaunay Triangulation, for example with the QGIS tools: "Vector-Processing geometry-Delaunay triangulation", and trim the result with your 1 m negative buffer polygons, see the result of Fig. 6



        enter image description here



        6) Blast the lines into segments, for example, using QGIS Desktop with GRASS tools: "Data Analysis - Lines-Explode Lines", see Fig. 7



        enter image description here



        7) Run the following script in PGAdmin:



        create table buf_centre_ln as
        SELECT ST_Intersection (a.geom, b.geom) AS geom
        FROM explode_ln as a, buf_negative as b
        WHERE ST_Within (a.geom, b.geom);



        see the result in Fig. 8



        enter image description here



        9) Remove duplicating lines and do with the center lines, whatever,



        we arrived, your stop, it's time to say goodbye,
        respectfully






        share|improve this answer















        Answer: You can.
        Good afternoon, Daffer, I found time for you and hurry to help you :-).
        My answer is now practical.



        The original data and table names are fictitious, do not forget to rename them with reference to your example.



        Sit in my car and go together to the stop - the "center line of the road."



        The initial geodata are polygons of a road network with a width of about 11 m in the EPSG: 4326 coordinate system, broken into segments, see Fig. 1.



        enter image description here



        1) In a convenient way for you, create a negative buffer, for example in PGAdmin:



        create table buf_negative as
        SELECT ST_Buffer (geom, -0.000045) as geom
        FROM buf_dump;

        or in QGIS tools: "Vector-Geoprocessing-Buffer Zones".
        Thus, we reduced the width of the roads from 11 m to 1 m, see Fig.2



        enter image description here



        2) Convert the negative buffer (1 m) into lines, for example with QGIS tools:
        "Vector-Processing geometry-polygons in a line" result see Fig. 3



        enter image description here



        3) Extract from the lines of the point, for example with the QGIS tools: "Vector-Processing geometry-Extract nodes", the result see Fig. 4



        enter image description here



        4) Create point buffers from them, so that they intersect each other and extract centroids from adjacent buffers, the result is shown in Fig. 5
        (centroids are red dots)



        enter image description here



        5) From the centroid points, create the Delaunay Triangulation, for example with the QGIS tools: "Vector-Processing geometry-Delaunay triangulation", and trim the result with your 1 m negative buffer polygons, see the result of Fig. 6



        enter image description here



        6) Blast the lines into segments, for example, using QGIS Desktop with GRASS tools: "Data Analysis - Lines-Explode Lines", see Fig. 7



        enter image description here



        7) Run the following script in PGAdmin:



        create table buf_centre_ln as
        SELECT ST_Intersection (a.geom, b.geom) AS geom
        FROM explode_ln as a, buf_negative as b
        WHERE ST_Within (a.geom, b.geom);



        see the result in Fig. 8



        enter image description here



        9) Remove duplicating lines and do with the center lines, whatever,



        we arrived, your stop, it's time to say goodbye,
        respectfully







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 hours ago

























        answered Sep 9 '18 at 16:32









        CyrilCyril

        7571214




        7571214






























            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%2f290805%2fis-it-possible-to-convert-polygon-to-centerline-linestring%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 Содержание Параметры шины | Стандартизация |...