Re: [gdal-dev] ORA-01406 error when reading many attributes from Oracle
Eli Adam eadam at co.lincoln.or.us writes: Jukka, Could it be possible that OCI driver reserves too little of some resoursesand fails because of that with large records? I am now running a query with minimum set of columns in my query and ogr2ogr is running well and I believe it will convert all the million rows from the view now. The view schema does not look extra hard for me. There are 21 attributes in the view and the longest VARCHAR2 is just 100 chararters long. This may be overly simplistic, but does the cast operator do anything? SELECT *, CAST(OGR_STYLE AS character(255)) FROM rivers It does not do anything with OGR_STYLE because I do not have such but I believe your purpose was just to give an example. CAST did not help me with the problematic VARCHAR2 field I managed to put into jail because of making troubles but perhaps I do not know how to use it correctly. I suspect that the reason for the trouble is that this field is a 17 character wide VARCHAR2 and I have in the data values like ÖVRE SÖDERGÄRDAN . Database is using UTF-8 and Ö,Ö and Ä are taking more than one byte each. Perhaps OCI driver develops come from some ASCII country and did not bother to think about Oracle's character and byte semantics throughly. It seems somehow fuzzy for me even after reading this article http://myorastuff.blogspot.fi/2009/02/character-and-byte- semantics-in-oracle.html ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] New OGR driver to read OpenStreetMap .osm / .pbf files
Hi Even, I need to reinstall my OSM database due to the license change to ODBL. Usually I use osm2pgsql for that, but I am willing to sacrifice a little downtime of my DB in order to test the GDAL implementation. Before storming ahead I wanted to know how far you are with the driver implementation - is there anything I need to be aware of? Are you interested at all in a benchmark comparison between GDAL and osm2pgsql? I'll be using the planet file, so thinks will take a while ... Frank Am 2012-07-10 19:23, schrieb Even Rouault: Hi, Following the recent brainstorming with Jukka, I've pushed into trunk a driver to read OpenStreetMap .osm / .pbf files . No particularly exotic dependencies : SQLite (and Expat for OSM XML files) See http://www.gdal.org/ogr/drv_osm.html for the details (will be available in a few hours). The performance to convert http://download.geofabrik.de/osm/europe/finland.osm.pbf into a Spatialite DB is the following one on my PC (Core i5 @ 2.67 GHz with 64bit GDAL) : $ time ogr2ogr finland.sqlite finland.osm.pbf -f SQLite -dsco SPATIALITE=YES -gt 1 -progress --config OGR_SQLITE_SYNCHRONOUS OFF real4m31.194s user3m33.020s sys 0m46.070s Testing with larger areas, like whole France or Europe, shows sluggish performance when ways are built from nodes, but that's perhaps expected. I didn't compare with other tools to know if the indexing or request strategy is particularly bad. The data/osmconf.ini configuration file is pretty basic and its settings could likely be improved with some tweaking. Contributions welcome. An improved version of the driver could allow specifying custom layers, instead of the 4 fixed ones. Happy testing, Even ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Frank BRONIEWSKI METRICO s.à r.l. géomètres technologies d'information géographique rue des Romains 36 L-5433 NIEDERDONVEN tél.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Map control in dotspatial
Hi , Here in my application I have a dotspatial map control , when user clicks particular place on map how to get information of that particular point. Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Map control in dotspatial
On 17 October 2012 10:34, Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com wrote: Here in my application I have a dotspatial map control , when user clicks particular place on map how to get information of that particular point. FYI, it's off-topic here. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] 2 geometries share function
Nikhil Sai Parupalli nikhil.parupalli at iictechnologies.com writes: Hey Loskot This code deals with lot of sql stmts. but here in our development we never worked with databases. We are using gdal libraries , is there any function in gdal or any other libraries that serves the purpose Hi, That document is excellent reading and it should have shown that touches is not the function that you thought you need. It is PostGIS document but don't care about that, the knowledge is universal. Instead, be curious and start reading from the previous level http://postgis.refractions.net/documentation/manual-2.0/PostGIS_Special_Functions_Index.html PostGIS is using GEOS and GDAL can be compiled with GEOS, thus the functions can be used in both, even perhaps not exactly the same set. -Jukka Rahkonen- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] 2 geometries share function
Nikhil Sai Parupalli nikhil.parupalli at iictechnologies.com writes: Hey Loskot This code deals with lot of sql stmts. but here in our development we never worked with databases. We are using gdal libraries , is there any function in gdal or any other libraries that serves the purpose Looking at the *beautiful* pictures displayed in the PostGIS documentation is what I actually suggested. IMO, PostGIS documentation is a mandatory reference while learning GDAL/OGR (geometry). Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] ORA-01406 error when reading many attributes from Oracle
Jukka, If the field is 17 char wide (rather than 17 bytes wide) then that is your problem. A varchar2 column can use either char or byte specifications. http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#i 45694 If neither char or byte is specified, it defaults to your NLS_LENGTH_SEMANTICS in the session that was in place when the table was created. Mike -- Michael Smith US Army Corps Remote Sensing GIS/Center On 10/17/12 5:03 AM, Jukka Rahkonen jukka.rahko...@mmmtike.fi wrote: Eli Adam eadam at co.lincoln.or.us writes: Jukka, Could it be possible that OCI driver reserves too little of some resoursesand fails because of that with large records? I am now running a query with minimum set of columns in my query and ogr2ogr is running well and I believe it will convert all the million rows from the view now. The view schema does not look extra hard for me. There are 21 attributes in the view and the longest VARCHAR2 is just 100 chararters long. This may be overly simplistic, but does the cast operator do anything? SELECT *, CAST(OGR_STYLE AS character(255)) FROM rivers It does not do anything with OGR_STYLE because I do not have such but I believe your purpose was just to give an example. CAST did not help me with the problematic VARCHAR2 field I managed to put into jail because of making troubles but perhaps I do not know how to use it correctly. I suspect that the reason for the trouble is that this field is a 17 character wide VARCHAR2 and I have in the data values like ÖVRE SÖDERGÄRDAN . Database is using UTF-8 and Ö,Ö and Ä are taking more than one byte each. Perhaps OCI driver develops come from some ASCII country and did not bother to think about Oracle's character and byte semantics throughly. It seems somehow fuzzy for me even after reading this article http://myorastuff.blogspot.fi/2009/02/character-and-byte- semantics-in-oracle.html ___ 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] ORA-01406 error when reading many attributes from Oracle
Jukka Rahkonen jukka.rahkonen at mmmtike.fi writes: I suspect that the reason for the trouble is that this field is a 17 character wide VARCHAR2 and I have in the data values like ÖVRE SÖDERGÄRDAN . Database is using UTF-8 and Ö,Ö and Ä are taking more than one byte each. Perhaps OCI driver develops come from some ASCII country and did not bother to think about Oracle's character and byte semantics throughly. It seems somehow fuzzy for me even after reading this article http://myorastuff.blogspot.fi/2009/02/character-and-byte- semantics-in-oracle.html I can repeat the error with a minimal one-row test table having a field NAME VARCHAR2(6) and value ÄäÖöÅå VARCHAR2(6) means the same as VARCHAR2(6 CHAR) but OGR OCI driver thinks that it means the same as VARCHAR2(6 BYTE) and that leads to ORA-01406 error if the character string has more that 6 bytes even it has 6 or less characters. I will make a ticket about this. Now, can anybody suggest a handy workaround? I can take the IDs and names out into a text file and join names with the rest of the data with Spatialite or some other tool but I have 14 layers to process, 1.1 million rows on each and that would probably be too slow. I do not have rights to add a new attribute NAME2 VARCHAR(40 BYTE) into Oracle but perhaps I will need to ask DB admin to create that for me. -Jukka- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Orthorectification iN GDAL
Greetings I want to orthorectify a few SPOT images and at QGIS mailing list someone indicated me that this feature is available in GDAL. I have checked but I didn't find anything. Can anyone confirm me this? Regards Luis ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Orthorectification iN GDAL
As far as I know, GDAL will orthorectify images supplied with RPC data (e.g. Digital Globe's Worldview/Quickbird, GeoEye's Iknonoe, GeoEye1, etc) but not Spot imagery. You could use OSSIM to orthorectify Spot. Best Regards, Brent Fraser On 10/17/2012 5:22 AM, Luis Lisboa wrote: Greetings I want to orthorectify a few SPOT images and at QGIS mailing list someone indicated me that this feature is available in GDAL. I have checked but I didn't find anything. Can anyone confirm me this? Regards Luis ___ 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] Implementing overview support apart from the default support
Hello, I'm working with Mapserver, trying to serve images stored in PostGIS Raster via WMS using the new version of GDAL PostGIS Raster driver (I'm working to improve it). The images appears misplaced when overview tables are used. The overviews were correctly created, but the driver doesn't serve them in the right way. In other words: it isn't a data problem. It's a driver problem. I've been re-reading the GDAL driver implementation tutorial, but it only covers the default support in GDAL for external overviews stored in TIFF files. My overviews are stored in PostGIS Raster tables, not TIFF files. I'm looking at geotiff.cpp code. I guess the driver have to fullfill some requirements, like geotiff driver does. My question is: what are the most important parts in order to provide a good overview support, based on the idea that the overviews are raster tables? (Just reading support, so far) Many thanks in advance, -- Jorge Arevalo http://www.krop.com/jorgearevalo ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Implementing overview support apart from the default support
Selon Jorge Arevalo jorgearev...@libregis.org: Hello, I'm working with Mapserver, trying to serve images stored in PostGIS Raster via WMS using the new version of GDAL PostGIS Raster driver (I'm working to improve it). The images appears misplaced when overview tables are used. The overviews were correctly created, but the driver doesn't serve them in the right way. In other words: it isn't a data problem. It's a driver problem. I've been re-reading the GDAL driver implementation tutorial, but it only covers the default support in GDAL for external overviews stored in TIFF files. My overviews are stored in PostGIS Raster tables, not TIFF files. I'm looking at geotiff.cpp code. I guess the driver have to fullfill some requirements, like geotiff driver does. My question is: what are the most important parts in order to provide a good overview support, based on the idea that the overviews are raster tables? (Just reading support, so far) Jorge, I'm not sure if there are very well formalized requirements documented somewhere, bu the ones I can think of are : 1) A few characteristics of the overview band should be the same as the base band, i.e. same data type (this is probably not a so strong requirement, because RasterIO() should do the translation to the requested data type), and same color table in the case the base band has a color table associated 2) The spatial extent of the overview band should be exactly the same as the one of the base band. This is really a strong requirement. And I feel this is the likely cause of the mis-placement you observe. I'm not sure how your PostGIS Raster overviews are built, but if they have a different extent that the full resolution table, you'll surely have an issue, unless the driver compensates for that by padding/cropping appropriately. Best regards, Even ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Orthorectification iN GDAL
That's a nice QA for the GDAL FAQ, seriously. Mateusz Łoskot (sent from mobile, apology for top-post or broken quotes) On 17 Oct 2012 14:45, Brent Fraser bfra...@geoanalytic.com wrote: As far as I know, GDAL will orthorectify images supplied with RPC data (e.g. Digital Globe's Worldview/Quickbird, GeoEye's Iknonoe, GeoEye1, etc) but not Spot imagery. You could use OSSIM to orthorectify Spot. Best Regards, Brent Fraser On 10/17/2012 5:22 AM, Luis Lisboa wrote: Greetings I want to orthorectify a few SPOT images and at QGIS mailing list someone indicated me that this feature is available in GDAL. I have checked but I didn't find anything. Can anyone confirm me this? Regards Luis ___ gdal-dev mailing listgdal-dev@lists.osgeo.orghttp://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] Orthorectification iN GDAL
17.10.2012 15:22, Luis Lisboa ?: Greetings I want to orthorectify a few SPOT images and at QGIS mailing list someone indicated me that this feature is available in GDAL. I have checked but I didn't find anything. Can anyone confirm me this? Regards Luis ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev There is a good article about ortho on Russian (http://gis-lab.info/qa/orbview3-ortho-gdal.html). You can google trnslate it. Also there is a translation (http://wiki.gis-lab.info/w/OrbView-3_Orthorectification) but not finished. I haven't tested Spot yet, but I know kompsat-2imagery were otrthorectified successful, but not from the box. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector
Hello, Is it possible to use ESRI SHP polygon file to mask ENVI BSQ img format files with more than 1 band? I can mask a GTiff file using the SHP but ENVI file does not appear to work. Gdal version is 1.6.3 . The documentation appears unclear for any raster that is not specifically GTiff. Thanks, Peter ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector
Peter, I'm guessing you are using the gdal_polygonize.py script for masking. Is that right? I am not aware of any particular reason this shouldn't work for any update in place format (ie. shows rw+ in the gdalinfo --formats list). ENVI is in this list. BTW, before we do a lot of work to investigate this you might want to see if the problem persists with GDAL 1.9. GDAL 1.6.3 is getting pretty antique. Best regards, Frank On Wed, Oct 17, 2012 at 2:59 PM, Peter Willis pwil...@aslenv.com wrote: Hello, Is it possible to use ESRI SHP polygon file to mask ENVI BSQ img format files with more than 1 band? I can mask a GTiff file using the SHP but ENVI file does not appear to work. Gdal version is 1.6.3 . The documentation appears unclear for any raster that is not specifically GTiff. Thanks, Peter ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- ---+-- 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 Software Developer ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector
Hello, I was using gdal_rasterize directly rather than gdal_polygonize.py . .No gdal_poygonize.py found for my revision.. I was forgetful of -formats via gdalinfo. This shows rw+ for ENVI format which is what I need. Upon looking I find that I have already installed revision 1.9 in another /usr/local directory. Perhaps I should use the more recent revision for attempting this. Thanks for the pointers, Peter From: fwarmer...@gmail.com [mailto:fwarmer...@gmail.com] On Behalf Of Frank Warmerdam Sent: October-17-12 3:22 PM To: Peter Willis Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector Peter, I'm guessing you are using the gdal_polygonize.py script for masking. Is that right? I am not aware of any particular reason this shouldn't work for any update in place format (ie. shows rw+ in the gdalinfo --formats list). ENVI is in this list. BTW, before we do a lot of work to investigate this you might want to see if the problem persists with GDAL 1.9. GDAL 1.6.3 is getting pretty antique. Best regards, Frank On Wed, Oct 17, 2012 at 2:59 PM, Peter Willis pwil...@aslenv.com wrote: Hello, Is it possible to use ESRI SHP polygon file to mask ENVI BSQ img format files with more than 1 band? I can mask a GTiff file using the SHP but ENVI file does not appear to work. Gdal version is 1.6.3 . The documentation appears unclear for any raster that is not specifically GTiff. Thanks, Peter ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- ---+ -- 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 Software Developer ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector [SEC=UNCLASSIFIED]
Try gdalwarp (http://www.gdal.org/gdalwarp.html) with the -cutline argument. gdalwarp -of envi -cutline shapefile.shp multibandenvi.dat croppedoutput.dat Luke -Original Message- From: gdal-dev-boun...@lists.osgeo.org [mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Peter Willis Sent: Thursday, 18 October 2012 8:59 AM To: gdal-dev@lists.osgeo.org Subject: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector Hello, Is it possible to use ESRI SHP polygon file to mask ENVI BSQ img format files with more than 1 band? I can mask a GTiff file using the SHP but ENVI file does not appear to work. Gdal version is 1.6.3 . The documentation appears unclear for any raster that is not specifically GTiff. Thanks, Peter ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments. Please consider the environment before printing this email. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector
Hello, On second thoughts, this is not really what I want. I have a SHP format polygon vector file already. I want to use that existing vector file to mask the ENVI format BSQ file through all (49) channels. (ie: 'mask' meaning set any values inside vector polygons to a specific value within the output ENVI BSQ file ) Perhaps I'm missing something. Peter From: fwarmer...@gmail.com [mailto:fwarmer...@gmail.com] On Behalf Of Frank Warmerdam Sent: October-17-12 3:22 PM To: Peter Willis Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector Peter, I'm guessing you are using the gdal_polygonize.py script for masking. Is that right? I am not aware of any particular reason this shouldn't work for any update in place format (ie. shows rw+ in the gdalinfo --formats list). ENVI is in this list. BTW, before we do a lot of work to investigate this you might want to see if the problem persists with GDAL 1.9. GDAL 1.6.3 is getting pretty antique. Best regards, Frank On Wed, Oct 17, 2012 at 2:59 PM, Peter Willis pwil...@aslenv.com wrote: Hello, Is it possible to use ESRI SHP polygon file to mask ENVI BSQ img format files with more than 1 band? I can mask a GTiff file using the SHP but ENVI file does not appear to work. Gdal version is 1.6.3 . The documentation appears unclear for any raster that is not specifically GTiff. Thanks, Peter ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- ---+ -- 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 Software Developer ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector [SEC=UNCLASSIFIED]
Perhaps something like for i in {1..49}; do gdal_rasterize -burn -999 -b $i mask.shp 49bandenvi.dat; done Luke From: gdal-dev-boun...@lists.osgeo.org [mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Peter Willis Sent: Thursday, 18 October 2012 9:43 AM To: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector Hello, On second thoughts, this is not really what I want. I have a SHP format polygon vector file already. I want to use that existing vector file to mask the ENVI format BSQ file through all (49) channels. (ie: 'mask' meaning set any values inside vector polygons to a specific value within the output ENVI BSQ file ) Perhaps I'm missing something... Peter From: fwarmer...@gmail.commailto:fwarmer...@gmail.com [mailto:fwarmer...@gmail.com] On Behalf Of Frank Warmerdam Sent: October-17-12 3:22 PM To: Peter Willis Cc: gdal-dev@lists.osgeo.orgmailto:gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector Peter, I'm guessing you are using the gdal_polygonize.py script for masking. Is that right? I am not aware of any particular reason this shouldn't work for any update in place format (ie. shows rw+ in the gdalinfo --formats list). ENVI is in this list. BTW, before we do a lot of work to investigate this you might want to see if the problem persists with GDAL 1.9. GDAL 1.6.3 is getting pretty antique. Best regards, Frank On Wed, Oct 17, 2012 at 2:59 PM, Peter Willis pwil...@aslenv.commailto:pwil...@aslenv.com wrote: Hello, Is it possible to use ESRI SHP polygon file to mask ENVI BSQ img format files with more than 1 band? I can mask a GTiff file using the SHP but ENVI file does not appear to work. Gdal version is 1.6.3 . The documentation appears unclear for any raster that is not specifically GTiff. Thanks, Peter ___ gdal-dev mailing list gdal-dev@lists.osgeo.orgmailto:gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.commailto:warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments. Please consider the environment before printing this email. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Using gdal_rasterize to mask ENVI file Using ESRI SHP format Vector
On Wed, Oct 17, 2012 at 3:42 PM, Peter Willis pwil...@aslenv.com wrote: Hello, ** ** On second thoughts, this is not really what I want. ** ** I have a SHP format polygon vector file already. I want to use that existing vector file to mask the ENVI format BSQ file through all (49) channels. (ie: ‘mask’ meaning set any values inside vector polygons to a specific value within the output ENVI BSQ file ) ** ** Perhaps I’m missing something… Peter, I think gdal_rasterize can do this, but I imagine as it is setup now I think you will have to explicitly list every band to write to. For instance I was able to do the following for a 3 band TIFF file: gdal_rasterize -b 1 -b 2 -b 3 -burn 128 alaska_box.shp work.tif This burned the value 128 into bands 1, 2 and 3 in work.tif. 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 Software Developer ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev