Permalink
Browse files

HIBSPA-53 - EventLocator now copies correctly SRID from input MGeometry

  • Loading branch information...
1 parent 048ce83 commit 2d5e6801bc7a2cab2f347fdc51e9fe34e62c6d33 @maesenka maesenka committed Jun 28, 2010
@@ -73,7 +73,7 @@ public static MultiMLineString getLinearGeometry(MGeometry lrs,
}
public static void copySRID(Geometry source, Geometry target) {
- target.setSRID(target.getSRID());
+ target.setSRID(source.getSRID());
}
}
@@ -1,5 +1,5 @@
/*
- * $Id:$
+ * $Id$
*
* This file is part of Hibernate Spatial, an extension to the
* hibernate ORM solution for geographic data.
@@ -109,5 +109,12 @@ public void test_event_ends_at_end_of_component() throws MGeometryException {
assertEquals(MCoordinate.create2dWithMeasure(7.0, 0.0, 7.0), (MCoordinate) coordinates[2]);
}
+ @Test
+ public void test_locator_result_has_same_srid_as_input_mgeometry() throws MGeometryException {
+ incrML.setSRID(123);
+ MultiMLineString result = EventLocator.getLinearGeometry(incrML, 4.5, 7.0);
+ assertEquals(123, result.getSRID());
+ }
+
}

0 comments on commit 2d5e680

Please sign in to comment.