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}
(21) 
_{Dec}
(20) 
2016 
_{Jan}
(30) 
_{Feb}
(15) 
_{Mar}

_{Apr}

_{May}

_{Jun}
(1) 
_{Jul}
(20) 
_{Aug}

_{Sep}
(12) 
_{Oct}
(1) 
_{Nov}
(4) 
_{Dec}

S  M  T  W  T  F  S 

1
(1) 
2
(4) 
3
(8) 
4
(9) 
5
(9) 
6
(2) 
7
(1) 
8
(1) 
9

10

11
(1) 
12

13

14

15

16

17
(2) 
18
(2) 
19

20

21

22

23

24

25

26
(2) 
27

28

29

30

31





From: Martin Davis <mtnclimb@te...>  20131226 16:57:36

Send a patch to the list or to me directly. Please include some suitable unit tests. On 12/26/2013 8:40 AM, Ricardo Longa wrote: > Hi, > > How can I commit a impovement in class DouglasPeuckerLineSimplifier? > > ** 
From: Ricardo Longa <ricardo.longa@gm...>  20131226 16:41:33

Hi, How can I commit a impovement in class DouglasPeuckerLineSimplifier? *Ricardo Longa* Analista de Sistemas (48) 9979 2240 Facebook <http://www.facebook.com/ricardo.longa>; / AboutMe<http://about.me/ricardo.longa>; / Twitter <http://www.twitter.com/ricardolonga>; / Site<http://www.ricardolonga.com.br/>; *"Há três métodos para ganhar sabedoria: primeiro, por reflexão, que é o mais nobre; segundo, por imitação, que é o mais fácil; e terceiro, por experiência, que é o mais amargo.". (Confúcio)* 
From: Martin Davis <mtnclimb@gm...>  20131218 17:15:08

A prelimary version of VisvalingnamWhyatt is now commited: http://sourceforge.net/p/jtstoposuite/code/HEAD/tree/trunk/jts/java/src/com/vividsolutions/jts/simplify/VWSimplifier.java It hasn't been optimized for performance yet, but I think I know how to do this, so will hope to do this over Xmas. Also, the various simplification classes are crying out for refactoring into a common framework  I hope to look at this as well. Also needs unit tests. If someone wants to volunteer to write some that would be great. The DP ones can be copied, for a start. On Tue, Dec 17, 2013 at 9:43 AM, Martin Davis <mtnclimb@...> wrote: > As a matter of fact I just started working on that a couple of days ago. > I'll post when it's done (may not be til after Xmas). > > Martin > > > On Tue, Dec 17, 2013 at 9:24 AM, Shahak Nagiel <snagiel@...> wrote: > >> I'm curious whether anyone's done any work trying to incorporate the Visvalingam >> line simplification algorithm into JTS? >> >> See http://www2.dcs.hull.ac.uk/CISRG/publications/DPs/DP10/DP10.html >> >> Thanks, >> Shahak >> >> >>  >> Rapidly troubleshoot problems before they affect your business. Most IT >> organizations don't have a clear picture of how application performance >> affects their revenue. With AppDynamics, you get 100% visibility into your >> Java,.NET, & PHP application. Start your 15day FREE TRIAL of AppDynamics >> Pro! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >> _______________________________________________ >> Jtstoposuiteuser mailing list >> Jtstoposuiteuser@... >> https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser >> >> > 
From: Shahak Nagiel <snagiel@ya...>  20131218 16:18:07

Fantastic! (I thought you were going to invite me to volunteer.) I look forward to testing it out. Happy holidays. On Tuesday, December 17, 2013 12:43 PM, Martin Davis <mtnclimb@...> wrote: As a matter of fact I just started working on that a couple of days ago. I'll post when it's done (may not be til after Xmas). Martin On Tue, Dec 17, 2013 at 9:24 AM, Shahak Nagiel <snagiel@...> wrote: I'm curious whether anyone's done any work trying to incorporate the Visvalingam line simplification algorithm into JTS? > > >See http://www2.dcs.hull.ac.uk/CISRG/publications/DPs/DP10/DP10.html > > >Thanks, >Shahak > >Rapidly troubleshoot problems before they affect your business. Most IT >organizations don't have a clear picture of how application performance >affects their revenue. With AppDynamics, you get 100% visibility into your >Java,.NET, & PHP application. Start your 15day FREE TRIAL of AppDynamics Pro! >http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >_______________________________________________ >Jtstoposuiteuser mailing list >Jtstoposuiteuser@... >https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Martin Davis <mtnclimb@gm...>  20131217 17:43:19

As a matter of fact I just started working on that a couple of days ago. I'll post when it's done (may not be til after Xmas). Martin On Tue, Dec 17, 2013 at 9:24 AM, Shahak Nagiel <snagiel@...> wrote: > I'm curious whether anyone's done any work trying to incorporate the Visvalingam > line simplification algorithm into JTS? > > See http://www2.dcs.hull.ac.uk/CISRG/publications/DPs/DP10/DP10.html > > Thanks, > Shahak > > >  > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Shahak Nagiel <snagiel@ya...>  20131217 17:24:51

