You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2016/05/16 21:15:50 UTC

svn commit: r1744141 [1/3] - in /sis/data/non-free: ./ sis-epsg/ sis-epsg/src/ sis-epsg/src/main/ sis-epsg/src/main/java/ sis-epsg/src/main/java/org/ sis-epsg/src/main/java/org/apache/ sis-epsg/src/main/java/org/apache/sis/ sis-epsg/src/main/java/org/a...

Author: desruisseaux
Date: Mon May 16 21:15:50 2016
New Revision: 1744141

URL: http://svn.apache.org/viewvc?rev=1744141&view=rev
Log:
Initial commit of EPSG geodetic dataset.

Added:
    sis/data/non-free/
    sis/data/non-free/sis-epsg/   (with props)
    sis/data/non-free/sis-epsg/pom.xml   (with props)
    sis/data/non-free/sis-epsg/src/
    sis/data/non-free/sis-epsg/src/main/
    sis/data/non-free/sis-epsg/src/main/java/
    sis/data/non-free/sis-epsg/src/main/java/org/
    sis/data/non-free/sis-epsg/src/main/java/org/apache/
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java   (with props)
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/package-info.java   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/
    sis/data/non-free/sis-epsg/src/main/resources/META-INF/
    sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/META-INF/NOTICE   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/
    sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/org/
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/Data.sql   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/FKeys.sql   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/LICENSE.html   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/LICENSE.txt   (with props)
    sis/data/non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/Tables.sql   (with props)
    sis/data/non-free/sis-epsg/src/test/
    sis/data/non-free/sis-epsg/src/test/java/
    sis/data/non-free/sis-epsg/src/test/java/org/
    sis/data/non-free/sis-epsg/src/test/java/org/apache/
    sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/
    sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/
    sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/
    sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/
    sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/epsg/
    sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProviderTest.java   (with props)

Propchange: sis/data/non-free/sis-epsg/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon May 16 21:15:50 2016
@@ -0,0 +1,10 @@
+.project
+.settings
+.classpath
+.jetproperties
+.wtpmodules
+target
+bin
+cobertura.ser
+nbproject
+nbactions.xml

Added: sis/data/non-free/sis-epsg/pom.xml
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/pom.xml?rev=1744141&view=auto
==============================================================================
--- sis/data/non-free/sis-epsg/pom.xml (added)
+++ sis/data/non-free/sis-epsg/pom.xml Mon May 16 21:15:50 2016
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns              = "http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi          = "http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0
+                               http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.sis</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.7-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.sis.non-free</groupId>
+  <artifactId>sis-epsg</artifactId>
+  <version>0.7-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>EPSG dataset for Apache SIS</name>
+  <url>http://www.epsg.org</url>
+  <description>
+The EPSG geodetic dataset provides definitions for thousands of Coordinate Reference Systems (CRS),
+ together with parameter values for thousands of Coordinate Operations between various pairs of CRS.
+ This 'sis-epsg' module contains the SQL scripts for creating a local copy of EPSG geodetic dataset.
+ EPSG is maintained by the IOGP Surveying &amp; Positioning Committee and reproduced in this module
+ with identical content. See http://www.epsg.org/ for more information.
+  </description>
+
+  <licenses>
+    <license>
+      <name>EPSG terms of use</name>
+      <url>http://www.epsg.org/TermsOfUse</url>
+      <distribution>manual</distribution>
+    </license>
+    <license>
+      <name>Apache License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <scm>
+    <connection>
+      scm:svn:http://svn.apache.org/repos/asf/sis/data/non-free/sis-epsg
+    </connection>
+    <developerConnection>
+      scm:svn:https://svn.apache.org/repos/asf/sis/data/non-free/sis-epsg
+    </developerConnection>
+    <url>http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg</url>
+  </scm>
+
+  <developers>
+    <developer>
+      <name>Martin Desruisseaux</name>
+      <id>desruisseaux</id>
+      <email>martin.desruisseaux@geomatys.com</email>
+      <organization>Geomatys</organization>
+      <organizationUrl>http://www.geomatys.com/</organizationUrl>
+      <timezone>+1</timezone>
+      <roles>
+        <role>Module Maintainer</role>
+        <role>Java Developer</role>
+      </roles>
+    </developer>
+  </developers>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.sis.referencing.epsg</Bundle-SymbolicName>
+            <Require-Capability>osgi.extender;
+            filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
+            <Provide-Capability>osgi.serviceloader;
+            osgi.serviceloader=org.apache.sis.setup.InstallationResources</Provide-Capability>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <!--
+    While this module declares a dependency to SIS 0.7, it can be used with 0.7-jdk6, 0.7-jdk7 or 0.7-jdk8 as well.
+    It is up to the user to choose the Apache SIS version.
+  -->
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.sis.core</groupId>
+      <artifactId>sis-referencing</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: sis/data/non-free/sis-epsg/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/data/non-free/sis-epsg/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java?rev=1744141&view=auto
==============================================================================
--- sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java (added)
+++ sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java [UTF-8] Mon May 16 21:15:50 2016
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing.factory.sql.epsg;
+
+import java.util.Locale;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import org.apache.sis.internal.util.Constants;
+import org.apache.sis.referencing.factory.sql.InstallationScriptProvider;
+
+
+/**
+ * Provides SQL scripts for creating a local copy of the EPSG geodetic dataset.
+ * Provides also a copy of the <a href="http://www.epsg.org/TermsOfUse">EPSG terms of use</a>,
+ * which should be accepted by users before the EPSG dataset can be installed.
+ *
+ * <p><b>Notice</b></p>
+ * EPSG is maintained by the <a href="http://www.iogp.org/">International Association of Oil and Gas Producers</a>
+ * (IOGP) Surveying &amp; Positioning Committee. The SQL scripts are given by this class with identical content,
+ * but in a more compact format.
+ *
+ * @author Martin Desruisseaux (Geomatys)
+ *
+ * @see <a href="http://www.epsg.org/">http://www.epsg.org/</a>
+ */
+public class ScriptProvider extends InstallationScriptProvider {
+    /**
+     * Creates a new EPSG scripts provider.
+     */
+    public ScriptProvider() {
+        super(Constants.EPSG, PREPARE, "Tables.sql", "Data.sql", "FKeys.sql", FINISH);
+    }
+
+    /**
+     * Returns a copy of EPSG terms of use.
+     *
+     * @param  authority  one of the values returned by {@link #getAuthorities()}.
+     * @param  locale     the preferred locale for the terms of use.
+     * @param  mimeType   either {@code "text/plain"} or {@code "text/html"}.
+     * @return the terms of use in plain text or HTML, or {@code null} if the license is presumed already accepted.
+     * @throws IOException if an error occurred while reading the license file.
+     *
+     * @see <a href="http://www.epsg.org/TermsOfUse">http://www.epsg.org/TermsOfUse</a>
+     */
+    @Override
+    public String getLicense(final String authority, final Locale locale, final String mimeType) throws IOException {
+        final String filename;
+        if ("text/plain".equalsIgnoreCase(mimeType)) {
+            filename = "LICENSE.txt";
+        } else if ("text/html".equalsIgnoreCase(mimeType)) {
+            filename = "LICENSE.html";
+        } else {
+            return null;
+        }
+        final StringBuilder buffer = new StringBuilder();
+        final String lineSeparator = System.getProperty("line.separator", "\n");
+        final BufferedReader in = new BufferedReader(new InputStreamReader(
+                ScriptProvider.class.getResourceAsStream(filename), "UTF-8"));
+        try {
+            String line;
+            while ((line = in.readLine()) != null) {
+                buffer.append(line).append(lineSeparator);
+            }
+        } finally {
+            in.close();
+        }
+        return buffer.toString();
+    }
+
+    /**
+     * Returns the content for the SQL script of the given name.
+     *
+     * @param name  either {@code "Tables.sql"}, {@code "Data.sql"} or {@code "FKeys.sql"}.
+     * @return the SQL script of the given name, or {@code null} if the given name is not one of the expected names.
+     */
+    @Override
+    protected InputStream openStream(final String name) {
+        return ScriptProvider.class.getResourceAsStream(name);
+    }
+}

