You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@apache.org> on 2013/09/02 20:44:01 UTC

jena-spatial - dependency issue

Hi Ying,

There is a dependency on com.vividsolutions JTS. JTS does not have an 
acceptable license (it's LGPL).

It seems to be used via com.spatial4j.  That's OK for com.spatial4j 
still to be Apache Licensed because the dependency is not required. 
spatial4j uses:

     <optional>true</optional>

i.e. an end user can add it if they wish but aren't required to.  The 
Jena project needs to provide somethgin without a hard dependency on JTS.

The system needs to work without the com.vividsolutions::jts dependency.

So if I understand the code correctly:

public class SpatialQuery
....
     public static final SpatialContext ctx = SpatialContext.GEO ;


What capabilities does jena-spatial loose with this restriction?

	Andy


Re: jena-spatial - dependency issue

Posted by Andy Seaborne <an...@apache.org>.
On 04/09/13 17:02, Andy Seaborne wrote:
> On 04/09/13 16:21, Ying Jiang wrote:
>> Hi Andy,
>>
>> Thanks for pointing out the licence issue.
>>
>> In order to read geo data in WKT literal format, jena-spatial uses JTS
>> as a parsing tool. Yes, it's not a required feature if no WKT literals
>> are in geo data.
>
> I think its' the added shapes that the main thing JTS adds.  Paring WKT
> isn't that tricky :-)
>
> This is a bit of a nuisance but it's better to start simple and expand.
>
>> I've refactored the code to resolve the problem. Now jena-spatial can
>> work without JTS dependency. It's optional for a user to include JTS
>> in jena-spatial. Please check out the latest code of jena-spatial from
>> jena svn trunk. I'll also emphasise that in the documentation.
>
> I've removed the unused import statement as well.  To check, I deleted
> JTS from my local maven repo, recompiled and run the tests.  All looks
> good.
>
> I've checked the documentation as well - it correctly notes JTS is
> optional.

No - it's looking a bit more complicated.

I'm seeing the optional dependency pulled in by the build.  But if I 
remove the dependency altogether, tests start failing and the build 
fails. The build must work without JTS.

Ying - how much of the testing depends on JTS?  What impact will it have 
to have the tests not depend on JTS? (how much is lost?)

	Andy

http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4#JTS_.2F_WKT_.2F_Polygon_notes


Re: jena-spatial - dependency issue

Posted by Andy Seaborne <an...@apache.org>.
On 04/09/13 16:21, Ying Jiang wrote:
> Hi Andy,
>
> Thanks for pointing out the licence issue.
>
> In order to read geo data in WKT literal format, jena-spatial uses JTS
> as a parsing tool. Yes, it's not a required feature if no WKT literals
> are in geo data.

I think its' the added shapes that the main thing JTS adds.  Paring WKT 
isn't that tricky :-)

This is a bit of a nuisance but it's better to start simple and expand.

> I've refactored the code to resolve the problem. Now jena-spatial can
> work without JTS dependency. It's optional for a user to include JTS
> in jena-spatial. Please check out the latest code of jena-spatial from
> jena svn trunk. I'll also emphasise that in the documentation.

I've removed the unused import statement as well.  To check, I deleted 
JTS from my local maven repo, recompiled and run the tests.  All looks good.

I've checked the documentation as well - it correctly notes JTS is optional.

	Andy


Re: jena-spatial - dependency issue

Posted by Ying Jiang <jp...@gmail.com>.
Hi Andy,

Thanks for pointing out the licence issue.

In order to read geo data in WKT literal format, jena-spatial uses JTS
as a parsing tool. Yes, it's not a required feature if no WKT literals
are in geo data.

I've refactored the code to resolve the problem. Now jena-spatial can
work without JTS dependency. It's optional for a user to include JTS
in jena-spatial. Please check out the latest code of jena-spatial from
jena svn trunk. I'll also emphasise that in the documentation.

By the way, I've committed a document file of "spatial-query.mdtext"
[1] in the jena website svn. But the web page does not appear in jena
website front. I get 404-not-found error when accessing
"spatial-query.html" [2]. Could you please tell me why? Thanks!

[1] https://svn.apache.org/repos/asf/jena/site/trunk/content/documentation/query/spatial-query.mdtext
[2] http://jena.apache.org/documentation/query/spatial-query.html

Best regards,
Ying Jiang

On Tue, Sep 3, 2013 at 2:44 AM, Andy Seaborne <an...@apache.org> wrote:
> Hi Ying,
>
> There is a dependency on com.vividsolutions JTS. JTS does not have an
> acceptable license (it's LGPL).
>
> It seems to be used via com.spatial4j.  That's OK for com.spatial4j still to
> be Apache Licensed because the dependency is not required. spatial4j uses:
>
>     <optional>true</optional>
>
> i.e. an end user can add it if they wish but aren't required to.  The Jena
> project needs to provide somethgin without a hard dependency on JTS.
>
> The system needs to work without the com.vividsolutions::jts dependency.
>
> So if I understand the code correctly:
>
> public class SpatialQuery
> ....
>     public static final SpatialContext ctx = SpatialContext.GEO ;
>
>
> What capabilities does jena-spatial loose with this restriction?
>
>         Andy
>