Lucene geocoder not working + stops noted "undefined" (latest OTP master)

132 views
Skip to first unread message

Nicolas Derive

unread,
Aug 28, 2014, 11:46:34 AM8/28/14
to opentripp...@googlegroups.com
Hello everybody,


Since I setted up OTP on my server, everything is working properly when designing trips (after fixing GTFS problems and working around fares problems)

I couldn't get geocoding working, whereas I properly get trips when using "external" geocoding (using the android app for example) or when choosing places on the map.

Do you know what may be wrong?


I also can't browse stops in stop viewer (no information in it, and the utility to search stops is completely empty), and got this kind of infos in suggested itineraries

"Board at gare de Bordeaux-St-Jean
Stop #undefined [Stop Viewer]"


Why stop is #undefined?


I run OTP on a 1,6ghz single core server, with 2Go of RAM, and nearly nothing else is running on it (especially swap is nearly not used, and cpu usage is usually low)


Thanks for your help understanding what's wrong. Sorry to ask so many questions and help... Have a nice day.


Nicolas

Andrew Byrd

unread,
Aug 28, 2014, 12:48:14 PM8/28/14
to opentripp...@googlegroups.com
Hello,

I suppose by "geocoding" you are referring to the internal Lucene
geocoder. That's really an experimental proof-of-concept / example, so
you'll have to be willing to hand-modify the code to suit your purposes.
We would also need a lot more information to be of any help:

- Which version of OTP are you running?
- What exactly fails, at what time?

About the stop viewer: the index API which returns stops, routes, etc.
has changed in master branch (which is development code evolving toward
a 1.0 version) and the client is still calling the old endpoints, which
probably explains your problems.

If you want stable code please use the opentripplanner-0.11 tag or
0.11.x branch.

-Andrew
> --
> You received this message because you are subscribed to the Google
> Groups "OpenTripPlanner Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opentripplanner...@googlegroups.com
> <mailto:opentripplanner...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Nicolas Derive

unread,
Aug 28, 2014, 1:16:05 PM8/28/14
to Andrew Byrd, opentripp...@googlegroups.com
Hi Andrew,

I'm running latest git master branch. I know I'm running a dev version but as it's for some tests, I prefer using that (because of the standalone mode), and know that I should expect problems (and should help to debug them, which is what I'm trying to do :) )

I fail to get any position on the map or any suggestions when I enter an address in both start point or destination point, and can't start a search for a trip until I positioned start and stop points using the map. Is there any configuring I should do before using it? Or any way to fallback to another geocoder?

For the stop viewer: No problem with that. I was just wondering if it was known or not. Is that planned to correct the client or will it be removed for 1.0?

Nicolas


To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner...@googlegroups.com.

Marko Burjek

unread,
Aug 28, 2014, 4:13:35 PM8/28/14
to OpenTripPlanner Developers
If you want to see how stop viewer looks like I have one working on my demo server: http://planner-daljinko.rhcloud.com/.

Marko Burjek

unread,
Aug 28, 2014, 4:15:58 PM8/28/14
to OpenTripPlanner Developers
>Why stop is #undefined?
Because stop_code isn't defined in GTFS. Stop code is used in some public transport systems as an ID for stops. This ID is used by public to see information about this stop. If you don't have it you can remove this parameter from translations and it won't show up. Just change fr.js. in js/otp/locale

Andrew Byrd

unread,
Aug 28, 2014, 5:18:55 PM8/28/14
to Nicolas Derive, opentripp...@googlegroups.com
On 08/28/2014 07:16 PM, Nicolas Derive wrote:
> I fail to get any position on the map or any suggestions when I enter an
> address in both start point or destination point, and can't start a
> search for a trip until I positioned start and stop points using the
> map. Is there any configuring I should do before using it? Or any way to
> fallback to another geocoder?

The built-in geocoder is enabled in the master branch, and its index
will be lazy-initialized the first time you make a request. The geocoder
is available at a URL of this form:
http://localhost:8080/otp/routers/trimet/geocode?query=xyz

The relevant classes are
org.opentripplanner.index.GeocoderResource
org.opentripplanner.common.LuceneIndex

Note that the LuceneIndex will attempt to create its index in
/var/otp/lucene. If this directory doesn't exist that probably
interferes with creation of the index.

The client code is configured by default to use this built-in geocoder.
See js/otp/config.js geocoders section, which references
js/otp/core/GeocoderBuiltin.js.
However the client code just uses "default" as the router ID so you
might need to change that or add some code to make it more generic.

> For the stop viewer: No problem with that. I was just wondering if it
> was known or not. Is that planned to correct the client or will it be
> removed for 1.0?

The client code in master was/is still being used in environments where
we can't change the URLs and data model for the transit index. We do
plan to fix it for the 1.0 release. Additionally, the 1.0 index API is
not finalized and we don't necessarily want to keep chasing behind those
changes in the client code.

-Andrew

Nicolas Derive

unread,
Aug 29, 2014, 3:14:25 AM8/29/14
to Andrew Byrd, opentripp...@googlegroups.com
Hello Andrew, Marko,

I gave a try to the 0.11.x branch but I got lots of things missing in trip options, especially start and destination point (see attached screen capture). And some fields are present but empty of any text...

I got some stops ids in itinerary but still no info in stop viewer.

Back to master branch, I could get lucene working, creating the /var/otp/lucene folder with appropriate rights fixed it. But in suggested addresses, I only get road corners (corner of x road with y road), not road numbers. Is there something to configure somewhere (also for getting suggestions in French)?


Thanks for your help. Have a nice day and week end.


Nicolas.




Marko Burjek

unread,
Aug 29, 2014, 6:14:53 PM8/29/14
to OpenTripPlanner Developers
I don't see any screen capture but start and destination point are only shown if geocoder is enabled in config.js.
https://github.com/opentripplanner/OpenTripPlanner/blob/0.11.x/otp-leaflet-client/src/main/webapp/js/otp/config.js
I think in 0.11 for geocoder you need to run geocoder in tomcat. Which is in otp-geocoder. which doesn't exists?!?

Can you search for stops in stop finder? What options do you have in web gui when you click on a gear in top left corner?
Reply all
Reply to author
Forward
0 new messages