- Part 1: Начало статического блога. Immutant, Ring, Compojure, HTML rendering через Rum
- Part 2: Forms, middlewares, redirects, 404 and error handling
- Part 3: id generator, loops, cookies, sessions, authorization, working w/ files, macros
- Part 4: Cookies, рефакторинг, неймспейсы, RSS фид
- Part 5: Infinite Scroll на JS, sitemap.xml, robots.txt
- Part 6: Настраиваем CLJS окружение
- Part 7: Переделываем форму редактирования на Rum, клиент+сервер-сайд рендеринг, EDN-сериализация данных
- Part 8: CLJS, drag-n-drop upload, browser API, Rum mixins, local state
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns postgis | |
(:require [clj-json.core :as json]) | |
(:use korma.core korma.db korma.sql.engine)) | |
(defn intersects [first-geom second-geom] | |
"An extended Korma predicate that uses the PostGIS function ST_Intersects." | |
(sql-func "ST_Intersects" first-geom second-geom)) | |
(defn from-wkt [wkt] | |
"Create a PostGIS geometry with geographic SRID from WKT using ST_GeomFromText." |