[udig-devel] BasicFeatureRenderer not happy when shapefile is
missing prj
Jesse Eichar
jeichar at refractions.net
Thu Aug 9 14:04:24 PDT 2007
I did in fact find a bug with this. I"m not totally sure that it
is the same bug as what you encountered but I'm releasing a new copy
of RC11 with the fix.
Jesse
On Aug 8, 2007, at 10:55 PM, Tore Halset wrote:
> On Aug 8, 2007, at 17:49 , Jesse Eichar wrote:
>
>> Is it a error or just a warning. It provides a warning because
>> the layer cannot be reprojected until the layer knows its
>> projection. If there is an error, well that is probably a bug
>
> It is an error, the map does not show up. It does not matter if I
> add this as the first or last layer to my map.
>
> The following data-set used to show up in may, but not now. I know
> this as we tell people to use this as the background map for our
> WMS project. We could of course tell them to use a world dataset
> with a .prj-file if I could find one..
>
> http://www.diva-gis.org/data/misc/world_adm0.zip
>
> Regards,
> - Tore.
>
>>
>> Jesse
>>
>>
>> On Aug 7, 2007, at 11:37 PM, Tore Halset wrote:
>>
>>> 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.BasicFeatureRen
>>>>> derer.render(BasicFeatureRenderer.java:314)
>>>>> at
>>>>> net.refractions.udig.render.internal.feature.basic.BasicFeatureRen
>>>>> derer.render(BasicFeatureRenderer.java:193)
>>>>> at
>>>>> net.refractions.udig.project.internal.render.impl.RenderExecutorIm
>>>>> pl$RenderJob.startRendering(RenderExecutorImpl.java:315)
>>>>> at
>>>>> net.refractions.udig.project.internal.render.impl.RenderExecutorIm
>>>>> pl$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.AbstractCoordinateOperationFact
>>>>> ory.ensureNonNull(AbstractCoordinateOperationFactory.java:665)
>>>>> at
>>>>> org.geotools.referencing.operation.DefaultCoordinateOperationFacto
>>>>> ry.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.GeoResourceInfoIntercep
>>>>> tor$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.BasicFeatureRen
>>>>> derer.validateBounds(BasicFeatureRenderer.java:395)
>>>>> at
>>>>> net.refractions.udig.render.internal.feature.basic.BasicFeatureRen
>>>>> derer.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
>>>>
>>>
>>> _______________________________________________
>>> 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
>>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20070809/edf47557/attachment.html
More information about the udig-devel
mailing list