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

Implemented batch geocoding, made the AddressInput's values Options, and renamed Components to AddressComponents #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Cosiamo
Copy link

@Cosiamo Cosiamo commented Mar 19, 2024

I wasn't able to add the "Fields" value in geocode batch because the documentation for batch geocoding don't explain how to pass it to the API. However, this can be easily implemented in a future update, if Geocodio updates their API docs. I had to add a new struct for batching because the returning json format is different.

Single Geocoding

{
  "input": {
    "address_components": {
     ...

Batch Geocoding

{
  "results": [
    {
      "query": "1109 N Highland St, Arlington VA",
      "response": {
        "input": {
          "address_components": {
           ...

The reason I made AddressInput's values Options is because if someone created an address parser to fill out a vector of AddressInput structs and one or two of the addresses' had weird formatting which didn't return a country or ZIP, it wouldn't return an error, instead just return a low accuracy score for those addresses.

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 this pull request may close these issues.

1 participant