Re: [gdal-dev] Mask and GEOTiff

2011-04-28 Thread Chaitanya kumar CH
Alessandro,

You can combine the tiff and the mask using GDAL's VRT format or by using
the -separate option in gdal_merge.py script. The extra band should be set
as a nodata mask or alpha band.

http://www.gdal.org/gdal_vrttut.html
http://www.gdal.org/gdalbuildvrt.html

http://www.gdal.org/gdal_merge.html

On Thu, Apr 28, 2011 at 1:00 PM, canduc17 cand...@meeo.it wrote:

 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 that possible with tools like gdal_translate or other ones?

 Thanks in advance!

 --
 View this message in context:
 http://osgeo-org.1803224.n2.nabble.com/Mask-and-GEOTiff-tp6312284p6312284.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




-- 
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

[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


Re: [gdal-dev] gdalwarp vertical datum shift question

2011-04-28 Thread Frank Warmerdam

On 11-04-27 02:42 PM, Mark Warren wrote:

So before we go down this route too far (since a lot of changes may be
needed to the code) - does anyone think that this is a feasible idea or
have any other suggestions (other than using a GIS :) )?


Mark,

Honestly, I think it would be better to implement a distinct utility
that applies vertical datum offsets rather than to incorporate it into
gdalwarp.  I suspect it will significantly complicate the gdalwarp code
to have vertical offsets mixed in to all the interpolation code - assuming
you are ultimately hoping for something suitable to incorporate back into the
core.

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] nearblack troubles [SEC=UNCLASSIFIED]

2011-04-28 Thread Matt Wilkie

 Worked for me using the following:

 #Change black to white
 gdalbuildvrt -srcnodata 0 -vrtnodata 255 to-be-decollared.vrt
 to-be-decollared.tif
 #Run nearblack -white
 nearblack -white -o decollared.tif to-be-decollared.vrt

Luke, once again I thank you. :)


matt wilkie

Geomatics Analyst
Information Management and Technology
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Re: Mask and GEOTiff

2011-04-28 Thread Jamie Adams
You could run gdal_polygonize on the mask geotiff and then use the output
vector with gdal_rasterize.  That's the only way I can think of without
writing a python script to do the pixel comparisons.

Jamie

On Thu, Apr 28, 2011 at 2:30 AM, canduc17 cand...@meeo.it wrote:

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

Re: [gdal-dev] nearblack troubles [SEC=UNCLASSIFIED]

2011-04-28 Thread Even Rouault
Le jeudi 28 avril 2011 17:49:48, Matt Wilkie a écrit :
   Worked for me using the following:
   
   #Change black to white
   gdalbuildvrt -srcnodata 0 -vrtnodata 255 to-be-decollared.vrt
   to-be-decollared.tif
   #Run nearblack -white
   nearblack -white -o decollared.tif to-be-decollared.vrt
 
 Luke, once again I thank you. :)

There's one thing you must be aware of with the above process. The 
gdalbuildvrt step will replace all 0 values by 255, but band per band, to be 
opposite to detecting the triplet (0,0,0). So this might alter colors that 
have least one component to 0 inside the raster.

 
 
 matt wilkie
 
 Geomatics Analyst
 Information Management and Technology
 Yukon Department of Environment
 10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
 867-667-8133 Tel * 867-393-7003 Fax
 http://environmentyukon.gov.yk.ca/geomatics/
 
 ___
 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] FGDB Opening Sample File

2011-04-28 Thread Even Rouault
Le jeudi 28 avril 2011 02:11:30, Paul Ramsey a écrit :
 
 I assume the failures are relationships we don't handle yet (or ever
 and will need to be silenced).
 

