# Geolocate a city automatically

**URL:** <https://community.glideapps.com/t/geolocate-a-city-automatically/40262>\
**Category:** Community Resources\
**Created:** [March 30, 2022, 4:31pm UTC](https://community.glideapps.com/t/geolocate-a-city-automatically/40262 "2022-03-30T16:31:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![profxeni](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/profxeni/32/24656_2.png) [@profxeni](https://community.glideapps.com/u/profxeni)\
**Post date:** [March 30, 2022, 4:31pm UTC](https://community.glideapps.com/t/geolocate-a-city-automatically/40262/1 "2022-03-30T16:31:01Z")

</div>

Greetings to all. I have a curiosity that could be interesting for many of us: have any of you had the opportunity to geolocate a city automatically, knowing latitude and longitude, as, for example, the weather services do? Let me explain better: we have the possibility to activate this service from Glide and it returns in column lat and long. Knowing these values, we need a procedure that can find the corresponding city. Has anyone already experimented with some solutions?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 30, 2022, 11:45pm UTC](https://community.glideapps.com/t/geolocate-a-city-automatically/40262/2 "2022-03-30T23:45:24Z")

</div>

Yep! Been able to do this using fetch column:

> [@Fetch Column](https://community.glideapps.com/t/fetch-column/31731/13):
>
> As promised: [[Glide: Fetch Column] ](https://www.youtube.com/watch?v=oWrs8bRNyS4)

---

<div class="post-metadata">

**Author:** ![profxeni](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/profxeni/32/24656_2.png) [@profxeni](https://community.glideapps.com/u/profxeni)\
**Post date:** [April 1, 2022, 1:36pm UTC](https://community.glideapps.com/t/geolocate-a-city-automatically/40262/3 "2022-04-01T13:36:38Z")

</div>

Thanks, @Robert_Petitto, as always very helpful. I will try this method that you brilliantly illustrated in your video.

---

<div class="post-metadata">

**Author:** ![profxeni](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/profxeni/32/24656_2.png) [@profxeni](https://community.glideapps.com/u/profxeni)\
**Post date:** [April 1, 2022, 2:20pm UTC](https://community.glideapps.com/t/geolocate-a-city-automatically/40262/4 "2022-04-01T14:20:59Z")

</div>

Hi @Robert_Petitto , I just tried the procedure, first as you performed it, then with Reverse, because I was interested in the procedure that retrieves the city for me, but it returns the INVALID JSON error. Do you know why?  
Thanks

Okay, I answered my own question. I used the test found in glide and from this example link - [https://nominatim.geocoding.ai/reverse.php?lat=41.884122&lon=13.095391&zoom=10&format=jsonv2](https://nominatim.geocoding.ai/reverse.php?lat=41.884122&lon=13.095391&zoom=10&format=jsonv2) -  
I found the city with: .address.village!  
Thanks for everything 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [April 2, 2022, 2:21pm UTC](https://community.glideapps.com/t/geolocate-a-city-automatically/40262/5 "2022-04-02T14:21:31Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
