Tag Info

8

You should be able to run a SQL statement using the PostGIS function ST_LineLocatePoint to select the relative distance along the route. You will need a single route, a filter for the max distance from the route, and an order by clause. This is untested, but should get you started: Select points.pointID from points, rountes where ...

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

7

This is an instance of a shortest path problem: given a set S of polygonal "obstacles" (considered as open point sets), a start point p, and an end point q, to find a shortest path from p to q that does not intersect the interior of S. Such problems are solved by first constructing the "visibility graph" of S. One first proves that any ...

5

I think some of the answer depends on the layout of the road network, and this question might be worth posting on the Math Stack Exchange (https://math.stackexchange.com/) as it seems like a graph theory problem. I don't think this will be the optimal solution, but it might help get you closer. You could divide up the road network into natural regions, ...

5

If you are looking for a OpenSource Solution, you need to look at pgRouting. You can upload your shapefiles in to postgis, and then run pgrouting on it. To get started with pgRouting, I would suggest this workshop.

5

Here's the documentation from Google: https://developers.google.com/transit/gtfs/reference In this model, a "trip" occurs along a "route". I think the simplest difference can been seen in the fact that a "route" has no directionality, it's just a line along which a transit vehicle travels. So if you look only at the route, you don't know which direction ...

5

GraphHopper (using OpenStreetMap Data) GraphHopper offers memory efficient algorithms in Java for routing on graphs. E.g. Dijkstra and A* but also optimized road routing algorithms like Contraction Hierarchies. It stands under the Apache License and is build on a large test suite. OpenStreetMap is directly supported from GraphHopper. Without ...

4

You need two postgis functions ST_Buffer and ST_Line_Locate_Point.

4

Transit routes. A route is a group of trips that are displayed to riders as a single service. (The entire route) GTFS Routes are equivalent to "Lines" in public transportation systems. Routes are defined in the file routes.txt, and are made up of one or more Trips - remember that a Trip occurs at a specific time and so a Route is time ...

4

As far as I know, it's still the case that you cannot use the M-part of geometries. I know that PostGIS supports M and it depends on your use case if that can be an alternative.

4

OSM Tools: My recommendation would be to use OSM tools for QGIS which you can download as a plugin. OSM tools was created by Nils Rode and is an adaptation of the OSMroute plugin which uses the OpenRouteService API. Simply download the plugin and request an API key, once you have this you simply use the routing tab (the other tab is for accessibility e.g. ...

4

You can use the Join by lines (hub lines) tool for this. This algorithm creates hub and spoke diagrams by connecting lines from points on the Spoke layer to matching points in the Hub layer.

3

You can find the second point given a line, starting point, and distance using the GeometryService. The method you use depends on whether you want absolute distance from the starting point (as the crow flies), or traveling distance. Absolute Distance (as the crow flies) Create a Buffer around the starting point that's the distance you want. Convert the ...

3

You cannot use lines as stop inputs for a network analysis. The only way you could possibly use the lines is to set them as barriers but give them a negative value (ie, rather than adding time, they take time away) such that they attract the route rather than avoid it. You still have to set stops though. If centroids are not sufficient, it would be ...

3

I think that this will not work from your desktop, but needs to be uploaded to a server. These lines in L.Routing.OSRM.js 23 L.Routing.OSRM = L.Class.extend({ 24 options: { 25 serviceUrl: '//router.project-osrm.org/viaroute', 26 geometryPrecision: 6 27 }, are getting file:// appended to the front (file://router.project-...

3

You'll need to use Network Analyst for this. The first thing you will need to do is turn your lines into a network. The Network Analyst Tutorial exercise 1 covers this, but be aware it may not go into sufficient depth, as there are geometry and topology considerations to take into account. Why isn't the service layer shape properly spread out? touches on ...

3

Consider adding "Point" cost barriers. See Barriers.

3

You can either use pgRouting or if not using your data but the OSM street network would be fine, use the OSM Route plugin: Enter a start point and fill out the Accessibility Analysis options.

3

For whoever also stumbles on this question. Now for more than 2 years since the inital question was raised and QGis 3.X has become more mature, one could achieve this by ORS tools or QNEAT3 ORS tools uses the Open Route Services API (online) and has some limitations QNEAT3 can be used for offline/own network files

3

It is all preference, so think about it from the perspective of users, and balance that with how difficult it is to produce, and how much the details stray from the road. I have used GTFS extensively, and know that these details help with things like estimating how fast a vehicle is scheduled to travel (comparing it to a real-time tracking feed), or when it ...

3

If you have vector roads data then the new (>2.14) trace tool in advanced feature editing should work for you.

3

EDIT: I deleted my previous answer as it was wrong. First big mistake I made was performing dot and cross products using spherical coordinates. One needs to convert them to Cartesian first. (I didn't figure out how to type in math, so I'm pasting images showing all the math). Below is the python implementation: def spherical2Cart(lat,lon): clat=(90-...

3

This is a really interesting question. I think that the zig-zag is the optimal geometry because this is the path that light would take if both boundaries were mirrors. The slight overlap in area is made up for by the increased efficiency in spanning the square, when walking at an angle to the edge. While writing R code, we might, therefore want to choose ...

3

If your road network is a local file or database, QGIS 3.0 has a Processing algorithm which will generate a routable version of it and can generate routes between all the point features in a source/dest layer.

3

Unlike Arcmap you don't need a separate tool or even a plugin to access this information in QGIS (at last from version 3.4, maybe in earlier version as well). By using the "identify features" tool you have access to all kind of geometric information in the "derived section" including closest vertex M value and interpolated M value. Of course this work ...

2

Time depends on how you travel in your network. Do you walk, do you use bicycle or car or something else? You can use anything as cost, any value or formula. For example you have road classes in your OSM data and you can estimate the average speed on each road class. Then together with the length of the road segment you can calculate the time it takes to ...

2

This task can be completed in many ways, so here is one which I would use in your situation. Assuming that the XML data is not too complex I would parse the data into an x list and a y list (and lists for any other attributes you may have) using python, and then write the data to a shapefile using the standalone module pyshp. I have written a bit about using ...

2

I just tested the code below which seemed to work when I placed it behind a tool with no parameters. arcpy.CreateRoutes_lr("C:/temp/test.gdb/Streets","STREET","C:/temp/test.gdb/StreetRoutes","LENGTH","#","#","UPPER_LEFT","1","0","IGNORE","INDEX") mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] arcpy....

2

You can do it with ArcPy.mapping: # Project variables arcpy.env.workspace = "[Your working directory]" mapTemplate = "ModelDepDM.mxd" lyrZones = "__Zone500_Rabat_DM" # Mxd and dataframe mxd = arcpy.mapping.MapDocument(os.path.join(arcpy.env.workspace, mapTemplate)) df = arcpy.mapping.ListDataFrames(mxd)[0] # What I'd like to add newSource = os.path.join(...

2

What you are searching for is Map Matching. The point is, that you are not "rounding" the coordinates but searching for the nearest point on a street. There is no Google API that offers exactly that, but the Directions API offers a way to calculate a route with given Waypoints. This Question on Stackoverflow describes a way to do that: https://...

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