I think we could set up so that we could "force" the projection of the current map into the shapefile. Would that be appropriate? Actually we should be able to set up the renderer - to stuff some kind of default into the GeoTools "MapLayer" ....
Magna I am pretty sure this is just a bug in how BasicFeatureRenderer is doing its thing, it makes sense - the code "getBounds()" is being asked how big - and with out a projection we honestly do not know.
Let's review the code here on email and see if we can figure out a sensble default. It is probably best to put a break point in BasicFeatureRenderer and have a look at what information is actually available to solve the problem.
I am sending again the error message i get everytime i try to load a shapefile without its *.prj:
net.refractions.udig.project.render.RenderException: Exception(s) occured during rendering: Argument "sourceCRS" should not be null.
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:314)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:193)
at net.refractions.udig.project.internal.render.impl.RenderExecutorImpl$RenderJob.startRendering(RenderExecutorImpl.java:315)
at net.refractions.udig.project.internal.render.impl.RenderExecutorImpl$RenderJob.run(RenderExecutorImpl.java:396)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.lang.IllegalArgumentException: Argument "sourceCRS" should not be null.
at org.geotools.referencing.operation.AbstractCoordinateOperationFactory.ensureNonNull(AbstractCoordinateOperationFactory.java:665)
at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:216)
at org.geotools.referencing.CRS.transform(CRS.java:225)
at org.geotools.referencing.CRS.findMathTransform(CRS.java:162)
at net.refractions.udig.project.internal.impl.GeoResourceInfoInterceptor$Wrapper.getBounds(GeoResourceInfoInterceptor.java:85)
at net.refractions.udig.project.internal.impl.LayerImpl.getBounds(LayerImpl.java:1857)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.validateBounds(BasicFeatureRenderer.java:395)
at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:223)
... 4 more
_______________________________________________
User-friendly Desktop Internet GIS (uDig)