{"id":16694058,"url":"https://github.com/haoliangyu/gtran","last_synced_at":"2025-10-06T04:58:20.723Z","repository":{"id":57256505,"uuid":"43502780","full_name":"haoliangyu/gtran","owner":"haoliangyu","description":"GeoJSON conversion with ease and consistency","archived":false,"fork":false,"pushed_at":"2018-06-20T19:42:48.000Z","size":47,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-24T23:24:14.796Z","etag":null,"topics":["conversion","csv","geojson","kml","kmz","shapefile","topojson"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haoliangyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-01T14:57:19.000Z","updated_at":"2023-03-08T03:05:38.000Z","dependencies_parsed_at":"2022-08-25T02:30:58.405Z","dependency_job_id":null,"html_url":"https://github.com/haoliangyu/gtran","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/haoliangyu/gtran","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fgtran","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fgtran/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fgtran/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fgtran/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haoliangyu","download_url":"https://codeload.github.com/haoliangyu/gtran/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fgtran/sbom","scorecard":{"id":455022,"data":{"date":"2025-08-11","repo":{"name":"github.com/haoliangyu/gtran","commit":"84df5e8c084c54fe767b6cb4dd5d385a4a78fa27"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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 1 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"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-582f-p4pg-xc74","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-jg8v-48h5-wgxg","Warn: Project is vulnerable to: GHSA-36fh-84j7-cv5h","Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-x9hc-rw35-f44h","Warn: Project is vulnerable to: GHSA-34r7-q49f-h37c","Warn: Project is vulnerable to: GHSA-c9f4-xj24-8jqx"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T09:20:22.652Z","repository_id":57256505,"created_at":"2025-08-19T09:20:22.653Z","updated_at":"2025-08-19T09:20:22.653Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278561279,"owners_count":26006954,"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-06T02:00:05.630Z","response_time":65,"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":["conversion","csv","geojson","kml","kmz","shapefile","topojson"],"created_at":"2024-10-12T16:43:38.092Z","updated_at":"2025-10-06T04:58:20.695Z","avatar_url":"https://github.com/haoliangyu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gtran\n\nGeospatial data I/O package making data conversion simple and manageable.\n\n## Installation\n\n``` javascript\nnpm install gtran\n```\n\n## Features\n\n* **Multi-format support** - Just one package.\n\n* **Simple functions** - Consistent functions for different formats, just from() and to().\n\n* **Promised** - Powered by native Promise and it is happy working with your choice of promise library (Q, bluebird, and promise).\n\n* **GeoJson input/output** - Get GeoJson from your file and save it into whatever you want.\n\n## Supported Formats\n\n* CSV (point data only)\n\n* KML\n\n* KMZ (write only)\n\n* Shapefile\n\n* TopoJson (write only)\n\n## Functions\n\ngtran provides two of functions: from\\[format name\\]() and to\\[format name\\]() for each support format.\n\n* **from\\[format name\\](fileName [, options])**\n\n    Read the geospatial data file and return a GeoJson object.\n\n* **to\\[format name\\](geojson, fileName [,options])**\n\n    Write the GeoJson object into a file with given name and format. If the file name is not given, the function returns a data object that could be written into file.\n\nA full list of available functions:\n\n* **setPromiseLib(object)**\n\n    Specify the promise library. If not, the library will use the native Promise.\n\n* **.fromCSV(fileName, options)**\n\n    options:\n\n    * projection - Geographic coordinate columns, necessary parameter. Please check the use example.\n\n* **.toCSV(geojson, fileName)**\n\n* **.fromKml(fileName)**\n\n* **.toKml(geojson, fileName, options)**\n\n    options:\n\n    * name\t - Name property of feature.\n\n    * symbol - Symbol of saved features. [Detail about supported style options](https://github.com/haoliangyu/gtran-kml).\n\n\n* **.toKmz(geojson, fileName)**\n\n* **.fromShp(fileName)**\n\n* **.toShp(geojson, fileName, options)**\n\n    options:\n\n    * esriWKT - ESRI WTK string that specifies the shapefile's spatial reference and generates .prj file. The ESRI WKT string could be found at [SpatialReference.org](http://spatialreference.org/).\n\n* **.toTopo(geojson)**\n\n## Use Example\n\n``` javascript\nvar gtran = require('gtran');\n\n# Specify the promise library if necessary\ngtran.setPromiseLib(require('bluebird'));\n\n# Read shapefile\ngtran.fromShp('source.shp')\n.then(function(object) {\n    var geojson = object;\n});\n\n# Save geojson into shapefile\ngtran.toShp(geojson, 'point.shp')\n.then(function(fileNames) {\n    console.log('SHP files have been saved at:' + fileNames.toString());\n});\n\n# Read csv file\n# If the test.csv has two columns: latitude and longitude\ngtran.fromCSV('source.csv', {\n    mapping: { x: 'longitude', y: 'latitude' }\n})\n.then(function(object) {\n    var geojson = object;\n});\n\n# Save geojson into a csv file\ngtran.toCSV(geojson, 'point.csv')\n.then(function(fileName) {\n    console.log('CSV file has been saved at:' + fileName);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoliangyu%2Fgtran","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaoliangyu%2Fgtran","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoliangyu%2Fgtran/lists"}