# RSIMS: Large-Scale Heterogeneous Remote Sensing Images Management System
## 2 Materials and Methods
### RSIMeta: Metadata Management of Large-Scale Images with Heterogeneous Structures
#### 2.2.3 Multi-Source Heterogeneous Remote Sensing Images Integration
The structures of Product table and Image table are shown as Figures 17 and 18 separately. Figure 16: Overall storage schema of RSIMeta. Figure 15: Mapping from Landsat property to ISO 19115 property. Some fields of the Product table are self-explained, such as id, title, institution, satellite, sensor, description, etc. Other fields are explained as below:  
* _\"status\"_: a tag identifying whether the satellite and sensor are still working properly. * _\"resolution\"_: a list including all the distinct resolutions of different bands. * _\"type\"_: the type of the product. * _\"llevel\"_: the Hilbert level from 0 to 31 which is calculated based on the average image size of the product. * _\"interval\"_: the interval between the time-sequence adjacent images at the same location. * _\"area\"_: the average coverage area of images, whose unit is km\({}^{2}\). * _\"ctime\"_: the time when the product is created in the table. * _\"time\"_: the time when the first scene of the product is generated. * _\"etime\"_: the time when the last scene of the product is generated. Fields of Image table are explained as below:  
* _\"id\"_: the unique identification of the image which is defined by the data providers. * _\"productid\"_: identification of the product including the image. * _\"hcode\"_: the code of Hilbert grid calculated based on the image's center coordinate and the Hilbert level from the corresponding product. * _\"geom\"_: the spatial bounding box of the image whose type is Polygon or MultiPolygon. * _\"cloud\"_ is the proportion of the data which is covered by cloud. * _\"month\"_ is the month when the data is collected, which can be used to identify season. * _\"atime\"_: the time when the image was acquired. * _\"ctime\"_: the time when the image was stored in the table. Unlike Image table designed for retrieval, Metadata tables are used to store the detailed information of an image, and Metadata tables of different products have different fields. Therefore, we wouldn't introduce the detailed fields of different Metadata tables in the paper. The integration flow of remote sensing images from different sources are shown as Figure 19.  
Figure 17: Structure of Product table. Figure 18: Structure of Image table. The above flow is divided into two steps:  
1. Manual products registration, described with green lines;
2. Data ingestion through API gateway, described with blue lines. All the work in the first step is performed manually based on professional knowledge and experiences. Attributes and description of some remote sensing images need to be extracted and mapped to fields of the Product and Image table. After that, images of the dataset would be ingested into storage system through the API gateway according to the predefined storage schemas. The binary image files are stored in the distributed object-based storage system, which will be introduced in the next section. To store remote sensing image metadata in above tables, RSIMeta adopts PostgreSQL to setup the relational database cluster. PostgreSQL is the world's most advanced open-source relational database, and PostGIS, an open-source spatial extension, enables PostgreSQL to support lots of efficient spatial operations, and have many features rarely found in other spatial databases. Some comparative studies [47; 48] show that PostgreSQL outperforms other popular NOSQL databases in various data retrieval and analysis scenarios. However, this is still a controversial conclusion. To verify the performance of PostgreSQL, we performed some come comparative tests with MongoDB, and the result shows that PostgreSQL is a simpler but more efficient choice for remote sensing images. Up to now, we have used RSIMS to integrate 180 products with about 100 million of remote sensing images and the number of images keep growing every day. Table 1 shows part of remote sensing products in RSIMS.