Beanshell:Fill in a JUMP column

From OpenJUMP Wiki
Jump to: navigation, search
{
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")});
}