当前位置: 首页 > news >正文

做网站的结论项目外包平台接活

做网站的结论,项目外包平台接活,个人免费注册公司,搜索引擎排名优化建议1.架构设计 OGC 规范对空间矢量数据的框架进行了设计#xff0c;GeoTools 对其进行了实现。其中的 DataStore 可以近似理解成关系数据库中的个数据库实例#xff0c;FeatureSource 可以近似理解成关系数据库中的一张表。 DataAccess 接口主要对空间要素类型的相关信息的构建…1.架构设计 OGC 规范对空间矢量数据的框架进行了设计GeoTools 对其进行了实现。其中的 DataStore 可以近似理解成关系数据库中的个数据库实例FeatureSource 可以近似理解成关系数据库中的一张表。 DataAccess 接口主要对空间要素类型的相关信息的构建、读取、更新、清除等操作进行了设定。DataStore 接口直接继承了 DataAccess 接口DataAccess 接口主要定义了数据源的基本行为如新建、更改、删除等将一整套 SimpleFeature 的数据模型进行了嵌入可以看到所有的数据转换格式已经从上层的泛型具象成了 SimpleFeature以及 SimpleFeatureType。除此以外DataStore 也指定了空间矢量数据的读写方法以及相关的函数。FeatureSource 可通过DataStore获取和 SimpleFeatureSource 则是与具体的 SimpleFeatureType 绑定的数据结构用户可以通过其子类对表直接进行查询和写入操作。 public interface DataAccessT extends FeatureType, F extends Feature {// 获取数据信息ServiceInfo getInfo();// 新建数据void createSchema(T featureType) throws IOException;// 更新数据字段信息void updateSchema(Name typeName, T featureType) throws IOException;// 删除数据void removeSchema(Name typeName) throws IOException;// 获取数据名称ListName getNames() throws IOException;// 获取数据字段信息T getSchema(Name name) throws IOException;// 获取数据源FeatureSourceT, F getFeatureSource(Name typeName) throws IOException;// 释放数据连接void dispose();}2.DataStore DataStore 提供了较为完整的读写功能熟悉 Java 的同学甚至可以将其理解成一个类似于JDBC 的连接空间数据的驱动程序。 DataStore 是主要用于访问和存储矢量格式的空间数据的引擎。矢量数据的数据格式有很多种。GeoTools 支持如 Shapefile、数据库等的接入其支持的数据源种类有很多种例如地理信息系统行业常用的 PostGIS、时空数据领域使用到的 GeoMesa、新型的 GeoPackage 等。在支持这些数据源时GeoTools 提供了统一的 DataStore 访问接口如代码清单 5-2 所示。用户只需要实现这个接口就能够针对特定的数据源进行相应的扩展。 public interface DataStore extends DataAccessSimpleFeatureType, SimpleFeature {// 更新SimpleFeatureType 结构信息void updateSchema(String typeName, SimpleFeatureType featureType) throws IOException;// 删除SimpleFeatureType void removeSchema(String typeName) throws IOException;// 获取SimpleFeatureType 名称String[] getTypeNames() throws IOException;// 获取SimpleFeatureType 对象SimpleFeatureType getSchema(String typeName) throws IOException;// 获取FeatureSource对象SimpleFeatureSource getFeatureSource(String typeName) throws IOException;// 获取查询结果SimpleFeatureSource getFeatureSource(Name typeName) throws IOException;// 获取查询结果FeatureReaderSimpleFeatureType, SimpleFeature getFeatureReader(Query query, Transaction transaction) throws IOException;// 获取写入对象FeatureWriterSimpleFeatureType, SimpleFeature getFeatureWriter(String typeName, Filter filter, Transaction transaction) throws IOException;} DataStore 所对应的是比 SimpleFeatureType 更上层的概念对应关系数据库中的 database 的概念用户可以利用 DataStore 对多个SimpleFeatureType 进行控制和管理。从上述代码清单中可以看到DataStore 内部规定了 SimpleFeatureType 的更新、删除和获取操作也实现了针对 SimpleFeatureType 的读写操作。 3. FeatureSource FeatureSource 与 DataStore 相比它的操作粒度更细 public interface FeatureSourceT extends FeatureType, F extends Feature {// 获取SimpleFeatureType 名称Name getName();// 获取SimpleFeatureType 信息ResourceInfo getInfo();// 获取所属DataStore对象DataAccessT, F getDataStore();// 获取查询容量QueryCapabilities getQueryCapabilities();void addFeatureListener(FeatureListener listener);void removeFeatureListener(FeatureListener listener);// 获取要素信息FeatureCollectionT, F getFeatures(Filter filter) throws IOException;FeatureCollectionT, F getFeatures(Query query) throws IOException;FeatureCollectionT, F getFeatures() throws IOException;// 获取结构信息 T getSchema();// 获取边界信息 ReferencedEnvelope getBounds() throws IOException;ReferencedEnvelope getBounds(Query query) throws IOException;// 获取数据条数int getCount(Query query) throws IOException;// 获取支持的Hintpublic SetRenderingHints.Key getSupportedHints(); } 4. FeatureStore FeatureStare 是 FeatureSource 的一个子接口它针对数据本身进行了一些新的设定。 public interface FeatureStoreT extends FeatureType, F extends Featureextends FeatureSourceT, F {// 插入数据 ListFeatureId addFeatures(FeatureCollectionT, F featureCollection) throws IOException;// 删除数据void removeFeatures(Filter filter) throws IOException;// 更改数据void modifyFeatures(Name[] attributeNames, Object[] attributeValues, Filter filter)throws IOException;void modifyFeatures(AttributeDescriptor[] type, Object[] value, Filter filter)throws IOException;void modifyFeatures(Name attributeName, Object attributeValue, Filter filter)throws IOException;void modifyFeatures(AttributeDescriptor type, Object value, Filter filter) throws IOException;// 流式插入数据 void setFeatures(FeatureReaderT, F reader) throws IOException;void setTransaction(Transaction transaction);Transaction getTransaction(); } 从代码中可以看出FeatureStore 对数据操作和事务操作进行了细化。在数据操作方面增加了插入数据、删除数据、更新数据的相关内容在事务操作方面用户可以配置事务信息但是由于 GeoTools 目前并没有将重点放在事务上因此现在只支持默认 (Default) 和自动提交 (AutoCommit) 两种事务的模式。 5.SimpleFeature SimpleFeature 在 GeoTools 内部就是具体的数据条目可类比为关系数据库中的一条记录。早期 OGC 对空间要素 (Geometry Feature) 有过非常详细的设定但是这样的设定过于复杂以致行业内产生了简化要素(Simple Feature) 这种设定这也是 [Simple] 的由来。GeoTools 内部采用 SimpleFeature 作为自己的空间数据结构。 public interface SimpleFeature extends Feature {String getID();// 获取 SimpleFeatureType SimpleFeatureType getType();SimpleFeatureType getFeatureType();// 获取所有属性ListObject getAttributes();// 设置属性void setAttributes(ListObject values);void setAttributes(Object[] values);Object getAttribute(String name);void setAttribute(String name, Object value);Object getAttribute(Name name);void setAttribute(Name name, Object value);Object getAttribute(int index) throws IndexOutOfBoundsException;void setAttribute(int index, Object value) throws IndexOutOfBoundsException;// 获取属性个数 int getAttributeCount();// 获取默认空间数据 Object getDefaultGeometry();// 设置默认空间数据void setDefaultGeometry(Object geometry); } 6. SimpleFeatureType SimpleFeatureType 是 GeoTools 内部用来对 SimpleFeature 进行数据结构约束的数据结构它可以类比为关系数据库的表结构。 public interface SimpleFeatureType extends FeatureType {// 获取SimpleFeatureType 名称String getTypeName();// 获取所有属性的描述器 ListAttributeDescriptor getAttributeDescriptors();// 根据属性名称获取对应的属性描述器AttributeDescriptor getDescriptor(String name);AttributeDescriptor getDescriptor(Name name);AttributeDescriptor getDescriptor(int index) throws IndexOutOfBoundsException;// 获取属性个数 int getAttributeCount();// 获取所有属性的数据类型 ListAttributeType getTypes();// 根据名称筛选属性类型 AttributeType getType(String name);AttributeType getType(Name name);AttributeType getType(int index) throws IndexOutOfBoundsException;// 获取单个属性的索引 int indexOf(String name);int indexOf(Name name); } 从代码中我们可以看出SimpleFeatureType 内部主要是对自身的属性以及属性的描述器类 Attribute Descriptor 进行管理的配置和获取方法的实现用户在使用过程中可以比较方便地获取到相关的信息 7. FeatureCollection FeatureCollection 是 GeoTools 参考 Java 语言的集合类(Collection)设计的存储 Feature 对象的集合类。为了更好地操作空间数据对象FeatureCollection 在使用上与 Java 集合类主要有两点不同。第-点是 FeatureCollection 的迭代器 (lterator) 必须在使用完毕后进行显式的关闭操作才能避免内存泄漏。第二点是存储在同一个FeatureCollection 中的对象具有相同的 SimpleFeatureType。 public interface FeatureCollectionT extends FeatureType, F extends Feature {// 迭代器使用完毕必须关闭 FeatureIteratorF features();// 获取SimpleFeatureType T getSchema();/** ID used when serializing to GML */String getID();// 数据访问方式 void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException;// 针对FeatureCollection 查询子集合 public FeatureCollectionT, F subCollection(Filter filter);public FeatureCollectionT, F sort(SortBy order);// 获取最小外接矩形ReferencedEnvelope getBounds();// 是否包含指定元素boolean contains(Object o);boolean containsAll(Collection? o);// 是否为空boolean isEmpty(); } public interface SimpleFeatureCollectionextends FeatureCollectionSimpleFeatureType, SimpleFeature {// 迭代器使用完毕后必须关闭public SimpleFeatureIterator features();public SimpleFeatureCollection subCollection(Filter filter);public SimpleFeatureCollection sort(SortBy order); }值得强调的是FeatureCollection 并不是将数据全部加载到内存中的传统集合类由于空间数据通常数据量较大一味地加载到内存中通常会导致内存超限。因此 GeoTools 在实现 FeatureCollection 时使用流式数据模型尽量减少内存的使用量也因此造成 FeatureCollection 的迭代器在使用完毕后必须关闭的问题 由于 Java 泛型类在类型定义上比较几余在处理由 SimpleFeature 和SimpleFeatureType 构成的 FeatureCollection 时必须不断地定义FeatureCollectionSimpleFeatureTypeSimple Feature因此GeoTools 设计了 SimpleFeatureCollection 语法糖来帮助用户更好地使用Feature Collection。
http://www.yutouwan.com/news/7002/