Not sure what those relations things are.

 There is a test file in the FGDB API itself, and it fails to open
 entirely, which seems odd,
 
 [pramsey@localhost data]$ ogrinfo ./TestData.gdb
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 FAILURE:
 Unable to open datasource `./TestData.gdb' with the following drivers.
 
 Do other folks have trouble opening the ESRI sample file? The error
 code doesn't make much sense, it is supposed to mean If the path is
 seriously in error, say pointing to the wrong drive, a -2147467259
 (E_FAIL) error is returned and relates to the CreateGeodatabase
 method, not the OpenGeodatabase method.

Yes I did notice that issue too. I assume either the example is corrupted, 
either it is a bug in the FileGDB API, either... Perhaps reporting to ESRI 
might be usefull. Or perhaps Ragi has some clues.

Even
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] FGDB Opening Sample File

2011-04-28 Thread Smith, Michael ERDC-CRREL-NH
Relations are joins to non-spatial tables containing domain values etc. They
are relational tables.

Mike


-- 
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers



On 4/28/11 1:19 PM, Even Rouault even.roua...@mines-paris.org wrote:

 Le jeudi 28 avril 2011 02:11:30, Paul Ramsey a écrit :
 
 I assume the failures are relationships we don't handle yet (or ever
 and will need to be silenced).
 
 
 Not sure what those relations things are.
 
 There is a test file in the FGDB API itself, and it fails to open
 entirely, which seems odd,
 
 [pramsey@localhost data]$ ogrinfo ./TestData.gdb
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 FAILURE:
 Unable to open datasource `./TestData.gdb' with the following drivers.
 
 Do other folks have trouble opening the ESRI sample file? The error
 code doesn't make much sense, it is supposed to mean If the path is
 seriously in error, say pointing to the wrong drive, a -2147467259
 (E_FAIL) error is returned and relates to the CreateGeodatabase
 method, not the OpenGeodatabase method.
 
 Yes I did notice that issue too. I assume either the example is corrupted,
 either it is a bug in the FileGDB API, either... Perhaps reporting to ESRI
 might be usefull. Or perhaps Ragi has some clues.
 
 Even
 ___
 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] FGDB Opening Sample File

2011-04-28 Thread Paul Ramsey
Are they tables or links between tables?  I can see this is going to
be a hard project to do without ArcGIS handy :)

P.

On Thu, Apr 28, 2011 at 10:26 AM, Smith, Michael ERDC-CRREL-NH
michael.sm...@usace.army.mil wrote:
 Relations are joins to non-spatial tables containing domain values etc. They
 are relational tables.

 Mike


 --
 Michael Smith
 Remote Sensing/GIS Center
 US Army Corps of Engineers



 On 4/28/11 1:19 PM, Even Rouault even.roua...@mines-paris.org wrote:

 Le jeudi 28 avril 2011 02:11:30, Paul Ramsey a écrit :

 I assume the failures are relationships we don't handle yet (or ever
 and will need to be silenced).


 Not sure what those relations things are.

 There is a test file in the FGDB API itself, and it fails to open
 entirely, which seems odd,

 [pramsey@localhost data]$ ogrinfo ./TestData.gdb
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 FAILURE:
 Unable to open datasource `./TestData.gdb' with the following drivers.

 Do other folks have trouble opening the ESRI sample file? The error
 code doesn't make much sense, it is supposed to mean If the path is
 seriously in error, say pointing to the wrong drive, a -2147467259
 (E_FAIL) error is returned and relates to the CreateGeodatabase
 method, not the OpenGeodatabase method.

 Yes I did notice that issue too. I assume either the example is corrupted,
 either it is a bug in the FileGDB API, either... Perhaps reporting to ESRI
 might be usefull. Or perhaps Ragi has some clues.

 Even
 ___
 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


RE: [gdal-dev] FGDB Opening Sample File

2011-04-28 Thread Jason Roberts
FWIW, the error code -2147467259 is probably a Microsoft HRESULT. In hex, it
is 0x80004005, which is a generic access is denied error. Not that this is
much of a clue about what is going on. You could check for some kind of
permissions or access problem...

Jason

-Original Message-
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Paul Ramsey
Sent: Thursday, April 28, 2011 5:31 PM
To: Smith, Michael ERDC-CRREL-NH
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] FGDB Opening Sample File

Are they tables or links between tables?  I can see this is going to
be a hard project to do without ArcGIS handy :)

P.

On Thu, Apr 28, 2011 at 10:26 AM, Smith, Michael ERDC-CRREL-NH
michael.sm...@usace.army.mil wrote:
 Relations are joins to non-spatial tables containing domain values etc.
They
 are relational tables.

 Mike


 --
 Michael Smith
 Remote Sensing/GIS Center
 US Army Corps of Engineers



 On 4/28/11 1:19 PM, Even Rouault even.roua...@mines-paris.org wrote:

 Le jeudi 28 avril 2011 02:11:30, Paul Ramsey a écrit :

 I assume the failures are relationships we don't handle yet (or ever
 and will need to be silenced).


 Not sure what those relations things are.

 There is a test file in the FGDB API itself, and it fails to open
 entirely, which seems odd,

 [pramsey@localhost data]$ ogrinfo ./TestData.gdb
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
 FAILURE:
 Unable to open datasource `./TestData.gdb' with the following drivers.

 Do other folks have trouble opening the ESRI sample file? The error
 code doesn't make much sense, it is supposed to mean If the path is
 seriously in error, say pointing to the wrong drive, a -2147467259
 (E_FAIL) error is returned and relates to the CreateGeodatabase
 method, not the OpenGeodatabase method.

 Yes I did notice that issue too. I assume either the example is
