Re: [josm-dev] Search and | ?

2008-12-21 Thread Dirk Stöcker
On Sat, 20 Dec 2008, Russ Nelson wrote:

 That's exactly the problem.  '|' ends up being a string rather than a
 token.  If somebody checks this in, tell me and I'll restore the docs

Fixed in r1149.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)

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


Re: [josm-dev] zoom support in new wms plugin

2008-12-21 Thread Dirk Stöcker

On Fri, 19 Dec 2008, Petr Dlouhý wrote:

This was discussed once in this list. Yes, this is by design, the plugin 
is downloading the tiles in one zoom level per layer. It is the only 
logical solution, because WMS can send different data for different zoom 
level. It also saves amount of transfered data. Maybe you just didn't 
notice the change resolution item in the context menu of the layer. It 
is not placed intuitively, but I didn't find better place for that 
button. When you zoom out too much, the plugin stops downloading the 
tiles.


I have two things, which should be fixed also:

a) I fixed the WMS displacement so it now again displaces the whole map 
and not a single image, but I did not get the display right. The 
visible/unvisible decision is still done based on the unmoved pics. (I can 
live with the fact that loading is done based on original position, but 
don't understand why the display is done likewise).


b) The plugin should use caching. Maybe we can turn it off for Yahoo or 
clear yahoo cache on each program start, but a normal download cache is 
required for the autoloading/autoremoval.


Ciao
--
http://www.dstoecker.eu/ (PGP key available)___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Small patch for Align nodes in circle issue with other projections

2008-12-21 Thread Pieren
Dear Josm-dev,

Could you please apply the following small patch fixing the issue of
the function align nodes in circle not working when the current
projection is Lambert (or any projection not supporting new
LatLon(0,0)) ?

