Hello,

I don't think we have to worry about that this time : we are only carrying the shapefile for unit testing, and we don't seek to redistribute it changed.
I suggested a solution for the JIRA SIS-178 [1] created yesterday.

[1] https://issues.apache.org/jira/browse/SIS-178

Regards,
Marc.

-----Message d'origine----- From: Travis L Pinney
Sent: Monday, September 29, 2014 5:23 PM
To: dev
Subject: Re: Shapefile / DenseFeature : first name searched for returns a null value.

Hi Marc,

OpenStreetMap is under the ODBL [1]  currently.  The licensing comes
into play when you start mixing, deriving, or redistributing the data.

The ODBL is more closely related to GPL but focused on data.

I would run it by the Legal PMC before distributing it. According to
ASF Legal Previously Asked Questions [2], CC-A ShareAlike 2.5 and 3.0
may be included. ODBL differs from these licenses.

Another option is creating a shapefile with test data that can create
the reproduce the same error.

[1] Human readable version: http://opendatacommons.org/licenses/odbl/summary/
[2] http://www.apache.org/legal/resolved.html#cc-sa

Regards,
Travis

On Mon, Sep 29, 2014 at 10:29 AM, Marc Le Bihan <mlebiha...@gmail.com> wrote:
"is the OpenStreet map license compatible with the Apache 2 license? If not,
we can use the file for debugging but can not commit it to the SVN."
=> The Licensing terms of Openstreetmap has changed many times and are not
easy to understand [1] , but I think that for the time of debugging and even
for accompanying an unit test, it should be ok.
The web page where the export is described by them here [2] and ends with
the mention : "Content is available under Creative Commons
Attribution-ShareAlike 2.0 license unless otherwise noted.". I don't think
you have to take time to re-arrange the test.
I have created the issue in JIRA [3].

[1] http://en.wikipedia.org/wiki/OpenStreetMap#Licensing_terms
[2]
http://wiki.openstreetmap.org/wiki/WikiProject_France/Fonds_de_cartes/Contours_de_Communes_au_format_vecteur
[3] https://issues.apache.org/jira/browse/SIS-178

Regards,

Marc.

-----Message d'origine----- From: Martin Desruisseaux
Sent: Monday, September 29, 2014 11:12 AM
To: dev@sis.apache.org
Subject: Re: Shapefile / DenseFeature : first name searched for returns a
null value.

Hello Marc

Could you create a JIRA task [1] with the test case attached? For the
92-Hauts-de-Seine.shp.tar.gz test file, is the OpenStreet map license
compatible with the Apache 2 license? If not, we can use the file for
debugging but can not commit it to the SVN.

I will try to re-arrange the test in a way that doesn't use shapefile,
so we can both avoid licensing issue (if any) and move the test to
sis-feature module. I may take a few days since I'm travelling this week...

   Martin


[1] https://issues.apache.org/jira/browse/SIS



Le 29/09/14 07:28, Marc Le Bihan a écrit :

Ok, I have the Unit Test showing two problems, but I can't commit it
at the moment.
What the way to push them ? I think you have to set some rights for me
first ?

Here is the unit test I added in the sis-shapefile project (in the
branch JDK 8 I'm using at the moment) :

package org.apache.sis.storage.shapefile;

import static org.junit.Assert.*;

import java.io.*;

import org.apache.sis.storage.*;
import org.junit.*;
import org.opengis.feature.*;
import org.opengis.test.*;

/**
* Issues with features.
* @author Marc LE BIHAN
*/
public class IssuesWithFeaturesTest extends TestCase
{
  /**
   * Issue : the first property red by DenseFeature is null.
   * @throws DataStoreException if unable to find or read the shapefile.
   * @throws IOException if unable to find or read the shapefile.
   */
  @Test public void issueFirstPropertyNull() throws IOException,
DataStoreException {
     ShapeFile shapefile = new

ShapeFile("src/test/resources/org/apache/sis/storage/shapefile/92-Hauts-de-Seine.shp");

     Feature feature =
shapefile.FeatureMap.values().iterator().next(); // The shapefile has
36 features, take the first one.
     String city =
(String)feature.getProperty("COMMUNE\0\0\0\0").getValue();
     String refInsee =
(String)feature.getProperty("REF_INSEE\0\0").getValue();
     String zipCode =
(String)feature.getProperty("CODE_POSTA\0").getValue();

     // The first feature property you read (city here) will return a
null value.
     assertNotNull("The city should have an INSEE reference.", refInsee);
     assertNotNull("The city should have a zip code.", zipCode);
     assertNotNull("The city should have a name.", city);
  }

  /**
   * Issue : when features are loaded from a Shapefile, the DBF file
may load its properties with fields padded oddly.
   * When comes the times to query the feature content, the
getProperty(..) find nothing if the name is not padded.
   * @throws DataStoreException if unable to find or read the shapefile.
   * @throws IOException if unable to find or read the shapefile.
   */
  @Test public void featureIsTrickedByZerosChar() throws IOException,
DataStoreException
  {
     ShapeFile shapefile = new

ShapeFile("src/test/resources/org/apache/sis/storage/shapefile/92-Hauts-de-Seine.shp");

     Feature feature =
shapefile.FeatureMap.values().iterator().next(); // The shapefile has
36 features, take the first one.
     feature.getProperty("COMMUNE\0\0\0\0"); // The field name
currently set in the DBF.
     feature.getProperty("COMMUNE"); // fails because the DBF
describes this field as "COMMUNE\0\0\0\0".
  }
}

I added for test resources the shapefile contained in this
Openstreetmap tar.gz :

http://export.openstreetmap.fr/contours-administratifs/communes/92-Hauts-de-Seine.shp.tar.gz

Regards,

Marc.




Reply via email to