I do want to ask paul if we can grab his example for the user guide.

As for solving your problem (ie data cleaning) there are a couple of approaches.

- The easiest is to "drop down" precision; and define a PrecisionModel that 
uses less accuracy (say float if you are working in double) and call 
makePrecise( coord ) on each. You can do that quickly using a coordinate 
sequence to visit each point in a geometry. This has the effect of snapping 
poins to a "grid"

- Failing that you can use the snapping code to try and snap lines together 
(http://docs.geotools.org/latest/userguide/guide/library/jts/snap.html)

- Or just simplify the geoemtry prior to use (using a PrecisionModel to try and 
snap the points to a grid basically) 
http://docs.geotools.org/latest/userguide/guide/library/jts/simplify.html

-- 
Jody Garnett

On Thursday, 17 March 2011 at 4:09 AM, mounir younes wrote: 
> Hello, I am trying to find the shortest path out of a shapefile but I am 
> having a problem concerning the path. No path is generated because of 
> probable disconnected lines. How could I solve that? I was using the solution 
> by paul crease. 
> 
> http://usefulpracticalgeoblog.blogspot.com/search?updated-min=2011-01-01T00:00:00-08:00&updated-max=2012-01-01T00:00:00-08:00&max-results=1
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to