{"action":"created","issue":{"url":"https://api.github.com/repos/d3/d3-geo/issues/149","repository_url":"https://api.github.com/repos/d3/d3-geo","labels_url":"https://api.github.com/repos/d3/d3-geo/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/d3/d3-geo/issues/149/comments","events_url":"https://api.github.com/repos/d3/d3-geo/issues/149/events","html_url":"https://github.com/d3/d3-geo/issues/149","id":368021974,"node_id":"MDU6SXNzdWUzNjgwMjE5NzQ=","number":149,"title":"weird preclip behavior","user":{"login":"esperanc","id":1062177,"node_id":"MDQ6VXNlcjEwNjIxNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1062177?v=4","gravatar_id":"","url":"https://api.github.com/users/esperanc","html_url":"https://github.com/esperanc","followers_url":"https://api.github.com/users/esperanc/followers","following_url":"https://api.github.com/users/esperanc/following{/other_user}","gists_url":"https://api.github.com/users/esperanc/gists{/gist_id}","starred_url":"https://api.github.com/users/esperanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esperanc/subscriptions","organizations_url":"https://api.github.com/users/esperanc/orgs","repos_url":"https://api.github.com/users/esperanc/repos","events_url":"https://api.github.com/users/esperanc/events{/privacy}","received_events_url":"https://api.github.com/users/esperanc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-09T02:57:54Z","updated_at":"2018-10-09T06:07:59Z","closed_at":"2018-10-09T06:07:59Z","author_association":"NONE","body":"I was adapting this [Observable notebook by F. Lederman](https://beta.observablehq.com/@floledermann/drawing-maps-from-geodata-in-d3) to handle a geojson dataset containing neighborhoods from the city of Rio de janeiro and noticed that `.preclip()`exhibited a weird behavior. Namely, it seems to think that some small regions are bigger than the whole globe. To fix it, I had to add a `.preclip (x => x)` to the definition of the projection function (see the `projection` cell in the [adapted notebook](https://beta.observablehq.com/@esperanc/limites-de-bairros-do-rio-de-janeiro)) so that the projection would work correctly. Removing the preclip from the projection definition is enough to reproduce the problem. I may be missing something, but it looks like a bug..."},"comment":{"url":"https://api.github.com/repos/d3/d3-geo/issues/comments/428071724","html_url":"https://github.com/d3/d3-geo/issues/149#issuecomment-428071724","issue_url":"https://api.github.com/repos/d3/d3-geo/issues/149","id":428071724,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODA3MTcyNA==","user":{"login":"Fil","id":7001,"node_id":"MDQ6VXNlcjcwMDE=","avatar_url":"https://avatars0.githubusercontent.com/u/7001?v=4","gravatar_id":"","url":"https://api.github.com/users/Fil","html_url":"https://github.com/Fil","followers_url":"https://api.github.com/users/Fil/followers","following_url":"https://api.github.com/users/Fil/following{/other_user}","gists_url":"https://api.github.com/users/Fil/gists{/gist_id}","starred_url":"https://api.github.com/users/Fil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fil/subscriptions","organizations_url":"https://api.github.com/users/Fil/orgs","repos_url":"https://api.github.com/users/Fil/repos","events_url":"https://api.github.com/users/Fil/events{/privacy}","received_events_url":"https://api.github.com/users/Fil/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T06:07:59Z","updated_at":"2018-10-09T06:07:59Z","author_association":"MEMBER","body":"Hello Claudio,\r\n\r\nit seems that your original file has the wrong winding order (see https://github.com/d3/d3-geo). \r\n\r\nHere's a way to fix it: https://beta.observablehq.com/d/d8f95742d2ab7d99#data ; it's a common pain point with GeoJSON, unfortunately."}}
{"actor":{"display_login":"Fil"}}