You can subscribe to this list here.
2009 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}

_{Sep}

_{Oct}

_{Nov}
(3) 
_{Dec}


2010 
_{Jan}
(30) 
_{Feb}
(41) 
_{Mar}
(69) 
_{Apr}
(131) 
_{May}
(67) 
_{Jun}
(24) 
_{Jul}
(28) 
_{Aug}
(52) 
_{Sep}
(9) 
_{Oct}
(24) 
_{Nov}
(36) 
_{Dec}
(24) 
2011 
_{Jan}
(20) 
_{Feb}
(53) 
_{Mar}
(31) 
_{Apr}
(74) 
_{May}
(71) 
_{Jun}
(51) 
_{Jul}
(28) 
_{Aug}
(91) 
_{Sep}
(72) 
_{Oct}
(46) 
_{Nov}
(90) 
_{Dec}
(38) 
2012 
_{Jan}
(80) 
_{Feb}
(77) 
_{Mar}
(98) 
_{Apr}
(78) 
_{May}
(56) 
_{Jun}
(85) 
_{Jul}
(53) 
_{Aug}
(87) 
_{Sep}
(74) 
_{Oct}
(67) 
_{Nov}
(85) 
_{Dec}
(66) 
2013 
_{Jan}
(50) 
_{Feb}
(34) 
_{Mar}
(45) 
_{Apr}
(36) 
_{May}
(22) 
_{Jun}
(10) 
_{Jul}
(30) 
_{Aug}
(39) 
_{Sep}
(25) 
_{Oct}
(11) 
_{Nov}
(64) 
_{Dec}
(42) 
2014 
_{Jan}
(27) 
_{Feb}
(6) 
_{Mar}
(10) 
_{Apr}
(14) 
_{May}
(25) 
_{Jun}
(6) 
_{Jul}
(25) 
_{Aug}
(3) 
_{Sep}
(22) 
_{Oct}
(12) 
_{Nov}
(34) 
_{Dec}
(15) 
2015 
_{Jan}
(24) 
_{Feb}
(20) 
_{Mar}
(11) 
_{Apr}

_{May}
(37) 
_{Jun}
(24) 
_{Jul}
(17) 
_{Aug}
(10) 
_{Sep}
(3) 
_{Oct}
(15) 
_{Nov}
(10) 
_{Dec}

S  M  T  W  T  F  S 




1
(2) 
2
(4) 
3
(2) 
4
(2) 
5

6

7
(3) 
8

9

10

11

12

13

14

15

16

17

18

19

20

21

22
(2) 
23
(3) 
24
(1) 
25
(1) 
26

27
(2) 
28

29

30

31


From: Martin Davis <mtnclimb@gm...>  20130527 17:04:40

