File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import (
2121 "os"
2222 "path/filepath"
2323 "strings"
24+
25+ "github.com/cockroachdb/cockroach/pkg/geo/geos"
2426)
2527
2628var (
@@ -84,9 +86,19 @@ func handleLoad(w http.ResponseWriter, r *http.Request) {
8486 }
8587}
8688
89+ var flagGeoLibsDir = flag .String (
90+ "geo_libs" ,
91+ "/usr/local/lib/cockroach" ,
92+ "Location where geospatial related libraries can be found." ,
93+ )
94+
8795func main () {
8896 flag .Parse ()
8997
98+ if _ , err := geos .EnsureInit (geos .EnsureInitErrorDisplayPrivate , * flagGeoLibsDir ); err != nil {
99+ log .Fatalf ("could not initialize GEOS - geospatial functions may not be available: %v" , err )
100+ }
101+
90102 http .HandleFunc ("/" , handleIndex )
91103 http .HandleFunc ("/load" , handleLoad )
92104
You can’t perform that action at this time.
0 commit comments