I'm curious whether anyone's done any work trying to incorporate the Visvalingam line simplification algorithm into JTS? See http://www2.dcs.hull.ac.uk/CISRG/publications/DPs/DP10/DP10.html Thanks, Shahak 
From: Martin Davis <mtnclimb@gm...>  20131211 18:08:26

On Sun, Dec 8, 2013 at 3:43 PM, Michael Bedward <michael.bedward@...>wrote: > > > > One potential issue I just thought of is that the STRtree NN algorithm > > relies on the envelopeenvelope distance being a "consistent proxy" with > the > > actual distance between the geometry and the query geometry (the point). > > However, I think this is still the case with the Sector distance, so that > > should be fine. > > Hmm... but if "consistent proxy for" means something like "has the > same rank order as" won't there be a problem ? > "Consistent proxy" means that the item distance algorithm must be bounded by the maximum and minimum Euclidean distances between the envelopes of the items. This is to allow pruning of known dead branches during the tree search. I think the actual sector distance algorithm obeys this bound (the sector distance is within the envelope distances). But I'm not sure about the idea of returning a MAX_DOUBLE distance to prune geometries fully outside the sector. It *might* work  but it might not. The first step is to set up a simple test case and try it out. If this doesn't work, then will have to think again about how to discard outofsector geometries. 
From: Michael Bedward <michael.bedward@gm...>  20131208 23:43:33

Hi Martin, > i hadn't realized that you wanted the distance *within* the sector. My fault  I didn't spell it out clearly in my first post. > You > can't use the regular Geometry.distance(Point) method for this, of course. > I'd think about implementing a custom Sector.distance(Geometry) algorithm, > which computes the distance via a scan of the polygon segments. Yep, sounds good. > One potential issue I just thought of is that the STRtree NN algorithm > relies on the envelopeenvelope distance being a "consistent proxy" with the > actual distance between the geometry and the query geometry (the point). > However, I think this is still the case with the Sector distance, so that > should be fine. Hmm... but if "consistent proxy for" means something like "has the same rank order as" won't there be a problem ? > Not sure about the idea of cutting up the polygons and then using > PreparedGeometry. Cutting them up will probably speed things up, although > don't you then have to "reduce" the set of distances for a single polygon to > find the minimum? Luckily no. All I need is the minimum distance within sector from a point to any boundary. > And if you use the specialpurpose distance and > intersects tests I propose above, then I don't think that PreparedGeometry > is needed? Right  cool ! I had imagined that I'd be doing intersections as per previous messages, hence the idea of using PreparedGeometry. Michael 
From: Landon Blake <sunburned.surveyor@gm...>  20131207 02:08:24

John: Can you tell me a little bit about your use case? What is driving the need for the code? Do you have any sketches or diagrams that explain what you are trying to do? I'm just curious. Landon On Wed, Dec 4, 2013 at 9:23 PM, Martin Davis <mtnclimb@...> wrote: > Sorry, John, there's nothing in JTS which does anything like this. You'll > have to code it up more or less from scratch. > > If performance is an issue, you can look at indexing the segments of the > geometry with an STRtree, and then using the nearestNeighbour method to > efficiently find the one closest to each point. > > > On Wed, Dec 4, 2013 at 6:20 PM, John McDonald < > mcdonald.john.alan@...> wrote: > >> What I would like to do: >> >> Given a Polygon (or MultiPolygon) and a Point, p, outside the Polygon, >> I'd like to find the Polygon boundary line segment (p0,p1) closest to p. >> Then I'd like to split that boundary segment into 2: (p0,p)(p,p1), emitting >> a refined (Multi)Polygon Or possibly by (p0,pp)(pp,p1), where pp is the >> projection of p onto (p0,p1). >> >> I want to do this with the a single (Multi)Polygon with a set of points, >> so an ideal strategy would compute all the split locations first, and then >> refine the (Multi)Polygon in one pass. >> >> The best idea I've come up with is so far is to imitate >> com.vividsolutions.jts.densify.Densifier, replacing the onthefly >> computation of split locations with ones that are predetermined. >> >> Is there a better way to do this? I'm hoping there's something that >> already does this kind of refinement, via noding, snapping, unioning, or >> soemthing like that, and I'm just failing to recognize it. >> >> >> >>  >> Sponsored by Intel(R) XDK >> Develop, test and display web and hybrid apps with a single code base. >> Download it for free now! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk >> _______________________________________________ >> Jtstoposuiteuser mailing list >> Jtstoposuiteuser@... >> https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser >> >> > > >  > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Martin Davis <mtnclimb@gm...>  20131206 16:25:57

