{"action":"created","issue":{"url":"https://api.github.com/repos/GeoNode/geonode/issues/3109","repository_url":"https://api.github.com/repos/GeoNode/geonode","labels_url":"https://api.github.com/repos/GeoNode/geonode/issues/3109/labels{/name}","comments_url":"https://api.github.com/repos/GeoNode/geonode/issues/3109/comments","events_url":"https://api.github.com/repos/GeoNode/geonode/issues/3109/events","html_url":"https://github.com/GeoNode/geonode/issues/3109","id":233901891,"number":3109,"title":"BBOX calculation in maps/models.py","user":{"login":"lucernae","id":831865,"avatar_url":"https://avatars1.githubusercontent.com/u/831865?v=3","gravatar_id":"","url":"https://api.github.com/users/lucernae","html_url":"https://github.com/lucernae","followers_url":"https://api.github.com/users/lucernae/followers","following_url":"https://api.github.com/users/lucernae/following{/other_user}","gists_url":"https://api.github.com/users/lucernae/gists{/gist_id}","starred_url":"https://api.github.com/users/lucernae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucernae/subscriptions","organizations_url":"https://api.github.com/users/lucernae/orgs","repos_url":"https://api.github.com/users/lucernae/repos","events_url":"https://api.github.com/users/lucernae/events{/privacy}","received_events_url":"https://api.github.com/users/lucernae/received_events","type":"User","site_admin":false},"labels":[{"id":7008261,"url":"https://api.github.com/repos/GeoNode/geonode/labels/bug","name":"bug","color":"ec6427","default":true},{"id":10012740,"url":"https://api.github.com/repos/GeoNode/geonode/labels/critical","name":"critical","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":{"login":"afabiani","id":1278021,"avatar_url":"https://avatars2.githubusercontent.com/u/1278021?v=3","gravatar_id":"","url":"https://api.github.com/users/afabiani","html_url":"https://github.com/afabiani","followers_url":"https://api.github.com/users/afabiani/followers","following_url":"https://api.github.com/users/afabiani/following{/other_user}","gists_url":"https://api.github.com/users/afabiani/gists{/gist_id}","starred_url":"https://api.github.com/users/afabiani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afabiani/subscriptions","organizations_url":"https://api.github.com/users/afabiani/orgs","repos_url":"https://api.github.com/users/afabiani/repos","events_url":"https://api.github.com/users/afabiani/events{/privacy}","received_events_url":"https://api.github.com/users/afabiani/received_events","type":"User","site_admin":false},"assignees":[{"login":"afabiani","id":1278021,"avatar_url":"https://avatars2.githubusercontent.com/u/1278021?v=3","gravatar_id":"","url":"https://api.github.com/users/afabiani","html_url":"https://github.com/afabiani","followers_url":"https://api.github.com/users/afabiani/followers","following_url":"https://api.github.com/users/afabiani/following{/other_user}","gists_url":"https://api.github.com/users/afabiani/gists{/gist_id}","starred_url":"https://api.github.com/users/afabiani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afabiani/subscriptions","organizations_url":"https://api.github.com/users/afabiani/orgs","repos_url":"https://api.github.com/users/afabiani/repos","events_url":"https://api.github.com/users/afabiani/events{/privacy}","received_events_url":"https://api.github.com/users/afabiani/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2017-06-06T14:00:59Z","updated_at":"2017-07-03T14:19:07Z","closed_at":null,"body":"Hi, I just wanted to confirm something, about bbox format in geonode.\r\n\r\nI saw it in the code here:\r\nhttps://github.com/GeoNode/geonode/blob/master/geonode/maps/models.py#L228\r\n\r\nThere are bbox calculations involved to get the largest bbox from several layers, however this part here:\r\n\r\n```\r\n                bbox[0] = min(bbox[0], layer_bbox[0])\r\n                bbox[1] = max(bbox[1], layer_bbox[1])\r\n                bbox[2] = min(bbox[2], layer_bbox[2])\r\n                bbox[3] = max(bbox[3], layer_bbox[3])\r\n```\r\n\r\nSeems to assume that bbox is in the format [xmin,xmax,ymin,ymax]. But, if you look at the Layers models, bbox property is taken from ResourceBase, and if you look at the ResourceBase: bbox is defined as:\r\n\r\n```\r\n@property\r\n    def bbox(self):\r\n        return [self.bbox_x0, self.bbox_y0, self.bbox_x1, self.bbox_y1, self.srid]\r\n```\r\n\r\nI don't know if x0,y0 is bottom left or top left. If it is top left, then the previous bbox calculation makes sense. But I also found in ResourceBase, the following method:\r\n\r\n```\r\n   def set_latlon_bounds(self, box):\r\n        \"\"\"\r\n        Set the four bounds in lat lon projection\r\n        \"\"\"\r\n        self.bbox_x0 = box[0]\r\n        self.bbox_x1 = box[1]\r\n        self.bbox_y0 = box[2]\r\n        self.bbox_y1 = box[3]\r\n```\r\n\r\nIt assumes that the format is [xmin,max,ymin,ymax] again?\r\nCan somebody enlighten me about this?"},"comment":{"url":"https://api.github.com/repos/GeoNode/geonode/issues/comments/312657828","html_url":"https://github.com/GeoNode/geonode/issues/3109#issuecomment-312657828","issue_url":"https://api.github.com/repos/GeoNode/geonode/issues/3109","id":312657828,"user":{"login":"afabiani","id":1278021,"avatar_url":"https://avatars2.githubusercontent.com/u/1278021?v=3","gravatar_id":"","url":"https://api.github.com/users/afabiani","html_url":"https://github.com/afabiani","followers_url":"https://api.github.com/users/afabiani/followers","following_url":"https://api.github.com/users/afabiani/following{/other_user}","gists_url":"https://api.github.com/users/afabiani/gists{/gist_id}","starred_url":"https://api.github.com/users/afabiani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afabiani/subscriptions","organizations_url":"https://api.github.com/users/afabiani/orgs","repos_url":"https://api.github.com/users/afabiani/repos","events_url":"https://api.github.com/users/afabiani/events{/privacy}","received_events_url":"https://api.github.com/users/afabiani/received_events","type":"User","site_admin":false},"created_at":"2017-07-03T14:19:07Z","updated_at":"2017-07-03T14:19:07Z","body":"Because this is how the native bbox is stored from the geospatial server."}}
{"actor":{"display_login":"afabiani"}}