[postgis-devel] [PostGIS] #609: Bad source code in manual section 5.2 Java Clients
PostGIS
trac at osgeo.org
Sat Sep 25 12:12:54 PDT 2010
#609: Bad source code in manual section 5.2 Java Clients
---------------------------------------+------------------------------------
Reporter: simoc | Owner: pramsey
Type: defect | Status: new
Priority: low | Milestone: PostGIS 1.5.2
Component: postgis | Version: 1.5.X
Keywords: JDBC client documentation |
---------------------------------------+------------------------------------
I found some errors in the example Java source code in section 5.2 'Java
Clients (JDBC)' of postgis-1.5.1.pdf:
Replace:
{{{
((org.postgresql.Connection)conn).addDataType("geometry","org.postgis.PGgeometry");
((org.postgresql.Connection)conn).addDataType("box3d","org.postgis.PGbox3d");
}}}
with:
{{{
((org.postgresql.jdbc3.Jdbc3Connection)conn).addDataType("geometry","org.postgis.PGgeometry");
((org.postgresql.jdbc3.Jdbc3Connection)conn).addDataType("box3d","org.postgis.PGbox3d");
}}}
Replace:
{{{
ResultSet r = s.executeQuery("select ST_AsText(geom) as geom,id from
geomtable");
}}}
with:
{{{
ResultSet r = s.executeQuery("select geom,id from geomtable");
}}}
Replace:
{{{
if( geom.getType() = Geometry.POLYGON ) {
}}}
with:
{{{
if( geom.getGeoType() == Geometry.POLYGON ) {
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/609>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list