Comments (3)
Hi @zackteo ! Sorry It took me a while to respond. If you look at the source code, I'm using OpenLayers (5.x) wrapped as a React-component with Reagent. In the early stages I experimented with Leaflet, which is much simpler, but also limited in features compared to OpenLayers.
Openlayers related code can be found under https://github.com/lipas-liikuntapaikat/lipas/tree/master/webapp/src/cljs/lipas/ui/map
Let me know if you want to discuss more about the GIS-functionality! I'm happy to help.
from lipas.
Hi @vharmain ! No worries! Thanks for taking the time to respond, do appreciate it!
And thanks for linking me to the relevant code, will probably take awhile for me to understand the Codebase properly! Will ask if I need any clarification!
In the meantime, could I ask about what features caused you to make the switch from Leaflet to OpenLayers?
-
Perhaps providing some context to my GIS exposure, I previously interned at company using a React+Redux, Leaflet, PostgreSQL (+PostGIS) + GeoServer stack, where I was exploring the possibility of swapping out the Leaflet code with ArcGIS JS api. I was exploring the possibility of converting the integrated 2D layer toggling web app ePlanner to a 3D one, allowing integration of 3D layers (instead of separate iframe implementations) - and produced a prototype for that.
-
Currently, in about 5 months time, will be doing a site search (optimising land allocation) web-app. So I have been trying to prepare for that, learning Clojure and abit of figuring out the underlying stack I plan to use - which I hope to get some practice with. Have of course been also trying to figure out what mapping library I might require and how it would work with ClojureScript. Think I have settled on a more a tested and documented framework/libraries of Reframe + Reagent and think Ring + Pedestal.
Also, not sure if you could provide any advice on how I would perhaps integrate Python or R related data science work into the stack? Friends will be exploring the optimising of land allocation in those languages and am thinking how I will bring it back into the web app if via the Backend. Not sure if the only way that might make sense is to rewrite the logic in Clojure (+PostGIS if needed)?
Thanks for your help! Any help would be very much appreciated it! Am just trying to meander my way through this (And trying to ensure I have a good grasp of things - especially since I dragged 5 friends along for this Clojure journey/project) ><
from lipas.
where I was exploring the possibility of swapping out the Leaflet code with ArcGIS JS app
Cool! I haven't done anything with ESRI products for many many years. I've been happy with OpenSource tools for a while but it would be nice to check at some point what ESRI is offering on the web-side nowadays.
what features caused you to make the switch from Leaflet to OpenLayers?
At least back then Leaflet geometry editing plug-in didn't support custom CRS that well and lacked features, such as splitting/joining linestrings and other fancier geometry editing tools. If I was creating an app just for displaying geometries, Leaflet would be fine though.. But in LIPAS the data producers must be able to also draw and edit the geometries and OpenLayers had pretty much everything built-in.
trying to figure out what mapping library I might require and how it would work with ClojureScript
The superpower with Clojure and ClojureScript is that everything that is supported by the underlying platform (JVM, JS) will work. What comes to ergonomics is of course another question. :) In my experience mapping libraries are highly imperative and stateful which makes working with them feel non-idiomatic in ClojureScript.
There are attempts to create a declarative (React) components for Leaflet (react-leaflet). I ended up doing something similar with OpenLayers. I wrapped the stateful and imperative bits behind a single React/Reagent component to which I just pass in a map of what I want it to look and do. This took some time and effort and it still looks and feels a bit like a kludge... But it has worked really well for me and it hasn't been too much pain to maintain.
Think I have settled on a more a tested and documented framework/libraries of Reframe + Reagent and think Ring + Pedestal.
Re-Frame and Reagent are bullet-proof choices if you're going to write a React app in ClojureScript. Ring in the backend is pretty much the standard. I have no experience in Pedestal but what I've heard and read, you can't go wrong with that either.
Also, not sure if you could provide any advice on how I would perhaps integrate Python or R related data science work into the stack?
It depends of course much on the nature of work that is done on the Python/R side. If they are scripts that just take inputs and produce outputs, you could call those scripts from the JVM directly. If Python/R stuff is just experimental and not "production ready" I'd consider rewriting them. GraalVM provides also an interesting alternative where you can run JVM, Python and R code within the same application.
Your project sounds interesting! I'm glad if my mumblings are helpful in some way. :) Let me know if you have any further questions.
from lipas.
Related Issues (2)
- Data structure HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lipas.