GeoTools Eclipse 快速入门03
目录
今天,继续翻译我们的教程,这节讲的是第一个应用程序的快速启动(在项目中呈现一个地图)
Quickstart Application
Now that your environment is setup we can put together a simple Quickstart. This example will display a shapefile on screen.
1.Create the package
org.geotools.tutorial.quickstart using your IDE.
2.Create the org.geotools.tutorial.quickstart.Quickstart class using your IDE.
3.Fill in the following code:
1. We need to download some sample data to work with. Thehttp://www.naturalearthdata.com/ project
is a great project supported by the North American Cartographic Information Society. Head to the link below and download some cultural vectors. You can use the ‘Download all 50m cultural themes’ at top.
Please unzip the above data into a location you can find eaily such as the desktop.
- The shapefile is not loaded into memory – instead it is read from disk each and every time it is needed This approach allows you to work with data sets larger than available memory.
- We are using a very basic display style here that just shows feature outlines. In the examples that follow we will see how to specify more sophisticated styles
快速启动应用程序
org.geotools.tutorial.quickstart 的包。
此网址中的这个项目是由北美制图信息学会主持的一个大规模工程。请到下面的链接下载一些以文化为主题的矢量专题图,您可以选择顶部的“下载全部50米像元文化专题图”(“Download all 50m cultural themes” )下载链接如下:
请将上面下载到的数据解压到一个您方便找到的位置,比如桌面。
- 这个shape文件并没有加载到内存中,而是在您每次需要的时候即时从硬盘中读取,这种方法允许您处理大于可用内存的数据集。
- 这个例子中,我们只是采用了最基本的展示风格——仅仅呈现要素轮廓,后面的例子中,我们将会详细列举更为复杂的展示样式。
转载自:https://blog.csdn.net/SuperGiser_Lee/article/details/73321563