<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-7">
<meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Cambria;
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Απλό κείμενο Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.Char
        {mso-style-name:"Απλό κείμενο Char";
        mso-style-priority:99;
        mso-style-link:"Απλό κείμενο";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EL link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Dear List,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>After doing some extensive search on Geometric Network Analysis (GNA) FOSS Tools and software, I can say that I stand a bit confused. Not so much about what I am capable of doing, but more so about what is the best way to do it.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>To start, I am posting my latest Q&A to the list:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>Hello,<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>> Given a Point Cloud (either a file or a stream) that represents <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> positions, speed and direction of a vehicle fleet (TAXIs in my case), <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> and a graph (geometric network) that represents roads and <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> intersections, I want to be able to do the following:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>Your problem will probably be best answered through PostGIS queries, which you can then visualize with QGIS, and/or a custom web-based application.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>Let's say you have a table taxi_position like this, where position is a point geometry :<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>| gid | taxi_id | speed | pos_time | position |<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>>     1. Track down the route of any single vehicle, as a succession of <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> points on the network.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>Group by taxi_id, order by pos_time and make a line with the resulting points.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>>     2. Calculate the total passes of vehicles through any given point or <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> segment of the network.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>Join your segment (or node) network with your taxi_position table, allowing a tolerance around the segment/node (st_dwithin will do the trick), then group by taxi if you want to consider each vehicle only once.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>>     3. (Not as urgent as the above) Find the nearest TAXI to a random <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> point on the network.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>With PostGIS > 2.0, use KNN-search to do it fast as light. Otherwise, use st_dwithin with growing values for the search radius.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>> All of the above need to be FOSS-based solutions.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>check.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>> Although I am willing and ready to program plugins or algorithms to do <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> the above tasks, I am not really into re-inventing the wheel, so my <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> questions are the following:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>     A) Are there any libraries or plugins that handle the above tasks?<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> Is there any FOSS work already done with them?<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>That would be a few SQL queries then.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>>     B) Is QGIS ready (aka efficient enough) to handle those tasks, or <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> shall we try other tools/software?<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>Use QGIS as visualization tool, and PostGIS as a backend, and you're set for hundreds of millions of positions without problem (well, do not visualize everything at once).<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>> Any opinions on my task would be greatly appreciated!<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>You're welcome<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>Vincent<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>> Thanx in advance!<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>> Petros Apotsos<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The above answers cover most of my questions, but trying to be more specific to my task, which includes network attribute callibration, it is essential that I get a better knowledge and understanding of the following concepts that I need for my work to be considered excellent:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>1) Geometry extraction: Given a random point (either vehicle signal node or checkpoint), I want to be able to connect it to the network, but only after doing some tests, like proximity ("What is the distance of the point from the nearest edge?") and direction ("Is the orientation of the vehicle's movement compatible with the orientation of the network edge I am trying to connect to?" - this only applies to vehicle signals). So the questions that arise are:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>- How exactly are new points/nodes, which generally don't belong to one of the edges, connected to the network?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>- After they are connected, can we somehow (eg. with a query or programmatically) get the geometry of the edge at the specific point where the connection actually happens (coordinates of the point and tangent direction of the edge at the specific point could do the trick)?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>2) New point (temporary) connection: In QGIS's Network Analysis Library it is possible to "tie"/"connect" new nodes to the graph/geometric network. What is exactly (or even approximately) the mechanism, under which this is done? How do other GNA libraries handle this? I am trying to figure this out in relation to the analysis I am trying to do (and which is explained above).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>3)A short list of what I am trying to do: The program I am trying to design should be able to do the following, given a stream of vehicle signals and a geometric network of the roads of a city:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                - Read a new vehicle signal. Decide if it is "legitimate", then "assign" it to the network ("Assign" = Determine a point on a network edge, where the vehicle most probably is moving - "Legitimate" = Signal that contains correct position information and complete information on the rest of the attributes of the vehicle's movement (speed, direction, Vehicle ID etc.)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                - Log the above information as persistent data, that can be retrieved eg. using SQL.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                - Calculate, log and visualize the movement of each vehicle. This could be done eg. by successive routing between "assigned" signals of a particular vehicle.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                - Given a point on the network (either original node or a "new" node on an edge) determine if the route of the taxi passes through this point.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I know this is a lot, and maybe I am posting in the wrong direction, but I think this can benefit all of the GIS community. If some work has already be done on the above issues (which I am sure it has), I would like to know in what direction to search (eg. I am sure trivial car navigator software covers the first issue from 3). If not, I am willing to do the relevant work and research, but as I state above, I don't need to reinvent the wheel, and thus I need some starting points.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>If all goes well, I hope I will be able to publish a relevant toolbox/plugin to share with the community.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Always at your disposal and thank you in advance,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:12.0pt;font-family:"Cambria","serif";color:#1F497D'>Petros Apotsos<o:p></o:p></span></b></p><p class=MsoNormal><span lang=EN-US style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Cambria","serif";color:#1F497D'>Rural & Surveying Engineer<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Cambria","serif";color:#1F497D'>Technical Chamber of Greece Registry Number 96798<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Τ</span><span lang=EN-US style='font-family:"Cambria","serif";color:#1F497D'>: 2310 220345<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Cambria","serif";color:#1F497D'>F: 2310 220346<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Cambria","serif";color:#1F497D'>Ermou 18A, Postal Code 54624<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Cambria","serif";color:#1F497D'>Thessaloniki, GREECE<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>PS: I am always open to discussions and/or prospective cooperations. Feel free to drop me a line, though I think the list is the best place for technical discussions.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif"'>PPS: Through my research I have come to the conclusion, thought it might only be a personal conception of the state of the art, that although many FOSS tools handle the concept of network analysis, they mostly focus on the graph analysis part, and neglect the geometry part. Do you feel this is so or do you think I am missing something? I am sure the building parts are all out there, but some engineering work has to be done to bind them all together. I will do (among others) some research and modeling work and will let you know if and when I come to any conclusions.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></div> <BR><BR>__________ Information from ESET Smart Security, version of virus signature database 7980 (20130207) __________<BR><BR>The message was checked by ESET Smart Security.<BR><BR><A HREF="http://www.eset.com">http://www.eset.com</A><BR> </body></html>