Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#4247 closed defect (fixed)

The BSB driver does not handle correctly the European 1950 datum

Reported by: jcrepetto Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: bsb ED50
Cc:

Description

I have some BSB/KAP files containing these metadata :

BSB_KNP=SC=15000,GD=European 1950 ,PR=MERCATOR,PP=0.000000,PI=UNKNOWN,SP=UNKNOWN,SK=0,UN=METERS,SD=LOWEST LOW WATER,DX=1.50,DY=1.50

But gdalinfo reports that the coordinate system is WGS84.

The attached patch fixes the problem.

Attachments (1)

bsb_ED50.patch.gz (1.6 KB) - added by jcrepetto 5 years ago.
Patch to support the ED50 datum in the BSB driver

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by jcrepetto

I have found another problem : The BSB driver considers that the GCP coordinates are always in WGS84 :

        oWGS84_SRS.SetWellKnownGeogCS( "WGS84" );
        oProjected_SRS.SetFromUserInput( osUnderlyingSRS );
        
        poCT = OGRCreateCoordinateTransformation( &oWGS84_SRS, 
                                                  &oProjected_SRS );

I'll try to update the patch to fix this problem.

Changed 5 years ago by jcrepetto

Attachment: bsb_ED50.patch.gz added

Patch to support the ED50 datum in the BSB driver

comment:2 Changed 5 years ago by jcrepetto

I have updated the patch, now georefencing is correct.

Plaese commit the patch.

comment:3 in reply to:  2 Changed 5 years ago by jcrepetto

I meant : now georeferencing is correct, please commit the patch.

comment:4 Changed 5 years ago by Even Rouault

Resolution: fixed
Status: newclosed

The patch looked good. I have just renamed the pszDatum variable to pszGEOGCS to be really explicit on its content. The autotest suite is a bit light on datum&projection support in BSB. I've tested quicly with 2 NOAA datasets mentionned in http://trac.osgeo.org/gdal/ticket/3409#comment:11 that it doesn't cause apparent regressions in the WGS84 case.

r23113 /trunk/gdal/frmts/bsb/bsbdataset.cpp: BSB: Parse the GD keyword in BSB_KNP to recognize European 1950 datum (#4247, patch by jcrepetto)

r23114 /branches/1.8/gdal/frmts/bsb/bsbdataset.cpp: BSB: Parse the GD keyword in BSB_KNP to recognize European 1950 datum (#4247, patch by jcrepetto)

comment:5 Changed 4 years ago by Even Rouault

Milestone: 1.8.2

Milestone 1.8.2 deleted

Note: See TracTickets for help on using tickets.