OpenGIS
I am a technical representative to the
Open GIS Consortium on
behalf of
Chesapeake Analytics.
I have been reviewing documents and have decided it would be worthwhile
to attempt to provide OpenSource reference implementations of some of
the OpenGIS technology specifications.
Beyond the goals of advancing OpenSource, and OpenGIS standards, my reasons
also include developing a solid understanding of OpenGIS standards, and
technology so that I can propose OpenGIS related projects to various
clients. I am trying to get a prototype running so that I can more
accurately bid those contracts, and to prove that I have the required
expertise.
Simple Features
I have started work aimed at implementing a Simple Features for COM (SFCOM)
server. The reference server would likely provide access to Shapefiles
using my Shapelib, but I hope that the
implementation would provide a useful set of sample code for others
other servers.
I picked SFCOM over SFCORBA because it seems like the Windows technology
will be more used. However, I am interested in pursuing an SFCORBA
implementation using a free ORB like MICO at some point in the future. I
haven't pursued SFSQL because I haven't got (nor could I afford) access
to Oracle, SDE or another database backend that I could build on. Perhaps
at some point in the future it could be done within PostgreSQL, but I
think it would be a big job.
Current Status
- Downloaded and installed MSDASDK, and successfully built and ran
sample OLE DB producer and consumer.
- Downloaded sample datasets for conformance testing of SFCOM
implementations (in MS Access format) from OGC (these were provided to
OGC by Cadcorp).
- Developed core C++ classes for modelling some of the simple feature
data types (Point, LineString (Curve/LinearRing), and Polygon), and capable
of converting back and forth between well known binary format, and object
instances. This core is known as OGR (OpenGIS Reference subsystem). The
ogr_geometry.h file shows the classes
represented.
- Developed OLE DB consumer (client) code capable of reading geometry
columns (BLOBs in well known binary (WKB) format) and converting them
to object instances. This consists principly of
sfdump.cpp,
oledb_sup.h and
oledbsuprowset.cpp.
- Installed Visual Basic, and the Cadcorp producer, client and test
suite. The cadcorp provider and geometry service pass the cadcorp
test suite.
- My client program has been updated to read binary data
from the Cadcorp provider using the IStream interface (the column appears
as type DBTYPE_IUNKNOWN). However, the client doesn't get the correct
binary data for records after the first.
- My client program has been updated to use the Cadcorp geometry
services to interpete the BLOB data, but I always get an invalid argument
error in the CreateFromWKB() method on the IGeometryFactory. This
appears to be related to the BLOB VARIANT argument.
- I have begun implementing a Geometry service. The
code builds and works at least for
building a IPoint geometry from a blob, and fetching the point coordinates
back from it. This service uses the objects defined in
ogr_geometry.h to do the hard stuff.
Resources
Plans
- Evolve my client to work aginst the OLE DB support inherent in the
Cadcorp OLE DB producer, including some of the table navigation information
specific to OpenGIS. (The current SFDUMP program requires the user to
provide the name of the geometry column name in the table).
(Underway)
- Once this is all working, I would launch into implementation of
SF COM services myself. Initially I will continue to use MS Access to
provide the OLE DB functionality, but implement my own copy of at
least some of the SF COM Geometry services based on the OGR library.
(Underway)
- Following this, I would attempt to actually implement an OLE DB
interface to the Shapelib API, making shapefiles appear to be a proper
database. (Being pursued by Ken Shih).