Re: [OSRM-talk] Can hints be used to identify a common segment?
If points are not in order in the route, but are in the same segment, then forward_node_id, reverse_node_id and name_id for each phantom node must be identical. As you say, this information is already in hint_data (decriptors/json_descriptors.hpp). Best regards. Fernando. El 21/04/15 a las 10:33, Stephen Woodbridge escribió: Hi Fernando, Thank you that is a useful observation but my problem is a little different. I have many positions and I would like to determine those that lie on the same segment so that I can group them together. If I remember correctly the hint is a base64 encoded pointer to the edge plus something like and offset along the edge. I could be useful to take advantage of this information to group and order locations along a path. I'll see if I can figure it out from the source code. -Steve On 4/21/2015 8:28 AM, Fernando Pacheco wrote: If both points are in the same segment, their position (third element in route_instructions) should be consecutive. Located on the same street but in different segments (3 and 5): [9, General José Esteban Brito del Pino 122,3,14, 121m, S, 193.1] [9, General José Esteban Brito del Pino, 57,5,21, 56m, S, 191.1] In the same segment (4 and 5): [9, General José Esteban Brito del Pino, 35,4,5, 34m, S, 191.1] [9, General José Esteban Brito del Pino, 56,5,21, 56m, S, 190.1] May be?. Fernando. El 21/04/15 a las 00:24, Stephen Woodbridge escribió: Hi, I have a need to be able to identify if two locations are on the same segment. We already have the hints for each location and there seems to be some commonality in the hints for location on the same segment. I'm wondering if there is a safe way to use the hints to determine if they are on the same segment. Thanks, -Steve --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk -- Ing. Fernando Pacheco M.S.L. Ingesur srl Dirección: Reconquista 268 apto. 511, Montevideo, Uruguay. Teléfonos: +598 29161459, +598 99627932 Web: http://www.ingesur.com.uy/ ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] Can hints be used to identify a common segment?
Hi Fernando, Thank you that is a useful observation but my problem is a little different. I have many positions and I would like to determine those that lie on the same segment so that I can group them together. If I remember correctly the hint is a base64 encoded pointer to the edge plus something like and offset along the edge. I could be useful to take advantage of this information to group and order locations along a path. I'll see if I can figure it out from the source code. -Steve On 4/21/2015 8:28 AM, Fernando Pacheco wrote: If both points are in the same segment, their position (third element in route_instructions) should be consecutive. Located on the same street but in different segments (3 and 5): [9, General José Esteban Brito del Pino 122,3,14, 121m, S, 193.1] [9, General José Esteban Brito del Pino, 57,5,21, 56m, S, 191.1] In the same segment (4 and 5): [9, General José Esteban Brito del Pino, 35,4,5, 34m, S, 191.1] [9, General José Esteban Brito del Pino, 56,5,21, 56m, S, 190.1] May be?. Fernando. El 21/04/15 a las 00:24, Stephen Woodbridge escribió: Hi, I have a need to be able to identify if two locations are on the same segment. We already have the hints for each location and there seems to be some commonality in the hints for location on the same segment. I'm wondering if there is a safe way to use the hints to determine if they are on the same segment. Thanks, -Steve --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] Can hints be used to identify a common segment?
You can use DecodeFromBase64 in algorithms/object_encoder.hpp to decode the hints to a phantom_node_pair. Phantom nodes contain contain a forward_node_id and backward_node_id which you can use to determine if its the same segment. Best, Patrick On Tue, Apr 21, 2015 at 3:33 PM, Stephen Woodbridge wood...@swoodbridge.com wrote: Hi Fernando, Thank you that is a useful observation but my problem is a little different. I have many positions and I would like to determine those that lie on the same segment so that I can group them together. If I remember correctly the hint is a base64 encoded pointer to the edge plus something like and offset along the edge. I could be useful to take advantage of this information to group and order locations along a path. I'll see if I can figure it out from the source code. -Steve On 4/21/2015 8:28 AM, Fernando Pacheco wrote: If both points are in the same segment, their position (third element in route_instructions) should be consecutive. Located on the same street but in different segments (3 and 5): [9, General José Esteban Brito del Pino 122,3,14, 121m, S, 193.1] [9, General José Esteban Brito del Pino, 57,5,21, 56m, S, 191.1] In the same segment (4 and 5): [9, General José Esteban Brito del Pino, 35,4,5, 34m, S, 191.1] [9, General José Esteban Brito del Pino, 56,5,21, 56m, S, 190.1] May be?. Fernando. El 21/04/15 a las 00:24, Stephen Woodbridge escribió: Hi, I have a need to be able to identify if two locations are on the same segment. We already have the hints for each location and there seems to be some commonality in the hints for location on the same segment. I'm wondering if there is a safe way to use the hints to determine if they are on the same segment. Thanks, -Steve --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
[OSRM-talk] Can hints be used to identify a common segment?
Hi, I have a need to be able to identify if two locations are on the same segment. We already have the hints for each location and there seems to be some commonality in the hints for location on the same segment. I'm wondering if there is a safe way to use the hints to determine if they are on the same segment. Thanks, -Steve --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk