[Gdal-dev] Supporting ECW as a plugin on window,

Mo Wang mo at discoveraai.com
Fri Dec 19 12:57:08 EST 2008


Wickley,

 

When I typed www.ermapper.com <http://www.ermapper.com/>  I was led to
www.erdas.com <http://www.erdas.com/>  instead. Did the same occur to
you? If so, how did you get
ImageCompressionSDKSourceCode3.3Setup_20070509.zip from www.erdas.com
<http://www.erdas.com/> ? All I got from www.erdas.com
<http://www.erdas.com/>  was ecw_jpeg_2000_sdk_3_3.zip which I don't
think is the same as ImageCompressionSDKSourceCode3.3Setup_20070509.zip.
If not, how did you get to ER Mapper website?

 

Thanks.

 

Mo Wang

 

Applied Analysis Inc.

 

________________________________

From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Daniele Romagnoli
Sent: Friday, December 19, 2008 12:09 PM
To: wickley
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [Gdal-dev] Supporting ECW as a plugin on window,

 

Hi again,
a side note:
in the subject of your email, you are asking for "supporting ECW as a
plugin" whilst in the body of your email you are generally asking for
supporting ECW in GDAL.
The steps I have suggested in the previous email, are needed only if you
need to add ECW support as a separate plugin.
In case your aim is simply adding ECW in GDAL (without leveraging on the
"Plugin way") you can simply rebuild GDAL after having removed the
"ECW_PLUGIN = YES" line from NMAKE.opt. 

Hope this help.
Regards,
Daniele

On Fri, Dec 19, 2008 at 5:59 PM, Daniele Romagnoli
<dany.geotools at gmail.com> wrote:

Hi, 
I did a similar thing on 1.4.4 and 1.5.3.
Basically, you are building ECW driver as a plugin as stated by the flag
ECW_PLUGIN = YES
Therefore, you need to do a separate build of the ECW GDAL Driver. 
Go in gdal/frmts/ecw and run "nmake /f makefile.vc plugin"
This command should produce a gdal_ECW_JP2ECW.DLL.

Finally you need to define a GDAL_DRIVER_PATH environment variable
linking to the location where you have built gdal_ECW_JP2ECW.DLL.
After this, gdalinfo should find the ECW driver.

Let me know if you have additional issues, since I did these steps on
1.4.4 which needed some fixes that I have copied from 1.6.0 code. (I
guess 1.6.0 already contains all the proper declarations)

Regards,
Daniele





On Mon, Dec 15, 2008 at 3:21 AM, wickley <wickleyl at gmail.com> wrote:


Hello , I  have some question about supporting ECW in gdal.but I can not
solve  it. My step is following:

1.I download gdal-1.6.0 and
ImageCompressionSDKSourceCode3.3Setup_20070509.zip from ERMaper webset
and
Windows Server 2003 R2 Platform SDK from microsoft website.
2. I set up Windows Server 2003 R2 Platform SDK on my computer in
D:\Program
Files2.
3. I unzip the ImageCompressionSDKSourceCode3.3Setup_20070509.zip,and
select
E:\libecwj2-3.3
  \Source\NCSBuildQmake\libecwj2_win32_net_shared.vcproj,using visual
studio 2005.When open the file,
  it needs translate, and it translates well with no error and just two
warnings.
4. I set visual studio 2005 project->c/c++->general ->include
directory,and
add D:\Program Files2\Microsoft Platform SDK for  Windows Server 2003
R2\Include
5. I select debug,win32 ,and build libecwj2.dll successfully,and it is
included in E:\libecwj2-3.3\Source\NCSBuildQmake\Debug
6. I unzip gdal-1.6.0 to E:\gdal-1.6.0. change MSVC_VER=1400 .
7. for ECW support, I Uncomment the following and update to enable ECW
support.
   # Uncomment the following and update to enable ECW support.
   ECW_PLUGIN = YES
   ECWDIR  =   E:\libecwj2-3.3
   ECWLIB  =   $(ECWDIR)\Source\NCSBuildQmake\Debug\libecwj2.lib
8.   open E:\gdal-1.6.0\frmts\leveller\levellerdataset.cpp,and change {
"?,
kPI / 180.0, UNITLABEL_DEGREE } to
  { "?", kPI / 180.0, UNITLABEL_DEGREE }
9. I start visual studio 2005 commandline , and change the path to
E:\gdal-1.6.0, then ,I inputs command nmake /f makefile.vc,nmake /f
makefile.vc install and nmake /f makefile.vc devinstall.
10. I copy gdal16.dll to C:\WINDOWS\system32.
11. I set tools->options->projec and solution -> vc++ direction
->includingfile->C:\warmerda\bld\include

->libraries->C:\warmerda\bld\lib
12.I build a new project,and code following:
  #include "gdal_priv.h"
  #include "stdio.h"
  #include "gdal.h"
  #pragma comment(lib, "gdal_i.lib")
  int main()
  {
       const char *p=NULL;
       GDALDataset  *poDataset=NULL;
       GDALDriver *pDriver=NULL;
       GDALAllRegister();
       int t =GDALGetDriverCount();
       printf("%d\n",t);
       for(int k=0;k<t;k++)
       {
               const char *pt=NULL;
               pDriver=(GDALDriver *)GDALGetDriver(k);
               pt=pDriver->GetDescription();
               printf("%s\n",pt);
       }
 }
result:
75
VRT
GTiff
NITF
RPFTOC
HFA
SAR_CEOS
CEOS
JAXAPALSAR
GFF
ELAS
AIG
AAIGrid
SDTS
DTED
PNG
JPEG
MEM
JDEM
GIF
ESAT
BSB
XPM
BMP
DIMAP
AirSAR
RS2
PCIDSK
PCRaster
ILWIS
SGI
SRTMHGT
Leveller
Terragen
ISIS3
ISIS2
PDS
ERS
L1B
FIT
GRIB
RMF
MSGN
RST
INGR
GSAG
GSBG
GS7BG
COSAR
TSX
COASP
PNM
DOQ1
DOQ2
ENVI
EHdr
GenBin
PAux
MFF
MFF2
FujiBAS
GSC
FAST
BT
LAN
CPG
IDA
NDF
EIR
DIPEx
LCP
RIK
USGSDEM
GXF
ADRG
BLX

there is no ECW,why?can anyone help me?
--
View this message in context:
http://www.nabble.com/Supporting-ECW-as-a-plugin-on-window%2C-tp20997632
p20997632.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev





-- 
-------------------------------------------------------
Eng. Daniele Romagnoli 
Software Engineer

GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax:     +39 0584983027
mob:   +39 328 0559267


http://www.geo-solutions.it

-------------------------------------------------------




-- 
-------------------------------------------------------
Eng. Daniele Romagnoli 
Software Engineer

GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax:     +39 0584983027
mob:   +39 328 0559267


http://www.geo-solutions.it

-------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081219/8d255a9c/attachment-0001.html


More information about the gdal-dev mailing list