{"id":4864,"date":"2018-03-22T06:37:43","date_gmt":"2018-03-22T13:37:43","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=4864"},"modified":"2025-06-13T23:43:11","modified_gmt":"2025-06-14T06:43:11","slug":"geospatial-queries-using-python-search-cities","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/ko\/geospatial-queries-using-python-search-cities\/","title":{"rendered":"\uc9c0\ub9ac\uacf5\uac04 \ucffc\ub9ac: Python\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub3c4\uc2dc \uac80\uc0c9\ud558\uae30"},"content":{"rendered":"<h3><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4863\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/16665891_10211247083188500_2291386332147570222_o.jpg\" alt=\"16665891 10211247083188500 2291386332147570222 o\" width=\"247\" height=\"247\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o.jpg 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-300x300.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-1024x1024.jpg 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-150x150.jpg 150w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-768x768.jpg 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-65x65.jpg 65w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-50x50.jpg 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-20x20.jpg 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o-1320x1320.jpg 1320w\" sizes=\"auto, (max-width: 247px) 100vw, 247px\" \/><\/h3>\n<p>\ub2e4\ub2c8\uc5d8 \uc548\ucfe0\ud0c0\ub294 \ub2e4\ub144\uac04 \ub2e4\uc591\ud55c \uae30\uc220\uc744 \uc0ac\uc6a9\ud574 \uc628 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc5d4\uc9c0\ub2c8\uc5b4\uc785\ub2c8\ub2e4. \uadf8\ub294 '\ud30c\uc774\uc36c\uc758 \uc120'\uc758 \uc5f4\ub82c\ud55c \ud32c\uc73c\ub85c, \ucf54\ub4dc\ubfd0\ub9cc \uc544\ub2c8\ub77c \uc0ac\uc0dd\ud65c\uc5d0\ub3c4 \uc801\uc6a9\ud558\ub824\uace0 \ub178\ub825\ud569\ub2c8\ub2e4. \ud2b8\uc704\ud130\uc5d0\uc11c \uadf8\ub97c \ub9cc\ub0a0 \uc218 \uc788\uc2b5\ub2c8\ub2e4: <u><a href=\"https:\/\/twitter.com\/daniel_ancuta\" target=\"_blank\" rel=\"noopener noreferrer\">\ub2e4\ub2c8\uc5d8_\uc548\ucfe0\ud0c0<\/a><\/u><\/p>\n<h2><strong>\uc9c0\ub9ac\uacf5\uac04 \ucffc\ub9ac: Python\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub3c4\uc2dc \uac80\uc0c9\ud558\uae30<\/strong><\/h2>\n<p>\uc704\uce58 \uc815\ubcf4\ub294 \uc6b0\ub9ac\uac00 \ucef4\ud4e8\ud130\uc640 \uc0c1\ud638\uc791\uc6a9\ud558\ub294 \uac70\uc758 \ubaa8\ub4e0 \uce21\uba74\uc5d0\uc11c \ub9e4\uc77c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \uc704\uce58\ub97c \uae30\ubc18\uc73c\ub85c \ub9de\ucda4\ud615 \uc54c\ub9bc\uc744 \ubcf4\ub0b4\ub824\ub294 \uc6f9\uc0ac\uc774\ud2b8, \ucd5c\ub2e8 \uacbd\ub85c\ub97c \ubcf4\uc5ec\uc8fc\ub294 \uc9c0\ub3c4, \ubc29\ubb38\ud55c \uc7a5\uc18c\ub97c \ud655\uc778\ud558\ub294 \ubc31\uadf8\ub77c\uc6b4\ub4dc\uc5d0\uc11c \uc2e4\ud589 \uc911\uc778 \uc791\uc5c5 \ub4f1 \ubaa8\ub4e0 \uacf3\uc5d0\uc11c \uc704\uce58 \uc815\ubcf4\uac00 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/p>\n<p>\uc624\ub298 \uc18c\uac1c\ud574\ub4dc\ub9b4 \ub0b4\uc6a9\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.1\/fts\/fts-geospatial-queries.html\" target=\"_blank\" rel=\"noopener noreferrer\">\uc9c0\ub9ac\uacf5\uac04 \ucffc\ub9ac<\/a><\/u>\u00a0\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.1\/fts\/fts-geospatial-queries.html\" target=\"_blank\" rel=\"noopener noreferrer\">\uc9c0\ub9ac\uacf5\uac04 \ucffc\ub9ac<\/a><\/u>\u00a0\ub97c \uc0ac\uc6a9\ud558\uba74 \uc9c0\ub9ac\uc801 \uc704\uce58\ub97c \uae30\uc900\uc73c\ub85c \ubb38\uc11c\ub97c \uac80\uc0c9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ud568\uaed8 \ud30c\uc774\uc36c\uc5d0\uc11c \ub2e4\uc74c\uc744 \uc0ac\uc6a9\ud558\ub294 \ub3c4\uad6c\ub97c \uc791\uc131\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.1\/fts\/fts-geospatial-queries.html\" target=\"_blank\" rel=\"noopener noreferrer\">\uc9c0\ub9ac\uacf5\uac04 \ucffc\ub9ac<\/a><\/u>\u00a0\uc640 \ud568\uaed8 <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/fts\/fts-query-types.html\" target=\"_blank\" rel=\"noopener noreferrer\">Couchbase REST API<\/a><\/u>\u00a0\uadf8\ub9ac\uace0 <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/fts\/full-text-intro.html\" target=\"_blank\" rel=\"noopener noreferrer\">\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \uc804\uccb4 \ud14d\uc2a4\ud2b8 \uac80\uc0c9<\/a><\/u>\ub97c \ud074\ub9ad\ud558\uba74 \ub3c4\uc2dc \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uac80\uc0c9\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub429\ub2c8\ub2e4.<\/p>\n<h2><strong>\uc804\uc81c \uc870\uac74<\/strong><\/h2>\n<h3><strong>\uc885\uc18d\uc131<\/strong><\/h3>\n<p>\uc774 \ubb38\uc11c\uc5d0\uc11c\ub294 \ub2e4\uc74c\uc744 \uc0ac\uc6a9\ud588\uc2b5\ub2c8\ub2e4. <a href=\"https:\/\/www.couchbase.com\/blog\/ko\/downloads\/\">\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \uc5d4\ud130\ud504\ub77c\uc774\uc988 \uc5d0\ub514\uc158<\/a> 5.1.0 \ube4c\ub4dc 5552 \ubc0f <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/sdk\/python\/start-using-sdk.html\">Python<\/a> 3.6.4.<\/p>\n<p>\uc774 \ubb38\uc11c\uc758 \uc2a4\ub2c8\ud3ab\uc744 \uc2e4\ud589\ud558\ub824\uba74 pip\ub97c \ud1b5\ud574 Couchbase 2.3(\uc800\ub294 2.3.4\ub97c \uc0ac\uc6a9 \uc911\uc785\ub2c8\ub2e4)\uc744 \uc124\uce58\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<h3><strong>\uce74\uc6b0\uce58\ubca0\uc774\uc2a4<\/strong><\/h3>\n<ol>\n<li>\ub3c4\uc2dc \ubc84\ud0b7 \ub9cc\ub4e4\uae30<\/li>\n<li>\uc9c0\uc624\ud3ec\uc778\ud2b8 \uc720\ud615\uc758 \uc9c0\ub9ac\uc801 \ud544\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub3c4\uc2dc \uac80\uc0c9\uc744 \ub9cc\ub4ed\ub2c8\ub2e4. \uc774\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \ub0b4\uc6a9\uc740 <u><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.1\/fts\/fts-creating-indexes.html\" target=\"_blank\" rel=\"noopener noreferrer\">\ud558\uc704 \ud544\ub4dc \uc0bd\uc785<\/a><\/u>\u00a0\ubb38\uc11c\uc758 \uc77c\ubd80\uc785\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p>\uc544\ub798 \uc774\ubbf8\uc9c0\uc640 \uac19\uc774 \ud45c\uc2dc\ub418\uc5b4\uc57c \ud569\ub2c8\ub2e4:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"1244\" class=\"wp-image-4862\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/image_1.png\" alt=\"image 1\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/image_1.png 1600w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/image_1-300x233.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/image_1-1024x796.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/image_1-768x597.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/image_1-1536x1194.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/image_1-20x16.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/image_1-1320x1026.png 1320w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<h2><strong>Couchbase\uc5d0 \ub370\uc774\ud130 \ucc44\uc6b0\uae30<\/strong><\/h2>\n<p>\uc6b0\uc120, \uc6b4\ub3d9\uc5d0 \ud544\uc694\ud55c \ub370\uc774\ud130\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \ub2e4\uc74c\uc758 \ub3c4\uc2dc \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc0ac\uc6a9\ud560 \uac83\uc785\ub2c8\ub2e4. <u><a href=\"https:\/\/www.geonames.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">geonames.org<\/a><\/u>.<\/p>\n<p>\uc9c0\uc624\ub124\uc784\uc5d0\ub294 \ub3c4\uc2dc \ubaa9\ub85d\uacfc \uc6b0\ud3b8\ubc88\ud638 \ubaa9\ub85d\uc774\ub77c\ub294 \ub450 \uac00\uc9c0 \uc8fc\uc694 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uac00 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ubaa8\ub450 \uad6d\uac00\ubcc4\ub85c \uc774\ub984, \uc88c\ud45c, \uc778\uad6c, \uc2dc\uac04\ub300, \uad6d\uac00 \ucf54\ub4dc \ub4f1\uc758 \ud574\ub2f9 \uc815\ubcf4\uac00 \ud3ec\ud568\ub41c \uad6d\uac00\ubcc4\ub85c \uadf8\ub8f9\ud654\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \ub458 \ub2e4 CSV \ud615\uc2dd\uc785\ub2c8\ub2e4.<\/p>\n<p>\uc774 \uc5f0\uc2b5\uc5d0\uc11c\ub294 \ub3c4\uc2dc \ubaa9\ub85d\uc744 \uc0ac\uc6a9\ud558\uaca0\uc2b5\ub2c8\ub2e4. \uc800\ub294 <u><a href=\"https:\/\/download.geonames.org\/export\/dump\/PL.zip\" target=\"_blank\" rel=\"noopener noreferrer\">PL.zip<\/a><\/u>\u00a0\uc5d0\uc11c \uc6d0\ud558\ub294 \uac83\uc744 \uc790\uc720\ub86d\uac8c \uc120\ud0dd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. <u><a href=\"https:\/\/download.geonames.org\/export\/dump\/\" target=\"_blank\" rel=\"noopener noreferrer\">\ub3c4\uc2dc \ubaa9\ub85d<\/a><\/u>.<\/p>\n<h3><strong>\ub370\uc774\ud130 \ubaa8\ub378<\/strong><\/h3>\n<p>\ub3c4\uc2dc \ud074\ub798\uc2a4\ub294 \uc804\uccb4 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uc0ac\uc6a9\ud560 \ub2e8\uc77c \ub3c4\uc2dc\uc758 \ud45c\ud604\uc774 \ub420 \uac83\uc785\ub2c8\ub2e4. \uc774\ub97c \ubaa8\ub378\ub85c \ucea1\uc290\ud654\ud568\uc73c\ub85c\uc368 API\ub97c \ud1b5\ud569\ud558\uace0 \ubcc0\uacbd\ub420 \uc218 \uc788\ub294 \ud0c0\uc0ac \ub370\uc774\ud130 \uc18c\uc2a4(\uc608: CSV \ud30c\uc77c)\uc5d0 \uc758\uc874\ud560 \ud544\uc694\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub300\ubd80\ubd84\uc758 \uc2a4\ub2c8\ud3ab\uc740 (\ub2ec\ub9ac \uba85\uc2dc\ub418\uc9c0 \uc54a\ub294 \ud55c) core.py \ud30c\uc77c\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \ub530\ub77c\uc11c \uc804\uccb4 \ub0b4\uc6a9\uc744 \ub36e\uc5b4\uc4f0\uc9c0 \ub9d0\uace0 \uc5c5\ub370\uc774\ud2b8(\ud2b9\ud788 \uc0c8 \uac00\uc838\uc624\uae30\ub97c \ucd94\uac00\ud560 \ub54c)\ud558\ub294 \uac83\uc744 \uc78a\uc9c0 \ub9c8\uc138\uc694.<\/p>\n<pre class=\"lang:default decode:true\"># core.py\r\nclass City:\r\n   def __init__(self, geonameid, feature_class, name, population, lat, lon):\r\n       self.geonameid = geonameid\r\n       self.feature_class = feature_class\r\n       self.name = name\r\n       self.population = population\r\n       self.lat = lat\r\n       self.lon = lon\r\n\r\n   @classmethod\r\n   def from_csv_row(cls, row):\r\n       return cls(row[0], row[7], row[1], row[12], row[4], row[5])<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>\ub3c4\uc2dc\ub97c \ucc98\ub9ac\ud558\ub294 CSV \ubc18\ubcf5\uae30<\/strong><\/h3>\n<p>\ubaa8\ub378 \ud074\ub798\uc2a4\uac00 \uc788\uc73c\ubbc0\ub85c \uc774\uc81c CSV \ud30c\uc77c\uc5d0\uc11c \ub3c4\uc2dc\ub97c \uc77d\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub418\ub294 \uc774\ud130\ub808\uc774\ud130\ub97c \uc900\ube44\ud560 \ucc28\ub840\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"lang:default decode:true\"># core.py\r\nimport csv\r\nfrom collections import Iterator\r\n\r\nclass CitiesCsvIterator(Iterator):\r\n   def __init__(self, path):\r\n       self._path = path\r\n       self._fp = None\r\n       self._csv_reader = None\r\n\r\n   def __enter__(self):\r\n       self._fp = open(self._path, 'r')\r\n       self._csv_reader = csv.reader(self._fp, delimiter='\\t')\r\n\r\n       return self\r\n\r\n   def __exit__(self, exc_type, exc_val, exc_tb):\r\n       self._fp.close()\r\n\r\n   def __next__(self):\r\n       return City.from_csv_row(next(self._csv_reader))\r\n<\/pre>\n<h3><strong>\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ubc84\ud0b7\uc5d0 \ub3c4\uc2dc \uc0bd\uc785\ud558\uae30<\/strong><\/h3>\n<p>\ub3c4\uc2dc\ub97c \ud45c\ud604\ud558\ub294 \ubc29\uc2dd\uc744 \ud1b5\ud569\ud588\uc73c\uba70, csv \ud30c\uc77c\uc5d0\uc11c \ub3c4\uc2dc\ub97c \uc77d\ub294 \uc774\ud130\ub808\uc774\ud130\uac00 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc774\uc81c \uc774 \ub370\uc774\ud130\ub97c \uae30\ubcf8 \ub370\uc774\ud130 \uc18c\uc2a4\uc5d0 \ub123\uc744 \ucc28\ub840\uc785\ub2c8\ub2e4, <u><a href=\"https:\/\/www.couchbase.com\/blog\/ko\/\" target=\"_blank\" rel=\"noopener noreferrer\">\uce74\uc6b0\uce58\ubca0\uc774\uc2a4<\/a><\/u>.<\/p>\n<pre class=\"lang:default decode:true\"># core.py\r\nimport logging\r\nimport sys\r\nfrom couchbase.cluster import Cluster, PasswordAuthenticator\r\n\r\n\r\nlogger = logging.getLogger()\r\nlogger.setLevel(logging.DEBUG)\r\nlogger.addHandler(logging.StreamHandler(sys.stdout))\r\n\r\n\r\ndef get_bucket(username, password, connection_string='couchbase:\/\/localhost'):\r\n   cluster = Cluster(connection_string)\r\n   authenticator = PasswordAuthenticator(username, password)\r\n   cluster.authenticate(authenticator)\r\n\r\n   return cluster.open_bucket('cities')\r\n\r\n\r\nclass CitiesService:\r\n   def __init__(self, bucket):\r\n       self._bucket = bucket\r\n\r\n   def load_from_csv(self, path):\r\n       with CitiesCsvIterator(path) as cities_iterator:\r\n           for city in cities_iterator:\r\n               if city.feature_class not in ('PPL', 'PPLA', 'PPLA2', 'PPLA3',\r\n                                             'PPLA4', 'PPLC'):\r\n                   continue\r\n\r\n               logger.info(f'Inserting {city.geonameid}')\r\n               self._bucket.upsert(\r\n                   city.geonameid,\r\n                   {\r\n                       'name': city.name,\r\n                       'feature_class': city.feature_class,\r\n                       'population': city.population,\r\n                       'geo': {'lat': float(city.lat),\r\n                               'lon': float(city.lon)}\r\n                   }\r\n               )\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\uc9c0\uae08\uae4c\uc9c0 \uc791\uc131\ud55c \ubaa8\ub4e0 \ub0b4\uc6a9\uc774 \uc81c\ub300\ub85c \uc791\ub3d9\ud558\ub294\uc9c0 \ud655\uc778\ud558\uae30 \uc704\ud574 CSV \ucf58\ud150\uce20\ub97c Couchbase\uc5d0 \ub85c\ub4dc\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"lang:default decode:true\"># core.py\r\n\r\nbucket = get_bucket('admin', 'test123456')\r\ncities_service = CitiesService(bucket)\r\ncities_service.load_from_csv('~\/directory-with-cities\/PL\/PL.txt', bucket)<\/pre>\n<p>&nbsp;<\/p>\n<p>\uc774 \uc2dc\uc810\uc5d0\uc11c Couchbase \ubc84\ud0b7\uc5d0 \ub3c4\uc2dc\uac00 \ub85c\ub4dc\ub418\uc5b4 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. \uc18c\uc694 \uc2dc\uac04\uc740 \uc120\ud0dd\ud55c \uad6d\uac00\uc5d0 \ub530\ub77c \ub2e4\ub985\ub2c8\ub2e4.<\/p>\n<h2><strong>\ub3c4\uc2dc \uac80\uc0c9<\/strong><\/h2>\n<p>\ub370\uc774\ud130\ub85c \ubc84\ud0b7\uc744 \uc900\ube44\ud588\uc73c\ub2c8 \uc774\uc81c CitiesService\ub85c \ub3cc\uc544\uc640\uc11c \ub3c4\uc2dc \uac80\uc0c9\uc5d0 \ub3c4\uc6c0\uc774 \ub420 \uba87 \uac00\uc9c0 \ubc29\ubc95\uc744 \uc900\ube44\ud560 \ucc28\ub840\uc785\ub2c8\ub2e4.<\/p>\n<p>\ud558\uc9c0\ub9cc \uc2dc\uc791\ud558\uae30 \uc804\uc5d0 \ub2e4\uc74c \uba54\uc11c\ub4dc\ub97c \ucd94\uac00\ud558\uc5ec City \ud074\ub798\uc2a4\ub97c \uc57d\uac04 \uc218\uc815\ud574\uc57c \ud569\ub2c8\ub2e4:<\/p>\n<pre class=\"lang:default decode:true\"># core.py\r\n\r\n@classmethod\r\ndef\u00a0from_couchbase_dict(cls, row):\r\nfields =\u00a0row['fields']\r\n\r\nreturn\u00a0cls(row['id'],\r\nfields['feature_class'],\r\nfields['name'],\r\nfields['population'],\r\nfields['geo'][1],\r\nfields['geo'][0])\r\n\r\n<\/pre>\n<p>\uc774\uac83\uc774 CitiesService\uc5d0\uc11c \uad6c\ud604\ud560 \ubc29\ubc95\uc758 \ubaa9\ub85d\uc785\ub2c8\ub2e4:<\/p>\n<ul>\n<li>get_by_name(name, limit=10)\uc740 \uc774\ub984\ubcc4\ub85c \ub3c4\uc2dc\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/li>\n<li>get_by_coordinates(lat, long), \uc88c\ud45c\ub85c \ub3c4\uc2dc\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/li>\n<li>get_nearest_to_city(city, distance='10', unit='km', limit=10)\ub294 \uac00\uc7a5 \uac00\uae4c\uc6b4 \ub3c4\uc2dc\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3><strong>get_by_name<\/strong><\/h3>\n<pre class=\"lang:default decode:true\"># core.py\r\nfrom\u00a0couchbase.fulltext import\u00a0TermQuery\r\n\r\nINDEX_NAME\u00a0=\u00a0'cities'\r\n\r\ndef\u00a0get_by_name(self, name, limit=10):\r\nresult =\u00a0self._bucket.search(self.INDEX_NAME,\r\nTermQuery(name.lower(), field='name'),\r\nlimit=limit,\r\nfields='*')\r\n\r\nfor\u00a0c_city in\u00a0result:\r\nyield\u00a0City.from_couchbase_dict(c_city)<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>get_by_coordinates<\/strong><\/h3>\n<pre class=\"lang:default decode:true\"># core.py\r\nfrom\u00a0couchbase.fulltext import\u00a0GeoDistanceQuery\r\n\r\nINDEX_NAME\u00a0=\u00a0'cities'\r\n\r\ndef\u00a0get_by_coordinates(self, lat, lon):\r\nresult =\u00a0self._bucket.search(self.INDEX_NAME,\r\nGeoDistanceQuery('1km', (lon, lat)),\r\nfields='*')\r\n\r\nfor\u00a0c_city in\u00a0result:\r\nyield\u00a0City.from_couchbase_dict(c_city)<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>get_nearest_to_city<\/strong><\/h3>\n<pre class=\"lang:default decode:true\"># core.py\r\nfrom\u00a0couchbase.fulltext import\u00a0RawQuery, SortRaw\r\n\r\nINDEX_NAME\u00a0=\u00a0'cities'\r\n\r\ndef\u00a0get_nearest_to_city(self, city, distance='10', unit='km', limit=10):\r\nquery =\u00a0RawQuery({\r\n'location': {\r\n'lon': city.lon,\r\n'lat': city.lat\r\n},\r\n'distance': str(distance) +\u00a0unit,\r\n'field': 'geo'\r\n\r\n})\r\nsort =\u00a0SortRaw([{\r\n'by': 'geo_distance',\r\n'field': 'geo',\r\n'unit': unit,\r\n'location': {\r\n'lon': city.lon,\r\n'lat': city.lat\r\n}\r\n}])\r\n\r\nresult =\u00a0self._bucket.search(self.INDEX_NAME,\r\nquery,\r\nsort=sort,\r\nfields='*',\r\nlimit=limit)\r\n\r\nfor\u00a0c_city in\u00a0result:\r\nyield\u00a0City.from_couchbase_dict(c_city)\r\n\r\n<\/pre>\n<p>\uc774 \uc608\uc81c\uc5d0\uc11c \uc54c \uc218 \uc788\ub4ef\uc774 RawQuery\uc640 SortRaw \ud074\ub798\uc2a4\ub97c \uc0ac\uc6a9\ud588\uc2b5\ub2c8\ub2e4. \uc548\ud0c0\uae5d\uac8c\ub3c4 couchbase-python-client API\ub294 \ucd5c\uc2e0 Couchbase \ubc0f \uc9c0\uc5ed \uac80\uc0c9\uc5d0\uc11c \uc81c\ub300\ub85c \uc791\ub3d9\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n<h2><strong>\ud638\ucd9c \ubc29\ubc95<\/strong><\/h2>\n<p>\uc774\uc81c \ubaa8\ub4e0 \uba54\uc18c\ub4dc\uac00 \uc900\ube44\ub418\uc5c8\uc73c\ubbc0\ub85c \ud638\ucd9c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4!<\/p>\n<pre class=\"lang:default decode:true\"># core.py\r\n\r\nbucket =\u00a0get_bucket('admin', 'test123456')\r\n\r\ncities_service =\u00a0CitiesService(bucket)\r\n# cities_service.load_from_csv('\/my-path\/PL\/PL.txt')\r\n\r\nprint('get_by_name')\r\ncities =\u00a0cities_service.get_by_name('Pozna\u0144')\r\nfor\u00a0city in\u00a0cities:\r\nprint(city.__dict__)\r\n\r\nprint('get_by_coordinates')\r\ncities =\u00a0cities_service.get_by_coordinates(52.40691997632544,\r\n16.929929926276657)\r\nfor\u00a0city in\u00a0cities:\r\nprint(city.__dict__)\r\n\r\nprint('get_nearest_to_city')\r\ncities =\u00a0cities_service.get_nearest_to_city(city)\r\nfor\u00a0city in\u00a0cities:\r\nprint(city.__dict__)<\/pre>\n<h2><strong>\uc774\uc81c \uc5b4\ub514\ub85c \uac00\uc57c \ud558\ub098\uc694?<\/strong><\/h2>\n<p>\uc774 \uc18c\uac1c\ub97c \ud1b5\ud574 \ub354 \ubc1c\uc804\ub41c \uc791\uc5c5\uc744 \ud560 \uc218 \uc788\uc744 \uac83\uc774\ub77c \ubbff\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uba87 \uac00\uc9c0 \ud560 \uc218 \uc788\ub294 \uc77c\uc774 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>\ubaa8\ub4e0 \uad6d\uac00\uc758 \ubaa8\ub4e0 \ub3c4\uc2dc\ub97c \ub85c\ub4dc\ud558\ub824\uba74 \uc131\ub2a5\uc774 \uc88b\uc9c0 \uc54a\uc744 \uc218 \uc788\uc73c\ubbc0\ub85c \ub370\uc774\ud130\ub97c \ub85c\ub4dc\ud558\ub294 \ubc29\uc2dd\uc744 \uac1c\uc120\ud574\uc57c \ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<p>core.py\uc758 \uc804\uccb4 \ucf54\ub4dc\ub294 \ub2e4\uc74c\uc5d0\uc11c \ucc3e\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. <u><a href=\"https:\/\/gist.github.com\/whisller\/74b731270cd56937a6d821f6cbe773d9\" target=\"_blank\" rel=\"noopener noreferrer\">\uae43\ud5c8\ube0c \uc694\uc810<\/a><\/u>.<\/p>\n<p>\uad81\uae08\ud55c \uc810\uc774 \uc788\uc73c\uba74 \uc8fc\uc800\ud558\uc9c0 \ub9d0\uace0 \ud2b8\uc704\ud130\ub85c \ubb38\uc758\ud558\uc138\uc694. <u><a href=\"https:\/\/twitter.com\/daniel_ancuta\" target=\"_blank\" rel=\"noopener noreferrer\">\ub2e4\ub2c8\uc5d8_\uc548\ucfe0\ud0c0<\/a><\/u>.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><em>\uc774 \uac8c\uc2dc\ubb3c\uc740 <a href=\"https:\/\/www.couchbase.com\/blog\/ko\/community\/community-writers-program\/\" target=\"_blank\" rel=\"noopener noreferrer\">\ucee4\ubba4\ub2c8\ud2f0 \uae00\uc4f0\uae30 \ud504\ub85c\uadf8\ub7a8<\/a><\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Python\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub3c4\uc2dc \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uac80\uc0c9\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub420 Couchbase REST API \ubc0f Couchbase \uc804\uccb4 \ud14d\uc2a4\ud2b8 \uac80\uc0c9\uacfc \ud568\uaed8 \uc9c0\ub9ac\uacf5\uac04 \ucffc\ub9ac\ub97c \uc0ac\uc6a9\ud558\ub294 \ub3c4\uad6c\ub97c \ub9cc\ub4e4\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>","protected":false},"author":53,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816,8683,9139],"tags":[],"ppma_author":[9026],"class_list":["post-4864","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","category-geospatial","category-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Geospatial queries: Using Python to search cities - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"What are Geospatial queries? Check out how to write a tool in Python that uses geospatial queries\u00a0with Couchbase REST API\u00a0and Couchbase FullText Search.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/ko\/geospatial-queries-using-python-search-cities\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Geospatial queries: Using Python to search cities\" \/>\n<meta property=\"og:description\" content=\"What are Geospatial queries? Check out how to write a tool in Python that uses geospatial queries\u00a0with Couchbase REST API\u00a0and Couchbase FullText Search.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/ko\/geospatial-queries-using-python-search-cities\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-22T13:37:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T06:43:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1536\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Laura Czajkowski, Developer Community Manager, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Laura Czajkowski, Developer Community Manager, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/\"},\"author\":{\"name\":\"Laura Czajkowski, Developer Community Manager, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220\"},\"headline\":\"Geospatial queries: Using Python to search cities\",\"datePublished\":\"2018-03-22T13:37:43+00:00\",\"dateModified\":\"2025-06-14T06:43:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/\"},\"wordCount\":762,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Couchbase Server\",\"Geospatial\",\"Python\"],\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/\",\"name\":\"Geospatial queries: Using Python to search cities - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2018-03-22T13:37:43+00:00\",\"dateModified\":\"2025-06-14T06:43:11+00:00\",\"description\":\"What are Geospatial queries? Check out how to write a tool in Python that uses geospatial queries\u00a0with Couchbase REST API\u00a0and Couchbase FullText Search.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Geospatial queries: Using Python to search cities\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220\",\"name\":\"Laura Czajkowski, Developer Community Manager, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9deb07d5daaa00220534c31768bc4409\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g\",\"caption\":\"Laura Czajkowski, Developer Community Manager, Couchbase\"},\"description\":\"Laura Czajkowski is the Snr. Developer Community Manager at Couchbase overseeing the community. She\u2019s responsible for our monthly developer newsletter.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/ko\/author\/laura-czajkowski\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Geospatial queries: Using Python to search cities - The Couchbase Blog","description":"\uc704\uce58 \uae30\ubc18 \uc815\ubcf4 \ucffc\ub9ac\ub780 \ubb34\uc5c7\uc778\uac00\uc694? \ud30c\uc774\uc36c\uc5d0\uc11c Couchbase REST API \ubc0f Couchbase \uc804\uccb4 \ud14d\uc2a4\ud2b8 \uac80\uc0c9\uc73c\ub85c \uc704\uce58 \uae30\ubc18 \uc815\ubcf4 \ucffc\ub9ac\ub97c \uc0ac\uc6a9\ud558\ub294 \ub3c4\uad6c\ub97c \uc791\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uc54c\uc544\ubcf4\uc138\uc694.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/ko\/geospatial-queries-using-python-search-cities\/","og_locale":"ko_KR","og_type":"article","og_title":"Geospatial queries: Using Python to search cities","og_description":"What are Geospatial queries? Check out how to write a tool in Python that uses geospatial queries\u00a0with Couchbase REST API\u00a0and Couchbase FullText Search.","og_url":"https:\/\/www.couchbase.com\/blog\/ko\/geospatial-queries-using-python-search-cities\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-03-22T13:37:43+00:00","article_modified_time":"2025-06-14T06:43:11+00:00","og_image":[{"width":1536,"height":1536,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/16665891_10211247083188500_2291386332147570222_o.jpg","type":"image\/jpeg"}],"author":"Laura Czajkowski, Developer Community Manager, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Laura Czajkowski, Developer Community Manager, Couchbase","Est. reading time":"4\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/"},"author":{"name":"Laura Czajkowski, Developer Community Manager, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220"},"headline":"Geospatial queries: Using Python to search cities","datePublished":"2018-03-22T13:37:43+00:00","dateModified":"2025-06-14T06:43:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/"},"wordCount":762,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Couchbase Server","Geospatial","Python"],"inLanguage":"ko-KR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/","url":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/","name":"Geospatial queries: Using Python to search cities - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2018-03-22T13:37:43+00:00","dateModified":"2025-06-14T06:43:11+00:00","description":"\uc704\uce58 \uae30\ubc18 \uc815\ubcf4 \ucffc\ub9ac\ub780 \ubb34\uc5c7\uc778\uac00\uc694? \ud30c\uc774\uc36c\uc5d0\uc11c Couchbase REST API \ubc0f Couchbase \uc804\uccb4 \ud14d\uc2a4\ud2b8 \uac80\uc0c9\uc73c\ub85c \uc704\uce58 \uae30\ubc18 \uc815\ubcf4 \ucffc\ub9ac\ub97c \uc0ac\uc6a9\ud558\ub294 \ub3c4\uad6c\ub97c \uc791\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uc54c\uc544\ubcf4\uc138\uc694.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/geospatial-queries-using-python-search-cities\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Geospatial queries: Using Python to search cities"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8","description":"NoSQL \ub370\uc774\ud130\ubca0\uc774\uc2a4, Couchbase","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"\uce74\uc6b0\uce58\ubca0\uc774\uc2a4 \ube14\ub85c\uadf8","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220","name":"Laura Czajkowski, \uac1c\ubc1c\uc790 \ucee4\ubba4\ub2c8\ud2f0 \uad00\ub9ac\uc790, Couchbase","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9deb07d5daaa00220534c31768bc4409","url":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","caption":"Laura Czajkowski, Developer Community Manager, Couchbase"},"description":"\ub85c\ub77c \ucc60\ucf54\ube0c\uc2a4\ud0a4\ub294 \uce74\uc6b0\uce58\ubca0\uc774\uc2a4\uc758 Snr. \uac1c\ubc1c\uc790 \ucee4\ubba4\ub2c8\ud2f0 \ub9e4\ub2c8\uc800\ub85c \uce74\uc6b0\uce58\ubca0\uc774\uc2a4\uc758 \ucee4\ubba4\ub2c8\ud2f0\ub97c \ucd1d\uad04\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uadf8\ub140\ub294 \uc6d4\uac04 \uac1c\ubc1c\uc790 \ub274\uc2a4\ub808\ud130\ub97c \ub2f4\ub2f9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4.","url":"https:\/\/www.couchbase.com\/blog\/ko\/author\/laura-czajkowski\/"}]}},"authors":[{"term_id":9026,"user_id":53,"is_guest":0,"slug":"laura-czajkowski","display_name":"Laura Czajkowski, Developer Community Manager, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","author_category":"","last_name":"Czajkowski","first_name":"Laura","job_title":"","user_url":"","description":"\ub85c\ub77c \ucc60\ucf54\ube0c\uc2a4\ud0a4\ub294 \uce74\uc6b0\uce58\ubca0\uc774\uc2a4\uc758 Snr. \uac1c\ubc1c\uc790 \ucee4\ubba4\ub2c8\ud2f0 \ub9e4\ub2c8\uc800\ub85c \uce74\uc6b0\uce58\ubca0\uc774\uc2a4\uc758 \ucee4\ubba4\ub2c8\ud2f0\ub97c \ucd1d\uad04\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uadf8\ub140\ub294 \uc6d4\uac04 \uac1c\ubc1c\uc790 \ub274\uc2a4\ub808\ud130\ub97c \ub2f4\ub2f9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/4864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/users\/53"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/comments?post=4864"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/posts\/4864\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/media?parent=4864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/categories?post=4864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/tags?post=4864"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/ko\/wp-json\/wp\/v2\/ppma_author?post=4864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}