Re: [josm-dev] Wireframe saves the day for a complex multipolygon

2010-02-07 Thread Jiri Klement
Multipolygon painting speed was improved in 2793, but Lake Inari was
very slow anyway, because it contains multiple outer polygons. I've
added optimalization for this case today (r2948).

Btw. outer polygons are not used correctly in the lake, when there is
small lake inside of island on the big lake, the small lake shouldn't
be part of the big lake multipolygon.

On Sat, Feb 6, 2010 at 9:17 PM, Marko Mäkelä marko.mak...@iki.fi wrote:
 On Sat, Feb 06, 2010 at 07:42:30PM +0100, Sebastian Klein wrote:
 There is a wireframe mode in the view menu. This could be useful for
 tracing.

 I found the wireframe mode essential today when defining a lake
 multipolygon in JOSM r2711 (oldish, I know).  Without wireframe,
 JOSM dozed for maybe 20 seconds between every action.  Even selecting
 menus did not work.  If you want to repeat this, check Lake Inari
 http://www.openstreetmap.org/browse/relation/402543.

        Marko

 ___
 josm-dev mailing list
 josm-dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/josm-dev


___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Wireframe saves the day for a complex multipolygon

2010-02-07 Thread Marko Mäkelä
Jiri, thanks for your quick response!

On Sun, Feb 07, 2010 at 11:09:09AM +0100, Jiri Klement wrote:
 Multipolygon painting speed was improved in 2793, but Lake Inari was
 very slow anyway, because it contains multiple outer polygons. I've
 added optimalization for this case today (r2948).
 
 Btw. outer polygons are not used correctly in the lake, when there is
 small lake inside of island on the big lake, the small lake shouldn't
 be part of the big lake multipolygon.

I followed the example on the wiki page
http://wiki.openstreetmap.org/wiki/Relation:multipolygon
which does suggest that lakes within islands can be defined as role=outer:

--- start quote ---
From the possibility of having multiple outer rings in one relation, it also 
follows that you can easily model islands within a hole:

relation id=1
  tag k=type v=multipolygon /
  member type=way id=1 role=outer /
  member type=way id=2 role=inner /
  member type=way id=3 role=outer /
/relation

A construct like this would previously have required different multipolygon
relations, one with way 1 being outer and way 2 being inner, as well as one
with way 2 being outer and way 3 being innner. Such cascading is still
recommended when the island in the middle is something else than the area
on the outside, but where the island is the same stuff it can just be
made a hole in the hole. 
--- end quote ---

Admittedly, the lakes within islands are not the same stuff as the outer
lake (they should at least be called something else than the main lake).
I will fix this soonish, also to give mkgmap's multipolygon code some
further exercise.  (Mkgmap must split multipolygons to normal polygons
for Garmin.)

