Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Generalize functionality #95

Open
josephyannkaewang opened this issue Feb 8, 2016 · 5 comments
Open

Provide Generalize functionality #95

josephyannkaewang opened this issue Feb 8, 2016 · 5 comments

Comments

@josephyannkaewang
Copy link

To speed up geo query, it will be nice if there is a way to check if the shape is simple and provide a way to convert a shape to its simplified version.

@randallwhitman
Copy link
Contributor

Are you using Hive or custom Java MapReduce?
The Geometry API has Simplify methods.

@josephyannkaewang
Copy link
Author

I've tried

OGCGeometry ogcGeom = OGCGeometry.fromGeoJson(json);
if (ogcGeom != null) {
Geometry geometry = ogcGeom.getEsriGeometry();
SpatialReference spatialReference = ogcGeom.getEsriSpatialReference();
Geometry simpleGeometry = GeometryEngine.simplify(geometry,
spatialReference);
if (simpleGeometry != null && spatialReference != null) {
OGCGeometry ogcGeom2 =
OGCGeometry.createFromEsriGeometry(simpleGeometry, spatialReference);
return GeometryUtils.geometryToEsriShapeBytesWritable(ogcGeom2);
}
}

GeometryEngine.simplify doesn't seem to take a parameter for
specifying how much to simplify it by.

On Mon, Feb 8, 2016 at 2:02 PM, Randall Whitman notifications@github.com
wrote:

Are you using Hive or custom Java MapReduce?
The Geometry API has Simplify methods
https://github.com/Esri/geometry-api-java/wiki#validation.


Reply to this email directly or view it on GitHub
#95 (comment)
.

@randallwhitman
Copy link
Contributor

Oh, the other meaning of Simplify, not in the sense of ST-IsSimple.
Better to move the issue to Geometry API.

@randallwhitman
Copy link
Contributor

In the geometry API, the requested operation is called Generalize.

@randallwhitman randallwhitman changed the title Provide Simplify functionality Provide Generalize functionality Jun 21, 2016
@randallwhitman
Copy link
Contributor

This is Open-Source and accepts contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants