-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add triangle analysis function #75
Conversation
|
||
/** | ||
* This function is used to computed the aspect of a triangle Aspect represents | ||
* the main slope direction angle compared to the north direction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to compute" ...
missing '.' before 'Aspect'
Please see all my javadoc comments in orbisgis/orbisgis#556.
import org.jdelaunay.delaunay.geometries.DTriangle; | ||
|
||
/** | ||
* This function is used to compute the aspect of a triangle aspect represents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a run-on sentence. You need a '.' after triangle.
+ "(ST_GeomFromText('POLYGON ((0 0 0, 4 0 0, 2 3 9, 0 0 0))'));"); | ||
ResultSet rs = st.executeQuery("SELECT ST_TriangleDirection(the_geom) FROM input_table;"); | ||
rs.next(); | ||
assertTrue(((Geometry)rs.getObject(1)).equals(WKT_READER.read("LINESTRING(2 1 3, 2 0 0)"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a comment, nothing to change. You can do:
assertEquals("LINESTRING(2 1 3, 2 0 0)", rs.getString(1))
Add triangle analysis functions This PR adds 3 new functions for triangle. ```mysql ST_TriangleSlope(GEOMETRY); ``` Compute the slope of a triangle in degrees ```mysql ST_TriangleAspect(GEOMETRY); ``` Compute the aspect of a triangle Aspect represents the main slope direction angle compared to the north direction. ```mysql ST_TriangleDirection(GEOMETRY); ``` Compute the main slope direction on a triangle represented by a linesegment See #46.
This PR adds 3 new functions for triangle.
Compute the slope of a triangle in degrees
Compute the aspect of a triangle Aspect represents the main slope direction angle compared to the north direction.
Compute the main slope direction on a triangle represented by a linesegment
See #46.