Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Showing with 30 additions and 6 deletions.
  1. +1 −1 cli.lisp
  2. +19 −3 db-tables.lisp
  3. +1 −0 phoros-js.lisp
  4. +1 −1 phoros.asd
  5. +8 −1 phoros.lisp
2 cli.lisp
@@ -334,7 +334,7 @@
:documentation "Name of auxiliary table. It may reside either in Phoros' native database or in an auxiliary database (which is common to all projects). It must have a geometry column.")
:type string :initial-value "the-geom"
- :documentation "Name of the geometry column (which should have an index) in the auxiliary data table.")
+ :documentation "Name of the geometry column (which must contain geographic coordinates, SRID=4326; and which should have an index) in the auxiliary data table.")
:type string :list t :optional t
:documentation "Name of a numeric column in the auxiliary data table. An empty string defines an empty placeholder column. Repeat if necessary.")
22 db-tables.lisp
@@ -1086,16 +1086,32 @@ VACUUM FULL ANALYZE <aux-table> (the_geom);"
(let ((aux-point-view-name
(aux-point-view-name presentation-project-name))
- (thread-aux-points-function-name presentation-project-name)))
+ (thread-aux-points-function-name presentation-project-name))
+ (srid-count
+ (query
+ (:select (:as (:select (:count t)
+ :from (make-symbol aux-table)
+ :where (:<> (:st_srid (make-symbol coordinates-column))
+ *standard-coordinates*))
+ 'bad)
+ (:as (:select (:count (make-symbol coordinates-column))
+ :from (make-symbol aux-table))
+ 'total))
+ :plist)))
+ (unless (zerop (getf srid-count :bad))
+ (warn "In column ~A of auxiliary data table ~A, ~D out of ~D values ~
+ have currently an unsuitable SRID not equal to ~D."
+ coordinates-column aux-table
+ (getf srid-count :bad) (getf srid-count :total)
+ *standard-coordinates*))
(execute (format nil "
-AS (SELECT ST_Transform(~A, ~D) AS coordinates,
+AS (SELECT ~A AS coordinates,
~:[NULL~;ARRAY[~:*~{~A~#^, ~}]~] AS aux_numeric,
~:[NULL~;ARRAY[~:*~{~A~#^, ~}]~] AS aux_text
(s-sql:to-sql-name aux-point-view-name)
(s-sql:to-sql-name coordinates-column)
- *standard-coordinates*
(mapcar #'to-sql-name-or-null numeric-columns)
(mapcar #'to-sql-name-or-null text-columns)
(s-sql:to-sql-name aux-table)))
1 phoros-js.lisp
@@ -1290,6 +1290,7 @@
(*lon-lat (@ current-point geometry x)
(@ current-point geometry y))))))
(chain *streetmap* (pan-to current-point-lonlat))
+ (setf (@ *streetmap* clicked-lonlat) current-point-lonlat)
(setf (@ *streetmap* linestring-central-azimuth) azimuth)
(request-photos-for-point current-point-lonlat)
(setf (@ *streetmap* step-back-point) previous-point)
2 phoros.asd
@@ -21,7 +21,7 @@ interface."
;; There should be a corresponding git tag which marks the point this
;; version number becomes official.
- "13.2.0"
+ "13.2.2"
:licence ;goes with --licence output
"Copyright (C) 2010, 2011, 2012 Bert Burgemeister
9 phoros.lisp
@@ -1235,8 +1235,15 @@ linestring stitched together of the nearest auxiliary points from
within radius around coordinates), current-point (the point on
linestring closest to coordinates), and previous-point and next-point
\(points on linestring step-size before and after current-point
+respectively). Wipe away any unfinished business first."
+ (dolist (old-thread (hunchentoot:session-value 'recent-threads))
+ (ignore-errors
+ (bt:interrupt-thread old-thread
+ #'(lambda () (signal 'superseded)))))
+ (setf (hunchentoot:session-value 'recent-threads) nil)
+ (setf (hunchentoot:session-value 'number-of-threads) 1)
+ (push (bt:current-thread) (hunchentoot:session-value 'recent-threads))
(setf (hunchentoot:content-type*) "application/json")
(let* ((thread-aux-points-function-name
(thread-aux-points-function-name (hunchentoot:session-value

No commit comments for this range

Something went wrong with that request. Please try again.