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

wickley wickleyl at gmail.com
Sun Dec 21 22:27:54 EST 2008


 thank you very much.
 I missed the GDAL_DRIVER_PATH ,thanks again.


Daniele Romagnoli-2 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-tp20997632p20997632.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
> 
> -------------------------------------------------------
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 

-- 
View this message in context: http://www.nabble.com/Supporting-ECW-as-a-plugin-on-window%2C-tp20997632p21122329.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.



More information about the gdal-dev mailing list