Hot answers tagged

15

This answer reflects the 2012 situation. Check my newer answer below for a QGIS-only solution. I've described how to calculate service areas aka catchment zones in Catchment Areas with pgRouting driving_distance() and related posts. All of them use QGIS and pgRouting - a routing extension for PostGIS databases.


13

The answer will depend on the requirements of your specific workflow and application but I can offer you advise on how a drainage network is generally extracted from a digital elevation model (DEM). The key to extracting a drainage network from a DEM is creating a flow accumulation raster, i.e. a raster for which each grid cell contains a value that is ...


11

Although the thread is a bit old, I wanted to add a few links about routing in case someone ends here like I did: OSRM <- Recommended Routino


11

You can analyze polylines in amazing ways by using buffers. This is usually inefficient--buffers create many additional vertices--but (a) it is a technique available in many GISes (vector or raster based) and (b) it sometimes can produce information that is otherwise hard to get. In this case, buffering the road by a small amount and then buffering by the ...


11

A general way of solving this problem is to find all polylines having a node whose valence = 1. A valence table may be created either in memory or on disk, using a key that is the hash of the x&y of each end point of each polyline. You may wish to truncate x and y may be truncated if polylines are not snapped. Each node is labeled by its degree (or ...


10

I had to do this just recently. Using ArcGIS 10: If you only want to symbolise the dead ends you can just set up a Topology on the roads featureclass and set the rule "Must not have dangles". this will put a marker on every feature that has a dead end. Alternatively, run the "Feature Vertices to Points" Tool (Located in Data Management Tools --> Features) ...


10

Have you thought about using an IaaS such as Amazon Web Services to host your GIS stack? There are a bunch of Amazon Machine Images (AMI) that already fulfill your requirements. You could spin up an Amazon EC2 instance to run your GIS jobs and manage it remotely from your laptop. Here is a course that could get you spun up fairly quick (look at lessons 1-3):...


8

If you are just looking to connect orgin/destination points and not needing the curved "great circle" lines, take a look at the QGIS plugin called "mmqgis". It has a Hub Lines tool that I think will create the visual that you are looking for. "The hub lines tool creates hub and spoke diagrams with lines drawn from points on the "Spoke Point" layer to ...


8

You can start with this GRASS tutorial on network analysis. The aim of the exercise is to set up a GIS network to support the fire brigade interventions in the area of North Carolina. Here follows the steps of this process and the tools used: set up of network analysis: geometry and the appropriate database tables will be connected (v.net); ...


8

I tested your hypothesis with a python script. The attached script creates 500,000 points and buffers them to 5 units. I ran two trials for three runs--one without locking and one with. It appears that locking the desktop does indeed increase the processing time. # Import system modules import arcpy, os, time, ctypes from arcpy import env env....


8

Removed the previous links, which I should have checked more scrutinously, and found some information and shapefiles which hopefully would be of some use: The EEZ Boundaries (Exclusive Economic Zone) which for this purpose is mainly used to show the coastal lines and outlines of continents. http://www.marineregions.org/downloads.php#eez The main Global ...


8

the grass algorithm v.net.alloc can produce the subnets - you can call it from the Processing toolbox (tested in QGIS 2.16) You'll need a point layer (for facilities) and a lines layer with costs (either time/length). It'll create a new line layer with a field called cat added, which will be the id of the nearest facility. Here's an example based on ...


7

The closest I've come so far is this: v.clean input=roads output=snap5rmline tool=snap,rmline thresh=5 It's snapping the roads with a tolerance of 5 meters and removing all zero-length lines. It's not an optimal solution since it seems to snap rather randomly to some vertex.


7

Firstly, I am not clear on what kind of output you expect. Do the red and blue vertices consist of pairs? (i.e. do you want the shortest path from one of the red vertex to a specific blue Vertex?) You should have a look at creating shortest routes This requires all the stops that you route must past through. So assuming that your requirement is the shortest ...


7

You can use GraphHopper for that task, which also supports different mode like walking or biking and uses OpenStreetMap per default. You'll need some Java coding which explores the road network from the starting point similar to how the Dijkstra algorithms works but then you can get something like the following even in real time (<0.5s): The code will ...


7

In December 2012, Esri has published a tool for generating flow maps. It is written in Python and available for ArcGIS Desktop users. And there is a ArcGIS Blogs post on generating flow maps with the links to the tool, some more information, and test data for the tool. I believe this is the kind of tool you would use to generate trade flows, too.


7

My understanding of the problem is as follows: If a polyline endpoint intersects a polygon then the polyline needs to be connected (by adding or adjusting vertices) to all additional polyline endpoints that intersect the same polygon. Some polyline endpoints don't intersect a polygon, being undershoots, but these should be connected as above. This answer ...


7

Just recently, a new QGIS plugin, called OSM Tools, has been published. This plugin utilizes OpenRouteService API to compute routes and isochrones for various travel modes such as car, heavy vehicle, cycling and walking.


7

You can easily use PostGIS to select roads that don't intersect any other road: SELECT id, geom FROM roads a WHERE NOT EXISTS (SELECT 1 FROM roads b WHERE a.id != b.id AND ST_Intersects(a.geom, b.geom))


7

According to the Wikipedia page Longest path problem, this problem ... is NP-hard, meaning that it cannot be solved in polynomial time for arbitrary graphs unless P = NP. Stronger hardness results are also known showing that it is difficult to approximate. However, it has a linear time solution for directed acyclic graphs, which has important ...


6

You could have a look at the Route360°-API, a pretty simple but powerful JS library which you can use with Leaflet (or even Google maps if you like). It adds travel time polygons to your map for the travel times you require (e.g. 10, 20, 60 minutes) and for the following travel modes: walk, bike, car, transit. There are quite a few examples on how to use ...


6

osrm-isochrone is a small node.js library for generating drivetimes.


6

I'm not sure exactly what your canal shapefile looks like, but here's how I would do that without using Network Analyst: In the likely case that your Canals.shp polylines are split into separate but connected segments, use Dissolve to unsplit them. Then run Select by Location, finding features in Canals.shp that INTERSECT or BOUNDARY_TOUCHES with ...


6

In ArcGIS Standard or Advanced, you can put your road network into a Feature Dataset in a Geodatabase. You can then set up a topology on the network and create a topology rule which identifies "dangles". This will identify all roads which do not connect to something at one or both ends. Note, this will also identify potential errors in your network which ...


6

GRASS method: v.clean in={your input vector} tool=rmdangle thresh={your threshold} out={output vector}


6

You need to open an InsertCursor on the other feature class: import arcpy pipes = r"J:\PYTHON\Flow_Direction.gdb\Pipes" nodes = r"J:\PYTHON\Flow_Direction.gdb\Nodes" #Getting the mid point with arcpy.da.SearchCursor(pipes, "SHAPE@") as in_cursor, \ arcpy.da.InsertCursor(nodes, "SHAPE@") as out_cursor: for row in in_cursor: midpoint = row[...


6

You work here with a Graph (Graph Theory) and your confluence point is simply a node with a degree (number of edges adjacent to that node) > 2. As you mentioned a Python tag, a solution in Python with Fiona (for reading the shapefile) and NetworkX (Graph Theory) The Polylines Open the shapefile and convert all the segments of the Polylines in egdes of a ...


6

I think you may be looking for the Graph Diameter of your network. There are a couple of questions on stackexchange that mention this topic, e.g.: The time complexity of finding the diameter of a graph Good algorithm for finding the diameter of a (sparse) graph? What is meant by diameter of a network? Difference between diameter of a graph vs longest path ...


5

Have you tried the GRASS v.generalize ? v.generalize allows you to choose the generalization algorithm with the method attribute. There is a bunch : douglas,douglas_reduction,lang,reduction,reumann,boyle,sliding_averaging,distance_weighting,chaiken,hermite,snakes,network,displacement. And additional parameters as threshold, degree_thresh, angle_thresh (...


5

You might want to check out the open Route360° JavaScript API, which works with both Leaflet and Google maps. It returns travel time polygons for the following travel modes: walk, bike, car, transit. It is free and open source and coverage is pretty good. You can find a lot of different tutorials on how to use it on the website.


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