How can I query the postgres Point type from clojureql? I wish to use the PostGIS functionality but clojureql does not seem to include this.
Asked
Active
Viewed 955 times
24
-
2Do you know what type gets returned if you query the table? Maybe try (class returned-object) to find out, then you can look at the associated JavaDoc – mikera Jul 11 '11 at 09:57
-
Yes, you are right. A point type is returned. Thanks. If you write that as the answer I will accept it. – yazz.com Jul 18 '11 at 17:18
-
The data type `point` is implemented in standard PostgreSQL, PostGis is not involved so far. This question turned out not to be a question at all, just several misunderstandings at once. – Erwin Brandstetter Nov 23 '11 at 12:41
-
1You think this might get more traction at [gis.se]? – Dec 06 '11 at 14:24
1 Answers
2
I am not an expert in clojureql, but if this syntax is correct:
(with-connection db
(with-query-results rs ["select * from blogs"]
; rs will be a sequence of maps,
; one for each record in the result set.
(dorun (map #(println (:title %)) rs))))
(taken from here)
why not trying to change the rs into:
select point[0] as x, point[1] as y from table
Will this work? I am not sure it will, but if this Clojure way of querying is simply forwarding the query to the DB "asis" you might try using as well PostGIS operators in it.

simonecampora
- 397
- 2
- 8