Tag Info

Hot answers tagged

11

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 ...


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

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 ...


8

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 ...


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

I discovered this page on Esri's site that should allow you to contruct polygons from your lines with only an ArcEditor license. It's unclear from that page whether or not you have to set up a topology first (and whether that topology, if required, can be just a map topology created through the topology toolbar, or a geodatabase-level topology). It looks ...


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

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 } ); ...


7

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

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 ...


6

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


6

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 = ...


6

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.


6

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).


6

Here's a Python function that creates a memory layer containing a line at the specified latitude. You call it using createLatitudeLayer(latitude=-23), for example. You can specify which CRS the layer should use by specifying targetCrsEPSG=<EPSG code>. You can also specify how many points to use for creating the line, by setting numpoints=<number ...


5

Depending on how far you got in the process, you may want to skip to step six. I have however provided full steps for creating a layer below. The basic process you would want to follow for creating a layer in QGIS is: From the Layer Menu, choose New Shapefile Layer... Specify the type. In your case, for a road you likely will want to specify the type as ...


5

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


5

The Points2One Plugin might be helpful here. Your data will have to be in the following format: id, order, x, y stream1, 1, x_start, y_start stream1, 2, x_end, y_end stream2, 1, x_start, y_start stream2, 2, x_end, y_end After loading a file like this, you should get four points displayed. In Points2One Plugin, you can chose ...


5

One option is to create a fishnet grid specific to your area of interest. By specifying one row and X columns, you can very efficiently create a series of lines. I describe this method in greater detail here and here for two similar situations. For fine control of individual line placement, use the editor. From the image, you can see I created 16 lines ...


5

Simply create a text file with this content: id;wkt 1;LINESTRING(-180 -23, 180 -23) and use Layer -> Add delimited Text Menu entry with semicolon as delimiter and EPSG:4326 as CRS. For meridians, it is better to end the line at 89° when using EPSG:3857: id;wkt 1;LINESTRING(7 -89, 7 89)


4

It sounds like the "Calculate Fetch in Polygons" command in SpatialEcology's Geospatial Modelling Environment (GME) should produce what you are looking for. This tool estimates the longest straight line that can be positioned within a polygon, without crossing any edges. It corresponds to the 'fetch' of a lake: the longest stretch of water over which ...


4

ET Geowizards will easily convert Polylines to Polygons (preserving attribution) http://www.ian-ko.com/ET_GeoWizards/gw_NoRestrictions.htm Current Version is ET GeoWizards 10.1 (released 12 November 2011) Credit goes to Ianko Tchoukanski for producing and maintaining this excellent ArcGIS tool.


4

there is a good tool with the name of ET GeoWizards 10.2 for Esri products, but i dont know whether it is a good solution or not... you can get some info from here beside this in grass you can check out r.thin function for basic use.. r.thin - Thins non-zero cells that denote linear features in a raster map layer. i hope it helps you...


4

I eventually fixed it by using PostGIS (since this was the eventual target of my fixed polygon layer anyway). Here is the SQL I used: ST_MakePolygon(ST_LineMerge(ST_Collect(ST_SnapToGrid(geom, 0.001)))) It basically rounds the vertex coordinates to remove any gaps in the coastline, then zips all the lines into a single line which is used as the boundary ...


4

The solution to the first part of your question is "Splitting a line into an equal number of parts" http://resources.arcgis.com/en/help/main/10.1/index.html#//01m600000057000000 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 ...


4

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 ...


4

A simple solution is to create another integer attribute and give a number the rows as follows 1,1,2,2,3,3,4,4,5,5,6,6 (assuming your start and end point are alternate). You can create a function in the field calculator to work this out from the row number. Then create your lines as before but use this new attribute as the line ID.


4

Unfortunately you are not the first person to have this problem! A solution is suggested here 3 years ago and indicates the issue has existed since 2002 (and probably earlier). The solution is to use cartographic representations which requires an advanced editor license... As a possible alternative "fudge" (which I have not tried so not sure of any ...


4

Something like this should work for you at 10.0. The above link is for 10.1 arcpy.da cursors which are a little different. rows = arcpy.SearchCursor(lyr) for row in rows: geom = row.SHAPE for part in geom.getPart(): for i, pnt in enumerate(part): if i == part.count - 2: print pnt.X, pnt.Y The Working with ...


4

Try using the "intersect" match option. Also, when you do that, you will need to go into the field-mapping section and set the proper aggregation methods for the relevant fields (do you want the values of the multiple polygons a line crosses to be averaged (mean), added, etc...). Let us know if that doesn't work.



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