Hey Jukka,

It might be possible to detect that less than 5 polygons are touching at a
point and treat that particular area as through the features were adjacent
to get the behavior in the 0.4 version of the plugin.  However, it would
 complicate the code quite a bit and slow it down.

Regarding packaging the plugin into a libfolder in
lib\ext\ojmapcoloring-0.5,   I used to do that with the DB Query plugin,
and prefer it also, but recent versions of OJ don't load plugins unless
they are in the lib\ext directory.  I'm using Linux
 OpenJUMP-1.6.1-r3501-PLUS to test.   Maybe the Windows versions behave
differently?

 -lreeder


On Sun, Sep 28, 2014 at 2:41 AM, Rahkonen Jukka (Tike) <
jukka.rahko...@mmmtike.fi> wrote:

>  Hi Larry,
>
>
>
> Version 0.5 colors now all the Finnish municipalities and all the
> multi-slice pizzas which I digitized fine. However, I think that when there
> are at maximum 5 areas touching on one point the version 0.4 does better
> coloring. The new version may give the same color for areas which touch on
> one point even it would not be necessary. My municipality map seems to be a
> good test dataset because it has a) multipolygons where the parts are
> touching on one point -> parts should be painted with the same color and b)
> separate simple polygons touching on one point -> would be better to paint
> with different colors if possible.
>
>
>
> If I had to select between 0.4 and 0.5 I think I would select 0.4 because
> of the better coloring result in normal cases.
>
>
>
> I prefer to keep the lib\ext folder a bit more clean by copying only
> ojmapcoloring.jar there and putting the rest of the package into folder
> lib\ext\ojmapcoloring-0.5. Perhaps it is still not worth changing the
> packaging or installation instructions.
>
>
>
> -Jukka Rahkonen-
>
>
>
>
>
> Larry Reeder wrote:
>
>
>
> Well, no matter how many times you slice it, a pizza is always (mostly)
> planar :-).  The problem with map coloring occurs when you can't draw a
> line on a plane from a fixed point on all features to a fixed point on
> their adjacent features without the lines crossing.  You have to lift the
> lines off the plane to connect adjacent features, so the adjacency graph
> becomes non-planar.
>
>
>
> I've got a fix for it now, one that doesn't count features touching on a
> point as adjacent.  Give it a try -
> https://sourceforge.net/projects/ojmapcoloring/files/0.5/
>
>
>
>     -lreeder
>
>
>
> On Mon, Sep 22, 2014 at 4:09 AM, Rahkonen Jukka (Tike) <
> jukka.rahko...@mmmtike.fi> wrote:
>
> Hi Larry,
>
>
>
> I should have actually guessed what happened. There used to be 8
> municipalies sharing a common landmark but because of some fusions there
> are only 6 left now.
>
> I tried to find a document that says that pizza is no more planar when it
> is sliced into 6 pieces.  However, I found some documents which define the
> four or five color theorem so that polygons are considered to be adjacent
> if they share an edge, not only a point. This is one of those
> http://www.mathpages.com/home/kmath266/kmath266.htm.
>
>
>
>
>
> -Jukka-
>
>
>
>
>
> Larry Reeder wrote:
>
>
>
> Hey Jukka,
>
>
>
> Just got a chance to look at this.   The region that is not coloring is
> interesting.
>
>
>
>
> ​
>
>   It's like a pizza sliced into six pieces, each touching at the point.
> You can't color this portion of the map with only five colors without two
> adjacent (maybe just adjacent at one point in the enter) regions having the
> same color.   In graph-theory terms, the graph is "non-planar" and can't be
> colored correctly with the five-color theorem.  The map coloring plugin
> detects this and refuses to color this portion of the map.
>
>
>
> From a practical standpoint, you probably don't care that regions touching
> at a single point have the same color, as long as they don't share a color
> along a long edge.   I'll look at updating the plugin to detect this and
> continue coloring.
>
>
>
>  -lreeder
>
>
>
>
>
>
>
> On Mon, Sep 15, 2014 at 7:15 AM, Rahkonen Jukka (Tike) <
> jukka.rahko...@mmmtike.fi> wrote:
>
> Hi,
>
> I found a shapefile from which some polygons are not colored with the Map
> coloring plugin v. 0.4.  Shapefile does not have topology errors but some
> multipolygons have quite a many parts because of archipelago. However,
> exploding multipolygons into polygons does not change the behaviour. The
> problematic shapefile can be found from
> http://latuviitta.org/downloads/ojmapcolor_error.zip
>
> Error appears always in the same place in South-West. For example features
> with OGR_FID=180 or 234 stays without color.
>
> -Jukka Rahkonen-
>
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to