Skip to main content

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

I had this issue time ago and I solved it by creating a subtype:
http://jgrasstechtips.blogspot.com/2008/01/how-to-create-temporary-layer-with.html

Hope that helps,
Andrea


On Wed, Oct 22, 2008 at 4:35 PM, Jürgen Jacob <zoid.berg@xxxxxx> wrote:
> 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
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>


Back to the top