Code Monkey home page Code Monkey logo

Comments (14)

bchapuis avatar bchapuis commented on July 22, 2024 1

The new release now throws an exception when the epsg module is not included as a dependency, which is the expected behavior. From a license perspective, the proj4/nad/epsg file was the one causing concerns.

> java.lang.IllegalStateException: Unable to access CRS file: proj4/nad/epsg
    > 	at org.locationtech.proj4j.io.Proj4FileReader.readParametersFromFile(Proj4FileReader.java:44)
    > 	at org.locationtech.proj4j.io.Proj4FileReader.getParameters(Proj4FileReader.java:119)
    > 	at org.locationtech.proj4j.CRSFactory.createFromName(CRSFactory.java:83)
    > 	at org.apache.calcite.runtime.ProjectionTransformer.<init>(ProjectionTransformer.java:57)
    > 	at org.apache.calcite.runtime.SpatialTypeFunctions.ST_Transform(SpatialTypeFunctions.java:[1196]

@pomadchin should we improve the exception message and or the documentation?

@desruisseaux If I remember correclty, you mentionned that small extracts of the epsg database may fall under a fair use clause. Do you think we may include a couple of popular EPSGs in the core (e.g. 4326, 3857). If so, which EPSGs (apart from these two) would it make sense to include?

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

Thanks for catching it; Iโ€™ll check whatโ€™s going on and cut a fresh release; I think I know where the error is coming from

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

Hey! Could not make it yesterday, but should be good now: https://repo1.maven.org/maven2/org/locationtech/proj4j/proj4j/1.2.1/proj4j-1.2.1.pom ๐Ÿ‘

from proj4j.

bchapuis avatar bchapuis commented on July 22, 2024

@pomadchin Thanks a lot, the checks are now passing. However, I expected some tests to fail as we use EPSG:26986 (Massachusetts state plane meters). After looking at the sources, it looks like the epsg file is still in the proj4j core submodule. Shouldn't it be moved to the epsg submodule?

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

@bchapuis I think this file is not a part of the EPSG db; I tried to find the history of this file and it looks like it's been collected somehow for the proj4 project specifically, long time ago they didn't have a sqlite db but used plain files for the proj4string <=> epsg code conversion; it is a list of proj4 strings.

I am not sure this file is under the EPSG license; but if you're sure it is I can work on it as well; also see #90 (comment)

Mb you're referring to a very similar by name https://github.com/locationtech/proj4j/blob/master/epsg/src/main/resources/proj4/wkt/epsg.properties which is really a part of the EPSG DB.

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

You know what, I think you're right; I'll move all the resources into that epsg module; so none of projections going to work with the core only. I'll make a follow-up issue.

I think I had to just move everything,

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

I'll cut a release later today. ๐Ÿ‘ ๐Ÿคฆ

from proj4j.

bchapuis avatar bchapuis commented on July 22, 2024

Thanks a lot for your help.

I was just experimenting with this on my side and made a pull request. Here, the epsg submodule is included as a test dependency in the core submodule.

We still have some epsg files in the test resources, but I think that they will not be included in the final jar. I tried to move them as well, but this would require to modify the tests.

I hope this helps a bit.

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

Yes, test resources should be fine! They are not shipped. Thanks for your help!

from proj4j.

bchapuis avatar bchapuis commented on July 22, 2024

I am not sure this file is under the EPSG license; but if you're sure it is I can work on it as well; also see #90 (comment)

I'm not completly sure either. As the file contains a lot of epsg codes, I guess that it is under the same terms of use. Maybe @desruisseaux can crosscheck.

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

I feel like it makes sense to move all resources out just in case; you asked a question => definitely some one else may ask it; thanks for doing it; it is good that you noticed it and asked.

sorry Iโ€™m not by the laptop at the moment, will work on merging your pr ASAP!

from proj4j.

desruisseaux avatar desruisseaux commented on July 22, 2024

If we are talking about the epsg.properties file, indeed this is EPSG data encoded in a different way (as WKT definitions instead of CSV tables). Thanks for moving it.

About testing, as said above it is okay (to my knowledge) to use EPSG data during tests. What matter is what is included in the distribution. But at Apache (I don't know what is Eclipse policy), the fact that EPSG data are used for tests would be declared in the NOTICE file.

from proj4j.

desruisseaux avatar desruisseaux commented on July 22, 2024

The definition of "fair use" is subject to interpretation. My approach is to pick CRS that are collected in other well-known sources. For example OGC Web Map Server (WMS) defines a few CRS in the CRS:xxxx namespace with only a different axis order. I use the numerical data (e.g. ellipsoid axis length) but I exclude all EPSG metadata (scope, remarks, area of use, etc.) except the EPSG code, which I interpret as meaning "See EPSG:xxxx for more complete definition".

There is a list of CRS defined by WMS specification there. The sources that I use implies this list of EPSG codes of geographic CRS. For projected CRS, I guess that "World Mercator" (EPSG::3395) and Google Mercator are fair use.

If Proj4J has a field for remarks in CRS instances, it may be worth to put a remark like below (I attach this text to the CRS objects defined without EPSG database):

Definitions from public sources. When a definition corresponds to an EPSG object (ignoring metadata), the EPSG code is provided as a reference where to find the complete definition.

from proj4j.

pomadchin avatar pomadchin commented on July 22, 2024

@bchapuis @desruisseaux thank you both!

Yes @bchapuis we definitely need to improve the error message / docs (#96);

If any of these files / portions of the files can be moved back that will require some code changes as well ๐Ÿ’ญ but doable. With this one I will definitely ask for some help to understand which codes are safe to move.

But really I think that it's kind of 'okay' to expect that all of these resources can be considered under the EPSG License due to its source.

from proj4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.