Tag Info

New answers tagged

1

As far as I know it's not possible to solve for alternate routes without some additional input or change to the analysis. In a network, given a particular impedance, there is only one shortest route between two points. As soon as you start looking for alternates without any additional input you've essentially removed the 'shortest' constraint and are back to ...


0

This answer is not complete or tested, but try something like this: according to questions/39210: with index_query as ( SELECT ,ST_Distance(i.geom, i.b_geom) AS dist ,ST_MakeLine(i.geom, i.b_geom) as geom FROM( SELECT ,a.geom ,b.geom AS b_geom ,rank() OVER (PARTITION BY a.id ORDER BY ST_Distance(a.centroid_geom, ...


2

Works for me in QGIS 2.6 with Processing 2.6 (on Win7) and the test data Spatialite file from the repository. If you are using different data, please share it. Check if network and points are in the same CRS.


0

That script won't work in the latest version of QGIS as the Processing framework has been reworked and some scripts may have been broken. Maybe you will be lucky, you could try to change line 17 (as below): from processing.tools.vector import VectorWriter


0

I agree that @nhopton's answer solves the OP's problem as VMD is a cartographic product and not a routing one. For what it's worth though, I have created two routeable networks using PgRouting and OS datasets. I have a full UK "quick and dirty" network made using the OS Strategi shapefiles and a more detailed network of Scottish roads from ITN (Integrated ...


2

Have you done the pgRouting workshop? The workshop should clarify the following: There are import tools for OSM data, so the network will contain the routing topology already after import. If you still want to use SHP files, then it explains how. Your bus stops have coordinates, so you just need to start from the nearest point in your road network. ...


2

ST_StartPoint() only accepts LineString as input. You'll have to strip your table down from MultiLineString to LineString, either by taking only the first element up each geometry ALTER TABLE foo ALTER COLUMN geom TYPE Geometry(LineString,4326) USING ST_GeometryN(geom,1) Or, more correctly, dumping the multis out, in case there are legit multis. ...


1

The way that I would try to answer your original question is to add a field to your roads and update it with a count of vertices. Add a Long Integer field Calculate that field using the Python parser to be equal to !shape.pointcount!, You can then use the vertex count field as, or to contribute to, your impedance field. You'll need to think about ...



Top 50 recent answers are included