jgaffuri/OpenCarto

Opencarto

Closed this issue · 2 comments

Dear Jgaffuri,

i have downloaded the opencarto java library. there is an algorithm in the folder polygon, called squarring.
I am new in Java and my question is now: is it possible to run this algortihm on a shapefile and store it without creating a WebService? If yes, can you explain me how?

thank you very much for your answer

greetings Markus

I share the same question, how can this (and other pieces of the library) be run as a standalone algorithm?

Yes, it is possible. You need first to load the content of your shapefile using SHPUtil.load(), then you go through the collection of loaded features and apply the squarring algorithm to each feature with a f.setGeom( Squarring.get(f.getGeom()) ), and then save the result with SHPUtil.save().