[gdal-dev] GDAL-processing center
Hi! I would like some feedback on creating a GDAL-processing center. What I want to achieve is the following: - 1 server running a webserver with GDAL and everything installed on it. This can be accessed by other machines through a local network with for instance http://LOCALIP/GDALPROCESSING. - I want any browser to go to that webpage and give access to it`s computer resources. When jobs are added they should be distributed to the connected computers. So the processing is local on each computer Do you have any recommendations on software-combinations (free) to start to be able to do this, or are there some limitations (on the browsers etc) that makes it impossible to do this processing locally on some machines? Greetings from Sigbjørn ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] GDALWarpOperation.ChunkAndWarpImage on source without CRS
Hi, I am using GDALWarpOperation.ChunkAndWarpImage to read data, everything works well except when a source dataset does not have a CRS defined. Then it crashes with #0 GDALGenImgProjTransform (pTransformArg=0x0, bDstToSrc=1, nPointCount=84, padfX=0xa1093f0, padfY=0xa109690, padfZ=0xa109930, panSuccess=0xa1090a0) at gdaltransformer.cpp:1402 #1 0x01f56c6c in GDALWarpOperation::ComputeSourceWindow (this=0xbf7fd214, nDstXOff=0, nDstYOff=0, nDstXSize=32, nDstYSize=32, pnSrcXOff=0xbf7fd12c, pnSrcYOff=0xbf7fd128, pnSrcXSize=0xbf7fd124, pnSrcYSize=0xbf7fd120) at gdalwarpoperation.cpp:1977 gdaltransformer.cpp:1402: pGCPTransformArg = psInfo-pDstGCPTransformArg; but if I grep gdal for pDstGCPTransformArg it does not seem to be set at all. Could you please give mi a hint? The code is here and above: http://trac.osgeo.org/qgis/browser/trunk/qgis/src/providers/gdal/qgsgdalprovider.cpp?rev=15400#L625 Radim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Fail to build with OpenJpeg
On 09-03-2011 02:59, Angelos Tzotsos wrote: Hi Joaquim, In order to build with OpenJpeg, you must use the unreleased version 2.0 of OpenJpeg. Try the following: http://code.google.com/p/openjpeg/downloads/detail?name=openjpeg_v2_alpha_0.zip Thanks Angelos, but with this version I'm not even able to build OpenJpeg as it hangs on CMake with this error Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) Easy to fix the above by pointing into its local libtiff directory but compilation hangs latter on with (only first of many) Error1error C2373: 'opj_stream_create' : redefinition; different type modifiers C:\programs\compa_libs\OpenJPEG_V2_Alpha\Development\libopenjpeg\cio.c228 1openjpeg Also, since it comes with a libtif.lib it would not likely compile for Win64 which is may main goal to try this. Regards Joaquim Regards, Angelos On 03/09/2011 03:23 AM, Joaquim Luis wrote: Hi, My attempt to build gdal (trunk) on Windows with OpenJpeg failed with these errors C:\programs\GDALtrunk\gdal\frmtscd openjpeg nmake /nologo /f makefile.vc cd .. || exit 1 cl /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4018 /wd4389 -I..\..\port -I..\..\ogr -I..\..\gcore -I..\..\alg -I..\..\ogr\ogrsf_frmts -IC:\programs\compa_libs\openjpeg_v1_4\libopenjpeg -DOGR_ENABLED /c openjpegdataset.cpp openjpegdataset.cpp openjpegdataset.cpp(80) : error C2146: syntax error : missing ';' before identifier 'JP2OpenJPEGDataset_Read' openjpegdataset.cpp(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int openjpegdataset.cpp(80) : error C2061: syntax error : identifier 'OPJ_UINT32' I greped for OPJ_UINT32 in the OpenJpeg source and on GDAL's) and there was no sign of it. I am using openjpeg_v1_4_source_r697 as per its web site. Joaquim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Fail to build with OpenJpeg
On 09-03-2011 16:28, Tamas Szekeres wrote: I had to do the following tweaks in order to compile openjpegv2 from SVN. Index: CMakeLists.txt === --- CMakeLists.txt(revision 660) +++ CMakeLists.txt(working copy) @@ -50,6 +50,7 @@ IF(WIN32) IF(BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DOPJ_EXPORTS) +ADD_DEFINITIONS(-DUSE_OPJ_DEPRECATED) ELSE(BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DOPJ_STATIC) ENDIF(BUILD_SHARED_LIBS) Index: openjpeg.h === --- openjpeg.h(revision 660) +++ openjpeg.h(working copy) @@ -37,7 +37,7 @@ #define OPJ_API #define OPJ_CALLCONV #else -#define OPJ_CALLCONV __stdcall +#define OPJ_CALLCONV //__stdcall #ifdef OPJ_EXPORTS #define OPJ_API __declspec(dllexport) #else BTW: The compiled binaries/libs/headers (including x64) are available to download from: http://vbkto.dyndns.org/sdk/ Thank you very much Tamas. I guess that to build the X64 you had to point it to a X64 libtiff.lib that you have build yourself as well? And, sorry, which one of your files has the libs and includes? Not this one: release-1600-x64-gdal-mapserver.zip http://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-x64-gdal-mapserver.zip perhaps this? gdal-19dev-1600-x64-core.msi http://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-x64-gdal-mapserver%5Cgdal-19dev-1600-x64-core.msi I confess that I don't like the .msi installers because i never know what else the they do besides installing the package. Joaquim Best regards, Tamas 2011/3/9 Joaquim Luis jl...@ualg.pt mailto:jl...@ualg.pt On 09-03-2011 02:59, Angelos Tzotsos wrote: Hi Joaquim, In order to build with OpenJpeg, you must use the unreleased version 2.0 of OpenJpeg. Try the following: http://code.google.com/p/openjpeg/downloads/detail?name=openjpeg_v2_alpha_0.zip Thanks Angelos, but with this version I'm not even able to build OpenJpeg as it hangs on CMake with this error Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) Easy to fix the above by pointing into its local libtiff directory but compilation hangs latter on with (only first of many) Error1error C2373: 'opj_stream_create' : redefinition; different type modifiers C:\programs\compa_libs\OpenJPEG_V2_Alpha\Development\libopenjpeg\cio.c 2281openjpeg Also, since it comes with a libtif.lib it would not likely compile for Win64 which is may main goal to try this. Regards Joaquim Regards, Angelos On 03/09/2011 03:23 AM, Joaquim Luis wrote: Hi, My attempt to build gdal (trunk) on Windows with OpenJpeg failed with these errors C:\programs\GDALtrunk\gdal\frmtscd openjpeg nmake /nologo /f makefile.vc http://makefile.vc cd .. || exit 1 cl /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4018 /wd4389 -I..\..\port -I..\..\ogr -I..\..\gcore -I..\..\alg -I..\..\ogr\ogrsf_frmts -IC:\programs\compa_libs\openjpeg_v1_4\libopenjpeg -DOGR_ENABLED /c openjpegdataset.cpp openjpegdataset.cpp openjpegdataset.cpp(80) : error C2146: syntax error : missing ';' before identifier 'JP2OpenJPEGDataset_Read' openjpegdataset.cpp(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int openjpegdataset.cpp(80) : error C2061: syntax error : identifier 'OPJ_UINT32' I greped for OPJ_UINT32 in the OpenJpeg source and on GDAL's) and there was no sign of it. I am using openjpeg_v1_4_source_r697 as per its web site. Joaquim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org mailto:gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org mailto:gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] GDALWarpOperation.ChunkAndWarpImage slow on large tiffs
Hi, GDALWarpOperation.ChunkAndWarpImage was reported to be extremly slow on larger geotiff (over 1GB). Is it possible that it is much slower with respect to GDALRasterIO() even without reprojection? Should I return to 'manualy' reading data via GDALRasterIO() + fidling with data extents and cells alignement? I thought that GDAL ChunkAndWarpImage will do it even faster, possibly knowing better (?) various formats nature. Is there way to tune somehow performance? Currently no reprojection and GRA_NearestNeighbour. Still the same code which I posted before http://trac.osgeo.org/qgis/browser/trunk/qgis/src/providers/gdal/qgsgdalprovider.cpp?rev=15400#L625 Thanks for help. Radim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] GDALWarpOperation.ChunkAndWarpImage on source without CRS
Le mercredi 09 mars 2011 12:25:47, Radim Blazek a écrit : Radim, I don't see anything obviously wrong in your code, but the warping API is admitedly quite tricky to use. The closest code in GDAL that you could take insipiration from is perhaps GDALReprojectImage() in alg/gdalwarper.cpp that does pretty similar things to your code (apps/gdalwarp.cpp does similar things too but perhaps a bit less clear to follow). 1) The cause of the crash is the pTransformArg=0x0 passed to GDALGenImgProjTransform () which causes a null pointer deferencing when doing psInfo-pDstGCPTransformArg. I'm surprised that it crashes here and not the line before where the psInfo is already deferenced (is your GDAL build with - O2 ? If yes, you should perhaps rebuild it without it). I don't either understand how you get a null pointer at that point. I don't either understand why the fact that the source dataset has a SRS or not has an impact at that point... Stepping in the code with a debugger might help to track where that null pointer comes from. (the line numbers didn't match the ones of my copy so I suspect you're not using GDAL 1.8.0, but that shouldn't be an issue however) 2) Yes, indeed pDstGCPTransformArg is unused. So there's perhaps some code cleaning possible inside GDAL here, but that's unlikely to cause a problem per se. 3) You should check the return value of myOperation.Initialize( myWarpOptions ). If the validation of the warp options failed, it would be unsafe to go on with the warping itself. 4) myMemDsn.sprintf( MEM:::DATAPOINTER=%lu,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0, ( long )theBlock, thePixelWidth, thePixelHeight, GDALGetDataTypeName(( GDALDataType )mGdalDataType[theBandNo-1] ) ); is dangerous. I think it will not work for a Win64 build where pointers are 64 bits but long is still 32 bit. You could use the CPLPrintPointer() function from GDAL to format it : char szPointer[64]; memset( szPointer, 0, sizeof(szPointer) ); CPLPrintPointer( szPointer, theBlock, sizeof(szPointer) ); Best regards, Even Hi, I am using GDALWarpOperation.ChunkAndWarpImage to read data, everything works well except when a source dataset does not have a CRS defined. Then it crashes with #0 GDALGenImgProjTransform (pTransformArg=0x0, bDstToSrc=1, nPointCount=84, padfX=0xa1093f0, padfY=0xa109690, padfZ=0xa109930, panSuccess=0xa1090a0) at gdaltransformer.cpp:1402 #1 0x01f56c6c in GDALWarpOperation::ComputeSourceWindow (this=0xbf7fd214, nDstXOff=0, nDstYOff=0, nDstXSize=32, nDstYSize=32, pnSrcXOff=0xbf7fd12c, pnSrcYOff=0xbf7fd128, pnSrcXSize=0xbf7fd124, pnSrcYSize=0xbf7fd120) at gdalwarpoperation.cpp:1977 gdaltransformer.cpp:1402: pGCPTransformArg = psInfo-pDstGCPTransformArg; but if I grep gdal for pDstGCPTransformArg it does not seem to be set at all. Could you please give mi a hint? The code is here and above: http://trac.osgeo.org/qgis/browser/trunk/qgis/src/providers/gdal/qgsgdalpro vider.cpp?rev=15400#L625 Radim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] GDALWarpOperation.ChunkAndWarpImage slow on large tiffs
On 11-03-09 01:46 PM, Radim Blazek wrote: Hi, GDALWarpOperation.ChunkAndWarpImage was reported to be extremly slow on larger geotiff (over 1GB). Is it possible that it is much slower with respect to GDALRasterIO() even without reprojection? Should I return to 'manualy' reading data via GDALRasterIO() + fidling with data extents and cells alignement? I thought that GDAL ChunkAndWarpImage will do it even faster, possibly knowing better (?) various formats nature. Is there way to tune somehow performance? Currently no reprojection and GRA_NearestNeighbour. Radim, GDALWarpOperation is intended to be a high precision image resampler. Within the constraints of doing this correctly it attempts to be fast, but it will generally be quite a bit slower than direct RasterIO calls and in some situations dramatically slower. Particularly it is completely inappropriate to use for radical downsampling. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Fail to build with OpenJpeg
Hi Joaquim. You can download http://vbkto.dyndns.org/sdk/PackageList.aspx?file=release-1600-x64-dev.zipto obtain the libs/includes. Best regards, Tamas 2011/3/9 Joaquim Luis jl...@ualg.pt On 09-03-2011 16:28, Tamas Szekeres wrote: I had to do the following tweaks in order to compile openjpegv2 from SVN. Index: CMakeLists.txt === --- CMakeLists.txt(revision 660) +++ CMakeLists.txt(working copy) @@ -50,6 +50,7 @@ IF(WIN32) IF(BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DOPJ_EXPORTS) +ADD_DEFINITIONS(-DUSE_OPJ_DEPRECATED) ELSE(BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DOPJ_STATIC) ENDIF(BUILD_SHARED_LIBS) Index: openjpeg.h === --- openjpeg.h(revision 660) +++ openjpeg.h(working copy) @@ -37,7 +37,7 @@ #define OPJ_API #define OPJ_CALLCONV #else -#define OPJ_CALLCONV __stdcall +#define OPJ_CALLCONV //__stdcall #ifdef OPJ_EXPORTS #define OPJ_API __declspec(dllexport) #else BTW: The compiled binaries/libs/headers (including x64) are available to download from: http://vbkto.dyndns.org/sdk/ Thank you very much Tamas. I guess that to build the X64 you had to point it to a X64 libtiff.lib that you have build yourself as well? And, sorry, which one of your files has the libs and includes? Not this one: release-1600-x64-gdal-mapserver.ziphttp://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-x64-gdal-mapserver.zip perhaps this? gdal-19dev-1600-x64-core.msihttp://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-x64-gdal-mapserver%5Cgdal-19dev-1600-x64-core.msi I confess that I don't like the .msi installers because i never know what else the they do besides installing the package. Joaquim Best regards, Tamas 2011/3/9 Joaquim Luis jl...@ualg.pt On 09-03-2011 02:59, Angelos Tzotsos wrote: Hi Joaquim, In order to build with OpenJpeg, you must use the unreleased version 2.0 of OpenJpeg. Try the following: http://code.google.com/p/openjpeg/downloads/detail?name=openjpeg_v2_alpha_0.zip Thanks Angelos, but with this version I'm not even able to build OpenJpeg as it hangs on CMake with this error Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) Easy to fix the above by pointing into its local libtiff directory but compilation hangs latter on with (only first of many) Error1error C2373: 'opj_stream_create' : redefinition; different type modifiers C:\programs\compa_libs\OpenJPEG_V2_Alpha\Development\libopenjpeg\cio.c 2281openjpeg Also, since it comes with a libtif.lib it would not likely compile for Win64 which is may main goal to try this. Regards Joaquim Regards, Angelos On 03/09/2011 03:23 AM, Joaquim Luis wrote: Hi, My attempt to build gdal (trunk) on Windows with OpenJpeg failed with these errors C:\programs\GDALtrunk\gdal\frmtscd openjpeg nmake /nologo /f makefile.vc cd .. || exit 1 cl /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG /W4 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4018 /wd4389 -I..\..\port -I..\..\ogr -I..\..\gcore -I..\..\alg -I..\..\ogr\ogrsf_frmts -IC:\programs\compa_libs\openjpeg_v1_4\libopenjpeg -DOGR_ENABLED /c openjpegdataset.cpp openjpegdataset.cpp openjpegdataset.cpp(80) : error C2146: syntax error : missing ';' before identifier 'JP2OpenJPEGDataset_Read' openjpegdataset.cpp(80) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int openjpegdataset.cpp(80) : error C2061: syntax error : identifier 'OPJ_UINT32' I greped for OPJ_UINT32 in the OpenJpeg source and on GDAL's) and there was no sign of it. I am using openjpeg_v1_4_source_r697 as per its web site. Joaquim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: building with PDF driver on Windows + ?
Hi, I've followed the instructions posted above but have run into a linker error. Any ideas which lib I'm missing? Thanks, Chris 2 File(s) copied cd .. if exist gdal.lib del gdal.lib lib /nologo /out:gdal.lib port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib link /nologo /dll /INCLUDE:_OGRFeatureStylePuller /INCLUDE:_OSRValidate /INCLUDE:_OPTGetProjectionMethods /INCLUDE:_OGR_G_GetPointCount /INCLUDE:_OG RRegisterAll /INCLUDE:_GDALSimpleImageWarp@36 /INCLUDE:_GDALReprojectImage@48 /INCLUDE:_GDALComputeMedianCutPCT@32 /INCLUDE:_GDALDitherRGB2PCT@28 /INCLUDE:_ OCTNewCoordinateTransformation@8 port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib C:\cgp\code\xerces\xerces-c-3.0. 1\Build\Win32\VC9\Release\xerces-c_3.lib C:\cgp\code\mrsid\Lidar_DSDK\li b\lti_lidar_dsdk.lib C:\cgp\code\mrsid\Raster_DSDK\lib\lti_dsdk.lib odbc32.lib odbccp32.lib user32.lib C:\KDE\lib\poppler.li b C:\KDE\lib\poppler-cpp.lib C:\KDE\lib\poppler-qt4.lib C:\KDE\lib\freetype.lib C:\KDE\lib\lcms-1.lib advapi32.lib gdi32.lib gcore\Version.res /out:gdal18.dll /implib:gdal_i.lib poppler.lib(GlobalParams.cc.obj) : error LNK2005: _DllMain@12 already defined in gdaldllmain.obj Creating library gdal_i.lib and object gdal_i.exp poppler.lib(DCTStream.cc.obj) : warning LNK4217: locally defined symbol _jpeg_de stroy_decompress imported in function public: virtual __thiscall DCTStream::~DC TStream(void) (??1DCTStream@@UAE@XZ) poppler.lib(DCTStream.cc.obj) : warning LNK4217: locally defined symbol _jpeg_Cr eateDecompress imported in function private: void __thiscall DCTStream::init(vo id) (?init@DCTStream@@AAEXXZ) poppler.lib(DCTStream.cc.obj) : warning LNK4217: locally defined symbol _jpeg_re sync_to_restart imported in function private: void __thiscall DCTStream::init(v oid) (?init@DCTStream@@AAEXXZ) poppler.lib(DCTStream.cc.obj) : warning LNK4217: locally defined symbol _jpeg_st d_error imported in function private: void __thiscall DCTStream::init(void) (? init@DCTStream@@AAEXXZ) poppler.lib(JpegWriter.cc.obj) : warning LNK4049: locally defined symbol _jpeg_s td_error imported poppler.lib(DCTStream.cc.obj) : warning LNK4217: locally defined symbol _jpeg_st art_decompress imported in function public: virtual void __thiscall DCTStream:: reset(void) (?reset@DCTStream@@UAEXXZ) poppler.lib(DCTStream.cc.obj) : warning LNK4217: locally defined symbol _jpeg_re ad_header imported in function public: virtual void __thiscall DCTStream::reset (void) (?reset@DCTStream@@UAEXXZ) poppler.lib(DCTStream.cc.obj) : warning LNK4217: locally defined symbol _jpeg_re ad_scanlines imported in function public: virtual int __thiscall DCTStream::get Char(void) (?getChar@DCTStream@@UAEHXZ) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_d estroy_compress imported in function public: virtual __thiscall JpegWriter::~Jp egWriter(void) (??1JpegWriter@@UAE@XZ) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_s tart_compress imported in function public: virtual bool __thiscall JpegWriter:: init(struct _iobuf *,int,int,int,int) (?init@JpegWriter@@UAE_NPAU_iobuf@@@Z ) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_s imple_progression imported in function public: virtual bool __thiscall JpegWrit er::init(struct _iobuf *,int,int,int,int) (?init@JpegWriter@@UAE_NPAU_iobuf@@HH HH@Z) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_s et_quality imported in function public: virtual bool __thiscall JpegWriter::ini t(struct _iobuf *,int,int,int,int) (?init@JpegWriter@@UAE_NPAU_iobuf@@@Z) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_s et_defaults imported in function public: virtual bool __thiscall JpegWriter::in it(struct _iobuf *,int,int,int,int) (?init@JpegWriter@@UAE_NPAU_iobuf@@@Z) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_C reateCompress imported in function public: virtual bool __thiscall JpegWriter:: init(struct _iobuf *,int,int,int,int) (?init@JpegWriter@@UAE_NPAU_iobuf@@@Z ) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_w rite_scanlines imported in function public: virtual bool __thiscall JpegWriter: :writePointers(unsigned char * *,int) (?writePointers@JpegWriter@@UAE_NPAPAEH@Z ) poppler.lib(JpegWriter.cc.obj) : warning LNK4217: locally defined symbol _jpeg_f inish_compress imported in function public: virtual bool __thiscall JpegWriter: :close(void) (?close@JpegWriter@@UAE_NXZ) poppler.lib(JPEG2000Stream.cc.obj) : error LNK2019: unresolved external symbol _ _imp__opj_destroy_decompress@4 referenced in function public: virtual void __th iscall JPXStream::close(void) (?close@JPXStream@@UAEXXZ) poppler.lib(JPEG2000Stream.cc.obj) : error LNK2019: unresolved external symbol _
Re: [gdal-dev] GDALWarpOperation.ChunkAndWarpImage on source without CRS
Hi, thank you a lot for your help and recommendations. The problem seems to be in GDALCreateGenImgProjTransformer2 in the block which begins on line 1072 (alg/gdaltransformer.cpp) current trunk: else if( (pszMethod == NULL || EQUAL(pszMethod,GEOTRANSFORM)) GDALGetGeoTransform( hSrcDS, psInfo-adfSrcGeoTransform ) == CE_None (psInfo-adfSrcGeoTransform[0] != 0.0 || psInfo-adfSrcGeoTransform[1] != 1.0 || psInfo-adfSrcGeoTransform[2] != 0.0 || psInfo-adfSrcGeoTransform[3] != 0.0 || psInfo-adfSrcGeoTransform[4] != 0.0 || ABS(psInfo-adfSrcGeoTransform[5]) != 1.0) ) here it excludes all source data sources which are not georeferenced. If I comment the psInfo-adfSrcGeoTransform check, everything works OK. Is there a good reason to not allow to transform images which are not georeferenced? I can get around also setting for example psInfo-adfSrcGeoTransform[0] = 0.0001; in my code, but that is not nice of course. Is there a better workaround? Radim On Wed, Mar 9, 2011 at 7:49 PM, Even Rouault even.roua...@mines-paris.org wrote: Le mercredi 09 mars 2011 12:25:47, Radim Blazek a écrit : Radim, I don't see anything obviously wrong in your code, but the warping API is admitedly quite tricky to use. The closest code in GDAL that you could take insipiration from is perhaps GDALReprojectImage() in alg/gdalwarper.cpp that does pretty similar things to your code (apps/gdalwarp.cpp does similar things too but perhaps a bit less clear to follow). 1) The cause of the crash is the pTransformArg=0x0 passed to GDALGenImgProjTransform () which causes a null pointer deferencing when doing psInfo-pDstGCPTransformArg. I'm surprised that it crashes here and not the line before where the psInfo is already deferenced (is your GDAL build with - O2 ? If yes, you should perhaps rebuild it without it). I don't either understand how you get a null pointer at that point. I don't either understand why the fact that the source dataset has a SRS or not has an impact at that point... Stepping in the code with a debugger might help to track where that null pointer comes from. (the line numbers didn't match the ones of my copy so I suspect you're not using GDAL 1.8.0, but that shouldn't be an issue however) 2) Yes, indeed pDstGCPTransformArg is unused. So there's perhaps some code cleaning possible inside GDAL here, but that's unlikely to cause a problem per se. 3) You should check the return value of myOperation.Initialize( myWarpOptions ). If the validation of the warp options failed, it would be unsafe to go on with the warping itself. 4) myMemDsn.sprintf( MEM:::DATAPOINTER=%lu,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0, ( long )theBlock, thePixelWidth, thePixelHeight, GDALGetDataTypeName(( GDALDataType )mGdalDataType[theBandNo-1] ) ); is dangerous. I think it will not work for a Win64 build where pointers are 64 bits but long is still 32 bit. You could use the CPLPrintPointer() function from GDAL to format it : char szPointer[64]; memset( szPointer, 0, sizeof(szPointer) ); CPLPrintPointer( szPointer, theBlock, sizeof(szPointer) ); Best regards, Even Hi, I am using GDALWarpOperation.ChunkAndWarpImage to read data, everything works well except when a source dataset does not have a CRS defined. Then it crashes with #0 GDALGenImgProjTransform (pTransformArg=0x0, bDstToSrc=1, nPointCount=84, padfX=0xa1093f0, padfY=0xa109690, padfZ=0xa109930, panSuccess=0xa1090a0) at gdaltransformer.cpp:1402 #1 0x01f56c6c in GDALWarpOperation::ComputeSourceWindow (this=0xbf7fd214, nDstXOff=0, nDstYOff=0, nDstXSize=32, nDstYSize=32, pnSrcXOff=0xbf7fd12c, pnSrcYOff=0xbf7fd128, pnSrcXSize=0xbf7fd124, pnSrcYSize=0xbf7fd120) at gdalwarpoperation.cpp:1977 gdaltransformer.cpp:1402: pGCPTransformArg = psInfo-pDstGCPTransformArg; but if I grep gdal for pDstGCPTransformArg it does not seem to be set at all. Could you please give mi a hint? The code is here and above: http://trac.osgeo.org/qgis/browser/trunk/qgis/src/providers/gdal/qgsgdalpro vider.cpp?rev=15400#L625 Radim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] GDALWarpOperation.ChunkAndWarpImage slow on large tiffs
Hi, yes that is the mail reporting the error. Thank you for explanation. I see that I have to reintroduce all the staff for GDALRasterIO() Radim On Wed, Mar 9, 2011 at 8:50 PM, Even Rouault even.roua...@mines-paris.org wrote: Le mercredi 09 mars 2011 19:46:26, Radim Blazek a écrit : Hi, Skimming qgis mailing list, I read this http://lists.osgeo.org/pipermail/qgis- developer/2011-March/013291.html Was it the report you were refering too ? If yes, then the report gives an interesting hint. You must be aware that the warping code does not take advantage of overviews (it is intended to operate on the full-resolution raster, and not for downsampling as Frank underlined), so you will have really bad performance comparing too GDALRasterIO() if the output dimensions are much smaller than the input window size. GDALWarpOperation.ChunkAndWarpImage was reported to be extremly slow on larger geotiff (over 1GB). Is it possible that it is much slower with respect to GDALRasterIO() even without reprojection? Should I return to 'manualy' reading data via GDALRasterIO() + fidling with data extents and cells alignement? I thought that GDAL ChunkAndWarpImage will do it even faster, possibly knowing better (?) various formats nature. Is there way to tune somehow performance? Currently no reprojection and GRA_NearestNeighbour. Still the same code which I posted before http://trac.osgeo.org/qgis/browser/trunk/qgis/src/providers/gdal/qgsgdalpro vider.cpp?rev=15400#L625 Thanks for help. Radim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] crop a non-square subwindow?
On Wed, 2011-03-09 at 12:35 -0500, Frank Warmerdam wrote: On 11-03-09 11:51 AM, Wendell Turner wrote: Do any of the gdal utilities crop an image on non-square boundaries? I use gdal_translate with -projwin ulx uly lrx lry to crop an image that is square (left and right edges are vertical, and the top and bottom edges are horizontal). Is there a command that will crop other shapes, for instance a diamond shape, where the edges are not horizontal/vertical? If it must be done by programming (pref. Python), is there a sample that I could use to start with? Wendell, I think gdalwarp with -crop_to_cutline and a cutline specified with the shape will accomplish what you want. http://www.gdal.org/gdalwarp.html The cutline comes from an OGR supported file but this can be as simple as a .csv file with a WKT geometry in it. The -crop_to_cutline may be new to 1.8. Best regards, Wendell, Please be aware that this method may introduce raster shifting and possibly resampling (depending on the original cell size). It might or might not matter for your purposes. A better approach is to use gdal_translate with -projwin to extract to shape envelope and then gdal_rasterize with -i to burn nodata where shape is missing. -marius ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to build gdal with oracle spatial
Hi All GDAL is new for me.i need to build GDAL with oracle spatial so that i can use OGR2OGR for further conversion of oracle spatial data to shape file. I have installed FWTools 2.4.7 and want to run the commands from FWTools shell only.Please can anyone help me out and guide me by telling me the step by step process of configuring GDAL with oracle support.Kindly reply back soon as am stuck. Thanks Regards Natasha___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to build gdal with oracle spatial
Hi All GDAL is new for me.i need to build GDAL with oracle spatial so that i can use OGR2OGR for further conversion of oracle spatial data to shape file. I have installed FWTools 2.4.7 and want to run the commands from FWTools shell only.Please can anyone help me out and guide me by telling me the step by step process of configuring GDAL with oracle support.Kindly reply back soon as am stuck. Thanks Regards Natasha___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] how to build gdal with oracle spatial
Natasha, OSGeo4W has the Oracle-10g plugin for GDAL. You can use the GDAL package from it too. On Thu, Mar 10, 2011 at 12:11 PM, natasha chatterjee natashachatter...@rediffmail.com wrote: Hi All GDAL is new for me.i need to build GDAL with oracle spatial so that i can use OGR2OGR for further conversion of oracle spatial data to shape file. I have installed FWTools 2.4.7 and want to run the commands from FWTools shell only.Please can anyone help me out and guide me by telling me the step by step process of configuring GDAL with oracle support.Kindly reply back soon as am stuck. Thanks Regards Natasha http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle? ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] how to build gdal with oracle spatial
Natasha, I do not believe FWTools to have the Oracle driver built in, so that you may have to build it from source, having first installed the Orcale client libraries (free download from Oracle - this also includes the Oracle ODBC driver, which you will need if you want to connect to Oracle using ODBC). Alternatively, can you use OSGeo4w as previously suggested? Hope that helps, best wishes, Peter natasha chatterjee wrote: Hi All GDAL is new for me.i need to build GDAL with oracle spatial so that i can use OGR2OGR for further conversion of oracle spatial data to shape file. I have installed FWTools 2.4.7 and want to run the commands from FWTools shell only.Please can anyone help me out and guide me by telling me the step by step process of configuring GDAL with oracle support.Kindly reply back soon as am stuck. Thanks Regards Natasha ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Peter J Halls, GIS Advisor Acting Team Leader Applications Support Group, Information Directorate, University of York Telephone: 01904 323806 Fax: 01904 323740 Snail mail: C/O IT Services, University of York, Heslington, York YO10 5DD This message has the status of a private and personal communication ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Polygonize and 8CONNECTED
Hi all, I was writing to enquire about the status of the 8CONNECTED=8 option in the Polygonize function of GDAL 1.8. I would expect that this option joins all pixels of equal value that are diagonally adjacent into a single polygon. However, with the following raster dataset (see http://i.imgur.com/jdUla.png) I receive two polygons in my output shapefile (see http://i.imgur.com/CZWMU.png ). For a copy of the raster, see http://dl.dropbox.com/u/6732375/mish9000.img.zip I am calling polygonize from GDAL's python bindings, which reports itself as GDAL 1.8.0, released 2011/01/12. My code looks like: gdal.Polygonize(tmprasterband, tmprasterband, shapefile_polygons_layer, 0, [8CONNECTED=8]) Is this the expected behaviour or a bug? Can I modify my call to polygonize to get the desired behaviour? If not, how would I merge multiple polygons with the same attribute value (an id number) into a single geometry? Thanks for your help, Francis Markham ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev