Budget: 5000 UAH Deadline: 4 days
Hello. I am working on geocoding/reverse geocoding, OSM (Nominatim), and Mapbox, as well as in a normal "admin panel" through polygons (PostGIS / point-in-polygon), which is why "shifts" to another area/out of town stop occurring.
According to your description, the problem is typical: you are trying to get the district/city from the geocoder's response (or reverse) — and this is heuristic, which is why 10-15% of points will always be incorrect, especially at borders and with incomplete addresses. The universal solution is to separate the tasks:
address → coordinates (forward geocoding),
coordinates → city/district (strictly by polygons, point-in-polygon), not "as returned by the geocoder." To assess the volume and propose an exact solution, I need:
10-20 examples of "departed" objects: original address/city + coordinates where it currently places them;
which cities/countries, and what data is guaranteed to be available for the card (city? district? postal code?);
where you store the data and what you use to draw the map (PostGIS available/not available, front-end stack).
After this, I will provide a work plan by stages and make a fix so that the address/city/district is determined as stably and reproducibly as possible, without manual drawing for each city.