{"id":18722652,"url":"https://github.com/mdsumner/equi7grid","last_synced_at":"2025-11-11T05:30:22.349Z","repository":{"id":229773905,"uuid":"777576402","full_name":"mdsumner/equi7grid","owner":"mdsumner","description":"Equi7Grid for R, just some artefacts and notes","archived":false,"fork":false,"pushed_at":"2024-03-27T03:55:57.000Z","size":3374,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T12:17:13.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mdsumner.github.io/equi7grid/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdsumner.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-26T05:35:22.000Z","updated_at":"2024-04-10T13:03:27.000Z","dependencies_parsed_at":"2024-11-07T13:43:58.579Z","dependency_job_id":"58acad3d-458e-495a-b1bd-ff03f1403ab8","html_url":"https://github.com/mdsumner/equi7grid","commit_stats":null,"previous_names":["mdsumner/equi7grid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fequi7grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fequi7grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fequi7grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fequi7grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdsumner","download_url":"https://codeload.github.com/mdsumner/equi7grid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239587244,"owners_count":19663892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T13:42:20.997Z","updated_at":"2025-11-11T05:30:22.308Z","avatar_url":"https://github.com/mdsumner.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# equi7grid\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/mdsumner/equi7grid/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mdsumner/equi7grid/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nThe goal of equi7grid is ... currently in-progress as a way to work with Equi7Grid in R. \n\nWe store the params here: \n\n```\nhttps://github.com/mdsumner/equi7grid/blob/main/data-raw/params.csv\n```\n\nThe [Equi7Grid](https://github.com/TUW-GEO/Equi7Grid) is a project that aims to define 7 global zones that are better than the current UTM and MGRS grid for classifying high resolution satellite imagery. \nHere we provide a single simple endpoint Geopackage url with the 7 zones in it with straightforward layer names: \n\n```\n\"/vsicurl/https://github.com/mdsumner/equi7grid/raw/main/data-raw/equi7grid_aeqd.gpkg\"\n```\n\nThe layers are these (note 'NA' is slightly unfortunate in R, but oh well). \n\n```\n\"AF\", \"AN\", \"AS\", \"EU\", \"NA\", \"OC\", \"SA\"\n```\n\n\n\n## Example\n\nThis plots each zone with its local centre in native Azimuthal Equidistant projection, the orange point shows the poles when they are in the frame. \n\n\nNote that we have a single vector source Geopackage, with the 7 zones in it, each in their own native projection. \n\n```{r example}\nlibrary(equi7grid)\ndsn \u003c- \"/vsicurl/https://github.com/mdsumner/equi7grid/raw/main/data-raw/equi7grid_aeqd.gpkg\"\n\n\nm \u003c- do.call(cbind, maps::map(plot = F)[1:2])\nlibrary(terra)\nlayers \u003c- vector_layers(dsn)\npar(mfrow = n2mfrow(length(layers)), mar = rep(0, 4))\nfor (i in seq_along(layers)) {\n  v \u003c- vect(dsn, layers[i])\n  ex \u003c- as.vector(ext(v))\n  m1 \u003c- project(m, to = crs(v), from = \"EPSG:4326\")\n  m1 \u003c- m1[m1[,1] \u003e= ex[1] \u0026 m1[,1] \u003c= ex[2] \u0026 m1[,2] \u003e= ex[3] \u0026 m1[,2] \u003c= ex[4], ]\n  plot(NA, axes = FALSE, xlim = ex[1:2], ylim = ex[3:4], asp = 1, xlab = \"\", ylab = \"\")\n  plot(v, axes = F, border = \"firebrick\", add = TRUE)\n  lines(m1, col = rgb(0, 0, 0, .5))\n  pt \u003c- cbind(0, c(-90, 90))\n  p0 \u003c- project(pt, to = crs(v), from = \"EPSG:4326\")\npoints(p0, pch = \"+\", cex = 2, col = \"orange\")\nbox(col = \"lightgrey\")\n\n}\n\n\n\n\n\n```\n\nIn the package we can read the entire set from a single FlatGeobuf, but you'll need to use them locally as they don't make sense in one single CRS. \n\nThe crs is recorded on each, but obviously we can craft our own scene and projection, here we just focus on the south in LAEA.\n\n```{r fgb}\nlibrary(equi7grid)\nfgb \u003c- system.file(\"extdata/equi7_longlat.fgb\", package = \"equi7grid\", mustWork = TRUE)\nlibrary(terra)\nx \u003c- vect(fgb)\nm \u003c- do.call(cbind, maps::map(plot = F)[1:2])\ncrs \u003c- \"+proj=laea +lat_0=-90\"\nplot(project(x[-(3:5), ], crs), col = hcl.colors(4))\nlines(project(m, to = crs, from = \"EPSG:4326\"))\n```\n\n\n## Code of Conduct\n  \nPlease note that the equi7grid project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fequi7grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdsumner%2Fequi7grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fequi7grid/lists"}