# Tag Info

## Hot answers tagged line

17

I discovered a page named Constructing polygons from the shapes of other features on Esri's site that should allow you to contruct polygons from your lines with only an ArcEditor/Standard license. You can select the lines you want to convert to polygons, then use the Construct Polygons button on the Topology toolbar (ArcGIS 10.0 or earlier) or the Advanced ...

14

The simplest way is to use the points to create the line. To do this in QGIS use the Points2One plugin. Install this plugin (available via Plugins->Manage and install plugins) and follow the dialog to create a line from your points. If you have multiple lines, then make sure your points data has a suitable ID field to identify the lines they belong ...

13

Following on from the comments, here's a version that works with perpendicular line segments. Please use with caution as I haven't tested it thoroughly! This method is much more clunky than @whuber's answer - partly because I'm not a very good programmer, and partly because the vector processing is a bit of a faff. I hope it'll at least get you started if ...

12

Here I have used the Symbol Levels properties to draw the cartographic lines with casing at the bottom and fill at the top. The draw order is base 0, where 0 is the last item to be drawn. See screenshot: You'll also want to check that line caps and joins are set to "round" in the Cartographic Line symbol properties. Do this for both layers, the casing and ...

12

Try Intersect tool in the analyses toolbox if you are on ArcGIS. Set output to point.

11

The highest elevation within 10 km is the neighborhood maximum value computed with a circular 10 km radius, so just extract a profile of this neighborhood maximum grid along the trajectory. Example Here is a hillshaded DEM with a trajectory (black line running from bottom to top): This image is approximately 17 by 10 kilometers. I chose a radius of ...

11

You must first understand how PyQGIS handles geometry (Geometry Handling) The most important element is the point: QgsPoint(x,y) and a line or a segment of line are composed of two points: QgsGeometry.fromPolyline([QgsPoint(x1,y1),QgsPoint(x2,y2)])); So to construct a line: line_start = QgsPoint(50,50) line_end = QgsPoint(100,150) line = ...

10

Try dissolving based off of OBJECTID or FID. Then use Feature To Polygon (Data Management) to convert your polylines to polygons if you wish. To illustrate, here are some sample lines: Attribute table before dissolve by OBJECTID Attribute table after dissolve by OBJECTID

10

There is a QGIS plugin called Digitizing Tools: The documentation says: Split selected features with selected line(s) from another layer applies to: line and polygon layer (multi or single part) Splits all selected features of the active layer with the selected line features of another layer. The splitting creates new features (not multi features). Each ...

10

Yes, but sort of. ArcGis no longer has line-node topology that enables the user to tell how many arcs (lines) are connected at their ends (nodes). To check is one thing, but how about to fix instead? If you open the feature class in ArcMap and then use planarize lines (give a tolerance) and the lines will be snapped and split at intersection - saves a lot ...

9

If you are looking for a solution that does not require developing a .NET tool, you can use the python script below to accomplish exactly what you are after. I had exactly the same need and wrote the following script as the solution. Configure it as an ArcCatalog tool with the 4 parameters, or comment out the parameters and uncomment the hardcoded ...

9

This can be done quite easy in SQL All the below examples can be tested directly on http://postgisonline.org/map.php. Just paste the query and press Map1 SELECT GENERATE_SERIES(FLOOR(ST_YMin(the_polygon))::int , CEILING(ST_YMax(the_polygon))::int,200) y_value, ST_XMin(the_polygon) x_min, ST_XMax(the_polygon) x_max from (SELECT the_geom AS ...

9

You need to use Symbol Levels: The higher the number the later is it drawn. So black will be rendered first then the purple over top meaning that any black bits will be rendered over.

8

The solution to the first part of your question is "Splitting a line into an equal number of parts": The Split command on the Editor toolbar allows you to split a line into an equal number of new features. For example, you can use this Split option to break a line into pieces that are the same length. This functionality is similar to the Divide ...

8