In class AlignInCircleAction.java,
replace this:
if (center == null) {
center = new Node(new LatLon(0, 0));
Node n0, n1, n2, prvni, druhy;

by:

if (center == null) {
center = new Node(new LatLon(0, 0));
center.eastNorth = new EastNorth(0, 0); // to be
independent of projection
Node n0, n1, n2;

Thank you to matthew-...@newtoncomputing.co.uk who suggested this
short solution some time ago.

Pieren

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


Re: [josm-dev] zoom support in new wms plugin

2008-12-21 Thread Dermot McNally
2008/12/21 Dirk Stöcker openstreet...@dstoecker.de:

 a) I fixed the WMS displacement so it now again displaces the whole map and
 not a single image, but I did not get the display right. The
 visible/unvisible decision is still done based on the unmoved pics. (I can
 live with the fact that loading is done based on original position, but
 don't understand why the display is done likewise).

Nice to see us return to previous behaviour here.

 b) The plugin should use caching. Maybe we can turn it off for Yahoo or
 clear yahoo cache on each program start, but a normal download cache is
 required for the autoloading/autoremoval.

Can the webkit image not cache the tiles it downloads? If it could,
surely this is identical to how, say, Firefox or IE would cache
images, and if so, it should keep us within the terms of Yahoo's
conditions of use.

As an aside, has anybody managed to build the webkit image on MacOS?
I've come unstuck on one of the qt libraries, even though QT is
installed.

Dermot

-- 
--
Iren sind menschlich

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


Re: [josm-dev] Search and | ?

2008-12-21 Thread Russ Nelson
Dirk Stöcker writes:
  On Sat, 20 Dec 2008, Russ Nelson wrote:
  
   That's exactly the problem.  '|' ends up being a string rather than a
   token.  If somebody checks this in, tell me and I'll restore the docs
  
  Fixed in r1149.

Thanks.  I like the way that the Python folks keep the documentation
for old revisions online.  Maybe we could establish the practice of
putting a version number on the documentation pages in the wiki?  And
whenever a new release is put out, make a copy of the documentation
into a new page carrying the version number, and edit it to reflect
the changes.

Or for that matter, we could write documentation in docbook form, and
ship the HTML fork with JOSM.  Then they'd have it on hand if they
happen to be editing offline.

When is the next release planned?

-- 
--my blog is athttp://blog.russnelson.com   | Delegislation is a slippery
Crynwr sells support for free software  | PGPok | slope to prosperity.
521 Pleasant Valley Rd. | +1 315-323-1241   | Fewer laws, more freedom.
Potsdam, NY 13676-3213  | Sheepdog  | (Not a GOP supporter).

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


Re: [josm-dev] Search and | ?

2008-12-21 Thread Frederik Ramm
Hi,

 Thanks.  I like the way that the Python folks keep the documentation
 for old revisions online.  Maybe we could establish the practice of
 putting a version number on the documentation pages in the wiki?  And
 whenever a new release is put out, make a copy of the documentation
 into a new page carrying the version number, and edit it to reflect
 the changes.

 When is the next release planned?

The problem is, we don't have releases, we have builds - one per day. If 
anyone wants to volunteer to (a) collect changelog entries for builds 
and make a coherent documentation from it and/or (b) hand-pick the 
successful features (and leave out the obscure or buggy ones) to make a 
release every few months, that would be highly valued. The developers 
don't do this because it would tie up what little time they have to 
actually, well, develop things.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09 E008°23'33

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


Re: [josm-dev] Search and | ?

2008-12-21 Thread Ævar Arnfjörð Bjarmason
Russ, if you, or anyone else, is interested in doing some further
hacking on search and related features I've filed the following two
bugs in trac which I would pretty please with sugar on top like to be
implemented:

* http://josm.openstreetmap.de/ticket/1864 - Search doesn't support
regex search on keys and/or values
* http://josm.openstreetmap.de/ticket/1865 - Implement selection stack

Regex search would come in particularly handy. I don't know how hard
it would be to hack the tokenizer to support it however as regexes
could contain characters that are currently considered tokens, such as
: and | and .

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


Re: [josm-dev] Search and | ?

2008-12-21 Thread Frederik Ramm
Hi,

Ævar Arnfjörð Bjarmason wrote:
 * http://josm.openstreetmap.de/ticket/1865 - Implement selection stack

Are you sure you are running a release newer than 3 months or so? 
Because search and selection history is in JOSM since r967...

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09 E008°23'33

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


Re: [josm-dev] ewmsplugin - webkit-image bug

2008-12-21 Thread Hermann Schwärzler

hello

I did some more testing and found the problem: with www.heise.de for 
some reason a call to page-mainFrame()-render() changes the value of 
page-mainFrame()-contentsSize() (it grows in width)!


I patched the code to check that and retry the rendering if the sizes 
differ. for www.heise.de it takes 6 to 8 iterations until the size 
changes no more! I had not time to do extensive testing but I found no 
other site were this happens!

any thought?
is this a bug or a feature of QWebPage/QFrame?

if you want to verify this apply the attached patch (which is quickly 
and dirty written just for testing purposes!).


regards
hermann
--- webkit-image.cpp2008-12-21 22:11:04.0 +0100
+++ webkit-image_webpage.cpp2008-12-21 22:05:08.0 +0100
@@ -13,6 +13,8 @@
 #include QtWebKit/QWebPage
 #include QtWebKit/QWebFrame
 
+#include iostream
+
 /* using mingw to set binary mode */
 #ifdef WIN32
 #include io.h
@@ -35,18 +37,34 @@
   {
 if(ok)
 {
-  page-setViewportSize(page-mainFrame()-contentsSize());
-  QImage im(page-viewportSize(), QImage::Format_ARGB32);
-  QPainter painter(im);
-  page-mainFrame()-render(painter);
+  int retries = 10;
+  QImage *im;
+  QPainter *painter;
+  do {
+page-setViewportSize( page-mainFrame()-contentsSize() );
+im = new QImage( page-viewportSize(), QImage::Format_ARGB32 );
+painter = new QPainter( im );
+page-mainFrame()-render( painter );
+retries--;
+if (retries = 0  page-viewportSize() != 
page-mainFrame()-contentsSize()) {
+  // rendering changed the size of the page!
+  std::cerr  contentsSize before call to render (  
+ page-viewportSize().height()  ,   
page-viewportSize().width()  ) differs from that afterwards ( 
+ page-mainFrame()-contentsSize().height()  ,   
page-mainFrame()-contentsSize().width()  )  std::endl;
+  delete painter;
+  delete im;
+}
+else 
+  break;
+  } while (retries = 0);   
 
   QFile f;
   BINARYSTDOUT
   if(f.open(stdout, QIODevice::WriteOnly|QIODevice::Unbuffered))
   {
-if(!im.save(f, JPEG))
+if(!im-save(f, JPEG))
 {
-  im.save(f, PNG);
+  im-save(f, PNG);
 }
   }
 }
@@ -73,6 +91,9 @@
 
   QObject::connect(page, SIGNAL(loadFinished(bool)), s, SLOT(loaded(bool)));
   QObject::connect(s, SIGNAL(finish(void)), a, SLOT(quit()));
+
+  page-mainFrame()-setScrollBarPolicy(Qt::Horizontal,Qt::ScrollBarAlwaysOff);
+  page-mainFrame()-setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff);
   page-mainFrame()-load (QUrl(url));
   return a.exec();
 }
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Search and | ?

