Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Reprojection problem?

I'm using several temporary resources in my application. These temporary layers are created on a Map with CRS = WGS84.

Objects in my layers are Features on lat/lon and the edit tools are working.

Then I change the CRS to e.g. WGS84 47N using the Coordinate Systems dialog. Using an edit tool again, example polygon tool for creating a new polygon results in this exception:

org.geotools.referencing.operation.projection.PointOutsideEnvelopeException: Longitude 1425336°19.9'W is out of range (±180°). at org.geotools.referencing.operation.projection.MapProjection.transform(MapProjection.java:621) at org.geotools.referencing.operation.projection.MapProjection.transform(MapProjection.java:678)
	at org.geotools.geometry.jts.JTS.xform(JTS.java:274)
	at org.geotools.geometry.jts.JTS.transform(JTS.java:168)
at org.geotools.geometry.jts.ReferencedEnvelope.transform(ReferencedEnvelope.java:230) at net.refractions.udig.project.internal.impl.LayerImpl.getBounds(LayerImpl.java:2008) at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.validateBounds(BasicFeatureRenderer.java:407) at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:229) at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:199) at net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(RenderJob.java:103) at net.refractions.udig.project.internal.render.impl.RenderJob.run(RenderJob.java:203)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



I checked my code and found

featureBuilder.addType(AttributeTypeFactory.newAttributeType(GEOMETRY_IDENTIFIER, myGeometry, true, Integer.MAX_VALUE, null,DefaultGeographicCRS.WGS84));

I replaced DefaultGeographicCRS.WGS84 with null but the problem still exists.

Can someone explain me this behaviour? Is it not possible to change the CRS on temporary layers?

Thank you, Jürgen




Back to the top