You can pass an array of layers to the select control selectControl = new OpenLayers.Control.SelectFeature( [lineLayer, pointLayer], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" // shift key adds to selection } ); ...

8

With PyQGIS in the Python console, see How to add Direction and Distance to attribute table? for the azimuths of the segments of a line (with the azimuth functions of Points: point1.azimuth(point2)) but you can use many other Python modules like Shapely and Fiona without using QGIS see Python: traitement des couches vectorielles dans une perspective ...

7

You can use st_intersection Examples 1: test=# select st_astext(st_intersection('LINESTRING ( 0 0, 0 2 )'::geometry, 'LINESTRING ( 0 0, 2 0 )'::geometry)); st_astext ------------ POINT(0 0) (1 fila) Example 2: test=# select st_astext(st_intersection('LINESTRING ( 1 0, 0 2 )'::geometry, 'LINESTRING ( 0 0, 2 0 )'::geometry)); st_astext ----------...

7

Since you are already symbolizing by road condition (which I'm guessing may be represented by a few colors), I would suggest to not use a multi color dash line to represent survey origin (sometimes less is more). I generally use a buffer/fade effect for displaying multi attribute line info, see caption below.

7

Posted a code snippet(tested in python console) that doest the below Use QgsSpatialIndex to find the nearest line feature to a point Find the nearest point on this line to the point. I used shapely package as a shortcut for this. I found the QGis methods for this as insufficient(or most probably i do not understand them properly) Added rubberbands to the ...

7

It can be done in a few ways, using self-joins or correlated subqueries but using window functions is probably the easiest way. The function lead() returns a value that's ahead in the given partition and our partition is (PARTITION BY <vehicle_id> ORDER BY <timestamp>) This query gives us the vehicle number, the position of that point in ...

7

You can use effectively Shapely, and Fiona to read a shapefile for example: import fiona # open a line shapefile file = fiona.open('lines.shp') # first element of the shapefile first = file.next print first {'geometry': {'type': 'LineString', 'coordinates': [(203317.23, 90448.75), (203679.62, 90105.68), (203882.57, 89902.74), (204143.49, 89641.81), (204394....

7

You could use line-to-polygon tool (See How can I transform a polygon to a linestring in QGIS?) followed by v.clean command (See http://grass.osgeo.org/grass64/manuals/v.clean.html).

7

The simple way to do this, without writing any Python, would be to translate the start and end to a WKT version of the line: Open the csv in Excel or Open Office, or whatever you use Create a new column with the formula: ="LINESTRING(" & A1 & " " & B1 & "," & C1 & " " & D1 & ")" Replacing A1, etc, with your start and end ...

7

Add another layer into your style as "marker line" and draw markers only at line ends. See the screen capture below.

7

What you seek can be done easily using the digitizing tools plugin. The plugin adds a new toolbar with a couple of new tools. The tool you need for this task is the amend line. It get active when you turn edition mode in a line layer. And you use it by clicking the begin or end vertex of a line and then keep clicking for new vertex. To finish, you ...

6

Maybe the answers to this question are helpful: How to simplify a routable network? I used GRASS v.clean in the end.

6

you can try This algorithme: get vertices from the polygons(poly_vertex). -make voronoi using (poly_vertex) as input the result could be called(poly_voronoi). -get lines from (poly_voronoi) => (poly_voronoi_lines). -get the originale polygon contour (polygon_lines). -remove (poly_voronoi_lines) touching (polygon_lines) the result is supposed to be the ...

6

You can adjust the phase of your dash pattern by inserting a row in the Dash space pattern editor with a Dash of 0 length and a Space of half the length you want between your dashes. In the second row, you set the full Dash length, and half the desired Space length again. For example, if you set the Marker line to use an interval of 10, you could set your ...

6

I had the same problem and tried James S' solution, but couldn't get the GDAL to work with Fiona. Then I discovered the SAGA algorithm "Cross Profiles" in QGIS 2.4, and got exactly the result I wanted and that I presume you are looking for too (see below).

6

I am the developer of this plugin. Yet it is still experimental; but fully working. The plugin pack you have downloaded already includes a PDF TUTORIAL file. Please read it. Flow mapper plug-in is tested to be working under Windows. Thus, I cannot guarantee it to work under mac-os. It would probably have path problems. You can only select txt files for ...

Only top voted, non community-wiki answers of a minimum length are eligible