Martin,

Thanks for the file, very impressive (did not guess where it was - but only searched in Canada).

You convinced me.
We had two previous discussions on the list about preserving weird shapefile as much as possible,
but none of them was about holes lying out of their shell.

So let's go where geotools already is.
I had a quick look on your suggestion #2, but could not see a way to improve. For more than one shell case, we don't know which hole is associated with which shell before the test (except if we assume that the description of a shell is immediately followed by the description of its holes)
Don't know if we should assume this.

For "more than one shell" case, I just changed the order of tests to do a bit more envelope tests and a bit less PiP tests but I could not measure the difference on your file.

Michaël


Very thorough investigation, Michael.

The shapefile I was using is here:

http://maps.cmparks.net/geoserver/metroparks/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=metroparks:tpi_1&outputFormat=SHAPE-ZIP

        (       http://tinyurl.com/c9k26gp      )
It is pretty gnarly - over 1M polygons, and has the following stats for the largest (vertices/holes):

18527 1112
58597 5526
31087 1598
24152 1318
17989 1386
20280 1098
20815 1336
44871 1204
61496 3024
28370 1120
46058 2156
21970 1546
91379 3034
121028 8012
81172 4544
28544 1272
20524 1074
55556 1992
2282758 169278
1166731 94382
241350 14250
142028 5922
139035 5690
33610 1344
83112 3134
38464 1048

GeoTools has had optimization #1 for quite a while, I think, if that's any reassurance.

On 4/20/2012 6:29 AM, Michaël Michaud wrote:
Hi,

Here are some test cases done with a 200 Mb shapefile (thanks Jukka)
containing : 221770 polygons
worst case : 287273 pts and 5484 holes

Dataset : Current OJ code / 1st Martin's optimization / 3rd Martin's optimization / 1st+3rd
whole shapefile : 41 s / 24 s / 24 s / 11 s
worst polygon : 4.6 s / 0.16 s / 3.3 s / 0.13 s

==>
1st optimization has a big impact on worst case and a medium impact on a whole file with mixed cases 3rd optimization has a small impact on worst case and a medium impact on a whole file with mixed cases

I'll commit the 3rd optimization anyway has it has no side effect.
For the 1st one, i'll try to check if it may have negative impact on some shapefile (if I can find or produce such shapefiles)




------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2


_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to