相关文章:

  • z怎么建设视频网站分析杭州高端网站建设开发的区别
  • wordpress仿站实战做家教备课用什么网站
  • 遨翔网站建设照片网站模版
  • 哪个公司做企业网站好html个人网站源码
  • 网站的备案信息wordpress响应慢原因
  • 吉林做网站wordpress企业内网主题
  • 太原 招聘 网站建设 技术经理设计开发流程
  • 网站建设及管理制度文章网站建设策
  • 如何用网站做课件vue vs wordpress
  • 微擎 网站开发工具网站建设 比选
  • wordpress msn space云浮seo
  • 建公司网站要多久广州网站设计建站
  • 临夏市建设局网站移动网站怎么做
  • 抚顺地区网站建设昆明网站建设兼职
  • 吉林省住房和建设厅网站一级a做爰片在线看免播放器网站
  • 德阳百度网站建设文创产品设计方案模板
  • 网站开发与维护考察试题wordpress制作网站教程
  • wordpress网站被拒登郑州房产网58同城网
  • 个人网站备案 服务内容怎么写怎么做小程序
  • 东莞企业自助建站系统网站运营可以转行做网站设计吗
  • 青海wap网站建设比较好中国域名网官网
  • 徐州建设工程交易网站定制开发源代码归谁
  • 响应式网站建站价格如何创建公众号微信免费的
  • 做外贸网站公司南通公司做网站
  • 手机网站和pc网站的区别瓷砖网站建设
  • 网站建设公司如何做大电商运营推广怎么做
  • 网站开发人员工资wordpress的安装教程
  • 格尔木市建设局网站做网站公司赚钱么
  • 企业网站的基本类型包括商业授权证明
  • 做网站设计制作的响应式布局