There is a method on GeometrySnapper which snaps a geometry to itself using a given tolerance, and then cleans the result (to eliminate topology collapes). You can try running this after unions which don't produce Polygons. http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/operation/overlay/snap/GeometrySnapper.html#snapToSelf(double, boolean) On Mon, May 27, 2013 at 2:55 AM, Brian Sanjeewa Rupasinghe < jinkabs@...> wrote: > Hi, > > I have four adjoining polygons in a Geometry Array. I union all these > polygons with *UnionWithUnionOp(). *After union, i must end up with a > single polygon. > However, may be due to precision exceptions i end up with a MultiPolygon. > When i reduced the Precision to Floating_Single in the resultant > MultiPolygon, > It becomes a single polygon. However, when i reduce the precision of all > geometries before union, it does not give a single polygon. > I wonder if there any other efficient method to solve this. I used > Geometry.Buffer(0.0001).Buffer(0.0001) method on the MultiPolygon (with a > small distance) > , but it did not work though. My problem is that i have a set of these > type of adjoining polygon clusters for union. I am going to use *UnionWithUnionOp() > *iteratively for this. > I want to have a consistent method, that will give polygons after union in > each iteration. Any idea or solution welcome?? > > Here is the input Geometry of one iteration: > > [POLYGON ((573.2208405362504 319.14591696023655, 626.988029985886 > 259.3613429321679, 629.6108197151369 271.93570183372697, 573.2208405362504 > 319.14591696023655)), POLYGON ((626.988029985886 259.3613429321679, > 662.7825445411077 244.565783113429, 629.6108197151369 271.93570183372697, > 626.988029985886 259.3613429321679)), POLYGON ((686.3237768753402 > 234.83508231929972, 657.7256658615997 232.33180753459465, 645.5024406099801 > 224.89104962150418, 617.5658326202788 237.9154455890137, 626.988029985886 > 259.3613429321679, 686.3237768753402 234.83508231929972)), POLYGON > ((679.443824570897 298.1635991262324, 629.6108197151369 271.93570183372697, > 573.2208405362504 319.14591696023655, 634.8563991736378 327.01428614798823, > 679.443824570897 298.1635991262324))] > > This is the result of the union without reducing precision: > > MULTIPOLYGON (((686.3237768753402 234.83508231929972, 657.7256658615997 > 232.33180753459465, 645.5024406099801 224.89104962150418, 617.5658326202788 > 237.9154455890137, 626.988029985886 259.3613429321679, 686.3237768753402 > 234.83508231929972)), ((629.6108197151369 271.93570183372697, > 662.7825445411077 244.565783113429, 626.988029985886 259.3613429321679, > 573.2208405362504 319.14591696023655, 634.8563991736378 327.01428614798823, > 679.443824570897 298.1635991262324, 629.6108197151369 271.93570183372697))) > > The resultant polygon after reducing precision of above MultiPolygon to > Floating_Single > > POLYGON ((626.988037 259.361328, 573.220825 319.145905, 634.856384 > 327.014282, 679.443848 298.163605, 629.61084 271.935699, 662.782532 > 244.565796, 686.323792 234.835083, 657.725647 232.331802, 645.502441 > 224.891052, 617.565857 237.915451, 626.988037 259.361328)) > > Best, Brian. > > >  > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaSbased application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20130527 09:55:52

Hi, I have four adjoining polygons in a Geometry Array. I union all these polygons with *UnionWithUnionOp(). *After union, i must end up with a single polygon. However, may be due to precision exceptions i end up with a MultiPolygon. When i reduced the Precision to Floating_Single in the resultant MultiPolygon, It becomes a single polygon. However, when i reduce the precision of all geometries before union, it does not give a single polygon. I wonder if there any other efficient method to solve this. I used Geometry.Buffer(0.0001).Buffer(0.0001) method on the MultiPolygon (with a small distance) , but it did not work though. My problem is that i have a set of these type of adjoining polygon clusters for union. I am going to use *UnionWithUnionOp() *iteratively for this. I want to have a consistent method, that will give polygons after union in each iteration. Any idea or solution welcome?? Here is the input Geometry of one iteration: [POLYGON ((573.2208405362504 319.14591696023655, 626.988029985886 259.3613429321679, 629.6108197151369 271.93570183372697, 573.2208405362504 319.14591696023655)), POLYGON ((626.988029985886 259.3613429321679, 662.7825445411077 244.565783113429, 629.6108197151369 271.93570183372697, 626.988029985886 259.3613429321679)), POLYGON ((686.3237768753402 234.83508231929972, 657.7256658615997 232.33180753459465, 645.5024406099801 224.89104962150418, 617.5658326202788 237.9154455890137, 626.988029985886 259.3613429321679, 686.3237768753402 234.83508231929972)), POLYGON ((679.443824570897 298.1635991262324, 629.6108197151369 271.93570183372697, 573.2208405362504 319.14591696023655, 634.8563991736378 327.01428614798823, 679.443824570897 298.1635991262324))] This is the result of the union without reducing precision: MULTIPOLYGON (((686.3237768753402 234.83508231929972, 657.7256658615997 232.33180753459465, 645.5024406099801 224.89104962150418, 617.5658326202788 237.9154455890137, 626.988029985886 259.3613429321679, 686.3237768753402 234.83508231929972)), ((629.6108197151369 271.93570183372697, 662.7825445411077 244.565783113429, 626.988029985886 259.3613429321679, 573.2208405362504 319.14591696023655, 634.8563991736378 327.01428614798823, 679.443824570897 298.1635991262324, 629.6108197151369 271.93570183372697))) The resultant polygon after reducing precision of above MultiPolygon to Floating_Single POLYGON ((626.988037 259.361328, 573.220825 319.145905, 634.856384 327.014282, 679.443848 298.163605, 629.61084 271.935699, 662.782532 244.565796, 686.323792 234.835083, 657.725647 232.331802, 645.502441 224.891052, 617.565857 237.915451, 626.988037 259.361328)) Best, Brian. 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20130525 20:17:49

