From: João Sávio <joaosavio@gm...>  20121128 16:25:06
Attachments:
Message as HTML

Is it make sense? I'm using maven 1.12 version LineString g1 = (LineString) new WKTReader().read("LINESTRING (1 0, 1 0)"); Point g2 = (Point) new WKTReader().read("POINT (0 0)"); *System.out.println(g1.crosses(g2)); // returns false!!!* João Sávio  http://joaosavio.wordpress.com 
From: Martin Davis <mtnclimb@gm...>  20121128 16:58:50
Attachments:
Message as HTML

If you mean "Is this result correct?" then the answer is yes. The OGC SFS definition for crosses can be stated as "The interiors of the geometries have some but not all points in common". In this case the interior of the Point geometry contains a single point, which lies in the interior of the linestring. So it does not have any interior points *not* in the interior of the line, which would be required for the crosses relationship to hold. See http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html#crosses(com.vividsolutions.jts.geom.Geometry) If you mean "Does the OGC SFS definition of crosses make sense", that's a more subjective question. One take on this is that it doesn't really make sense to ask if a line "crosses" a point. But for consistency the predicates are defined over all possible combinations of geometry, whether or not it makes sense. On Wed, Nov 28, 2012 at 8:24 AM, João Sávio <joaosavio@...> wrote: > Is it make sense? I'm using maven 1.12 version > > LineString g1 = (LineString) new WKTReader().read("LINESTRING (1 0, 1 > 0)"); > Point g2 = (Point) new WKTReader().read("POINT (0 0)"); > > *System.out.println(g1.crosses(g2)); // returns false!!!* > > > > > 
From: João Sávio <joaosavio@gm...>  20121130 12:40:37
Attachments:
Message as HTML

Thanks! Em 28/11/2012 14:59, "Martin Davis" <mtnclimb@...> escreveu: > If you mean "Is this result correct?" then the answer is yes. The OGC SFS > definition for crosses > can be stated as "The interiors of the geometries have some but not all > points in common". In this case > the interior of the Point geometry contains a single point, which lies in > the interior of the linestring. > So it does not have any interior points *not* in the interior of the line, > which would be required > for the crosses relationship to hold. > > See > http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html#crosses(com.vividsolutions.jts.geom.Geometry) > > If you mean "Does the OGC SFS definition of crosses make sense", that's a > more subjective question. One take on this is that it doesn't really make > sense to ask if a line "crosses" a point. But for consistency the > predicates are defined over all possible combinations of geometry, whether > or not it makes sense. > > On Wed, Nov 28, 2012 at 8:24 AM, João Sávio <joaosavio@...> wrote: > >> Is it make sense? I'm using maven 1.12 version >> >> LineString g1 = (LineString) new WKTReader().read("LINESTRING (1 0, 1 >> 0)"); >> Point g2 = (Point) new WKTReader().read("POINT (0 0)"); >> >> *System.out.println(g1.crosses(g2)); // returns false!!!* >> >> >> >> >> > > >  > Keep yourself connected to Go Parallel: > INSIGHTS What's next for parallel hardware, programming and related areas? > Interviews and blogs by thought leaders keep you ahead of the curve. > http://goparallel.sourceforge.net > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 