Can I eliminate the redundant points after running GeometryService.simplify?

752
2
Jump to solution
08-04-2014 03:26 AM
StephenLam
Deactivated User

I am trying to implement a buffer zone search, after I read this, using GeometryService.simplify

gsvc.simplify([evt.geometry], function (geometries) {

      params.geometries = geometries;

      gsvc.buffer(params, showBuffer);

});

I successfully get a buffered geometry, say rectangle, however the returned geometry has a lot of vertex at the corners, so it is inconvenient to modify the shape...Is it possible to just get a "4 points rectangle" with buffered size? Thanks.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Stephen,

  Simplify takes care of counter clockwise polygon orientation and polygon self-intersecting, etc. I think what you want is the GeometryService.Generalize

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Stephen,

  Simplify takes care of counter clockwise polygon orientation and polygon self-intersecting, etc. I think what you want is the GeometryService.Generalize

0 Kudos
RiyasDeen
Frequent Contributor

Hi Stephen,

1. One option is to get envelope of the buffer geometry, this will always be a 4 point rectangle.

2. If you are looking for a minimum bounding rectangle then you may want to create a geoprocessing service using minimum bounding geometry tool. Refer below links on how to go about it.

Untitled.png

Minimum bounding geometry task - ArcGIS Desktop

Publishing geoprocessing service - ArcGIS Help 10.1

0 Kudos