Still throwing the exception "dimension must be <= 3".  What follows is my
code, updated pom section below that:


CoordinateReferenceSystem cartesianCRS = DefaultGeocentricCRS.CARTESIAN;
CoordinateReferenceSystem wgsCRS = DefaultGeographicCRS.WGS84;

Hints hints = new Hints( Hints.CRS, DefaultGeographicCRS.WGS84 );
GeometryFactory geometryFactory =
JTSFactoryFinder.getGeometryFactory(hints);

Coordinate[] coordsArr = new Coordinate[points.size()];
points.toArray(coordsArr);

LineString line = geometryFactory.createLineString(coordsArr);

//needed to transform from spherical to flat, then back
MathTransform transformToMeter = CRS.findMathTransform(wgsCRS,
cartesianCRS, true);
MathTransform transformFromMeter = CRS.findMathTransform(cartesianCRS,
wgsCRS, true);

//THIS NEXT LINE THROWS THE  EXECPTION "dimension must be <= 3"
LineString transformedLine = (LineString) JTS.transform(line,
transformToMeter);

Here is my pom now, I blew away all org.geotools and com.vividsolutions
directories in my .m2 repo, BTW, before doing a clean/install
<version.geotools>12-SNAPSHOT</version.geotools>
        <dependency>
            <groupId>org.geotools</groupId>
            <artifactId>gt-geometry</artifactId>
            <version>${version.geotools}</version>
        </dependency>
      <dependency>
        <groupId>com.vividsolutions</groupId>
        <artifactId>jts</artifactId>
        <version>1.13</version>
        <exclusions>
          <exclusion>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
        <dependency>
              <groupId>org.geotools</groupId>
              <artifactId>gt-epsg-extension</artifactId>
              <version>${version.geotools}</version>
        </dependency>


On Sat, Aug 2, 2014 at 1:35 AM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> On Sat, Aug 2, 2014 at 3:10 AM, Eric Holsinger <e...@heregear.com> wrote:
>
>> Good day.
>>
>> The bug GEOT-4795 still exists as far as I can tell, even though it was
>> posted as fixed in 2011.
>>
>
> https://jira.codehaus.org/browse/GEOT-4795 was created and fixed in 2014.
> Are you referring to another issue?
> If it's really the reprojection of envelopes over polar stereoraphic, can
> you provide
> more details of what is not working for you?
> Every bug marked as fixed has at least one test showing what was resolved,
> this one
> is no exception, see the four test methods here:
>
>
> https://github.com/geotools/geotools/blob/master/modules/plugin/epsg-hsql/src/test/java/org/geotools/referencing/CRSTest.java#L588
>
> Cheers
> Andrea
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/NWWaa2 for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to