jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-2260

Wrong Envelope / CRS loaded from Catalog reader for Coverages

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 2.0.x
  • Component/s: Configuration
  • Labels:
    None

Description

As can be seen from the snippet below:

String userDefinedCrsIdentifier = (String)envelope.get( "srsName" );
String nativeCrsWkt = (String)envelope.get("crs");

coverage.setSRS(userDefinedCrsIdentifier);
CoordinateReferenceSystem crs = CRS.parseWKT(nativeCrsWkt);
coverage.setNativeCRS( crs );

ReferencedEnvelope bounds = new ReferencedEnvelope(
(Double) envelope.get( "x1" ), (Double) envelope.get( "x2" ),
(Double) envelope.get( "y1" ), (Double) envelope.get( "y2" ),
crs
);
coverage.setNativeBoundingBox(bounds);

The catalog importer reads the bounds projected in the user defined CRS and associates to them the native CRS, so resulting on a final Coverage Envelope which has wrong coordinates against its CRS.

Of course this error can cuse unexpected GeoServer behavior when threating Rasters.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Gabriel Roldán added a comment - 03/Oct/08 10:21 AM

oops, my fault.
The fix is easy, yet its a bit annoying due to the following:
ResourceInfo hast setNativeBoundingBox and getNativeBoundingBox. It also has getBoundingBox() to get the bounds in the declared crs, but there's no setter for it. Instead, ResourceInfo explicitly documents it to be a derived property from getNativeBoundingBox().
That is, ResourceInfo implementations shall store the native box and perform the reprojection themselves for the getBoundingBox() result.
Which leads me to think I would prefer to change that contract and keep the catalog *Info classes being as plain data objects as possible instead of forcing them to make any computation.

Show
Gabriel Roldán added a comment - 03/Oct/08 10:21 AM oops, my fault. The fix is easy, yet its a bit annoying due to the following: ResourceInfo hast setNativeBoundingBox and getNativeBoundingBox. It also has getBoundingBox() to get the bounds in the declared crs, but there's no setter for it. Instead, ResourceInfo explicitly documents it to be a derived property from getNativeBoundingBox(). That is, ResourceInfo implementations shall store the native box and perform the reprojection themselves for the getBoundingBox() result. Which leads me to think I would prefer to change that contract and keep the catalog *Info classes being as plain data objects as possible instead of forcing them to make any computation.

People

  • Assignee:
    Alessio Fabiani
    Reporter:
    Alessio Fabiani
Vote (0)
Watch (0)

Dates

  • Created:
    03/Oct/08 9:55 AM
    Updated:
    08/Dec/10 3:33 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.