Re: [gdal-dev] Feature request: gauss and other interpolations in gdalwarp
Jan, I can't speak the development request, but you may be able to do some sharpening using the Kernel object in a VRT. I've used Coefs-0.111 -0.111 -0.111 -0.111 2 -0.111 -0.111 -0.111 -0.111/Coefs to apply sharpening to satellite imagery. And a few years ago I found that using wavelet compression on scanned topographic maps when downsampling made the text more readable (preserves edges more). I used ECW back then, but I suspect JPEG2000 may do it as well... Best Regards, Brent Fraser On 3/28/2013 5:27 AM, Jan Hartmann wrote: Perhaps I should clarify a bit what I meant, I haven't had any reactions until now, positive or negative, and it is important for me. I use Gdalwarp and gdaladdo extensively for goereferencing and tiling large historical maps serieses (raster scans). To display them efficiently, I need to create layers at different scale levels, e.g. if the original maps have a pixel size of 10 meters, I need to resample them to rasters with pixel sizes of 20, 40, 80 , 160, 320 and 640 meters, and tile all those maps appropriately. So the original maps have to be resampled quite drastically. In Gdalwarp there is no adequeate resampling algorithm, and you end up with very grainy map at those lower resolutions. Gdaladdo has several more algorithms, with gauss in many cases the most efficient. However, even with the gauss filter, maps resampled at very low resolutions turn out too hazy. For an example see the 1930 map of the Netherlands: http://mapserver.sara.nl/topo/triang/ If you zoom in to more detailed levels, you'll see the way the image sharpens. For the effect on black-white image choose the TMK-map (1850) with the top-center button. Filters like unsharp mask would perform much better in these cases. So I would like to propose two enhancements to gdal: - add additional filters to gdalwarp, gauss and the filters mentioned below. - implement more filters for gdalwarp and gdaladdo, e.g. unsharp mask, or the mode filter asked by Jack below. Perhaps even add the possibility to specify parameters, like in ImageMagick I don't know how difficult is, and whether the gdal devs would find this really an improvement for gdal. I could do this with some ImageMagick or Gimp scripts, but it would be a kludge. As we are going to georeference the complete cadastral and topographical map base of the Netherlands from 1832 to 1994 the next few years (millions of map-scans), this exentsion of gdal would come in very handy. And funding it will really be no problem at all. I would appreciate any kind of comment on this, positive or negative. Regards, Jan Dr. J. Hartmann Department of Geography University of Amsterdam On 03/27/2013 10:13 PM, John Twilley wrote: I'm interested in this feature request as well. Adding the mode resampling algorithm to gdalwarp would be very beneficial to my projects, right up there with being able to access the warp API from Python. Is this at all possible? Should I submit a feature request on Trac, or what? Just let me know! Jack. -- mathuin at gmail dot com On Mon, Feb 18, 2013 at 8:17 AM, Jan Hartmann j.l.h.hartm...@uva.nl mailto:j.l.h.hartm...@uva.nl wrote: Hi devs, Would it be possible to add gauss and other interpolations to gdalwarp? At the moment I georeference large scans to 2000*2000 tiles at the most detailed scale, and then create 2000*2000 tiles at resolutions of 2, 4 6 etc times the original scale, using gdaladdo and gauss or other interpolations. It would help immensely if I could do that directly with gdalwarp. Funding would probably no problem. The question is: can and should it be done? Jan ___ gdal-dev mailing list gdal-dev@lists.osgeo.org mailto: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
[gdal-dev] Problems using gdalwarp -cutline
Hi there, sorry for the newbie question, but I couldn't figure out my problem reading documentation and examples on the web. Here is my problem: - I have a Landsat raster image - I have a ESRI sahpefile representing a fire perimeter - I need to crop the raster using the fire perimeter Following the gdalwarp page http://www.gdal.org/gdalwarp.html, I did this from my terminal: gdalwarp -cutline Santiago2007_reporj.shp LT50400372008225PAC01_B1.TIF CROPPED.TIF But the result is a black raster, completely misplaced. I also tried to add the -cl layername option but didn't do any better. Please find the raster and shape files in my Dropbox public folderhttps://www.dropbox.com/sh/t1thka9wdl7ojf6/CxlYC_K-lG . Thanks in advance for your help, George ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] dear god!!
i want to unsubscribe, help me! ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] dear god!!
I saw you're using gmail, when you mark the mails from this list as spam, gmail should be able to unsubscribe for you, did you try this? Chao On Fri, Mar 29, 2013 at 8:37 PM, Parissa Mahdavi mahdavi.pari...@gmail.comwrote: i want to unsubscribe, help me! ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] OGRDataSource::CreateLayer error on application exit
Le vendredi 29 mars 2013 21:38:13, Andy Canfield a écrit : If I create a shapefile layer like so: const char *pszShpDriverName = ESRI Shapefile; OGRSFDriver *poShpDriver; poShpDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName(pszShpDriverName); poShpDS = poShpDriver-CreateDataSource(pszDstFilename, NULL); poShpLayer = poShpDS-CreateLayer( poly_out, NULL, wkbPolygon, NULL ); and close it like so: OGRDataSource::DestroyDataSource(poShpDS); I have no problems, but if I specify a projection for it from an open GeoTiff I have as the data set poDataset like so: OGRSpatialReference *poSrcSRS = new OGRSpatialReference(poDataset-GetProjectionRef()); const char *pszShpDriverName = ESRI Shapefile; OGRSFDriver *poShpDriver; poShpDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName(pszShpDriverName); poShpDS = poShpDriver-CreateDataSource(pszDstFilename, NULL); poShpLayer = poShpDS-CreateLayer( poly_out, poSrcSRS, wkbPolygon, NULL ); I get this error when I go to shut my application down after using the above code be it in a dll or in a console app. This is just a guess, but it might be related how you delete poSrcSRS. As you've allocated it with new, you should delete it with delete (and not OGRSpatialReference::DestroySpatialReference() ) ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] OGRDataSource::CreateLayer error on application exit
On Fri, Mar 29, 2013 at 3:00 PM, Even Rouault even.roua...@mines-paris.orgwrote: Le vendredi 29 mars 2013 21:38:13, Andy Canfield a écrit : If I create a shapefile layer like so: const char *pszShpDriverName = ESRI Shapefile; OGRSFDriver *poShpDriver; poShpDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName(pszShpDriverName); poShpDS = poShpDriver-CreateDataSource(pszDstFilename, NULL); poShpLayer = poShpDS-CreateLayer( poly_out, NULL, wkbPolygon, NULL ); and close it like so: OGRDataSource::DestroyDataSource(poShpDS); I have no problems, but if I specify a projection for it from an open GeoTiff I have as the data set poDataset like so: OGRSpatialReference *poSrcSRS = new OGRSpatialReference(poDataset-GetProjectionRef()); const char *pszShpDriverName = ESRI Shapefile; OGRSFDriver *poShpDriver; poShpDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName(pszShpDriverName); poShpDS = poShpDriver-CreateDataSource(pszDstFilename, NULL); poShpLayer = poShpDS-CreateLayer( poly_out, poSrcSRS, wkbPolygon, NULL ); I get this error when I go to shut my application down after using the above code be it in a dll or in a console app. This is just a guess, but it might be related how you delete poSrcSRS. As you've allocated it with new, you should delete it with delete (and not OGRSpatialReference::DestroySpatialReference() ) Calling delete or OGRSpatialReference::DestroySpatialReference() on poSrcSRS both throw an error even if I never use it, but it is a different error than the one I am seeing currently on app shutdown. -Andy ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] dear god!!
the bottom of the message you sent (just like every message) has a link to the mailing list manager - http://lists.osgeo.org/mailman/listinfo/gdal-dev Follow that link and you'll find unsubscribe instructions at the bottom. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev