geotool读取shp文件属性乱码问题

不废话直接上代码:


Map<String, URL> params=new HashMap<String, URL>();
params.put("url", new File(path).toURL());
DataStore datastore=DataStoreFinder.getDataStore(params);
ShapefileDataStore shpDatastor=(ShapefileDataStore)datastore;
shpDatastor.setStringCharset(Charset.forName("GBK"));








你可能感兴趣的:(geotool读取shp文件属性乱码问题)