关于Geotools读取中文dbf的漏洞

使用GEOTools读取dbf文件_陈焜浩Arain_新浪博客 前面讲到使用SimplefeatureStore.addFeatures()这个方法来把数据装入空SHP文件内,那么反过来,要怎么读取SHP文件内的属性数据呢?这主要用到DbaseFileReader这一个类。通过这个类可以读取所有字段每一行的数据,然后赋值到一个数组内进行输出。 具体的代码如下: public static void DbaseFileReader() ... 阅读详情

Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的开发。

但是Geotools在解析中文dbf文件时,无法正确解读其中的中文路名.这严重影响了Geotools在中国的发展.

经过一段时间的源码解读,我已经找到了一些解决这个问题的方法.关键就是要改写shape-file.jar中的对应文件.现特编写了一个中文补丁包,与同好者交流. 

这个补丁可以解决大部分中文的问题,但是由于时间有限,尚不完美.暂时只能解读中文,对英文的地图信息处理可能会出错.另外经我的测试,一部分地图--可能是因为地图信息的格式不严谨,任无法正常读取.

补丁使用方法:下载Geotools中文汉化补丁  ,然后,替换掉对应的shape-file包.

使用GEOTools读取dbf文件 前面讲到使用SimplefeatureStore.addFeatures()这个方法来把数据装入空SHP文件内,那么反过来,要怎么读取SHP文件内的属性数据呢?这主要用到DbaseFileReader这一个类。通过这个类可以读取所有字段每一行的数据,然后赋值到一个数组内进行输出。 具体的代码如下:     public static void DbaseFileRead... 阅读详情

相关推荐

GeoTools API

org.geotools org.geotools.arcsde org.geotools.arcsde.data org.geotools.arcsde.data.view org.geotools.arcsde.filter org.geotools.arcsde.jndi org.geotools.arcsde.logging org.geotools.arcsde.raster.gce org.geotools.arcsde.raster.info org.geotools.arcsde.raster.io org.geotools.arcsde.raster.jai org.geotools.arcsde.session org.geotools.arcsde.util org.geotools.arcsde.versioning org.geotools.brewer.color org.geotools.console

记geotools java开发坐标转换之一坑

最近接触到了一个关于geotools后端坐标转换的工作,手上想自己动手尝试一下,看着官方文档,一路照做下来,无论是建立Java project还是maven project,一样的代码还是一样的导包还是有问题,起先我以为一定要在maven中写代码,开始是maven的环境配置上出了一点问题,后来环境问题搞了很久才解决,到了后面还是报坐标转换先关的包的异常,于是再仔细地看看官方给的文档,...

兰小莫的博客 3566

Geotools API 手册

英文版本,不是中文版本的 GeoTools开发的工具

GeoTools支持中文的解决方法

【网址】:http://www.blogjava.net/sinoly/archive/2007/09/30/geotools_shape.html  困扰了好几天,一直在尝试各种方法解决Geotools读取shp格式对中文编码的问题。可是昨天一个无意的举动居然让我发觉自己做了太多的无用之功。仔细的看了JavaDoc以及shapefile源代码之后,可以可以明显的看到ShapefileData

百里鹤的专栏 3033

geotools汉语版资料

geotools汉语版资料

geotools中文资料,我学习时候,整理的资料,

geotools中文资料,我学习时候,整理的资料,

GeoTools读取shp文件中文乱码解决方案汇总

Java在GeoTools组件读取Shp文件属性乱码问题,解决汇总(持续更新,暂时没有完美解决方案) GeoTools组件在读取Shp文件的属性表信息时,当读取到中文字符时,在代码中的显示为乱码。 问题分析 通过代码分析得到Geotools中打开shapefile文件采用的编码格式为ISO-8859-1,而在读取中文字符中采用ISO-8859-1读取时,便会出现乱码的情况。 1. 手动指定GeoTools读取shp文件的 ShapefileDataStore shape = new ShapefileDat

XiaoCai 3749

geotools学习指南

geotools整理的学习资料,详细的详述了geotools各个api,包括geoapi和jts。初学者的入门指南

解决geotools写shp中文属性名乱码问题

到网上搜索可以看到一篇文章 https://www.cnblogs.com/wuhenke/archive/2011/12/06/2277717.html 但是我知道,大家喜欢开箱即用的啊,所以这里给大家一个简单的方法 在src/main/java目录下新建一个类 然后把这个java文件放进去就可以了 https://download.youkuaiyun.com/download/weixin_43169...

debugcool的博客 1708

cordic算法的FPGA实现

cordic 算法的MATLAB仿真及verilog实现

qq_38360574的博客 1675

JavaFx之集成FontAwesomeFX与JFoenix(十五)

本文详细介绍了如何在JavaFx项目中同时集成JFoenix和FontAwesomeFX,以创建现代化、美观的桌面应用界面。通过Maven依赖配置、动态代码创建和FXML静态声明两种方式,演示了如何将JFoenix的Material Design控件与FontAwesomeFX的丰富矢量图标完美结合,并提供了实战案例展示如何构建一个功能完善的现代化工具栏。

pepsi的博客 437

GEOTOOLS简介以及其中的小BUG

    GEOTOOLS算是一个比较成熟的GIS中间件吧。全JAVA开发,中间也出过GEOTOOLS.NET。并且有一定的OGC背景,基本上它的整个类库,都是针对OPENGIS标准的实现。但是由于其是一个开源项目,并且项目组织上稍微有点混乱,导致了入门的学习相当的困难。    GEOTOOLS是利用MAVEN进行管理的。我们在学习GEOTOOLS的时候最好的方法就是看官方网站上面的

