How does one import OpenStreetMap-Carto geometries using WGS-84?

I’m new to using OSM and styling.

I found the github: GitHub - gravitystorm/openstreetmap-carto: A general-purpose OpenStreetMap mapnik style, in CartoCSS

I imported some data using: osm2pgsql -U postgres -c -s planet-250120.osm.pbf -O flex -S /home/joshuar/openstreetmap-carto/openstreetmap-carto-flex.lua --output-pgsql-schema=earth --number-processes=8 -C 65535 --latlong

But the geometries use the web mercator projection EPSG:3857. Is there a way to maintain the geometries in latitude/longitude, using the original WGS-84 coordinates? I’d like to experiment with my own projection (it’s a dymaxion map using gnomonic projections on the faces of icosahedron), but I’d like to use a stylesheet, since defining all the details and at different zoom levels by myself sounds like a lot.

I’m not exactly married to using that particular style, if for whatever reason it’s specifically difficult to do. Are there other stylesheets that would be appropriate if not OpenStreetMap-Carto?

I tried editing the project.mml file and openstreetmap-carto-flex.lua files, but that didn’t seem to change the outcome. I tried importing in Mercator and then reprojecting back to WGS-84, and that kinda worked, but I suspect that there’s some sort of “capping” that goes on at very high latitudes, where all the points above some threshold just get capped to a maximum values, and so I get a straight line along some latitude.

I suspect it might be more difficult than I imagine because the import itself relies on the Mercator projection. References to meters, areas, lengths, zoom-levels, filters, positioning, etc – they’re assuming a Mercator projection. (I think, Idk what I’m talking about!).

If you have any ideas on how I can re-use a styling but using my own projection, that’d be really helpful! I imagine there are ways to achieve it, but I am not familiar with the methods.

Thanks for reading!

Some information about projections with osm2pgsql is in the manual. The command line options are documented here. See also this Antarctica map example.

So using a different projection when importing the data is easy, but, as you noticed, styling is a different issue, you’ll have to experiment.