corrupted,
 either it is a bug in the FileGDB API, either... Perhaps reporting to
ESRI
 might be usefull. Or perhaps Ragi has some clues.

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


Re: [gdal-dev] Mask and GEOTiff

2011-04-28 Thread Marius Jigmond
In QGIS you can use Raster Calculator to multiply the rasters.

-marius

On Thu, 2011-04-28 at 00:30 -0700, canduc17 wrote:
 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 that possible with tools like gdal_translate or other ones?
 
 Thanks in advance!
 
 --
 View this message in context: 
 http://osgeo-org.1803224.n2.nabble.com/Mask-and-GEOTiff-tp6312284p6312284.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 mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] FGDB Opening Sample File

2011-04-28 Thread Marius Jigmond
They are links between tables. Usually, between the attribute table of a
feature class and a simple (non-spatial, as Mike said) table. But you
can relate any kind of attribute tables.

-marius

On Thu, 2011-04-28 at 14:30 -0700, Paul Ramsey wrote:
 Are they tables or links between tables?  I can see this is going to
 be a hard project to do without ArcGIS handy :)
 
 P.
 
 On Thu, Apr 28, 2011 at 10:26 AM, Smith, Michael ERDC-CRREL-NH
 michael.sm...@usace.army.mil wrote:
  Relations are joins to non-spatial tables containing domain values etc. They
  are relational tables.
 
  Mike
 
 
  --
  Michael Smith
  Remote Sensing/GIS Center
  US Army Corps of Engineers
 
 
 
  On 4/28/11 1:19 PM, Even Rouault even.roua...@mines-paris.org wrote:
 
  Le jeudi 28 avril 2011 02:11:30, Paul Ramsey a écrit :
 
  I assume the failures are relationships we don't handle yet (or ever
  and will need to be silenced).
 
 
  Not sure what those relations things are.
 
  There is a test file in the FGDB API itself, and it fails to open
  entirely, which seems odd,
 
  [pramsey@localhost data]$ ogrinfo ./TestData.gdb
  ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
  ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
  FAILURE:
  Unable to open datasource `./TestData.gdb' with the following drivers.
 
  Do other folks have trouble opening the ESRI sample file? The error
  code doesn't make much sense, it is supposed to mean If the path is
  seriously in error, say pointing to the wrong drive, a -2147467259
  (E_FAIL) error is returned and relates to the CreateGeodatabase
  method, not the OpenGeodatabase method.
 
  Yes I did notice that issue too. I assume either the example is corrupted,
  either it is a bug in the FileGDB API, either... Perhaps reporting to ESRI
  might be usefull. Or perhaps Ragi has some clues.
 
  Even
  ___
  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 mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev