This is an automated email from the ASF dual-hosted git repository.

amanin pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 15564e3  fix(Feature): ensure envelope returned by property operation 
contains a CRS if any is available
15564e3 is described below

commit 15564e30eb2551e8472f3e1b55ba4429d2679255
Author: Alexis Manin <[email protected]>
AuthorDate: Thu May 28 19:48:27 2020 +0200

    fix(Feature): ensure envelope returned by property operation contains a CRS 
if any is available
---
 .../src/main/java/org/apache/sis/feature/EnvelopeOperation.java         | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java 
b/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
index 07a226f..b932010 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/feature/EnvelopeOperation.java
@@ -336,6 +336,8 @@ final class EnvelopeOperation extends AbstractOperation {
                 }
                 if (envelope == null) {
                     envelope = GeneralEnvelope.castOrCopy(genv);        // 
Should always be a cast without copy.
+                    // Ensure that default CRS is set in case envelope 
returned by geometry was not specified
+                    if (envelope.getCoordinateReferenceSystem() == null && crs 
!= null) envelope.setCoordinateReferenceSystem(crs);
                 } else {
                     envelope.add(genv);
                 }

Reply via email to