## repast-interest

 [Repast-interest] Boundaries of Space and Grid Projections are not aligned correctly in Display From: Brian M. Wood - 2013-01-27 05:18:32 ```Dear RePast users, I am developing a model based on the JZombies package used in the getting started java guide. Everything is going well logic-wise, but a problem arises when I wish to display both the Space projection and the Grid projection in one display. The problem is that the boundaries of the grid and the bounding box of the space display are not aligned on top of one another, but offset by 0.5 units. I link to an images showing the display problem is below: https://mega.co.nz/#!0pYG3bqY!OvA6FRwiY0XpiZM7EJB7rlOeTYNZltj3wPwLRUI6Xig I will excerpt code below that might be contributing to the problem. I would really appreciate anyone's help who can help me find out how to make the space boundary and the Grid boundary overlay one another, so that all the agents in the space are seen within the confines of the grid cells, which cleanly divide the space projection. First, this is the code in my ContextBuilder-implementing class that instantiating the Space and Grid projections: ContinuousSpaceFactory spaceFactory = ContinuousSpaceFactoryFinder.createContinuousSpaceFactory(null); ContinuousSpace
 Re: [Repast-interest] Boundaries of Space and Grid Projections are not aligned correctly in Display From: Ozik, Jonathan - 2013-01-27 19:20:10 ```Brian, This is an origin issue. Continuous spaces have their origins at 0,0 by default, which is at the bottom left side of the space. Grids have discrete dimensions so the (0, 0) grid is the bottom left-most grid. If the two spaces are overlapped, the center of the (0, 0) grid is at (+0.5, +0.5) in the continuous space, which is what you're seeing. If you specify the dimensions and origin information for the continuous space like so: ContinuousSpace
 Re: [Repast-interest] Boundaries of Space and Grid Projections are not aligned correctly in Display From: Brian M. Wood - 2013-01-28 03:55:04 ```Dear Jonathan, Thanks for your insightful help. You are definitely correct that this is an origins problem, however, your suggested remedy unfortunately didn't solve the problem. I followed your suggestion of changing how the origin of the space projection is specified, to > ContinuousSpace
 Re: [Repast-interest] Boundaries of Space and Grid Projections are not aligned correctly in Display From: Ozik, Jonathan - 2013-01-28 20:57:59 ```Brian, I was able to verify what you're observing. I believe you've uncovered a bug. We're looking into the issue. I'm also curious about your use case. I find myself visualizing either the continuous space or the grid in models which contain both, especially since the mapping of locations between the two spaces is up to the user (unless you're using ReLogo). If you don't mind sharing, what type of visualization are you attempting to show that requires both concurrently? Jonathan On Jan 27, 2013, at 9:54 PM, Brian M. Wood wrote: > Dear Jonathan, > > Thanks for your insightful help. You are definitely correct that this > is an origins problem, however, your suggested remedy unfortunately > didn't solve the problem. I followed your suggestion of changing how > the origin of the space projection is specified, to > >> ContinuousSpace
 Re: [Repast-interest] Boundaries of Space and Grid Projections are not aligned correctly in Display From: - 2014-03-10 17:04:45 ```Jonathan, Do you know if the bug relating to the misalignment of grid and continuous space visual has been resolved? I am interests as i am placing a value layer over a continuous space with squares that the agents must not enter but am experiencing the same (0.5, 0.5) misalignment at Brian, Thanks, Andy Collins VMASC -- View this message in context: http://repast.10935.n7.nabble.com/Boundaries-of-Space-and-Grid-Projections-are-not-aligned-correctly-in-Display-tp8914p10049.html Sent from the repast-interest mailing list archive at Nabble.com. ```
 Re: [Repast-interest] Boundaries of Space and Grid Projections are not aligned correctly in Display From: Ozik, Jonathan - 2014-03-10 19:35:26 Attachments: Message as HTML     ValueLayerDisplayLayer.class