PostGIS: ST_Within returns "t"/"f" letters instead off "true"/"false" booleans

المشرف العام

Administrator
طاقم الإدارة
PostGIS: ST_Within returns "t"/"f" letters instead off "true"/"false" booleans

I have simple query which contains among others:

SELECT ST_Within(ST_GeomFromText('POINT(lon lat)', 4326), buildings.geom) AS is_within

So I expect the result column is_within to be Boolean value. And this is what happening when I test this on QGIS. Then I integrate it within some java code using the well known standard connection with driver class (nothing unusual):

Class.forName(DB_CLASS); Connection connection = DriverManager.getConnection(DB_ADDRESS, DB_USER_NAME, DB_PASSWORD); if (connection != null) { Statement statement = connection.createStatement(); String SQL = ...; ResultSet resultSet = statement.executeQuery(SQL); while (resultSet.next()) { System.out.println(resultSet.getString(1)); //result is letters and not booleans } resultSet.close(); statement.close(); connection.close(); } Now from some reason the result is "t" instead of "true" and "f" instead of "false". Why is this happening?

Thanks,



أكثر...
 
أعلى