[udig-devel] BasicFeatureRenderer not happy when shapefile is
missing prj
Jesse Eichar
jeichar at refractions.net
Mon Aug 13 08:47:22 PDT 2007
phew ;).
Jesse
On Aug 13, 2007, at 2:39 AM, Tore Halset wrote:
> On Aug 9, 2007, at 23:04 , Jesse Eichar wrote:
>
>> 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.
>
> Just tested it, and the world_adm0 works again. Thanks!
>
> Regards,
> - Tore.
>
>
>>
>> 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.BasicFeatureR
>>>>>>> enderer.render(BasicFeatureRenderer.java:314)
>>>>>>> at
>>>>>>> net.refractions.udig.render.internal.feature.basic.BasicFeatureR
>>>>>>> enderer.render(BasicFeatureRenderer.java:193)
>>>>>>> at
>>>>>>> net.refractions.udig.project.internal.render.impl.RenderExecutor
>>>>>>> Impl$RenderJob.startRendering(RenderExecutorImpl.java:315)
>>>>>>> at
>>>>>>> net.refractions.udig.project.internal.render.impl.RenderExecutor
>>>>>>> Impl$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.AbstractCoordinateOperationFa
>>>>>>> ctory.ensureNonNull(AbstractCoordinateOperationFactory.java:665)
>>>>>>> at
>>>>>>> org.geotools.referencing.operation.DefaultCoordinateOperationFac
>>>>>>> tory.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.GeoResourceInfoInterc
>>>>>>> eptor$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.BasicFeatureR
>>>>>>> enderer.validateBounds(BasicFeatureRenderer.java:395)
>>>>>>> at
>>>>>>> net.refractions.udig.render.internal.feature.basic.BasicFeatureR
>>>>>>> enderer.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
>>
>> _______________________________________________
>> 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
More information about the udig-devel
mailing list