Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

161
 
162
 
162
 
PointEncoder.java
_>11 /*
<>2 - * $Id: PointEncoder.java 161 2010-03-06 18:08:59Z maesenka $
  2+ * $Id: PointEncoder.java 162 2010-03-07 21:21:38Z maesenka $
33  *
 44  * This file is part of Hibernate Spatial, an extension to the
 55  * hibernate ORM solution for geographic data.
     
 !
5151 
 5252         SqlServerGeometry sqlServerGeom = new SqlServerGeometry();
 5353         sqlServerGeom.setSrid(geom.getSRID());
<>54 -        sqlServerGeom.setIsSinglePoint();
5554         sqlServerGeom.setIsValid();
<> 55+
  56+        if (geom.isEmpty()) {
  57+            sqlServerGeom.setNumberOfPoints(0);
  58+            sqlServerGeom.setNumberOfFigures(0);
  59+            sqlServerGeom.setNumberOfShapes(1);
  60+            sqlServerGeom.setShape(0, new Shape(-1, -1, OpenGisType.POINT));
  61+            return sqlServerGeom;
  62+        }
  63+
  64+        sqlServerGeom.setIsSinglePoint();
5665         sqlServerGeom.setNumberOfPoints(1);
 5766         Coordinate coordinate = geom.getCoordinate();
 5867         if (is3DPoint(coordinate)) {
     
 !
7079     @Override
 7180     protected void encode(Geometry geom, int parentIdx, List<Coordinate> coordinates, List<Figure> figures, List<Shape> shapes) {
 7281         if (!(geom instanceof Point)) throw new IllegalArgumentException("Require Point geometry");
<> 82+        if (geom.isEmpty()) {
  83+            shapes.add(new Shape(parentIdx, -1, OpenGisType.POINT));
  84+        }
<_7385         int pntOffset = coordinates.size();
 7486         int figureOffset = figures.size();
 7587         coordinates.add(geom.getCoordinate());
FishEye: Open Source License registered to Hibernate Spatial.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, Subversion, CVS & Perforce analysis. (Version:1.5.2 Build:build-298 2008-05-26 ) - Administration - Page generated 2010-09-08 06:29 +0200