4 votes

How do you move a raster's origin 1m east in R?

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 ...
mdsumner's user avatar
  • 8,156
4 votes

How to efficiently convert origin-destination coordinates into lines in R

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){...
Spacedman's user avatar
  • 62.4k
3 votes

Formula for the great circle arc between two points (lng/lat coordinates)

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 ...
Mike T's user avatar
  • 41.8k
3 votes
Accepted

How to efficiently convert origin-destination coordinates into lines in R

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)...
hrbrmstr's user avatar
  • 1,214
2 votes
Accepted

Create an Origin - Destination map using roadnetwork layer

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 ...
Hicham Zouarhi's user avatar
2 votes
Accepted

Defining area of influence for origin-destination dataset (where destination is port) using ArcGIS for Desktop?

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 ...
Maksim's user avatar
  • 6,906
2 votes
Accepted

Where to find datasets for creating CARTO VL maps?

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://...
JaakL's user avatar
  • 2,146
2 votes
Accepted

Calculating destination point using Python

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 ...
winwaed's user avatar
  • 1,294
2 votes
Accepted

How can I calculate the distance between multiple points in a network?

The solution may be dependent on how are the lines digitised. Are they individual segments or one large line. One solution could be as follows: Dissolve all lines Split lines with points Calculate ...
itsgupta's user avatar
  • 538
1 vote
Accepted

sDNA - OD assignment: trip length and destination weight from network

For your first question, the surest way is to use the sDNA Skim matrix tool which automatically computes average trip length for each zone pair. If you want to combine this for all trips in the ...
Sideshow Bob's user avatar
  • 2,313
1 vote

Creating O-D cost matrix using ArcGIS Pro with routes from network data and not just straight lines

A quick search of the ArcGIS Pro Help uncovered the OD cost matrix analysis layer page: An OD cost matrix analysis layer finds and measures the least-cost paths along the network from multiple ...
PolyGeo's user avatar
  • 65k
1 vote

How to implement added cost point barrier in ArcMap Network Analyst?

I think I found the answer. You have to right click on the network analysis object and you can input the values in minutes as shown here on the screenshot
tara's user avatar
  • 51
1 vote

QGIS 3 - shortest path routing for multiple pairs of origins and destinations over a road network

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 ...
Leonmvd's user avatar
  • 116
1 vote
Accepted

Geoprocessing server tool result has no internal record set object for Save

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) ...
KHibma's user avatar
  • 16.6k
1 vote

Exporting Origin-Destination Matrix Table into Separate Origin and Destination Columns

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 ...
FelixIP's user avatar
  • 22.6k
1 vote

Joining Origin, First point, Second Point and Destination to create routes in ArcGIS Desktop?

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 ...
Moh's user avatar
  • 1,588
1 vote

Finding routes instead of straight line in Network Analyst O/D cost matrix?

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 “...
Sergey N's user avatar
  • 309
1 vote

ArcGIS Network Analyst OD Cost Matrix - how to change network?

First of all You should build network dataset, based on your roads. After this step You will be able to calculate OD matrix.
Sergey N's user avatar
  • 309
1 vote

ArcGIS, OD cost matrix

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 ...
Alex Tereshenkov's user avatar
1 vote

Calculate shortest path and distance between multiple OD pairs using pgr_dijkstra one-to-one

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(...
Steven Kay's user avatar
  • 20.3k
1 vote

ArcMap - Driving distance between 2 sets of points

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 ...
jbalk's user avatar
  • 7,465
1 vote

Export shapefile of a flow map with arrows indicating their direction in R

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 ...
Farid Cheraghi's user avatar
1 vote
Accepted

Can you create a square OD Cost Matrix with Network Analyst?

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. ...
Chris W's user avatar
  • 15.7k
1 vote

Find the "direction" of a line

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 ...
MapMike's user avatar
  • 353

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