Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Oct 31, 2024
1 parent 39a16d5 commit 229567d
Show file tree
Hide file tree
Showing 29 changed files with 81 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void cacheFeatureAddressFromIndex() throws IOException {

/**
* @param featureAddress Feature address in the file relative to the first feature
* @return
* @return values from the a flatgeobuffer feature
*/
public static Value[] getFieldsFromFileLocation(FileChannel fileChannel, long featureAddress, long featuresOffset,
HeaderMeta headerMeta, int geometryFieldIndex) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public Coordinate parseCoordinate(JsonParser jp) throws IOException {

/**
*
* @return
* @return GeoJSON geometry type
*/
public String getGeomType() {
return geomType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,6 @@ private CoordinateSequence parseCoordinates(JsonParser jp) throws IOException {
* @param coordinates Number array
* @param index Index to extract in array
* @param defaultValue Value to return if out of bounds
* @return
*/
private static double getOrDefault(List<Double> coordinates, int index, double defaultValue) {
return index < coordinates.size() ? coordinates.get(index) : defaultValue;
Expand Down Expand Up @@ -1406,8 +1405,8 @@ else if(dataType.equalsIgnoreCase(GeoJsonField.GEOMETRYCOLLECTION)){
* "crs":{ "type":"name", "properties": {"name":"urn:ogc:def:crs:EPSG::4326"
* } }
*
* @param jp
* @return
* @param jp {@link JsonParser}
* @return SRID of the geojson file
*/
private int readCRS(JsonParser jp) throws IOException, SQLException {
int srid = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public String getJavaStaticMethod() {
/**
* Convert the geometry to a GeoJSON representation.
*
* @param geom
* @return
* @param geom Geometry
* @return geojson representation
*/
public static String toGeojson(Geometry geom) {
if(geom==null){
Expand All @@ -64,7 +64,7 @@ public static String toGeojson(Geometry geom) {
*
* @param geom input geometry
* @param maxdecimaldigits argument may be used to reduce the maximum number of decimal places
* @return
* @return geojson representation
*/
public static String toGeojson(Geometry geom, int maxdecimaldigits) {
if(geom==null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void clear() {
/**
* Gives copyright and license information governing use of the file.
*
* @return
* @return copyright value
*/
@Override
public String getCopyright() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void startElement(String uri, String localName, String qName, Attributes
/**
* Gives the version of the gpx file.
*
* @return
* @return version value
*/
public String getVersion() {
return version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ public static void downloadOSMFile(File file, Envelope geometryEnvelope) throws
/**
* Build the OSM URL based on a given envelope
*
* @param geometryEnvelope
* @return
* @param geometryEnvelope {@link Envelope}
* @return bbox Overpass url
*/
private static URL createOsmUrl(Envelope geometryEnvelope) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void addRef(String ref) {
/**
* Return the list of nodes
*
* @return
* @return list of nodes
*/
public List<Long> getNodesRef() {
return nodesRef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public final class CoordinatesUtils {
/**
* Interpolates a z value (linearly) between the two coordinates.
*
* @param firstCoordinate
* @param lastCoordinate
* @param toBeInterpolated
* @return
* @param firstCoordinate first coordinate
* @param lastCoordinate last coordinate
* @param toBeInterpolated coordinate to interpolate
* @return z value
*/
public static double interpolate(Coordinate firstCoordinate, Coordinate lastCoordinate, Coordinate toBeInterpolated) {
if (Double.isNaN(firstCoordinate.getZ())) {
Expand Down Expand Up @@ -64,9 +64,9 @@ public static boolean contains(Coordinate[] coords, Coordinate coord) {
*
* The equality is done only in 2D (z values are not checked).
*
* @param coords
* @param coord
* @return
* @param coords coordinate array
* @param coord coordinate to check
* @return true if the coordinate is found
*/
public static boolean contains2D(Coordinate[] coords, Coordinate coord) {
for (Coordinate coordinate : coords) {
Expand All @@ -82,9 +82,9 @@ public static boolean contains2D(Coordinate[] coords, Coordinate coord) {
*
* The equality is done in 3D (z values ARE checked).
*
* @param coords
* @param coord
* @return
* @param coords coordinate array
* @param coord coordinate
* @return true if the coordinate is found
*/
public static boolean contains3D(Coordinate[] coords, Coordinate coord) {
for (Coordinate coordinate : coords) {
Expand Down Expand Up @@ -214,8 +214,8 @@ public static double length3D(CoordinateSequence pts) {
* Returns the 3D length of the geometry
*
*
* @param geom
* @return
* @param geom {@link Geometry}
* @return length in 3D
*/
public static double length3D(Geometry geom) {
double sum = 0;
Expand All @@ -234,8 +234,8 @@ public static double length3D(Geometry geom) {
/**
* Returns the 3D perimeter of a line string.
*
* @param lineString
* @return
* @param lineString {@link LineString}
* @return length in 3D
*/
public static double length3D(LineString lineString) {
return length3D(lineString.getCoordinateSequence());
Expand All @@ -244,8 +244,8 @@ public static double length3D(LineString lineString) {
/**
* Returns the 3D perimeter of a polygon
*
* @param polygon
* @return
* @param polygon {@link Polygon}
* @return length in 3D
*/
public static double length3D(Polygon polygon) {
double len = 0.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public class PRJUtil {
* - is empty
* then a default srid equals to 0 is added.
*
* @param prjFile
* @return
* @param prjFile prj file
* @return srid code
*/
public static int getSRID(File prjFile) throws IOException {
int srid = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ public void position(long position) {
}

/**
* Gets the positionf of this buffer in the file it's reading.
* Gets the position of this buffer in the file it's reading.
*
* @return
* @return index of the position
*/
public long getPosition() {
return positionInFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,11 @@ public static Geometry ringSideBuffer(Geometry geom, double bufferSize, int numB

/**
*
* @param geom
* @param bufferDistance
* @param numBuffer
* @param parameters
* @return
* @throws java.sql.SQLException
* @param geom {@link Geometry}
* @param bufferDistance buffer distance
* @param numBuffer numberof rings
* @param parameters buffer parameters
* @return ring side geometries
*/
public static Geometry ringSideBuffer(Geometry geom, double bufferDistance,
int numBuffer, String parameters) throws SQLException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ private Geometry getArealGeometryFromLinearRing(LinearRing ring) {
/**
* Return a set of segments from a linestring
*
* @param lines
* @return
* @param lines collection of lines
* @return a set of segments
*/
private Set<LineString> getSegments(Collection<LineString> lines) {
Set<LineString> set = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public static Geometry force(Geometry geom, int dimension) {
* Force the dimension of the MultiPoint and update correctly the coordinate
* dimension
*
* @param mp
* @param dimension
* @return
* @param mp {@link MultiPoint}
* @param dimension coordinate dimension
* @return geometry with reduced dimension
*/
public static MultiPoint convert(MultiPoint mp, int dimension) {
int nb = mp.getNumGeometries();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public String getJavaStaticMethod() {

/**
* Construct a geometry collection from a geometry
* @param geometry
* @return
* @param geometry {@link Geometry}
* @return a {@link org.locationtech.jts.geom.GeometryCollection}
*/
public static Geometry toCollection(Geometry geometry){
if(geometry==null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private Point getCellPoint() {
/**
* Return true is cell is represented as point, false as a polygon
*
* @return
* @return trie if the grid is computed at center cell
*/
public boolean isCenterCell() {
return isCenterCell;
Expand All @@ -211,7 +211,7 @@ public void setIsRowColumnNumber(boolean isRowColumnNumber){

/**
* Return if the delta x and y must be expressed as number of columns and rows
* @return
* @return true is the number of row and columns are fixed
*/
public boolean isRowColumnNumber(){
return this.isRowColumnNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public String getJavaStaticMethod() {
/**
* Computes the bounding circle
*
* @param geometry
* @return
* @param geometry {@link Geometry}
* @return geometry bounding circle
*/
public static Geometry computeBoundingCircle(Geometry geometry) {
if (geometry == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public String getJavaStaticMethod() {
*
* @param geom input geometry as polygon or multipolygon
* @param nPts number of random points
* @return
* @throws java.sql.SQLException
* @return random points
*/
public static Geometry generatePoints(Geometry geom, int nPts) throws SQLException {
if (geom == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static Geometry generatePointsInGrid(Geometry geom, int cellSizeX, int ce
* @param cellSizeY size of the y cell
* @param useMask set to true to keep the points loacted inside the input
* geometry
* @return
* @return a list of coordinates
*/
static List<Coordinate> createGridPoints(Geometry geom, int cellSizeX, int cellSizeY, boolean useMask) {
Envelope env = geom.getEnvelopeInternal();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ public static Geometry ringBuffer(Geometry geom, double bufferSize, int numBuffe

/**
*
* @param geom
* @param bufferDistance
* @param numBuffer
* @param parameters
* @return
* @throws java.sql.SQLException
* @param geom {@link Geometry}
* @param bufferDistance buffer distance
* @param numBuffer number of rings
* @param parameters buffer parameters
* @return ring buffer geometry
*/
public static Geometry ringBuffer(Geometry geom, double bufferDistance,
int numBuffer, String parameters) throws SQLException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ public String getJavaStaticMethod() {

/**
* Find UTM SRID from a geometry
* @param connection
* @param geometry
* @return
* @throws java.sql.SQLException
* @param connection database
* @param geometry {@link Geometry}
* @return srid
*/
public static int findSRID(Connection connection, Geometry geometry) throws SQLException {
if(geometry==null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public String getJavaStaticMethod() {
/**
* Return true if the geometry has a geographic CRS
*
* @param geometry
* @return
* @throws SQLException
* @param connection database
* @param geometry {@link Geometry}
* @return true if the geometry has a geographic CRS
*/
public static Boolean execute(Connection connection, Geometry geometry) throws SQLException {
if (geometry == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public String getJavaStaticMethod() {
/**
* Return true if the CRS is a projected one
*
* @param geometry
* @return
* @throws java.sql.SQLException
* @param connection database
* @param geometry {@link Geometry}
* @return true if the CRS is a projected one
*/
public static Boolean execute(Connection connection, Geometry geometry) throws SQLException {
if (geometry == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ public String getJavaStaticMethod() {

/**
* Set a new SRID to the geometry
* @param geometry
* @param srid
* @return
* @throws IllegalArgumentException
* @param geometry {@link Geometry}
* @param srid srid code
* @return Geometry with an srid
*/
public static Geometry setSRID(Geometry geometry, Integer srid) throws IllegalArgumentException {
if (geometry == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ public String getJavaStaticMethod() {
/**
* Returns a new geometry transformed to the SRID referenced by the integer
* parameter available in the spatial_ref_sys table
* @param connection
* @param geom
* @param codeEpsg
* @return
* @throws SQLException
* @param connection database
* @param geom Geometry
* @param codeEpsg srid code
* @return reprojected geometry
*/
public static Geometry ST_Transform(Connection connection, Geometry geom, Integer codeEpsg) throws SQLException, CoordinateOperationException {
if (geom == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static Geometry computeShadow(Geometry geometry, double azimuth, double a
* @param altitude of the sun in radians
* @param height of the geometry
* @param doUnion unified or not the polygon shadows
* @return
* @return geometry shadows
*/
public static Geometry computeShadow(Geometry geometry, double azimuth, double altitude, double height, boolean doUnion) {
if (geometry == null) {
Expand Down
Loading

0 comments on commit 229567d

Please sign in to comment.