Hi all,
me again ! I thing the result of the intersection method for input of two
lines are wrong!
Following example:
given a LineString (0 0 , 5 3) and the with formula I compute the y
coordinate of a point that lies! On the line!
GeometryFactory fact = new GeometryFactory();
WKTReader reader = new WKTReader(fact);
LineString line1= (LineString) reader
.read("LINESTRING (0 0, 5 3)");
double y1=0;
double x1=0;
double x2=5;
double y2=3;
double x=1.2;
double y = y1+(x-x1)*(y2-y1)/(x2-x1);
System.out.println(y);
LineString line2= (LineString) reader
.read("LINESTRING (0 0, 1.2 0.72)");
System.out.println(line1.intersection(line2));
for example x=1.2 => result y = 0.72
so I build another line use the intersection method and surprise only a
point intersection!
This is wrong!
So anyone has a hint for me how to get valid! Results?
Cheers,
Martin
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users