Fork me on GitHub
#clojure-uk
<
2018-05-29
>
thomas07:05:31

mogge 😼

yogidevbear07:05:05

Morning 🙂 It looks like the :rain_cloud: has finally made its way down south

agile_geek09:05:39

South? We didn’t have a drop of rain up North! 😉

yogidevbear09:05:08

Just the midlands then 🙂 I had a friend explain that we live between two natural features that often mean the more severe weather passes over us. Like the snow from a couple months ago that hardly featured at all here

thomas08:05:09

we are suppose to get some serious thunderstorms later this afternoon.... 🤞 :thunder_cloud_and_rain:

mccraigmccraig08:05:52

i was very surprised to heard of the drowning the midlands got, given the baking sussex had

3Jane09:05:04

…and just yesterday (?) I was going to say that if you want nice dry weather, Midlands is the best area XD

3Jane09:05:20

well, at least I can say it’s the most consistent area out of all the ones I lived in

agile_geek09:05:06

Bore da my Clojure peeps

danm10:05:50

ahoy hoy

danm10:05:06

Lovely and hot all weekend. Visited a friends for a BBQ, then in the evening got banned from GTA Online for watching a movie on my 2nd monitor \o/

guy11:05:00

harsh haha how come?

Aleksander10:05:48

Morning everyone

otfrom11:05:41

@carr0t banned? (I game so very little that I'm very confused)

guy11:05:40

It would have had some anti cheat software running, so it looks like it is overly eager haha

maleghast15:05:21

Hello everyone!

maleghast15:05:24

Anyone got any idea how to get the centre / centroid of a GeoJSON polygon in Clojure or ClojureScript?

dominicm15:05:35

maths

trollface 2
🐧 2
maleghast15:05:42

(I realise that my questions to this forum are getting pretty niche)

maleghast15:05:35

@mccraigmccraig - Thx, if I have to use the database I will, but I would rather use the GeoJSON I already have than go back to the DB

mccraigmccraig15:05:39

iirc i ended up generating centroids and BBs for each object when i imported them... it made for fewer gnarly dependencies

maleghast15:05:11

*nods* I feared that might be the answer

maleghast15:05:32

Although, what are BBs? Bounding Boxes?

maleghast16:05:09

Oh ok, well I am planning to pre-generate those, so if the best approach is to pre-generate the centroids as well, then I guess I will have to do that.

mccraigmccraig16:05:59

there are java geo libs out there... i had terrible jar-hell problems on that project though, so avoiding more deps by offloading to postgis was a blessing. that may be different for you now

maleghast16:05:21

I can see the wisdom of offloading the work onto postGIS

otfrom16:05:35

(if you have geojson)

otfrom16:05:49

there are other tricks if you have shapefiles or other things that can be ripped apart by ogr2ogr

maleghast16:05:55

Oooh! Thx 🙂

maleghast16:05:09

I do__ have GeoJSON

otfrom16:05:17

JTS probably has a centroid function

otfrom16:05:39

and possibly one that is useful for geographic things too (as sometimes people want a modified centroid)

mccraigmccraig16:05:59

ooo a clojure geolib, cool!