noopyce的GIS研究 1207

论文笔记:基于对比学习的半监督分类学习方法

论文阅读笔记_CCSSL

weixin_46224126的博客 3312

最新版Geotools-shape中文汉化补丁发布

最新Geotools-shape中文汉化补丁 这一版本改换新的转换方式,修正了前一版的字符计位的错误,可以正确读取更多中文地图包.补丁使用方法:下载Geotools中文汉化补丁  ,然后,替换掉对应的shape-file.jar包. 参看 关于Geotools读取中文dbf的漏洞

翼望空间@youkuaiyun.com 2773

标准恢复二极管整流器的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告

报告页数: 150 图表数: 100 报告价格:¥16800 本文研究全球与中国市场标准恢复二极管整流器的发展现状及未来发展趋势,分别从生产和消费的角度分析标准恢复二极管整流器的主要生产地区、主要消费地区以及主要的生产商。重点分析全球与中国市场的主要厂商产品特点、产品规格、不同规格产品的价格、产量、产值及全球和中国市场主要生产商的市场份额。 主要生产商包括: Yangzhou Yangjie Vishay Intertechnology Power Semiconductors Inc Nexperia B

Fj69258的博客 5848

【干货】S7-PLCSIM Advanced V3.0 无法启动实例( Error Code:-30,LicenseNotFound)问题解决方法

【干货】S7-PLCSIM Adavanced V3.0 无法启动实例( Error Code:-30,LicenseNotFound)问题解决方法

handinvv的博客 5万+

GeoTools 遇到的坑之 cannot access org.geotools.data.FileDataStore

GeoTools 因为版本问题踩的坑

Nishkata的博客 1753

汽车级智能栅极驱动器深度解析 | 连载01:DRV871x-Q1系列产品架构与核心特性

集成度:单芯片集成多通道驱动器、电源管理、电流检测智能化:自适应控制算法,减少外部元件可靠性:多重保护机制,满足汽车级要求灵活性:SPI和硬件两种接口,适应不同应用需求。

VehSwHwDeveloper的博客 1151

猿创征文|GISER开发者必备高能武器库

本文从数据处理、数据管理、数据可视化、GIS行业展望四个方面简单介绍了GISER在日常工作中高频使用的软件。GIS开发是一个多学科融合的学科,这里从计算机科学的角度给出了这些常用软件的相关介绍。本文作者在GIS领域也是一个初学者,很多知识仅学得一点皮毛,很多观点和研究都停留在项目工程中,但是对GIS的未来充满了信心。

夜郎King的博客 1万+

IAR安装成功的关键:STM32设备支持文件导入方法

IAR安装常卡在设备支持缺失这一步——尤其对STM32新手,没导入对应芯片包,编译直接报错。实测发现,必须通过IAR的Tools→Options→IDE→Configuration→Device Support手动加载STM32设备支持文件,否则新建工程时连芯片型号都选不到。IAR安装是否顺利,往往就差这一步。

weixin_42527589的博客 680

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

GeoTools使用

1.API系统介绍 原则: GeoTools的API系统被其开发者精心的维护者,其保证在更新的过程中尽可能的不改动其API体系,以减少对使用者的影响。 并且GeoTool的API在实现库的基础上,被清晰的划分为几组应用编程接口供调用。 分类: 通常接口来自于三个位置: gt-opengis  依据ISO和OGC发布的接口 jts topology suit  Simple Featu...

zw3413的专栏 6236

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

2024年猿创征文|GISER开发者必备高能武器库_geotools api 中文版(2),如何试出一个大数据开发开发者真正的水平

它可以在所有主要的桌面和移动平台上高效地工作,可以通过大量的插件进行扩展,拥有一个漂亮的、易于使用的、记录良好的 API,以及一个简单的、可读的源代码。不管您是从事科研的同学还是工作的朋友,从这些专业正规的网站获取数据,不迷路,不会有任何奉献。一般情况下,使用geotools能满足常规的业务需求了,但如果您有更负责的需求,比如需要投影转换,多种矢量数据、栅格数据的读取,还有不同的格式,这种情况下,geotools的处理能力就有一些捉襟见肘了,此时需要使用另外一个库,gdal来进行帮助升级战斗力。

2401_84185145的博客 1107

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

GeoTools之入门简介

GeoTools是一套开源的用java言语开发的GIS开发工具包,可以基于GeoTools开发符合标准的地理信息系统。GeoTools 提供了 OGC(Open Geospatial Consortium)规范的一个实现来作为他们的开发。 其架构图如下所示: 核心功能 1、定义关键空间概念和数据结构的接口 Java 拓扑套件(JTS)提供的集成几何支持 使用 OGC 过滤器编码规范的属性和空间过滤器 2、干净的数据访问 API,支持功能访问,事务支持和线程之间的锁定 ...

夜郎King的博客 4万+

geotools读取*dbf/*shp文件

1.  geotools外部jar:gt2-api-2.3.1.jar、gt2-shapefile-2.3.1.jar、gt-metadata-2.7.0.1.jar、jts-1.8.jar、main-2.1.1.jar  

javaeye_hua 478
上一篇: 开源GIS方案
下一篇: 最新版Geotools-shape中文汉化补丁发布
mycsoft
博客等级 码龄20年 16粉丝 19原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值