-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make GeometryCollection a Geometry as specified in the spec at sectio…
…ns 1.4 and 3.1.8 (#749)
- Loading branch information
1 parent
560aaf6
commit 273fca9
Showing
11 changed files
with
47 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
services-geojson/src/main/java/com/mapbox/geojson/CoordinateContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.mapbox.geojson; | ||
|
||
/** | ||
* Each of the s geometries which make up GeoJson implement this interface and consume a varying | ||
* dimension of {@link Point} list. Since this is varying, each geometry object fulfills the | ||
* contract by replacing the generic with a well defined list of Points. | ||
* | ||
* @param <T> a generic allowing varying dimensions for each GeoJson geometry | ||
* @since 3.0.0 | ||
*/ | ||
public interface CoordinateContainer<T> extends Geometry { | ||
|
||
/** | ||
* the coordinates which define the geometry. Typically a list of points but for some geometry | ||
* such as polygon this can be a list of a list of points, thus the return is generic here. | ||
* | ||
* @return the {@link Point}s which make up the coordinates defining the geometry | ||
* @since 3.0.0 | ||
*/ | ||
T coordinates(); | ||
} |
15 changes: 2 additions & 13 deletions
15
services-geojson/src/main/java/com/mapbox/geojson/Geometry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
package com.mapbox.geojson; | ||
|
||
/** | ||
* Each of the seven geometries which make up GeoJson implement this interface and consume a varying | ||
* dimension of {@link Point} list. Since this is varying, each geometry object fulfills the | ||
* contract by replacing the generic with a well defined list of Points. | ||
* Each of the six geometries and {@link GeometryCollection} which make up GeoJson implement this interface. | ||
* | ||
* @param <T> a generic allowing varying dimensions for each GeoJson geometry | ||
* @since 1.0.0 | ||
*/ | ||
public interface Geometry<T> extends GeoJson { | ||
public interface Geometry extends GeoJson { | ||
|
||
/** | ||
* the coordinates which define the geometry. Typically a list of points but for some geometry | ||
* such as polygon this can be a list of a list of points, thus the return is generic here. | ||
* | ||
* @return the {@link Point}s which make up the coordinates defining the geometry | ||
* @since 1.0.0 | ||
*/ | ||
T coordinates(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters