Development of Java plug-in for Geoserver to read Oracle GeoRaster

Download Report

Transcript Development of Java plug-in for Geoserver to read Oracle GeoRaster

Development of Java plug-in for Geoserver to
read Oracle GeoRaster Data
Authors
Baskar Dhanapal
CoreLogic
Bangalore, India
Perumal Chinnuswamy
CoreLogic
Bangalore, India
Bruce E.Thelen
CoreLogic
Austin, USA
Agenda
•
•
•
•
•
•
•
•
•
About CoreLogic
Need and Scope
Technology and tools used
Architecture
Existing Approach
Plug-in Development
Benefits of this plug-in
Screen shots
Conclusion
About CoreLogic
• Launched from The First American Corporation, CoreLogic is a leading
provider of consumer, financial and property information, analytics and
services to business and government.
• We have more than one million users who rely on our data.
• We have most comprehensive repository of public, contributory and
proprietary data in the United States like mortgage information, parcel
and geospatial data; motor vehicle records, criminal background records;
national coverage eviction information, payday lending records, credit
information, and tax records.
• Working with over 40,000 clients in the public and private sectors has
given us a vast storehouse of real-world experience to draw upon in
helping you create effective solutions that target your unique needs
Need and Scope of this plug-in
• Geoserver reads and supports all featureType data like shapefile, point,
polygon etc. from local file system as well as from oracle spatial database.
It also reads and support raster images from local file system only. It does
not support to read GeoRaster data from oracle spatial. This plug-in helps
Geoserver to read GeoRaster data from database.
• To create separate standalone plug-in for Geoserver to read Oracle
GeoRaster data
• To include all basic functionalities like zoom-in, zoom-out and panning to
GeoRaster data
• It should follow all the rules that GeoTools community described to create
plug-in for GeoServer.
Technology and Tools used
•
•
•
•
•
•
Windows environment
Java 1.5
GeoTools API version 2.7-SNAPSHOT
Oracle Spatial Queries
Maven
GeoServer
Architecture
• Client application can be any web
client which has capability to
send http request.
• Client application can query
Geoserver using WMS request to
get required GeoRaster data.
• GeoServer in turn query
GeoRaster data which is stored in
Oracle spatial database using the
GeoRaster plug-in deployed in
GeoServer.
• User can view GeoRaster data in
Openlayers window and also in
any format like GIF,JPEG,PNG.
Oracle GeoRaster
•
•
•
•
•
•
The core of Oracle Spatial GeoRaster is the
physical schema designed to facilitate storing
and managing raster or grid-based data inside
the database
A GeoRaster table is any user-defined table,
which has at least one data column of type
SDO_GEORASTER
SDO_GEORASTER objects include metadata and
information about how to retrieve GeoRaster
cell data which is stored in another user-defined
table called a Raster Data Table, which is an
object table of type SDO_RASTER.
The SDO_RASTER type includes a BLOB column
called RASTERBLOCK, which stores the real
raster blocks
Other information associated with the
GeoRaster objects can be stored in separate
columns or tables, such as a Value Attribute
Table (VAT).
The relationship between a GeoRaster object
and its raster data table is automatically
managed by GeoRaster itself internally using a
database dictionary
Geoserver
•
•
•
•
The GeoServer application is
comprised of a series of modules
At runtime, a module can make use
of Spring to obtain classes providing
services from other modules. This
ability to "plug-in" additional
functionality forms the basis for
GeoServers extension mechanism
Web Map Service (WMS) provides a
simple HTTP interface for requesting
geo-registered map images from one
or more distributed geospatial
databases
A WMS request defines the
geographic layer(s) and area of
interest to be processed. The
response to the request is one or
more geo-registered map images
(returned as JPEG, PNG, etc)
GeoTools
• GeoTools is a free software GIS
toolkit for developing standards
compliant solutions. It provides
an implementation of Open
Geospatial Consortium (OGC)
specifications as they are
developed
• It is written in Java and currently
is under active development. It is
used by GeoServer and UDig
projects
• GeoTools library includes lots of
plug-ins to support different data
formats with different coordinate
reference system
Existing GeoRaster Support
•
•
Recently, GeoRaster support has been added in GeoTools 2.6.4 version. It is
developed as an extension of “ImageMosaic-JDBC” plug-in
This plug-in takes one xml config file as input that contains all information
needed to query GeoRaster data
Flaws of Existing approach
1.
2.
3.
4.
5.
It does not mosaic georaster data if the GeoRaster table has ‘n’ number of rows.
This feature supports to retrieve only one row of data at a time.
It does not work with other layers.
It is not separate standalone plug-in. It is an extension of “ImageMosaic-JDBC”
plug-in.
User has to mention the co-ordinate reference systems (i.e EPSG) in the config
file
User has to know “GEORASTER” field name in GeoRaster table and name of the
“RASTER DATA TABLE”. All these things have to be mention in config file
Plug-in Development
•
•
First we need to store the GeoRaster data in Oracle spatial database
we need to find the way how we can make Geoserver to recognize our code as a plug-in.
–
To do this we need GeoTools support. Geoserver internally depends on GeoTools
library for all data manipulation. GeoTools provides few interfaces and class that
needs to be implemented and extended to develop new plug-in.
–
Geoserver handles two types of data i.e Vector and Raster data. GeoTools has
separate hierarchy structure of class to handle these types of data.
–
Since GeoRaster is raster type of data, we concern about the classes required to
handle raster data. Following are the interfaces and classes that needs to be
implemented and extended to create new plug-in.
1. org.geotools.coverage.grid.io.GridFormatFactorySpi (interface)
2. org.opengis.coverage.grid.Format (interaface)
3. org.geotools.coverage.grid.io.AbstractGridFormat (class)
Plug-in Development cont.,
•
We build the source code using Maven, a build tool and created jar file. Finally, we placed the
resultant jar in lib directory of Geoserver.
•
Next time, whenever Geoserver starts, it recognizes the jar as a plug-in and it list
GeoRaster as valid data source option in Geoserver
This plug-in does not depend on any licensed version jars.
•
• Input Configuration file format
<datastore >
<coverage>coverage_Name</ coverage >
<rastertable>Georaster_Table_Name</rastertable>
<server>DB Server IP</server>
<dbname>DB NAME</dbname>
<port>port</port>
<username>username</username>
<password>password</password>
</datastore>
Plug-in Development cont.,
•
•
•
•
•
•
•
<datastore>  Denotes the start of GeoRaster configuration details.
<coverage>  User defined name for layer
<rastertable>  Name of Georaster table which holds tiles of GeoRaster data
<server>  Database server address
<port>  Database port
<username>  login id
<password>  password
The configuration files has very few limited information needed to process
GeoRaster data.
Benefits of this plug-in
• It’s a separate plug-in developed to read GeoRaster data
based on “ImageMosaic-JDBC” plug-in.
• It mosaic “n” number of GeoRaster data from a table.
• It works with other layers.
• It needs few information about GeoRaster table in
configuration file.
ScreenShots
Screenshots cont.,
Screenshots cont.,
• Coordinate Reference
systems and Bounding
boxes are calculated
automatically by the
plug-in.
Screenshots cont.,
Screenshots cont.,
Screenshots cont.,
Conclusion
• This plug-in helps people who works with GeoRaster data.
• Need to check-in the code public repository.
• Getting support from various developer around the world by
giving the code to them directly.
• Contact : [email protected] for more information.
Thank you….
Questions if any……………..?