Another problem that I had with multipolygons was defining one for
Kemijärvi today (http://www.openstreetmap.org/browse/changeset/3812690,
http://www.openstreetmap.org/browse/relation/403320).
JOSM complained about intersecting lines, not saying which lines, but
I could not see anything special on the screen, except some
almost-self-intersecting outer coastline.  Based on the node count given
(5008 IIRC), I guessed that it would be the outer coastline that JOSM is
complaining about.  The outer coastline would consist of 9*500+508 nodes.

One last thing: Is there an easy way to download a way, node or relation
by the browse URL?  I have clicked in the web browser to a random node and
copied the coordinate URL to JOSM.  I wish there were a simpler method.
Also, would it be possible to download select relation members in the
relation browser, say, if I only want to tweak the coastline but not the
islands?  There are many complex lakes in Finland.

Marko

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Wireframe saves the day for a complex multipolygon

2010-02-07 Thread Frederik Ramm
Hi,

Marko Mäkelä wrote:
 Btw. outer polygons are not used correctly in the lake, when there is
 small lake inside of island on the big lake, the small lake shouldn't
 be part of the big lake multipolygon.
 
 I followed the example on the wiki page
 http://wiki.openstreetmap.org/wiki/Relation:multipolygon
 which does suggest that lakes within islands can be defined as role=outer:

I wrote that Wiki page and I still think it makes sense. This method 
(where there may be additional outers inside inners) also conforms to 
the OGC simple features geometry rules, i.e. everybody does it.

 One last thing: Is there an easy way to download a way, node or relation
 by the browse URL?

Not the browse URL but the raw XML URL 
(http://api.openstreetmap.org/api/0.6/node/123456) - you can enter that 
in JOSM's open location dialog (from the File menu). When downloading 
ways or relations that way, add /full to the end of the URL.

Bye
Frederik

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Wireframe saves the day for a complex multipolygon

2010-02-07 Thread Matthias Julius
Frederik Ramm frede...@remote.org writes:

 Hi,

 Marko Mäkelä wrote:
 Btw. outer polygons are not used correctly in the lake, when there is
 small lake inside of island on the big lake, the small lake shouldn't
 be part of the big lake multipolygon.
 
 I followed the example on the wiki page
 http://wiki.openstreetmap.org/wiki/Relation:multipolygon
 which does suggest that lakes within islands can be defined as role=outer:

 I wrote that Wiki page and I still think it makes sense. This method 
 (where there may be additional outers inside inners) also conforms to 
 the OGC simple features geometry rules, i.e. everybody does it.

This might be correct use of the Multipolygon relation, but is the lake
on the island really part of the outer lake?

If it is a separate lake with its own name I would say it should be a
separate object for OSM.

Matthias

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Wireframe saves the day for a complex multipolygon

2010-02-07 Thread Marko Mäkelä
On Sun, Feb 07, 2010 at 02:06:51PM -0500, Matthias Julius wrote:
  I followed the example on the wiki page
  http://wiki.openstreetmap.org/wiki/Relation:multipolygon
  which does suggest that lakes within islands can be defined as role=outer:
 
  I wrote that Wiki page and I still think it makes sense. This method 
  (where there may be additional outers inside inners) also conforms to 
  the OGC simple features geometry rules, i.e. everybody does it.
 
 This might be correct use of the Multipolygon relation, but is the lake
 on the island really part of the outer lake?
 
 If it is a separate lake with its own name I would say it should be a
 separate object for OSM.

I think that the lakes-within-islands would be separate lakes, and thus
Jiri is right: they should be excluded from the big-lake multipolygon.
When they were included in role=outer, mkgmap gave them the name of the
multipolygon.

Someone already fixed this by removing the lakes-within-islands from the
multipolygon relation and by removing natural=land from the islands, so that
the islands would be empty and no multipolygons will be needed for them.
The proper solution would be to keep the natural=land and define separate
multipolygons for each island that contains lakes.  I might do that later.

Thanks to Frederik for the exact Download URL tip.  It would be helpful
if JOSM would accept the http://api.openstreetmap.org/api/0.6/relation/402543
also on the command line.  It would also be very helpful if JOSM rewrote
the following types of URLs to API urls:
http://www.openstreetmap.org/browse/relation/402543
http://www.openstreetmap.org/?relation=402543

Marko

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Modifying the thread pool size in the WMS plugin

2010-02-07 Thread Jeffrey Ollie
Would it be possible to have a preference option to modify the thread
pool size in the WMS plugin?  I think that the patch below
accomplishes the task, but I don't have an environment set up to build
the plugin so that I can test it out.  It'd be even better if the
thread pool size could be customized for each WMS layer, but I'm not
familiar enough with the code to figure that out.  I don't want to
spam the various public servers with many more requests but I have a
private server that I can throw a lot more requests at.


diff --git a/src/wmsplugin/WMSLayer.java b/src/wmsplugin/WMSLayer.java
index f71754f..98dba45 100644
--- a/src/wmsplugin/WMSLayer.java
+++ b/src/wmsplugin/WMSLayer.java
@@ -80,7 +80,7 @@ public class WMSLayer extends Layer {
 mv = Main.map.mapView;
 pixelPerDegree = getPPD();

-executor = Executors.newFixedThreadPool(3);
+executor =
Executors.newFixedThreadPool(Main.pref.getInteger(wmsplugin.threadpool.size,
3));
 }

 @Override

-- 
Jeff Ollie

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev