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

Addition of code comments and spelling corrections in GridSetFactory … #836

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class GridSet implements Info {

/**
* {@code true} if the resolutions are preserved and the scaleDenominators calculated, {@code
* false} if the resolutions are calculated based on the sacale denominators.
* false} if the resolutions are calculated based on the scale denominators.
*/
private boolean resolutionsPreserved;

Expand Down Expand Up @@ -94,7 +94,7 @@ void setOriginalExtent(BoundingBox originalExtent) {

/**
* @return {@code true} if the resolutions are preserved and the scaleDenominators calculated,
* {@code false} if the resolutions are calculated based on the sacale denominators.
* {@code false} if the resolutions are calculated based on the scale denominators.
*/
public boolean isResolutionsPreserved() {
return resolutionsPreserved;
Expand All @@ -103,7 +103,7 @@ public boolean isResolutionsPreserved() {
/**
* @param resolutionsPreserved {@code true} if the resolutions are preserved and the
* scaleDenominators calculated, {@code false} if the resolutions are calculated based on
* the sacale denominators.
* the scale denominators.
*/
void setResolutionsPreserved(boolean resolutionsPreserved) {
this.resolutionsPreserved = resolutionsPreserved;
Expand Down Expand Up @@ -412,7 +412,7 @@ void setGridLevels(Grid[] gridLevels) {
}

/**
* The base cordinates in x/y order, used to map tile indexes to coordinate bounding boxes.
* The base coordinates in x/y order, used to map tile indexes to coordinate bounding boxes.
* These can either be top left or bottom left, so must be kept private.
*
* <p>This is a derived property of {@link #getOriginalExtent()} and {@link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,30 @@ private static GridSet baseGridSet(String name, SRS srs, int tileWidth, int tile
}

/**
* Note that you should provide EITHER resolutions or scales. Providing both will cause a
* precondition violation exception.
* Creates a gridset and automatically calculates the grids (scale sets) based on either
* resolutions or on scaleDenoms .Note that you should provide EITHER resolutions or scales.
* Providing both will cause a precondition violation exception.
*
* @param extent the bounding box for the gridset
* @param resolutions the resolutions of each grid. Set to {@code null} if grids should be
* calculated using scaleDenoms instead. Resolutions should be in metres per pixel
* @param scaleDenoms the scale Denominators of each grid. Set to {@code null} if grids should
* be calculated using resolutions instead
* @param pixelSize the size of a pixel in meters. Used when calculating grids using scale
* denominators
* @param scaleNames the names of each grid
* @param tileWidth the width of each tile in pixels
* @param tileHeight the height of each tile in pixels
* @param alignTopLeft Indicates how the matrix should be aligned within the extent, where
* {@code true} means that the matrix should be aligned with the top left of the extent and
* {@code false} means that it should be aligned with the bottom left.
* @param metersPerUnit the number of meters per unit in the scale denominator. e.g. if the
* scale is 1/28000, then this should be set to 1.0 and the relevant scaleDenom will be
* 28000
* @param name the name to be applied to the gridset
* @param srs the srs associated with this gridset
* @param yCoordinateFirst used to set the {@link GridSet#setyCoordinateFirst} value
* @return the created Gridset
*/
public static GridSet createGridSet(
final String name,
Expand Down Expand Up @@ -184,6 +206,26 @@ public static GridSet createGridSet(
return gridSet;
}

/**
* Creates a gridset with grids based on the extent and number of levels required.
*
* @param name the name to be applied to the gridset
* @param srs the srs associated with this gridset
* @param extent the bounding box for the gridset
* @param alignTopLeft Indicates how the matrix should be aligned within the extent, where
* {@code true} means that the matrix should be aligned with the top left of the extent and
* {@code false} means that it should be aligned with the bottom left.
* @param levels the number of levels that the gridset should have
* @param metersPerUnit the number of meters per unit in the scale denominator. e.g. if the
* scale is 1/28000, then this should be set to 1.0 and the relevant scaleDenom will be
* 28000
* @param pixelSize the size of a pixel in meters. Used when calculating grids using scale
* denominators
* @param tileWidth the width of each tile in pixels
* @param tileHeight the height of each tile in pixels
* @param yCoordinateFirst used to set the {@link GridSet#setyCoordinateFirst} value
* @return the created GridSet
*/
public static GridSet createGridSet(
final String name,
final SRS srs,
Expand Down