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

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


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

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


9

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


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

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.


8

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


8

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


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

You could have a look at the Targomo API (formerly Route360˚), 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 ...


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

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


6

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


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 might need to use the linear referencing functions to get what you want. For each point, use ST_LineLocatePoint to find out what proportion along the line the point is, then for each pairing of points, use ST_LocateBetween to extract the portion of the line between the points. So rather than splitting, you're using linear referencing to extract. http://...


6

The plugin QNEAT3 offers a great tool for this creating isochrones or service areas offline based on your own network. You can run Iso-Areas as polygons or another algorithm: To get isochrones, choose "Fastest path" instead of "shortest":


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

WORKFLOW: arcpy.SpatialJoin_analysis("points","points", "D:/Scratch/many.shp","JOIN_ONE_TO_MANY","INTERSECT", search_radius="1000000 Meters") arcpy.SelectLayerByAttribute_management("many", "NEW_SELECTION", """"TARGET_FID" = "JOIN_FID"""") arcpy.DeleteFeatures_management(in_features="many") arcpy.AddField_management("many", "FromTo", "TEXT") calculate ...


6

I think I found an answer myself. The problem seems to be the topology of my network file. If I apply v.clean (snap) followed by v.clean (break or bpol), the nodes can be connected via v.net.steiner or v.net.allpairs as intended. Before, I didn't apply v.clean (break or bpol) after v.clean (snap). The only disadvantage of this solution is the long ...


5

QGIS-only answer QGIS 3 provides out-of-the-box network analysis tools in its Processing toolbox. There are two service area tools: one to compute service areas around a single point and one to compute service areas for a whole layer of points: Old answer If you are comfortable with some Python scripting, have a look at the QGIS Network analysis library. ...


5

NetworkX ( A python module for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks ) has a read_shp() function which generates a graphs from shapefiles. You might want to check it out. Here's a short tutorial. No TPSLIB export as far as I know but does support writing the graphs into formats like GML, GraphML, ...


5

A Solution can be found via: "Using GIS for Decision Support in Emergency Medical Services" Example Programs required: QGIS (with GRASS) OpenOffice R "To conduct an analysis of ambulance service areas, Geographic Resources Analysis Support System (GRASS) was used within Quantum GIS (QGIS). GRASS is included with the QGIS download. One of the benefits of ...


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.


5

If all you need is the shortest path analysis, and if you don't have much experience with GIS, then you can simply use the RoadGraph Plugin. With it, you can use distance or time to calculate the shortest path. You can find some instructions in the QGIS User manual. Make sure your project is in the same Coordinate System that your road data, and that the ...


5

If using ArcPy for this is not a mandatory requirement, and if you have an Advanced (formerly called ArcInfo) level license, then there is an out-of-the-box tool called Feature Vertices To Points (Data Management) that has a MID option: MID —A point will be created at the midpoint, not necessarily a vertex, of each input line or polygon boundary.


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