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

Cannot query custom data after successful import #26

Closed
woiza opened this issue Apr 20, 2019 · 2 comments · Fixed by #37
Closed

Cannot query custom data after successful import #26

woiza opened this issue Apr 20, 2019 · 2 comments · Fixed by #37

Comments

@woiza
Copy link

woiza commented Apr 20, 2019

I imported the following csv file (extract):

name,address,source,layer,lat,lon
AD,AD,custom,postalcode,42.5357,1.5571
AR,36,custom,postalcode,-25.0178,-59.6472
AR,41,custom,postalcode,-26.883,-65.1956
AR,44,custom,postalcode,-25.0513,-65.2488
AR,45,custom,postalcode,-23.5455,-64.0472
AR,46,custom,postalcode,-23.2252,-65.5236
BD,55,custom,postalcode,26.1669,89.1228
BD,53,custom,postalcode,26.0142,88.9168
BD,50,custom,postalcode,25.9689,88.6808

The idea is to have 2 digit postalcodes of all countries (I used geonames' csv file for this). How can I query the api to get the coordinates for a 2 digit postalcode in a country?

orangejulius added a commit that referenced this issue May 16, 2019
This ties into the new documentation for the API in
pelias/api#1297 for functionality originally
added in pelias/api#1131.

Fixes #36
Fixes #26
@orangejulius
Copy link
Member

Hey @woiza,
Sorry about that, and thanks for reporting this. There's an extra configuration step required for custom data that wasn't well documented. I just opened pelias/api#1297 and #37 to fix it. Can you take a look at those PRs and tell me if the explanations are clear?

Thanks!

@woiza
Copy link
Author

woiza commented May 17, 2019

Hi @orangejulius
Should be fine now. I added the following to my pelias config:

"api": {
"targets": {
"canonical_sources": [
"whosonfirst",
"openstreetmap",
"openaddresses",
"geonames"
],
"layers_by_source": {
"geonames2d": [
"country",
"postalcode",
"source",
"layer"
],

Is there anything else I have to do?

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

Successfully merging a pull request may close this issue.

2 participants