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

Adding São Paulo city project #256

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

feromes
Copy link

@feromes feromes commented Feb 24, 2021

Hi,

First of all, I'd like to congratulate you guys who drive this project as it is. It's incredible job.

I am working on a Pelias instance for São Paulo City and would like to share with you.

Actually, we have a test version running (http://geocodesampa.ddns.net/) and making a lot of improvement and new data sources every week.

We recently pulled 3,5 million Address on OpenAddresses and waiting for them to update our Pelias

Thanks,

@missinglink
Copy link
Member

Very nice thanks @feromes

@missinglink
Copy link
Member

Is this ready to be merged?

@feromes
Copy link
Author

feromes commented Aug 11, 2021

I am improving synonyms, because I've realized it's not working properly just changing the custom_*.txt files. I am gonna work on int next days and I'll update this pull request

@erdmanncross
Copy link

erdmanncross commented Sep 8, 2021

@feromes @missinglink did the synonyms work for you? I have a problem with this, I did the same as your pr but it doesn't respond correctly with the synonyms.
/v1/search?text=BRIG. FARIA LIMA 3732+SAo Paulo+SP+04538132+BRA&lang=pt-br&size=1

{
  "geocoding": {
    "version": "0.2",
    "attribution": "http://10.129.33.122:4000/attribution",
    "query": {
      "text": "BRIG. FARIA LIMA 3732 SAo Paulo SP 04538132 BRA",
      "size": 1,
      "private": false,
      "lang": {
        "name": "Portuguese",
        "iso6391": "pt",
        "iso6393": "por",
        "via": "querystring",
        "defaulted": false
      },
      "querySize": 20,
      "parser": "libpostal",
      "parsed_text": {
        "street": "brig. faria lima",
        "housenumber": "3732",
        "city": "sao paulo",
        "state": "sp",
        "postalcode": "04538132",
        "country": "bra"
      }
    },
    "engine": {
      "name": "Pelias",
      "author": "Mapzen",
      "version": "1.0"
    },
    "timestamp": 1631110754181
  },
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          -46.663713,
          -23.570533
        ]
      },
      "properties": {
        "id": "101965533",
        "gid": "whosonfirst:locality:101965533",
        "layer": "locality",
        "source": "whosonfirst",
        "source_id": "101965533",
        "country_code": "BR",
        "name": "São Paulo",
        "confidence": 0.6,
        "match_type": "fallback",
        "accuracy": "centroid",
        "country": "Brasil",
        "country_gid": "whosonfirst:country:85633009",
        "country_a": "BRA",
        "macroregion": "Sudeste",
        "macroregion_gid": "whosonfirst:macroregion:1511777411",
        "region": "São Paulo",
        "region_gid": "whosonfirst:region:85682041",
        "region_a": "SP",
        "county": "São Paulo",
        "county_gid": "whosonfirst:county:102062255",
        "localadmin": "Jardim Paulista",
        "localadmin_gid": "whosonfirst:localadmin:404567359",
        "locality": "São Paulo",
        "locality_gid": "whosonfirst:locality:101965533",
        "label": "São Paulo, Brasil"
      },
      "bbox": [
        -46.826199,
        -24.008431,
        -46.365084,
        -23.356293
      ]
    }
  ],
  "bbox": [
    -46.826199,
    -24.008431,
    -46.365084,
    -23.356293
  ]
}

/v1/search?text=FARIA%20LIMA%203732+SAo%20Paulo+SP+04538132+BRA&lang=pt-br&size=1

{
  "geocoding": {
    "version": "0.2",
    "attribution": "http://10.129.33.122:4000/attribution",
    "query": {
      "text": "FARIA LIMA 3732 SAo Paulo SP 04538132 BRA",
      "size": 1,
      "private": false,
      "lang": {
        "name": "Portuguese",
        "iso6391": "pt",
        "iso6393": "por",
        "via": "querystring",
        "defaulted": false
      },
      "querySize": 20,
      "parser": "libpostal",
      "parsed_text": {
        "street": "faria lima",
        "housenumber": "3732",
        "city": "sao paulo",
        "state": "sp",
        "postalcode": "04538132",
        "country": "bra"
      }
    },
    "engine": {
      "name": "Pelias",
      "author": "Mapzen",
      "version": "1.0"
    },
    "timestamp": 1631110847222
  },
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          -46.6817064,
          -23.5893038
        ]
      },
      "properties": {
        "id": "polyline:511979",
        "gid": "mixed:address:polyline:511979",
        "layer": "address",
        "source": "mixed",
        "source_id": "polyline:511979",
        "country_code": "BR",
        "name": "Avenida Brigadeiro Faria Lima 3732",
        "housenumber": "3732",
        "street": "Avenida Brigadeiro Faria Lima",
        "confidence": 0.8,
        "match_type": "interpolated",
        "accuracy": "point",
        "country": "Brasil",
        "country_gid": "whosonfirst:country:85633009",
        "country_a": "BRA",
        "macroregion": "Sudeste",
        "macroregion_gid": "whosonfirst:macroregion:1511777411",
        "region": "São Paulo",
        "region_gid": "whosonfirst:region:85682041",
        "region_a": "SP",
        "county": "São Paulo",
        "county_gid": "whosonfirst:county:102062255",
        "localadmin": "Jardim Paulista",
        "localadmin_gid": "whosonfirst:localadmin:404567359",
        "locality": "São Paulo",
        "locality_gid": "whosonfirst:locality:101965533",
        "neighbourhood": "Itaim Bibi",
        "neighbourhood_gid": "whosonfirst:neighbourhood:85766041",
        "label": "Avenida Brigadeiro Faria Lima 3732, São Paulo, Brasil"
      }
    }
  ],
  "bbox": [
    -46.6817064,
    -23.5893038,
    -46.6817064,
    -23.5893038
  ]
}

@missinglink
Copy link
Member

Synonyms are applied at index-time, so they will require a full re-index.
Did you drop and recreate the elasticsearch index?

@feromes
Copy link
Author

feromes commented Sep 8, 2021

Hi @erdmanncross,

Yes, it did! But I need to mount the volume on docker-compose.yml addressing your custom_street.txt on it like that:

...
  schema:
    image: pelias/schema:master
    container_name: pelias_schema
    user: "${DOCKER_USER}"
    volumes:
      - "./pelias.json:/code/pelias.json"
      - "./synonyms/custom_street.txt:/code/pelias/schema/synonyms/custom_street.txt
...

Take a look at our version of docker-compose https://github.com/geoinfo-smdu/pelias-docker/blob/master/projects/sao-paulo-city/docker-compose.yml

See you,

@erdmanncross
Copy link

Synonyms are applied at index-time, so they will require a full re-index.
Did you drop and recreate the elasticsearch index?

@feromes yes, I added custom_streets to the dockerfile
@missinglink now I understood why it wasn't working, I didn't recreate the indexes.
I will do this and test again

tks guys.

@missinglink
Copy link
Member

Hi, is this ready to merge?

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.

3 participants