First of all - I don't think you are doing anything wrong. I have written code to go from a shapefile to postgis once; and it took a little bit of time to get the data into the right shape (in terms of CRS, SRID numbers, longs to integers and so on ...).
The line "getGeometryAttributeIO" should be making a choice between: - EWKTAttributeIO - PgWKBAttributeIO Based on a number of factors; I am wondering if there is a "caused by" section of your stack trace that can tell me where in getGeometryAttributeIO() method things have gone strange? >>> On this last line, the application throws the following error: >>> >>> java.lang.NoSuchFieldError: FEATURE_2D >>> at >>> org.geotools.data.postgis.PostgisDataStore.getGeometryAttributeIO(PostgisDataStore.java:1835) >>> at org.geotools.data.jdbc.QueryData.<init>(QueryData.java:134) >>> at >>> org.geotools.data.jdbc.JDBC1DataStore.executeQuery(JDBC1DataStore.java:907) >>> at >>> > The postgis table has this SRID: 4326, the shapefile hase the same > srid, it just doesn't say this literally in the .prj - file: I can't > look it up for now, but it was something like GCS_WGS_1984, with the > projectionparameters next to it... > Are you suggesting to specifically set the srid of the shapefile? > In your reader you control *everything* about the data that is going to be sent to PostGIS. I would compare a feature form PostGIS to the features you are sending in; and make everything match exactly. Jody ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users