svn commit: r1771762 - in /sis/branches/JDK8/core: sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ sis-utility/src/main/java/org/apache/sis/internal/system/ sis-utility/src
Author: desruisseaux Date: Mon Nov 28 15:34:32 2016 New Revision: 1771762 URL: http://svn.apache.org/viewvc?rev=1771762=rev Log: Javadoc formatting and add assertions. No significant change in this commit. Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySynchronizedIterator.java Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java?rev=1771762=1771761=1771762=diff == --- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Providers.java [UTF-8] Mon Nov 28 15:34:32 2016 @@ -43,7 +43,7 @@ public final class Providers extends Laz /** * Caches a new element, possibly substituting the created instance by a previously created instance. * - * @param element The element to add to the cache. + * @param element the element to add to the cache. */ @Override protected void cache(OperationMethod element) { Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java?rev=1771762=1771761=1771762=diff == --- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] Mon Nov 28 15:34:32 2016 @@ -67,9 +67,9 @@ public final class DefaultFactories exte /** * Returns {@code true} if the default factory of the given type is the given instance. * - * @paramThe interface type. - * @param type The interface type. - * @param factory The factory implementation to test. + * @paramthe interface type. + * @param type the interface type. + * @param factory the factory implementation to test. * @return {@code true} if the given factory implementation is the default instance. */ public static synchronized boolean isDefaultInstance(final Class type, final T factory) { @@ -81,9 +81,9 @@ public final class DefaultFactories exte * This method gives preference to Apache SIS implementation of factories if present. * This is a temporary mechanism while we are waiting for a real dependency injection mechanism. * - * @paramThe interface type. - * @param type The interface type. - * @return A factory implementing the given interface, or {@code null} if none. + * @param the interface type. + * @param type the interface type. + * @return a factory implementing the given interface, or {@code null} if none. */ public static synchronized T forClass(final Class type) { T factory = type.cast(FACTORIES.get(type)); @@ -124,9 +124,9 @@ public final class DefaultFactories exte * Returns a factory which is guaranteed to be present. If the factory is not found, * this will be considered a configuration error (corrupted JAR files of incorrect classpath). * - * @paramThe interface type. - * @param type The interface type. - * @return A factory implementing the given interface. + * @param the interface type. + * @param type the interface type. + * @return a factory implementing the given interface. * * @since 0.6 */ @@ -143,11 +143,11 @@ public final class DefaultFactories exte * Returns a factory of the given type, making sure that it is an implementation of the given class. * Use this method only when we know that Apache SIS registers only one implementation of a given service. * - * @paramThe interface type. - * @paramThe requested implementation class. - * @param type The interface type. - * @param impl The requested implementation class. - * @return A factory implementing the given interface. + * @param the interface type. + * @param the requested implementation class. + * @param type the interface type. + * @param impl the requested
[jira] [Updated] (SIS-341) Support "crs-compound" in URLs
[ https://issues.apache.org/jira/browse/SIS-341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Desruisseaux updated SIS-341: Description: The {{CRS.forCode(String)}} method accepts URL in the {{crs}} space, like below: {noformat} http://www.opengis.net/def/crs/epsg/0/4326 {noformat} We need to also accept URL in the {{crs-compound}} space, like below: {noformat} http://www.opengis.net/def/crs-compound? 1=http://http://www.opengis.net/def/crs/OGC/0/AnsiDate; 2=http://www.codes.wmo.int/GRIB2/table4.5/IsobaricSurface {noformat} It should be possible to use this kind of CRS in GML like below (example from U.K. MetOffice): {code:xml} http://www.opengis.net/def/crs-compound? 1=http://http://www.opengis.net/def/crs/OGC/0/AnsiDate; 2=http://www.codes.wmo.int/GRIB2/table4.5/IsobaricSurface; axisLabels="Time pressure" srsDimension="2"> {code} was: The {{CRS.forCode(String)}} method accepts URL in the {{crs}} space, like below: {noformat} http://www.opengis.net/def/crs/epsg/0/4326 {noformat} We need to also accept URL in the {{crs-compound}} space, like below: {noformat} http://www.opengis.net/def/crs-compound? 1=http://http://www.opengis.net/def/crs/OGC/0/AnsiDate; 2=http://www.codes.wmo.int/GRIB2/table4.5/IsobaricSurface {noformat} > Support "crs-compound" in URLs > -- > > Key: SIS-341 > URL: https://issues.apache.org/jira/browse/SIS-341 > Project: Spatial Information Systems > Issue Type: Improvement > Components: Referencing >Affects Versions: 0.7 >Reporter: Martin Desruisseaux >Assignee: Martin Desruisseaux > Fix For: 0.8 > > > The {{CRS.forCode(String)}} method accepts URL in the {{crs}} space, like > below: > {noformat} > http://www.opengis.net/def/crs/epsg/0/4326 > {noformat} > We need to also accept URL in the {{crs-compound}} space, like below: > {noformat} > http://www.opengis.net/def/crs-compound? > 1=http://http://www.opengis.net/def/crs/OGC/0/AnsiDate; > 2=http://www.codes.wmo.int/GRIB2/table4.5/IsobaricSurface > {noformat} > It should be possible to use this kind of CRS in GML like below (example from > U.K. MetOffice): > {code:xml} > http://www.opengis.net/def/crs-compound? > > 1=http://http://www.opengis.net/def/crs/OGC/0/AnsiDate; > > 2=http://www.codes.wmo.int/GRIB2/table4.5/IsobaricSurface; > axisLabels="Time pressure" srsDimension="2"> > upperBound="PT48H" /> > upperBound="200.00" /> > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SIS-342) Support temporal CRS in URL
Martin Desruisseaux created SIS-342: --- Summary: Support temporal CRS in URL Key: SIS-342 URL: https://issues.apache.org/jira/browse/SIS-342 Project: Spatial Information Systems Issue Type: Improvement Components: Referencing Affects Versions: 0.7, 0.6 Reporter: Martin Desruisseaux Assignee: Martin Desruisseaux Fix For: 0.8 The {{CRS.forCode(String)}} method supports CRS defined in the OGC namespace, but currently only for geographic or projected CRS. We need to support also temporal CRS like below: {noformat} http://http://www.opengis.net/def/crs/OGC/0/AnsiDate {noformat} Candidates for inclusion are: * AnsiDate * JulianDate * TruncatedJulianDate * UnixTime * ChronometricGeologicTime The list can be viewed from http://www.opengis.net/def/crs/OGC/0. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
svn commit: r1771707 - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/ storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ storage/sis-storage
Author: desruisseaux Date: Mon Nov 28 10:52:22 2016 New Revision: 1771707 URL: http://svn.apache.org/viewvc?rev=1771707=rev Log: Cleanup the creation of GeodeticDatum in GeoTIFF files. Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoCodes.java sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoKeys.java sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java?rev=1771707=1771706=1771707=diff == --- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java [UTF-8] Mon Nov 28 10:52:22 2016 @@ -32,7 +32,7 @@ import static org.apache.sis.internal.me /** - * Basic information required to uniquely identify a resource or resources. + * Method used to represent geographic information in the dataset. * * Limitations: * Modified: sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java?rev=1771707=1771706=1771707=diff == --- sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java [UTF-8] (original) +++ sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java [UTF-8] Mon Nov 28 10:52:22 2016 @@ -16,14 +16,20 @@ */ package org.apache.sis.storage.geotiff; -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; import java.util.Map; +import java.util.HashMap; +import java.util.Collections; +import java.util.StringJoiner; import java.util.logging.Level; import java.util.logging.LogRecord; +import java.util.NoSuchElementException; +import java.lang.reflect.Array; import javax.measure.Unit; +import javax.measure.Quantity; +import javax.measure.quantity.Angle; +import javax.measure.quantity.Length; +import org.opengis.metadata.Identifier; import org.opengis.metadata.spatial.CellGeometry; import org.opengis.metadata.spatial.PixelOrientation; import org.opengis.parameter.ParameterValueGroup; @@ -48,9 +54,11 @@ import org.opengis.util.FactoryException import org.opengis.util.NoSuchIdentifierException; import org.apache.sis.internal.geotiff.Resources; +import org.apache.sis.internal.referencing.NilReferencingObject; import org.apache.sis.internal.storage.MetadataBuilder; import org.apache.sis.internal.system.DefaultFactories; import org.apache.sis.internal.util.Constants; +import org.apache.sis.internal.util.Utilities; import org.apache.sis.math.Vector; import org.apache.sis.measure.Units; import org.apache.sis.metadata.iso.citation.DefaultCitation; @@ -61,6 +69,9 @@ import org.apache.sis.referencing.cs.Coo import org.apache.sis.referencing.factory.GeodeticAuthorityFactory; import org.apache.sis.referencing.factory.GeodeticObjectFactory; import org.apache.sis.storage.DataStoreContentException; +import org.apache.sis.util.Characters; + +import static org.apache.sis.util.Utilities.equalsIgnoreMetadata; /** @@ -169,6 +180,13 @@ final class CRSBuilder { private CoordinateOperationFactory operationFactory; /** + * Name of the last object created. This is used by {@link #properties(String)} for reusing existing instance + * if possible. This is useful in GeoTIFF file since they do not use different names for geographic CRS, + * the datum and the ellipsoid. + */ +private Identifier lastName; + +/** * Creates a new builder of coordinate reference systems. * * @param reader where to report warnings if any. @@ -233,27 +251,55 @@ final class CRSBuilder { * Returns a map with the given name associated to the {@value org.opengis.referencing.IdentifiedObject#NAME_KEY} key. * This is an helper method for creating geodetic objects with {@link #objectFactory}. */ -private static Mapname(final String name) { -return Collections.singletonMap(IdentifiedObject.NAME_KEY, name); +private