openjump-gis / openjump

OpenJUMP, the Open Source GIS with more than one trick in its kangaroo pocket, takes the leap from svn to git. join the effort!
http://openjump.org
GNU General Public License v2.0
28 stars 14 forks source link

ECW support on OpenJUMP #65

Open ma15569 opened 1 year ago

ma15569 commented 1 year ago

Recently I needed to use some ECW files of large size (6-8 Gb) on OpenJUMP in Windows with JRE 64bit.

OpenJUMP has embedded native ECW drivers (coming from ECW, I think) that work fine with this files, unfortunately these drivers work only with Java 32bit.

I tried to use OpenJUMP and GDAL , following the note at: https://ojwiki.soldin.de/index.php?title=Working_with_Raster#GDAL_support_.28Windows.2C_Linux_only.29 I used the most recent GDAL 3.5.0 (https://sourceforge.net/projects/jump-pilot/files/OpenJUMP_plugins/Drivers/GDAL-win-x86x64-3.5.0stable-20220620.zip/download).

I realized that (with both java 64bit and 32 bit) small/medium size ECW are opened with no problem but not with this large ECW files.

Could it be a problem of GDAL version? Other java software, like GvSIG, seems not to have this limitation on loading ECW via GDAL. I gave a look to the bug reports and find also this note which could be useful for the discussion https://sourceforge.net/p/jump-pilot/bugs/444/

Best regards Peppe

edeso commented 1 year ago

is it possible that GvSIG is indeed just using the aformentioned 32bit ECW native drivers?

wrt. GDAL there is little we can do. you could try if cmd line GDAL works better, to pinpoint an issue in the ImageIO-Ext implementation. you can try the latest OSGEO-Live 15 where i took strife to have gdal-jni included. maybe it just does not work well on windows?

but in the end, i don't see us fixing up those or compile 64bit binaries from the outdated Ermapper SDK 3.3 files, in case we are able to find the sources ;) see also https://ojwiki.soldin.de/index.php?title=OpenJUMP_Licensing

jratike80 commented 1 year ago

It is not possible to compile 64bit binaries from 3.3. SDK https://supportsi.hexagon.com/help/s/question/0D52o0000CMbSJDCQ3/ecw-jp2-sdk-3x-still-available?language=en_US

edeso commented 1 year ago

is Hexagon the current ECW patent holder?

they just write " 3.3 SDK was released before we started supporting 64 bit platforms. " so in theory, if s.b. would get a hold of the old open sources, they might get i compiled or beat it into shape. but surely the effort should rather go into GDAL ECW support instead!

ma15569 commented 1 year ago

I used GvSIG with java 64 bit, possibly the embedded GDAL is also 64 bit. I choose GvSIG as it was in Java like OpenJUMP. But it seems that GvSIG doesn't use imageio-ext libraries. I will test OSGEO Live . Giuseppe

edeso commented 1 year ago

@ma15569

ma15569 commented 1 year ago

Hi Ede, thanks for your availability.

Large ECW: Here you can find two samples of large ECW that OpenJUMP cannot open. http://downloads.gvsig.org/download/geodata/raster/ecw/. I used the option Referenced Image (GDAL ECW Image Reader 1.0 GeoSolutions) This is the message of error I got: com.vividsolutions.jump.workbench.imagery.ReferencedImageException: Failed to open "valencia2002.ecw" with "Referenced Image (GDAL ECW Image Reader, version 1.0, GeoSolutions)" driver. Try another driver and check the image for corruption.

Small ECW: This is a sample of small sized ECW file which OpenJUMP can open: https://sourceforge.net/projects/opensit/files/Test%20file/Test%20raster/ecw/?upload_just_completed=true

ma15569 commented 1 year ago

I use Windows 10 with JRE 64-bit 1.8.0

edeso commented 1 year ago

will have a look when time permits. any idea where i can find the sources for the latest gvSIG desktop release ?

ma15569 commented 1 year ago

Not found. The lates available is quite oldç http://devel.gvsig.org/svn/gvsig-desktop/tags/org.gvsig.desktop-2.0.304/

ma15569 commented 1 year ago

Or http://devel.gvsig.org/svn/gvsig-desktop/trunk/

edeso commented 1 year ago

Or http://devel.gvsig.org/svn/gvsig-desktop/trunk/

2.0.xxx too http://devel.gvsig.org/svn/gvsig-desktop/trunk/org.gvsig.desktop/pom.xml

would you mind contacting them and ask for the sources? README.txt in gvSIG-desktop-2.5.1-3046-final-win-x86_64.zip mentions

ma15569 commented 1 year ago

I wrote them, let us wait for the answer

ma15569 commented 1 year ago

Hi Ede, this is the answer from GvSIG teamç

Good morning Giuseppe,

Regarding your question about where the gvSIG Desktop sources are, you can find all the information in this post: (https://blog.gvsig.org/2015/12/23/donde-estan-los-fuentes-de-gvsig-desktop/)

The only thing is that it has been around for some time, and the only sentence that has become obsolete is the one that talks about “Create your own gvSIG (New plugin!!)”, which is a plugin that no longer exists.

For the rest, that post is still the answer to the question of where are the sources.

Anyway, after knowing where they are, the next thing you usually need to know is the following links:

How to download and compile gvSIG 2.1.0 on Linux and Windows https://blog.gvsig.org/2014/12/15/how-to-download-and-compile-gvsig-2-1-0-on-linux-and-windows/

How to download and compile a gvSIG 2.1.0 plugin https://blog.gvsig.org/2014/12/16/how-to-download-and-compile-a-gvsig-2-1-0-plugin/

Compiling and debugging an example plugin for gvSIG 2.1.0 from an IDE (NetBeans). https://blog.gvsig.org/2014/12/29/compiling-and-debugging-an-example-plugin-for-gvsig-2-1-0-from-a-netbeans-ide/

although it indicates 2.1.0 it applies to the 2.x branch.

Regarding where to find the sources of each plugin... you would have to look at https://redmine.gvsig.net/redmine/projects

For example if you search for GDAL there, you will find gvSIG data providers based on gdal

And our advice is that you enter the project and look in the "repository" tab (having the browser configured in English, it will be something similar in Spanish) and look at the date to try to find out which projects have been developed more.

Then you go to the "Overview" tab to see where the SVN is.

We hope this information has been useful to you.

All the best gvSIG team

mukoki commented 1 year ago

Not sure it is related but in my installation process, nowadays, I have the following message : [ERROR] 2022-11-04_09:10:03.665 ECW/JP2 native libs n'a pas été installé. reason: no jecw in java.library.path:

edeso commented 1 year ago

ECW/JP2 native libs n'a pas été installé. reason: no jecw in java.library.path:

jecw JNI are the above mentioned "Ermapper SDK 3.3" native libs avail for 32bit only mentioned above.