Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

location field: more data returned from geocoder #13

Closed
fpurcell opened this issue Jan 2, 2020 · 2 comments · Fixed by #29
Closed

location field: more data returned from geocoder #13

fpurcell opened this issue Jan 2, 2020 · 2 comments · Fixed by #29
Assignees
Labels
enhancement New feature or request

Comments

@fpurcell
Copy link
Member

fpurcell commented Jan 2, 2020

AltSource's comments:
location-9

Frank's $0.02 (see SEE #9 for more...):
We're going to need a geosearch form to only search on the 'stops' layers in Pelias.
https://ws-st.trimet.org/pelias/v1/search?text=6&layers=stops

We're also going to need that form to return the stop_id and agency_id fields, which are encoded in the response via the id field -- e.g., {stop_id}:{agency_id}:{layer_name} is how the id field is composed in Pelias for transit (stops from GTFS).

SEE #9 for more...

@randolphjones
Copy link

randolphjones commented Jan 10, 2020

To clarify, we could make more use of a model like this. We're fairly flexible on naming, etc. Just a suggestion for two new keys:

{
  lat,
  lon,
  name,
  stopId, //null or string
  type //string of 'STOP' or 'LOCATION'
}

At a glance, it looks like we can get by fine with adding type and stopId (if the location is a stop). Let me know if any other clarification is needed. Thank you!
@fpurcell

@fpurcell
Copy link
Member Author

At minimum, maybe return the id and type values from the underlying geocoder records. In the Pelias case, this would mean returning a lot of necessary information, in that we'd get the layer name (e.g., 'stops'), the stop_id and agency_id. The thinking here is that id and type fields are pretty generic, and should map to functionality in most geocoders, and the records therein.

Ala: the 'id' and 'layer' fields from Pelias for stop_id 111 are: "id": "111::TRIMET::stops", and "layer": "stops" for this query: http://cs-st-mapgeo01:4000/v1/autocomplete?text=111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants