I also have some Python code for converting polygons from a watersheds 
shapefile into the UGRID format 
(https://github.com/ugrid-conventions/ugrid-conventions/blob/v0.9.0/ugrid-conventions.md#2d-flexible-mesh-mixed-triangles-quadrilaterals-etc-topology).
 The major limitation here is that UGRID expects no gaps between the "faces" 
which limits its ability to store multi-geometries (i.e. Hawaii).

It also expects each "face" to have the same number of vertices, more or 
less.But it's a good idea to leverage that -- let's keep things as consistent 
as possible.

I wouldn't say that we expect every "face" to have about the same number of 
vertices, but indeed the use of fill values can blow up your data set if you 
have may tiny polygons and a few huge polygons. HDF5/NetCDF4 can help to reduce 
the problem on disk, but you may have a temporary memory issue. We used the 
fill approach because it seemed most consistent with the CF bounds polygons at 
the time. I don't know how different the ragged approach actually is. If you 
read and write multiple polygon, you may still have the same issues. The 
linearly indexed example that you gave:

http://cfconventions.org/Data/cf-conventions/cf-conventions-1.6/build/cf-conventions.html#Example%20H.2.4.1

would map to an efficient storage in memory as well, so that looks pretty 
attractive to me. Maybe we could also consider it as an alternative for UGRID 
storage.

I wouldn't go for the boundary_node_connectivity since those were introduced to 
specifically refer to boundaries. I would consider using the 
edge_node_connectivity. However, before anything else I would check with Ben 
Domenico and Stefano Nativi since they (and possibly others) have been looking 
at mapping OGC and netCDF data models. I guess that this question should have 
come up in that context.

Best<mailto:[email protected]> regards,

Bert
DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata

Reply via email to