2008-12-21 Thread Ævar Arnfjörð Bjarmason
On Sun, Dec 21, 2008 at 8:53 PM, Frederik Ramm frede...@remote.org wrote:
 Hi,

 Ævar Arnfjörð Bjarmason wrote:

 * http://josm.openstreetmap.de/ticket/1865 - Implement selection stack

 Are you sure you are running a release newer than 3 months or so? Because
 search and selection history is in JOSM since r967...

Yes I'm aware of the search history (a very useful feature). But a
selection stack would compliment it. Selection and search histories
are two separate things.
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Search and | ?

2008-12-21 Thread Ævar Arnfjörð Bjarmason
You're both right, the feature already exists. I just didn't notice it. Thanks!

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


Re: [josm-dev] Search and | ?

2008-12-21 Thread Russ Nelson
Ævar Arnfjörð Bjarmason writes:
  * http://josm.openstreetmap.de/ticket/1864 - Search doesn't support
  regex search on keys and/or values

The problem is always the user interface.  I can think of several ways
to implement regexps:

1) just implement them.  Instead of doing a liberal substring
search, do a regexp search, always treating their input as a regexp.
That has the unhappy effect of forcing regexp character
interpretation, which may give them results which differ from the
previous behavior (but for the most part would give them the same
results).

2) keep the current substring search for unqualified string searches,
but use regexps if they supply a colon (to search in K:V) or user: .
That has the unhappy effect of not being obvious.

3) use a prefix character to indicate a regexp search, e.g. all
regexps must start with ^.  Not likely that any literal searches would
start with ^.

4) Add it as an option in the Search box:   [] use regular expressions

  * http://josm.openstreetmap.de/ticket/1865 - Implement selection stack

M, what do you do if something that was selected got deleted?

  Regex search would come in particularly handy. I don't know how hard
  it would be to hack the tokenizer to support it however as regexes
  could contain characters that are currently considered tokens, such as
  : and | and .

Tokenizer not hard to fix.  It already allows quoted strings, which
may contain anything but a quote character.

-- 
--my blog is athttp://blog.russnelson.com   | Delegislation is a slippery
Crynwr sells support for free software  | PGPok | slope to prosperity.
521 Pleasant Valley Rd. | +1 315-323-1241   | Fewer laws, more freedom.
Potsdam, NY 13676-3213  | Sheepdog  | (Not a GOP supporter).

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