Diego Guidi
On Sun, Apr 24, 2011 at 1:15 PM, FredL <fred.l...@gmail.com> wrote:
> WKT strings attached.
>
> --
> You received this message because you are subscribed to the Google Groups
> "NetTopologySuite" group.
> To post to this group, send email to nettopol...@googlegroups.com.
> To unsubscribe from this group, send email to
> nettopologysui...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nettopologysuite?hl=en.
>
> -----Ursprüngliche Nachricht-----
> Von: nettopol...@googlegroups.com
> [mailto:nettopol...@googlegroups.com] Im Auftrag von FredL
> Gesendet: Dienstag, 26. April 2011 15:14
> An: NetTopologySuite
> Betreff: Re: R: Re: STIntersection performance
Hi Diego, perhaps try with r538 or earlier to make sure I didn’t break anything aliasing ArrayList = List<Object> etc when doing the Silverlight stuff...
--
Thinking about it the alias only applies within Silverlight – in .Net it stays as ArrayList...
-----Original Message-----
From: nettopol...@googlegroups.com [mailto:nettopol...@googlegroups.com] On Behalf Of Diego Guidi
Sent: 26 April 2011 16:42
To: nettopol...@googlegroups.com
Subject: Re: R: Re: STIntersection performance
> Thinking about it the alias only applies within Silverlight - in .Net it
> stays as ArrayList...
exactly
--
this is the best at the moment :(
> -----Ursprüngliche Nachricht-----
> Von: nettopol...@googlegroups.com
> [mailto:nettopol...@googlegroups.com] Im Auftrag von Diego Guidi
> Gesendet: Dienstag, 3. Mai 2011 09:07
> An: nettopol...@googlegroups.com
> Betreff: Re: R: Re: R: Re: R: Re: STIntersection performance
slows the test SlowIntersectionTest.TestSlowerSegmentString by 8 times
(from 100 to 800 milliseconds, in Release). but inputLines isn't used,
is simply filled!
times are comparable in other cases, i.e
//inputLines[0] = p1;
//inputLines[1] = p2;
//inputLines[2] = p3;
//inputLines[3] = p4;
result = ComputeIntersect(p1, p2, p3, p4);
executes in the same time in java and .net
Diego,
here some first results:
SlowIntersectionTest.TestSlowerSegmentString : Passed
NodingValidator.CheckValid => ElapsedMilliseconds: 1741
FastNodingValidator.CheckValid => ElapsedMilliseconds: 62
--
You are right, PreparedGeometries are for predicate computation only.
To solve a problem like yours, you might want to
- Create a spatial index (quadtree) on your grid geometries.
- Query that for possible intersecting grid cells
- Perform a intersects operation on only those.
- Union the resulting geometries (if that is necessary at all)
{
...
if (pg.Contains(poly))
gridList.Add(poly);
else if (pg.Intersects(poly))
{
var int = transformedShape.Intersection(poly);
if (int != null)
gridList.Add(int);
}
}
}