Difference between revisions of "Beanshell:Fill in a JUMP column"
Jump to navigation
Jump to search
(Created page with ' { import com.vividsolutions.jump.util.*; map = CollectionUtil.createMap(new String[]{"DA24900010", "Road", "DA24900020", "Road", "DE22800000", "Rail Line", "FA02650000", "Bo…') |
|||
| Line 3: | Line 3: | ||
map = CollectionUtil.createMap(new String[]{"DA24900010", "Road", "DA24900020", "Road", "DE22800000", "Rail Line", "FA02650000", "Boundary", "FA02700000", "Boundary", "GA24850000", "River/Stream", "GB15300000", "Lake", "GE14850000", "Island", "GG05800000", "Coastline"}); | map = CollectionUtil.createMap(new String[]{"DA24900010", "Road", "DA24900020", "Road", "DE22800000", "Rail Line", "FA02650000", "Boundary", "FA02700000", "Boundary", "GA24850000", "River/Stream", "GB15300000", "Lake", "GE14850000", "Island", "GG05800000", "Coastline"}); | ||
| − | + | ||
for (feature : layer.featureCollectionWrapper.features) { | for (feature : layer.featureCollectionWrapper.features) { | ||
feature.setAttribute("FCODE2", map{feature.getAttribute("FCODE")}); | feature.setAttribute("FCODE2", map{feature.getAttribute("FCODE")}); | ||
} | } | ||
Latest revision as of 01:15, 12 October 2009
{
import com.vividsolutions.jump.util.*;
map = CollectionUtil.createMap(new String[]{"DA24900010", "Road", "DA24900020", "Road", "DE22800000", "Rail Line", "FA02650000", "Boundary", "FA02700000", "Boundary", "GA24850000", "River/Stream", "GB15300000", "Lake", "GE14850000", "Island", "GG05800000", "Coastline"});
for (feature : layer.featureCollectionWrapper.features) {
feature.setAttribute("FCODE2", map{feature.getAttribute("FCODE")});
}