{"url":"https://sakaik.hateblo.jp/entry/20260322/STX_ClosestPoint_func","width":"100%","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/sakaik/","blog_title":"sakaik\u306e\u65e5\u3005\u96d1\u611f\uff5e(T)\u7de8","provider_url":"https://hatena.blog","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/s/sakaik/20260222/20260222081750.png","blog_url":"https://sakaik.hateblo.jp/","categories":["mysql","gis","spatial","newfunc"],"published":"2026-03-22 12:50:59","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsakaik.hateblo.jp%2Fentry%2F20260322%2FSTX_ClosestPoint_func\" title=\" MySQL GIS\u62e1\u5f35\u95a2\u6570\uff1a STX_ClosestPoint() - sakaik\u306e\u65e5\u3005\u96d1\u611f\uff5e(T)\u7de8\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":" MySQL GIS\u62e1\u5f35\u95a2\u6570\uff1a STX_ClosestPoint()","description":"\u81ea\u4f5c\u306e\u3001Spatial(GIS)\u95a2\u9023\u306e\u95a2\u6570\u3092MySQL\u306b\u8ffd\u52a0\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u95a2\u6570\u3092\u3072\u3068\u3064\u3072\u3068\u3064\u52d5\u4f5c\u78ba\u8a8d\u3057\u306a\u304c\u3089\u7d39\u4ecb\u3059\u308b\u30b7\u30ea\u30fc\u30ba\u3002 STX_ClosestPoint(geom1, geom2) geom2\u306b\u3082\u3063\u3068\u3082\u8fd1\u3044\u4f4d\u7f6e\u3068\u306a\u308b\u3088\u3046\u306a geom1\u4e0a\u306e\u70b9\u3092\u8fd4\u3059\u3002\u5b9f\u306f STX_ShortestLine() \u95a2\u6570\u304c\u8fd4\u3059LINESTRING\u306e\u7b2c1\u70b9\u3068\u7d50\u679c\u306f\u540c\u3058\u3002 \u52d5\u4f5c\u7d39\u4ecb \u7b2c\u4e00\u5f15\u6570\u304cPOINT\u306a\u3089\u3070\u3001\u5fc5\u305a\u305d\u306ePOINT\u304c\u7d50\u679c\u3068\u306a\u308b\u3002 mysql> SELECT ST_AsText(STX_ClosestPoint( -> ST_GeomFromText('POINT(1 0)'), -> ST_Geom\u2026","type":"rich","version":"1.0","author_name":"sakaik"}