How to use OpenTripPlanner on a web application? - openstreetmap

I am new to open trip planner (and OpenStreetMap too), and I would like to use it in a web application, where I would let the user choose preferred options (like travel mode) and even use tags to create a personal route.
Following the tutorial Basic Usage, I've run the jar file and now I have an instance of OTP running on localhost correctly.
Now, how can I integrate it on a web app and let the user use it? I couldn't find any tutorial about that. Also, I have some other doubts:
I've downloaded GTFS for Venice, but what do I have to do if I wanted to work with multiple locations?
Since I have to download also OpenStreetMap data for the same region as the GTFS file (as explained in the tutorial above), again, how it is possible to integrate all the files to, let's say, visualize the roads and create travels on an entire nation?
How can I use OSM tags to personalize journeys?
I know this is a lot, but I really don't know where to start. Any help, tutorial or guide link would be truly appreciated.

OTP comes with a default web application that is available after starting the server if you go to localhost:8080. This is explained in the Basic Usage section of the docs.
As for the rest of your question, I'd recommend looking at the Configuration section of the docs.

Related

How to connect ontology and web application

I'm working on a project, within which we are using semantic web technologies and creating web application allows user to get recommendation in order to take right decision ( won't get into the details).
For me and my team its a first experience to work with ontology.
We've already created ontology (have rdf and owl formatted files)(We are using eclipse to keep them).
Separately, we've created web application. My question how to connect web page and owl, rdf formatted data, more precisely, how to ensure input through webpage to dataset and get output on page.
I've found some info( on old forums), that its easyrdf which can be used as embedded in php script. But not clear.
Based on youtube tutorials, I've downloaded jena fuseki and don't know what is the next step.
I would be glad to get any advice, suggestion :)
In my view, there is no a single way to do this.
I usually set up some back-end application in order to pre-process this kind of information (build SPARQL queries, execute them and parse the results) and then return to the front in some way understandable by that side.
So, you could have all your data in RDF format store, for example, in a TDF exposed by Fuseki and interact with that data with some back-end, aimed to consume, update and parse the results you could find there.
That's my advice, hope could be useful for you.
Good luck!

How many calls I can make to OSM's Nominatim instance?

I am developing mobile application which using google maps and I want to find users current address with device latitude and longitude (Reverse geocoding).
Google have some limits and it will charge me once I go beyond it.
Now I am looking on OpenStreetMap, it is open to use in public. And I can use Reverse geocoding with it.
e.g. http://nominatim.openstreetmap.org/reverse?format=xml&lat=20&lon=71&zoom=18
My question is,
1). Is there any limit to make these calls per day?
2). Do I need to register somewhere ?
3). Is there any other alternatives available ?
Thnks in advance
Check the Nominatim Usage Policy
If you exceed the limits given there one of your options is to run your own instacne
There are also ready-to-run Docker images available on Docker Hub
Yes, they do have a limitation on the service. Check out the page here: Usage policy
And from Sep 15, 2015. You need to register before you could use the service, check out the page here: Registration page
Also, you could install a local nominatim here: Installation page
Check out the github page: Github page
Anyway, if it doesn't work, you could try a bunch of different geocoders, like: Pelias from mapzen, Photon, OpenCage Geocoder. Good luck geocoding!

Routing in osm?

As a part of my Software Development course I have to build a campus mapping mobile application which would include all the basic functionalities provided in google maps including searching,routing etc. Now in release 2 I have to implement routing.
Note: This is a completely offline application.
I have generated tiles rendered them in my application, implemented search location and present location.
Can somebody tell me how to perform routing in the map as i am in my second year and I have completely no knowledge of OSM?
Note: Also the application is to be cross platform..:)
The OSM wiki contains a lot of information about routing. You should read about OSM's basic elements and OSM tags for routing. If you get stuck at some point then take a look at one of the many online routers, offline routers and libraries, several of them are open source.

Transferring images captured by iPhone onto the WebService

This is what I am trying to accomplish.
Capture images from iPhone
Store them on the web service
Retrieve them when required
I have searched for tutorials on the topic but have found none. Also, there are various threads providing information in bits and pieces which I am finding hard to piece together and deduce something useful from. Please post a sample code that does it.
Thanks in advance.
Sayeed
If your trying to upload to a popular web service like Flickr, you will have to read and understand their API. Whether your using one of those, or your own server, most probably you'd want to use this open-source library ASIHTTPRequest as it will provide you with a nice layer of abstraction with communicating with web services.
To capture images you can use the UIImagePickerController
To up- and download images to/from a web server you can use NSURLConnection and it's companion.
And it's always a good start to look into some apple sample codes. They're on the related classes documentation at the top under "Related sample code".

Using web hit counter to track application usage, recommendations wanted

I have an internal tool written in java. It would be useful to get a little
feedback on how much it is used by colleagues.
A simple solution would be to have the application display an image which it fetches from
a web hit counter like application and just look at how often the image is accessed.
So what I am looking for: a stand-alone application (i.e. no Apache modules, cgi scripts, etc),
which serves one or a couple of static images and and can log accesses, preferably with as
little as possible of support of everything else.
Searching for "hit counter" gave little relevant, "lightweight http server" was more relevant, although mostly overkill still. Any suggestions?
You could try using Google Analytics. Most of the time, people using Google Analytics are tracking pageviews on a web page, and Google Provides some javascript that you can place on your page and it will track the visits to that page as well as browser capabilities/etc. Behind the scenes, that javascript is placing an image tag on the page in the manner you describe.
However, since your application is java and not a web app (I assume it's a standalone and not an applet), you won't be able to include Google's javascript (unless you embed a javascript interpreter...yick). Fortunately, it is possible to use Google's analytics without javascript.
The trick is that Google's scripts use the image http://www.google-analytics.com/__utm.gif and pass parameters via the query string. You can find a list of the parameters you can pass to the query string here. So all you'd have to do is figure out what the query string should be and have your client make the request to google's image (after setting up your google analytics account, of course).
Just use Google Analytics, it's really easy and requires a short script on your pages.
Michal Kebrt's simple UNIX HTTP server does exactly what I was looking for.