Bas Couwenberg pushed to branch upstream at Debian GIS Project / python-pyproj
Commits: adbd3c36 by Bas Couwenberg at 2021-09-18T06:47:26+02:00 New upstream version 3.2.1 - - - - - 3 changed files: - docs/crs_compatibility.rst - pyproj/__init__.py - pyproj/datadir.py Changes: ===================================== docs/crs_compatibility.rst ===================================== @@ -208,31 +208,36 @@ cartopy https://github.com/SciTools/cartopy -This may change in the future: -`Port to use pyproj v2 <https://github.com/SciTools/cartopy/issues/1477>`__ +.. note:: These examples require cartopy 0.20+ Preparing `pyproj.crs.CRS` for `cartopy.crs.CRS` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. warning:: This only works for CRS created with WKT2, + PROJ JSON, or a spatial reference ID (i.e. EPSG) + with the area of use defined. Otherwise, + the x_limits and y_limits will not work. + .. code-block:: python import cartopy.crs as ccrs from pyproj.crs import CRS + # geographic proj_crs = CRS.from_epsg(4326) - globe = ccrs.Globe( - ellipse=None, - semimajor_axis=proj_crs.ellipsoid.semi_major_metre, - semiminor_axis=proj_crs.ellipsoid.semi_minor_metre, - inverse_flattening=proj_crs.ellipsoid.inverse_flattening, - ) - proj_dict = proj_crs.to_dict() - proj_dict["pm"] = proj_crs.prime_meridian.longitude - cart_crs = ccrs.CRS(proj_dict, globe=globe) + cart_crs = ccrs.CRS(proj_crs) + + # projected + proj_crs = CRS.from_epsg(6933) + cart_crs = ccrs.Projection(proj_crs) Preparing `cartopy.crs.CRS` for `pyproj.crs.CRS` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. note:: `cartopy.crs.CRS` inherits from `pyproj.crs.CRS`, + so it should behave like a `pyproj.crs.CRS`. + .. code-block:: python @@ -240,7 +245,7 @@ Preparing `cartopy.crs.CRS` for `pyproj.crs.CRS` from pyproj.crs import CRS cart_crs = PlateCarree() - proj_crs = CRS.from_dict(cart_crs.proj4_params) + proj_crs = CRS.from_user_input(cart_crs) pycrs ===================================== pyproj/__init__.py ===================================== @@ -28,7 +28,7 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTIO OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -__version__ = "3.2.1.rc0" +__version__ = "3.2.1" __all__ = [ "Proj", "Geod", ===================================== pyproj/datadir.py ===================================== @@ -70,7 +70,6 @@ def get_data_dir() -> str: global _VALIDATED_PROJ_DATA if _VALIDATED_PROJ_DATA is not None: return _VALIDATED_PROJ_DATA - global _USER_PROJ_DATA internal_datadir = Path(__file__).absolute().parent / "proj_dir" / "share" / "proj" proj_lib_dirs = os.environ.get("PROJ_LIB", "") prefix_datadir = Path(sys.prefix, "share", "proj") View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/-/commit/adbd3c361d11653855bb1329fc1692048d2dc1c0 -- View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/-/commit/adbd3c361d11653855bb1329fc1692048d2dc1c0 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ Pkg-grass-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel
