[EMAIL PROTECTED] wrote on 06/21/2007 06:15:11 PM:
> My stab at an interface representing a LinearGeometry for Linear > Referencing is attached. > > Note that I used only primitive data types and arrays of primitive > data types to maintain interoperability. In my final implementation I > would provide a wrapper to this that allowed the use of JTS geometries > and an Angle object as parameters. Looks like GM_GenericCurve will get you 90% of the way to where you want to go. This is implemented by GM_Curve and by all GM_CurveSegments. It's not quite clear from your interface what exactly happens between the two endpoints of your LinearGeometry. If I may assume that you linearly interpolate, then you're talking about a GM_LineSegment. 19107 provides a library of pretty well constrained paths (GM_Arc, GM_ArcString, GM_LineString, GM_Conic, etc.) to join the two ends. Plus, it'll let you join any combination of curve segments ("paths") end-to-end to form a single curve. Look at GM_GenericCurve & subinterfaces: http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/spatialschema/geometry/geometry/GenericCurve.html "getPerpendicularDirectionToPoitnOnLine()" needs some conceptual work. In 2D, there's really 2 perpendicular directions. In 3D, there's a perpendicular "disc". However, in 2D, you should be able to use "tangent()" to get a vector, calculate the azimuth angle, then add or subtract 90 degrees. I would write an adapter class to operate on any curve, and I'd rename the function to "normal()". :) But that's just me. "isPointOnLine()" is really "TransfiniteSet.contains(DirectPosition)" http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/spatialschema/geometry/TransfiniteSet.html This means that to get "isPointOnLine()", you're dealing with Curves and not CurveSegments, as Curve inherits from TransfiniteSet. In short, code against GeoAPI 19107 interfaces and use whatever implementation suits you. :) Bryce ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel