Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] BasicFeatureRenderer not happy when shapefile is missing prj

Hello.

Sorry for answering this old mail. Did anyone create a jira issue for this one?

I used to use the world shape file from diva-gis as a background. It used to work with uDig 1.1.x around may 2007, but not now. uDig complains about sourceCRS being null.

I can switch to a different background map, but it looks like it is pretty common to distribute unprojected shape files without the .prj- file.

 - Tore.

On Jun 22, 2007, at 2:46 , Jody Garnett wrote:

Schmitt, Magna (CIP) wrote:
Hello:
According with my last email (Sorry, was in branches 1.1.x (Shapefiles does not load properly in branches 1.0.x)) The shapefiles that has no .prj file cannot be loaded, will this issue always exists? . I am asking this because in a previous version of branches 1.1.x i could load shapefiles without their prj without problems but now i cannot.

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.

Cheers,
Jody

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.BasicFeatureRender er.render(BasicFeatureRenderer.java:314) at net.refractions.udig.render.internal.feature.basic.BasicFeatureRender er.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.BasicFeatureRender er.validateBounds(BasicFeatureRenderer.java:395) at net.refractions.udig.render.internal.feature.basic.BasicFeatureRender er.render(BasicFeatureRenderer.java:223)
	... 4 more
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel




Back to the top