[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
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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: 
http://osgeo-org.1803224.n2.nabble.com/Autoconf-macro-for-gdal-config-tp6907599p6912091.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 context: 
http://osgeo-org.1803224.n2.nabble.com/Autoconf-macro-for-gdal-config-tp6907599p6912716.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 the same thing?
Or should I write a new macro? Examples and hints on that would be really
appreciated...

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Autoconf-macro-for-gdal-config-tp6907599p6907599.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


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

2011-09-26 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 Windows.

Now I have my installation under C:\ with this directory tree:

C:\
GDAL-1.8.1
bin
lib
data
include
html


I'm using Microsoft Visual C++ 2010, but with this small example, linking
fails:

#include stdio.h
#include gdal.h

int main() { GDALAllRegister(); return 0; }


-- Build started: Project: gdal_test, Configuration: Debug Win32 --
  gdal_test.c
gdal_test.obj : error LNK2019: unresolved external symbol _GDALAllRegister@0
referenced in function _main
C:\Documents and Settings\utente\documenti\visual studio
2010\Projects\gdal_test\Debug\gdal_test.exe : fatal error LNK1120: 1
unresolved externals
== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==


But I think to have set correctly include and lib paths into my project;  in
window Property Pages -- Configuration Properties -- VC++ Directories I
have set:

Executable Directories -- C:\GDAL-1.8.1\bin;$(ExecutablePath)
Include Directories -- C:\GDAL-1.8.1\include;$(IncludePath)
Library Directories -- C:\GDAL-1.8.1\lib;$(LibraryPath)


So, where am I wrong?


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/GDAL-link-problem-on-MS-Visual-Express-2010-tp6824209p6830879.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 GEOTiff with visible only the pixels of
original image filtered by the mask.

Is that possible with a further passage or with another tool?

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Mask-and-GEOTiff-tp6312284p6312590.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Catch-a-GDALOpen-exception-tp6246599p6248874.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 GDALOpen if the file is not
existent and manage it in a way to return an integer that I want and not the
default 134.

How can I achieve this?

Thanks in advance!

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Catch-a-GDALOpen-exception-tp6246599p6246599.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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? For
example
gdal_translate -mo VALUE_1=1234\nVALUE_2=5678 input.tif output.tif
Also this doesn't work.

Is it possible to do that?
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/gdal-translate-mo-option-tp5533518p5533518.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 gdalinfo?
gdalinfo img.tif | grep Origin
Origin = (584013.5625000,5147063.500)
And what I'm suppose to do whith that? What is the file without
georeferentiation?

@Ivan Lucena
Unfortunately I don't have python support in my GDAL installation and I
cannot recompile it.
Using gdal_translate is ok, but is there another way to avoid rewriting on
disk the image (which is quite big)?
Is not possible to paste the info obtained by gdalinfo into my second
image?

@christian.mueller-
If it's exist, I would prefer an automatic way to solve my problem...


-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Copy-only-georeference-between-two-images-tp5526582p5529496.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433],
AUTHORITY[EPSG,4326]]
Origin = (0.452892184257507,72.917350769042969)
Pixel Size = (0.010,-0.010)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   0.4528922,  72.9173508) (  0d27'10.41E, 72d55'2.46N)
Lower Left  (   0.4528922,  50.0473508) (  0d27'10.41E, 50d 2'50.46N)
Upper Right (  57.0228922,  72.9173508) ( 57d 1'22.41E, 72d55'2.46N)
Lower Right (  57.0228922,  50.0473508) ( 57d 1'22.41E, 50d 2'50.46N)
Center  (  28.7378922,  61.4823508) ( 28d44'16.41E, 61d28'56.46N)
Band 1 Block=5657x1 Type=Float32, ColorInterp=Grayand I want to copy
coordinate system, origin, pixel size and corner coordinates from this
dataset to the output one.
How to do this in C++?
Thanks in advance.
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Copy-coordinate-system-and-corner-coordinates-tp5207721p5207721.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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: 
http://osgeo-org.1803224.n2.nabble.com/Copy-coordinate-system-and-corner-coordinates-tp5207721p5207848.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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)
 colorTable.SetColorEntry(1, blue)
 b = image.GetRasterBand(1)
 b.SetRasterColorTable(colorTable)
 

My code:

// Create a color table for the Air Quality output image
GDALColorTable *colorTable = new GDALColorTable();
GDALColorEntry black, green, yellow, orange, red, lightRed;
// Setting RGB colors for 6 classes
black.c1= 0;black.c2= 0;black.c3= 0;
black.c4= 0;
green.c1= 0;green.c2  = 255;green.c3= 0;
green.c4= 0;
yellow.c1   = 255;  yellow.c2 = 255;yellow.c3   = 0;
yellow.c4   = 0;
orange.c1   = 255;  orange.c2 = 150;orange.c3   = 0;
orange.c4   = 0;
red.c1  = 255;  red.c2  = 0;red.c3  = 0;
red.c4  = 0;
lightRed.c1 = 150;  lightRed.c2 = 0;lightRed.c3 = 0;
lightRed.c4 = 0;

// Link every color to a pixel value
colorTable-SetColorEntry(0, black);
colorTable-SetColorEntry(1, green);
colorTable-SetColorEntry(2, yellow);
colorTable-SetColorEntry(3, orange);
colorTable-SetColorEntry(4, red);
colorTable-SetColorEntry(5, lightRed);

// Apply the table to the band
myOutBand-SetColorTable(colorTable);

// Delete the GDALColorTable object
delete colorTable;

I hope this could be helpful for someone.
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Transparent-PNG-with-color-table-palette-tp2030306p5190147.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[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 list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev