@Test public void testLatLonToProjBB() { runCenter(); runCenter(110.45454545454547); runCenter(-110.45454545454547); runCenter(0.0); runCenter(420.0); }
@Override public ProjectionRect latLonToProjBB(LatLonRect latlonRect) { double centerLon = latlonRect.getCenterLon(); LatLonPoint ll = latlonRect.getLowerLeftPoint(); LatLonPoint ur = latlonRect.getUpperRightPoint(); ProjectionPoint w1 = latLonToProj(ll, centerLon); ProjectionPoint w2 = latLonToProj(ur, centerLon); ProjectionRect.Builder world = ProjectionRect.builder(w1.getX(), w1.getY(), w2.getX(), w2.getY()); LatLonPoint la = LatLonPoint.create(ur.getLatitude(), ll.getLongitude()); LatLonPoint lb = LatLonPoint.create(ll.getLatitude(), ur.getLongitude()); world.add(latLonToProj(la, centerLon)); world.add(latLonToProj(lb, centerLon)); return world.build(); }
LatLonProjection extends AbstractProjection { @Override public ProjectionRect latLonToProjBB(LatLonRect latlonRect) { double centerLon = latlonRect.getCenterLon(); LatLonPoint ll = latlonRect.getLowerLeftPoint(); LatLonPoint ur = latlonRect.getUpperRightPoint(); ProjectionPoint w1 = latLonToProj(ll, centerLon); ProjectionPoint w2 = latLonToProj(ur, centerLon); ProjectionRect.Builder world = ProjectionRect.builder(w1.getX(), w1.getY(), w2.getX(), w2.getY()); LatLonPoint la = LatLonPoint.create(ur.getLatitude(), ll.getLongitude()); LatLonPoint lb = LatLonPoint.create(ll.getLatitude(), ur.getLongitude()); world.add(latLonToProj(la, centerLon)); world.add(latLonToProj(lb, centerLon)); return world.build(); } }
LatLonProjection extends AbstractProjection { @Override public ProjectionRect latLonToProjBB(LatLonRect latlonRect) { double centerLon = latlonRect.getCenterLon(); LatLonPoint ll = latlonRect.getLowerLeftPoint(); LatLonPoint ur = latlonRect.getUpperRightPoint(); ProjectionPoint w1 = latLonToProj(ll, centerLon); ProjectionPoint w2 = latLonToProj(ur, centerLon); ProjectionRect.Builder world = ProjectionRect.builder(w1.getX(), w1.getY(), w2.getX(), w2.getY()); LatLonPoint la = LatLonPoint.create(ur.getLatitude(), ll.getLongitude()); LatLonPoint lb = LatLonPoint.create(ll.getLatitude(), ur.getLongitude()); world.add(latLonToProj(la, centerLon)); world.add(latLonToProj(lb, centerLon)); return world.build(); } LatLonProjection();  LatLonProjection(String name);  LatLonProjection(Earth earth);  LatLonProjection(String name, @Nullable Earth earth, double centerLon); }
LatLonProjection extends AbstractProjection { @Override public ProjectionRect latLonToProjBB(LatLonRect latlonRect) { double centerLon = latlonRect.getCenterLon(); LatLonPoint ll = latlonRect.getLowerLeftPoint(); LatLonPoint ur = latlonRect.getUpperRightPoint(); ProjectionPoint w1 = latLonToProj(ll, centerLon); ProjectionPoint w2 = latLonToProj(ur, centerLon); ProjectionRect.Builder world = ProjectionRect.builder(w1.getX(), w1.getY(), w2.getX(), w2.getY()); LatLonPoint la = LatLonPoint.create(ur.getLatitude(), ll.getLongitude()); LatLonPoint lb = LatLonPoint.create(ll.getLatitude(), ur.getLongitude()); world.add(latLonToProj(la, centerLon)); world.add(latLonToProj(lb, centerLon)); return world.build(); } LatLonProjection();  LatLonProjection(String name);  LatLonProjection(Earth earth);  LatLonProjection(String name, @Nullable Earth earth, double centerLon); @Override Projection constructCopy(); String getProjectionTypeLabel(); String paramsToString(); @Override boolean equals(Object o); @Override int hashCode(); @Override ProjectionPoint latLonToProj(LatLonPoint latlon); @Override LatLonPoint projToLatLon(ProjectionPoint world); double getCenterLon(); Earth getEarth(); @Override boolean crossSeam(ProjectionPoint pt1, ProjectionPoint pt2); ProjectionRect[] latLonToProjRect(LatLonRect latlonR); @Override LatLonRect projToLatLonBB(ProjectionRect world); ProjectionRect[] latLonToProjRect(double lat0, double lon0, double lat1, double lon1); @Override ProjectionRect latLonToProjBB(LatLonRect latlonRect); }
LatLonProjection extends AbstractProjection { @Override public ProjectionRect latLonToProjBB(LatLonRect latlonRect) { double centerLon = latlonRect.getCenterLon(); LatLonPoint ll = latlonRect.getLowerLeftPoint(); LatLonPoint ur = latlonRect.getUpperRightPoint(); ProjectionPoint w1 = latLonToProj(ll, centerLon); ProjectionPoint w2 = latLonToProj(ur, centerLon); ProjectionRect.Builder world = ProjectionRect.builder(w1.getX(), w1.getY(), w2.getX(), w2.getY()); LatLonPoint la = LatLonPoint.create(ur.getLatitude(), ll.getLongitude()); LatLonPoint lb = LatLonPoint.create(ll.getLatitude(), ur.getLongitude()); world.add(latLonToProj(la, centerLon)); world.add(latLonToProj(lb, centerLon)); return world.build(); } LatLonProjection();  LatLonProjection(String name);  LatLonProjection(Earth earth);  LatLonProjection(String name, @Nullable Earth earth, double centerLon); @Override Projection constructCopy(); String getProjectionTypeLabel(); String paramsToString(); @Override boolean equals(Object o); @Override int hashCode(); @Override ProjectionPoint latLonToProj(LatLonPoint latlon); @Override LatLonPoint projToLatLon(ProjectionPoint world); double getCenterLon(); Earth getEarth(); @Override boolean crossSeam(ProjectionPoint pt1, ProjectionPoint pt2); ProjectionRect[] latLonToProjRect(LatLonRect latlonR); @Override LatLonRect projToLatLonBB(ProjectionRect world); ProjectionRect[] latLonToProjRect(double lat0, double lon0, double lat1, double lon1); @Override ProjectionRect latLonToProjBB(LatLonRect latlonRect);  }