GSOC Project proposal

126 views
Skip to first unread message

sarthak agarwal

unread,
Mar 9, 2015, 11:00:25 PM3/9/15
to opentripp...@googlegroups.com
Dear Sir/Madam,

Myself Sarthak currently working under Dr. KS Rajan as a research student in Spatial Informatics Lab, IIIT hyderabad . I am currently working in spatial databases using mongoDB. Previously i have developed a Transport sharing android application which helps villagers and farmers of India to easily contact transport services near them and select a pickup point for trucks and other vehicles to send their goods in the market.

I am interested in working with open trip planner org under the project "GTFS-realtime validation tool" and develop a tool to validate GTFS-rt feed on the existing GTFS validator tool. I have done work in pgrouting and spatial databases in my research and have plenty experience in developing android application and have worked on a similar application before (Transport management) .

Please assign me a project.

Regards,
Sarthak Agarwal
Btech and Ms by research in Spatial Informatics
International Institute Of Information Technology ,Hyderabad

Sean Barbeau

unread,
Mar 10, 2015, 5:31:29 PM3/10/15
to opentripp...@googlegroups.com
Sarthak,
We don't really "assign" projects for GSoC - you'll need to go through the normal submission process and select a project you're interested in, and flesh out your own proposal based on some of the priorities we've listed:
https://github.com/opentripplanner/OpenTripPlanner/wiki/2015-Google-Summer-of-Code-Ideas

We really want students to think independently and work on something they are passionate about.

Sean

sarthak agarwal

unread,
Mar 12, 2015, 11:37:20 AM3/12/15
to opentripp...@googlegroups.com
Hello Sean ,

