- GeoServer Beginner's Guide(Second Edition)
- Stefano Iacovella
- 456字
- 2021-07-08 09:21:06
Representing geometrical shapes
You learned how to calculate coordinates on the Earth's surface. However, how can you represent a real object, for example, a river, in a convenient way for a GIS?
There are two main approaches when building a spatial database: modeling vector data or raster data. Vector data uses a set of discrete locations to build basic geometrical shapes, such as points, polylines, and polygons. This is shown in the following image:

Of course, real objects are neither a point, nor a polyline or a polygon. In your model, you have to decide which basic shape better suits the real object. For example, a town can be represented as a point if you draw a map of the world with the countries' capitals shown. On the other hand, if you publish a countries map, a polygon will enable you to draw the city boundaries to give a more realistic representation.
The simpler geometric object is a point. Points are defined as single coordinate pairs (x,y) when we work in two-dimensional space, or coordinate triplets (x,y,z) if you want to take account of the height coordinates. In the following examples, we use point features to store the location of active volcanoes:

Did you guess the units and projections used? The coordinates are in decimal degrees and SRS is WGS84 geographic, that is, EPSG:4326.
Points are simple to understand but do not give you many details about the spatial extent of an object. If you want to store rivers, you need more than a coordinate pair. Indeed, you have to memorize an array of coordinate pairs for each feature in a structure called polyline shown as follows:
Colorado; (40.472 -105.826, ... , 31.901 -114.951) Nile; (-2.282 29.331, ... , 30.167 31.101) Danube; (48.096 8.155, ... ,45.218 29.761)
If you need to model an area features such as an island, you can extend the polyline object, adding the constraint that it must be closed; that is, the first and the last coordinate pairs must be coincident. This is the polygon shape:
Ellis Island; (-74.043 40.699, -74.041 40.700, -74.040 40.700,
-74.040 40.701, -74.037 40.699, -74.038 40.699, -74.038 40.698,
-74.039 40.698, -74.041 40.700,-74.042 40.699, -74.040 40.698, -74.042 40.696,
-74.044 40.698, -74.043 40.699)
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- JIRA 7 Administration Cookbook(Second Edition)
- AIRAndroid應用開發實戰
- 數據結構習題精解(C語言實現+微課視頻)
- ADI DSP應用技術集錦
- ASP.NET 3.5程序設計與項目實踐
- Mastering Drupal 8 Views
- Visual C++開發入行真功夫
- Python:Deeper Insights into Machine Learning
- Machine Learning With Go
- Go語言從入門到精通
- Java程序設計及應用開發
- Unity 5 Game Optimization
- MonoTouch應用開發實踐指南:使用C#和.NET開發iOS應用
- AngularJS Directives Cookbook