Skip to content

Examples: VLEN Ragged Arrays

Tim Whiteaker edited this page Feb 1, 2018 · 3 revisions

Examples - VLEN Ragged Arrays (NetCDF4 Only)

Created 2018-02-01 16:16:50.120000

Point (2D)

Well-Known Text (WKT): POINT (30 10)

Common Data Language (CDL):

netcdf _ncsg_describe_ {
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "point" ;
    geometry_container:node_coordinates = "x y" ;
  double x(instance) ;
    x:axis = "X" ;
  double y(instance) ;
    y:axis = "Y" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = 30 ;

 y = 10 ;
}

Point (3D)

Well-Known Text (WKT): POINT Z (30 10 100)

Common Data Language (CDL):

netcdf _ncsg_describe_ {
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "point" ;
    geometry_container:node_coordinates = "x y z" ;
  double x(instance) ;
    x:axis = "X" ;
  double y(instance) ;
    y:axis = "Y" ;
  double z(instance) ;
    z:axis = "Z" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = 30 ;

 y = 10 ;

 z = 100 ;
}

LineString (2D)

Well-Known Text (WKT): LINESTRING (30 10, 10 30, 40 40)

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "line" ;
    geometry_container:node_coordinates = "x y" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {30, 10, 40} ;

 y = {10, 30, 40} ;
}

LineString (3D)

Well-Known Text (WKT): LINESTRING Z (30 10 100, 10 30 200, 40 40 300)

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "line" ;
    geometry_container:node_coordinates = "x y z" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  node_VLType z(instance) ;
    z:axis = "Z" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {30, 10, 40} ;

 y = {10, 30, 40} ;

 z = {100, 200, 300} ;
}

Polygon (2D)

Well-Known Text (WKT): POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {30, 40, 20, 10, 30} ;

 y = {10, 40, 40, 20, 10} ;
}

Polygon (3D)

Well-Known Text (WKT): POLYGON Z ((30 10 100, 40 40 200, 20 40 300, 10 20 400, 30 10 100))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y z" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  node_VLType z(instance) ;
    z:axis = "Z" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {30, 40, 20, 10, 30} ;

 y = {10, 40, 40, 20, 10} ;

 z = {100, 200, 300, 400, 100} ;
}

MultiPoint (2D)

Well-Known Text (WKT): MULTIPOINT ((10 40), (40 30), (20 20), (30 10))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "point" ;
    geometry_container:node_coordinates = "x y" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {10, 40, 20, 30} ;

 y = {40, 30, 20, 10} ;
}

MultiPoint (3D)

Well-Known Text (WKT): MULTIPOINT Z ((10 40 100), (40 30 200), (20 20 300), (30 10 400))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "point" ;
    geometry_container:node_coordinates = "x y z" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  node_VLType z(instance) ;
    z:axis = "Z" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {10, 40, 20, 30} ;

 y = {40, 30, 20, 10} ;

 z = {100, 200, 300, 400} ;
}

MultiLineString (2D)

Well-Known Text (WKT): MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "line" ;
    geometry_container:node_coordinates = "x y" ;
    geometry_container:part_node_count = "part_node_count" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {10, 20, 10, 40, 30, 40, 30} ;

 y = {10, 20, 40, 40, 30, 20, 10} ;

 part_node_count = {3, 4} ;
}

MultiLineString (3D)

Well-Known Text (WKT): MULTILINESTRING Z ((10 10 100, 20 20 200, 10 40 300), (40 40 100, 30 30 200, 40 20 300, 30 10 400))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "line" ;
    geometry_container:node_coordinates = "x y z" ;
    geometry_container:part_node_count = "part_node_count" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  node_VLType z(instance) ;
    z:axis = "Z" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {10, 20, 10, 40, 30, 40, 30} ;

 y = {10, 20, 40, 40, 30, 20, 10} ;

 z = {100, 200, 300, 100, 200, 300, 400} ;

 part_node_count = {3, 4} ;
}

MultiPolygon (2D)

Well-Known Text (WKT): MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y" ;
    geometry_container:part_node_count = "part_node_count" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {30, 45, 10, 30, 15, 40, 10, 5, 15} ;

 y = {20, 40, 40, 20, 5, 10, 20, 10, 5} ;

 part_node_count = {4, 5} ;
}

MultiPolygon (3D)

Well-Known Text (WKT): MULTIPOLYGON Z (((30 20 100, 45 40 200, 10 40 300, 30 20 100)), ((15 5 100, 40 10 200, 10 20 300, 5 10 400, 15 5 100)))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y z" ;
    geometry_container:part_node_count = "part_node_count" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  node_VLType z(instance) ;
    z:axis = "Z" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {30, 45, 10, 30, 15, 40, 10, 5, 15} ;

 y = {20, 40, 40, 20, 5, 10, 20, 10, 5} ;

 z = {100, 200, 300, 100, 100, 200, 300, 400, 100} ;

 part_node_count = {4, 5} ;
}

Polygon with One Interior Ring (2D)

