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

Better documentation and testing regarding how shapes which cross the dateline are handled #335

Open
chrisbennight opened this issue Apr 12, 2015 · 2 comments

Comments

@chrisbennight
Copy link
Contributor

Need to document this (preferably with some nice graphics) - since it's an area of confusion.

We also need to add in some test cases that explicitly check for this to make sure our documentation matches what is happening.

@chrisbennight chrisbennight added this to the Current milestone Apr 12, 2015
@chrisbennight
Copy link
Contributor Author

Specs on how latitudes greater than 90 / less than -90 and longitudes which cross the dateline should be handled.

  • Latitudes
    • epsilon is a factor to handle fuzzy precision of floating point values. I think we use 1E-12 in other places.
    • Latitudes values outside the range of (-90 - epsilon) and (90 + epsilon) will not be accepted in geowave indexing (exception will be thrown - we don't want to ingest/store values we consider out of spec)
    • These values can be handled prior to indexing if a particular data set has a convention on using them / what they mean. (see below for handling (i.e. outside of geowave-index))
  • Longitudes
    • Longitude values outside the range of (-180 -epsilon) and (180 + epsilon) will not be accepted in geowave indexing (exception will be thrown)
    • Values outside the range (dateline crossing, etc.) will be handled outside of geowave-index (see below for handling)
  • Handling
    • Two places have been identified that need to implement the "outside the cartesian plane" handling described above. More may be identified at a later date, and should implement the same logic.
      • Query: Query ranges, geometries, etc. which include values outside of the cartesian plane will need to be "normalized" to being within the cartesian plane.
      • Ingest: Geometries being ingested which contain values outside the cartesian plane will need to be decomposed as well.
    • Geometries which cross the date line will be broken down into a multi-geometry (of the appropriate type), and stored at multiple index locations (with the serialized value being the full multi-geometry).
    • The number of times that the cartesian plane is "wrapped" (i.e. -500 to +500) is not relevant; we just need to define the portion of the plane intersected by the query (one or 100 "wrappings", for instance, would effectively become -180 to +180)
    • ToDo: Generate Graphic

@datasedai datasedai changed the title Better documentation and testing regarding how shaped which cross the dateline are handled Better documentation and testing regarding how shapes which cross the dateline are handled Mar 29, 2016
@rfecher
Copy link
Contributor

rfecher commented Mar 29, 2016

we always assume that latitude is clamped to -90, 90 and longitude follows so:

        final double offsetLon = lon + 180;
        return (((Math.ceil(Math.abs(offsetLon) / 360) * 360) + offsetLon) % 360) - 180;

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

3 participants