Nice! As your pictures show, using the envelope as a proxy for the polygon is not accurate when the envelope intersects the Sector. It would be possible (and I think efficient) to implement an accurate Sector.intersects(Geometry) test, using the following algorithm: IF ! Sector.intersects(Envelope) return false; where intersects(Envelope) tests if all points lie on the same side of the axisparallel ray and the 45degree ray (happily, the test for which side of a 45degree ray is straightforward) ELSE test if the polygon intersects by scanning all segments and test if any of them terminate in the sector or intersect the sector rays. (this test involves some fiddly arithmetic, but nothing too complicated) i hadn't realized that you wanted the distance *within* the sector. You can't use the regular Geometry.distance(Point) method for this, of course. I'd think about implementing a custom Sector.distance(Geometry) algorithm, which computes the distance via a scan of the polygon segments. One potential issue I just thought of is that the STRtree NN algorithm relies on the envelopeenvelope distance being a "consistent proxy" with the actual distance between the geometry and the query geometry (the point). However, I think this is still the case with the Sector distance, so that should be fine. Not sure about the idea of cutting up the polygons and then using PreparedGeometry. Cutting them up will probably speed things up, although don't you then have to "reduce" the set of distances for a single polygon to find the minimum? And if you use the specialpurpose distance and intersects tests I propose above, then I don't think that PreparedGeometry is needed? On Thu, Dec 5, 2013 at 11:47 PM, Michael Bedward <michael.bedward@...>wrote: > Hi Martin, > > I've now got some initial code working for directionconstrained > nearestneighbour search. > > There is a Sector class which holds an origin location and an angular > interval. This has a method which takes an Envelope and tests whether > it is visible within the sector. A SectorItemDistance object takes a > Sector and uses it to filter items in the STRtree search before > calculating the distance to the sector origin. This part works really > nicely ! I've coded it in Scala but it could easily be Javanized. > > Now I need to go the next step. This diagram... > > http://imagebin.org/280824 > > ...shows a search sector from north to northwest. The blue dot and > line indicate the global nearest point to the sector origin on a > polygon boundary  as returned by the current test code. The red dot > and line indicate what I actually want: the nearest boundary point > within the sector. > > If I take my original idea of radially stacked polygons representing > the sector and test for intersection with a candidate polygon as part > of the ItemDistance code, I can return a value for categorized > distance (based on the sector polygon that intersects) or a nodata > value. > > That would also deal with pesky edge cases such as the one in this > example... > > http://imagebin.org/280825 > > Here the sector origin lies within the envelope of the large polygon, > so that polygon would be returned as the nearest neighbour in the > current test code. But the polygon itself isn't "visible" within the > sector  it's the small one that we want. The intersection tests would > pick that up. > > In the quest for efficiency, I'm splitting the input polygons with a > regular grid and creating PreparedGeometry objects from the resulting > parts before loading them into the STRtree. > > Will keep you posted :) > > Michael > > > 
From: Michael Bedward <michael.bedward@gm...>  20131206 07:47:21

