This page summarizes that work done during the Google Summer of Code 2016.
1. Scope and requirements
The goal of this project is to improve the Apache SIS storage modules in order to meet some needs of space agencies. Particularly, this includes translating metadata from the GeoTIFF format to metadata conform to the ISO 19115 model, and creating a simple web application prototype (VNSC) to ensure that the module is on the right track.
This work requires basic understanding of at least two international standards published by the International Organization for Standardization (ISO) and the Open Geospatial Consortium (OGC): the ISO 19115-1:2014 metadata model and the OGC Catalog Service on the Web (CSW) 2.0 standard. Before to start coding, the first part of this Google Summer of Code was to read those standards. Other standards like GeoTIFF had to be read later during the GSoC project.
2. Context
The most generic parts of this work will be integrated in the Apache SIS project. The web application prototype has been presented to the Vietnamese National Space Center (VNSC) using some of their data for demonstration purpose. Another student, Minh Chinh Vu, contributed to the project.
The programming environment is:
The programming environment is:
- Programming language: Java
- Java platform: JDK8
- Library: Apache SIS on JDK8 branch
- IDE: Netbeans
- Build tools: Maven
- Source code repository: clone on GitHub
3. Work done
The work has been committed on a clone of the Apache SIS project.
- This is the link of commits by me: https://github.com/
haonguyen123/sis/commits/JDK8? author=haonguyen123 - This is the link of commits by Chinh(VNSC): https://github.com/
haonguyen123/sis/commits/JDK8? author=fiser-chinhvm
The work is explained in more details in a separated document, together with example of CSW queries and responses by the server. The document identifies some queries that are not yet compliant with the CSW standard and consequently needs future work (section II at the end of this page).
- CSW prototype for Apache SIS:
https://docs.google.com/document/d/1PPn1W8nm0l- wawwIycX6MhUxggGakdatz5Apjm7hO yg/
The Catalog Service for the Web (CSW) developed in this GSoC project is the first OGC Web Service in the Apache SIS project. Consequently this project is exploring new grounds for what will become an important part of SIS mission.
4. Work details
This section give more details on some parts of the work.
4.1. Mapping Landsat metadata to ISO 19115
This is the first part of the project. In this project, we performed a partial mapping to ISO 19115 not only for the GeoTIFF metadata, but also for the Landsat8 metadata and Modis metadata. Some of the steps were:
- Create a GeoTIFF module (renamed later "earth-observation")
- Create test cases for the GeoTIFF module
- Map Landsat metadata product L1Gt/L1T to ISO 19115. The mapping done for this project is partially documented here: https://builds.apache.org/job/
sis-dev/javadoc/org/apache/ sis/storage/earthobservation/ doc-files/LandsatMetadata.html
The conversion process uses a HashMap for storing the values based on the unique key with:
- Keys: parameter names as documented in table 2-5 of Landsat documentation.
- Values: the values found in the metadata file for the above-cited keys.
With the values, get into the ISO 19115 Metadata tree (used for describing information or resource that can have geographic extents) as documented in above-cited LandsatMetadata.html page. We try to use properties that that have the same meaning.
4.1.1. Special keys
In some cases, the mapping code will need to perform some calculation. For example, the west bound longitude is provided by two different metadata in the Landsat file: one for the lower corner and another one for the upper corner. This happen because Landsat images may have a rotation, like the red rectangle below. But ISO 19115 geographic box is expressed without rotation, like the blue rectangle below. In order to have a blue rectangle that encompass fully the red rectangle, we need to take the minimum of the two Landsat properties.
4.2. Mapping GeoTIFF metadata to ISO 19115
Input files are GeoTIFF image files for L1Gt/L1T products (same as in above 4.1 section). Some steps in the conversion process are:
- Uses File class to read some base informations (Name, identifier, date modified, type file).
- Uses Apache SIS library to read GeoTIFF tags from the image.
- With tags and value type information, read the values.
- Store the value in the ISO 19115 Metadata tree in a property having the same meaning.
4.2.1 Some special values:
From ModelTiePoint, GeoKeyDirectoryTag, ModelPixelScaleTag, ImageWidth, ImageLength to geographic bounding box:
- Use the ModelTiePoint, ModelPixelScaleTag, ImageWidth, ImageLength values for calculating the corner in the map projection of the image (units are in meters).
- Use the library Apache SIS to transform corners from the map projection to corner in lat/long (units are in degree).
- Compare the transformed values and get values for the geographic bounding box.
4.3. Mapping Modis metadata to ISO 19115
Same approach than for read Landsat metadata but the metadata format for Modis is XML. Read the values using XPath and store them in ISO 19115 metadata property having the same meaning.
5. Test a CSW prototype to ensure that the module is on the right track.
This is the final part for the project. In this part, we use the modules in Apache SIS that perform the mapping between the metadata to ISO 19115 and create an application to manage the images satelite for VNSC (Vietnam National Satellite Center). The requirement is to create a web application to manage the satellite images that can archives the data and have the simple search functionalities. So we decided to create a web service as an OGC CSW - Catalogue Service for the Web. In this part, Chinh participated with me in building a web demo for VNSC:
- Use modules that read Landsat8 metadata, GeoTiff meatadata, Modis metadata for mapping information to common queryable elements for CSW service.
- Implement some CSW operations: GetCapabilities, DescribeRecord, GetRecords, GetRecordById.
- Create a Requestor: This actor searches for metadata records in a catalogue service, either by browsing or through more complicated queries.
- Create client interface for the web.
This application has been presented to VNSC on Monday, August 15th, and feedbacks for future improvements were received. A screenshot is below:
More screenshots and instructions for executing the application are in the "CSW prototype for Apache SIS" document (link given above).
II. Future improvements
Based on the work done this summer, in the future we will:
- Analyze and complete mapping from Landsat, GeoTIFF and Modis metadata to ISO 19115 (the present only mapping a few informations in metadata).
- Develop mapping for other formats (HDF, HDF5 ...).
- Complete the CSW service. Currently the filter (e.g. east, west, north and south bounds) are not yet conform to a standard query language like CQL. Conformance with CQL will be part of future work.
- Complete the client interface.
Thêm nhận xét