Hi all, Sorry for posting this thread. When investigating, problem was not with polygon hole extraction but with the buffering result. So the result of polygon extraction is correct. Cheers, Brian. On Fri, May 24, 2013 at 9:13 PM, Brian Sanjeewa Rupasinghe < jinkabs@...> wrote: > Hi, > > I union a set of polygons with *UnionWithUnionOp*, which ultimately > creates a polygon with holes. Following is the set of polygons > in an ArrayList i use for union. > > ArrayList of polygons: [POLYGON ((703.3410045979551 80.92456714917681, > 718.5359479889257 20.810825348304995, 718.1681383819796 35.52320962616077, > 703.3410045979551 80.92456714917681)), POLYGON ((785.109486846222 > 82.97064892224499, 800.0631358759173 30.878513094918475, 803.8677768004874 > 81.49941049445947, 785.109486846222 82.97064892224499)), POLYGON > ((718.5359479889257 20.810825348304995, 733.1580193792695 > 14.910691278517184, 718.1681383819796 35.52320962616077, 718.5359479889257 > 20.810825348304995)), POLYGON ((732.9002852026347 100.94859594589522, > 785.109486846222 82.97064892224499, 803.8677768004874 81.49941049445947, > 732.9002852026347 100.94859594589522)), POLYGON ((718.1681383819796 > 35.52320962616077, 703.3410045979551 80.92456714917681, 732.9002852026347 > 100.94859594589522, 785.109486846222 82.97064892224499, 746.2496377337789 > 53.272336906088405, 718.1681383819796 35.52320962616077)), POLYGON > ((718.5359479889257 20.810825348304995, 756.5561990071067 > 5.4693205514952075, 776.4081693414109 6.153871252678102, 785.3441701464218 > 12.270754131856595, 824.4247854124693 61.6765807614765, 803.8677768004874 > 81.49941049445947, 852.050835310465 79.6603624597275, 785.3441701464213 > 13.474425749638794, 721.4579830330819 14.42795093043492, > 718.7632379569186 10.092344825532496, 718.5359479889257 > 20.810825348304995))] > > Then after crating the polygon, i extract inner rings. Following is the > result of inner rings. > > Polygon 1: > > Inner polygons: POLYGON ((733.1580193792695 14.910691278517188, > 756.5561990071067 5.4693205514952075, 776.4081693414109 6.153871252678102, > 785.3441701464218 12.270754131856595, 800.0631358759173 30.878513094918475, > 785.109486846222 82.97064892224499, 746.2496377337789 53.272336906088405, > 718.1681383819796 35.52320962616077, 733.1580193792695 14.910691278517188)) > > Polygon 2: > > Inner polygons: POLYGON ((800.0631358759173 30.878513094918475, > 824.4247854124693 61.6765807614765, 803.8677768004874 81.49941049445947, > 800.0631358759173 30.878513094918475)) > > When i analyse the result, inner rings extracted are not correct. I think > something will happen in the union. Will that be rectified through reducing > precision or any > other method?? > > Cheers, Brian. > 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20130524 20:14:07

