christiankaiser / ScapeToad

A user-friendly cartogram application written in Java
http://scapetoad.choros.ch
GNU General Public License v2.0
30 stars 4 forks source link

Running from command line #3

Closed alpha-beta-soup closed 6 years ago

alpha-beta-soup commented 6 years ago

I notice that in ScapeToad.java there is a hint for running ScapeToad from the CLI: https://github.com/christiankaiser/ScapeToad/blob/master/src/src/ScapeToad.java#L49

However the code for parsing the command line arguments a few lines down has been commented out. I have very limited experience with Java, and I'm just wondering if it's still possible to run ScapeToad as a CLI tool?

christiankaiser commented 6 years ago

There was some attempts in making ScapeToad accessible from the CLI. However, this step has never been really completed.

We are currently rewriting ScapeToad and will then have a Python library for making cartograms. But this is not yet ready.

In the meantime, you can check out the spatial-tools repo. This is basically a collection of CLI programs written in C, and some of them are about creating cartograms, based on the work of Mark Newman and Michael Gastner who did develop the cartogram algorithm that is used in ScapeToad. I did write these tools some years ago, but I think it should still work. There are a series of programs needed for making a cartogram. All the programs starting with r.morph.* are about map morphing (and hence cartograms too). These programs work with raster files instead of vector files. But there is a program to convert vector to raster. So a typical workflow could be:

Hope this helps!

alpha-beta-soup commented 6 years ago

Thanks, that's very helpful.