From: Jody G. <Jod...@li...> - 2009-03-04 00:00:24
|
Another question from off list... Alwyn Nolte wrote: > Hi > > Thank you for the geotools tutorials/labs. > I need to connect to oracle spatial. Is the POSTGIS lab relevant for oracle as well? > Yes; just change the connection parameters and you are good to go. I think that the PostGIS lab can be modified to suite your needs. > Asuming that one would only need to change the following and make to following assumptions: > > 1) In the properties file: change dbtype from 'postgis' to something like 'oracle' > Correct. I was going to to tell you to read the wiki (http://docs.codehaus.org/display/GEOTOOLS/Oracle-Spatial+Plugin) to check the status - this is an unsupported module (since it is hard to find volunteers willing to set up oracle and respond to bug reports). This page does a good job of bringing together bug reports from GeoTools, GeoServer and UDig with respect to the functioning of this module. If this is functionality you are interested in you are welcome to volunteer; indeed you may find a few patches mentioned in the bug reports that could be applied to improve this module. Long term the jdbc implementations (PostGIS, Oracle, DB2 ) are going to be retired and replaced with a new implementation called jdbc-ng which is faster and uses prepared statements more (for safety and speed). If you are available to help test this work please volunteer on the user list! In terms of user documentation I have not made a page for oracle yet! The javadocs are good: > > Determines whether DataStore created by this factory can process the > parameters. > > Required Parameters are: > > * |dbtype| - must equal "oracle" > * |host| > * |port| > * |user| > * |passwd| > * |instance| > > There are no defaults since each parameter must be explicitly defined > by the user, or another DataSourceFactorySpi should be used. This > behaviour is defined in the DataStoreFactorySpi contract. > I practice just in time documentation - for questions sent to the user list :-) With that in mind here is a new page documenting the connection parameters; I determined these by reading the test cases and source code. The javadoc for OracleDataStoreFactory still mentioned postgis (since this code has been copied from the postgis origional)> > 2) The CQL is not database specific - relevant to oracle as well. > That is correct; CQL is the text form of the Filter 1.1 specification (ie some xml that is sent to remote web services). We produce the same data structure in both cases; and have code to turn this data structure into oracle spatial specific SQL. > Do you have a working example of a oracle connection and some filtering if it is not the basic same setup for this postgis lab > It is the same example; since oracle is expensive to set up I have not felt the need to make a general lab showcasing it as an example. You can review the geotools test cases for specific examples however. > I'm very new to GIS as well as Oracle spatial so this is a very steap learning curve...but enjoyable. I am glad you are enjoying the Labs; I wrote them for the FOSS4G 2007 conference; and am applying to run them again at FOSS4G2009 (if I am successful these labs will be updated and improved). > In the mean time I'll try to setup and use the lab and to connect to our oracle spatial instance. > Cool; send feedback to the user list; there are several developers who know this code. I also have set up "office hours" where I will be online at the #geotools IRC channel and can help you one on one. Jody The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence. |