Skip to main content
Copyright (c) 2015 pyoceans

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Description: gridgeo
-------

|PyPI| |Travis| |DOI|

.. |PyPI| image:: https://img.shields.io/pypi/v/gridgeo.svg
:target: https://pypi.python.org/pypi/gridgeo
:alt: PyPI Package

.. |Travis| image:: https://travis-ci.org/pyoceans/gridgeo.svg?branch=master
:target: https://travis-ci.org/pyoceans/gridgeo
:alt: Travis Build Status

.. |DOI| image:: https://zenodo.org/badge/5715/pyoceans/gridgeo.svg
:target: https://zenodo.org/badge/latestdoi/5715/pyoceans/gridgeo
:alt: DOI

Convert ocean numerical models grids,
including UGRID and SGRID compliant files,
to a variety of geo-like objects: GeoJSON, and shapefile.

For some usage examples check the notebook folder:

https://github.com/pyoceans/gridgeo/tree/master/notebooks

Changelog
---------

Version 1.5.0

* CFVariable axis methods will error out when more than 1 coords is found.

Version 1.4.0

* Fixed non-string properties bug in #40

Version 1.3.0

* Implemented most of netCDF4.Variable methods and properties in CFVariable.
Things like var.shape or var.size will work by default without the need to
request the original variable object.

Version 1.2.0

* Return the array of polygons and the shapely geometry.
* Parse the CRS using the CF grid_mapping attribute.
* Use the newer and faster unary_union instead of cascaded_union to compute the grid outline.

Version 1.0.1

* Cast connectivity array to int.

Version 1.0.0

* Construct the grid based on the variables rather the datasets.
The variables are CF's smallest unit and the only way to get a unique valid grid for SGRID.
* Dropped the dependency on iris, cartopy, pysgrid, and pyugrid.
* Dropped raster object in lieu of the actual x,y or triangle data for plotting.
* Added an option to reduce the precision for the GeoJSON.
* Grid parsing is now done with a grid-aware CFVariable object.
* Dropped parsing grid from iris.cube.
* Grids names are 'ugrid', 'sgrid', 'unknown_1d', and 'unknown_2d'.

Version 0.2.1

* Use latest pysgrid API.

Version 0.2.0

* Parse iris cubes with more than one X, Y axis.

Version 0.1.0

* Added a properties for raster representation (via the rasterize method)
and vector outline (via shapely's' cascaded_union).
* Re-factor the package into utilities.py and gridgeo.py.
* Removed precision argument. (Created degenerated polygons.)
* The __repr__ now return the original grid __repr__ if u/s-grid
or the original nc object if the grid is "unknown."
* Simplified the GridGeo class.
(Moved all the loading stuff to load_grid.)
* Caching expensive computations.

Version 0.0.1

* First version of `gridgeo`.

Keywords: geojson,shapefile,ocean models,ugrid,sgrid
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Scientific/Engineering

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gridgeo-1.5.0.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gridgeo-1.5.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file gridgeo-1.5.0.tar.gz.

File metadata

  • Download URL: gridgeo-1.5.0.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for gridgeo-1.5.0.tar.gz
Algorithm Hash digest
SHA256 21082025d1b9c67be9725dd5cf2b427deffedb3719a5e201365a9a8e93de525d
MD5 6d869bde3e91e1d86f2c26410ed83e0c
BLAKE2b-256 ecb67d4ef121cf0024afe5f50fb1595d708ec0c76a8e2241d0f324e12ce6e156

See more details on using hashes here.

File details

Details for the file gridgeo-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: gridgeo-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for gridgeo-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ba124478b23184f4333e381d21ea20c3a423237ec77ce505a3606ee4f7af20d
MD5 1f38448fe3e6db0a82c6aaf8211fe6ea
BLAKE2b-256 b8449f6dbd2002e6118cdabfb682d7e426756f6f8008c0f96c950a066dddcba1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page