Skip to content

Conversation

@wallw-dev
Copy link
Contributor

@wallw-dev wallw-dev commented May 31, 2019

Adds support for polar polygons by splitting them by the meridian plane for display/query in 2D. Additionally, queries for OGC servers such as GeoServer are now split over the antimeridian in the event that the remote server does not allow coordinates outside of the longitudes [-180, 180].

resolves #540, #579

Test:

  • Draw polygons that contain or pass near the poles (tip: create a pole place by manually entering the coordinates) in 3D (try both EPSG:4326 and EPSG:3857) and verify that they display properly in 2D
  • Import some similar polygons and verify that the behavior is the same
  • Draw a polygon (not a box/rectangle) over the antimeridian with a GeoServer WFS layer on. Verify that it splits the polygon over the antimeridian and does not return an error about longitudes outside of [-180, 180].

Adds support for polar polygons by splitting them by the meridian

plane for display/query in 2D. Additionally, queries for OGC servers

such as GeoServer are now split over the antimeridian in the event

that the remote server does not allow coordinates outside of the

longitudes [-180, 180].

resolves ngageoint#540, ngageoint#579
@wallw-dev wallw-dev requested review from jsalankey and schmidtk May 31, 2019 20:53
"proj4": "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs",
"title": "NSIDC Sea Ice Polar Stereographic North"
}
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not positive we want to include these. I hardcode the proj4 defs later on so that the polar split function can work even if they are not provided here (and they won't show up in the UI).

@wallw-dev
Copy link
Contributor Author

Ah, that test failure reminds me: JSTS, when splitting/polygonizing, does not linearly interpolate the altitude between the two points. Do we want to do that?

@wallw-dev wallw-dev changed the title feat: add polar polygon support WIP: feat: add polar polygon support Jun 3, 2019
bradh pushed a commit to bradh/opensphere that referenced this pull request Jun 6, 2019
…here:THIN-12559 to master

* commit 'd5322dd24c94ba4d9eff16b59b2eb5438bd4c159':
  fix(punyparent): fixed glitchyness
  fix(punyparent): fixed puny parent to debounce on change
@wallw-dev wallw-dev changed the title WIP: feat: add polar polygon support feat: add polar polygon support Jul 18, 2019
@wallw-dev
Copy link
Contributor Author

This algorithm does not work well for large polygons due to the stereographic projections. I'm considering adapting Cesium's approach of splitting the polygon by the meridian plane in 3D Cartesian space.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polar polygon support

2 participants