Hi all,

 

i have a "big" problem consider following example:

 

WKTReader reader = new WKTReader();

 

            LineString line1 = (LineString) reader

                        .read("LINESTRING (16785.531699445004
1002.8279659806619, 12455.57517093993 1000.3494562333781, 12333.457215546126
1024.2034008729838)");

            LengthIndexedLine temp = new LengthIndexedLine(line1);

 

            Coordinate c = new
Coordinate(16785.531699445004,1002.8279659806619);

            double startindex = temp.indexOf(c);

            System.out.println(startindex);

            

            // Get point that lies 200 meters from startindex 

            double endindex = startindex+200;

            

            LineString line2 = (LineString) temp.extractLine(startindex,
endindex);

            System.out.println("Line1"+line1);

            System.out.println("Line2"+line2);

            System.out.println("Intersected
line"+line1.intersection(line2));

 

I have one line (here line1) and need to calculate the line from startpoint
of line1 to 200 "meters" further!

BUT the result line (here line2) should have a "intersection line" with
length 200 meters => but it hasn`t!

 

Can anyone help me out I really need a "robust" solution!

 

Best regards,

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

Reply via email to