Hi Martin, I've now got some initial code working for directionconstrained nearestneighbour search. There is a Sector class which holds an origin location and an angular interval. This has a method which takes an Envelope and tests whether it is visible within the sector. A SectorItemDistance object takes a Sector and uses it to filter items in the STRtree search before calculating the distance to the sector origin. This part works really nicely ! I've coded it in Scala but it could easily be Javanized. Now I need to go the next step. This diagram... http://imagebin.org/280824 ...shows a search sector from north to northwest. The blue dot and line indicate the global nearest point to the sector origin on a polygon boundary  as returned by the current test code. The red dot and line indicate what I actually want: the nearest boundary point within the sector. If I take my original idea of radially stacked polygons representing the sector and test for intersection with a candidate polygon as part of the ItemDistance code, I can return a value for categorized distance (based on the sector polygon that intersects) or a nodata value. That would also deal with pesky edge cases such as the one in this example... http://imagebin.org/280825 Here the sector origin lies within the envelope of the large polygon, so that polygon would be returned as the nearest neighbour in the current test code. But the polygon itself isn't "visible" within the sector  it's the small one that we want. The intersection tests would pick that up. In the quest for efficiency, I'm splitting the input polygons with a regular grid and creating PreparedGeometry objects from the resulting parts before loading them into the STRtree. Will keep you posted :) Michael On 3 December 2013 14:29, Martin Davis <mtnclimb@...> wrote: > Sounds good, Michael. If this proves out it would be worth a blog post by > you and/or me. (With a picture or two, of course!) > > > On Mon, Dec 2, 2013 at 6:07 PM, Michael Bedward <michael.bedward@...> > wrote: >> >> That sounds like it could be just the ticket Martin ! >> >> Thanks so much. I'll play with that and let you know how I get on. >> >> Michael >> >> >> On 3 December 2013 12:36, Martin Davis <mtnclimb@...> wrote: >> > I just realized that you don't even have to alter STRtree to support a >> > custom filter function. STRtree already provides a method which accepts >> > a >> > custom ItemDistance function. This could be given an implementation >> > which >> > forces the distance of objects *not* in the current compass slice to be >> > Double.MAX_VALUE. >> > >> > >> > On Mon, Dec 2, 2013 at 5:25 PM, Martin Davis <mtnclimb@...> wrote: >> >> >> >> A fascinating problem, Michael. >> >> >> >> How's this for a idea: use a directionconstrained nearest neighbour >> >> search. (Don't bother googling this  I just made it up!). The STRtree >> >> in >> >> JTS provides a nearestneighbour search made efficient by walking the >> >> Rtree >> >> node hierarchy. It should be possible to add some further logic to the >> >> search algorithm to reject candidates which do not lie in the compass >> >> direction of interest. (It seems like it will be straightforward to >> >> compute >> >> whether a candidate lies with the compass slice). >> >> >> >> You'll have to open up the STRtree nearest neighbour code and add >> >> provision for a custom filter to be run on each candidate as they are >> >> added >> >> to the current search list. This should be built using a filter >> >> function >> >> interface, to make it reusable. >> >> >> >> >> >> On Mon, Dec 2, 2013 at 4:21 PM, Michael Bedward >> >> <michael.bedward@...> wrote: >> >>> >> >>> Hi Martin, >> >>> >> >>> The following is a general algorithm query rather than a specific JTS >> >>> question  hope that's ok. >> >>> >> >>> I have a set of polygons which represent urban areas within a >> >>> fireprone landscape. There are about 5000 polygons varying widely in >> >>> area, spatial extent, number of vertices and boundary complexity. >> >>> >> >>> I have the task of creating a regular grid of sample points within the >> >>> surrounding landscape and, for each point, determining the distance to >> >>> the nearest polygon within each of eight compass segments (ie. N to >> >>> NE, NE to E...). The results only need to be expressed as categorized >> >>> values based on a small number of distance cutpoints. >> >>> >> >>> I've been trying to nut out something other than a brute force >> >>> approach to this without much success so far. One of the possibly less >> >>> brutish approaches I've thought of involves the following: >> >>> >> >>> 1. Split up the urban polygons by intersecting them with a regular >> >>> lattice, create PreparedGeometry objects for the resulting parts and >> >>> put them into an STRtree. >> >>> >> >>> 2. Construct a sampling template made up of polygons representing the >> >>> compass segments, each split according to the distance cutpoints >> >>> (looking a bit like a dart board), possibly using a custom >> >>> CoordinateSequence to have vertex coordinates calculated on the fly >> >>> based on the centre coordinate. >> >>> >> >>> 3. For each sample point location: >> >>> For each compass segment: >> >>> For inner to outer segment part: >> >>> Query the spatial index with the segment part envelope >> >>> and, if any urban polygons are returned, test for >> >>> intersection. >> >>> >> >>> I'm sure there must be a better way. Any suggestions or comments will >> >>> be gratefully accepted. >> >>> >> >>> Michael >> >>> >> >>> >> >>> >> >>>  >> >>> Rapidly troubleshoot problems before they affect your business. Most >> >>> IT >> >>> organizations don't have a clear picture of how application >> >>> performance >> >>> affects their revenue. With AppDynamics, you get 100% visibility into >> >>> your >> >>> Java,.NET, & PHP application. Start your 15day FREE TRIAL of >> >>> AppDynamics >> >>> Pro! >> >>> >> >>> >> >>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk >> >>> _______________________________________________ >> >>> Jtstoposuiteuser mailing list >> >>> Jtstoposuiteuser@... >> >>> https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser >> >> >> >> >> > > > 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20131205 21:11:01

OK. I got it from the trunk. On Thu, Dec 5, 2013 at 7:27 PM, Brian Sanjeewa Rupasinghe <jinkabs@... > wrote: > Hi Martin, > > Thanks. I do not find any LineDissolver class in the API. Is it LineMerger > class you are > referring to?. Also, i do not see that the JavaDoc is updated. > > Brian. > > > > On Thu, Dec 5, 2013 at 5:04 PM, Martin Davis <mtnclimb@...> wrote: > >> Ok, mystery solved, I think. The constraints need to be segmentunique  >> in other words, there cannot be any duplicate segments in the set of >> constraint edges. So you will have to run a dissolve on your input >> constraints. The LineDissolver class will do this. >> >> When I do this I can use a tolerance of 0 and it completes. >> >> I've updated the Javadoc to mention this requirement. >> >> >> >> On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < >> jinkabs@...> wrote: >> >>> Hi, >>> >>> I used the following method for the triangulation. I use polygons as >>> constraints as well. Input Geometry is multipoint of all polygon vertices. >>> Then polygons are used as constraints in a GeometryCollection. Was it >>> because i used polygon geometry itself as constraints rather than its line >>> segments? >>> >>> public static Geometry TriangulationBuilder (MultiPoint mp, >>> ArrayList<Geometry> alg, double tolerance) >>> { >>> GeometryFactory gf = new GeometryFactory(); >>> ConformingDelaunayTriangulationBuilder cdtb = new >>> ConformingDelaunayTriangulationBuilder(); >>> //constriant geometry >>> Geometry consegs = gf.buildGeometry(alg); >>> //GeometryCollection g_cp = (GeometryCollection) >>> gf.createGeometryCollection(als); >>> //set sites for triangulation >>> cdtb.setSites(mp); >>> //set constraints >>> cdtb.setConstraints(consegs); >>> //set tolerance 0.00001 >>> cdtb.setTolerance(tolerance); >>> //Retrieving triangles >>> Geometry Trigeom = cdtb.getTriangles(gf); >>> return Trigeom; >>> } >>> >>> > 
From: Martin Davis <mtnclimb@gm...>  20131205 20:32:25

