https://kotlinlang.org logo
#data2viz
Title
# data2viz
n

nwh

10/12/2019, 11:52 PM
Is it feasible to recreate something like Wikipedia's map projections with data2viz? (including outputting an SVG) Example here: https://upload.wikimedia.org/wikipedia/commons/d/dc/USA_orthographic.svg. I've fooled around with the geo visualization a bit, but I figured I'd ask about capability before diving in more
g

gaetan

10/13/2019, 5:37 PM
I think so. We have the code to transform geojson elements to paths through an orthographic projection. See this link about the geo module: https://github.com/data2viz/data2viz-docs/blob/master/topics/geo.md We also have an extension on Path to retrieve the corresponding svg string. See: https://github.com/data2viz/data2viz/blob/master/core/d2v-core-common/src/main/kotlin/io/data2viz/geom/PathGeom.kt#L118 You could use this to generate a complete SVG with your own style.
n

nwh

10/13/2019, 7:36 PM
Very cool. It seems like the tool Wikipedia uses to make them is super outdated, running some on some type of weird pascal program (or at least it was when I last checked). It'd be great to have an open source and easy to use one! I'll be reading up on that link you posted, thanks for the info 🙂
4 Views