Coder Social home page Coder Social logo

Comments (6)

missinglink avatar missinglink commented on June 29, 2024 1

I guess it's not possible easily ?

It would be trivial to implement using something like PostGIS but difficult to implement with Elasticsearch.

It's been requested before but unfortunately I don't think we would consider adding it, we don't want to be offering general GIS query functionality better suited to a RDBMS.

from pelias.

missinglink avatar missinglink commented on June 29, 2024

Hi @stouch, postal codes are assigned to addresses, not localities.

In the case of Lille, it has many postcodes such as 59000, 59350, 59130 etc.

If you search for an address within Lille you will get the postcode if we have it, for instance:
https://pelias.github.io/compare/#/v1/place?ids=openaddresses%3Aaddress%3Afr%2Fcountrywide%3A3e9871c9baaee154

from pelias.

missinglink avatar missinglink commented on June 29, 2024

If you're interested in having a look at the postalcode coverage in France, we offer free downloads of the boundary data in Shapefile format which you can open in a desktop software GIS program such as QGIS:

https://geocode.earth/data/whosonfirst#FR

Screenshot 2023-06-23 at 11 34 42 Screenshot 2023-06-23 at 11 34 27

from pelias.

stouch avatar stouch commented on June 29, 2024

Hi @stouch, postal codes are assigned to addresses, not localities.

In the case of Lille, it has many postcodes such as 59000, 59350, 59130 etc.

If you search for an address within Lille you will get the postcode if we have it, for instance: https://pelias.github.io/compare/#/v1/place?ids=openaddresses%3Aaddress%3Afr%2Fcountrywide%3A3e9871c9baaee154

I'd love to get any trick to list all the postal codes of a locality, using only whosonfirst (and/or geonames) only.

I guess it's not possible easily ?

from pelias.

stouch avatar stouch commented on June 29, 2024

#887 #856 #111 GIScience/openrouteservice#1163

from pelias.

Joxit avatar Joxit commented on June 29, 2024

Hi there, sorry for the hijack, we did a special API some time ago for this special use case in France, Belgium, Italy and Switzerland. It was supposed to be a temporary solution until an integration in pelias.

GET https://api.jawg.io/postalcode/api/postalcode?city=lille&access-token=
[
  {
    "postalcode": "2275",
    "country": "BE"
  },
  {
    "postalcode": "59160",
    "country": "FR"
  },
  {
    "postalcode": "59000",
    "country": "FR"
  },
  {
    "postalcode": "59777",
    "country": "FR"
  },
  {
    "postalcode": "59260",
    "country": "FR"
  },
  {
    "postalcode": "59800",
    "country": "FR"
  }
]

The other solution, is by using two calls, one with search/autocomplete with your city and the second one a reverse geocoding (postalcode are available in reverse geocoding in Jawg APIs), this is the best solution IMO.

from pelias.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.