jgaffuri / opencarto Goto Github PK
View Code? Open in Web Editor NEWLicense: European Union Public License 1.1
License: European Union Public License 1.1
As given in previous issue"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()."
But I am getting following problem while doing this:
f.getGeom() returns "com.vividsolution.jts.geom.Geometry" whereas Squarring.get() accepts "com.vividsolution.jts.geom.Polygon".
Any solution for this?
Decide on which parts. Start with geometrical algorithms?
Running org.opencarto.algo.base.TranslationTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE! - in org.opencarto.algo.base.TranslationTest
test(org.opencarto.algo.base.TranslationTest) Time elapsed: 0.005 sec <<< FAILURE!
junit.framework.AssertionFailedError: expected:<2> but was:<1>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.Assert.assertEquals(Assert.java:234)
at junit.framework.Assert.assertEquals(Assert.java:241)
at junit.framework.TestCase.assertEquals(TestCase.java:409)
at org.opencarto.algo.base.TranslationTest.test(TranslationTest.java:16)
Results :
Failed tests:
TranslationTest.test:16 expected:<2> but was:<1>
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.806 s
[INFO] Finished at: 2019-07-09T20:26:46+03:00
[INFO] Final Memory: 25M/373M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project opencarto: There are test failures.
[ERROR]
[ERROR] Please refer to /home/vyhuhol/OpenCarto/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
`
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
Dear Mr Gaffuri,
I'm GIS and programming enthusiast, Now I'm doing research about regularize building outlines from noisy polygons. I found your project and Squaring method but It is not clear for me because of lack of comments in your code. Could you give me a little explanation about algorithm that you have used? Maybe reference to some article that you based on?
I will be very grateful!
Sincerely
Michał
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.