From: David Z. <dz...@re...> - 2004-10-08 23:29:58
|
Umm, you are using WKT printers + parsers, they should still talk the same language in terms of WKT? David On Fri, 2004-10-08 at 15:43, Jesse Eichar wrote: > Oh darn. The problem is this. I didn't realize that CRSService > currently uses all the old CRS stuff and I was passing in a new CRS > object. Evidently the two don't agree. So now I have something that > more or less works. > > Later, > Jesse > > > Jesse Eichar said the following on 10/08/2004 03:26 PM: > > > I've looked into the bug some more. An I've identified the code > > causing the problem. Should I start a JIRA bug report? > > > > public static CoordinateSystem cs( CoordinateReferenceSystem crs ){ > > if( crs instanceof CoordinateSystem ){ > > return (CoordinateSystem) crs; > > } > > String wkt = crs.toWKT(); > > CoordinateSystemFactory factory = > > CoordinateSystemFactory.getDefault(); > > try { > > return factory.createFromWKT( wkt ); > > } catch (FactoryException huh) { > > huh.printStackTrace(); > > return null; > > } > > } > > > > return factory.createFromWKT( wkt ); > > is throwing the exception. This doesn't make sense to me. Either > > parsing or crs.toWKT() must have a bug. > > > > wkt= > > GEOGCS["WGS84", > > DATUM["WGS84", > > SPHEROID["WGS84", 6378137.0, 298.257223563]], > > PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], > > AXIS["Geodetic longitude", EAST], > > AXIS["Geodetic latitude", NORTH]] > > > > > > Here's the exception: > > org.opengis.referencing.FactoryException: Error in "GEOGCS": > > Unparsable text "DATUM["WGS84", > > SPHEROID["WGS84 (...) AXIS["Geodetic latitude", NORTH]]". Check > > characters following "". > > at > > org.geotools.cs.CoordinateSystemFactory.createFromWKT(CoordinateSystemFactory.java:744) > > > > at org.geotools.data.crs.CRSService.cs(CRSService.java:233) > > at org.geotools.data.crs.CRSService.reproject(CRSService.java:241) > > at > > org.geotools.renderer.lite.LiteRenderer2.queryLayer(LiteRenderer2.java:489) > > > > at > > org.geotools.renderer.lite.LiteRenderer2.paint(LiteRenderer2.java:379) > > at > > net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:100) > > > > at > > net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.draw(BasicFeatureRenderer.java:159) > > > > at > > net.refractions.udig.project.render.AbstractRenderer$RenderJob.run(AbstractRenderer.java:327) > > > > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) > > > > Cheers, > > Jesse > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > > Use IT products in your business? Tell us what you think of them. Give us > > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > > more > > http://productguide.itmanagersjournal.com/guidepromo.tmpl > > _______________________________________________ > > Geotools-devel mailing list > > Geo...@li... > > https://lists.sourceforge.net/lists/listinfo/geotools-devel > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel |