Skip to main content
Help us improve Python packaging – donate today!

Convert UGRID, SGRID, and some non-compliant ocean model grids to geo-like objects

Project Description

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
-------

.. image:: https://travis-ci.org/pyoceans/gridgeo.svg?branch=master
:target: https://travis-ci.org/pyoceans/gridgeo

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

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.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

Release history Release notifications

This version
History Node

1.2.0

History Node

1.0.1

History Node

1.0.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
gridgeo-1.2.0-py3-none-any.whl (10.4 kB) Copy SHA256 hash SHA256 Wheel py3 Apr 20, 2018
gridgeo-1.2.0.tar.gz (25.7 kB) Copy SHA256 hash SHA256 Source None Apr 20, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page