Ticket #4601 (closed defect: fixed)

Opened 15 months ago

Last modified 15 months ago

problem with projection mil_os

Reported by: geomartino Owned by: warmerdam
Priority: normal Milestone: 1.10.0
Component: OGR_SRS Version: 1.9.0
Severity: normal Keywords:
Cc:

Description

Hi

It's the first time I have to deal with a particular projection: Miller Oblated Stereographic (mil_os). According to the documentation, GDAL should be able to convert coordinates using that projection (via OSR).

So far with gdal,OSR in python

from osgeo import ogr, osr mil_os = osr.SpatialReference?() mil_os.ImportFromProj?4("+proj=mil_os +units=m +ellps=WGS84 +lon_0=20 +lat_0=18 +x_0=0 +y_0=0 +k_0=0.925 +no_defs")

is not working... But with pyproj, I can convert coordinate from mil_os to wgs84

from pyproj import Proj, transform mil_os = Proj(proj='mil_os')

Does anyone have a clue why it's not working with ogr/osr?

Since I want to reproject a shapefile from mil_os to wgs84, I could do it combining ogr/osr with pyproj but I would prefer convert it directly with ogr???

any thoughts?

thanks,

MartinO

Change History

follow-up: ↓ 2   Changed 15 months ago by rouault

  • status changed from new to closed
  • resolution set to fixed
  • component changed from default to OGR_SRS
  • milestone set to 2.0.0

This has been improved in trunk (2.0dev) in r24063. Now this should work if you add +wktext at the ned of the your proj4 string

in reply to: ↑ 1   Changed 15 months ago by geomartino

Replying to rouault:

This has been improved in trunk (2.0dev) in r24063. Now this should work if you add +wktext at the ned of the your proj4 string

I've compile GDAL from trunk and the problem is gone. Thanks a lot for the fix!

Note: See TracTickets for help on using tickets.