|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.proj.Proj com.bbn.openmap.proj.GeoProj
public abstract class GeoProj
GeoProj is the base class of all Projections that deal with coordinates on the world sphere.
You probably don't want to use this class unless you are hacking your own projections, or need extended functionality. To be safe you will want to use the Projection interface.
set
method of this class. This might interfere with another
thread that's using the same projection for forwardPoly
or
another Projection interface method. In general, you should not need to call
any of the set
methods directly, but let the MapBean do it for
you.
forwardOBJ()
methods for ArrayList graphics
ultimately go through forwardPoly()
.
Projection
,
Cylindrical
,
Mercator
,
CADRG
,
Azimuth
,
Orthographic
,
Planet
,
GreatCircle
,
OMPoly
,
Serialized FormField Summary | |
---|---|
static float |
DATELINE
Dateline longitude in radians. |
protected Mercator |
mercator
|
static float |
NORTH_POLE
North pole latitude in radians. |
protected static int |
NUM_DEFAULT_CIRCLE_VERTS
|
protected static int |
NUM_DEFAULT_GREAT_SEGS
|
protected double |
pixelsPerMeter
|
protected double |
planetPixelCircumference
|
protected double |
planetPixelRadius
|
protected double |
planetRadius
|
protected double |
scaled_radius
|
static float |
SOUTH_POLE
South pole latitude in radians. |
protected int |
XSCALE_THRESHOLD
|
protected static int |
XTHRESHOLD
|
Fields inherited from class com.bbn.openmap.proj.Proj |
---|
centerX, centerY, height, maxscale, MIN_HEIGHT, MIN_WIDTH, minscale, projID, rotationAngle, scale, ucuom, width |
Constructor Summary | |
---|---|
GeoProj(LatLonPoint center,
float s,
int w,
int h)
|
Method Summary | ||
---|---|---|
protected abstract java.util.ArrayList<float[]> |
_forwardPoly(double[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a lat/lon Poly. |
|
protected abstract java.util.ArrayList<float[]> |
_forwardPoly(float[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a lat/lon Poly. |
|
protected LatLonPoint |
assertLatLonPoint(java.awt.geom.Point2D p2d)
Returns the Point2D provided if it is a LatLonPoint, otherwise it creates a LatLonPoint.Double and transfers the values from the provided Point2D object. |
|
java.lang.Object |
clone()
Copies this projection. |
|
protected java.util.ArrayList<float[]> |
doPolyDispatch(double[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Generates a complicated poly. |
|
protected java.util.ArrayList<float[]> |
doPolyDispatch(float[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Generates a complicated poly. |
|
java.awt.geom.Point2D |
forward(double lat,
double lon,
java.awt.geom.Point2D pt)
Project the point into view space. |
|
abstract java.awt.geom.Point2D |
forward(double lat,
double lon,
java.awt.geom.Point2D pt,
boolean isRadian)
Project the point into view space. |
|
java.awt.geom.Point2D |
forward(float lat,
float lon,
java.awt.geom.Point2D pt,
boolean isRadian)
Project the point into view space. |
|
java.awt.geom.Point2D |
forward(java.awt.geom.Point2D llp)
Forward project a LatLonPoint. |
|
java.awt.geom.Point2D |
forward(java.awt.geom.Point2D llp,
java.awt.geom.Point2D pt)
Forward project a point. |
|
java.util.ArrayList<float[]> |
forwardArc(LatLonPoint c,
boolean radians,
double radius,
double start,
double extent)
Forward project an arc. |
|
java.util.ArrayList<float[]> |
forwardArc(LatLonPoint c,
boolean radians,
double radius,
int nverts,
double start,
double extent)
|
|
java.util.ArrayList<float[]> |
forwardArc(LatLonPoint c,
boolean radians,
double radius,
int nverts,
double start,
double extent,
int arcType)
Forward project a Lat/Lon Arc. |
|
java.util.ArrayList<float[]> |
forwardCircle(LatLonPoint c,
boolean radians,
double radius)
Forward project a circle. |
|
java.util.ArrayList<float[]> |
forwardCircle(LatLonPoint c,
boolean radians,
double radius,
int nverts)
Forward project a Lat/Lon Circle. |
|
java.util.ArrayList<float[]> |
forwardCircle(LatLonPoint c,
boolean radians,
double radius,
int nverts,
boolean isFilled)
Forward project a Lat/Lon Circle. |
|
protected java.util.ArrayList<float[]> |
forwardGreatPoly(double[] rawllpts,
int nsegs,
boolean isFilled)
Forward project a greatcircle poly. |
|
protected java.util.ArrayList<float[]> |
forwardGreatPoly(float[] rawllpts,
int nsegs,
boolean isFilled)
Forward project a greatcircle poly. |
|
java.util.ArrayList<float[]> |
forwardLine(LatLonPoint ll1,
LatLonPoint ll2,
int ltype)
Forward project a lat/lon Line. |
|
java.util.ArrayList<float[]> |
forwardLine(LatLonPoint ll1,
LatLonPoint ll2,
int ltype,
int nsegs)
Forward project a LatLon Line. |
|
java.util.ArrayList<float[]> |
forwardLLPoly(double[] llpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a lat/lon Poly defined as decimal degree lat/lons. |
|
java.util.ArrayList<float[]> |
forwardPoly(double[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a lat/lon Poly. |
|
java.util.ArrayList<float[]> |
forwardPoly(float[] rawllpts,
int ltype,
int nsegs,
boolean isFilled)
Forward project a LatLon Poly. |
|
java.util.ArrayList<float[]> |
forwardRect(LatLonPoint ll1,
LatLonPoint ll2,
int ltype)
Forward project a lat/lon Rectangle. |
|
java.util.ArrayList<float[]> |
forwardRect(LatLonPoint ll1,
LatLonPoint ll2,
int ltype,
int nsegs)
Forward project a lat/lon Rectangle. |
|
java.util.ArrayList<float[]> |
forwardRect(LatLonPoint ll1,
LatLonPoint ll2,
int ltype,
int nsegs,
boolean isFilled)
Forward project a rectangle defined by an upper left point and a lower right point. |
|
protected java.util.ArrayList<float[]> |
forwardRhumbPoly(double[] rawllpts,
int nsegs,
boolean isFilled)
Forward project a rhumbline poly. |
|
protected java.util.ArrayList<float[]> |
forwardRhumbPoly(float[] rawllpts,
int nsegs,
boolean isFilled)
Forward project a rhumbline poly. |
|
LatLonPoint |
getCenter()
Get center point of projection. |
|
|
getCenter(T center)
Returns a center LatLonPoint that was provided, with the location filled into the LatLonPoint object. |
|
|
getGCTForProjection()
Convenience method to create a GCT for this projection. |
|
double |
getPlanetPixelCircumference()
Get the planet pixel circumference. |
|
double |
getPlanetPixelRadius()
Get the planet pixel radius. |
|
double |
getPlanetRadius()
Get the planet radius. |
|
double |
getPPM()
Get the pixels-per-meter constant. |
|
double |
getReferenceLon()
|
|
float |
getScale(java.awt.geom.Point2D ll1,
java.awt.geom.Point2D ll2,
java.awt.geom.Point2D point1,
java.awt.geom.Point2D point2)
Given a couple of points representing a bounding box, find out what the scale should be in order to make those points appear at the corners of the projection. |
|
Length |
getUcuom()
Get the unprojected coordinates units of measure. |
|
protected void |
init()
Called after the center and scale is set in setParams, but before the scale is checked for legitimacy. |
|
LatLonPoint |
inverse(double x,
double y)
Inverse project x,y coordinates. |
|
LatLonPoint |
inverse(java.awt.geom.Point2D point)
Inverse project a Point from x,y space to LatLon space. |
|
boolean |
isComplicatedLineType(int ltype)
Check for complicated linetypes. |
|
boolean |
isPlotable(java.awt.geom.Point2D point)
Checks if a point is plot-able. |
|
double |
normalize_latitude(double lat)
Deprecated. use normalizeLatitude() instead. |
|
abstract double |
normalizeLatitude(double lat)
|
|
float |
normalizeLatitude(float lat)
Sets radian latitude to something sane. |
|
void |
pan(double Az)
Pan the map/projection. |
|
void |
pan(double Az,
double c)
Pan the map/projection. |
|
void |
setCenter(double lat,
double lon)
Set center point of projection. |
|
void |
setCenter(double lat,
double lon,
boolean isRadians)
Set center point of projection. |
|
void |
setCenter(float lat,
float lon)
Set center point of projection. |
|
void |
setPlanetRadius(double radius)
Set the planet radius. |
|
void |
setPPM(double ppm)
Set the pixels per meter constant. |
|
void |
setUcuom(Length ucuom)
Can't set the unprojected coordinates units of measure for a GeoProj, it's always Length.DECIMAL_DEGREE. |
|
java.lang.String |
toString()
Stringify the projection. |
|
static double |
wrap_longitude(double lon)
Deprecated. use wrapLongitude() instead. |
|
static double |
wrapLongitude(double lon)
|
|
static float |
wrapLongitude(float lon)
Sets radian longitude to something sane. |
|
static double |
wrapLongitudeDeg(double lon)
|
Methods inherited from class com.bbn.openmap.proj.Proj |
---|
computeParameters, drawBackground, drawBackground, equals, forward, forward, forward, forwardLine, forwardPoly, forwardPoly, forwardRaw, forwardRaw, forwardRect, forwardShape, getHeight, getLowerRight, getMaxScale, getMinScale, getName, getProjectionID, getRotationAngle, getScale, getUpperLeft, getWidth, hashCode, inverse, inverse, inverseShape, isPlotable, makeClone, panE, panE, panN, panN, panNE, panNE, panNW, panNW, panS, panS, panSE, panSE, panSW, panSW, panW, panW, setCenter, setHeight, setMaxScale, setMinScale, setParms, setProjectionID, setRotationAngle, setScale, setWidth |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static transient int NUM_DEFAULT_CIRCLE_VERTS
public static final transient float NORTH_POLE
public static final transient float SOUTH_POLE
public static final transient float DATELINE
protected static transient int NUM_DEFAULT_GREAT_SEGS
protected double pixelsPerMeter
protected double planetRadius
protected double planetPixelRadius
protected double planetPixelCircumference
protected double scaled_radius
protected Mercator mercator
protected static transient int XTHRESHOLD
protected transient int XSCALE_THRESHOLD
Constructor Detail |
---|
public GeoProj(LatLonPoint center, float s, int w, int h)
Method Detail |
---|
protected void init()
Proj
Make sure you call super.init() if you override this method.
init
in class Proj
public void setPPM(double ppm)
ppm
- int Pixels Per Meter scale-factor constantpublic double getPPM()
public void setPlanetRadius(double radius)
radius
- float planet radius in meterspublic double getPlanetRadius()
public double getPlanetPixelRadius()
public double getPlanetPixelCircumference()
public void setCenter(float lat, float lon)
lat
- float latitude in decimal degreeslon
- float longitude in decimal degreespublic void setCenter(double lat, double lon)
setCenter
in class Proj
lat
- double latitude in decimal degreeslon
- double longitude in decimal degreespublic void setCenter(double lat, double lon, boolean isRadians)
lat
- double latitude in decimal degreeslon
- double longitude in decimal degreespublic LatLonPoint getCenter()
getCenter
in interface Projection
getCenter
in class Proj
public <T extends java.awt.geom.Point2D> T getCenter(T center)
getCenter
in interface Projection
getCenter
in class Proj
center
- the Point2D to fill in.
public float normalizeLatitude(float lat)
Normalizes the latitude according to the particular projection.
lat
- float latitude in radians
ProjMath.normalizeLatitude(float, float)
,
LatLonPoint.normalizeLatitude(float)
public abstract double normalizeLatitude(double lat)
public static final float wrapLongitude(float lon)
lon
- float longitude in radians
ProjMath.wrapLongitude(float)
,
LatLonPoint.wrapLongitude(float)
public static final double wrapLongitude(double lon)
public static final double wrapLongitudeDeg(double lon)
public final double normalize_latitude(double lat)
public static final double wrap_longitude(double lon)
public void pan(double Az, double c)
Example pans:
pan(180, c)
pan south `c' degrees
pan(-90, c)
pan west `c' degrees
pan(0, c)
pan north `c' degrees
pan(90, c)
pan east `c' degrees
pan
in interface Projection
pan
in class Proj
Az
- azimuth "east of north" in decimal degrees:
-180 <= Az <= 180
c
- arc distance in decimal degreespublic void pan(double Az)
pan
in interface Projection
pan
in class Proj
Az
- azimuth "east of north" in decimal degrees:
-180 <= Az <= 180
public java.lang.String toString()
toString
in class Proj
Proj.getProjectionID()
public java.lang.Object clone()
clone
in class Proj
public boolean isPlotable(java.awt.geom.Point2D point)
Projection
Call this to check and see if a point can be plotted. This is meant to be used for checking before projecting and rendering Point2D objects (bitmaps or text objects tacked at a specific location, for instance).
isPlotable
in interface Projection
isPlotable
in class Proj
point
- Point2D
protected java.util.ArrayList<float[]> forwardRhumbPoly(float[] rawllpts, int nsegs, boolean isFilled)
Draws rhumb lines between vertices of poly. Remember to specify vertices in radians! Check in-code comments for details about the algorithm.
rawllpts
- float[] of lat,lon,lat,lon,... in RADIANS!nsegs
- number of segments to draw for greatcircle or rhumb lines
(if < 1, this value is generated internally).isFilled
- filled poly?
protected java.util.ArrayList<float[]> forwardRhumbPoly(double[] rawllpts, int nsegs, boolean isFilled)
Draws rhumb lines between vertices of poly. Remember to specify vertices in radians! Check in-code comments for details about the algorithm.
rawllpts
- double[] of lat,lon,lat,lon,... in RADIANS!nsegs
- number of segments to draw for greatcircle or rhumb lines
(if < 1, this value is generated internally).isFilled
- filled poly?
protected java.util.ArrayList<float[]> forwardGreatPoly(float[] rawllpts, int nsegs, boolean isFilled)
Draws great circle lines between vertices of poly. Remember to specify vertices in radians!
rawllpts
- float[] of lat,lon,lat,lon,... in RADIANS!nsegs
- number of segments to draw for greatcircle or rhumb lines
(if < 1, this value is generated internally).isFilled
- filled poly?
protected java.util.ArrayList<float[]> forwardGreatPoly(double[] rawllpts, int nsegs, boolean isFilled)
Draws great circle lines between vertices of poly. Remember to specify vertices in radians!
rawllpts
- float[] of lat,lon,lat,lon,... in RADIANS!nsegs
- number of segments to draw for greatcircle or rhumb lines
(if < 1, this value is generated internally).isFilled
- filled poly?
public boolean isComplicatedLineType(int ltype)
This depends on the line and this projection.
ltype
- int LineType
protected java.util.ArrayList<float[]> doPolyDispatch(float[] rawllpts, int ltype, int nsegs, boolean isFilled)
rawllpts
- LatLonPofloat[]ltype
- line typensegs
- number of segments to draw for greatcircle or rhumb lines
(if < 1, this value is generated internally).isFilled
- filled poly?
protected java.util.ArrayList<float[]> doPolyDispatch(double[] rawllpts, int ltype, int nsegs, boolean isFilled)
rawllpts
- LatLonPofloat[]ltype
- line typensegs
- number of segments to draw for greatcircle or rhumb lines
(if < 1, this value is generated internally).isFilled
- filled poly?
public float getScale(java.awt.geom.Point2D ll1, java.awt.geom.Point2D ll2, java.awt.geom.Point2D point1, java.awt.geom.Point2D point2)
getScale
in interface Projection
getScale
in class Proj
ll1
- the upper left coordinates of the bounding box.ll2
- the lower right coordinates of the bounding box.point1
- a java.awt.Point reflecting a pixel spot on the projection
that matches the ll1 coordinate, the upper left corner of the area
of interest.point2
- a java.awt.Point reflecting a pixel spot on the projection
that matches the ll2 coordinate, usually the lower right corner of
the area of interest.public java.awt.geom.Point2D forward(java.awt.geom.Point2D llp, java.awt.geom.Point2D pt)
forward
in interface Projection
forward
in class Proj
llp
- LatLonPoint to be projectedpt
- Resulting XY Point2D
public java.awt.geom.Point2D forward(java.awt.geom.Point2D llp)
Forward projects a LatLon point into XY space. Returns a Point.
forward
in interface Projection
forward
in class Proj
llp
- LatLonPoint to be projected
public java.awt.geom.Point2D forward(double lat, double lon, java.awt.geom.Point2D pt)
forward
in interface Projection
forward
in class Proj
lat
- latitude in decimal degrees.lon
- longitue in decimal degrees.pt
- A Point2D object to load the result into, a new Point2D object
will be created if this is null.
public java.awt.geom.Point2D forward(float lat, float lon, java.awt.geom.Point2D pt, boolean isRadian)
lat
- latitudelon
- longitudept
- return pointisRadian
- true if lat/lon are radians instead of decimal degrees
public abstract java.awt.geom.Point2D forward(double lat, double lon, java.awt.geom.Point2D pt, boolean isRadian)
lat
- latitudelon
- longitudept
- return pointisRadian
- true if lat/lon are radians instead of decimal degrees
public LatLonPoint inverse(java.awt.geom.Point2D point)
inverse
in interface Projection
inverse
in class Proj
point
- x,y Point
public LatLonPoint inverse(double x, double y)
inverse
in interface Projection
inverse
in class Proj
x
- integer x coordinatey
- integer y coordinate
inverse(Point2D)
protected LatLonPoint assertLatLonPoint(java.awt.geom.Point2D p2d)
public java.util.ArrayList<float[]> forwardLine(LatLonPoint ll1, LatLonPoint ll2, int ltype, int nsegs)
Returns a ArrayList of (x[], y[]) coordinate pair(s) of the projected line(s). RESTRICTIONS: A line segment must be less than 180 degrees of arc (half the circumference of the world). If you need to draw a longer line, then draw several several individual segments of less than 180 degrees, or draw a single polyline of those segments.
We make this restriction because from any point on a sphere, you can reach any other point with a maximum traversal of 180degrees of arc.
Furthermore, for the Cylindrical family of projections, a line must be < 180 degrees of arc in longitudinal extent. In other words, the difference of longitudes between both vertices must be < 180 degrees. Same as above: if you need a long line, you must break it into several segments.
ll1
- LatLonPointll2
- LatLonPointltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)
LineType.Straight
,
LineType.Rhumb
,
LineType.GreatCircle
public java.util.ArrayList<float[]> forwardLine(LatLonPoint ll1, LatLonPoint ll2, int ltype)
forwardLine(LatLonPoint, LatLonPoint, int, int)
public java.util.ArrayList<float[]> forwardRect(LatLonPoint ll1, LatLonPoint ll2, int ltype, int nsegs, boolean isFilled)
Returns a ArrayList of (x[], y[]) coordinate pairs of the projected points.
Rects have the same restrictions as polys and lines .
ll1
- LatLonPoint of northwest cornerll2
- LatLonPoint of southeast cornerltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)
forwardPoly(float[], int, int, boolean)
public java.util.ArrayList<float[]> forwardRect(LatLonPoint ll1, LatLonPoint ll2, int ltype)
forwardRect(LatLonPoint, LatLonPoint, int, int)
public java.util.ArrayList<float[]> forwardRect(LatLonPoint ll1, LatLonPoint ll2, int ltype, int nsegs)
ll1
- LatLonPoint of northwest cornerll2
- LatLonPoint of southeast cornerltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)forwardRect(LatLonPoint, LatLonPoint, int, int)
public java.util.ArrayList<float[]> forwardArc(LatLonPoint c, boolean radians, double radius, double start, double extent)
c
- LatLonPoint centerradians
- boolean radius in radians?radius
- radius in radians or decimal degreesstart
- the starting angle of the arc, zero being North up. Units
are dependent on radians parameter - the start parameter is in
radians if radians equals true, decimal degrees if not.extent
- the angular extent angle of the arc, zero being no length.
Units are dependent on radians parameter - the extent parameter is
in radians if radians equals true, decimal degrees if not.public java.util.ArrayList<float[]> forwardArc(LatLonPoint c, boolean radians, double radius, int nverts, double start, double extent)
public java.util.ArrayList<float[]> forwardArc(LatLonPoint c, boolean radians, double radius, int nverts, double start, double extent, int arcType)
Arcs have the same restrictions as polys .
c
- LatLonPoint center of circleradians
- radius in radians or decimal degrees?radius
- radius of circle (0 < radius < 180)nverts
- number of vertices of the circle poly.start
- the starting angle of the arc, zero being North up. Units
are dependent on radians parameter - the start parameter is in
radians if radians equals true, decimal degrees if not.extent
- the angular extent angle of the arc, zero being no length.
Units are dependent on radians parameter - the extent parameter is
in radians if radians equals true, decimal degrees if not.arcType
- type of arc to create - see java.awt.geom.Arc2D for (OPEN,
CHORD, PIE). Arc2D.OPEN means that the just the points for the
curved edge will be provided. Arc2D.PIE means that addition lines
from the edge of the curve to the center point will be added.
Arc2D.CHORD means a single line from each end of the curve will be
drawn.public java.util.ArrayList<float[]> forwardCircle(LatLonPoint c, boolean radians, double radius)
c
- LatLonPoint centerradians
- boolean radius in radians?radius
- radius in radians or decimal degreespublic java.util.ArrayList<float[]> forwardCircle(LatLonPoint c, boolean radians, double radius, int nverts)
Circles have the same restrictions as polys. .
c
- LatLonPoint center of circleradians
- radius in radians or decimal degrees?radius
- radius of circle (0 < radius < 180)nverts
- number of vertices of the circle poly.public java.util.ArrayList<float[]> forwardCircle(LatLonPoint c, boolean radians, double radius, int nverts, boolean isFilled)
Circles have the same restrictions as polys. .
c
- LatLonPoint center of circleradians
- radius in radians or decimal degrees?radius
- radius of circle (0 < radius < 180)nverts
- number of vertices of the circle poly.isFilled
- filled poly?public java.util.ArrayList<float[]> forwardPoly(float[] rawllpts, int ltype, int nsegs, boolean isFilled)
Returns a ArrayList of (x[], y[]) coordinate pair(s) of the projected poly. RESTRICTIONS: All the following restrictions apply to LatLon polygons (either filled or non-filled). Many of these restrictions apply to other poly-like ArrayList graphics (Lines, Rectangles, Circles, Ellipses, ...). See also restrictions on LatLon lines.
For the cylindrical projections, (e.g. Mercator), your polygons should not include or touch the poles. This is because a polygon or polyline that includes a pole becomes a non-continuous straight line on the map. "So what about Antarctica", you say, "after all it's a polygon that is draped over the South Pole". Well, if you want to see it in a cylindrical projection, you will need to "augment" the vertices to turn it into a valid x-y polygon. You could do this by removing the segment which crosses the dateline, and instead add two extra edges down along both sides of the dateline to very near the south pole and then connect these ends back the other way around the world (not across the dateline) with a few extra line segments (remember the line length restrictions ). This way you've removed the polar anomaly from the data set. On the screen, all you see is a sliver artifact down along the dateline. This is the very method that our DCW data server shows Antarctica.
There is a fundamental ambiguity with filled polygons on a sphere: which side do you draw the fill-color? The Cylindrical family will draw the polygon as if it were in x-y space. For the Azimuthal projections, (e.g. Orthographic), you can have polygons that cover the pole, but it's important to specify the vertices in a clockwise order so that we can do the correct clipping along the hemisphere edge. We traverse the vertices assuming that the fill will be to the right hand side if the polygon straddles the edge of the projection. (This default can be changed).
For no-frills, no-assumptions, fast and efficient projecting, see forwardRaw() .
rawllpts
- float[] of lat,lon,lat,lon,... in RADIANS!ltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)isFilled
- poly is filled? or not
Proj.forwardRaw(float[], int, float[], float[], boolean[], int, int)
,
LineType.Straight
,
LineType.Rhumb
,
LineType.GreatCircle
public java.util.ArrayList<float[]> forwardPoly(double[] rawllpts, int ltype, int nsegs, boolean isFilled)
Delegates to _forwardPoly(), and may do additional clipping for Java XWindows problem. Remember to specify vertices in radians!
rawllpts
- double[] of lat,lon,lat,lon,... in RADIANS!ltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)isFilled
- filled poly?
Proj.forwardRaw(float[], int, float[], float[], boolean[], int, int)
,
LineType.Straight
,
LineType.Rhumb
,
LineType.GreatCircle
public java.util.ArrayList<float[]> forwardLLPoly(double[] llpts, int ltype, int nsegs, boolean isFilled)
Delegates to _forwardPoly(), and may do additional clipping for Java XWindows problem. Remember to specify vertices in decimal degrees. If you have radians, use them and call forwardPoly, it's faster. This method will convert the coords to radians before calling the fowardPoly method.
llpts
- double[] of lat,lon,lat,lon,... in decimal degree lat/lon!ltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)isFilled
- filled poly?
Proj.forwardRaw(float[], int, float[], float[], boolean[], int, int)
,
LineType.Straight
,
LineType.Rhumb
,
LineType.GreatCircle
protected abstract java.util.ArrayList<float[]> _forwardPoly(float[] rawllpts, int ltype, int nsegs, boolean isFilled)
rawllpts
- float[] of lat,lon,lat,lon,... in RADIANS!ltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)isFilled
- filled poly?
protected abstract java.util.ArrayList<float[]> _forwardPoly(double[] rawllpts, int ltype, int nsegs, boolean isFilled)
rawllpts
- double[] of lat,lon,lat,lon,... in RADIANS!ltype
- line type (straight, rhumbline, greatcircle)nsegs
- number of segment points (only for greatcircle or rhumbline
line types, and if < 1, this value is generated internally)isFilled
- filled poly?
public Length getUcuom()
getUcuom
in interface Projection
getUcuom
in class Proj
Length
public void setUcuom(Length ucuom)
setUcuom
in class Proj
ucuom
- public <T extends GeoCoordTransformation> T getGCTForProjection()
public double getReferenceLon()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |