Skip to content

reverse: not working on custom layers #1678

@enrikomic

Description

@enrikomic

Describe the bug
Custom layers are incompatible with layer filters in reverse queries.

Steps to Reproduce

  1. Import custom data into Pelias from CSV using custom sources and layers.
  2. Perform a reverse query filtered on those layers.
  3. No results.

Pastebin/Screenshots

Pelias request :
.../v1/reverse?point.lat=43.538662&point.lon=1.460511&boundary.circle.radius=0.0001&size=10&layers=stop_area&sources=custom

CSV looks like :

id,source,name,layer,housenumber,street,postcode,lon,lat,addendum_json_custom,category,parent_json
SA_1,custom,Montjoie,stop_area,,,31520,1.4605112727420955,43.5386624143594,"{""network"": ""Tisséo"", ""physical_mode"": ""3""}",network:Tisséo,"{""locality"": [{""id"": ""64"", ""name"": ""RAMONVILLE-SAIN
SA_10,custom,Le Lac Reynerie,stop_area,,,31000,1.4040756476682126,43.56748734995478,"{""network"": ""Tisséo"", ""physical_mode"": ""10""}",network:Tisséo,"{""locality"": [{""id"": ""79"", ""name"": ""TOULO
SA_100,custom,Borde Haute,stop_area,,,31850,1.5314279793318943,43.64370947141033,"{""network"": ""Tisséo"", ""physical_mode"": ""3""}",network:Tisséo,"{""locality"": [{""id"": ""51"", ""name"": ""MONTRABE"
SA_1000,custom,Phidias,stop_area,,,31000,1.374173329972152,43.580869083701046,"{""network"": ""Tisséo"", ""physical_mode"": ""3""}",network:Tisséo,"{""locality"": [{""id"": ""79"", ""name"": ""TOULOUSE""}]
SA_1002,custom,Amidonniers,stop_area,,,31000,1.4281847885171595,43.60631516569829,"{""network"": ""Tisséo"", ""physical_mode"": ""10, 3""}",network:Tisséo,"{""locality"": [{""id"": ""79"", ""name"": ""TOUL
SA_1004,custom,Lauragais,stop_area,,,31130,1.53423130511658,43.586655062927974,"{""network"": ""Tisséo"", ""physical_mode"": ""3""}",network:Tisséo,"{""locality"": [{""id"": ""63"", ""name"": ""QUINT-FONSE
SA_1007,custom,Mayer,stop_area,,,31000,1.3954042541911866,43.54397616546114,"{""network"": ""Tisséo"", ""physical_mode"": ""3""}",network:Tisséo,"{""locality"": [{""id"": ""79"", ""name"": ""TOULOUSE""}],
SA_1008,custom,Françoise Dolto,stop_area,,,31000,1.3781796945667264,43.55555972591757,"{""network"": ""Tisséo"", ""physical_mode"": ""3""}",network:Tisséo,"{""locality"": [{""id"": ""79"", ""name"": ""TOUL
SA_1009,custom,Secteur A,stop_area,,,31700,1.3309088208015807,43.640006650717964,"{""network"": ""Tisséo"", ""physical_mode"": ""9""}",network:Tisséo,"{""locality"": [{""id"": ""20"", ""name"": ""CORNEBARR
SA_1010,custom,Cimetière Villeneuve,stop_area,,,31270,1.3692281473639352,43.52470437081928,"{""network"": ""Tisséo"", ""physical_mode"": ""3""}",network:Tisséo,"{""locality"": [{""id"": ""85"", ""name"": "
SA_1011,custom,Bellefontaine,stop_area,,,31000,1.3995556944383656,43.56633323874598,"{""network"": ""Tisséo"", ""physical_mode"": ""1, 10""}",network:Tisséo,"{""locality"": [{""id"": ""79"", ""name"": ""TO

Additional context

Autocomplete and search requests are fine.
We investigated and found that isCoarseReverse.js and isOnlyNonAdminLayers.js are experiencing some issues.
The list of non-coarse layers is hardcoded. Addition of our stop_area layer to the hardcoded list solved the issue.

We are novices to Pelias projects and require assistance in resolving it effectively. What is the approach to solving it in a generic manner?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions