I have two layers. One with small Polygons and one with a line. I want to select all Polygons which intersect with the line. Additionally the selected Polygons should be sorted by the order of the line, as a line has always a start and a end. The first polygon that intersects at the start of the line should be on top of the attribute table. The second one on second place and so on.
122150
I have 119 parcels that intersect a polyline.  I want to be able to sort the table to see if any of the land owners in the parcels have have consecutive ownership along the line.    Is there a way to do this, or some other process to see the order?
90101
I have a polygon shape file that has many overlapping features. Each feature represents an area used by polar bears. So some of the polygons overlap and some don't, and there are separate clusters of overlapping areas.   I would like to get a measure of how much overlap there is in a particular area. But I have no clue how to do this. I'm pretty new to GIS and am still learning the ropes, it just seems I can't find an answer.
49373
I have a polygon layer (where each feature has a class attribute), and a point layer, and there are at least 10 points within each feature of the polygon. Is there a way to randomly select only &quot;k&quot; points of these 10 points for each feature (class) in QGIS?  Thanks!
37228
I have two layers :    The red layer with 2 features : 1 and 3. The green layer with 3 features : area 1, area 2 and area 3.   I need a layer which contain my green layer split by my red layer. In that example, I would have a polygon layer with 6 features in it. I would like the attribute table like :  area 1 | NULL area 1 | 1 area 2 | NULL area 2 | 3 area 3 | 1 area 3 | NULL   I didn't see such an algorithm in QGIS. What is the best way to do that ?
108254
what is the easiest way to determine the intersection of two lines? I tried  \usetikzlibrary{intersections} \begin{tikzpicture}[every node/.style={black,above right}] \draw[name path=line 1] (0,0) -- (2,2); \draw[name path=line 2] (2,0) -- (0,2); \fill[red,name intersections={of=line 1 and line 2}]     (intersection-1) circle (2pt) node {1}     (intersection-2) circle (2pt) node {2} \end{tikzpicture}
86100
I have a shapefile of a city map and I have created vector grid as polygons.   After intersecting the two shapefiles, a building will map to all the grids it overlaps.   However, if I just want it to map to the one grid which contains the majority of the building (>50%), how could I achieve it?   Is there a function or plugin in gqis for this task? Or do I have to write my own code to do this?  I am new to QGIS.
120784
In QGIS, I want to make polygons from a set of intersecting lines. Looking at the screenshot here, I want chop the purple line (it's a closed line, not a polygon) where it crosses the green and blue lines. The result hopefully would be a polygon where I have hatched in red. I have quite a few to do.    I have tried the QGIS tool previously called Polygonizer (see ), but now called Polygonize. This is a tool that, given a layer containing a set of crossing lines arranged essentially like a # symbol, should create a polygon from the enclosed space in the middle.  (In QGIS 2.01, Polygonize is in the top menu bar: go to Processing -> Commander, then type "Polygonize" on the command line, select "Processing algorithm: Polygonize" from the list that appears, and press Enter.)   At the momemt Polygonize doesn't work properly. Is there another way to do what I want to do?   For example, wouldn't it be great if the QGIS 'Split Feature' command was able to work like MapInfo's 'Polyline Split', where you select the polygons to split, then select an already-drawn polyline to split by, and voila. But Split Feature seems not to work that way.    UPDATE: Detail of problems with running Polygonize.  I have 64-bit QGIS 2.01 installed to Windows 7 from the installer package, QGIS-OSGeo4W-2.0.1-3-Setup-x86_64.exe.  The routine processed an output from my shapefile, but did not create a polygon from the region enclosed by intersections between the blue, green and purple lines. (Note: in the actual input file, all these lines are on the same layer; the screenshot just colours them differently for illustrative purposes). What I got instead was a simple conversion of the purple outline to a polygon, as though the program completely ignored the blue and green lines.  When I node-edited the closed purple line, to open it so that I had a set of open crossing lines like in the # symbol, and then ran Polygonize again, nothing happened. No crash, but no visible polygon in the output file.    When I used Nick Hopton's own  data, I got a crash; see screenshot:
29091
I want to create a query to select all ways and their nodes that exist within a bounding box using postGIS. The bounding box shall includes all details as osmosis "--bounding-box" command will retrieves.   Is there any way to do that?
19730
Here's the problem:   Where:  1: department boundary  3: polygons inside department boundary that "touch" the department boundary(1). They are not necessary fitting well inside  2: holes between 1 and 3  I need to "adjust" polygon shapes (3) to "match" department boundary (1) filling the holes (2)    Using PostGIS:  My 1st approach was to get the st_pointonsurface of all numbers 2 and number 3 by departments. Then assign the holes (2) to the nearest polygon by pointonsurfaces between each other.  See image (from another department boundary but same problem, exceeding dotted lines with no fillcolor are polygons zones that exceeded department boundary that I've already cut off by department boundary so no problem there)    This worked but got me another problem::   some (lots of) holes (2) that where attached to the nearest polygon (by st_pointonsurface) were really long lines     Here (2) are the holes that were attached to the nearest polygon, and the result is 'strange' new polygons with really long lines.    I can use any of ArcGIS 10, Quantum GIS and PostGIS to solve this, but I can't get a way to solve this.    EDIT  How about using topology? what rules may be useful for this problem?    How topology will resolve when multiple polygons are fighting to get the same hole?    EDIT 2  Using geometry approach with PostGIS.  one idea: - make buffers of the multiple polygons that are inside the department boundary - get the st_intersection between buffered polygon vs original polygon + hole. This way the new "buffered" polygon only keep the buffer where the "hole"-intersected-area is touched.   This may work with simple examples .. but with real world holes and polygons.. This will leave us another problem: the overlaps between different buffered polygons inside hole areas..
72589
I have a problem with ArcGis 10.1 which I rarely use.  In an edit session I select a polygon. I would like to 'Create Layer for Selected Features' and can do this; the new layer appears in the table of contents. When I try and move the new layer, the old layer moves with it.   When I click on the polygon the option of selecting the two coincident polygons appears but I can't get these to separate. It seems to be impossible to do anything to one feature and not the other.  The strange thing is that yesterday the program wasn't behaving like this.  Can anyone can explain what is going on?
99536
I have a map made up of multiple polygons, with a few hundred thousand points very small polygons on within it.  I need the larger polygons, but not the points small polygons.  How do I select and remove all the points small polygons, while preserving the larger polygons?  (I obviously do not want to do this manually - there are a few too many points for that!)  I'm totally new to QGIS, and I've Googled extensivey with no luck.  Probably because I'm unsure what the correct terminology to use in a Google search is!  The files I am using are a .dbf, .prj, .qpj, .shp and .shx.  I'm simply dragging the .shp file on to QGIS, and the map appears as one layer.  Basically a map of the UK divided into regions (which I want) and covered in points (which do not want).     This is what it looks like up close.  I did a dissolve to see if they'd go in to the surrounding layer, with no luck:
117354
I have two vector files in the layers panel in QGIS (V2.8.2, Wien).  I am trying to select points from both vector files simultaneously to view in both attribute tables - both tables are set to show selected features only.  The only way I can do this is to select one layer in the Layers Panel, then select features by rectangle, then select the second layer in the Layers Panel and reselect again using the rectangle.   Is there a way to select features from both layers and only using select by rectangle once?
106107
I'm exploring a few different options for this process and I'm unsure what would be most effective. I'm trying to find all isolated, non-intercepting polygons in the same layer (not to merge). Most share boundaries, and a few overlap. Area varies so it unfortunately cannot be the deciding factor for selection (e.g. selecting by max area). I'm using ArcMap 9.3.1.   I created a 10 meter buffer around the polygons, erased the center of my buffer features, then select all polygons that intersect the buffer, thinking I'll just do a switch selection. The problem is that all polygons get selected, I guess because the selection is too tolerant. I don't want merely tangent/touching boundaries, I need them to overlap within the buffer (in effect, avoiding selection of those polygons each buffered feature is created from). The "are within" of course selected nothing. I wonder if dissolve can be used.  edit: as per request, here's a pic representing what I mean by isolated - no other polygons border it from any side.
81987
I want to check if points layer that I have intersect with polygons layer that I have, as Boolean column in the points dataframe. I have two GeoPandas dataframes, the first one is many points and looks like this: &gt;&gt;&gt;ID  geometry 0  12  POINT (5.0279 7.4547) 1  45  POINT (6.6539 12.139) ...  and the second dataframe is one layer of many different polygons  that looks something like this: &gt;&gt;&gt;name     code   geometry 0  Desert   12     POLYGON ((5.52013 13.8902, 5.5265 13.892,...) 1  Water    24     POLYGON ((5.53756 13.88472, 5.5291 13.8791,...) ...  I'm trying to check if there is any intersection between the points layer and the regions layer. For that I have determined the crs and then used intersects : regions=regions.to_crs({'init': 'epsg:4326'}) points=points.set_crs({'init': 'epsg:4326'}) inter=points.geometry.intersects(regions.geometry)  A The script runs with the following warnings:  FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 return _prepare_from_string(&quot; &quot;.join(pjargs)) /opt/conda/lib/python3.8/site-packages/geopandas/base.py:39: UserWarning: The indices of the two GeoSeries are different. warn(&quot;The indices of the two GeoSeries are different.&quot;)  Then when I check the results the only value is False, like all th epoints do not intersect: inter.unique().tolist() &gt;&gt;&gt;[False]  *I saw on QGIS that the there are points that intersect and there are points that do not so there is no way this result is true *I have checked the dtypes - each one of my geodataframes has one column that is geometry and called geometry. My end goal: to add new column in the points geodataframe that will tell if it intersects the regions or not.
63470
Two days ago I asked a question about the internal storing order for the vertices of a polygon in ESRI shapefiles. That question was answered () and it was also answered in an old post () But now my question is more general, and I don't know if it has an unique answer. Is the clockwise order only for ESRI shapefiles or for general GIS formats? And what about the internal representation for a GIS software? For example, if I use QGIS and I read a *.shp containing polygons I suppose the internal representation of the outer bound is clockwise as in the original shapefile, but what about for all the file formats supported by QGIS? And for ArcGIS? And in the case there exists a file format with polygons stored in counterclockwise, if these files are loaded in QGIS, ArcGIS, etc., is the orientation changed internally, so if I read the data using PyQGIS, for example, the polygons are clockwise ordered? My purpose is to write a plugin for QGIS, but the source of data can be ESRI shapefiles or other formats. As I need to check the angles between consecutive sides of polygons using their azimuths I need to known if the order is clockwise. One solution is computing the area of each polygon and, if I remember correctly, if it is positive the order is clockwise and if negative the order is counterclockwise. Area computation is not an intensive task, so it will not slow my plugin so much. But in the special case of QGIS, anybody knows if it stores the polygons clockwise or counterclockwise, regardless the order in the original source? By now I'm working with ESRI shapefiles and the coordinates in layer.getFeatures().geometry().asPolygon() are stored in clockwise for the outer border and counterclockwise for the holes, i. e. as in the original *.shp.
105745
I have a polygon layer on top of a DEM.  Is there a way to clip the polygon layer according to elevation, ie the clipped result being only those areas of the polygon layer between x and y altitude?  The result needs to be a vector layer.
23445
I am looking to get a count on the polygonNieghbor and if it has polygons in it then I want to move to the next step MakeFeatureLayer. and If it doesn't have any features I would like it to finish.   Is there any other way to do this?      arcpy.GetCount_management(PolygonNeighbor_TableSelect) arcpy.AddMessage(arcpy.GetMessages())  if arcpy.GetCount_management(PolygonNeighbor_TableSelect) &gt; 0:     arcpy.MakeFeatureLayer_management(MapUnitPolys, inFeatures_lyr)  else      print "done"