{"id":13423638,"url":"https://github.com/osm2pgsql-dev/osm2pgsql","last_synced_at":"2025-12-17T03:43:55.556Z","repository":{"id":38955346,"uuid":"641729","full_name":"osm2pgsql-dev/osm2pgsql","owner":"osm2pgsql-dev","description":"Import OpenStreetMap data into a PostgreSQL/PostGIS database","archived":false,"fork":false,"pushed_at":"2025-11-29T16:31:30.000Z","size":52014,"stargazers_count":1608,"open_issues_count":38,"forks_count":479,"subscribers_count":73,"default_branch":"master","last_synced_at":"2025-12-01T10:54:47.047Z","etag":null,"topics":["nominatim","openstreetmap","osm2pgsql","postgis","postgresql"],"latest_commit_sha":null,"homepage":"https://osm2pgsql.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osm2pgsql-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":"https://osm2pgsql.org/sponsors/"}},"created_at":"2010-05-01T20:08:40.000Z","updated_at":"2025-11-29T16:31:34.000Z","dependencies_parsed_at":"2022-07-17T10:16:32.469Z","dependency_job_id":"a221c383-0130-4efc-a77d-76a2323bf0ad","html_url":"https://github.com/osm2pgsql-dev/osm2pgsql","commit_stats":null,"previous_names":["osm2pgsql-dev/osm2pgsql","openstreetmap/osm2pgsql"],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/osm2pgsql-dev/osm2pgsql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osm2pgsql-dev%2Fosm2pgsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osm2pgsql-dev%2Fosm2pgsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osm2pgsql-dev%2Fosm2pgsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osm2pgsql-dev%2Fosm2pgsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osm2pgsql-dev","download_url":"https://codeload.github.com/osm2pgsql-dev/osm2pgsql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osm2pgsql-dev%2Fosm2pgsql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27776480,"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-12-17T02:00:08.291Z","response_time":55,"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":["nominatim","openstreetmap","osm2pgsql","postgis","postgresql"],"created_at":"2024-07-31T00:00:39.462Z","updated_at":"2025-12-17T03:43:55.538Z","avatar_url":"https://github.com/osm2pgsql-dev.png","language":"C++","funding_links":["https://osm2pgsql.org/sponsors/"],"categories":["C++","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++"],"sub_categories":[],"readme":"# osm2pgsql\n\nhttps://osm2pgsql.org\n\nosm2pgsql is a tool for loading OpenStreetMap data into a PostgreSQL / PostGIS\ndatabase suitable for applications like rendering into a map, geocoding with\nNominatim, or general analysis.\n\nSee the [documentation](https://osm2pgsql.org/doc/) for instructions on how\nto install and run osm2pgsql.\n\n[![Github Actions Build Status](https://github.com/osm2pgsql-dev/osm2pgsql/workflows/CI/badge.svg)](https://github.com/osm2pgsql-dev/osm2pgsql/actions)\n[![Packaging Status](https://repology.org/badge/tiny-repos/osm2pgsql.svg)](https://repology.org/project/osm2pgsql/versions)\n\n## Features\n\n* freely configurable table layout and content using the LUA scripting language\n* support for building geometries in simple feature format and for generalization\n* read OSM data from OSM, PBF and O5M formats\n* update the database from OSM change files and replication diffs\n* usable for importing a small geographic area on a tiny laptop up to\n  importing the whole world on a large server machine\n* runs on Linux, Windows and MacOS\n* [and more](https://osm2pgsql.org/about/features/)\n\n## Installing\n\n* __Linux__: most distributions include osm2pgsql. Debian always offers\n  the latest version via backports.\n* __macOS__: osm2pgsql is available through [Homebrew](https://brew.sh/)\n* __Windows__: use our [binary builds](https://osm2pgsql.org/download/windows/)\n\nFor detailed instructions, visit\nthe [Installation page](https://osm2pgsql.org/doc/install.html).\n\n## Building\n\nThe latest source code is available in the osm2pgsql git repository on GitHub\nand can be downloaded as follows:\n\n```sh\ngit clone https://github.com/osm2pgsql-dev/osm2pgsql.git\n```\n\nosm2pgsql uses the cross-platform [CMake build system](https://cmake.org/)\nto configure and build itself.\n\nRequired libraries are\n\n* [CLI11](https://github.com/CLIUtils/CLI11)\n* [expat](https://libexpat.github.io/)\n* [proj](https://proj.org/)\n* [bzip2](http://www.bzip.org/)\n* [zlib](https://www.zlib.net/)\n* [Boost libraries](https://www.boost.org/) (for boost geometry)\n* [nlohmann/json](https://json.nlohmann.me/)\n* [PostgreSQL](https://www.postgresql.org/) client library\n* [Lua](https://www.lua.org/)\n* [OpenCV](https://opencv.org/) (optional, for generalization only)\n* [potrace](https://potrace.sourceforge.net/) (optional, for generalization only)\n* [Python](https://python.org/) (only for running tests)\n* [Psycopg](https://www.psycopg.org/) (only for running tests)\n\nThe following libraries are included in the `contrib` directory. You can build\nwith other versions of those libraries (set the `EXTERNAL_*libname*` CMake\noption to `ON`) but make sure you are using a compatible version:\n\n* [fmt](https://fmt.dev/) (\u003e= 7.1.3)\n* [libosmium](https://osmcode.org/libosmium/) (\u003e= 2.17.0)\n* [protozero](https://github.com/mapbox/protozero) (\u003e= 1.6.3)\n\nIt also requires access to a database server running\n[PostgreSQL](https://www.postgresql.org/) (version 11+ works, 13+ strongly\nrecommended) and [PostGIS](https://www.postgis.net/) (version 3.0+).\n\nMake sure you have installed the development packages for the libraries\nmentioned in the requirements section and a C++ compiler which supports C++17.\nWe officially support gcc \u003e= 10.0 and clang \u003e= 13.\n\nTo rebuild the included man page you need the [pandoc](https://pandoc.org/)\ntool.\n\nFirst install the dependencies.\n\nOn a Debian or Ubuntu system, this can be done with:\n\n```sh\nsudo apt-get install make cmake g++ libboost-dev \\\n  libexpat1-dev zlib1g-dev libpotrace-dev \\\n  libopencv-dev libbz2-dev libpq-dev libproj-dev lua5.3 liblua5.3-dev \\\n  pandoc nlohmann-json3-dev pyosmium\n```\n\nOn a Fedora system, use\n\n```sh\nsudo dnf install cmake make gcc-c++ libtool boost-devel bzip2-devel \\\n  expat-devel fmt-devel json-devel libpq-devel lua-devel zlib-devel \\\n  potrace-devel opencv-devel python3-osmium \\\n  postgresql-devel proj-devel proj-epsg pandoc\n```\n\nOn RedHat / CentOS first run `sudo yum install epel-release` then install\ndependencies with:\n\n```sh\nsudo yum install cmake make gcc-c++ boost-devel expat-devel zlib-devel \\\n  potrace-devel opencv-devel json-devel python3-osmium \\\n  bzip2-devel postgresql-devel proj-devel proj-epsg lua-devel pandoc\n```\n\nOn a FreeBSD system, use\n\n```sh\npkg install devel/cmake devel/boost-libs textproc/expat2 \\\n  databases/postgresql94-client graphics/proj lang/lua52\n```\n\nOn Alpine, use\n\n```sh\napk --update-cache add cmake make g++ nlohmann-json \\\n  postgresql-dev boost-dev expat-dev bzip2-dev zlib-dev \\\n  libpq proj-dev lua5.3-dev luajit-dev\n```\n\nOnce dependencies are installed, use CMake to build the Makefiles in a separate\nfolder:\n\n```sh\nmkdir build \u0026\u0026 cd build\ncmake ..\n```\n\nIf some installed dependencies are not found by CMake, more options may need\nto be set. Typically, setting `CMAKE_PREFIX_PATH` to a list of appropriate\npaths is sufficient.\n\nWhen the Makefiles have been successfully built, compile with\n\n```sh\nmake\n```\n\nThe man page can be rebuilt with:\n\n```sh\nmake man\n```\n\nThe compiled files can be installed with\n\n```sh\nsudo make install\n```\n\nBy default, a Release build with debug info is created and tests are\ndisabled. You can change that behavior by using additional options like\nfollowing:\n\n```sh\ncmake .. -G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON\n```\n\nNote that `Debug` builds will be much slower than release build. For production\n`Release` or `RelWithDebInfo` builds are recommended.\n\n### Using the PROJ library\n\nosm2pgsql has builtin support for the Latlong (WGS84, EPSG:4326) and the\nWebMercator (EPSG:3857) projection. Other projections are supported through\nthe [Proj library](https://proj.org/). Support will be automatically compiled\nin, when CMake can find the library in the system. Set the CMake\noption `WITH_PROJ` to `OFF` to disable use of that library.\n\n### Using LuaJIT\n\nTo speed up Lua tag transformations, [LuaJIT](https://luajit.org/) can be\noptionally enabled on supported platforms. This can speed up processing\nconsiderably.\n\nOn a Debian or Ubuntu system install the LuaJIT library:\n\n```sh\nsudo apt-get install libluajit-5.1-dev\n```\n\nConfiguration parameter `WITH_LUAJIT=ON` needs to be added to enable LuaJIT.\nOtherwise make and installation steps are identical to the description above.\n\n```sh\ncmake -D WITH_LUAJIT=ON ..\n```\n\nUse `osm2pgsql --version` to verify that the build includes LuaJIT support.\nThe output should show something like\n\n```\nLua 5.1.4 (LuaJIT 2.1.0-beta3)\n```\n\n## Generalization\n\nThere is some experimental support for data generalization. See\nhttps://osm2pgsql.org/generalization/ for details.\n\n## Help/Support\n\nIf you have problems with osm2pgsql or want to report a bug, go to\nhttps://osm2pgsql.org/support/ .\n\n## License\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\n## Maintainers\n\nThe current maintainers of osm2pgsql are [Sarah Hoffmann](https://github.com/lonvia/),\n[Paul Norman](https://github.com/pnorman/) and\n[Jochen Topf](https://github.com/joto).\n\n## Contributing\n\nWe welcome contributions to osm2pgsql. See [CONTRIBUTING.md](CONTRIBUTING.md)\nand https://osm2pgsql.org/contribute/ for information on how to contribute.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosm2pgsql-dev%2Fosm2pgsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosm2pgsql-dev%2Fosm2pgsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosm2pgsql-dev%2Fosm2pgsql/lists"}