Propchange: sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/package-info.java
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/package-info.java?rev=1744141&view=auto
==============================================================================
--- sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/package-info.java (added)
+++ sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/package-info.java [UTF-8] Mon May 16 21:15:50 2016
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SQL scripts for EPSG geodetic data set installation.
+ * The <a href="http://www.epsg.org/">EPSG</a> geodetic dataset provides definitions for thousands of
+ * {@linkplain org.opengis.referencing.crs.CoordinateReferenceSystem Coordinate Reference Systems} (CRS),
+ * together with parameter values for thousands of {@linkplain org.opengis.referencing.operation.ConcatenatedOperation
+ * Coordinate Operations} between various pairs of CRS. This {@code sis-epsg} module contains the SQL scripts
+ * for creating a local copy of EPSG geodetic dataset.
+ *
+ * <p><b>Licensing</b></p>
+ * EPSG is maintained by the <a href="http://www.iogp.org/">International Association of Oil and Gas Producers</a>
+ * (IOGP) Surveying &amp; Positioning Committee and is reproduced in this module with identical content, but in a
+ * more compact format. All SQL scripts in this module are subject to <a href="http://www.epsg.org/TermsOfUse">EPSG
+ * terms of use</a>. The remaining (Java code, configuration files) are under Apache 2 license.
+ *
+ * @author Martin Desruisseaux (Geomatys)
+ */
+package org.apache.sis.referencing.factory.sql.epsg;

Propchange: sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE?rev=1744141&view=auto
==============================================================================
--- sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE (added)
+++ sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE [UTF-8] Mon May 16 21:15:50 2016
@@ -0,0 +1 @@
+link ../org/apache/sis/referencing/factory/sql/epsg/LICENSE.txt
\ No newline at end of file

Propchange: sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Propchange: sis/data/non-free/sis-epsg/src/main/resources/META-INF/LICENSE
------------------------------------------------------------------------------
    svn:special = *

Added: sis/data/non-free/sis-epsg/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/src/main/resources/META-INF/NOTICE?rev=1744141&view=auto
==============================================================================
--- sis/data/non-free/sis-epsg/src/main/resources/META-INF/NOTICE (added)
+++ sis/data/non-free/sis-epsg/src/main/resources/META-INF/NOTICE [UTF-8] Mon May 16 21:15:50 2016
@@ -0,0 +1,10 @@
+EPSG dataset for Apache SIS
+Copyright International Association of Oil and Gas Producers (IOGP)
+Copyright 2010-2016 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes geodetic dataset maintained by the
+International Association of Oil and Gas Producers (IOGP)
+http://www.epsg.org/

Propchange: sis/data/non-free/sis-epsg/src/main/resources/META-INF/NOTICE
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/data/non-free/sis-epsg/src/main/resources/META-INF/NOTICE
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Added: sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources?rev=1744141&view=auto
==============================================================================
--- sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources (added)
+++ sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources [UTF-8] Mon May 16 21:15:50 2016
@@ -0,0 +1 @@
+org.apache.sis.referencing.factory.sql.epsg.ScriptProvider

Propchange: sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sis/data/non-free/sis-epsg/src/main/resources/META-INF/services/org.apache.sis.setup.InstallationResources
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8