[OpenLayers-Users] offset polygon
Stephen Woodbridge
woodbri at swoodbridge.com
Fri May 4 17:02:08 EDT 2012
Steve,
I'm a little rusty on my OL js, but it looks most geometry objects have
a resize() method. If you have an object and you want to make another
that is larger or smaller, then clone() it and resize() the clone.
I have not tried this, just guessing at the moment. Maybe one of the
devs can comment on this.
-Steve
On 5/4/2012 3:48 PM, Steve Nelson wrote:
> I see what you mean. For this project, true offset isn't important.
> Resizing is perfect. Is there a built in function for resizing?
>
> Steve
>
> On Fri, May 4, 2012 at 2:10 PM, Stephen Woodbridge
> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>> wrote:
>
> On 5/4/2012 11:26 AM, Steve Nelson wrote:
>
> Does anyone have a function that can create an offset polygon?
>
> In other words, if I have a polygon made up of 5 points have the
> same
> polygon shape, just a larger size?
>
>
> Hi Steve,
>
> These are not the same thing.
>
> If you want the same shape only larger then you are looking a scale.
> If you want and offset, this is MUCH more complicated because you
> have to deal with changes in topology, like if you have a small V
> shape then you offset might cause these to be removed like:
>
> ----------------- offset
>
> ------\ /------- curve
> \/
>
> or if your polygon has a hole then an offset could result in a
> smaller hole or with the hole getting filled in and removed. There
> are many cases like this. These are just a couple of examples to
> give you the idea.
>
> So what DO you need? Resizing via scale is easy, True offset is hard!
>
> -Steve W
> ______________________________ _________________
> Users mailing list
> Users at lists.osgeo.org <mailto:Users at lists.osgeo.org>
> http://lists.osgeo.org/ mailman/listinfo/openlayers- users
> <http://lists.osgeo.org/mailman/listinfo/openlayers-users>
>
>
More information about the Users
mailing list