*** Jim_ has joined #osm-ru | 02:03 | |
*** _sev_ has joined #osm-ru | 02:05 | |
*** _sev has quit IRC | 02:07 | |
*** old_Bibigon has quit IRC | 02:07 | |
*** |newbie| has quit IRC | 02:07 | |
*** Freem[w] has quit IRC | 02:08 | |
*** Jim[work] has quit IRC | 02:09 | |
*** Mezonin has joined #osm-ru | 02:12 | |
*** old_Bibigon has joined #osm-ru | 02:18 | |
*** az09|eye has joined #osm-ru | 03:58 | |
*** Freem[w] has joined #osm-ru | 04:07 | |
*** borism3461 has joined #osm-ru | 04:42 | |
az09|eye | http://www.navikey.ru/vanilla/discussion/comment/11254/#Comment_11254 вот какие умельцы на скорых работают, берите пример | 05:48 |
---|---|---|
*** Out`Of`Control has joined #osm-ru | 06:08 | |
*** freeExec has joined #osm-ru | 06:20 | |
*** borism3461 has quit IRC | 06:24 | |
*** Runge has joined #osm-ru | 06:37 | |
*** jekhor has joined #osm-ru | 07:05 | |
*** gardster has joined #osm-ru | 07:09 | |
*** az09|eye has left #osm-ru | 07:28 | |
*** kisaa has quit IRC | 07:28 | |
*** ooprizrakoo has joined #osm-ru | 07:29 | |
*** gardster has quit IRC | 07:31 | |
*** gardster has joined #osm-ru | 07:33 | |
*** az09|eye has joined #osm-ru | 07:35 | |
*** ooprizrakoo has quit IRC | 07:41 | |
*** gardster has quit IRC | 08:18 | |
*** gardster has joined #osm-ru | 08:26 | |
*** gardster has joined #osm-ru | 08:33 | |
*** Scondo has joined #osm-ru | 08:51 | |
*** az09|eye has left #osm-ru | 08:51 | |
*** gardster has quit IRC | 08:52 | |
*** az09|eye has joined #osm-ru | 09:01 | |
*** Scondo has quit IRC | 09:15 | |
*** Scondo has joined #osm-ru | 09:15 | |
*** az09|eye has left #osm-ru | 09:20 | |
*** gardster has joined #osm-ru | 09:37 | |
*** jekhor has quit IRC | 09:39 | |
*** SerjVanilla has quit IRC | 09:51 | |
*** gardster has quit IRC | 10:36 | |
*** AMDmi3 has joined #osm-ru | 10:40 | |
*** old_Bibigon_ has joined #osm-ru | 10:48 | |
*** old_Bibigon has quit IRC | 10:50 | |
*** jekhor has joined #osm-ru | 10:53 | |
*** az09|eye has joined #osm-ru | 10:57 | |
*** az09|eye has left #osm-ru | 11:08 | |
*** az09|eye has joined #osm-ru | 11:10 | |
*** gardster has joined #osm-ru | 11:13 | |
*** az09|eye has left #osm-ru | 12:15 | |
*** Runge has quit IRC | 14:36 | |
*** ErshKUS[work] has joined #osm-ru | 14:48 | |
*** ErshKUS[work] has quit IRC | 15:14 | |
*** freeExec has quit IRC | 15:18 | |
*** Scondo has quit IRC | 15:34 | |
*** gryphon has joined #osm-ru | 16:09 | |
*** gardster has quit IRC | 16:31 | |
*** jekhor has quit IRC | 16:52 | |
yourname | geom geometry(MultiPolygon), | 17:10 |
yourname | вот такое есть в базе | 17:10 |
*** jekhor has joined #osm-ru | 17:38 | |
*** Out`Of`Control has quit IRC | 17:51 | |
*** jekhor has quit IRC | 18:42 | |
yourname | не могу понять как этот запрос написать лол | 18:42 |
yourname | с ST_Contains | 18:43 |
yourname | помогите пожалуйста | 18:44 |
yourname | ! | 18:44 |
yourname | вот я залил в постгрес эти страны http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-0-countries/ | 18:44 |
yourname | в таблицу countries | 18:44 |
yourname | там есть поле sovereignt и geom | 18:45 |
yourname | я хочу спрашивать точку | 18:45 |
yourname | а в ответ получать sovereignt | 18:45 |
yourname | вот ду? | 18:46 |
yourname | ST_GeometryFromText('POINT(#{lat} #{lon})') | 18:47 |
yourname | мб так получать точку | 18:47 |
yourname | но как работает ST_Contains я чёт не могу понять пока что ещё | 18:47 |
*** ooprizrakoo has joined #osm-ru | 18:52 | |
*** gardster has joined #osm-ru | 19:10 | |
*** az09|not has joined #osm-ru | 19:24 | |
*** AMDmi3 has quit IRC | 19:24 | |
*** jekhor has joined #osm-ru | 19:53 | |
*** gardster has quit IRC | 20:09 | |
*** old_Bibigon_ has quit IRC | 20:14 | |
*** Scondo has joined #osm-ru | 20:16 | |
Zverik | yourname: select sovereign from countries where st_contains(geom, ST_Point(1.23, 4.56)) | 20:16 |
Scondo | На пути домой | 20:16 |
Scondo | *промахнулся... | 20:17 |
*** gardster has joined #osm-ru | 20:21 | |
yourname | ошибка стоп ноль ноль ноль | 20:26 |
yourname | http://pastebin.com/ppqWszgk | 20:26 |
yourname | но ваш совет звучит легально | 20:27 |
yourname | спасибо, Zverik | 20:27 |
*** Scondo has quit IRC | 20:29 | |
yourname | а, это наверное вообще ошибка моего мира | 20:30 |
yourname | не забивайте голову | 20:30 |
yourname | ! | 20:30 |
yourname | 2.3.0 :010 > Country.where("st_contains(geom, ST_Point(#{geotweet.lat}, #{geotweet.lon}))").first.sovereignt | 20:32 |
yourname | Country Load (38.9ms) SELECT "countries".* FROM "countries" WHERE (st_contains(geom, ST_Point(5.9969161, 6.9199579))) ORDER BY "countries"."gid" ASC LIMIT 1 | 20:32 |
yourname | => "Nigeria" | 20:32 |
yourname | *THUMBS_UP* | 20:32 |
Zverik | yourname: вообще-то ST_Point(lon, lat) | 20:33 |
Zverik | запомнить просто: это (x, y) | 20:34 |
yourname | ну да вообще странно, что в нигерии есть интернет | 20:34 |
yourname | всё равно нигерия | 20:34 |
yourname | %) | 20:35 |
*** ooprizrakoo has quit IRC | 20:38 | |
az09|not | > order by | 20:44 |
az09|not | > limit 1 | 20:44 |
yourname | а чё с ними не так | 20:44 |
az09|not | смысла не вижу | 20:45 |
yourname | наверное потому что .first | 20:46 |
yourname | да, без first: Country Load (37.3ms) SELECT "countries".* FROM "countries" WHERE (st_contains(geom, ST_Point(6.9199579, 5.9969161))) | 20:46 |
*** gryphon has quit IRC | 20:47 | |
yourname | можно заменить на [0] | 20:48 |
yourname | а такие штуки сильно мешают вообще? | 20:48 |
yourname | а то у меня много где в коде .first | 20:48 |
yourname | я просто не бог баз данных, я хз в каком порядке там что | 20:48 |
yourname | может ему ничего не стоит это сделать | 20:49 |
* az09|not перфекционист | 20:50 | |
az09|not | yourname: забей. копи-паст рулит | 20:51 |
*** az09|not has quit IRC | 20:52 | |
yourname | ливач | 20:53 |
yourname | оставил последнее слово за собой | 20:53 |
yourname | и смылся | 20:53 |
yourname | буду ждать тебя эй зет зиро найн | 20:53 |
yourname | ! | 20:53 |
*** jekhor has quit IRC | 21:01 | |
*** gardster has quit IRC | 21:04 | |
Zverik | совершенно из ниоткуда человек в почте спрашивает меня, почему его декодер o5m не работает | 21:15 |
yourname | может нашёл твою почту вгитхабе | 21:16 |
Zverik | но у меня ни одной репы про o5m. Я вообще никогда не трогал формат | 21:16 |
Zverik | ага, он нашёл копию osmctools в репе mapsme, которую я заливал | 21:31 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!