Well-Known Text (WKT): POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y" ;
    geometry_container:part_node_count = "part_node_count" ;
    geometry_container:interior_ring = "interior_ring" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;
  part_nodes_VLType interior_ring(instance) ;
    interior_ring:long_name = "type of each polygon geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {35, 45, 15, 10, 35, 20, 35, 30, 20} ;

 y = {10, 45, 40, 20, 10, 30, 35, 20, 30} ;

 part_node_count = {5, 4} ;

 interior_ring = {0, 1} ;
}

Polygon with One Interior Ring (3D)

Well-Known Text (WKT): POLYGON Z ((35 10 100, 45 45 200, 15 40 300, 10 20 400, 35 10 100), (20 30 100, 35 35 200, 30 20 300, 20 30 100))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y z" ;
    geometry_container:part_node_count = "part_node_count" ;
    geometry_container:interior_ring = "interior_ring" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  node_VLType z(instance) ;
    z:axis = "Z" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;
  part_nodes_VLType interior_ring(instance) ;
    interior_ring:long_name = "type of each polygon geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {35, 45, 15, 10, 35, 20, 35, 30, 20} ;

 y = {10, 45, 40, 20, 10, 30, 35, 20, 30} ;

 z = {100, 200, 300, 400, 100, 100, 200, 300, 100} ;

 part_node_count = {5, 4} ;

 interior_ring = {0, 1} ;
}

MultiPolygon with One Interior Ring (2D)

Well-Known Text (WKT): MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y" ;
    geometry_container:part_node_count = "part_node_count" ;
    geometry_container:interior_ring = "interior_ring" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;
  part_nodes_VLType interior_ring(instance) ;
    interior_ring:long_name = "type of each polygon geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {40, 20, 45, 40, 20, 10, 10, 30, 45, 20, 30, 20, 20, 30} ;

 y = {40, 45, 30, 40, 35, 30, 10, 5, 20, 35, 20, 15, 25, 20} ;

 part_node_count = {4, 6, 4} ;

 interior_ring = {0, 0, 1} ;
}

MultiPolygon with One Interior Ring (3D)

Well-Known Text (WKT): MULTIPOLYGON Z (((40 40 100, 20 45 200, 45 30 300, 40 40 100)), ((20 35 100, 10 30 200, 10 10 300, 30 5 400, 45 20 500, 20 35 100), (30 20 100, 20 15 200, 20 25 300, 30 20 100)))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y z" ;
    geometry_container:part_node_count = "part_node_count" ;
    geometry_container:interior_ring = "interior_ring" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  node_VLType z(instance) ;
    z:axis = "Z" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;
  part_nodes_VLType interior_ring(instance) ;
    interior_ring:long_name = "type of each polygon geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = {40, 20, 45, 40, 20, 10, 10, 30, 45, 20, 30, 20, 20, 30} ;

 y = {40, 45, 30, 40, 35, 30, 10, 5, 20, 35, 20, 15, 25, 20} ;

 z = {100, 200, 300, 100, 100, 200, 300, 400, 500, 100, 100, 200, 300, 100} ;

 part_node_count = {4, 6, 4} ;

 interior_ring = {0, 0, 1} ;
}

Multiple MultiPolygons with Interior Rings (2D)

Well-Known Text (WKT): MULTIPOLYGON (((0 0, 20 0, 20 20, 0 20, 0 0), (1 1, 10 5, 19 1, 1 1), (5 15, 7 19, 9 15, 5 15), (11 15, 13 19, 15 15, 11 15)), ((5 25, 9 25, 7 29, 5 25)), ((11 25, 15 25, 13 29, 11 25)))

Common Data Language (CDL):

netcdf _ncsg_describe_ {
types:
  double(*) node_VLType ;
  int(*) part_nodes_VLType ;
dimensions:
  instance = 1 ;
variables:
  int geometry_container ;
    geometry_container:geometry_type = "polygon" ;
    geometry_container:node_coordinates = "x y" ;
    geometry_container:part_node_count = "part_node_count" ;
    geometry_container:interior_ring = "interior_ring" ;
  node_VLType x(instance) ;
    x:axis = "X" ;
  node_VLType y(instance) ;
    y:axis = "Y" ;
  part_nodes_VLType part_node_count(instance) ;
    part_node_count:long_name = "count of nodes in each geometry part" ;
  part_nodes_VLType interior_ring(instance) ;
    interior_ring:long_name = "type of each polygon geometry part" ;

// global attributes:
    :Conventions = "CF-1.8" ;
data:

 geometry_container = _ ;

 x = 
    {0, 20, 20, 0, 0, 1, 10, 19, 1, 5, 7, 9, 5, 11, 13, 15, 11, 5, 9, 7, 5, 11, 15, 13, 11} ;

 y = 
    {0, 0, 20, 20, 0, 1, 5, 1, 1, 15, 19, 15, 15, 15, 19, 15, 15, 25, 25, 29, 25, 25, 25, 29, 25} ;

 part_node_count = {5, 4, 4, 4, 4, 4} ;

 interior_ring = {0, 1, 1, 1, 0, 0} ;
}