{"id":18722640,"url":"https://github.com/mdsumner/dirtymapview","last_synced_at":"2026-03-19T06:03:51.055Z","repository":{"id":44350595,"uuid":"256362400","full_name":"mdsumner/dirtymapview","owner":"mdsumner","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-24T12:03:06.000Z","size":230,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T02:06:14.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdsumner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-17T00:36:45.000Z","updated_at":"2022-07-09T16:25:41.000Z","dependencies_parsed_at":"2022-09-15T20:51:20.932Z","dependency_job_id":null,"html_url":"https://github.com/mdsumner/dirtymapview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdsumner/dirtymapview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fdirtymapview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fdirtymapview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fdirtymapview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fdirtymapview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdsumner","download_url":"https://codeload.github.com/mdsumner/dirtymapview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fdirtymapview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29091859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:18.053Z","updated_at":"2026-02-04T17:32:40.865Z","avatar_url":"https://github.com/mdsumner.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# dirtymapview\n\n\nhttps://github.com/developmentseed/dirty-reprojectors\n\n\nJust a rough example for now, not sure this is worthwhile or just a obscure plainview: \n\n```R\nlibrary(sf)\nlibrary(raster)\n#ant \u003c- sfdct::antarctica[1, ]\nice \u003c- sf::st_as_sf(SOmap::SOmap_data$seaice_oct) ## openstack is bork today: raadtools::readice(latest = TRUE)\nant \u003c- sf::st_transform(sfdct::antarctica[1, ], raster::projection(ice))\n\nplot(ant$geometry)\n\ndirty_merc \u003c- function() {\n  \"+proj=merc +a=6378137.0 +b=6378137.0\"\n}\n## your projection with +merc sensibilities (maxext: anything \u003c= 20037508)\ndirty_scl \u003c- function(x, maxext = 20037508, xlim = NULL, ylim = NULL) {\n  A \u003c- maxext\n  if (is.null(xlim)) {\n    xlim \u003c- spex::xlim(x)\n  }\n  if (is.null(ylim)) {\n    ylim \u003c- spex::ylim(x)\n  }\n  df \u003c- sfheaders::sf_to_df(x)\n  df$x \u003c- scales::rescale(df$x, to = c(-A, A), from = xlim)\n  df$y \u003c- scales::rescale(df$y, to = c(-A, A), from = ylim)\n  out \u003c- switch(as.character(st_geometry_type(x)), \n         MULTIPOLYGON = sfheaders::sf_mpoly(df), \n         MULTILINESTRING = sfheaders::sf_mline(df))\n  suppressWarnings(sf::st_set_crs(out, sf::st_crs(x)))\n  }\ndirty_reproj \u003c- function(x) {\n  suppressWarnings(sf::st_transform(sf::st_set_crs(x, sf::st_crs(dirty_merc())), \n                   4326))\n}\n\nxlim0 \u003c- spex::xlim(ice)\nylim0 \u003c- spex::ylim(ice)\nA \u003c- 20037508/5\ndirty_ant \u003c- dirty_reproj(dirty_scl(ant, maxext = A, xlim = xlim0, ylim = ylim0))  ## merc sensibilities in longlat\ndirty_ice \u003c- dirty_reproj(dirty_scl(ice, maxext = A, xlim = xlim0, ylim= ylim0))  ## merc sensibilities in longlat\nproj_extent \u003c- spex::spex(st_transform(dirty_ice$geometry, dirty_merc()))\ndirty_topo \u003c- setExtent(raster::projectRaster(anglr::gebco, \n                    raster::raster(extent(xlim0, ylim0), crs = projection(ice), \n                                   nrows = 256, ncols = 256)), proj_extent)\n\nprojection(dirty_topo) \u003c- dirty_merc()\nlibrary(mapview)\nmapview(dirty_topo) + mapview(dirty_ant) + mapview(dirty_ice)\n\n```\n\n![ A test image](https://github.com/mdsumner/dirtymapview/raw/master/Untitled.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fdirtymapview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdsumner%2Fdirtymapview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fdirtymapview/lists"}