{"action":"created","issue":{"url":"https://api.github.com/repos/openstreetmap/osm2pgsql/issues/121","labels_url":"https://api.github.com/repos/openstreetmap/osm2pgsql/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/openstreetmap/osm2pgsql/issues/121/comments","events_url":"https://api.github.com/repos/openstreetmap/osm2pgsql/issues/121/events","html_url":"https://github.com/openstreetmap/osm2pgsql/issues/121","id":27710742,"number":121,"title":"Broken geometries with -E 4326 projection.","user":{"login":"AnderPijoan","id":1140190,"avatar_url":"https://avatars.githubusercontent.com/u/1140190?v=3","gravatar_id":"","url":"https://api.github.com/users/AnderPijoan","html_url":"https://github.com/AnderPijoan","followers_url":"https://api.github.com/users/AnderPijoan/followers","following_url":"https://api.github.com/users/AnderPijoan/following{/other_user}","gists_url":"https://api.github.com/users/AnderPijoan/gists{/gist_id}","starred_url":"https://api.github.com/users/AnderPijoan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnderPijoan/subscriptions","organizations_url":"https://api.github.com/users/AnderPijoan/orgs","repos_url":"https://api.github.com/users/AnderPijoan/repos","events_url":"https://api.github.com/users/AnderPijoan/events{/privacy}","received_events_url":"https://api.github.com/users/AnderPijoan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-02-17T12:13:51Z","updated_at":"2015-07-05T07:36:41Z","closed_at":null,"body":"Hi, I am using osm2pgsql but I want to import data in EPSG:4326 projection. Therefore, I use the -E 4326 flag. However I get all geometries broken and converted to a big square.\r\n\r\nosm2pgsql -c -s -d app -U user -W -H localhost -P 5432 -E 4326 file.osm\r\n\r\nI think this is due to having planet_osm_nodes lat / lon columns as integer, which truncates lat / lon decimals and so geometries get wrong coordinates.\r\n\r\nAm I doing something wrong? Thanks in advance."},"comment":{"url":"https://api.github.com/repos/openstreetmap/osm2pgsql/issues/comments/118591313","html_url":"https://github.com/openstreetmap/osm2pgsql/issues/121#issuecomment-118591313","issue_url":"https://api.github.com/repos/openstreetmap/osm2pgsql/issues/121","id":118591313,"user":{"login":"pnorman","id":1190866,"avatar_url":"https://avatars.githubusercontent.com/u/1190866?v=3","gravatar_id":"","url":"https://api.github.com/users/pnorman","html_url":"https://github.com/pnorman","followers_url":"https://api.github.com/users/pnorman/followers","following_url":"https://api.github.com/users/pnorman/following{/other_user}","gists_url":"https://api.github.com/users/pnorman/gists{/gist_id}","starred_url":"https://api.github.com/users/pnorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnorman/subscriptions","organizations_url":"https://api.github.com/users/pnorman/orgs","repos_url":"https://api.github.com/users/pnorman/repos","events_url":"https://api.github.com/users/pnorman/events{/privacy}","received_events_url":"https://api.github.com/users/pnorman/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T07:36:41Z","updated_at":"2015-07-05T07:36:41Z","body":"The options parser does `options.scale = (options.projection->get_proj_id() == PROJ_LATLONG) ? 10000000 : 100;`\r\n\r\nThis means that specifying `-l` will switch the scale multiplier to one appropriate for degrees, but `-E` will not. This also holds true if using NAD83 or similar, where you'd have the same problems as WGS84"}}