Hi WanMil,

On Fri, Jan 22, 2010 at 12:19:31AM +0100, WanMil wrote:
> Attached patch can be summarized very easy:
>
> * Major speedup for mp code
>
> Please test and commit if no problems arise.

Sorry for nitpicking, but could you please fix a few formatting issues
and comments in the patch?  Some changes look like they could be
accidental, such as this one:

> -                             // mark this ways as artificially closed
> +                             // mark this ways as artifically closed
>                               way.closeWayArtificial();

The correct spelling is "artificially".

> @@ -357,8 +359,9 @@
>                       JoinedWay tempWay = it.next();
>                       if (tempWay.isClosed() == false) {
>                               if (first) {
> -                                     log.warn(
> -                                             "Cannot join the following ways 
> to closed polygons. MP-Relation",
> +                                     log
> +                                                     .warn(
> +                                                                     "Cannot 
> join the following ways to closed polygons. MP-Relation",
>                                                                       
> toBrowseURL());
>                               }
>                               logWayURLs(Level.WARNING, "- way:", tempWay);
> @@ -810,7 +813,9 @@
>        */
>       private Way singularAreaToWay(Area area, long wayId) {
>               if (area.isSingular() == false) {
> -                     log.warn("singularAreaToWay called with non singular 
> area. Multipolygon ",
> +                     log
> +                                     .warn(
> +                                                     "singularAreaToWay 
> called with non singular area. Multipolygon ",
>                                                       toBrowseURL());
>               }
>               if (area.isEmpty()) {

These apparently are white-space changes that make the code uglier
to my eye.  (It is a matter of taste, of course.)

> @@ -994,7 +992,7 @@
>        * 
>        * @param ring1
>        *            a closed way
> -      * @param ring2 A second closed way.
> +      * @param ring2
>        * @return true if ring1 contains ring2
>        */
>       private boolean contains(JoinedWay ring1, JoinedWay ring2) {

You are removing the parameter description of ring2.

> @@ -1079,19 +1135,80 @@
>        */
>       private static class JoinedWay extends Way {
>               private final List<Way> originalWays;
> -             private boolean closedArtifical;
> +             private boolean closedArtifical = false;
> +
> +             public int minLat;
> +             public int maxLat;
> +             public int minLon;
> +             public int maxLon;
> +             private Rectangle bounds = null;

It would be nice to have some comments for all members and
methods of JoinedWay.  (OK, it is a work in progress.)

> @@ -1180,4 +1298,5 @@
>                       this.ring = ring;
>               }
>       }
> +
>  }

It is a matter of taste, but I would not like empty lines between
closing braces.

(I will leave it up to Mark or Steve to commit the patch.
I know too little about the multipolygon code, and I haven't tested
generate-sea after the mp merge.)

Best regards,

        Marko
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to