PreparestatementでPostGISにGeometryデータをINSERT

ソース例

String sql = "INSERT INTO HOGE_TBL (GEOMETRY_COL) VALUES (GeomFromText(?, -1))";

Connection con = ConnectionManager.getInstance().getConnection();
PreparedStatement pstmt = con.prepareStatement(sql);

Point point = (Point)dto.getPgGeometry().getGeometry();
pstmt.setString(cnt,"POINT(" + point.getX() + " " + point.getY() + ")");

pstmt.executeUpdate();

INSERT文

-- 座標列の生成
SELECT AddGeometryColumn('testgis', 'geoaddr','location',4326,'POINT',3);
SELECT AddGeometryColumn('testgis', 'geoaddr','bound',4326,'LINESTRING',2);
SELECT AddGeometryColumn('testgis','geoaddr','shape',4326,'POLYGON',2);

-- データ挿入
-- POLYGONはリング(指定した点同士を結ぶと、四角や三角などの閉じた図形)が閉じていないとエラーになることに注意。
INSERT INTO geoaddr (
	location, 
	bound,
	shape
) 
VALUES 
(
	GeometryFromText('POINT(-48109.39844 -140907.90625 0)', 4326),
	GeometryFromText('LINESTRING(1 2,3 4)', 4326),
	GeometryFromText(
		'POLYGON((191232 243117,191232 243119,191234 243117,191232 243117),
			(191232 243117,191232 243119,191234 243117,191232 243117))', 4326)
);