Hi,
I am trying to import my shapefile data into Oracle Spatial using geotools.
Table and spatial indexes get's created, but there is a problem while trying
to copy data. I receive strange warning about which I cannot google any
answer:
May 28, 2011 6:16:26 AM org.geotools.jdbc.JDBCDataStore getMapping
WARNING: No mapping for com.vividsolutions.jts.geom.Point
I am using latest version of geotools, that is 8.0-M0.
Here's the snippet of my pom.xml:
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools.jdbc</groupId>
<artifactId>gt-jdbc-oracle</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-oracle</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net repository</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation
Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
</repositories>
And the source code of my dummy application:
package org.geotools.tutorial;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.geotools.data.DataStore;
import org.geotools.data.DataStoreFinder;
import org.geotools.jdbc.JDBCDataStore;
public class OracleExample {
public static void main(String args[]) throws Exception {
java.util.Map params = new java.util.HashMap();
params.put( "dbtype", "oracle");
params.put( "host", "localhost");
params.put( "port", 1521);
params.put( "database", "bla");
params.put( "schema", "bla");
params.put( "user", "bla");
params.put( "passwd", "bla");
DataStore shapeFileDataStore =
openShapefile("/home/jirka/workspace/java/sextante-geotools/data/points.shp");
DataStore oracleDataStore = (DataStore)
DataStoreFinder.getDataStore( params );
oracleDataStore.createSchema(shapeFileDataStore.getSchema("points"));
}
private static DataStore openShapefile(String sFile) throws IOException
{
File file = new File( sFile );
Map connect = new HashMap();
connect.put( "url", file.toURL() );
DataStore dataStore = DataStoreFinder.getDataStore( connect );
return dataStore;
}
}
Am I missing something important in the concept of using the Oracle Spatial
plugin?
Thank you very much for any hint.
Jiri Novak
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Oracle-spatial-plugin-WARNING-No-mapping-for-com-vividsolutions-jts-geom-Point-tp6413790p6413790.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users