[gdal-dev] Re: Autoconf macro for gdal-config

2011-10-24 Thread canduc17
http://www.gnu.org/s/autoconf-archive/ax_lib_gdal.html#ax_lib_gdal Here you can find th ax_lib_gdal macro to compile GDAL C and C++ programs using the autotools. Enjoy! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Autoconf-macro-for-gdal-config-tp6907599p6925402.html S

[gdal-dev] Re: Autoconf macro for gdal-config

2011-10-20 Thread canduc17
I did post nothing because I have to better check what is going on with my project. No time for doing that right now. I launched my configure script in the same way, but probably something is missing in my configure.ac. Could you please post your configure.ac? Thanks -- View this message in cont

[gdal-dev] Re: Autoconf macro for gdal-config

2011-10-20 Thread canduc17
Thank you so much! At the moment it doesn't work to me, even specifing the --with-gdal flag in configure launch. I'm not an autotools expert, but this is a very good starting point. If I have time to study and modify your code I will let you know. Regards. Caneta -- View this message in context

[gdal-dev] Autoconf macro for gdal-config

2011-10-19 Thread canduc17
Compiling my gdal programs with the autotools, I would like to use gdal-config in my configure.ac file, in order to manage gdal path on different systems. The same things is made for example with the PKG_CHECK_MODULES macro for libraries which support pkg-config. Is there a pre built macro to do

[gdal-dev] Re: GDAL link problem on MS Visual Express 2010

2011-09-26 Thread canduc17
I solved with the following steps: 1 - right click on project name in "Property Manager" window; 2 - click on properties; 3 - go to Configuration Properties --> Linker --> Input --> Additional Dependencies; 4 - Add gdal_i.lib (which should be installed by nmake into $GDAL_HOME\lib) Now the linkin

[gdal-dev] Re: GDAL link problem on MS Visual Express 2010

2011-09-25 Thread canduc17
I repost it because in the previous version, raw text has disappeared from this message mail. --- I've followed instruction here http://trac.osgeo.org/gdal/wiki/BuildingOnWindows to build gdal on W

[gdal-dev] GDAL link problem on MS Visual Express 2010

2011-09-23 Thread canduc17
I've followed instruction here http://trac.osgeo.org/gdal/wiki/BuildingOnWindows to build gdal on Windows. Now I have my installation under C:\ with this directory tree: I'm using Microsoft Visual C++ 2010, but with this small example, linking fails: But I think to have set correctly include

[gdal-dev] ogr2ogr: create a new shapefile with some math

2011-07-19 Thread canduc17
Hi everyone. I have a shape file with the following characteristics: INFO: Open of `faggete.shp' using driver `ESRI Shapefile' successful. Layer name: faggete Geometry: Polygon Feature Count: 833 Extent: (341942.975384, 4732949.828158) - (365163.422399, 4773205.622984) Layer SRS WKT: (unknow

[gdal-dev] Re: Cropping raster by vector files

2011-04-28 Thread canduc17
Ok. But if I have a separate shapefile (.shp) and a GEOTiff image, which command line tool can I use to obtain the first image of your howto? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Cropping-raster-by-vector-files-tp5271977p6312752.html Sent from the GDAL - Dev ma

[gdal-dev] Re: Mask and GEOTiff

2011-04-28 Thread canduc17
I think gdal merge is the easier way. But with a command like this: gdal_merge.py -of GTiff -separate -o cropped.tif orig.tif mask.tif I obtainn a GEOTiff with two bands: the first is the original image and the second is the mask. This is not what I want. I would like to obtain a single band GEO

[gdal-dev] Mask and GEOTiff

2011-04-28 Thread canduc17
Hi everyone. Is there a way to crop a GEOTiff image using a Mask of the same dimension? For example, a mask with a filled circle: every pixel inside the circle is 1 and the others are 0. I would like to obtain a new GEOTiff with only the pixel inside the circle visible and the other set to 0. Is

[gdal-dev] Re: Catch a GDALOpen exception

2011-04-07 Thread canduc17
Very interesting... I'm not a C++ expert, but I'm always curious to learn possibilities like this, thank you! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Catch-a-GDALOpen-exception-tp6246599p6251016.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___

[gdal-dev] Re: Catch a GDALOpen exception

