DGGS to Geo
DGGS to Geographic coordinate conversion functions.
This module provides functions to convert various discrete global grid systems (DGGS) to shapely polygon and geojson.
a52geo_cli()
¶
Command-line interface for a52geo supporting multiple a5 cell IDs.
Source code in vgrid/conversion/dggs2geo/a52geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
a52geojson(a5_hexes, options=None, split_antimeridian=False)
¶
Convert A5 cell IDs to GeoJSON FeatureCollection.
Accepts a single a5_id (string or int) or a list of a5_ids. For each valid A5 cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
a5_hexes : str, int, or list of str/int A5 cell ID(s) to convert. Can be a single string/int or a list of strings/ints. Example format: "8e65b56628e0d07" options : dict, optional Options to pass to a5.cell_to_boundary. Defaults to None. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid A5 cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the A5 cell ID, resolution level, and cell metadata
Examples¶
a52geojson("8e65b56628e0d07")
a52geojson(["8e65b56628e0d07", "8e65b56628e6adf"])
Source code in vgrid/conversion/dggs2geo/a52geo.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
a52geojson_cli()
¶
Command-line interface for a52geojson supporting multiple A5 cell hex.
Source code in vgrid/conversion/dggs2geo/a52geo.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
dggal2geojson(dggs_type, zone_ids, options={}, split_antimeridian=False)
¶
Convert DGGAL ZoneIDs to GeoJSON FeatureCollection.
Accepts a single zone_id (string) or a list of zone_ids. For each valid DGGAL ZoneID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
dggs_type : str DGGAL DGGS type (e.g., "isea3h", "isea4t", "rhealpix"). zone_ids : str or list of str DGGAL ZoneID(s) to convert. Can be a single string or a list of strings. Example format: "A4-0-A" options : dict, optional Additional options for the conversion process. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid DGGAL cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the DGGAL ZoneID, resolution level, and cell metadata
Examples¶
dggal2geojson("isea3h", "A4-0-A")
dggal2geojson("isea3h", ["A4-0-A", "A4-0-B"])
Source code in vgrid/conversion/dggs2geo/dggal2geo.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
dggal2geojson_cli()
¶
Command-line interface for converting DGGAL ZoneIDs to GeoJSON.
This function provides a command-line interface that accepts multiple DGGAL ZoneIDs as command-line arguments and outputs the corresponding GeoJSON FeatureCollection as a JSON string to stdout.
Usage
dggal2geojson isea3h A4-0-A A4-0-B
Output
Prints a JSON string representing a GeoJSON FeatureCollection to stdout.
Example
$ python -m vgrid.conversion.dggs2geo.dggal2geo isea3h A4-0-A
Note
This function is designed to be called from the command line and will parse arguments using argparse. The GeoJSON output is formatted as a JSON string printed to stdout. Invalid cell IDs are silently skipped.
Source code in vgrid/conversion/dggs2geo/dggal2geo.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
dggrid2geo_cli()
¶
Command-line interface for dggrid2geo supporting multiple DGGRID cell IDs.
Source code in vgrid/conversion/dggs2geo/dggrid2geo.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
dggrid2geojson(dggrid_instance, dggs_type, dggrid_ids, resolution, input_address_type='SEQNUM', split_antimeridian=False, aggregate=False)
¶
Convert DGGRID cell IDs to GeoJSON FeatureCollection.
Accepts a single dggrid_id (string/int) or a list of dggrid_ids. For each valid DGGRID cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
dggrid_instance : object DGGRID instance for processing. dggs_type : str DGGRID DGGS type (e.g., "ISEA7H", "ISEA4T"). dggrid_ids : str, int, or list of str/int DGGRID cell ID(s) to convert. Can be a single string/int or a list of strings/ints. Example format: "783229476878" resolution : int Resolution level for the DGGS. input_address_type : str, default "SEQNUM" Input address type for the cell IDs. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid DGGRID cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the DGGRID cell ID, resolution level, and cell metadata
Examples¶
dggrid2geojson(instance, "ISEA7H", "783229476878", 13)
dggrid2geojson(instance, "ISEA7H", ["783229476878", "783229476879"], 13)
Source code in vgrid/conversion/dggs2geo/dggrid2geo.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
dggrid2geojson_cli()
¶
Command-line interface for dggrid2geojson supporting multiple DGGRID cell IDs.
Source code in vgrid/conversion/dggs2geo/dggrid2geo.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
digipin2geo_cli()
¶
Command-line interface for digipin2geo supporting multiple DIGIPIN codes.
Source code in vgrid/conversion/dggs2geo/digipin2geo.py
79 80 81 82 83 84 85 86 87 88 89 90 91 | |
digipin2geojson(digipin_ids)
¶
Convert DIGIPIN cell IDs to GeoJSON FeatureCollection.
Accepts a single digipin_id (string) or a list of digipin_ids. For each valid DIGIPIN cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
digipin_ids : str or list of str DIGIPIN cell ID(s) to convert. Can be a single string or a list of strings. Format: Alphanumeric code with optional dashes (e.g., 'F3K-492-6P96' or 'F3K4926P96') DIGIPIN codes represent locations in India (lat: 2.5-38.5, lon: 63.5-99.5)
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid DIGIPIN cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the DIGIPIN cell ID, resolution level, and cell metadata
Examples¶
digipin2geojson("F3K")
digipin2geojson(["F3K", "39J-438-TJC7"])
Source code in vgrid/conversion/dggs2geo/digipin2geo.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
digipin2geojson_cli()
¶
Command-line interface for digipin2geojson supporting multiple DIGIPIN codes.
Source code in vgrid/conversion/dggs2geo/digipin2geo.py
158 159 160 161 162 163 164 165 166 167 168 | |
ease2geo_cli()
¶
Command-line interface for ease2geo supporting multiple EASE-DGGS codes.
Source code in vgrid/conversion/dggs2geo/ease2geo.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
ease2geojson(ease_ids)
¶
Convert a list of EASE-DGGS codes to GeoJSON FeatureCollection.
Accepts a single ease_id (string) or a list of ease_ids. For each valid EASE-DGGS code, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
ease_ids : str or list of str EASE-DGGS code(s) to convert. Can be a single string or a list of strings. Example format: "L4.165767.02.02.20.71"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid EASE-DGGS cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the EASE-DGGS code, resolution level, and cell metadata
Examples¶
ease2geojson("L4.165767.02.02.20.71")
ease2geojson(["L4.165767.02.02.20.71", "L4.165768.02.02.20.71"])
Source code in vgrid/conversion/dggs2geo/ease2geo.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
ease2geojson_cli()
¶
Command-line interface for ease2geojson supporting multiple EASE-DGGS codes.
Source code in vgrid/conversion/dggs2geo/ease2geo.py
148 149 150 151 152 153 154 155 156 157 158 159 160 | |
gars2geo_cli()
¶
Command-line interface for gars2geo supporting multiple GARS cell IDs.
Source code in vgrid/conversion/dggs2geo/gars2geo.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
gars2geojson(gars_ids)
¶
Convert GARS cell IDs to GeoJSON FeatureCollection.
Accepts a single gars_id (string) or a list of gars_ids. For each valid GARS cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
gars_ids : str or list of str GARS cell ID(s) to convert. Can be a single string or a list of strings. Example format: "574JK1918"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid GARS cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the GARS cell ID, resolution level, and cell metadata
Examples¶
gars2geojson("574JK1918")
gars2geojson(["574JK1918", "574JK1919"])
Source code in vgrid/conversion/dggs2geo/gars2geo.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
gars2geojson_cli()
¶
Command-line interface for gars2geojson supporting multiple GARS cell IDs.
Source code in vgrid/conversion/dggs2geo/gars2geo.py
142 143 144 145 146 147 148 149 150 151 152 153 154 | |
geohash2geo_cli()
¶
Command-line interface for geohash2geo supporting multiple Geohash cell IDs.
Source code in vgrid/conversion/dggs2geo/geohash2geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
geohash2geojson(geohash_ids)
¶
Convert Geohash cell IDs to GeoJSON FeatureCollection.
Accepts a single geohash_id (string) or a list of geohash_ids. For each valid Geohash cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
geohash_ids : str or list of str Geohash cell ID(s) to convert. Can be a single string or a list of strings. Example format: "w3gvk1td8"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Geohash cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Geohash cell ID, resolution level, and cell metadata
Examples¶
geohash2geojson("w3gvk1td8")
geohash2geojson(["w3gvk1td8", "w3gvk1td9"])
Source code in vgrid/conversion/dggs2geo/geohash2geo.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
geohash2geojson_cli()
¶
Command-line interface for geohash2geojson supporting multiple Geohash cell IDs.
Source code in vgrid/conversion/dggs2geo/geohash2geo.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
georef2geo_cli()
¶
Command-line interface for georef2geo supporting multiple GEOREF codes.
Source code in vgrid/conversion/dggs2geo/georef2geo.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
georef2geojson(georef_ids)
¶
Convert GEOREF codes to GeoJSON FeatureCollection.
Accepts a single georef_id (string) or a list of georef_ids. For each valid GEOREF code, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
georef_ids : str or list of str GEOREF code(s) to convert. Can be a single string or a list of strings. Example format: "VGBL42404651"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid GEOREF cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the GEOREF code, resolution level, and cell metadata
Examples¶
georef2geojson("VGBL42404651")
georef2geojson(["VGBL42404651", "VGBL42404652"])
Source code in vgrid/conversion/dggs2geo/georef2geo.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
georef2geojson_cli()
¶
Command-line interface for georef2geojson supporting multiple GEOREF codes.
Source code in vgrid/conversion/dggs2geo/georef2geo.py
146 147 148 149 150 151 152 153 154 155 156 157 158 | |
h32geo_cli()
¶
Command-line interface for h32geo supporting multiple H3 cell IDs.
Source code in vgrid/conversion/dggs2geo/h32geo.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
h32geojson(h3_ids, fix_antimeridian=None)
¶
Convert H3 cell IDs to GeoJSON FeatureCollection.
Accepts a single h3_id (string) or a list of h3_ids. For each valid H3 cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
h3_ids : str or list of str H3 cell ID(s) to convert. Can be a single string or a list of strings. Example format: "8e65b56628e0d07" fix_antimeridian : str, optional When 'shift' or 'shift_balanced', apply balanced antimeridian shifting. When 'shift_west', apply westward antimeridian shifting. When 'shift_east', apply eastward antimeridian shifting. When 'split', apply antimeridian splitting to the resulting polygons. When None or not provided, do not apply any antimeridian fixing. Defaults to None.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid H3 cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the H3 cell ID, resolution level, and cell metadata
Examples¶
h32geojson("8e65b56628e0d07")
h32geojson(["8e65b56628e0d07", "8e65b56628e6adf"])
Source code in vgrid/conversion/dggs2geo/h32geo.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
h32geojson_cli()
¶
Command-line interface for h32geojson supporting multiple H3 cell IDs.
Source code in vgrid/conversion/dggs2geo/h32geo.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
isea3h2geo_cli()
¶
Command-line interface for isea3h2geo supporting multiple ISEA3H cell IDs.
Source code in vgrid/conversion/dggs2geo/isea3h2geo.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
isea3h2geojson(isea3h_ids, fix_antimeridian=None)
¶
Convert ISEA3H cell IDs to GeoJSON FeatureCollection.
Accepts a single isea3h_id (string) or a list of isea3h_ids. For each valid ISEA3H cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
isea3h_ids : str or list of str ISEA3H cell ID(s) to convert. Can be a single string or a list of strings. Example format: "1327916769,-55086" fix_antimeridian : str, optional Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid ISEA3H cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the ISEA3H cell ID, resolution level, center coordinates, edge length, and cell area
Examples¶
isea3h2geojson("1327916769,-55086")
isea3h2geojson(["1327916769,-55086", "1327916770,-55087"])
Source code in vgrid/conversion/dggs2geo/isea3h2geo.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
isea3h2geojson_cli()
¶
Command-line interface for isea3h2geojson supporting multiple ISEA3H cell IDs.
Source code in vgrid/conversion/dggs2geo/isea3h2geo.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
isea4t2geo_cli()
¶
Command-line interface for isea4t2geo supporting multiple ISEA4T cell IDs.
Source code in vgrid/conversion/dggs2geo/isea4t2geo.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
isea4t2geojson(isea4t_ids, fix_antimeridian=None)
¶
Convert ISEA4T cell IDs to GeoJSON FeatureCollection.
Accepts a single isea4t_id (string) or a list of isea4t_ids. For each valid ISEA4T cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
isea4t_ids : str or list of str ISEA4T cell ID(s) to convert. Can be a single string or a list of strings. Example format: "131023133313201333311333" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid ISEA4T cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the ISEA4T cell ID, resolution level, and cell metadata
Examples¶
isea4t2geojson("131023133313201333311333")
isea4t2geojson(["131023133313201333311333", "131023133313201333311334"])
Source code in vgrid/conversion/dggs2geo/isea4t2geo.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
isea4t2geojson_cli()
¶
Command-line interface for isea4t2geojson supporting multiple ISEA4T cell IDs.
Source code in vgrid/conversion/dggs2geo/isea4t2geo.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
maidenhead2geo_cli()
¶
Command-line interface for maidenhead2geo supporting multiple Maidenhead cell IDs.
Source code in vgrid/conversion/dggs2geo/maidenhead2geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
maidenhead2geojson(maidenhead_ids)
¶
Convert Maidenhead cell IDs to GeoJSON FeatureCollection.
Accepts a single maidenhead_id (string) or a list of maidenhead_ids. For each valid Maidenhead cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
maidenhead_ids : str or list of str Maidenhead cell ID(s) to convert. Can be a single string or a list of strings. Example format: "OK3046."
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Maidenhead cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Maidenhead cell ID, resolution level, and cell metadata
Examples¶
maidenhead2geojson("OK3046.")
maidenhead2geojson(["OK3046.", "OK3047."])
Source code in vgrid/conversion/dggs2geo/maidenhead2geo.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
maidenhead2geojson_cli()
¶
Command-line interface for maidenhead2geojson supporting multiple Maidenhead cell IDs.
Source code in vgrid/conversion/dggs2geo/maidenhead2geo.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
mgrs2geo_cli()
¶
Command-line interface for mgrs2geo supporting multiple MGRS cell IDs.
Source code in vgrid/conversion/dggs2geo/mgrs2geo.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
mgrs2geojson(mgrs_ids)
¶
Convert MGRS cell IDs to GeoJSON FeatureCollection.
Accepts a single mgrs_id (string) or a list of mgrs_ids. For each valid MGRS cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
mgrs_ids : str or list of str MGRS cell ID(s) to convert. Can be a single string or a list of strings. Example format: "48PXS866916"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid MGRS cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the MGRS cell ID, resolution level, and cell metadata
Examples¶
mgrs2geojson("48PXS866916")
mgrs2geojson(["48PXS866916", "48PXS866917"])
Source code in vgrid/conversion/dggs2geo/mgrs2geo.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
mgrs2geojson_cli()
¶
Command-line interface for mgrs2geojson supporting multiple MGRS cell IDs.
Source code in vgrid/conversion/dggs2geo/mgrs2geo.py
190 191 192 193 194 195 196 197 198 199 200 201 202 | |
olc2geo_cli()
¶
Command-line interface for olc2geo supporting multiple OLC codes.
Source code in vgrid/conversion/dggs2geo/olc2geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
olc2geojson(olc_ids)
¶
Convert OLC (Open Location Code) cell IDs to GeoJSON FeatureCollection.
Accepts a single olc_id (string) or a list of olc_ids. For each valid OLC cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
olc_ids : str or list of str OLC cell ID(s) to convert. Can be a single string or a list of strings. Example format: "7P28QPG4+4P7"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid OLC cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the OLC cell ID, resolution level, and cell metadata
Examples¶
olc2geojson("7P28QPG4+4P7")
olc2geojson(["7P28QPG4+4P7", "7P28QPG4+4P8"])
Source code in vgrid/conversion/dggs2geo/olc2geo.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
olc2geojson_cli()
¶
Command-line interface for olc2geojson supporting multiple OLC codes.
Source code in vgrid/conversion/dggs2geo/olc2geo.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
qtm2geo_cli()
¶
Command-line interface for qtm2geo supporting multiple QTM cell IDs.
Source code in vgrid/conversion/dggs2geo/qtm2geo.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
qtm2geojson(qtm_ids)
¶
Convert QTM cell IDs to GeoJSON FeatureCollection.
Accepts a single qtm_id (string) or a list of qtm_ids. For each valid QTM cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
qtm_ids : str or list of str QTM cell ID(s) to convert. Can be a single string or a list of strings. Example format: "42012321"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid QTM cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the QTM cell ID, resolution level, and cell metadata
Examples¶
qtm2geojson("42012321")
qtm2geojson(["42012321", "42012322"])
Source code in vgrid/conversion/dggs2geo/qtm2geo.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
qtm2geojson_cli()
¶
Command-line interface for qtm2geojson supporting multiple QTM cell IDs.
Source code in vgrid/conversion/dggs2geo/qtm2geo.py
127 128 129 130 131 132 133 134 135 136 137 138 139 | |
quadkey2geo_cli()
¶
Command-line interface for quadkey2geo supporting multiple Quadkeys.
Source code in vgrid/conversion/dggs2geo/quadkey2geo.py
78 79 80 81 82 83 84 85 86 87 88 89 90 | |
quadkey2geojson(quadkey_ids)
¶
Convert Quadkey cell IDs to GeoJSON FeatureCollection.
Accepts a single quadkey_id (string) or a list of quadkey_ids. For each valid Quadkey cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
quadkey_ids : str or list of str Quadkey cell ID(s) to convert. Can be a single string or a list of strings. Example format: "13223011131020220011133"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Quadkey cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Quadkey cell ID, resolution level, and cell metadata
Examples¶
quadkey2geojson("13223011131020220011133")
quadkey2geojson(["13223011131020220011133", "13223011131020220011134"])
Source code in vgrid/conversion/dggs2geo/quadkey2geo.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
quadkey2geojson_cli()
¶
Command-line interface for quadkey2geojson supporting multiple Quadkeys.
Source code in vgrid/conversion/dggs2geo/quadkey2geo.py
155 156 157 158 159 160 161 162 163 164 165 | |
rhealpix2geo_cli()
¶
Command-line interface for converting RHEALPix cell IDs to Shapely Polygons.
This function provides a command-line interface that accepts multiple RHEALPix cell IDs as command-line arguments and returns the corresponding Shapely Polygon objects.
Returns:
| Name | Type | Description |
|---|---|---|
list |
A list of Shapely Polygon objects representing the converted cells. |
Usage
rhealpix2geo R31260335553825 R31260335553826
Note
This function is designed to be called from the command line and will parse arguments using argparse. Invalid cell IDs are silently skipped.
Source code in vgrid/conversion/dggs2geo/rhealpix2geo.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
rhealpix2geojson(rhealpix_ids, fix_antimeridian=None)
¶
Convert RHEALPix cell IDs to GeoJSON FeatureCollection.
Accepts a single rhealpix_id (string) or a list of rhealpix_ids. For each valid RHEALPix cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
rhealpix_ids : str or list of str RHEALPix cell ID(s) to convert. Can be a single string or a list of strings. Each ID should be a string starting with 'R' followed by numeric digits. Example format: "R31260335553825" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid RHEALPix cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the RHEALPix cell ID, resolution level, and cell metadata
Examples¶
rhealpix2geojson("R31260335553825")
rhealpix2geojson(["R31260335553825", "R31260335553826"])
Source code in vgrid/conversion/dggs2geo/rhealpix2geo.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
rhealpix2geojson_cli()
¶
Command-line interface for converting RHEALPix cell IDs to GeoJSON.
This function provides a command-line interface that accepts multiple RHEALPix cell IDs as command-line arguments and outputs the corresponding GeoJSON FeatureCollection as a JSON string to stdout.
Usage
rhealpix2geojson R31260335553825 R31260335553826
Output
Prints a JSON string representing a GeoJSON FeatureCollection to stdout.
Example
$ python -m vgrid.conversion.dggs2geo.rhealpix2geo R31260335553825
Note
This function is designed to be called from the command line and will parse arguments using argparse. The GeoJSON output is formatted as a JSON string printed to stdout. Invalid cell IDs are silently skipped.
Source code in vgrid/conversion/dggs2geo/rhealpix2geo.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
s22geo_cli()
¶
Command-line interface for s22geo supporting multiple S2 cell tokens.
Source code in vgrid/conversion/dggs2geo/s22geo.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
s22geojson(s2_tokens, fix_antimeridian=None)
¶
Convert S2 cell tokens to GeoJSON FeatureCollection.
Accepts a single s2_token (string) or a list of s2_tokens. For each valid S2 cell token, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
s2_tokens : str or list of str S2 cell token(s) to convert. Can be a single string or a list of strings. Example format: "31752f45cc94" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none Returns
dict A GeoJSON FeatureCollection containing polygon features for each valid S2 cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the S2 cell token, resolution level, and cell metadata
Examples¶
s22geojson("31752f45cc94")
s22geojson(["31752f45cc94", "31752f45cc95"])
Source code in vgrid/conversion/dggs2geo/s22geo.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
s22geojson_cli()
¶
Command-line interface for s22geojson supporting multiple S2 cell tokens.
Source code in vgrid/conversion/dggs2geo/s22geo.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
tilecode2geo_cli()
¶
Command-line interface for tilecode2geo supporting multiple Tilecodes.
Source code in vgrid/conversion/dggs2geo/tilecode2geo.py
82 83 84 85 86 87 88 89 90 91 92 93 94 | |
tilecode2geojson(tilecode_ids)
¶
Convert Tilecode cell IDs to GeoJSON FeatureCollection.
Accepts a single tilecode_id (string) or a list of tilecode_ids. For each valid Tilecode cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
tilecode_ids : str or list of str Tilecode cell ID(s) to convert. Can be a single string or a list of strings. Format: 'z{x}x{y}y{z}' where z is zoom level and x,y are tile coordinates. Example format: "z0x0y0"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Tilecode cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Tilecode cell ID, resolution level, and cell metadata
Examples¶
tilecode2geojson("z0x0y0")
tilecode2geojson(["z0x0y0", "z1x1y1"])
Source code in vgrid/conversion/dggs2geo/tilecode2geo.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
tilecode2geojson_cli()
¶
Command-line interface for tilecode2geojson supporting multiple Tilecodes.
Source code in vgrid/conversion/dggs2geo/tilecode2geo.py
163 164 165 166 167 168 169 170 171 172 173 | |
H3 to Geometry Module
This module provides functionality to convert H3 cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
h32geo(h3_ids, fix_antimeridian=None)
¶
Convert H3 cell IDs to Shapely geometry objects.
Accepts a single h3_id (string) or a list of h3_ids. For each valid H3 cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
h3_ids : str or list of str H3 cell ID(s) to convert. Can be a single string or a list of strings. Example format: "8e65b56628e0d07" fix_antimeridian : str, optional When 'shift' or 'shift_balanced', apply balanced antimeridian shifting. When 'shift_west', apply westward antimeridian shifting. When 'shift_east', apply eastward antimeridian shifting. When 'split', apply antimeridian splitting to the resulting polygons. When None or not provided, do not apply any antimeridian fixing. Defaults to None.
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single H3 cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding H3 cell.
Examples¶
h32geo("8e65b56628e0d07")
h32geo(["8e65b56628e0d07", "8e65b56628e6adf"]) [
, ]
Source code in vgrid/conversion/dggs2geo/h32geo.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
h32geo_cli()
¶
Command-line interface for h32geo supporting multiple H3 cell IDs.
Source code in vgrid/conversion/dggs2geo/h32geo.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
h32geojson(h3_ids, fix_antimeridian=None)
¶
Convert H3 cell IDs to GeoJSON FeatureCollection.
Accepts a single h3_id (string) or a list of h3_ids. For each valid H3 cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
h3_ids : str or list of str H3 cell ID(s) to convert. Can be a single string or a list of strings. Example format: "8e65b56628e0d07" fix_antimeridian : str, optional When 'shift' or 'shift_balanced', apply balanced antimeridian shifting. When 'shift_west', apply westward antimeridian shifting. When 'shift_east', apply eastward antimeridian shifting. When 'split', apply antimeridian splitting to the resulting polygons. When None or not provided, do not apply any antimeridian fixing. Defaults to None.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid H3 cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the H3 cell ID, resolution level, and cell metadata
Examples¶
h32geojson("8e65b56628e0d07")
h32geojson(["8e65b56628e0d07", "8e65b56628e6adf"])
Source code in vgrid/conversion/dggs2geo/h32geo.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
h32geojson_cli()
¶
Command-line interface for h32geojson supporting multiple H3 cell IDs.
Source code in vgrid/conversion/dggs2geo/h32geo.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
S2 to Geometry Module
This module provides functionality to convert S2 cell tokens to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
s22geo(s2_tokens, fix_antimeridian=None)
¶
Convert S2 cell tokens to Shapely geometry objects.
Accepts a single s2_token (string) or a list of s2_tokens. For each valid S2 cell token, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
s2_tokens : str or list of str S2 cell token(s) to convert. Can be a single string or a list of strings. Example format: "31752f45cc94" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none Returns
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single S2 cell token is provided, returns a single Shapely Polygon object. If a list of tokens is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding S2 cell.
Examples¶
s22geo("31752f45cc94")
s22geo(["31752f45cc94", "31752f45cc95"]) [
, ]
Source code in vgrid/conversion/dggs2geo/s22geo.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
s22geo_cli()
¶
Command-line interface for s22geo supporting multiple S2 cell tokens.
Source code in vgrid/conversion/dggs2geo/s22geo.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
s22geojson(s2_tokens, fix_antimeridian=None)
¶
Convert S2 cell tokens to GeoJSON FeatureCollection.
Accepts a single s2_token (string) or a list of s2_tokens. For each valid S2 cell token, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
s2_tokens : str or list of str S2 cell token(s) to convert. Can be a single string or a list of strings. Example format: "31752f45cc94" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none Returns
dict A GeoJSON FeatureCollection containing polygon features for each valid S2 cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the S2 cell token, resolution level, and cell metadata
Examples¶
s22geojson("31752f45cc94")
s22geojson(["31752f45cc94", "31752f45cc95"])
Source code in vgrid/conversion/dggs2geo/s22geo.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
s22geojson_cli()
¶
Command-line interface for s22geojson supporting multiple S2 cell tokens.
Source code in vgrid/conversion/dggs2geo/s22geo.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
A5 to Geometry Module
This module provides functionality to convert A5 cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
a52geo(a5_hexes, options=None, split_antimeridian=False)
¶
Convert A5 cell IDs to Shapely geometry objects.
Accepts a single a5_id (string or int) or a list of a5_ids. For each valid A5 cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
a5_hexes : str, int, or list of str/int A5 cell ID(s) to convert. Can be a single string/int or a list of strings/ints. Example format: "8e65b56628e0d07" options : dict, optional Options to pass to a5.cell_to_boundary. Defaults to None. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single A5 cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding A5 cell.
Examples¶
a52geo("8e65b56628e0d07")
a52geo(["8e65b56628e0d07", "8e65b56628e6adf"]) [
, ]
Source code in vgrid/conversion/dggs2geo/a52geo.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
a52geo_cli()
¶
Command-line interface for a52geo supporting multiple a5 cell IDs.
Source code in vgrid/conversion/dggs2geo/a52geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
a52geojson(a5_hexes, options=None, split_antimeridian=False)
¶
Convert A5 cell IDs to GeoJSON FeatureCollection.
Accepts a single a5_id (string or int) or a list of a5_ids. For each valid A5 cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
a5_hexes : str, int, or list of str/int A5 cell ID(s) to convert. Can be a single string/int or a list of strings/ints. Example format: "8e65b56628e0d07" options : dict, optional Options to pass to a5.cell_to_boundary. Defaults to None. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid A5 cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the A5 cell ID, resolution level, and cell metadata
Examples¶
a52geojson("8e65b56628e0d07")
a52geojson(["8e65b56628e0d07", "8e65b56628e6adf"])
Source code in vgrid/conversion/dggs2geo/a52geo.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
a52geojson_cli()
¶
Command-line interface for a52geojson supporting multiple A5 cell hex.
Source code in vgrid/conversion/dggs2geo/a52geo.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
RHEALPix to Geometry Module
This module provides functionality to convert RHEALPix (Rectified HEALPix) cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
rhealpix2geo(rhealpix_ids, fix_antimeridian=None)
¶
Convert RHEALPix cell IDs to Shapely geometry objects.
Accepts a single rhealpix_id (string) or a list of rhealpix_ids. For each valid RHEALPix cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
rhealpix_ids : str or list of str RHEALPix cell ID(s) to convert. Can be a single string or a list of strings. Each ID should be a string starting with 'R' followed by numeric digits. Example format: "R31260335553825" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single RHEALPix cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding RHEALPix cell.
Examples¶
rhealpix2geo("R31260335553825")
rhealpix2geo(["R31260335553825", "R31260335553826"]) [
, ]
Source code in vgrid/conversion/dggs2geo/rhealpix2geo.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
rhealpix2geo_cli()
¶
Command-line interface for converting RHEALPix cell IDs to Shapely Polygons.
This function provides a command-line interface that accepts multiple RHEALPix cell IDs as command-line arguments and returns the corresponding Shapely Polygon objects.
Returns:
| Name | Type | Description |
|---|---|---|
list |
A list of Shapely Polygon objects representing the converted cells. |
Usage
rhealpix2geo R31260335553825 R31260335553826
Note
This function is designed to be called from the command line and will parse arguments using argparse. Invalid cell IDs are silently skipped.
Source code in vgrid/conversion/dggs2geo/rhealpix2geo.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
rhealpix2geojson(rhealpix_ids, fix_antimeridian=None)
¶
Convert RHEALPix cell IDs to GeoJSON FeatureCollection.
Accepts a single rhealpix_id (string) or a list of rhealpix_ids. For each valid RHEALPix cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
rhealpix_ids : str or list of str RHEALPix cell ID(s) to convert. Can be a single string or a list of strings. Each ID should be a string starting with 'R' followed by numeric digits. Example format: "R31260335553825" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid RHEALPix cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the RHEALPix cell ID, resolution level, and cell metadata
Examples¶
rhealpix2geojson("R31260335553825")
rhealpix2geojson(["R31260335553825", "R31260335553826"])
Source code in vgrid/conversion/dggs2geo/rhealpix2geo.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
rhealpix2geojson_cli()
¶
Command-line interface for converting RHEALPix cell IDs to GeoJSON.
This function provides a command-line interface that accepts multiple RHEALPix cell IDs as command-line arguments and outputs the corresponding GeoJSON FeatureCollection as a JSON string to stdout.
Usage
rhealpix2geojson R31260335553825 R31260335553826
Output
Prints a JSON string representing a GeoJSON FeatureCollection to stdout.
Example
$ python -m vgrid.conversion.dggs2geo.rhealpix2geo R31260335553825
Note
This function is designed to be called from the command line and will parse arguments using argparse. The GeoJSON output is formatted as a JSON string printed to stdout. Invalid cell IDs are silently skipped.
Source code in vgrid/conversion/dggs2geo/rhealpix2geo.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
ISEA4T to Geometry Module
This module provides functionality to convert ISEA4T (Icosahedral Snyder Equal Area Aperture 4 Triangle) cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
isea4t2geo(isea4t_ids, fix_antimeridian=None)
¶
Convert ISEA4T cell IDs to Shapely geometry objects.
Accepts a single isea4t_id (string) or a list of isea4t_ids. For each valid ISEA4T cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
isea4t_ids : str or list of str ISEA4T cell ID(s) to convert. Can be a single string or a list of strings. Example format: "131023133313201333311333" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single ISEA4T cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding ISEA4T cell.
Examples¶
isea4t2geo("131023133313201333311333")
isea4t2geo(["131023133313201333311333", "131023133313201333311334"]) [
, ]
Source code in vgrid/conversion/dggs2geo/isea4t2geo.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
isea4t2geo_cli()
¶
Command-line interface for isea4t2geo supporting multiple ISEA4T cell IDs.
Source code in vgrid/conversion/dggs2geo/isea4t2geo.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
isea4t2geojson(isea4t_ids, fix_antimeridian=None)
¶
Convert ISEA4T cell IDs to GeoJSON FeatureCollection.
Accepts a single isea4t_id (string) or a list of isea4t_ids. For each valid ISEA4T cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
isea4t_ids : str or list of str ISEA4T cell ID(s) to convert. Can be a single string or a list of strings. Example format: "131023133313201333311333" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid ISEA4T cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the ISEA4T cell ID, resolution level, and cell metadata
Examples¶
isea4t2geojson("131023133313201333311333")
isea4t2geojson(["131023133313201333311333", "131023133313201333311334"])
Source code in vgrid/conversion/dggs2geo/isea4t2geo.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
isea4t2geojson_cli()
¶
Command-line interface for isea4t2geojson supporting multiple ISEA4T cell IDs.
Source code in vgrid/conversion/dggs2geo/isea4t2geo.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
ISEA3H to Geometry Module
This module provides functionality to convert ISEA3H (Icosahedral Snyder Equal Area Aperture 3 Hexagon) cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
isea3h2geo(isea3h_ids, fix_antimeridian=None)
¶
Convert ISEA3H cell IDs to Shapely geometry objects.
Accepts a single isea3h_id (string) or a list of isea3h_ids. For each valid ISEA3H cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
isea3h_ids : str or list of str ISEA3H cell ID(s) to convert. Can be a single string or a list of strings. Example format: "1327916769,-55086" fix_antimeridian : Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single ISEA3H cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding ISEA3H cell.
Examples¶
isea3h2geo("1327916769,-55086")
isea3h2geo(["1327916769,-55086", "1327916770,-55087"]) [
, ]
Source code in vgrid/conversion/dggs2geo/isea3h2geo.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
isea3h2geo_cli()
¶
Command-line interface for isea3h2geo supporting multiple ISEA3H cell IDs.
Source code in vgrid/conversion/dggs2geo/isea3h2geo.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
isea3h2geojson(isea3h_ids, fix_antimeridian=None)
¶
Convert ISEA3H cell IDs to GeoJSON FeatureCollection.
Accepts a single isea3h_id (string) or a list of isea3h_ids. For each valid ISEA3H cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
isea3h_ids : str or list of str ISEA3H cell ID(s) to convert. Can be a single string or a list of strings. Example format: "1327916769,-55086" fix_antimeridian : str, optional Antimeridian fixing method: shift, shift_balanced, shift_west, shift_east, split, none
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid ISEA3H cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the ISEA3H cell ID, resolution level, center coordinates, edge length, and cell area
Examples¶
isea3h2geojson("1327916769,-55086")
isea3h2geojson(["1327916769,-55086", "1327916770,-55087"])
Source code in vgrid/conversion/dggs2geo/isea3h2geo.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
isea3h2geojson_cli()
¶
Command-line interface for isea3h2geojson supporting multiple ISEA3H cell IDs.
Source code in vgrid/conversion/dggs2geo/isea3h2geo.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
EASE-DGGS to Geometry Module
This module provides functionality to convert EASE-DGGS (Equal-Area Scalable Earth Grid) cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
ease2geo(ease_ids)
¶
Convert EASE-DGGS codes to Shapely geometry objects.
Accepts a single ease_id (string) or a list of ease_ids. For each valid EASE-DGGS code, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
ease_ids : str or list of str EASE-DGGS code(s) to convert. Can be a single string or a list of strings. Example format: "L4.165767.02.02.20.71"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single EASE-DGGS code is provided, returns a single Shapely Polygon object. If a list of codes is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding EASE-DGGS cell.
Examples¶
ease2geo("L4.165767.02.02.20.71")
ease2geo(["L4.165767.02.02.20.71", "L4.165768.02.02.20.71"]) [
, ]
Source code in vgrid/conversion/dggs2geo/ease2geo.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
ease2geo_cli()
¶
Command-line interface for ease2geo supporting multiple EASE-DGGS codes.
Source code in vgrid/conversion/dggs2geo/ease2geo.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
ease2geojson(ease_ids)
¶
Convert a list of EASE-DGGS codes to GeoJSON FeatureCollection.
Accepts a single ease_id (string) or a list of ease_ids. For each valid EASE-DGGS code, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
ease_ids : str or list of str EASE-DGGS code(s) to convert. Can be a single string or a list of strings. Example format: "L4.165767.02.02.20.71"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid EASE-DGGS cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the EASE-DGGS code, resolution level, and cell metadata
Examples¶
ease2geojson("L4.165767.02.02.20.71")
ease2geojson(["L4.165767.02.02.20.71", "L4.165768.02.02.20.71"])
Source code in vgrid/conversion/dggs2geo/ease2geo.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
ease2geojson_cli()
¶
Command-line interface for ease2geojson supporting multiple EASE-DGGS codes.
Source code in vgrid/conversion/dggs2geo/ease2geo.py
148 149 150 151 152 153 154 155 156 157 158 159 160 | |
DGGAL to Geometry Module
This module provides functionality to convert DGGAL ZoneIDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
dggal2geo(dggs_type, zone_ids, options={}, split_antimeridian=False)
¶
Convert DGGAL ZoneIDs to Shapely geometry objects.
Accepts a single zone_id (string) or a list of zone_ids. For each valid DGGAL ZoneID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
dggs_type : str DGGAL DGGS type (e.g., "isea3h", "isea4t", "rhealpix"). zone_ids : str or list of str DGGAL ZoneID(s) to convert. Can be a single string or a list of strings. Example format: "A4-0-A" options : dict, optional Additional options for the conversion process. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single DGGAL ZoneID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding DGGAL cell.
Examples¶
dggal2geo("isea3h", "A4-0-A")
dggal2geo("isea3h", ["A4-0-A", "A4-0-B"]) [
, ]
Source code in vgrid/conversion/dggs2geo/dggal2geo.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
dggal2geojson(dggs_type, zone_ids, options={}, split_antimeridian=False)
¶
Convert DGGAL ZoneIDs to GeoJSON FeatureCollection.
Accepts a single zone_id (string) or a list of zone_ids. For each valid DGGAL ZoneID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
dggs_type : str DGGAL DGGS type (e.g., "isea3h", "isea4t", "rhealpix"). zone_ids : str or list of str DGGAL ZoneID(s) to convert. Can be a single string or a list of strings. Example format: "A4-0-A" options : dict, optional Additional options for the conversion process. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid DGGAL cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the DGGAL ZoneID, resolution level, and cell metadata
Examples¶
dggal2geojson("isea3h", "A4-0-A")
dggal2geojson("isea3h", ["A4-0-A", "A4-0-B"])
Source code in vgrid/conversion/dggs2geo/dggal2geo.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
dggal2geojson_cli()
¶
Command-line interface for converting DGGAL ZoneIDs to GeoJSON.
This function provides a command-line interface that accepts multiple DGGAL ZoneIDs as command-line arguments and outputs the corresponding GeoJSON FeatureCollection as a JSON string to stdout.
Usage
dggal2geojson isea3h A4-0-A A4-0-B
Output
Prints a JSON string representing a GeoJSON FeatureCollection to stdout.
Example
$ python -m vgrid.conversion.dggs2geo.dggal2geo isea3h A4-0-A
Note
This function is designed to be called from the command line and will parse arguments using argparse. The GeoJSON output is formatted as a JSON string printed to stdout. Invalid cell IDs are silently skipped.
Source code in vgrid/conversion/dggs2geo/dggal2geo.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
DGGRID to Geometry Module
This module provides functionality to convert DGGRID cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
dggrid2geo(dggrid_instance, dggs_type, dggrid_ids, resolution=None, input_address_type='SEQNUM', split_antimeridian=False, aggregate=False)
¶
Convert DGGRID cell IDs to Shapely geometry objects.
Accepts a single dggrid_id (string/int) or a list of dggrid_ids. For each valid DGGRID cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
dggrid_instance : object DGGRID instance for processing. dggs_type : str DGGRID DGGS type (e.g., "ISEA7H", "ISEA4T"). dggrid_ids : str, int, or list of str/int DGGRID cell ID(s) to convert. Can be a single string/int or a list of strings/ints. Example format: "783229476878" resolution : int, optional Resolution level for the DGGS. If None, will be validated based on dggs_type. input_address_type : str, default "SEQNUM" Input address type for the cell IDs. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
geopandas.GeoDataFrame A GeoDataFrame containing polygon geometries for each valid DGGRID cell. Each row includes: - geometry: Polygon representing the cell boundaries - dggrid_{dggs_type.lower()}: The original cell ID - resolution: The resolution level
Examples¶
dggrid2geo(instance, "ISEA7H", "783229476878", 13)
dggrid2geo(instance, "ISEA7H", ["783229476878", "783229476879"], 13)
Source code in vgrid/conversion/dggs2geo/dggrid2geo.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
dggrid2geo_cli()
¶
Command-line interface for dggrid2geo supporting multiple DGGRID cell IDs.
Source code in vgrid/conversion/dggs2geo/dggrid2geo.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
dggrid2geojson(dggrid_instance, dggs_type, dggrid_ids, resolution, input_address_type='SEQNUM', split_antimeridian=False, aggregate=False)
¶
Convert DGGRID cell IDs to GeoJSON FeatureCollection.
Accepts a single dggrid_id (string/int) or a list of dggrid_ids. For each valid DGGRID cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
dggrid_instance : object DGGRID instance for processing. dggs_type : str DGGRID DGGS type (e.g., "ISEA7H", "ISEA4T"). dggrid_ids : str, int, or list of str/int DGGRID cell ID(s) to convert. Can be a single string/int or a list of strings/ints. Example format: "783229476878" resolution : int Resolution level for the DGGS. input_address_type : str, default "SEQNUM" Input address type for the cell IDs. split_antimeridian : bool, optional When True, apply antimeridian fixing to the resulting polygons. Defaults to False when None or omitted.
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid DGGRID cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the DGGRID cell ID, resolution level, and cell metadata
Examples¶
dggrid2geojson(instance, "ISEA7H", "783229476878", 13)
dggrid2geojson(instance, "ISEA7H", ["783229476878", "783229476879"], 13)
Source code in vgrid/conversion/dggs2geo/dggrid2geo.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
dggrid2geojson_cli()
¶
Command-line interface for dggrid2geojson supporting multiple DGGRID cell IDs.
Source code in vgrid/conversion/dggs2geo/dggrid2geo.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
QTM to Geometry Module
This module provides functionality to convert QTM (Ternary Triangular Mesh) cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
qtm2geo(qtm_ids)
¶
Convert QTM cell IDs to Shapely geometry objects.
Accepts a single qtm_id (string) or a list of qtm_ids. For each valid QTM cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
qtm_ids : str or list of str QTM cell ID(s) to convert. Can be a single string or a list of strings. Example format: "42012321"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single QTM cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding QTM cell.
Examples¶
qtm2geo("42012321")
qtm2geo(["42012321", "42012322"]) [
, ]
Source code in vgrid/conversion/dggs2geo/qtm2geo.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
qtm2geo_cli()
¶
Command-line interface for qtm2geo supporting multiple QTM cell IDs.
Source code in vgrid/conversion/dggs2geo/qtm2geo.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
qtm2geojson(qtm_ids)
¶
Convert QTM cell IDs to GeoJSON FeatureCollection.
Accepts a single qtm_id (string) or a list of qtm_ids. For each valid QTM cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
qtm_ids : str or list of str QTM cell ID(s) to convert. Can be a single string or a list of strings. Example format: "42012321"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid QTM cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the QTM cell ID, resolution level, and cell metadata
Examples¶
qtm2geojson("42012321")
qtm2geojson(["42012321", "42012322"])
Source code in vgrid/conversion/dggs2geo/qtm2geo.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
qtm2geojson_cli()
¶
Command-line interface for qtm2geojson supporting multiple QTM cell IDs.
Source code in vgrid/conversion/dggs2geo/qtm2geo.py
127 128 129 130 131 132 133 134 135 136 137 138 139 | |
OLC to Geometry Module
This module provides functionality to convert Open Location Codes (OLC), also known as Google Plus Codes, to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
olc2geo(olc_ids)
¶
Convert OLC (Open Location Code) cell IDs to Shapely geometry objects.
Accepts a single olc_id (string) or a list of olc_ids. For each valid OLC cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
olc_ids : str or list of str OLC cell ID(s) to convert. Can be a single string or a list of strings. Example format: "7P28QPG4+4P7"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single OLC cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding OLC cell.
Examples¶
olc2geo("7P28QPG4+4P7")
olc2geo(["7P28QPG4+4P7", "7P28QPG4+4P8"]) [
, ]
Source code in vgrid/conversion/dggs2geo/olc2geo.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
olc2geo_cli()
¶
Command-line interface for olc2geo supporting multiple OLC codes.
Source code in vgrid/conversion/dggs2geo/olc2geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
olc2geojson(olc_ids)
¶
Convert OLC (Open Location Code) cell IDs to GeoJSON FeatureCollection.
Accepts a single olc_id (string) or a list of olc_ids. For each valid OLC cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
olc_ids : str or list of str OLC cell ID(s) to convert. Can be a single string or a list of strings. Example format: "7P28QPG4+4P7"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid OLC cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the OLC cell ID, resolution level, and cell metadata
Examples¶
olc2geojson("7P28QPG4+4P7")
olc2geojson(["7P28QPG4+4P7", "7P28QPG4+4P8"])
Source code in vgrid/conversion/dggs2geo/olc2geo.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
olc2geojson_cli()
¶
Command-line interface for olc2geojson supporting multiple OLC codes.
Source code in vgrid/conversion/dggs2geo/olc2geo.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
Geohash to Geometry Module
This module provides functionality to convert Geohash cell identifiers to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
geohash2geo(geohash_ids)
¶
Convert Geohash cell IDs to Shapely geometry objects.
Accepts a single geohash_id (string) or a list of geohash_ids. For each valid Geohash cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
geohash_ids : str or list of str Geohash cell ID(s) to convert. Can be a single string or a list of strings. Example format: "w3gvk1td8"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single Geohash cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding Geohash cell.
Examples¶
geohash2geo("w3gvk1td8")
geohash2geo(["w3gvk1td8", "w3gvk1td9"]) [
, ]
Source code in vgrid/conversion/dggs2geo/geohash2geo.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
geohash2geo_cli()
¶
Command-line interface for geohash2geo supporting multiple Geohash cell IDs.
Source code in vgrid/conversion/dggs2geo/geohash2geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
geohash2geojson(geohash_ids)
¶
Convert Geohash cell IDs to GeoJSON FeatureCollection.
Accepts a single geohash_id (string) or a list of geohash_ids. For each valid Geohash cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
geohash_ids : str or list of str Geohash cell ID(s) to convert. Can be a single string or a list of strings. Example format: "w3gvk1td8"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Geohash cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Geohash cell ID, resolution level, and cell metadata
Examples¶
geohash2geojson("w3gvk1td8")
geohash2geojson(["w3gvk1td8", "w3gvk1td9"])
Source code in vgrid/conversion/dggs2geo/geohash2geo.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
geohash2geojson_cli()
¶
Command-line interface for geohash2geojson supporting multiple Geohash cell IDs.
Source code in vgrid/conversion/dggs2geo/geohash2geo.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
GEOREF to Geometry Module
This module provides functionality to convert GEOREF (World Geographic Reference System) codes to Shapely Polygons and GeoJSON FeatureCollection. GEOREF is a standardized system for identifying locations on the Earth's surface using a grid-based coordinate system.
Key Functions
georef2geo(georef_ids)
¶
Convert GEOREF codes to Shapely geometry objects.
Accepts a single georef_id (string) or a list of georef_ids. For each valid GEOREF code, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
georef_ids : str or list of str GEOREF code(s) to convert. Can be a single string or a list of strings. Example format: "VGBL42404651"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single GEOREF code is provided, returns a single Shapely Polygon object. If a list of codes is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding GEOREF cell.
Examples¶
georef2geo("VGBL42404651")
georef2geo(["VGBL42404651", "VGBL42404652"]) [
, ]
Source code in vgrid/conversion/dggs2geo/georef2geo.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
georef2geo_cli()
¶
Command-line interface for georef2geo supporting multiple GEOREF codes.
Source code in vgrid/conversion/dggs2geo/georef2geo.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
georef2geojson(georef_ids)
¶
Convert GEOREF codes to GeoJSON FeatureCollection.
Accepts a single georef_id (string) or a list of georef_ids. For each valid GEOREF code, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
georef_ids : str or list of str GEOREF code(s) to convert. Can be a single string or a list of strings. Example format: "VGBL42404651"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid GEOREF cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the GEOREF code, resolution level, and cell metadata
Examples¶
georef2geojson("VGBL42404651")
georef2geojson(["VGBL42404651", "VGBL42404652"])
Source code in vgrid/conversion/dggs2geo/georef2geo.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
georef2geojson_cli()
¶
Command-line interface for georef2geojson supporting multiple GEOREF codes.
Source code in vgrid/conversion/dggs2geo/georef2geo.py
146 147 148 149 150 151 152 153 154 155 156 157 158 | |
MGRS to Geometry Module
This module provides functionality to convert MGRS (Military Grid Reference System) cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
mgrs2geo(mgrs_ids)
¶
Convert MGRS cell IDs to Shapely geometry objects.
Accepts a single mgrs_id (string) or a list of mgrs_ids. For each valid MGRS cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
mgrs_ids : str or list of str MGRS cell ID(s) to convert. Can be a single string or a list of strings. Example format: "48PXS866916"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single MGRS cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding MGRS cell.
Examples¶
mgrs2geo("48PXS866916")
mgrs2geo(["48PXS866916", "48PXS866917"]) [
, ]
Source code in vgrid/conversion/dggs2geo/mgrs2geo.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
mgrs2geo_cli()
¶
Command-line interface for mgrs2geo supporting multiple MGRS cell IDs.
Source code in vgrid/conversion/dggs2geo/mgrs2geo.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
mgrs2geojson(mgrs_ids)
¶
Convert MGRS cell IDs to GeoJSON FeatureCollection.
Accepts a single mgrs_id (string) or a list of mgrs_ids. For each valid MGRS cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
mgrs_ids : str or list of str MGRS cell ID(s) to convert. Can be a single string or a list of strings. Example format: "48PXS866916"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid MGRS cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the MGRS cell ID, resolution level, and cell metadata
Examples¶
mgrs2geojson("48PXS866916")
mgrs2geojson(["48PXS866916", "48PXS866917"])
Source code in vgrid/conversion/dggs2geo/mgrs2geo.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
mgrs2geojson_cli()
¶
Command-line interface for mgrs2geojson supporting multiple MGRS cell IDs.
Source code in vgrid/conversion/dggs2geo/mgrs2geo.py
190 191 192 193 194 195 196 197 198 199 200 201 202 | |
Tilecode to Geometry Module
This module provides functionality to convert Tilecode identifiers to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
tilecode2geo(tilecode_ids)
¶
Convert Tilecode cell IDs to Shapely geometry objects.
Accepts a single tilecode_id (string) or a list of tilecode_ids. For each valid Tilecode cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
tilecode_ids : str or list of str Tilecode cell ID(s) to convert. Can be a single string or a list of strings. Format: 'z{x}x{y}y{z}' where z is zoom level and x,y are tile coordinates. Example format: "z0x0y0"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single Tilecode cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding Tilecode cell.
Examples¶
tilecode2geo("z0x0y0")
tilecode2geo(["z0x0y0", "z1x1y1"]) [
, ]
Source code in vgrid/conversion/dggs2geo/tilecode2geo.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
tilecode2geo_cli()
¶
Command-line interface for tilecode2geo supporting multiple Tilecodes.
Source code in vgrid/conversion/dggs2geo/tilecode2geo.py
82 83 84 85 86 87 88 89 90 91 92 93 94 | |
tilecode2geojson(tilecode_ids)
¶
Convert Tilecode cell IDs to GeoJSON FeatureCollection.
Accepts a single tilecode_id (string) or a list of tilecode_ids. For each valid Tilecode cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
tilecode_ids : str or list of str Tilecode cell ID(s) to convert. Can be a single string or a list of strings. Format: 'z{x}x{y}y{z}' where z is zoom level and x,y are tile coordinates. Example format: "z0x0y0"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Tilecode cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Tilecode cell ID, resolution level, and cell metadata
Examples¶
tilecode2geojson("z0x0y0")
tilecode2geojson(["z0x0y0", "z1x1y1"])
Source code in vgrid/conversion/dggs2geo/tilecode2geo.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
tilecode2geojson_cli()
¶
Command-line interface for tilecode2geojson supporting multiple Tilecodes.
Source code in vgrid/conversion/dggs2geo/tilecode2geo.py
163 164 165 166 167 168 169 170 171 172 173 | |
Quadkey to Geometry Module
This module provides functionality to convert Quadkey identifiers to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
quadkey2geo(quadkey_ids)
¶
Convert Quadkey cell IDs to Shapely geometry objects.
Accepts a single quadkey_id (string) or a list of quadkey_ids. For each valid Quadkey cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
quadkey_ids : str or list of str Quadkey cell ID(s) to convert. Can be a single string or a list of strings. Example format: "13223011131020220011133"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single Quadkey cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding Quadkey cell.
Examples¶
quadkey2geo("13223011131020220011133")
quadkey2geo(["13223011131020220011133", "13223011131020220011134"]) [
, ]
Source code in vgrid/conversion/dggs2geo/quadkey2geo.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
quadkey2geo_cli()
¶
Command-line interface for quadkey2geo supporting multiple Quadkeys.
Source code in vgrid/conversion/dggs2geo/quadkey2geo.py
78 79 80 81 82 83 84 85 86 87 88 89 90 | |
quadkey2geojson(quadkey_ids)
¶
Convert Quadkey cell IDs to GeoJSON FeatureCollection.
Accepts a single quadkey_id (string) or a list of quadkey_ids. For each valid Quadkey cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
quadkey_ids : str or list of str Quadkey cell ID(s) to convert. Can be a single string or a list of strings. Example format: "13223011131020220011133"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Quadkey cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Quadkey cell ID, resolution level, and cell metadata
Examples¶
quadkey2geojson("13223011131020220011133")
quadkey2geojson(["13223011131020220011133", "13223011131020220011134"])
Source code in vgrid/conversion/dggs2geo/quadkey2geo.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
quadkey2geojson_cli()
¶
Command-line interface for quadkey2geojson supporting multiple Quadkeys.
Source code in vgrid/conversion/dggs2geo/quadkey2geo.py
155 156 157 158 159 160 161 162 163 164 165 | |
Maidenhead to Geometry Module
This module provides functionality to convert Maidenhead locator grid cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
maidenhead2geo(maidenhead_ids)
¶
Convert Maidenhead cell IDs to Shapely geometry objects.
Accepts a single maidenhead_id (string) or a list of maidenhead_ids. For each valid Maidenhead cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
maidenhead_ids : str or list of str Maidenhead cell ID(s) to convert. Can be a single string or a list of strings. Example format: "OK3046."
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single Maidenhead cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding Maidenhead cell.
Examples¶
maidenhead2geo("OK3046.")
maidenhead2geo(["OK3046.", "OK3047."]) [
, ]
Source code in vgrid/conversion/dggs2geo/maidenhead2geo.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
maidenhead2geo_cli()
¶
Command-line interface for maidenhead2geo supporting multiple Maidenhead cell IDs.
Source code in vgrid/conversion/dggs2geo/maidenhead2geo.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
maidenhead2geojson(maidenhead_ids)
¶
Convert Maidenhead cell IDs to GeoJSON FeatureCollection.
Accepts a single maidenhead_id (string) or a list of maidenhead_ids. For each valid Maidenhead cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
maidenhead_ids : str or list of str Maidenhead cell ID(s) to convert. Can be a single string or a list of strings. Example format: "OK3046."
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid Maidenhead cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the Maidenhead cell ID, resolution level, and cell metadata
Examples¶
maidenhead2geojson("OK3046.")
maidenhead2geojson(["OK3046.", "OK3047."])
Source code in vgrid/conversion/dggs2geo/maidenhead2geo.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
maidenhead2geojson_cli()
¶
Command-line interface for maidenhead2geojson supporting multiple Maidenhead cell IDs.
Source code in vgrid/conversion/dggs2geo/maidenhead2geo.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
GARS to Geometry Module
This module provides functionality to convert GARS (Global Area Reference System) cell IDs to Shapely Polygons and GeoJSON FeatureCollection.
Key Functions
gars2geo(gars_ids)
¶
Convert GARS cell IDs to Shapely geometry objects.
Accepts a single gars_id (string) or a list of gars_ids. For each valid GARS cell ID, creates a Shapely Polygon representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
gars_ids : str or list of str GARS cell ID(s) to convert. Can be a single string or a list of strings. Example format: "574JK1918"
Returns¶
shapely.geometry.Polygon or list of shapely.geometry.Polygon If a single GARS cell ID is provided, returns a single Shapely Polygon object. If a list of IDs is provided, returns a list of Shapely Polygon objects. Each polygon represents the boundaries of the corresponding GARS cell.
Examples¶
gars2geo("574JK1918")
gars2geo(["574JK1918", "574JK1919"]) [
, ]
Source code in vgrid/conversion/dggs2geo/gars2geo.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
gars2geo_cli()
¶
Command-line interface for gars2geo supporting multiple GARS cell IDs.
Source code in vgrid/conversion/dggs2geo/gars2geo.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
gars2geojson(gars_ids)
¶
Convert GARS cell IDs to GeoJSON FeatureCollection.
Accepts a single gars_id (string) or a list of gars_ids. For each valid GARS cell ID, creates a GeoJSON feature with polygon geometry representing the grid cell boundaries. Skips invalid or error-prone cells.
Parameters¶
gars_ids : str or list of str GARS cell ID(s) to convert. Can be a single string or a list of strings. Example format: "574JK1918"
Returns¶
dict A GeoJSON FeatureCollection containing polygon features for each valid GARS cell. Each feature includes: - geometry: Polygon representing the cell boundaries - properties: Contains the GARS cell ID, resolution level, and cell metadata
Examples¶
gars2geojson("574JK1918")
gars2geojson(["574JK1918", "574JK1919"])
Source code in vgrid/conversion/dggs2geo/gars2geo.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
gars2geojson_cli()
¶
Command-line interface for gars2geojson supporting multiple GARS cell IDs.
Source code in vgrid/conversion/dggs2geo/gars2geo.py
142 143 144 145 146 147 148 149 150 151 152 153 154 | |