bilaldursun1 / nettopologysuite

Automatically exported from code.google.com/p/nettopologysuite
0 stars 0 forks source link

GeometryTransform.TransformGeometry throws an exception on MultiPoint #156

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create test method as follows:
        public void TestTransform()
        {
            const string sourceCsWkt = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]";
            const string targetCsWkt = "PROJCS[\"WGS 84 / Australian Antarctic Lambert\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",-68.5],PARAMETER[\"standard_parallel_2\",-74.5],PARAMETER[\"latitude_of_origin\",-50],PARAMETER[\"central_meridian\",70],PARAMETER[\"false_easting\",6000000],PARAMETER[\"false_northing\",6000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"3033\"]]";
            const string multiPointWkt = "MULTIPOINT (152.83949210500001 -42.14413555,152.83910355899999 -42.129844618)";

            var sourceCs = new ProjNet.CoordinateSystems.CoordinateSystemFactory().CreateFromWkt(sourceCsWkt);
            var targetCs = new ProjNet.CoordinateSystems.CoordinateSystemFactory().CreateFromWkt(targetCsWkt);
            var coordTransformation = (new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory()).CreateFromCoordinateSystems(sourceCs, targetCs);

            var geom = new NetTopologySuite.IO.WKTReader(NetTopologySuite.Geometries.GeometryFactory.Default).Read(multiPointWkt);
            var transGeom = NetTopologySuite.CoordinateSystems.Transformations.GeometryTransform.TransformGeometry(GeometryFactory.Default, geom, coordTransformation.MathTransform);

        }
2. Just execute the method.
3. Exception occurs with error message "Index was outside the bounds of the 
array."

What is the expected output? What do you see instead?
A new multipoint geometry object is expected but an exception happens.

What version of the product are you using? On what operating system?
NTS - Topology Suite 1.13.1 1256    Wednesday, July 10 2013

Thanks

Original issue reported on code.google.com by s...@4qbase.com on 4 Sep 2013 at 2:22

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1071.

Original comment by diegogu...@gmail.com on 5 Sep 2013 at 2:25

GoogleCodeExporter commented 9 years ago
fixed with rev. 1071
thanks for your detailed report, and god bless unit tests :)

Original comment by diegogu...@gmail.com on 5 Sep 2013 at 2:25