Open fmendezh opened 4 years ago
SELECT gid_0, gid_1, gid_2, gid_3, name_0, name_1, name_2, name_3 FROM gadm3 ORDER BY gid_0, gid_1, gid_2, gid_3;
That is all the data, including places without subdivisions as far as level 3 (e.g. Antarctica has no divisions).
For the GIDs, a prefix search is correct. For names, I think a tokenized search is better, so "London" matches "Greater London" and "Congo" matches "Democratic Republic of the Congo" as well as "Republic of Congo".
We can add any indexes or special index columns that are required to PostgreSQL, I don't think we need ES or SOLR for this. Or, the webservice could just read in the values when it starts up.
We can add any indexes or special index columns that are required to PostgreSQL, I don't think we need ES or SOLR for this. Or, the webservice could just read in the values when it starts up.
I agree, this will be a backed by PostgresQL only
We should also design the API bearing in mind other requested endpoints, like GeoJSON polygons, MVTs of layer polygons etc.
This branch contains an initial proposal for the functionalities described in this issue https://github.com/gbif/geocode/tree/gadm-search-8
The GBIF Portal, and probably external services, need to query the catalog of GADM names and identifiers.
Initially, the following needs have been identified:
The structure of the services listed above are only suggestions, this shouldn't be used as a design specification.
@MattBlissett can help with the SQL queries needed to support those services.