Hi, I union a set of polygons with *UnionWithUnionOp*, which ultimately creates a polygon with holes. Following is the set of polygons in an ArrayList i use for union. ArrayList of polygons: [POLYGON ((703.3410045979551 80.92456714917681, 718.5359479889257 20.810825348304995, 718.1681383819796 35.52320962616077, 703.3410045979551 80.92456714917681)), POLYGON ((785.109486846222 82.97064892224499, 800.0631358759173 30.878513094918475, 803.8677768004874 81.49941049445947, 785.109486846222 82.97064892224499)), POLYGON ((718.5359479889257 20.810825348304995, 733.1580193792695 14.910691278517184, 718.1681383819796 35.52320962616077, 718.5359479889257 20.810825348304995)), POLYGON ((732.9002852026347 100.94859594589522, 785.109486846222 82.97064892224499, 803.8677768004874 81.49941049445947, 732.9002852026347 100.94859594589522)), POLYGON ((718.1681383819796 35.52320962616077, 703.3410045979551 80.92456714917681, 732.9002852026347 100.94859594589522, 785.109486846222 82.97064892224499, 746.2496377337789 53.272336906088405, 718.1681383819796 35.52320962616077)), POLYGON ((718.5359479889257 20.810825348304995, 756.5561990071067 5.4693205514952075, 776.4081693414109 6.153871252678102, 785.3441701464218 12.270754131856595, 824.4247854124693 61.6765807614765, 803.8677768004874 81.49941049445947, 852.050835310465 79.6603624597275, 785.3441701464213 13.474425749638794, 721.4579830330819 14.42795093043492, 718.7632379569186 10.092344825532496, 718.5359479889257 20.810825348304995))] Then after crating the polygon, i extract inner rings. Following is the result of inner rings. Polygon 1: Inner polygons: POLYGON ((733.1580193792695 14.910691278517188, 756.5561990071067 5.4693205514952075, 776.4081693414109 6.153871252678102, 785.3441701464218 12.270754131856595, 800.0631358759173 30.878513094918475, 785.109486846222 82.97064892224499, 746.2496377337789 53.272336906088405, 718.1681383819796 35.52320962616077, 733.1580193792695 14.910691278517188)) Polygon 2: Inner polygons: POLYGON ((800.0631358759173 30.878513094918475, 824.4247854124693 61.6765807614765, 803.8677768004874 81.49941049445947, 800.0631358759173 30.878513094918475)) When i analyse the result, inner rings extracted are not correct. I think something will happen in the union. Will that be rectified through reducing precision or any other method?? Cheers, Brian. 
From: Shahak Nagiel <snagiel@ya...>  20130523 17:51:09

