14

Try using the QGIS plugin Flowmapper. The attached image is a sample from the plugin documentation.


9

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


5

For this to work, you will need a working PostGIS installation. Shapefiles can be loaded into PostGIS using the QGIS PostGIS Manager tool. SQL queries can be executed in multiple tools from within QGIS (if it has connection to a PostGIS database), eg. RT SQL Layer plugin. If you have only one destination point but multiple source points (table "source", ...


5

Here is an illustration of the workflow I mentioned in the comment above, and although I don't know of any simple pre-canned routine to do this, I have attached an excel spreadsheet that one can import a set of origin-destination coordinates and the sheet then makes a set or circular line coordinates (spreadsheet here). It has formulas set up so it is pretty ...


4

Two lapply calls - is it faster? Dunno. > V = lapply(1:nrow(odf), function(i){return(list(L=Line(matrix(unlist(odf[i,]),ncol=2,byrow=TRUE)),i=i))}) > VV = SpatialLines(lapply(V, function(E){Lines(list(E$L),as.character(E$i))})) > plot(VV)


4

You can depict flow maps via node-2-node flow mapping extension which is available from QGIS plugin repo; http://plugins.qgis.org/plugins/FlowMapper/ there is also sample data and documentation within the zip file. input node coordinates and interaction matrix should be in plane text format, white space delimited.


4

if it's a raster-package raster you can do r2 <- setExtent(r, extent(xmin(r) + 1, xmax(r) + 1, ymin(r), ymax(r))) But, beware that's a "use at your own risk" move because we assume 1 is one metre (it might be in degrees, or km - look at the crs), and that "East" is to the right in the "positive x" direction (this is wildly not true in many projections)....


3

library(uuid) library(sp) sp::SpatialLines(apply(odf, 1, function(r) { sp::Lines(list(sp::Line(cbind(r[c(1,3)], r[c(2,4)]))), uuid::UUIDgenerate()) })) For funsies (I expected the following result): library(sp) library(uuid) library(microbenchmark) library(ggplot2) odf <- data.frame(fx = 1:100, fy = 1:100, tx = 0:...


3

Here is a rambling set of resources/publications I have collected on the topic. Ratti, Carlo, Stanislav Sobolevsky, Francesco Calabrese, Clio Andris, Jonathan Reades, Mauro Martino, Rob Claxton & Steven H. Strogatz. (2010) Redrawing the map of Great Britain from a Network of Human Interactions. PLoS ONE 5(12). Article is open access from link. Flow ...


3

You can use GeographicLib, which has bindings to several programming languages. For example, the JavaScript version has an example to compute waypoints between two points. Essentially, you create an inverse geodesic line between the two locations, then generate as many points (either total number or interval distance) between the two points along the ...


3

You could try to follow James Cheshire's instructions from the post Mapping the World’s Biggest Airlines to achieve that in R and ggplot2: Some more general mapping tips in R are also described in Great Maps with ggplot2 post


3

I ended up trying this out to curve a set of "two point" linestrings using the ST_CurveToLine function as suggested by @Nicklas Avén. I passed the following 3 coordinate sets to the ST_OffsetCurve function : Start of the original line Midpoint of a line offset parallel to the original line End of the original line I used the ST_OffsetCurve function to ...


2

With Network Analyst, using the Location Allocation tool. Input your origins as facilities, and destinations as demand points. This should give you a result of associated points, which then can be used to create polygons using either Feature to Polygon or Construct Polygon, Help Site


2

This is a known "limitation" of all the solvers as far as I know. I approach this problem through my work by doing the following. I add a unique field to each feature class that participates in the analysis, so you would need to uniquely identify each home address and each destination (rental care place). And use this field when loading locations for the ...


2

You can connect to a postgresql database and use pgrouting with Qgis Here are the features offered : All Pairs Shortest Path, Johnson’s Algorithm All Pairs Shortest Path,Floyd-Warshall Algorithm Shortest Path A* Bi-directional Dijkstra Shortest Path Bi-directional A* Shortest Path Shortest Path Dijkstra Driving Distance K-Shortest Path, Multiple ...


2

The data in the demos is probably specifically processed, but it is not difficult find these open datasets from 'the Internet'. For example, they are in Google BigQuery open datasets, and e.g. https://github.com/toddwschneider/nyc-taxi-data has many useful links.


2

Check your units in the Andrew Hedges Haversine tool - it gives me 25.008 km ! (or 15.543 miles) (also by just looking at your coords, you can see it should be 10s of km and not metres - a degree is usually somewhere in the 50-100km range - this is a very rough approximation but gives you a clue)


1

pg_routing would be a good solution. I've done several OD-matrices without any problem. To give you an idea one matrix of 16 million by 16 million took between 1,5 and two hours on a standard pc without any tuning. Take a look at this example: Creating many origin-destination routes with pgRouting another solution might be the GRASS v.net tools (haven't ...


1

This will either be a problem specific to RecordSets (tables), or the code style you're using. You can try using the Copy Rows tool to save your table.: arcpy.CopyRows_management(result[1], outFC) But I suspect you should try the next option - The more common approach when working with a result object is to use getOutput(#) off the result. The example ...


1

You cannot save arrows in a shapefile. Drawing arrows depends on the software you want to import the exported shapefile. For example in ArcGIS you can simply define a symbology for the line feature to have an arrow along the direction that the linear feature is sketched.


1

I guess you'd like a rectangular matrix. This is one of non-scripting options. arcpy.MakeXYEventLayer_management("points_PointDistance", "INPUT_FID", "NEAR_FID", ..., in_z_field="DISTANCE") Export events table into shapefile, delete associated prj file and add it to new mxd. Add geometry attributes and convert points to raster using Point_Z and cell size ...


1

If your table in Excel format, you will create 4 excel files for each (lat, long) but with each file keep the response ID. So the result it 4 tables with (resID, lat1,lon1,.....,resID,l4,lon4). For each table (excel) convert it using (Excel to table) and then right click for each table to export data so the result is point1.shp, point2.shp, point3.shp, ...


1

The O/D cost matrix creation result is only a table or straight line. Table values in that matrix based on true forms of routes. If you want to get only geometry, you should use ModelBuilder with “new route” tool.


1

First of all You should build network dataset, based on your roads. After this step You will be able to calculate OD matrix.


1

You would need to do this in two steps. Run Spatial Join geoprocessing tool on your points and lines feature classes. This will add a field to the point feature class that will have information about which polyline they intersect. Use arcpy or ModelBuilder to iteratively create an OD layer loading all points within every group (that is, those that share the ...


1

do you mean finding the shortest route from all points to all other points on your network? That's possible with the All Pairs Shortest Path, Floyd-Warshall Algorithm but in "big O" notation it's O(n^3) so it will take a LONG time (10 nodes will take 1,000 units of time, 100 nodes will take 1,000,000 units of time...) You may also run out of memory for ...


1

In the toolbox in ArcMap, in the Network Analyst Tools there is a tool 'Make Route Layer'. Use this tool to create the routes. Docs: Make Route Layer (Network Analyst) However, before you can create routes, you need to create your network. ArcGIS does not do this automatically. You have to build it. Docs: Overview of the Network Analyst Toolbox


1

No, it cannot. You would have to run the solver and then do some table manipulation on the result. The result should be giving you at least three columns - origin FID, destination FID, and distance. You would need to sort/select everything by origin FID and export each unique origin FID to a new table. Once you have your n tables, you'd use something like ...


1

So, I ended up finding a solution, not an elegant one, but a working one. Each path had an origin and destination zone. I added the x and y coordinates to for each zone as attributes to the line feature, and then calculated the respective distances to the x and y coordinates of the corridor destination zone.


1

Can you check that the 'Destinations To Find' parameter of the OD Cost Matrix layer is set to 'All' (not to 1)?


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