New answers tagged spatial
Neo4j is a database that sounds a fit for your needs. It is graph based database, there are many drivers for it in many languages and it is built in Java. In this database, you would specify the relationships within each node, rather than creating tables for joins, like in mySQL.
thank you for your response. I will use the database to deduct traffic flow rate by knowing the vehicles which was at the same point (approximately) and at the same time. Then I intend to transpose these queried data on a maps to see, with a color scaling from red to green , the flow rate on the road (I didnt yet begin to search how to do that). knowing the ...
set @x = 15; set @y = 25; select sqrt(pow(b.lat-@y,2) + pow(b.lng-@x,2)) as distance, b.name, d.name from `drinks` d join `drink__bars` db on d.id = db.drink_id join `bars` b on b.id = db.bar_id where d.`name` = 'Beer' order by distance asc; Full sqlfiddle, with some data. Use your preferred distance function to replace the plain one I used. I would ...
Start with a function to calculate de distance between 2 points calculate_distance_function(start_lat,start_lng,end_lat,end_lng) and a query like declare @start_lat float, @start_lng; select b.name, MIN(calculate_distance_function(@start_lat,@start_lng,b.lat,b.lng) Distance from bars b left join drink_bars db on b.id = db.bar_id ...
Top 50 recent answers are included