>From our experience with the latest code in trunk, yes, it's threadsafe (and we exercise it pretty heavily in a multicore environment). If you're going to be processing the same geometries repeatedly, we've also found good success with a combination of:  Simplifying geometries if they're sufficiently complex (say, over 500pts): http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/simplify/DouglasPeuckerSimplifier.html or http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/simplify/TopologyPreservingSimplifier.html  Using PreparedGeometries (PreparedGeometry#intersects (Geometry geo2)): http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/prep/PreparedGeometryFactory.html ________________________________ From: Brian Sweet <brian.sweet@...> To: jtstoposuiteuser@... Sent: Thursday, May 23, 2013 12:13 PM Subject: [Jtstoposuiteuser] Geometry intersection and thread safety Is performing an intersection, e.g. Geometry intersection geo1.intersection(geo2); going to be threadsafe? (i.e. does it update anything internally to the 2 referenced geometries?) Thanks, Brian Sweet brian.sweet@...  Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaSbased application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Jtstoposuiteuser mailing list Jtstoposuiteuser@... https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser 
From: Martin Davis <mtnclimb@gm...>  20130523 17:29:36

Overlay operations should be threadsafe. On Thu, May 23, 2013 at 9:13 AM, Brian Sweet <brian.sweet@...>wrote: > Is performing an intersection, e.g. > > Geometry intersection geo1.intersection(geo2); > > going to be threadsafe? (i.e. does it update anything internally to the 2 > referenced geometries?) > > Thanks, > > Brian Sweet > brian.sweet@... > > > >  > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaSbased application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Brian Sweet <brian.sweet@bi...>  20130523 17:16:39

Is performing an intersection, e.g. Geometry intersection geo1.intersection(geo2); going to be threadsafe? (i.e. does it update anything internally to the 2 referenced geometries?) Thanks, Brian Sweet brian.sweet@... 
From: Martin Davis <mtnclimb@gm...>  20130522 16:05:22

That is indeed a bug, which only shows up when using a Coordinate array as input, rather than a Geometry. I'll fix this shortly in SVN. In the meantime a workaround is to turn the coordinate array into a MultiPoint and use that as input to ConvexHull. On Wed, May 22, 2013 at 8:29 AM, Andrew Byrd <andrew@...> wrote: > Hello, > > I am using JTS 1.13. Hopefully this is not a repeat  I checked the > issue tracker and didn't see any related issues. > > Problem: > An IllegalArgumentException is thrown when using > ConvexHull.getConvexHull() to find the convex hull of 3 or more > identical points. > > Explanation: > just before returning, getConvexHull calls > com.vividsolutions.jts.algorithm.ConvexHull.lineOrPolygon(Coordinate[]) > which calls > com.vividsolutions.jts.algorithm.ConvexHull.cleanRing(Coordinate[]) > which can result in a single point in the special case where all > Coordinates are the same. createLinearRing() then fails with an > IllegalArgumentException, due to construction of a 1point Linestring. > > Possible solution: > At/around L110 of ConvexHull.java, check whether the first element of > sortedPts equals the last element of sortedPts, and return a Point if > they are equal. > > Example: > public class ConvexHullExample { > > public static void main (String[] args) { > Coordinate[] cs = new Coordinate[] { > new Coordinate(5, 10), > new Coordinate(5, 10), > new Coordinate(5, 10) > }; > ConvexHull convexHull = > new ConvexHull(cs, new GeometryFactory()); > convexHull.getConvexHull(); > } > } > > Andrew Byrd > > >  > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaSbased application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > 
From: Andrew Byrd <andrew@fa...>  20130522 15:44:44

Hello, I am using JTS 1.13. Hopefully this is not a repeat  I checked the issue tracker and didn't see any related issues. Problem: An IllegalArgumentException is thrown when using ConvexHull.getConvexHull() to find the convex hull of 3 or more identical points. Explanation: just before returning, getConvexHull calls com.vividsolutions.jts.algorithm.ConvexHull.lineOrPolygon(Coordinate[]) which calls com.vividsolutions.jts.algorithm.ConvexHull.cleanRing(Coordinate[]) which can result in a single point in the special case where all Coordinates are the same. createLinearRing() then fails with an IllegalArgumentException, due to construction of a 1point Linestring. Possible solution: At/around L110 of ConvexHull.java, check whether the first element of sortedPts equals the last element of sortedPts, and return a Point if they are equal. Example: public class ConvexHullExample { public static void main (String[] args) { Coordinate[] cs = new Coordinate[] { new Coordinate(5, 10), new Coordinate(5, 10), new Coordinate(5, 10) }; ConvexHull convexHull = new ConvexHull(cs, new GeometryFactory()); convexHull.getConvexHull(); } } Andrew Byrd 
From: Shahak Nagiel <snagiel@ya...>  20130507 20:00:35

I finally resolved this issue. As mentioned, I did follow the general algorithm suggested in the link below (and at http://webmonkeyswithlaserbeams.wordpress.com/2009/03/04/thesweetjavatopologysuitepartii/). But in at least one case, two of the adjoining polygons were still overlapping. From what I can tell, the issue was some type of floating point rounding issue during the repolygonization phase. What I added (after "step 4" in the good guide above) was to "snap" all vertices. Unfortunately, I couldn't make much progress with the snapping tools in JTS, so I built my own GeometryEditor/CoordinationOperation which reduced the significant digits in each vertex to a reasonable number of decimal places. After this refinement step, everything works as expected. Thanks. ________________________________ From: Martin Davis <mtnclimb@...> To: Shahak Nagiel <snagiel@...> Cc: "jtstoposuiteuser@..." <jtstoposuiteuser@...> Sent: Thursday, May 2, 2013 5:23 PM Subject: Re: [Jtstoposuiteuser] Overlapping Geometries Well, as noted in that thread, SimplifyandSnap is fraught with potential problems. Snapping is a last resort, not a cureall. So good luck with it! On Thu, May 2, 2013 at 2:00 PM, Shahak Nagiel <snagiel@...> wrote: Good tips. I'll definitely try to inspect it visually with the TestBuilder (great feature, btw). > > >I'm basically facing the challenge described at http://jtsdevel.219725.n2.nabble.com/SimplifyampSnaptd2276384.html. Problem is, I already ran through that basic algorithm and have ended up here; it seemed to have fixed the vast majority of shared vertices, but apparently one (or more) have slipped through (perhaps as a byproduct of the polygonizer process with respect to floating point approximation issues?). So, I was hoping to find a (relatively easy) solution for snapping adjacent polygons together. > > > > 
From: Martin Davis <mtnclimb@gm...>  20130507 18:43:01

There's nothing in JTS right now which will do this. All you can do is to map the new nodes back to their parent line segments, and interpolate the Z value yourself. On Tue, May 7, 2013 at 11:34 AM, César Argul García <cesarargul@...>wrote: > Hi. > > I'm trying to node a set of 3D polylines. Is there a way to perform the > noding in 3D? I've tried the GeometryNoder class, but the new nodes have > Z=0. > > I'm an user of the NetTopologySuite. I've previously done this question a > week ago in the NTS google group, but without answer. > > Hope you can help me. Thanks! > >  > Learn Graph Databases  Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > 
From: César Argul García <cesarargul@gm...>  20130507 18:34:17

Hi. I'm trying to node a set of 3D polylines. Is there a way to perform the noding in 3D? I've tried the GeometryNoder class, but the new nodes have Z=0. I'm an user of the NetTopologySuite. I've previously done this question a week ago in the NTS google group, but without answer. Hope you can help me. Thanks! 
From: Martin Davis <mtnclimb@gm...>  20130504 15:21:39

On Sat, May 4, 2013 at 4:27 AM, Imran Rajjad <rajjad@...> wrote: > Hi, > > thanks for your reply.. is it possible to hatch the linestring geometry > before doing this using Densifier , that way I will have points at equal > intervals instead of segments with random length. > > Yes 
From: Imran Rajjad <rajjad@gm...>  20130504 11:27:31

Hi, thanks for your reply.. is it possible to hatch the linestring geometry before doing this using Densifier , that way I will have points at equal intervals instead of segments with random length. regards, Imran On Fri, May 3, 2013 at 12:47 AM, Martin Davis <mtnclimb@...> wrote: > "Nearest vertex of a linestring"  nearest to what? If to an arbitrary > point, then there is no builtin method to do this  you will have to > iterate over the vertices of the linestring and compute the distance to the > query point. > > If on the other hand you mean "find the nearest *point location* on a > linestring to a given point", then you can use the linear referencing API > to do this. Have a look at: > > > http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/linearref/LengthIndexedLine.html#extractPoint(double) > and > > http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/linearref/LengthIndexedLine.html#project(com.vividsolutions.jts.geom.Coordinate) > > To extract a section of a linestring between two points, compute the > length indices of the points using LengthIndexedLine.project, and then use > > > http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/linearref/LengthIndexedLine.html#extractLine(double, > double) > > You can also use the LengthIndexedLine.project method to get the index of t > > > On Thu, May 2, 2013 at 12:28 PM, Imran Rajjad <rajjad@...> wrote: > >> Dear list, >> >> I have been searching javadocs of JTS .. but am unable to find a way to >> find the nearest vertex of a linestring. >> >> Further is it possible to split a linestring at a given point or clip a >> linestring using two points which are on that linestring? Currently I have >> to iterate through the whole set of vertices which doesnt look very >> comfortable >> >> >> > >  > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to codelevel detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > >  I.R 
From: Martin Davis <mtnclimb@te...>  20130503 02:40:40

Thanks! InsideBLine = A.getBoundary().intersection(B) OutsideBLine = A.getBoundary().difference(B) On 5/2/2013 7:18 PM, JARRILUCEA@... wrote: > Firstly, thanks to the developers of this amazing tool. > > My question is this. I have two polygons (A & B) which intersect. I > need to represent the polygon A points inside polygon B with a dashed > line; and the polygon A points outside polygon B with a continuous > line. Is there anyway to extract the Polygon A points inside polygon > B? I would like the points to be extracted in the form of a line of a > set of lines which can be easily drawn. Thanks in advance! > > 
From: JARRILUCEA@YAHOO.COM <jarrilucea@ya...>  20130503 02:18:19

Firstly, thanks to the developers of this amazing tool. My question is this. I have two polygons (A & B) which intersect. I need to represent the polygon A points inside polygon B with a dashed line; and the polygon A points outside polygon B with a continuous line. Is there anyway to extract the Polygon A points inside polygon B? I would like the points to be extracted in the form of a line of a set of lines which can be easily drawn. Thanks in advance! 
From: Martin Davis <mtnclimb@gm...>  20130502 21:23:10

Well, as noted in that thread, SimplifyandSnap is fraught with potential problems. Snapping is a last resort, not a cureall. So good luck with it! On Thu, May 2, 2013 at 2:00 PM, Shahak Nagiel <snagiel@...> wrote: > Good tips. I'll definitely try to inspect it visually with the > TestBuilder (great feature, btw). > > I'm basically facing the challenge described at > http://jtsdevel.219725.n2.nabble.com/SimplifyampSnaptd2276384.html. > Problem is, I already ran through that basic algorithm and have ended up > here; it seemed to have fixed the vast majority of shared vertices, but > apparently one (or more) have slipped through (perhaps as a byproduct of > the polygonizer process with respect to floating point approximation > issues?). So, I was hoping to find a (relatively easy) solution for > snapping adjacent polygons together. > > > 
From: Shahak Nagiel <snagiel@ya...>  20130502 21:00:11

Good tips. I'll definitely try to inspect it visually with the TestBuilder (great feature, btw). I'm basically facing the challenge described at http://jtsdevel.219725.n2.nabble.com/SimplifyampSnaptd2276384.html. Problem is, I already ran through that basic algorithm and have ended up here; it seemed to have fixed the vast majority of shared vertices, but apparently one (or more) have slipped through (perhaps as a byproduct of the polygonizer process with respect to floating point approximation issues?). So, I was hoping to find a (relatively easy) solution for snapping adjacent polygons together. Thanks again. ________________________________ From: Martin Davis <mtnclimb@...> To: Cc: "jtstoposuiteuser@..." <jtstoposuiteuser@...> Sent: Wednesday, May 1, 2013 4:10 PM Subject: Re: [Jtstoposuiteuser] Overlapping Geometries In the IM, BB = 1 indicates that there is at some location in the two polygons a place where they have boundary lines that are coincident. But the IM is additive  this does not preclude also having the situation where II = 2 somewhere else. The fact that A.overlaps(B) = true and A.intersection(B) = Line probably indicates that there is a very small discrepancy between vertices along the "shared" boundary. Due to precision issues this can cause the result of predicates to be inconsistent with overlay operations. See D7 here for a further explanation: http://tsusiatsoftware.net/jts/jtsfaq/jtsfaq.html#D You can confirm this visually in the JTS TestBuilder by using the Magnify Topology feature: http://linearthinking.blogspot.ca/2010/08/magnifyingtopologyusingjts.html Or even better, post the WKT or WKB of the geometries so I can confirm. On Wed, May 1, 2013 at 11:23 AM, Shahak Nagiel <snagiel@...> wrote: I've got two multipolygons whichvisually and by designintersect but should not overlap. (Visualize two adjacent zip codes/cities/counties/countries.) However, poly1.overlaps(poly2) returns true. > > >So I get the IntersectionMatrix (poly1.relate(poly2)), which yields: 212111212. This confuses me. The boundaryboundary relationship (1) suggests they share only a onedimensional boundary. Indeed, calling poly1.intersection(poly2) yields a multilinestring. But the interiorinterior relationship (2) suggests a twodimensional overlap, and would explain why poly1.overlaps(poly2) returns true. > > >In a unit test with simpler geometries (two overlapping squares), I find a similar relationship: 212101212, the key difference being the boundaryboundary relationship (0 in this case). This makes sense, since their boundaries cross at (0dimensional) points, and their overlap is a 2dimensional polygon. When I line them up sidebyside, then I get the expected relationship FF2F11212 and square1.overlaps(square2) == false. So, in other words, I'm unable to duplicate the relationship I see with the poly's above. > > >Can anyone make sense of this? > > >Thanks! > >Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET >Get 100% visibility into your production application  at no cost. >Codelevel diagnostics for performance bottlenecks with <2% overhead >Download for free and get started troubleshooting in minutes. >http://p.sf.net/sfu/appdyn_d2d_ap1 >_______________________________________________ >Jtstoposuiteuser mailing list >Jtstoposuiteuser@... >https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > >  Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application  at no cost. Codelevel diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ Jtstoposuiteuser mailing list Jtstoposuiteuser@... https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser 
From: Martin Davis <mtnclimb@gm...>  20130502 19:47:52

"Nearest vertex of a linestring"  nearest to what? If to an arbitrary point, then there is no builtin method to do this  you will have to iterate over the vertices of the linestring and compute the distance to the query point. If on the other hand you mean "find the nearest *point location* on a linestring to a given point", then you can use the linear referencing API to do this. Have a look at: http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/linearref/LengthIndexedLine.html#extractPoint(double) and http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/linearref/LengthIndexedLine.html#project(com.vividsolutions.jts.geom.Coordinate) To extract a section of a linestring between two points, compute the length indices of the points using LengthIndexedLine.project, and then use http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/linearref/LengthIndexedLine.html#extractLine(double, double) You can also use the LengthIndexedLine.project method to get the index of t On Thu, May 2, 2013 at 12:28 PM, Imran Rajjad <rajjad@...> wrote: > Dear list, > > I have been searching javadocs of JTS .. but am unable to find a way to > find the nearest vertex of a linestring. > > Further is it possible to split a linestring at a given point or clip a > linestring using two points which are on that linestring? Currently I have > to iterate through the whole set of vertices which doesnt look very > comfortable > > > 
From: Imran Rajjad <rajjad@gm...>  20130502 19:29:03

Dear list, I have been searching javadocs of JTS .. but am unable to find a way to find the nearest vertex of a linestring. Further is it possible to split a linestring at a given point or clip a linestring using two points which are on that linestring? Currently I have to iterate through the whole set of vertices which doesnt look very comfortable regards,  I.R 
From: Martin Davis <mtnclimb@gm...>  20130501 20:10:59

In the IM, BB = 1 indicates that there is at some location in the two polygons a place where they have boundary lines that are coincident. But the IM is additive  this does not preclude also having the situation where II = 2 somewhere else. The fact that A.overlaps(B) = true and A.intersection(B) = Line probably indicates that there is a very small discrepancy between vertices along the "shared" boundary. Due to precision issues this can cause the result of predicates to be inconsistent with overlay operations. See D7 here for a further explanation: http://tsusiatsoftware.net/jts/jtsfaq/jtsfaq.html#D You can confirm this visually in the JTS TestBuilder by using the Magnify Topology feature: http://linearthinking.blogspot.ca/2010/08/magnifyingtopologyusingjts.html Or even better, post the WKT or WKB of the geometries so I can confirm. On Wed, May 1, 2013 at 11:23 AM, Shahak Nagiel <snagiel@...> wrote: > I've got two multipolygons whichvisually and by designintersect but > should not overlap. (Visualize two adjacent zip > codes/cities/counties/countries.) However, poly1.overlaps(poly2) returns > true. > > So I get the IntersectionMatrix (poly1.relate(poly2)), which yields: > 212111212. This confuses me. The boundaryboundary relationship (1) > suggests they share only a onedimensional boundary. Indeed, calling > poly1.intersection(poly2) yields a multilinestring. But the > interiorinterior relationship (2) suggests a twodimensional overlap, and > would explain why poly1.overlaps(poly2) returns true. > > In a unit test with simpler geometries (two overlapping squares), I find a > similar relationship: 212101212, the key difference being the boundaryboundary > relationship (0 in this case). This makes sense, since their boundaries > cross at (0dimensional) points, and their overlap is a 2dimensional > polygon. When I line them up sidebyside, then I get the expected > relationship FF2F11212 and square1.overlaps(square2) == false. So, in > other words, I'm unable to duplicate the relationship I see with the poly's > above. > > Can anyone make sense of this? > > Thanks! > > >  > Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET > Get 100% visibility into your production application  at no cost. > Codelevel diagnostics for performance bottlenecks with <2% overhead > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap1 > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Shahak Nagiel <snagiel@ya...>  20130501 18:23:29

I've got two multipolygons whichvisually and by designintersect but should not overlap. (Visualize two adjacent zip codes/cities/counties/countries.) However, poly1.overlaps(poly2) returns true. So I get the IntersectionMatrix (poly1.relate(poly2)), which yields: 212111212. This confuses me. The boundaryboundary relationship (1) suggests they share only a onedimensional boundary. Indeed, calling poly1.intersection(poly2) yields a multilinestring. But the interiorinterior relationship (2) suggests a twodimensional overlap, and would explain why poly1.overlaps(poly2) returns true. In a unit test with simpler geometries (two overlapping squares), I find a similar relationship: 212101212, the key difference being the boundaryboundary relationship (0 in this case). This makes sense, since their boundaries cross at (0dimensional) points, and their overlap is a 2dimensional polygon. When I line them up sidebyside, then I get the expected relationship FF2F11212 and square1.overlaps(square2) == false. So, in other words, I'm unable to duplicate the relationship I see with the poly's above. Can anyone make sense of this? Thanks! 