Skip to content

Commit 8e8c3cc

Browse files
committed
Merge pull request #5 from ngageoint/develop
Central Repository version 1.0.0, JavaDoc updates
2 parents 9d59efd + aebe4f7 commit 8e8c3cc

27 files changed

+459
-48
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ WKB is a Java library for writing and reading Well-Known Binary Geometries to an
3434
byte[] bytes = writer.getBytes();
3535
writer.close();
3636

37+
### Installation ###
38+
39+
Pull from the [Maven Central Repository](http://search.maven.org/#artifactdetails|mil.nga|wkb|1.0.0|jar)
40+
41+
<dependency>
42+
<groupId>mil.nga</groupId>
43+
<artifactId>wkb</artifactId>
44+
<version>1.0.0</version>
45+
</dependency>
46+
3747
### Build ###
3848

3949
Build this repository using Eclipse and/or Maven:

pom.xml

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>mil.nga.wkb</groupId>
4+
<groupId>mil.nga</groupId>
55
<artifactId>wkb</artifactId>
66
<version>1.0.0</version>
77
<packaging>jar</packaging>
@@ -41,4 +41,74 @@
4141
<maven.compiler.source>1.7</maven.compiler.source>
4242
<maven.compiler.target>1.7</maven.compiler.target>
4343
</properties>
44+
45+
<build>
46+
<plugins>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-source-plugin</artifactId>
50+
<version>2.2.1</version>
51+
<executions>
52+
<execution>
53+
<id>attach-sources</id>
54+
<goals>
55+
<goal>jar-no-fork</goal>
56+
</goals>
57+
</execution>
58+
</executions>
59+
</plugin>
60+
<plugin>
61+
<groupId>org.apache.maven.plugins</groupId>
62+
<artifactId>maven-javadoc-plugin</artifactId>
63+
<version>2.9.1</version>
64+
<executions>
65+
<execution>
66+
<id>attach-javadocs</id>
67+
<goals>
68+
<goal>jar</goal>
69+
</goals>
70+
<configuration>
71+
<additionalparam>-Xdoclint:none</additionalparam>
72+
</configuration>
73+
</execution>
74+
</executions>
75+
</plugin>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-gpg-plugin</artifactId>
79+
<executions>
80+
<execution>
81+
<id>sign-artifacts</id>
82+
<phase>deploy</phase>
83+
<goals>
84+
<goal>sign</goal>
85+
</goals>
86+
</execution>
87+
</executions>
88+
</plugin>
89+
<plugin>
90+
<groupId>org.sonatype.plugins</groupId>
91+
<artifactId>nexus-staging-maven-plugin</artifactId>
92+
<version>1.6.3</version>
93+
<extensions>true</extensions>
94+
<configuration>
95+
<serverId>ossrh</serverId>
96+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
97+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
98+
</configuration>
99+
</plugin>
100+
</plugins>
101+
</build>
102+
103+
<distributionManagement>
104+
<snapshotRepository>
105+
<id>ossrh</id>
106+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
107+
</snapshotRepository>
108+
<repository>
109+
<id>ossrh</id>
110+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
111+
</repository>
112+
</distributionManagement>
113+
44114
</project>

src/main/java/mil/nga/wkb/geom/CircularString.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ public class CircularString extends LineString {
1111
* Constructor
1212
*
1313
* @param hasZ
14+
* has z
1415
* @param hasM
16+
* has m
1517
*/
1618
public CircularString(boolean hasZ, boolean hasM) {
1719
super(GeometryType.CIRCULARSTRING, hasZ, hasM);

src/main/java/mil/nga/wkb/geom/CompoundCurve.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,47 @@ public class CompoundCurve extends Curve {
1919
* Constructor
2020
*
2121
* @param hasZ
22+
* has z
2223
* @param hasM
24+
* has m
2325
*/
2426
public CompoundCurve(boolean hasZ, boolean hasM) {
2527
super(GeometryType.COMPOUNDCURVE, hasZ, hasM);
2628
}
2729

30+
/**
31+
* Get the line strings
32+
*
33+
* @return line strings
34+
*/
2835
public List<LineString> getLineStrings() {
2936
return lineStrings;
3037
}
3138

39+
/**
40+
* Set the line strings
41+
*
42+
* @param lineStrings
43+
* line strings
44+
*/
3245
public void setLineStrings(List<LineString> lineStrings) {
3346
this.lineStrings = lineStrings;
3447
}
3548

49+
/**
50+
* Add a line string
51+
*
52+
* @param lineString
53+
* line string
54+
*/
3655
public void addLineString(LineString lineString) {
3756
lineStrings.add(lineString);
3857
}
3958

4059
/**
4160
* Get the number of line strings
4261
*
43-
* @return
62+
* @return number of line strings
4463
*/
4564
public int numLineStrings() {
4665
return lineStrings.size();

src/main/java/mil/nga/wkb/geom/Curve.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ public abstract class Curve extends Geometry {
1515
* Constructor
1616
*
1717
* @param type
18+
* geometry type
1819
* @param hasZ
20+
* has z
1921
* @param hasM
22+
* has m
2023
*/
2124
protected Curve(GeometryType type, boolean hasZ, boolean hasM) {
2225
super(type, hasZ, hasM);

src/main/java/mil/nga/wkb/geom/CurvePolygon.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public class CurvePolygon<T extends Curve> extends Surface {
2020
* Constructor
2121
*
2222
* @param hasZ
23+
* has z
2324
* @param hasM
25+
* has m
2426
*/
2527
public CurvePolygon(boolean hasZ, boolean hasM) {
2628
super(GeometryType.CURVEPOLYGON, hasZ, hasM);
@@ -30,29 +32,49 @@ public CurvePolygon(boolean hasZ, boolean hasM) {
3032
* Constructor
3133
*
3234
* @param type
35+
* geometry type
3336
* @param hasZ
37+
* has z
3438
* @param hasM
39+
* has m
3540
*/
3641
protected CurvePolygon(GeometryType type, boolean hasZ, boolean hasM) {
3742
super(type, hasZ, hasM);
3843
}
3944

45+
/**
46+
* Get the rings
47+
*
48+
* @return rings
49+
*/
4050
public List<T> getRings() {
4151
return rings;
4252
}
4353

54+
/**
55+
* Set the rings
56+
*
57+
* @param rings
58+
* rings
59+
*/
4460
public void setRings(List<T> rings) {
4561
this.rings = rings;
4662
}
4763

64+
/**
65+
* Add a ring
66+
*
67+
* @param ring
68+
* ring
69+
*/
4870
public void addRing(T ring) {
4971
rings.add(ring);
5072
}
5173

5274
/**
5375
* Get the number of rings
5476
*
55-
* @return
77+
* @return number of rings
5678
*/
5779
public int numRings() {
5880
return rings.size();

src/main/java/mil/nga/wkb/geom/Geometry.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,49 @@ public abstract class Geometry {
2626
* Constructor
2727
*
2828
* @param geometryType
29+
* geometry type
2930
* @param hasZ
31+
* has z
3032
* @param hasM
33+
* has m
3134
*/
32-
protected Geometry(GeometryType geometryType, boolean hasZ,
33-
boolean hasM) {
35+
protected Geometry(GeometryType geometryType, boolean hasZ, boolean hasM) {
3436
this.geometryType = geometryType;
3537
this.hasZ = hasZ;
3638
this.hasM = hasM;
3739
}
3840

41+
/**
42+
* Get the geometry type
43+
*
44+
* @return geometry type
45+
*/
3946
public GeometryType getGeometryType() {
4047
return geometryType;
4148
}
4249

50+
/**
51+
* Does the geometry have z coordinates
52+
*
53+
* @return true if has z coordinates
54+
*/
4355
public boolean hasZ() {
4456
return hasZ;
4557
}
4658

59+
/**
60+
* Does the geometry have m coordinates
61+
*
62+
* @return true if has m coordinates
63+
*/
4764
public boolean hasM() {
4865
return hasM;
4966
}
5067

5168
/**
5269
* Get the Well-Known Binary code
5370
*
54-
* @return
71+
* @return Well-Known Binary code
5572
*/
5673
public int getWkbCode() {
5774
int code = geometryType.getCode();

src/main/java/mil/nga/wkb/geom/GeometryCollection.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public class GeometryCollection<T extends Geometry> extends Geometry {
1919
* Constructor
2020
*
2121
* @param hasZ
22+
* has z
2223
* @param hasM
24+
* has m
2325
*/
2426
public GeometryCollection(boolean hasZ, boolean hasM) {
2527
super(GeometryType.GEOMETRYCOLLECTION, hasZ, hasM);
@@ -29,8 +31,11 @@ public GeometryCollection(boolean hasZ, boolean hasM) {
2931
* Constructor
3032
*
3133
* @param type
34+
* geometry type
3235
* @param hasZ
36+
* has z
3337
* @param hasM
38+
* has m
3439
*/
3540
protected GeometryCollection(GeometryType type, boolean hasZ, boolean hasM) {
3641
super(type, hasZ, hasM);
@@ -39,7 +44,7 @@ protected GeometryCollection(GeometryType type, boolean hasZ, boolean hasM) {
3944
/**
4045
* Get the list of geometries
4146
*
42-
* @return
47+
* @return geometries
4348
*/
4449
public List<T> getGeometries() {
4550
return geometries;
@@ -49,6 +54,7 @@ public List<T> getGeometries() {
4954
* Set the geometries
5055
*
5156
* @param geometries
57+
* geometries
5258
*/
5359
public void setGeometries(List<T> geometries) {
5460
this.geometries = geometries;
@@ -58,6 +64,7 @@ public void setGeometries(List<T> geometries) {
5864
* Add a geometry
5965
*
6066
* @param geometry
67+
* geometry
6168
*/
6269
public void addGeometry(T geometry) {
6370
geometries.add(geometry);
@@ -66,7 +73,7 @@ public void addGeometry(T geometry) {
6673
/**
6774
* Get the number of geometries in the collection
6875
*
69-
* @return
76+
* @return number of geometries
7077
*/
7178
public int numGeometries() {
7279
return geometries.size();

0 commit comments

Comments
 (0)