Hi Nicolas, For this sort of question (ie. anything involving fiddly geometry) you are better off posting to the JTS user list. It's a friendly forum and Martin Davis (JTS author) is there regularly.
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user Michael On 2 December 2010 20:22, <[email protected]> wrote: > Hello Balint, > > Thank you for your help, > This JTS pointer will help me. > Even if it does not completely answer to my problem (my first post was > incomplete, sorry for this). > > The CGAlgorithms.orientationIndex computes position point against > a simple oriented line. > > But what about a linestring like this: > > A--------B > | > | E------------> > | | > | X | > C---------D > > In this case the X point is on the LEFT of the geometry. > Although CGAlgorithms.orientationIndex(A,B,X) returns RIGHT. > > I will try to implement an algorithm for that. > But it would have been great if JTS provide such a calculation. > > Thank you again > > Nicolas. > -----Message d'origine----- > De : Balint Persics [mailto:[email protected]] > Envoyé : mercredi 1 décembre 2010 21:33 > À : nicolas.lecart > Cc : geotools-gt2-users > Objet : Re: [Geotools-gt2-users] test left/right position > > Hello, > > I think this is not GeoTool's job, it's a topology problem. I suggest > using JTS to solve this problem: > com.vividsolutions.jts.algorithm.CGAlgorithms.orientationIndex(Coordinate > p1,Coordinate p2, Coordinate q) will do the job. > > Hope that helps, > > Balint > > On Wed, Dec 1, 2010 at 14:55, <[email protected]> wrote: >> Hello, >> >> I am wondering if geotools provides function to test if a point is on the >> left or on the right of an oriented line (implemented trough a LineString >> for instance). >> >> For example, in this case: >> >> ------------------> >> x >> >> the point "x" is on the right of the oriented line >> >> but in this case: >> >> <------------------ >> x >> >> the point "x" is on the left of the oriented line >> >> thank you >> >> Nicolas >> >> ------------------------------------------------------------------------------ >> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! >> Tap into the largest installed PC base & get more eyes on your game by >> optimizing for Intel(R) Graphics Technology. Get started today with the >> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. >> http://p.sf.net/sfu/intelisp-dev2dev >> _______________________________________________ >> Geotools-gt2-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> > > > > -- > Persics Balint > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
