Skip to content
Merged
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 @@ -32,7 +32,7 @@ public static String readCollectionId(JSONObject collection) {
* @param parameters
* @return geometry
*/
public static IGeometry readGeometry(JSONObject collection) {
public static IGeometry readGeometry(JSONObject collection, boolean featureOnly) {
GeometryBuilder gBuilder = Geometry.builder();

JSONObject extent = collection.getJSONObject("extent");
Expand All @@ -49,7 +49,7 @@ public static IGeometry readGeometry(JSONObject collection) {
}

// TODO find non-ad-hoc cases
if (collection.getString("id").equals("slovak_SK_v5_reference-points_EUNIS2012")) {
if (collection.getString("id").equals("slovak_SK_v5_reference-points_EUNIS2012") || featureOnly) {
return gBuilder.build().withProjection(Projection.DEFAULT_PROJECTION_CODE).withTimeType("logical");
}
return gBuilder.build().withProjection(Projection.DEFAULT_PROJECTION_CODE).withTimeType("grid");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ public Builder validate(String urn, URL url, IParameters<String> userData, IMoni
userData.put("collectionId", collectionId);
}


IGeometry geometry = STACCollectionParser.readGeometry(collectionData);
IGeometry geometry = null;
if (!userData.contains("asset") && !userData.contains("jsonSelector")) {
geometry = STACCollectionParser.readGeometry(collectionData, true);
} else {
geometry = STACCollectionParser.readGeometry(collectionData, false);
}
Builder builder = new ResourceBuilder(urn).withParameters(userData).withGeometry(geometry).withType(Type.OBJECT);

// The default URL of the resource is the collection endpoint. May be overwritten.
Expand Down
Loading