2011-04-07 Thread canduc17
Ok. So if I have well understood the most safe thing to do is the following: myDataset = (GDALDataset *) GDALOpen( "myFile.tif", GA_ReadOnly ); if(myDataset == NULL ) { return 14; } Indeed it works and I obtain 14 as returning value of my program... -- View

[gdal-dev] Catch a GDALOpen exception

2011-04-06 Thread canduc17
I have this incorrect code: try { myDataset = (GDALDataset *) GDALOpen( "myimg", GA_ReadOnly ); } catch(int n) { cout << "File not existent!" << endl; return 14; } I would like to catch the exception thrown by GDALOpe

[gdal-dev] gdal_translate -mo option

2010-09-15 Thread canduc17
Hi everyone. gdal_translate -mo "VALUE=1234" input.tif output.tif works fine. But what if I have to insert 2 or more metadata values? gdal_translate -mo "VALUE_1=1234" -mo "VALUE_2=5678" input.tif output.tif It doesn't work. Is there any wildcard to use into -mo string to insert multiple values?

[gdal-dev] Re: Copy only georeference between two images

2010-09-14 Thread canduc17
I have the correct georef in the first image and the wrong in the second. I would like to copy the georef of the first into the second. I will try mogrify, but I think that the easier way is to create a C program as suggested above by Giacomo. -- View this message in context: http://osgeo-org.1

[gdal-dev] Re: Copy only georeference between two images

2010-09-14 Thread canduc17
My files have both the georeferentiation, but one is correct and the other one is wrong. And the georeferentiation is INSIDE the geotiff file, not in a separated .tfw file. I would like to obtain only one file as output. To have only one GEOTiff image with the corrected georef... -- View this me

[gdal-dev] Re: Copy only georeference between two images

2010-09-14 Thread canduc17
Thank you everyone. I thought it was simpler. @Ralf Suhr-3 I have produced the ftw file as you suggested: 10.00 0.00 0.00 -10.00 584018.562500 5147058.50 but why the values are different from gda

[gdal-dev] Re: Copy only georeference between two images

2010-09-13 Thread canduc17
It is the same, but the georef information is a little bit shifted. So I have to copy the first georef into the second image. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Copy-only-georeference-between-two-images-tp5526582p5526728.html Sent from the GDAL - Dev mailing

[gdal-dev] Re: Copy only georeference between two images

2010-09-13 Thread canduc17
My case is the first one: with gdalinfo on one of my images I obtain: Driver: GTiff/GeoTIFF Files: AVN_CLS57_ALAV2A127252720_20080614_20100906.tif Size is 8505, 8378 Coordinate System is: PROJCS["WGS 84 / UTM zone 31N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6

[gdal-dev] Copy only georeference between two images

2010-09-13 Thread canduc17
One simple question: I have two identical images, exept for their their georeferentiation. They represent the same scene, their sizes are identical, but one of them has a correct UTM georeferentiation and the second one hasn't. In which way can I copy and paste the correct georeferentiation from

[gdal-dev] Re: Copy coordinate system and corner coordinates

2010-06-22 Thread canduc17
Well ok, but I don't have to merely copy the dataset. I have to eleborate it and after the elaboration I have to add all the information i can get from gdalinfo. So CreateCopy() doesn't fit for me. How to extrac ONLY these info and put them inside the new dataset? -- View this message in context

[gdal-dev] Copy coordinate system and corner coordinates

2010-06-22 Thread canduc17
I have an input dataset like this:Driver: GTiff/GeoTIFF Files: aot.2007154.0950.geo.tif Size is 5657, 2287 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]],

[gdal-dev] Re: Warp info...

2010-06-17 Thread canduc17
I saw that this thread is quite old...it is anything changed with the last version of GDAL? Is the triangulation not implemented yet? Thanks in advance. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Warp-info-tp2031316p5190183.html Sent from the GDAL - Dev mailing lis

[gdal-dev] Re: Transparent PNG with color table (palette)

2010-06-17 Thread canduc17
I have implemented in C++ an example of color table applied to a band, taking as reference the python script reported in this thread: Ludwig wrote: > > colorTable = gdal.ColorTable() > greentransparent = (0, 255, 0, 0) > blue = (0,0, 255,255) > colorTable.SetColorEntry(0, greentransparent) > col