[gdal-dev] How to-- gdal_calc.py

2011-12-20 Thread Stephen Mather
Hi All, Is there any casting (for lack of a better word) needed when using gdal_calc to take, e.g. a series of 16-bit images and perform float functions against them? Best, Steve ___ gdal-dev mailing list gdal-dev@lists.osgeo.org

[gdal-dev] Slope in gdaldem

2011-12-15 Thread Stephen Mather
] pafLocalMax) { pafLocalMax=afWin[k]; } } return pafLocalMax - afWin[4]; } Any critques? Reasons to not add? Best, Steve Stephen Mather GIS Manager Cleveland Metroparks 4101 Fulton Pkwy Cleveland, OH 44144 ___ gdal-dev

[gdal-dev] Re: Slope in gdaldem

2011-12-15 Thread Stephen Mather
, Dec 15, 2011 at 11:49 AM, Stephen Mather mather.step...@gmail.comwrote: Hi All, A colleague tipped me off to an article in Forestry Source entitled When GIS Slope Isn't What You Think showing differences between field measured slope values and GIS results. The differences can

[gdal-dev] Re: Slope in gdaldem

2011-12-15 Thread Stephen Mather
Apologies for the flurry, one more change: float GDALSlopeHydroAlg (float* afWin, float fDstNoDataValue, void* pData) { // Hydrologic Slope is the max // local slope btw center cell and adjacent cells const double radiansToDegrees = 180.0 / M_PI; GDALSlopeAlgData* psData =

Re: [gdal-dev] Re: Slope in gdaldem

2011-12-15 Thread Stephen Mather
the center cell to surrounding cell with the *minimum* elevation. - matt On Thu, Dec 15, 2011 at 10:29 AM, Stephen Mather mather.step...@gmail.com wrote: I already see a flaw-- the function should be more like: float GDALSlopeHydroAlg (float* afWin, float fDstNoDataValue, void* pData

Re: [gdal-dev] Re: Slope in gdaldem

2011-12-15 Thread Stephen Mather
Here's what I've settled on. Let me know your thoughts. The algorithm now correctly calculates angle to lowest nearby point. If it's a local minima, it instead calculates angle to the nearest high point, which will be a negative number, so if the user wants to nullify these or use them in

Re: [gdal-dev] Re: Slope in gdaldem

2011-12-15 Thread Stephen Mather
Hmm. I don't follow? The revision would be this: float GDALSlopeHydroAlg (float* afWin, float fDstNoDataValue, void* pData) { // Hydrologic Slope is the max // local slope btw center cell and adjacent cells const double radiansToDegrees = 180.0 / M_PI; GDALSlopeAlgData*

Re: [gdal-dev] Re: Slope in gdaldem

2011-12-15 Thread Stephen Mather
Steve, there are more things I do not understand either. What is 'psData-scale'? Is it the grid cell size? So, if 'pafLocalMin' is on one of the 4 corners the distance is not cell size (let's call it DX) but instead sqrt(DX*DX + DX*DX). And what if data is in geogs? Than DX is clearly

[gdal-dev] RE: Mosaic the output of gdal2tiles (iomeneandrei)

2011-01-03 Thread Stephen Mather
Hi all, I have a folder with a gdal2tiles output: 6 levels of zoom (and folders), with subfolders and the .png tiles. Is there a gdal tool to merge in a single geotiff file these .png tiles? Hi Andrea, Probably the simplest way to handle this is with a virtual dataset. Rather than a

Re: [gdal-dev] Problem with gdal 1.8 -- segmentation fault on large image with gdaladdo

2011-01-01 Thread Stephen Mather
Seems large enough for me. Stephen Mather On Jan 1, 2011, at 5:47 AM, Even Rouault even.roua...@mines-paris.org wrote: What's the new ceiling on image size for overview calculation? The same as before hopefully. I'm not sure what the limit is. From a quick look at the code, I'd say

[gdal-dev] Problem with gdal 1.8 -- segmentation fault on large image with gdaladdo

2010-12-31 Thread Stephen Mather
Hi All, Testing out gdal 1.8; really excited by http://www.gdal.org/gdallocationinfo.html. Below is a comparison of doing the same process in 1.7.3 and then 1.8dev, released 2010/01/19 $ gdaladdo --version GDAL 1.7.3, released 2010/11/10 $ gdalbuildvrt LEAP_Tree_Height_low_res_test.vrt

Re: [gdal-dev] Problem with gdal 1.8 -- segmentation fault on large image with gdaladdo

2010-12-31 Thread Stephen Mather
Seems to have done the trick, thanks Even. What's the new ceiling on image size for overview calculation? Steve On Fri, Dec 31, 2010 at 11:38 AM, Even Rouault even.roua...@mines-paris.org wrote: Stephen, this should be fixed now in SVN. This was indeed something wrong in a recent