{"id":17171371,"url":"https://github.com/kbevers/kvadratnet","last_synced_at":"2025-10-04T22:42:50.234Z","repository":{"id":57447861,"uuid":"55180412","full_name":"kbevers/kvadratnet","owner":"kbevers","description":"Tile naming made easy!","archived":false,"fork":false,"pushed_at":"2020-03-22T20:38:03.000Z","size":47,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-06T06:52:40.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/kbevers.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-31T20:21:33.000Z","updated_at":"2020-04-06T17:49:48.000Z","dependencies_parsed_at":"2022-09-26T17:30:33.160Z","dependency_job_id":null,"html_url":"https://github.com/kbevers/kvadratnet","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/kbevers/kvadratnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbevers%2Fkvadratnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbevers%2Fkvadratnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbevers%2Fkvadratnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbevers%2Fkvadratnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbevers","download_url":"https://codeload.github.com/kbevers/kvadratnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbevers%2Fkvadratnet/sbom","scorecard":{"id":552571,"data":{"date":"2025-08-11","repo":{"name":"github.com/kbevers/kvadratnet","commit":"4c209c57c60fc8038278d0f5ca42e5f3c3fce81b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T11:18:13.876Z","repository_id":57447861,"created_at":"2025-08-20T11:18:13.876Z","updated_at":"2025-08-20T11:18:13.876Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278386118,"owners_count":25978109,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-14T23:34:22.847Z","updated_at":"2025-10-04T22:42:50.195Z","avatar_url":"https://github.com/kbevers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kvadratnet\n\nKvadratnet is a set of tools that makes working with the Danish Kvadratnet easier.\n\n[![Build Status](https://travis-ci.org/kbevers/kvadratnet.svg?branch=master)](https://travis-ci.org/kbevers/kvadratnet)\n[![Coverage Status](https://coveralls.io/repos/github/kbevers/kvadratnet/badge.svg?branch=master)](https://coveralls.io/github/kbevers/kvadratnet?branch=master)\n\n## Introduction\n\nThe Danish Kvadratnet is a geographical tiling scheme based on UTM coordinates.\nThe tiling scheme is a national standard for dividing nation-wide geographical\ndatasets into smaller pieces.\n\nThe Danish Kvadratnet was originally created as a collaboration between\n[Statistics Denmark](http://dst.dk/) and the [National Survey and Cadastre of Denmark](http://sdfe.dk/)\nas a static administrative geographical subdivision of the country.\nThe reasoning behind this was that usual administrative boundaries, such as municipal boundaries,\nare known to change from time to time and are therefore not very suitable as a geographical\nadministrative index.\n\nThe Danish Kvadratnet consist of a several **networks** that covers the country with square tiles\nof varying sizes.\nSupported tile sizes are: 100m, 250m, 1km, 10km, 50km and 100km.\nIndividual tiles are identified by tile size and the coordinates of the lower left corner of a tile.\nThe coordinates are truncated accordinging to the size of the tile i.e. 1km_6452_523.\nExamples of tile identifiers can be seen in the table below:\n\n| Network   | Tile name example |\n|-----------|-------------------|\n|  100km    | 100km_62_5        |\n|  50km     | 50km_620_55       |\n|  10km     | 10km_622_57       |\n|  1km      | 1km_6223_576      |\n|  250m     | 250m_622375_57550 |\n|  100m     | 100m_62237_5756   |\n\n\nUse of the kvadratnet module is not limited to the geographical area of Denmark.\nThe tiling scheme can be applied to any region on earth as the UTM coordinate system is defined worlwide.\nCare has to be taken in case use of the tiling scheme spans more than one UTM zone, since\ncoordinates are duplicated across zones.\nThis can be solved by keeping all data in the same UTM zone, even though some of it might\nbe placed outside the zone.\nBy using robust UTM coordinate transformation libraries, such as the Extended Transverse Mercator\nimplementation in ```proj.4```, data can be kept in the same coordinate system\neven though it spans several UTM zones.\nThis exact procedure is used by the Grenland Survey, [Asiaq](http://www.asiaq.gl/), which organizes\ndata across 10 UTM zones.\n\n## Example\n\nExample of using ```kvadratnet```\n\nSuppose you have a range of files organized in the 1km network.\nWe want to count how many 1km tiles are present in each parent\n10km tile.\n\n```python\nfrom collections import Counter\nimport kvadratnet\n\nfiles = ['dtm_1km_6121_867.tif', 'dtm_1km_6125_866.tif',\n         'dtm_1km_6125_862.tif', 'dtm_1km_6423_512.tif',\n         'dtm_1km_6253_234.tif', 'dtm_1km_6235_634.tif',\n         'dtm_1km_6424_513.tif', 'dtm_lkm_5223_523.tif',\n         'dtm_1km_6251_236.tif', 'dtm_1km_6424_517.tif']\n\ncounter = Counter()\n\nfor filename in files:\n    try:\n        name = kvadratnet.tile_name(filename)\n    except:\n        counter['bad_name'] += 1\n    parent = kvadratnet.parent_tile(name, '10km')\n    counter[parent] += 1\n\nprint(counter)\n# Counter({'10km_642_51': 4, '10km_612_86': 3, '10km_625_23': 2, '10km_623_63': 1, 'bad_name': 1})\n```\n\n## knet - command line interface\n\n`kvadratnet` also has a command line interface called `knet`.\nThe `knet` command is a front for various tools that make life\nmanaging files with kvadratnet naming a lot easier. For instance\nrenaming many files:\n\n```\n# add a prefix before the cell identifier\n$ knet rename --prefix PUNKTSKY_ \"*.laz\"\n\n# strip anything but the cell identifier\n$ knet rename PUNKTSKY*.laz\n```\n\nWith `knet` organizing files in subfolders according to which\nparent tiles they belong to is easy:\n```\n# divide files into 100km and 10km folders\n$ knet organize \"1km*.tif\" 100km 10km\n```\n\n\n## Installation\n\nInstallation can be done either via\n\n```\npip install kvadratnet\n```\n\nor by downloading the source code and running\n\n```\npython setup.py install\n```\n\n## Testing\n\n```nose``` is used for testing. The test-suite can be invoked by running\n\n```\nnosetests -v\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbevers%2Fkvadratnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbevers%2Fkvadratnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbevers%2Fkvadratnet/lists"}