Tag Info

New answers tagged

0

Have a look into the open source routing engine GraphHopper (note: I'm the author) which should be able to solve your problem fast as GraphHopper uses contraction hierarchies (CH). But even without CH, which requires preprocessing, you can use the one to many algorithm and you can incorporate traffic information and it will be still fast. The none open ...


1

As well as Floyd-Warshall, for all-pairs routing, you could consider Johnson's algorithm. An alternative to running Dijkstra for each intersection could be to run A* as the latter is usually considered to be faster. I recommend you have a look at PgRouting, which is a plugin to PostGIS. It would be straightforward enough to import your data to PostGIS. ...


3

I am not a Java developer and don't know of any existing Java implementations for this, but using the k-Nearest Neighbors algorithm with a k-d tree will likely give much better performance. However, if accuracy is important, you will need to implement the Haversine (spherical) or Vincenty (ellipsoidal) distance formulae for the distance metric, since ...


2

How about partitioning your space into 9 regions and imposing the equal distance criteria separately in each. For example, For line segment #1, partition the space into 3 regions Points whose projection along the line segment normal actually fall on the line segment. Call it C1. Points whose projection along the line segment normal fall to the left of the ...


1

You can take an average of each pair of end points and draw a line between them. Say the left two points have ID 1 and 2, WITH t AS ( SELECT avg(ST_X(geom)) as x, avg(ST_Y(geom)) as y FROM test WHERE gid in (1, 2) ) INSERT INTO test (geom) SELECT ST_SetSRID(ST_MakePoint(t.x, t.y), 4326) FROM t; That creates a new point midway between ...



Top 50 recent answers are included