Here are my ideas :
  • Integrate OSRM and OTP (issue #409) .I think this is a great idea as OSRM is also open source and uses OSM data at the backend. 
  • Add driving directions to the android app which can again be covered in OSRM integration part.
  • Add the latest material design UI to the app (i think this can be quite heavy task as we have to design the UI again).
  • Add weather API using OpenWeatherMap 
  • Update the backend code for the app to the latest mster branch code.
Here are my doubts :
  • DO we need to setup our own OSRM server alongside the existing OTP server (both REST API)  or we want to use the global OSRM server.
  • In my opinion setting up our own server will be a better option (suggestions needed) 
  • For the information regarding the weather .. do we require information for the destination weather or the weather for the whole trip (there can be a case of landslide in between somewhere the path).
  • For the material design part .. everything has to be designed again ..do you have any specific design in mind or we will we adding the material component to the current design ??
I have done work on android applications and google maps api and pgRouting before so i'm familiar with most of the technologies required for building this engine. 
I also read some of your documentation. Have some doubts there too. 

Please guide me with the proposal and suggest me we more is feasible in this scope. 

Sean Barbeau

unread,
Mar 12, 2015, 12:09:40 PM3/12/15
to opentripp...@googlegroups.com
DO we need to setup our own OSRM server alongside the existing OTP server (both REST API)  or we want to use the global OSRM server.

One solution is to allow OSRM server regions, much like we currently support OTP regions, but ensure they are disjoint.  So, our Regions API would contain both OSRM and OTP regions.  By default these regions would be used based on the user's real-time location.  If the user isn't within a region, then we fall back to the global OSRM server.  We may also want to include an option to prefer global OSRM server.  We should also support an option to enter a custom OSRM URL in the app to test a new server, much like you can test a custom OTP server URL in the app today.


For the information regarding the weather .. do we require information for the destination weather or the weather for the whole trip (there can be a case of landslide in between somewhere the path).

I primarily had the destination weather in mind, so the user has an idea of what they are traveling into at the time of their arrival (see the mockup at https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/448#issuecomment-57493273).  I suppose we could support generic weather alerts in the same way as transit service alerts.  I think weather alerts should be over a large enough geographic area that just examining the destination should be sufficient.


For the material design part .. everything has to be designed again ..do you have any specific design in mind or we will we adding the material component to the current design ??

I don't think this needs to be that intense - just adding material elements to the current design is fine.  For example, replace the current my location button with a floating action button, and move the current menu options into the bottom part of the left sliding panel.
 

sarthak agarwal

unread,
Mar 12, 2015, 2:25:22 PM3/12/15
to opentripp...@googlegroups.com

On Thursday, March 12, 2015 at 9:39:40 PM UTC+5:30, Sean Barbeau wrote:
DO we need to setup our own OSRM server alongside the existing OTP server (both REST API)  or we want to use the global OSRM server.

One solution is to allow OSRM server regions, much like we currently support OTP regions, but ensure they are disjoint.  So, our Regions API would contain both OSRM and OTP regions.  By default these regions would be used based on the user's real-time location.  If the user isn't within a region, then we fall back to the global OSRM server.  We may also want to include an option to prefer global OSRM server.  We should also support an option to enter a custom OSRM URL in the app to test a new server, much like you can test a custom OTP server URL in the app today.
 
 Ok so where should I start working on...the problem looks interesting to me but at the same time I have very less clue of setting up a OSRM server and where will be hosting this server ? . The testing part is alright but instead of giving user a choice of selecting the server they want to use for navigation we should apply an algorithm to choose it on your own.. or both (choice and algo ). The algo will primarily work on performance of OTP vs OSRM server in that particualr region.


For the information regarding the weather .. do we require information for the destination weather or the weather for the whole trip (there can be a case of landslide in between somewhere the path).

I primarily had the destination weather in mind, so the user has an idea of what they are traveling into at the time of their arrival (see the mockup at https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/448#issuecomment-57493273).  I suppose we could support generic weather alerts in the same way as transit service alerts.  I think weather alerts should be over a large enough geographic area that just examining the destination should be sufficient.
 
Yes that can be done . But we then have to define the boundaries of that area. Another thing in my mind was to send user a alert if some cyclone or landslide have occured in the path (that is just an idea not well formulated maybe useless ).


For the material design part .. everything has to be designed again ..do you have any specific design in mind or we will we adding the material component to the current design ??

I don't think this needs to be that intense - just adding material elements to the current design is fine.  For example, replace the current my location button with a floating action button, and move the current menu options into the bottom part of the left sliding panel.

Ok that wont be then much of a problem. If have done work on adobe photoshop and illustrator and this work can be done easily on them.

So where should i start now. Can you send me some literature to read regarding this subject so that i can make myself clear with the underlying concept and an idea as to what exactly (in terms of technology and scope) we are looking at.

Regards,
Sarthak 

Sean Barbeau

unread,
Mar 12, 2015, 2:35:36 PM3/12/15
to opentripp...@googlegroups.com
 Ok so where should I start working on...the problem looks interesting to me but at the same time I have very less clue of setting up a OSRM server and where will be hosting this server ? . The testing part is alright but instead of giving user a choice of selecting the server they want to use for navigation we should apply an algorithm to choose it on your own.. or both (choice and algo ). The algo will primarily work on performance of OTP vs OSRM server in that particualr region.

We have a well-defined process of creating new regions for OTP servers - see the OTP Android Developer Guide for how the app currently works:
https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/wiki/Developer-Guide

Main contribution to OTP Android here would be adding an identifying field to each region for whether is it OSRM vs. OTP in our region directory, and creating/adapting client code for OSRM into OTP Android, and any UI modifications that need to happen as well (e.g., I don't believe OSRM supports transit), and real-time nav if you're going to tackle that.

I currently don't know much about the OSRM - part of the GSoC experience is learning about these things independently and then bringing the knowledge to the project/mentors as well as your ideas for the best path forward.  So, I'd suggest checking out the OSRM docs and going from there:
http://project-osrm.org/

Sean

sarthak agarwal

unread,
Mar 13, 2015, 4:09:34 PM3/13/15
to opentripp...@googlegroups.com
Starting of with "identifying field from the current location of the region" use case where should i exactly look in the code. Do we have any existing region directory which i can query to classify the region into OTP or OSRM .
I looked up a bit at the documentation but it would be better if i know where the heart of the code lies ( for this particular use case) .

sarthak

Sean Barbeau

unread,
Mar 13, 2015, 4:17:14 PM3/13/15
to opentripp...@googlegroups.com

sarthak agarwal

unread,
Mar 13, 2015, 4:29:22 PM3/13/15
to opentripp...@googlegroups.com
So what i need to do is select any dummy bounded region and check for its intersection with the current regions where OTP servers set up (list of them from the directory) . 
Please tell me if i'm heading right ? Also do we have any irc channel, i was looking for one over the internet but could not find any.

Sarthak

sarthak agarwal

unread,
Mar 22, 2015, 5:57:39 PM3/22/15
to opentripp...@googlegroups.com
Hello,

I was working on adding an identifying field to each region for whether is it OSRM vs. OTP in OTP region directory, and creating/adapting client code for OSRM into OTP Android app.
I think I am going in the right direction.

I have created a spreadsheet of my own which have a additional 10th column specifying the server_name the app is currently using. It can be any server OTP/OSRM/any that's why i choose it to be a text field rather than a Boolean value.

Subsequently i have changed the code to take into account the server_name.
Here are the changes in the code (result of git diff):

1.Server.java :

+    private String serverName ;
+
     public Server() {
         super();
     }
@@ -93,11 +95,12 @@ public class Server {
         setContactName(s.getContactName());
         setContactEmail(s.getContactEmail());
         setOffersBikeRental(s.getOffersBikeRental());
+        setServerName(s.getServerName());
     }
 
     public Server(Long d, String region, String baseURL, String bounds,
             String language, String contactName, String contactEmail, String center, String zoom,
-            String offersBikeRental)
+            String offersBikeRental, String serverName)
             throws ServerListParsingException {
         super();
         setDate(d);
@@ -110,11 +113,12 @@ public class Server {
         setContactName(contactName);
         setContactEmail(contactEmail);
         setBikeRental(offersBikeRental);
+        setServerName(serverName);
     }
 
     public Server(String region, String baseURL, String bounds,
             String language, String contactName, String contactEmail, String center, String zoom,
-            String offersBikeRental)
+            String offersBikeRental, String serverName)
             throws ServerListParsingException {
         super();
         setRegion(region);
@@ -126,6 +130,7 @@ public class Server {
         setContactName(contactName);
         setContactEmail(contactEmail);
         setBikeRental(offersBikeRental);
+        setServerName(serverName);
     }

@@ -145,6 +150,7 @@ public class Server {
         this.contactEmail = applicationContext.getResources()
                 .getString(R.string.server_checker_info_custom_server_unknown_email);
         this.offersBikeRental = false;
+        this.serverName = "unknown";
     }

+    public String getServerName() {
+        return serverName;
+    }
+
+    public void setServerName(String serverName) {
+        this.serverName = serverName;
+    }
+
 }


2. ServerSelector.java

public class ServerSelector extends AsyncTask<LatLng, Integer, Integer>
                             break;
                         }
                     }
-                    if (allFieldsNotNull && (serverString.length >= 9)) {
+                    if (allFieldsNotNull && (serverString.length >= 10)) {
                         try {
                             Server s = new Server(currentTime, serverString[0], serverString[1],
                                     serverString[2], serverString[3], serverString[4],
                                     serverString[5], serverString[6], serverString[7],
-                                    serverString[8]);
+                                    serverString[8], serverString[9] );
                             serverList.add(s);
                         } catch (ServerListParsingException e) {
                             Log.e(OTPApp.TAG,


Now that we have a server name in our application we can switch to different servers as per our choice and users choice. 

Now the next step is to integrate OSRM servers in OTP. Does any one have any lead on how to go about it (how to set up OSRM server and connection setting).

Please tell me if I'm going in the right direction?

Regards,
Sarthak

sarthak agarwal

unread,
Mar 22, 2015, 6:03:08 PM3/22/15
to opentripp...@googlegroups.com

Sean Barbeau

unread,
Mar 23, 2015, 10:23:20 AM3/23/15
to opentripp...@googlegroups.com
Yes - you have the right idea of adding an enumeration as another column in the OTP Server Directory - I'd name this "Server Type" instead, and validate this by only allowing users to select one of a few values (OTP, OSRM).  For a validation example see the "Validation Metadata" spreadsheet in the main OTP Server Directory that enforces boolean values.  This field will allow the OTP Android client to know which type of server is providing services for a given region.  And you're correct that you'll need to modify the logic with the Server class to parse the extra field for server type.

The next step would be implementing the client-side code to make the REST API request from OTP Android to an OSRM server to plan a trip, which would be used when the OTP Android app detects that the current region uses OSRM (and not OTP).  We use the Jackson library for JSON to Plain-Old-Java-Objects (POJOs) data binding - you can see an AsyncTask that makes a request to an OTP server here:
https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/blob/master/opentripplanner-android/src/main/java/edu/usf/cutr/opentripplanner/android/tasks/TripRequest.java

This requires the implementation of the server response objects in POJOs.  You can see the POJOs used for OTP server responses here:
https://github.com/CUTR-at-USF/opentripplanner-pojos/wiki

So, you'd need to create a new project (or use some existing library) that would hold the POJOs for parsing the OSRM response, and implement the logic in the OTP Android app to execute the proper REST API request based on the region server type.  I see the main challenge here being how to reconcile the different response structures and map them both to a data model that OTP Android uses to display the results of the trip.  Given that OTP Android was built around OTP server response, it may be easiest to try to map the OSRM response to an OTP response internally and continue to use the OTP data model in OTP Android.

If you want to discuss precise code changes, the best forum for this is for you to fork the OTP Android project on Github and then open a Work-In-Progress (WIP) pull request with your changes.  That way we can easily reference lines in code and what does/doesn't work.

Sean
Reply all
Reply to author
Forward
0 new messages