Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
请注意,GML 实际上并未定义文件格式。 它为定义您自己的 xml 模式提供了一个抽象起点。 我们使用模式来整理哪些 xml 元素映射到哪些 Java 类(因此日期显示为 Date,几何显示为 JTS Geometry,等等)。
这对那些只获得 GML“文件”的人来说已经够痛苦的了; 我最近向 GeoTools 添加了一个实用程序类(称为 GML),它将假设任何未定义的元素都是字符串。
以下是测试用例的示例::
您可以采用生成的 featureCollection 并使用 JMapPane 类,如 GeoTools 快速入门中所示::
You are warned that GML does not actually define a file format. It provides an abstract starting point for defining your own xml schema. We use the schema to sort out what xml elements to map to what Java class (so dates show up as Date, geometry as a JTS Geometry, etc...).
This causes enough grief with people that have only been provided with a GML "file"; that I have recently added a utility class (called GML) to GeoTools that will assume any undefined element is a String.
Here is an example from test cases::
You can take the resulting featureCollection and use JMapPane class as shown in the GeoTools quickstart::
GeoTools 提供了一个用于读取 GML 文件的库。 他们还提供 UI 组件来显示其库支持的地理空间格式。
GeoTools provides a library for reading GML files. They also provide UI components for displaying geospatial formats their library supports.