Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Wednesday, June 02, 2004

BeanShell script to fill in a JUMP column

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")});
}

0 Comments:

Post a Comment

<< Home