From: Andrea A. <and...@ge...> - 2014-08-02 14:50:14
|
Hi Eric, you'll have to provide better references to the issues you're seeing. The code you pasted now seems to have no relation to the jira ticket you have reported in the first mail (and you haven't yet told us what issue you have seen with polar stereographic reprojection) Please respond to the previous mails before introducing more topics, and show us what class/test is failing and how (full stack trace) Cheers Andrea On Sat, Aug 2, 2014 at 4:45 PM, Eric Holsinger <er...@he...> wrote: > 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 <and...@ge...> > wrote: > >> On Sat, Aug 2, 2014 at 3:10 AM, Eric Holsinger <er...@he...> 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 >> >> ------------------------------------------------------- >> > > -- == 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 ------------------------------------------------------- |