Ahmet,
If you are querying the postgis database directly, you can use ST_AsText()
or ST_AsBinary() to get the geometry in the WKT or the WKB format and use
OGRGeometry::importFromWkt() or OGRGeometry::importFromWkb() respectively to
load them into the OGR objects. This question is actually for
Ahmet,
You might want to work with WKT while debugging and switch to WKB later.
Did you use ST_AsBinary(geometry column) in the SQL query string?
On Tue, Dec 28, 2010 at 3:08 PM, ahmettemi...@gmail.com wrote:
thank you
while (rs.next()) {
//g1 =
thank you
while (rs.next()) {
//g1 =
com.vividsolutions.jts.geom.Geometry.wkbReader.read(WKBReader.hexToBytes(rs.getString(1)));
g1 = org.gdal.ogr.Geometry.CreateFromWkb(rs.getBytes(1));
if (g1 != null) {
System.out.println( g1.GetGeometryType());
}
}
g1 returns null.
can you tell me what