Danh mục

Pro Oracle Spatial for Oracle Database 11g P2

Số trang: 10      Loại file: pdf      Dung lượng: 314.78 KB      Lượt xem: 1      Lượt tải: 0    
Thu Hiền

Hỗ trợ phí lưu trữ khi tải xuống: 4,000 VND Tải xuống file đầy đủ (10 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

For simplicity, in the example we have assumed that a new map is created at the end of every step. This is certainly a possibility, but it is not necessarily the best option. Later in this book, we will discuss data modeling and how to optimize the sequence of operations. In particular, Chapters 8 and 9 cover spatial operators and functions that make it possible to cluster some of the steps in the example into single queries, making the process much simpler and more efficient.
Nội dung trích xuất từ tài liệu:
Pro Oracle Spatial for Oracle Database 11g P2 CHAPTER 1 ■ SPATIAL INFORMATION MANAGEMENT 11 For simplicity, in the example we have assumed that a new map is created at the end of everystep. This is certainly a possibility, but it is not necessarily the best option. Later in this book, we willdiscuss data modeling and how to optimize the sequence of operations. In particular, Chapters 8and 9 cover spatial operators and functions that make it possible to cluster some of the steps in theexample into single queries, making the process much simpler and more efficient.Storing Spatial Data in a DatabaseLooking at vector data, we usually distinguish between the following: • Points (for example, the plots for sale in Figure 1-1), whose spatial description requires only x,y coordinates (or x,y,z if 3D is considered) • Lines (for example, roads), whose spatial description requires a start coordinate, an end coordinate, and a certain number of intermediate coordinates • Polygons (for example, a residential area), which are described by closed lines Figure 1-2 shows an example containing point, line, and polygon data. The figure correspondsto a small portion of the area used in the previous site selection example. The vector representation,here simplified for convenience, shows a point (the stadium), three lines (the roads), and four poly-gons (the built-up areas, clipped at the picture borders, and the sports complex).Figure 1-2. Vector representation of the spatial objects in the picture The vector data in Figure 1-2 could be stored in one or multiple tables. The most natural way oflooking at this data is to identify data layers—sets of data that share common attributes—that becomedata tables. Most spatial databases use a special data type to store spatial data in a database. Let’srefer to this type as the geometry. Users can add columns of type geometry to a database table inorder to store spatial objects.12 CHAPTER 1 ■ SPATIAL INFORMATION MANAGEMENT In this case, the choice of tables would be rather simple with three main data layers present: “Road infrastructures,” “Land use,” and “Points of interest.” These three layers contain objects that share common attributes, as shown in the three tables later in this section. The same objects could have been aggregated into different data layers, if desired. For instance, we could have stored major and minor roads in different tables, or we could have put roads and land use in the same table. The latter would make sense if the only attributes of relevance for roads and land-use areas were the same, for instance, the province name and the city name. It is also worth stressing that every geometry column can contain any mix of valid spatial object (points, lines, polygons) and also that every table can contain one or more geometry columns. Structuring spatial data into tables and defining the right table structure are the first logical activities of any spatial analysis. Fortunately, in most cases there is an intuitive correspondence between the data and the table structure used to store them. However, in several cases you may find that the spatial database design can be a complex activity. Proper designs may facilitate analysis enormously, while poor data structures may make the analysis complex and slow. These issues are addressed in various places in the book but in particular in Chapter 3. Table 1-2 shows the road infrastructure table of Figure 1-2. This table contains three records corresponding to the east road, the west road, and the stadium road. All of them are represented as lines using the geometry type. Each road is described by three types of attributes: the road type (one column containing either “major,” “local,” or “access” road), the road name (a column containing the name of the road as used in postal addresses), and the area attributes (two columns containing the name of the province and city where the road is located). Table 1-2. Road Infrastructure Table ID Province City Road Name Road Type Road Geometry 1 Province name City name West road Major road 2 Province name City name East road Major road 3 Province name City name Stadium road Access road Table 1-3 shows the land-use table. It contains three records corresponding to the north quarter, the south quarter, and the sports complex. In this case, all spatial objects are polygons. Each object has three types of attributes: the surface of the area (in square meters), the name of the area, and the area location (province and city names). CHAPTER 1 ■ SPATIAL INFORMATION MANAGEMENT 13Table 1-3. Land Use Table Surface (SquareID Province City Area Name Meters) Area Geometry1 Province name City name North quarter 10,0002 Province name City name South quarter 24,0003 Province name City name Sports complex 4,000 Table 1-4 shows the points of interest (POI) in the area. It contains two records: a point (in thiscase, the center of the stadium complex) and a polygon (in this case, the contour of the stadiumcomplex). Attributes include the type of POI from a classification list, the POI name, and theprovince and city where they are located.Table 1-4. Points of Interest TableID Province City POI Name Type of POI POI Geome ...

Tài liệu được xem nhiều: