Ignore:
Timestamp:
2014-05-23T18:11:48+02:00 (10 years ago)
Author:
mkyral
Message:

PointInfo: Fix tags copy for ghost buildings.

Location:
applications/editors/josm/plugins/pointInfo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pointInfo/build.xml

    r30466 r30470  
    33
    44    <!-- enter the SVN commit message -->
    5     <property name="commit.message" value="PointInfo: Add support for ghost buildings."/>
     5    <property name="commit.message" value="PointInfo: Fix tags copy for ghost buildings."/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    77    <property name="plugin.main.version" value="7001"/>
  • applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruianModule.java

    r30466 r30470  
    11281128          r.append("</td><td valign=\"top\"  bgcolor=#e5e5ff>");
    11291129          r.append("&nbsp;&nbsp;<a href="+ url_stavebni_objekt + m_so_bez_geometrie.get(i).getRuianID() + ">"+ icon_ext_link +"</a> ");
    1130           r.append("&nbsp;&nbsp;<a href=file://tags.copy/building>"+ icon_copy_tags +"</a></br>");
     1130          r.append("&nbsp;&nbsp;<a href=file://tags.copy/ghost:"+i+">"+ icon_copy_tags +"</a></br>");
    11311131          r.append("</td></tr>");
    11321132        }
     
    12031203      }
    12041204
     1205      if (keyType.startsWith("ghost") && m_so_bez_geometrie.size() > 0) {
     1206        String[] key = keyType.split(":");
     1207        int i = new Integer(key[1]);
     1208        System.out.println("Ghost ID: " + i);
     1209
     1210        c.append(tagToString("ref:ruian:building", Long.toString(m_so_bez_geometrie.get(i).getRuianID())));
     1211        if (m_so_bez_geometrie.get(i).getZpusobVyuzitiKey().length() > 0 &&
     1212            m_so_bez_geometrie.get(i).getZpusobVyuzitiVal().length() > 0
     1213           ) {
     1214          c.append(tagToString(m_so_bez_geometrie.get(i).getZpusobVyuzitiKey(), m_so_bez_geometrie.get(i).getZpusobVyuzitiVal()));
     1215        }
     1216        if (m_so_bez_geometrie.get(i).getPodlazi() > 0) {
     1217          c.append(tagToString("building:levels", Integer.toString(m_so_bez_geometrie.get(i).getPodlazi())));
     1218        }
     1219        if (m_so_bez_geometrie.get(i).getByty() > 0) {
     1220          c.append(tagToString("building:flats", Integer.toString(m_so_bez_geometrie.get(i).getByty())));
     1221        }
     1222        if (m_so_bez_geometrie.get(i).getDokonceni().length() > 0 && convertDate(m_so_bez_geometrie.get(i).getDokonceni()).length() > 0) {
     1223          c.append(tagToString("start_date", convertDate(m_so_bez_geometrie.get(i).getDokonceni())));
     1224        }
     1225        if (m_so_bez_geometrie.get(i).getZpusobVyuzitiKod().length() > 0) {
     1226          c.append(tagToString("building:ruian:type", m_so_bez_geometrie.get(i).getZpusobVyuzitiKod()));
     1227        }
     1228        c.append(tagToString("source", "cuzk:ruian"));
     1229      }
     1230
    12051231      // Copy address tags to clipboard
    12061232      if (keyType.startsWith("address")) {
Note: See TracChangeset for help on using the changeset viewer.