{"id":18739739,"url":"https://github.com/roblabs/make-latitude-longitude-lines","last_synced_at":"2026-05-09T05:32:19.609Z","repository":{"id":136165132,"uuid":"115674437","full_name":"roblabs/make-latitude-longitude-lines","owner":"roblabs","description":"NPM script to generate latitude and longitude lines in GeoJSON format","archived":false,"fork":false,"pushed_at":"2018-09-02T22:34:55.000Z","size":500,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-25T16:58:18.986Z","etag":null,"topics":["geojson","ndjson","ndjson-filter","ndjson-reduce","node","npm","null-island"],"latest_commit_sha":null,"homepage":null,"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/roblabs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-29T01:41:29.000Z","updated_at":"2018-09-02T22:39:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee37e758-be71-4ca2-973d-d02a08895d49","html_url":"https://github.com/roblabs/make-latitude-longitude-lines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roblabs/make-latitude-longitude-lines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fmake-latitude-longitude-lines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fmake-latitude-longitude-lines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fmake-latitude-longitude-lines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fmake-latitude-longitude-lines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roblabs","download_url":"https://codeload.github.com/roblabs/make-latitude-longitude-lines/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fmake-latitude-longitude-lines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32808420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["geojson","ndjson","ndjson-filter","ndjson-reduce","node","npm","null-island"],"created_at":"2024-11-07T15:37:12.528Z","updated_at":"2026-05-09T05:32:19.571Z","avatar_url":"https://github.com/roblabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Make Latitude \u0026 Longitude Lines\n\nNPM script to generate latitude and longitude lines in GeoJSON format\n\nUsage\n\n``` bash\n# do this once\nnpm install --global\n# npm uninstall --global\n\nmakeLatitudeLongitudeLines\n\n# or if you want to install to the current folder\nnpm install\n./cli.js\n\n#\n\n```\n\nGenerates GeoJSON that looks like this\n\n\n``` javascript\n// This example draws lines every 2.5 minutes\n{\n  \"type\": \"Feature\",\n  \"properties\": {\n    \"wgs84Degrees\": \"32° 50' 00\\\" N\",\n    \"wgs84Decimal\": \"32.833333\"\n  },\n  \"geometry\": {\"type\":\"LineString\",\"coordinates\":[[-180,32.833333],[180,32.833333]]      }\n},\n{\n  \"type\": \"Feature\",\n  \"properties\": {\n    \"wgs84Degrees\": \"32° 52' 30\\\" N\",\n    \"wgs84Decimal\": \"32.875000\"\n  },\n  \"geometry\": {\"type\":\"LineString\",\"coordinates\":[[-180,32.875],[180,32.875]]      }\n}\n```\n\n``` bash\nmakeLatitudeLongitudeLines \u003e 2.5minutes.geojson\n\n# convert to ESRI Shapefile\nogr2ogr -f \"ESRI Shapefile\" 2.5minutes.shp 2.5minutes.geojson\n\n# clip to San Diego\nBBOX=\"-117.34573 32.52852 -116.57119 33.05149\"\nogr2ogr \\\n  -t_srs EPSG:4326 \\\n  -clipdst $BBOX \\\n  -f GeoJSON sandiego.geojson 2.5minutes.geojson\n```\n### Examples\n\n* Black Latitude \u0026 Longitude lines every 2.5 minutes\n\n![](assets/readme-lat-long-utm.png)\n\n---\n\n* Yellow UTM lines, every 1 Km\n  * Universal Transverse Mercator lines sourced from [NGA Office of Geomatics](http://earth-info.nga.mil/GandG/update/index.php?dir=coordsys\u0026action=utm-1km-polyline-dloads)\n\n![](assets/readme-utm.png)\n\n-----\n\nFilter the GeoJSON and just use the lines that cross at Null Island.\n\n``` bash\n# use `makeLatitudeLongitudeLines` instead of `cli.js` if you installed as global\n\n# Generate\n./cli.js \u003e out.geojson\n\n# Convert to ndjson\ncat out.geojson | geojson2ndjson \u003e out.ndjson\n\n# filter and keep certain  properties\nndjson-filter \u003c out.ndjson 'd.properties.wgs84Decimal == \"0.000000\"' \u003e null-island-grid.ndjson\n\n# merge a stream into a feature collection\nndjson-reduce \u003c null-island-grid.ndjson 'p.features.push(d), p' '{type: \"FeatureCollection\", features: []}' \u003e null-island-grid.geojson\n\n# view at geojson.io\ngeojsonio null-island-grid.geojson\n\n\n\n# or, as a one-liner\n\ncat out.geojson | \\\n  geojson2ndjson | \\\n  ndjson-filter 'd.properties.wgs84Decimal == \"0.000000\"' | \\\n  ndjson-reduce 'p.features.push(d), p' '{type: \"FeatureCollection\", features: []}'\n```\n\n![](assets/readme-null-island-grid.png)\n\n-----\n\n### References\n\n* Degrees Minutes Seconds to/from Decimal Degrees _ https://www.fcc.gov/media/radio/dms-decimal\n\n* https://en.wikipedia.org/wiki/Decimal_degrees\n\n* https://github.com/stevage/geojson2ndjson\n\n* https://github.com/mbostock/ndjson-cli#filter\n\n* https://github.com/mapbox/geojsonio-cli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblabs%2Fmake-latitude-longitude-lines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froblabs%2Fmake-latitude-longitude-lines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblabs%2Fmake-latitude-longitude-lines/lists"}