Ah right, it's only in trunk right now. http://sourceforge.net/p/jtstoposuite/code/HEAD/tree/trunk/jts/java/src/com/vividsolutions/jts/dissolve/LineDissolver.java Will appear in JTS 1.14 RSN... For the time being, just extract the line strings (boundaries) and do a unary union on them. On Thu, Dec 5, 2013 at 11:27 AM, Brian Sanjeewa Rupasinghe < jinkabs@...> wrote: > Hi Martin, > > Thanks. I do not find any LineDissolver class in the API. Is it LineMerger > class you are > referring to?. Also, i do not see that the JavaDoc is updated. > > Brian. > > > > On Thu, Dec 5, 2013 at 5:04 PM, Martin Davis <mtnclimb@...> wrote: > >> Ok, mystery solved, I think. The constraints need to be segmentunique  >> in other words, there cannot be any duplicate segments in the set of >> constraint edges. So you will have to run a dissolve on your input >> constraints. The LineDissolver class will do this. >> >> When I do this I can use a tolerance of 0 and it completes. >> >> I've updated the Javadoc to mention this requirement. >> >> >> >> On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < >> jinkabs@...> wrote: >> >>> Hi, >>> >>> I used the following method for the triangulation. I use polygons as >>> constraints as well. Input Geometry is multipoint of all polygon vertices. >>> Then polygons are used as constraints in a GeometryCollection. Was it >>> because i used polygon geometry itself as constraints rather than its line >>> segments? >>> >>> public static Geometry TriangulationBuilder (MultiPoint mp, >>> ArrayList<Geometry> alg, double tolerance) >>> { >>> GeometryFactory gf = new GeometryFactory(); >>> ConformingDelaunayTriangulationBuilder cdtb = new >>> ConformingDelaunayTriangulationBuilder(); >>> //constriant geometry >>> Geometry consegs = gf.buildGeometry(alg); >>> //GeometryCollection g_cp = (GeometryCollection) >>> gf.createGeometryCollection(als); >>> //set sites for triangulation >>> cdtb.setSites(mp); >>> //set constraints >>> cdtb.setConstraints(consegs); >>> //set tolerance 0.00001 >>> cdtb.setTolerance(tolerance); >>> //Retrieving triangles >>> Geometry Trigeom = cdtb.getTriangles(gf); >>> return Trigeom; >>> } >>> >>> > 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20131205 19:27:52

Hi Martin, Thanks. I do not find any LineDissolver class in the API. Is it LineMerger class you are referring to?. Also, i do not see that the JavaDoc is updated. Brian. On Thu, Dec 5, 2013 at 5:04 PM, Martin Davis <mtnclimb@...> wrote: > Ok, mystery solved, I think. The constraints need to be segmentunique  > in other words, there cannot be any duplicate segments in the set of > constraint edges. So you will have to run a dissolve on your input > constraints. The LineDissolver class will do this. > > When I do this I can use a tolerance of 0 and it completes. > > I've updated the Javadoc to mention this requirement. > > > > On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < > jinkabs@...> wrote: > >> Hi, >> >> I used the following method for the triangulation. I use polygons as >> constraints as well. Input Geometry is multipoint of all polygon vertices. >> Then polygons are used as constraints in a GeometryCollection. Was it >> because i used polygon geometry itself as constraints rather than its line >> segments? >> >> public static Geometry TriangulationBuilder (MultiPoint mp, >> ArrayList<Geometry> alg, double tolerance) >> { >> GeometryFactory gf = new GeometryFactory(); >> ConformingDelaunayTriangulationBuilder cdtb = new >> ConformingDelaunayTriangulationBuilder(); >> //constriant geometry >> Geometry consegs = gf.buildGeometry(alg); >> //GeometryCollection g_cp = (GeometryCollection) >> gf.createGeometryCollection(als); >> //set sites for triangulation >> cdtb.setSites(mp); >> //set constraints >> cdtb.setConstraints(consegs); >> //set tolerance 0.00001 >> cdtb.setTolerance(tolerance); >> //Retrieving triangles >> Geometry Trigeom = cdtb.getTriangles(gf); >> return Trigeom; >> } >> >> 
From: Martin Davis <mtnclimb@gm...>  20131205 17:04:26

Ok, mystery solved, I think. The constraints need to be segmentunique  in other words, there cannot be any duplicate segments in the set of constraint edges. So you will have to run a dissolve on your input constraints. The LineDissolver class will do this. When I do this I can use a tolerance of 0 and it completes. I've updated the Javadoc to mention this requirement. On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < jinkabs@...> wrote: > Hi, > > I used the following method for the triangulation. I use polygons as > constraints as well. Input Geometry is multipoint of all polygon vertices. > Then polygons are used as constraints in a GeometryCollection. Was it > because i used polygon geometry itself as constraints rather than its line > segments? > > public static Geometry TriangulationBuilder (MultiPoint mp, > ArrayList<Geometry> alg, double tolerance) > { > GeometryFactory gf = new GeometryFactory(); > ConformingDelaunayTriangulationBuilder cdtb = new > ConformingDelaunayTriangulationBuilder(); > //constriant geometry > Geometry consegs = gf.buildGeometry(alg); > //GeometryCollection g_cp = (GeometryCollection) > gf.createGeometryCollection(als); > //set sites for triangulation > cdtb.setSites(mp); > //set constraints > cdtb.setConstraints(consegs); > //set tolerance 0.00001 > cdtb.setTolerance(tolerance); > //Retrieving triangles > Geometry Trigeom = cdtb.getTriangles(gf); > return Trigeom; > } > > 
From: Martin Davis <mtnclimb@gm...>  20131205 16:49:34

My apologies  when I ran ConformingDelaunayTriangles in the TestBuilder with your input, I was not setting the constraints. When I do this (by loading the polygons as the B geometry) I see the same error you were getting. I've just updated the TestBuilder to allow providing a tolerance value, and can confirm that it only works when the tolerance is > 3.5, as you said. This is obviously much too large. Not sure why this is problem right now. It may be because there are some segments which are almost parallel. On Thu, Dec 5, 2013 at 8:39 AM, Martin Davis <mtnclimb@...> wrote: > The sites are the A geometry, and the constraints are the B geometry. > > > On Thu, Dec 5, 2013 at 2:01 AM, Brian Sanjeewa Rupasinghe < > jinkabs@...> wrote: > >> Yes, That is the function i used in JTS TestBuilder. But there is no way >> to set constraints in that... >> >> Brian. >> >> >> >> 
From: Martin Davis <mtnclimb@gm...>  20131205 16:40:05

The sites are the A geometry, and the constraints are the B geometry. On Thu, Dec 5, 2013 at 2:01 AM, Brian Sanjeewa Rupasinghe <jinkabs@... > wrote: > Yes, That is the function i used in JTS TestBuilder. But there is no way > to set constraints in that... > > Brian. > > > Message: 3 > Date: Wed, 4 Dec 2013 14:05:45 0800 > From: Martin Davis <mtnclimb@...> > Subject: Re: [Jtstoposuiteuser] Delaunay Triangulation Snapping > Tolerance > Cc: "jtstoposuiteuser@..." > <jtstoposuiteuser@...> > MessageID: > < > CAK2ens2mnEUiLap2oiOCHRtHRO_13QW7VDcN28v5fyzeqr4Q@...> > ContentType: text/plain; charset="iso88591" > > You need to use the ConformingDelaunayTriangles function > > > > >  > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20131205 10:01:20

Yes, That is the function i used in JTS TestBuilder. But there is no way to set constraints in that... Brian. Message: 3 Date: Wed, 4 Dec 2013 14:05:45 0800 From: Martin Davis <mtnclimb@...> Subject: Re: [Jtstoposuiteuser] Delaunay Triangulation Snapping Tolerance Cc: "jtstoposuiteuser@..." <jtstoposuiteuser@...> MessageID: <CAK2ens2mnEUiLap2oiOCHRtHRO_13QW7VDcN28v5fyzeqr4Q@...> ContentType: text/plain; charset="iso88591" You need to use the ConformingDelaunayTriangles function 
From: Martin Davis <mtnclimb@gm...>  20131205 03:23:17

Sorry, John, there's nothing in JTS which does anything like this. You'll have to code it up more or less from scratch. If performance is an issue, you can look at indexing the segments of the geometry with an STRtree, and then using the nearestNeighbour method to efficiently find the one closest to each point. On Wed, Dec 4, 2013 at 6:20 PM, John McDonald <mcdonald.john.alan@...>wrote: > What I would like to do: > > Given a Polygon (or MultiPolygon) and a Point, p, outside the Polygon, I'd > like to find the Polygon boundary line segment (p0,p1) closest to p. Then > I'd like to split that boundary segment into 2: (p0,p)(p,p1), emitting a > refined (Multi)Polygon Or possibly by (p0,pp)(pp,p1), where pp is the > projection of p onto (p0,p1). > > I want to do this with the a single (Multi)Polygon with a set of points, > so an ideal strategy would compute all the split locations first, and then > refine the (Multi)Polygon in one pass. > > The best idea I've come up with is so far is to imitate > com.vividsolutions.jts.densify.Densifier, replacing the onthefly > computation of split locations with ones that are predetermined. > > Is there a better way to do this? I'm hoping there's something that > already does this kind of refinement, via noding, snapping, unioning, or > soemthing like that, and I'm just failing to recognize it. > > > >  > Sponsored by Intel(R) XDK > Develop, test and display web and hybrid apps with a single code base. > Download it for free now! > > http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk > _______________________________________________ > Jtstoposuiteuser mailing list > Jtstoposuiteuser@... > https://lists.sourceforge.net/lists/listinfo/jtstoposuiteuser > > 
From: John McDonald <mcdonald.alan@gm...>  20131205 02:20:19

What I would like to do: Given a Polygon (or MultiPolygon) and a Point, p, outside the Polygon, I'd like to find the Polygon boundary line segment (p0,p1) closest to p. Then I'd like to split that boundary segment into 2: (p0,p)(p,p1), emitting a refined (Multi)Polygon Or possibly by (p0,pp)(pp,p1), where pp is the projection of p onto (p0,p1). I want to do this with the a single (Multi)Polygon with a set of points, so an ideal strategy would compute all the split locations first, and then refine the (Multi)Polygon in one pass. The best idea I've come up with is so far is to imitate com.vividsolutions.jts.densify.Densifier, replacing the onthefly computation of split locations with ones that are predetermined. Is there a better way to do this? I'm hoping there's something that already does this kind of refinement, via noding, snapping, unioning, or soemthing like that, and I'm just failing to recognize it. 
From: Martin Davis <mtnclimb@gm...>  20131204 22:05:54

You need to use the ConformingDelaunayTriangles function On Wed, Dec 4, 2013 at 12:54 PM, Brian Sanjeewa Rupasinghe < jinkabs@...> wrote: > Hi Martin, > > I tested triangulation in TestBuilder. I used DelaunayEdges with tolerance > function. > Yes, with 0 tolerance it works, but you can see a few triangles are across > polygons > on top. It means that constraint enforcement was not considered. In the > testbuilder > is it possible to run my own method to check results? > > > > On Wed, Dec 4, 2013 at 7:43 PM, Martin Davis <mtnclimb@...> wrote: > >> Installs by default with JTS. Run TestBuilder.bat in the JTS bin >> directory. >> >> >> On Wed, Dec 4, 2013 at 11:37 AM, Brian Sanjeewa Rupasinghe < >> jinkabs@...> wrote: >> >>> Hi Martin >>> >>> I have not used TestBuilder. Any guide to install it in windows 7. >>> >>> >>> On Wed, Dec 4, 2013 at 7:25 PM, Martin Davis <mtnclimb@...> wrote: >>> >>>> I don't think so... this looks very similar to the code that the >>>> TestBuilder uses to run the ConformingDelaunayTriangulationBuilder. The >>>> CDTB extracts all line segments from whatever geometry is provided as the >>>> constraints. >>>> >>>> Try running your example in the TestBuilder and see if it works. Then >>>> perhaps debug into both and see where they diverge. >>>> >>>> >>>> >>>> On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < >>>> jinkabs@...> wrote: >>>> >>>>> Hi, >>>>> >>>>> I used the following method for the triangulation. I use polygons as >>>>> constraints as well. Input Geometry is multipoint of all polygon vertices. >>>>> Then polygons are used as constraints in a GeometryCollection. Was it >>>>> because i used polygon geometry itself as constraints rather than its line >>>>> segments? >>>>> >>>>> public static Geometry TriangulationBuilder (MultiPoint mp, >>>>> ArrayList<Geometry> alg, double tolerance) >>>>> { >>>>> GeometryFactory gf = new GeometryFactory(); >>>>> ConformingDelaunayTriangulationBuilder cdtb = new >>>>> ConformingDelaunayTriangulationBuilder(); >>>>> //constriant geometry >>>>> Geometry consegs = gf.buildGeometry(alg); >>>>> //GeometryCollection g_cp = (GeometryCollection) >>>>> gf.createGeometryCollection(als); >>>>> //set sites for triangulation >>>>> cdtb.setSites(mp); >>>>> //set constraints >>>>> cdtb.setConstraints(consegs); >>>>> //set tolerance 0.00001 >>>>> cdtb.setTolerance(tolerance); >>>>> //Retrieving triangles >>>>> Geometry Trigeom = cdtb.getTriangles(gf); >>>>> return Trigeom; >>>>> } >>>>> >>>>> >>>>> >>> >> > 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20131204 21:23:29

Hi Martin, It seems that the problem is not with snapping tolerance but with setting edges as constraints. When i commented SetConstraints, traingulation runs and results are similar to what testbuilder gives. Brian. 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20131204 20:54:29

Hi Martin, I tested triangulation in TestBuilder. I used DelaunayEdges with tolerance function. Yes, with 0 tolerance it works, but you can see a few triangles are across polygons on top. It means that constraint enforcement was not considered. In the testbuilder is it possible to run my own method to check results? On Wed, Dec 4, 2013 at 7:43 PM, Martin Davis <mtnclimb@...> wrote: > Installs by default with JTS. Run TestBuilder.bat in the JTS bin > directory. > > > On Wed, Dec 4, 2013 at 11:37 AM, Brian Sanjeewa Rupasinghe < > jinkabs@...> wrote: > >> Hi Martin >> >> I have not used TestBuilder. Any guide to install it in windows 7. >> >> >> On Wed, Dec 4, 2013 at 7:25 PM, Martin Davis <mtnclimb@...> wrote: >> >>> I don't think so... this looks very similar to the code that the >>> TestBuilder uses to run the ConformingDelaunayTriangulationBuilder. The >>> CDTB extracts all line segments from whatever geometry is provided as the >>> constraints. >>> >>> Try running your example in the TestBuilder and see if it works. Then >>> perhaps debug into both and see where they diverge. >>> >>> >>> >>> On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < >>> jinkabs@...> wrote: >>> >>>> Hi, >>>> >>>> I used the following method for the triangulation. I use polygons as >>>> constraints as well. Input Geometry is multipoint of all polygon vertices. >>>> Then polygons are used as constraints in a GeometryCollection. Was it >>>> because i used polygon geometry itself as constraints rather than its line >>>> segments? >>>> >>>> public static Geometry TriangulationBuilder (MultiPoint mp, >>>> ArrayList<Geometry> alg, double tolerance) >>>> { >>>> GeometryFactory gf = new GeometryFactory(); >>>> ConformingDelaunayTriangulationBuilder cdtb = new >>>> ConformingDelaunayTriangulationBuilder(); >>>> //constriant geometry >>>> Geometry consegs = gf.buildGeometry(alg); >>>> //GeometryCollection g_cp = (GeometryCollection) >>>> gf.createGeometryCollection(als); >>>> //set sites for triangulation >>>> cdtb.setSites(mp); >>>> //set constraints >>>> cdtb.setConstraints(consegs); >>>> //set tolerance 0.00001 >>>> cdtb.setTolerance(tolerance); >>>> //Retrieving triangles >>>> Geometry Trigeom = cdtb.getTriangles(gf); >>>> return Trigeom; >>>> } >>>> >>>> >>>> >> > 
From: Martin Davis <mtnclimb@gm...>  20131204 19:43:19

Installs by default with JTS. Run TestBuilder.bat in the JTS bin directory. On Wed, Dec 4, 2013 at 11:37 AM, Brian Sanjeewa Rupasinghe < jinkabs@...> wrote: > Hi Martin > > I have not used TestBuilder. Any guide to install it in windows 7. > > > On Wed, Dec 4, 2013 at 7:25 PM, Martin Davis <mtnclimb@...> wrote: > >> I don't think so... this looks very similar to the code that the >> TestBuilder uses to run the ConformingDelaunayTriangulationBuilder. The >> CDTB extracts all line segments from whatever geometry is provided as the >> constraints. >> >> Try running your example in the TestBuilder and see if it works. Then >> perhaps debug into both and see where they diverge. >> >> >> >> On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < >> jinkabs@...> wrote: >> >>> Hi, >>> >>> I used the following method for the triangulation. I use polygons as >>> constraints as well. Input Geometry is multipoint of all polygon vertices. >>> Then polygons are used as constraints in a GeometryCollection. Was it >>> because i used polygon geometry itself as constraints rather than its line >>> segments? >>> >>> public static Geometry TriangulationBuilder (MultiPoint mp, >>> ArrayList<Geometry> alg, double tolerance) >>> { >>> GeometryFactory gf = new GeometryFactory(); >>> ConformingDelaunayTriangulationBuilder cdtb = new >>> ConformingDelaunayTriangulationBuilder(); >>> //constriant geometry >>> Geometry consegs = gf.buildGeometry(alg); >>> //GeometryCollection g_cp = (GeometryCollection) >>> gf.createGeometryCollection(als); >>> //set sites for triangulation >>> cdtb.setSites(mp); >>> //set constraints >>> cdtb.setConstraints(consegs); >>> //set tolerance 0.00001 >>> cdtb.setTolerance(tolerance); >>> //Retrieving triangles >>> Geometry Trigeom = cdtb.getTriangles(gf); >>> return Trigeom; >>> } >>> >>> >>> > 
From: Brian Sanjeewa Rupasinghe <jinkabs@gm...>  20131204 19:37:11

Hi Martin I have not used TestBuilder. Any guide to install it in windows 7. On Wed, Dec 4, 2013 at 7:25 PM, Martin Davis <mtnclimb@...> wrote: > I don't think so... this looks very similar to the code that the > TestBuilder uses to run the ConformingDelaunayTriangulationBuilder. The > CDTB extracts all line segments from whatever geometry is provided as the > constraints. > > Try running your example in the TestBuilder and see if it works. Then > perhaps debug into both and see where they diverge. > > > > On Wed, Dec 4, 2013 at 10:31 AM, Brian Sanjeewa Rupasinghe < > jinkabs@...> wrote: > >> Hi, >> >> I used the following method for the triangulation. I use polygons as >> constraints as well. Input Geometry is multipoint of all polygon vertices. >> Then polygons are used as constraints in a GeometryCollection. Was it >> because i used polygon geometry itself as constraints rather than its line >> segments? >> >> public static Geometry TriangulationBuilder (MultiPoint mp, >> ArrayList<Geometry> alg, double tolerance) >> { >> GeometryFactory gf = new GeometryFactory(); >> ConformingDelaunayTriangulationBuilder cdtb = new >> ConformingDelaunayTriangulationBuilder(); >> //constriant geometry >> Geometry consegs = gf.buildGeometry(alg); >> //GeometryCollection g_cp = (GeometryCollection) >> gf.createGeometryCollection(als); >> //set sites for triangulation >> cdtb.setSites(mp); >> //set constraints >> cdtb.setConstraints(consegs); >> //set tolerance 0.00001 >> cdtb.setTolerance(tolerance); >> //Retrieving triangles >> Geometry Trigeom = cdtb.getTriangles(gf); >> return Trigeom; >> } >> >> >> 