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

How to ask questions? #145

Open
julianhyde opened this issue Aug 25, 2017 · 13 comments
Open

How to ask questions? #145

julianhyde opened this issue Aug 25, 2017 · 13 comments
Labels

Comments

@julianhyde
Copy link

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.

@alocke
Copy link
Member

alocke commented Aug 25, 2017

Feel free to ask questions right here.

@julianhyde
Copy link
Author

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.

  1. Does GeometryEngine.geometryFromWkt support 3D? I get a parse error when parsing say "POINT(1 2 3)"; it expects to see ')' after '2'.

  2. Is there a way to include SRIDs in geometries? If so, how should I go about implementing ST_Transform?

  3. I notice that ESRI's union(point(1 2)) returns a MULTIPOINT, whereas PostGIS returns a POINT. Are both correct?

  4. 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
Copy link
Member

alocke commented Aug 25, 2017

  1. Yes. Use "POINT Z (1 2 3)".
  2. (Edited) Yes, a MapGeometry includes the spatial reference.
  3. Yes, both are correct.
  4. (Edited) That's right. Style is not supported.

Thanks for your interest. Looking forward to more questions and/or feedback.

@julianhyde
Copy link
Author

  1. Thanks - that worked.

  2. That worked too. I created a wrapper interface because neither Geometry nor MapGeometry is a sub-class of each other.

  3. Thanks. Will document in case people expecting PostGIS compatibility are surprised.

  4. 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
Copy link
Member

alocke commented Aug 28, 2017

Sorry, I was wrong. OperatorGraphicBuffer isn't supported.

@julianhyde
Copy link
Author

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.

  1. 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!)

  2. You should consider adding a GeometryEngine.intersects method. OperatorIntersects works just fine, but unlike say OperatorWithin it didn't have a facade method.

  3. Is there a way to parse GEOMETRYCOLLECTION? GeometryEngine.geometryFromWkt doesn't seem to support it.

@stolstov
Copy link
Member

  1. 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.

  2. Use operators. They are a part of the public API. You can chain them if you use GeometryCursor methods.

  3. OGCGeometry classes may provide some rudimentary support. You should be able to import geometry collection using those.

@julianhyde
Copy link
Author

  1. No it's not "*****FF". It's a combination of 4 such patterns. I wasn't brave enough to do something so complicated.

  2. Yes, figured out how to use operators. It's just inconsistent that GeometryEngine has within, touches, overlaps, equals, crosses, disjoint, contains but not intersects.

  3. Thanks - will try that.

@stolstov
Copy link
Member

stolstov commented Aug 29, 2017

Should be "*****FF *". Try this though. I cannot think of a case it violates for non-empty inputs.

@stolstov
Copy link
Member

It keeps removing the last star...

@randallwhitman
Copy link
Contributor

No doubt markdown tries to interpret asterix as emphasis.

@stolstov
Copy link
Member

Note, I've added a space to workaround the removing the star character. The string should not contain any spaces.

@alocke
Copy link
Member

alocke commented Aug 29, 2017

Write it as code with backtick.
"******FF*"

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

No branches or pull requests

4 participants