matplotlib / matplotlib/basemap

rotpole projection to ESRI shape file

Open
#306 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
817
Forks
395
PR merge metrics
No merged PRs in 30d

Description

Hi:

Does anyone know how to convert rotpole projection to ESRI format, to write data into a shape file?

I tried to do it using basemap.proj4string, and then pycrs or gdal, but there are some things missing from the proj4string...

I've added +ellps, but +o_proj=longlat +proj=ob_tran do not seem to be recognized...

Here is the proj4 I am trying to use:

+R=6370997.0 +lon_0=-97.0 +o_lat_p=42.5 +units=m +proj=ob_tran +o_lon_p=180.0 +o_proj=longlat +ellps=WGS84

pycrs complains that it does not know the specified name:

```
Traceback (most recent call last):
File "/Users/huziy/skynet2/RESCUE/skynet3_rech1/huziy/Netbeans Projects/Python/RPN/src/crcm5/mh_domains/show_domain_with_drainage_area.py", line 213, in
main()
File "/Users/huziy/skynet2/RESCUE/skynet3_rech1/huziy/Netbeans Projects/Python/RPN/src/application_properties.py", line 15, in wrapper
func(*args, **kwargs)
File "/Users/huziy/skynet2/RESCUE/skynet3_rech1/huziy/Netbeans Projects/Python/RPN/src/crcm5/mh_domains/show_domain_with_drainage_area.py", line 203, in main
crs = pycrs.parser.from_proj4(bmp.proj4string + " +ellps={}".format("WGS84"))
File "/Users/huziy/virtualenvs/py3.4/lib/python3.4/site-packages/pycrs/parser.py", line 565, in from_proj4
raise Exception("The specified projection name could not be found")
Exception: The specified projection name could not be found
```

Below is my test code (the pj=basemap.proj4string + " +ellps=WGS84"):

``` python
import pycrs
pj = "+R=6370997.0 +lon_0=-97.0 +o_lat_p=42.5 +units=m +proj=ob_tran +o_lon_p=180.0 +o_proj=longlat +ellps=WGS84"
crs = pycrs.parser.from_proj4(pj)
print(crs.to_esri_wkt())
```

Cheers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the supplied Python snippet and reviewing Basemap's proj4string output alongside the pycrs and GDAL conversion paths mentioned in the report. The issue names no Basemap source file or test; done would require a confirmed path for handling this rotpole projection in ESRI shapefile output, or a documented limitation if it is unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.