2

How could you find intersection between lines intersected with polygon?

I want to find the lines only that located inside the map and intersected with polygon then change the colour of intersected lines to red colour and extract the id of each line intersected in Excel table.

image description

Edit: I used polygons to lines tool but it does not show me line and polygon layer, it shows me only one layer called Muffe and Arrow as u can see in picture.

My file is dxf, I have imported by import/convert DXF then I got 3 layers text, line and polygon and Arrow as picture.

My question at first: Does it correct to import line and polygon at the same layer or not, because I though it will give me both of them seperately, one layer for line and one layer for polygon.

Then, when I used polygon to lines. So, I think, it considers polygon is line also so I do not need to convert it, am I right.

Then I used intersection tool and I choose line and polygon input and also for overlayer, for sure I got intersection will be the same input. And I am not sure what should I do.

Could someone guide me, how can I find intersection between lines inside the map and the polygon?

Something, I want to know, when I imort any file should I have seperately layers I mean, one layer for line, one for polygon and so on or both of them will be together.

enter image description here

  • 1
    Maybe consider using a web translation service in order to make your question easier understandable? – Erik Feb 3 at 15:04
  • sry for that ,i will check the grammer before iam uploading my post . – potter90 Feb 3 at 16:28
  • Without a picture of your entities it is difficult to guess what you are reffering to. Since you are working with a CAD file I guess you have the background of cad terminlogy and working procedures for entities and layers. GIS is quite different because layers have another meaning and entities types have a different meaning despite using the same name – Marco Feb 5 at 7:51
1

I tried to take your question becuase it is an interesting one to be solved with an SLQ statement.

Reading your tittle the case was either a linestring & polygon or a linestring & multipolygon type on the picture below (Source: Introduction to PostGIS):

enter image description here

But it seems you are mixing concepts. I GIS there is a limited number of geometry types compatred with the CAD paradigma. In GIS there are fewer vector types, the main ones are: points, lines and polygons (or nodes, edges and faces)

In GIS a point is an entity that had zero dimension (0D), it has only a location, a line has 1-D and it is made out of a set of points and a polygon is a 2D entity maede aout of a set of lines.

This picture will show the main three types of geometry entities (Source: A Gentle Introduction to GIS): enter image description here

There are more types, but main differences with the CAD paradigma are in the confusion between lines, polylines and polygons. A polyline in CAD is just a line type in GIS, and a closed polyline in CAD could be read as line or a polygon type depending on the success of the importing tool.

Then we have the difference of the layer paradigma. CAD applications might store any kind of entity types in a layer, while GIS applications store only one type per layer.

Back to your question, it does not matter what the layer is called, it can store only one kind of data, and that can be read for the icon. enter image description here

Line and polygon has only line type entities and Muffe and Arrow polygons.

My main suggestion now to you now is to read about GIS to get used to this new GIS paradigma about entity times and storage organization (layers). I highly recomend A Gentle Introduction to GIS Link to .pdf. Then, I suggest you to choose another file format than .dxf for your work in GIS, dxf does not fit very well with any gis analysis.

|improve this answer|||||
  • thanks really for explainng in details,i am not confusing any more after ur explaination but i have still one question . now i have line and polygon together in one layer . line and polygon ,and arrows it is already arrows shown on the map with labels not polygon .polygon with green colour and lines in red colour inside polygon and line layer .and i think ,may be GIS read both of them line . i do not know .if i want to split both of them to two layer ,so can i do that or because iam working with dxf and it does not fit – potter90 Feb 5 at 16:51
  • 1
    My suggestion is to chose anothe file format and reorganize the data based on your needs, you can do it in dxf, but I am not sure how it will work. If you go for .shp files, for instance, then you will have only one layer per file. Then, I suggest you to split the data in different files according to your needs. Three, four or eight? that is up to your needs – Marco Feb 6 at 9:41
1

Convert the polygons to lines under Vector drop-down menu, then select Geometry Tools, then use the Polygons to Lines to convert the polygons to lines. In the Processing toolbox under Vector Overlay use the Line Intersections tool to create points at the intersection of your lines and the polygon lines. Select all the lines that intersect your new intersection points. Create a new attribute in the table, and populate those selected lines with some value so you can symbolize them in a different color.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.