Commit 5ecdc99 1 parent d379976 commit 5ecdc99 Copy full SHA for 5ecdc99
File tree 2 files changed +9
-4
lines changed
src/main/java/nl/b3p/loader/jdbc
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 23
23
import org .apache .commons .logging .Log ;
24
24
import org .apache .commons .logging .LogFactory ;
25
25
import org .locationtech .jts .io .ParseException ;
26
-
27
26
import java .sql .SQLException ;
28
27
29
28
@@ -64,11 +63,17 @@ public Object convertToNativeGeometryObject(org.locationtech.jts.geom.Geometry g
64
63
return null ;
65
64
}
66
65
String param = g .toText ();
67
- // return param;
66
+ // geotools
67
+ // import org.geotools.geometry.jts.WKTWriter2;
68
+ // import org.locationtech.jts.io.WKTWriter;
69
+ // String param = (new WKTWriter2(2)).write(g);
68
70
if (param == null || param .trim ().length () == 0 ) {
69
71
return null ;
70
72
}
71
- return Geometry .STGeomFromText (param , srid );
73
+ LOG .trace ("Converted geom WKT: " + param + ", SRID: " + srid );
74
+ Geometry sqlGeom = Geometry .STGeomFromText (param , srid );
75
+ LOG .trace ("mssql geom: " + sqlGeom );
76
+ return sqlGeom ;
72
77
}
73
78
74
79
@ Override
Original file line number Diff line number Diff line change @@ -202,6 +202,6 @@ public Geometry convertToJTSGeometryObject(Object nativeObj) {
202
202
}
203
203
204
204
public String getUpdateSequenceSQL (String seqName , long nextVal ){
205
- throw new UnsupportedOperationException ("Not supported." );
205
+ throw new UnsupportedOperationException ("Update sequence not supported for this database version ." );
206
206
}
207
207
}
You can’t perform that action at this time.
0 commit comments