Opened 17 years ago

Closed 17 years ago

#1679 closed defect (fixed)

Created Shape Layers return wrong SRS

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.5.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: shape srs
Cc:

Description

Inspection of the OGRShapeDataSource::CreateLayer() shows:

        /* the shape layer needs it's own copy */
        poSRS = poSRS->Clone();
        poSRS->morphToESRI();

and then this poSRS is passed into the OGRShapeLayer constructor. I think this will result in a GetSpatialRef() on a newly created layer being in ESRI format, instead of OGR format though I haven't constructed a test yet to verify it. This bug has been created to ensure I don't forget to come back and fix this.

It does not seem like a very pressing error so I think it would be sufficient to fix in trunk.

The fix should be to use a temporary SRS for the morphToESRI() and write, and then discard it.

Change History (1)

comment:1 by warmerdam, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r11817).

Note: See TracTickets for help on using tickets.