GeoServer

WMS reprojection failures

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.0-RC3
  • Fix Version/s: 1.7.0-RC4
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

Reprojecting the attached shapefile from its native projection (epsg:2154) to EPSG:4326 fails on 1.7.x with the following error:

09 Oct 14:22:22 WARN [renderer.shape] - Could not reproject the bounding boxes, proceeding in non reprojecting mode
java.lang.IllegalArgumentException: Argument "sourceCRS" should not be null.
at org.geotools.referencing.operation.AbstractCoordinateOperationFactory.ensureNonNull(AbstractCoordinateOperationFactory.java:732)
at org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation(BufferedCoordinateOperationFactory.java:247)
at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1361)
at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:265)
at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:335)
at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:416)

Issue Links

Activity

Hide
Justin Deoliveira added a comment -

I will note that it works fine on 1.6.x. Andrea, i leave this one to you.

Show
Justin Deoliveira added a comment - I will note that it works fine on 1.6.x. Andrea, i leave this one to you.
Hide
Andrea Aime added a comment -

This sounds like a very nasty one. Shall we fix it for RC4?

Show
Andrea Aime added a comment - This sounds like a very nasty one. Shall we fix it for RC4?
Hide
Andrea Aime added a comment - - edited

Hmmm... it may be related to the fact the shapefile has no native projection. What kind of SRS handling was chosen? The streaming renderer should not be trying to render this file, the feature source should be wrapped withing a force coordinate one at the catalog level.

Show
Andrea Aime added a comment - - edited Hmmm... it may be related to the fact the shapefile has no native projection. What kind of SRS handling was chosen? The streaming renderer should not be trying to render this file, the feature source should be wrapped withing a force coordinate one at the catalog level.
Hide
Justin Deoliveira added a comment -

I left it unchanged so force declared and ignore native. If this bug applies to all reprojection of this sort then yes I think its serious enough to hold off and try to fix for this RC... if it is somewhat isolated i think we should hold off and perhaps just fix for 1.7.1 since it will be going out quite soon after 1.7.0.

Show
Justin Deoliveira added a comment - I left it unchanged so force declared and ignore native. If this bug applies to all reprojection of this sort then yes I think its serious enough to hold off and try to fix for this RC... if it is somewhat isolated i think we should hold off and perhaps just fix for 1.7.1 since it will be going out quite soon after 1.7.0.
Hide
Andrea Aime added a comment -

Did some debugging, the issue presents itself only when the layer is just configured, if you stop and restart GeoServer it will work fine.
The issue is happening at the catalog level, in ResourcePool.getFeatureSource. Debugging shows that when the layer is just configured FeatureTypeInfo.getAttributes() returns an empty collection, which in turn makes the code skip srs forcing (no attribute, nothing to force).
After a restart, the attributes collection is properly populated and reprojection works fine.

Show
Andrea Aime added a comment - Did some debugging, the issue presents itself only when the layer is just configured, if you stop and restart GeoServer it will work fine. The issue is happening at the catalog level, in ResourcePool.getFeatureSource. Debugging shows that when the layer is just configured FeatureTypeInfo.getAttributes() returns an empty collection, which in turn makes the code skip srs forcing (no attribute, nothing to force). After a restart, the attributes collection is properly populated and reprojection works fine.
Hide
Andrea Aime added a comment -

Fixed on 1.7.x. On trunk it's waiting for http://jira.codehaus.org/browse/GEOS-2277
to be fixed

Show
Andrea Aime added a comment - Fixed on 1.7.x. On trunk it's waiting for http://jira.codehaus.org/browse/GEOS-2277 to be fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: