Comments (14)
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.
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.
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.
@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.
@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.
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.
I'll cut a release later today. ๐ ๐คฆ
from proj4j.
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.
Yes, test resources should be fine! They are not shipped. Thanks for your help!
from proj4j.
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.
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.
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.
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.
@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)
- How I can use vunits in android? HOT 1
- Will there be support for +geoidgrids ? its commonly used for height transformation HOT 1
- VN2000 Error Exception in thread "main" java.lang.IllegalStateException: Latitude is out of range: 9738.514891355962
- Transforming from "EPSG:4326" to "EPSG:3857" results in precision error
- Reprojection results seem to be too imprecise
- Support for polar stereographic with alternate scales HOT 4
- altitude not working when Projecting HOT 1
- rhealpix is not supported HOT 1
- Datum.isEqual maybe have a bug
- Unknown projection: longlat HOT 23
- gtx files cannot be used?
- reprojection from epsg:31370 to epsg:3857 is inaccurate HOT 1
- Transverse Mercator Projection test failed HOT 1
- Equidistant Azimuthal (ESRI:54032) test failed HOT 1
- Robinson projection (ESRI:54030) test failed HOT 2
- UnknownAuthorityCodeException: EPSG:9054 HOT 3
- ntv2 grid support
- Proj4j should not use the Apache License if it contains the EPSG data set HOT 16
- Improve proj4j tests to reflect the recent changes and the moved out EPSG resources HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proj4j.