You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have just started using geometry-api-java in Apache Calcite and I have some questions. Is there a forum or mailing list to ask them? The contributing guidelines don't mention one.
First of all, thanks for the library, and especially, thanks for making it Apache license.
Second, thanks for removing the json.org dependency. I'm working on Apache Calcite (see https://issues.apache.org/jira/browse/CALCITE-1968) and it was a non-starter without it. I'm developing on 1.2.1 but will have to upgrade to 2.0 before I release, due to those license issues.
Now the questions.
Does GeometryEngine.geometryFromWkt support 3D? I get a parse error when parsing say "POINT(1 2 3)"; it expects to see ')' after '2'.
Is there a way to include SRIDs in geometries? If so, how should I go about implementing ST_Transform?
I notice that ESRI's union(point(1 2)) returns a MULTIPOINT, whereas PostGIS returns a POINT. Are both correct?
Am I correct that buffer doesn't support style (endCap, join, quadSegs, mitreLimit).
That's it for now. But expect a few more as I work through this. :)
No worries - 3 out of 4 is pretty good! (I'm keeping a list of missing functionality and will log issues when I get to the end of the current spike. I may find time to fix some of them, we'll see.) Now a couple more questions.
How would you implement ST_Covers? I found ways to implement ST_Within and the similar relation operations, but not covers (and sadly, it's the hardest one!)
You should consider adding a GeometryEngine.intersects method. OperatorIntersects works just fine, but unlike say OperatorWithin it didn't have a facade method.
Is there a way to parse GEOMETRYCOLLECTION? GeometryEngine.geometryFromWkt doesn't seem to support it.
For ST_Covers, try using OperatorRelate with "*****FF". Although I am not 100% sure it is equivalent. See also here: https://en.wikipedia.org/wiki/DE-9IM.
Use operators. They are a part of the public API. You can chain them if you use GeometryCursor methods.
OGCGeometry classes may provide some rudimentary support. You should be able to import geometry collection using those.
No it's not "*****FF". It's a combination of 4 such patterns. I wasn't brave enough to do something so complicated.
Yes, figured out how to use operators. It's just inconsistent that GeometryEngine has within, touches, overlaps, equals, crosses, disjoint, contains but not intersects.
Activity
alocke commentedon Aug 25, 2017
Feel free to ask questions right here.
julianhyde commentedon Aug 25, 2017
First of all, thanks for the library, and especially, thanks for making it Apache license.
Second, thanks for removing the json.org dependency. I'm working on Apache Calcite (see https://issues.apache.org/jira/browse/CALCITE-1968) and it was a non-starter without it. I'm developing on 1.2.1 but will have to upgrade to 2.0 before I release, due to those license issues.
Now the questions.
Does GeometryEngine.geometryFromWkt support 3D? I get a parse error when parsing say "POINT(1 2 3)"; it expects to see ')' after '2'.
Is there a way to include SRIDs in geometries? If so, how should I go about implementing ST_Transform?
I notice that ESRI's union(point(1 2)) returns a MULTIPOINT, whereas PostGIS returns a POINT. Are both correct?
Am I correct that buffer doesn't support style (endCap, join, quadSegs, mitreLimit).
That's it for now. But expect a few more as I work through this. :)
alocke commentedon Aug 25, 2017
Thanks for your interest. Looking forward to more questions and/or feedback.
julianhyde commentedon Aug 28, 2017
Thanks - that worked.
That worked too. I created a wrapper interface because neither Geometry nor MapGeometry is a sub-class of each other.
Thanks. Will document in case people expecting PostGIS compatibility are surprised.
I couldn't find class OperatorGraphicBuffer, either in 1.2.1 or 2.0-SNAPSHOT. I presume it's in the com.esri.core.geometry package?
alocke commentedon Aug 28, 2017
Sorry, I was wrong. OperatorGraphicBuffer isn't supported.
julianhyde commentedon Aug 28, 2017
No worries - 3 out of 4 is pretty good! (I'm keeping a list of missing functionality and will log issues when I get to the end of the current spike. I may find time to fix some of them, we'll see.) Now a couple more questions.
How would you implement
ST_Covers? I found ways to implement ST_Within and the similar relation operations, but not covers (and sadly, it's the hardest one!)You should consider adding a
GeometryEngine.intersectsmethod.OperatorIntersectsworks just fine, but unlike sayOperatorWithinit didn't have a facade method.Is there a way to parse
GEOMETRYCOLLECTION?GeometryEngine.geometryFromWktdoesn't seem to support it.stolstov commentedon Aug 28, 2017
For ST_Covers, try using OperatorRelate with "*****FF". Although I am not 100% sure it is equivalent. See also here: https://en.wikipedia.org/wiki/DE-9IM.
Use operators. They are a part of the public API. You can chain them if you use GeometryCursor methods.
OGCGeometry classes may provide some rudimentary support. You should be able to import geometry collection using those.
julianhyde commentedon Aug 29, 2017
No it's not "*****FF". It's a combination of 4 such patterns. I wasn't brave enough to do something so complicated.
Yes, figured out how to use operators. It's just inconsistent that
GeometryEnginehaswithin,touches,overlaps,equals,crosses,disjoint,containsbut notintersects.Thanks - will try that.
stolstov commentedon Aug 29, 2017
Should be "*****FF *". Try this though. I cannot think of a case it violates for non-empty inputs.
stolstov commentedon Aug 29, 2017
It keeps removing the last star...
randallwhitman commentedon Aug 29, 2017
No doubt markdown tries to interpret asterix as emphasis.
stolstov commentedon Aug 29, 2017
Note, I've added a space to workaround the removing the star character. The string should not contain any spaces.
alocke commentedon Aug 29, 2017
Write it as code with backtick.
"******FF*"