Draw a shapefile in java -


i read shapefile in java , draw it. there anyway read shapefile , draw in java? know useful , easy framework?

thanks.

you can try geotools. can start code.

public class quickstart {  public static void main(string[] args) throws exception {     file file = jfiledatastorechooser.showopenfile("shp", null);     if (file == null) {         return;     }      filedatastore store = filedatastorefinder.getdatastore(file);     simplefeaturesource featuresource = store.getfeaturesource();      // create map content , add our shapefile     mapcontent map = new mapcontent();     map.settitle("quickstart");      style style = sld.createsimplestyle(featuresource.getschema());     layer layer = new featurelayer(featuresource, style);     map.addlayer(layer);      // display map     jmapframe.showmap(map); } } 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -