Opened 8 years ago

Closed 7 years ago

#6352 closed enhancement (invalid)

Support of Hungarian Unified Projection (EOV)

Reported by: pphunor Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

MapServer does not display properly those layers that use shapefiles with EOV projection as data source. A small addition of code into ogr_srs_proj4.cpp solves this problem. The code below works fine for me, though it might be not enough to accept as a general solution.

OGRErr OGRSpatialReference::exportToProj4( char ** ppszProj4 ) const

...

    else if( EQUAL(pszProjection,
                   "Oblique_Mercator") )
    {
        //+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m +no_defs 
        sprintf( szProj4+strlen(szProj4),
                 "+proj=somerc +lat_0=%.16g +lon_0=%.16g +alpha=%.16g +k_0=%.16g +x_0=%.16g +y_0=%.16g ",
                 GetNormProjParm(SRS_PP_LATITUDE_OF_CENTER,0.0),
                 GetNormProjParm(SRS_PP_LONGITUDE_OF_CENTER,0.0),
                 GetNormProjParm(SRS_PP_RECTIFIED_GRID_ANGLE,0.0),
                 GetNormProjParm(SRS_PP_SCALE_FACTOR,0.0),
                 GetNormProjParm(SRS_PP_FALSE_EASTING,0.0),
                 GetNormProjParm(SRS_PP_FALSE_NORTHING,0.0) );
    }

    else if( EQUAL(pszProjection,SRS_PT_KROVAK) )
    {

...

Attachments (1)

NATURA.prj (603 bytes ) - added by pphunor 8 years ago.

Download all attachments as: .zip

Change History (4)

by pphunor, 8 years ago

Attachment: NATURA.prj added

comment:1 by Even Rouault, 8 years ago

This is indeed not the appropriate change. The problem is on ingestion of the .prj, not on export. Which software did produce this NATURA.prj file ?

The current code which imports ESRI .prj files expect the PROJECTION name to be "Hotine_Oblique_Mercator_Azimuth_Natural_Origin". If you change PROJECTIONOblique_Mercator to PROJECTIONHotine_Oblique_Mercator_Azimuth_Natural_Origin, this works.

in reply to:  1 comment:2 by pphunor, 8 years ago

Replying to rouault:

This is indeed not the appropriate change. The problem is on ingestion of the .prj, not on export. Which software did produce this NATURA.prj file ?

I don't know, I get this file from one of our clients, I just have to display it with mapserver.

The current code which imports ESRI .prj files expect the PROJECTION name to be "Hotine_Oblique_Mercator_Azimuth_Natural_Origin". If you change PROJECTIONOblique_Mercator to PROJECTIONHotine_Oblique_Mercator_Azimuth_Natural_Origin, this works.

Ok, thanks.

comment:3 by Even Rouault, 7 years ago

Resolution: invalid
Status: newclosed

Closing. Doesn't seem there's action needed on that one

Note: See TracTickets for help on using tickets.