geometry-api-java
geometry-api-java copied to clipboard
How to ask questions?
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.
Feel free to ask questions right here.
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. :)
- Yes. Use "POINT Z (1 2 3)".
- (Edited) Yes, a MapGeometry includes the spatial reference.
- Yes, both are correct.
- (Edited) That's right. Style is not supported.
Thanks for your interest. Looking forward to more questions and/or feedback.
-
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?
Sorry, I was wrong. OperatorGraphicBuffer isn't supported.
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 sayOperatorWithin
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
haswithin
,touches
,overlaps
,equals
,crosses
,disjoint
,contains
but notintersects
. -
Thanks - will try that.
Should be "*****FF *". Try this though. I cannot think of a case it violates for non-empty inputs.
It keeps removing the last star...
No doubt markdown tries to interpret asterix as emphasis.
Note, I've added a space to workaround the removing the star character. The string should not contain any spaces.
Write it as code with backtick.
"******FF*"