Re: [josm-dev] Tasks for all of you

2008-12-28 Thread Matthew W. S. Bell
On Mon, 2008-12-22 at 17:44 +0100, Dirk Stöcker wrote:
 http://josm.openstreetmap.de/ticket/1677
 plugin-preferences selection does not survive Update-clicking
 
 http://josm.openstreetmap.de/ticket/1442
 Extrude of horizontal way only downwards, not upwards

I've attached patches for these to the bugs.

Matthew W. S. Bell


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


Re: [josm-dev] Tasks for all of you

2008-12-28 Thread Dirk Stöcker
On Sun, 28 Dec 2008, Matthew W. S. Bell wrote:

 http://josm.openstreetmap.de/ticket/1677
 plugin-preferences selection does not survive Update-clicking

 http://josm.openstreetmap.de/ticket/1442
 Extrude of horizontal way only downwards, not upwards

 I've attached patches for these to the bugs.

Thanks a lot. Applied.

So 50% are done.

Missing:

http://josm.openstreetmap.de/ticket/1555
Downloaded GPS data is displayed in reverse

http://josm.openstreetmap.de/ticket/1712
Incomplete ways are discarded without notice

http://josm.openstreetmap.de/ticket/1654
Plugin dialog has non-clickable weblinks

New tasks to have 6 again:

http://josm.openstreetmap.de/ticket/1906
WMS-Plugin: Implement caching

http://josm.openstreetmap.de/ticket/1903
Plugin-Update should test required version before installing

http://josm.openstreetmap.de/ticket/1905
WMS-Plugin: Red error tiles do no automatically disappear and cannot be reloaded

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] Mappaint and multipolygon relation

2008-12-28 Thread Dirk Stöcker
Hello,

now I'm currently implementing support of multipolygon relations in the 
Mappaint-Display of JOSM. One of the major problems is how to handle 
defective relations.

My current idea is following:

- I add a new string array for the relation and possibly the way datatype.
- Whenever I find defective stuff, a add the error messages to the object.
- Objects with errors are shown e.g. with a star in all places, where the
   name is shown (selection list, ...).
- The validator will be able to show the errors.
- Mappaint does a best guess how to handle defective stuff.

Does this sounds useful? Better suggestions?

Another problem will probably be the fact, that larger polygons will 
become slower when drawing them. Suggestions for this?

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] Tasks for all of you

2008-12-28 Thread Russ Nelson
Dirk Stöcker writes:
  http://josm.openstreetmap.de/ticket/1712
  Incomplete ways are discarded without notice

This is a minimal patch.  I didn't want to make too many changes
because somebody else is going to have to read this patch before they
apply it.  I don't know Java very well, so if anybody spots anything
un-Javanic, please tell me.

Potential improvements:
  o convert all invocations of OsmReader.parseDataSet() to
OsmReader.parseDataSetOsm() to gain access to getParseNotes().
  o Doing something more sensible with the output presentation if
there are too many warnings than can fit on the screen (or will it
switch to a scrollbox?)
  o It's possible that DataSet ought to be the entity that has
parseNotes.  That would make for a simpler patch, but not
necessarily more correct.


Index: src/org/openstreetmap/josm/actions/OpenFileAction.java
===
--- src/org/openstreetmap/josm/actions/OpenFileAction.java  (revision 1180)
+++ src/org/openstreetmap/josm/actions/OpenFileAction.java  (working copy)
@@ -74,10 +74,14 @@
 private void openAsData(File file) throws SAXException, IOException, 
FileNotFoundException {
 String fn = file.getName();
 if 
(ExtensionFileFilter.filters[ExtensionFileFilter.OSM].acceptName(fn)) {
-DataSet dataSet = OsmReader.parseDataSet(new 
FileInputStream(file), null, Main.pleaseWaitDlg);
+OsmReader osm = OsmReader.parseDataSetOsm(new 
FileInputStream(file), null, Main.pleaseWaitDlg);
+DataSet dataSet = osm.getDs();
 OsmDataLayer layer = new OsmDataLayer(dataSet, file.getName(), 
file);
 Main.main.addLayer(layer);
 layer.fireDataChange();
+if (osm.getParseNotes().length() != 0) {
+JOptionPane.showMessageDialog(Main.parent, 
osm.getParseNotes());
+}
 }
 else
 JOptionPane.showMessageDialog(Main.parent, fn+: +tr(Unknown 
file extension: {0}, fn.substring(file.getName().lastIndexOf('.')+1)));
Index: src/org/openstreetmap/josm/io/OsmReader.java
===
--- src/org/openstreetmap/josm/io/OsmReader.java(revision 1180)
+++ src/org/openstreetmap/josm/io/OsmReader.java(working copy)
@@ -59,8 +59,18 @@
   * The dataset to add parsed objects to.
   */
  private DataSet ds = new DataSet();
+ public DataSet getDs() { return ds; }
 
  /**
+  * Record warnings.  If there were any data inconsistencies, append
+  * a newline-terminated string.
+  */
+ private String parseNotes = new String();
+ public String getParseNotes() {
+ return parseNotes;
+ }
+
+ /**
   * The visitor to use to add the data to the set.
   */
  private AddVisitor adder = new AddVisitor(ds);
@@ -332,6 +342,7 @@
for (long id : e.getValue()) {
 Node n = findNode(id);
 if (n == null) {
+ parseNotes += Skipping a way because it includes a 
node that doesn't exist:  + id + \n;
  failed = true;
  break;
 }
@@ -434,6 +445,10 @@
   *  elemet found there is returned.
   */
  public static DataSet parseDataSet(InputStream source, DataSet ref, 
PleaseWaitDialog pleaseWaitDlg) throws SAXException, IOException {
+  return parseDataSetOsm(source, ref, pleaseWaitDlg).ds;
+ }
+
+ public static OsmReader parseDataSetOsm(InputStream source, DataSet ref, 
PleaseWaitDialog pleaseWaitDlg) throws SAXException, IOException {
   OsmReader osm = new OsmReader();
   osm.references = ref == null ? new DataSet() : ref;
 
@@ -467,6 +482,6 @@
if (o.id  0)
 o.id = 0;
 
-  return osm.ds;
+  return osm;
  }
 }

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