Re: [gdal-dev] Multiple extensions in GDAL_DMD_EXTENSION ?

2013-02-19 Thread Oyvind Idland
People *usually* want a list of extensions so they can automatically > categorize the format of files on disk or to filter to only show > extensions they think GDAL supports. I find this practice abhorrent! > GDAL is based on the idea that file formats are discovered by > inspecting file content

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Brian Case
a few years ago someone had posted some perl code for making polys from the contour output. the idea was to sort the lines into an m-way tree by contains with the root node being the extent of the data then each node would be outer ring and a copy of the children being the inner rings i have done

Re: [gdal-dev] ogr utilities -dsco

2013-02-19 Thread Frank Warmerdam
David, This should have worked. ogr2ogr -f "KML" test3.kml impaired_2010_streams.shp -dsco NameField=AUID -dsco DescriptionField=REACH_DESC Did one of the options get ignored? Was there an error? Best regards, Frank On Tue, Feb 19, 2013 at 1:26 PM, David Fawcett wrote: > OK GDAL Devs, I give

Re: [gdal-dev] ogr utilities -dsco

2013-02-19 Thread Kyle Shannon
Use one -dsco flag for each option: ogr2ogr -f KML impaired_streams_2010.kml impaired_2010_streams.shp -dsco NameField=AUID -dsco DescriptionField=REACH_DESC On Tue, Feb 19, 2013 at 2:26 PM, David Fawcett wrote: > OK GDAL Devs, I give up. > > If I want to specify multiple -dsco key:value with OG

[gdal-dev] ogr utilities -dsco

2013-02-19 Thread David Fawcett
OK GDAL Devs, I give up. If I want to specify multiple -dsco key:value with OGR, what is the syntax? This works for one attribute: R:\mpca>ogr2ogr -f "KML" impaired_streams_2010.kml impaired_2010_streams.shp -ds co NameField=AUID But none of these work for two attributes: R:\mpca>ogr2ogr -f "K

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Jeff Lake
It all depends on the data your having gdal_polygonize contour ... here is a snippet of what I'm doing with a csv I'm creating of current weather /usr/local/bin/gdal_grid -zfield "temp" -a invdist:power=2.0:smoothing=1:nodata=- -outsize 800 600 -l temp /var/www/html/metar/temp.vrt /var/w

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Daniel Morissette
Hi Jeff, FYI we have been working on smoothing contours produced by gdal_contour, and one of the issues that we encountered was having to deal with that same stair effect (even with contours we get it in some cases). I don't think that simplifying your polygons will be enough in your case, you

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Jeff Lacoste
Thank you Frank ! Very much appreciated. I'll give 'Simplify' option a try. Jeff On Tue, Feb 19, 2013 at 3:25 PM, Frank Warmerdam wrote: > Jeff, > > I believe this is exposed in ogr2ogr using the -simplify argument: > > -simplify tolerance: > (starting with GDAL 1.9.0) distance tolerance for si

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Frank Warmerdam
Jeff, I believe this is exposed in ogr2ogr using the -simplify argument: -simplify tolerance: (starting with GDAL 1.9.0) distance tolerance for simplification. Note: the algorithm used preserves topology per feature, in particular for polygon geometries, but not for a whole layer. Best regards,

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Jeff Lacoste
Yes visually attractive or smooth polygons is the goal. Thanks again Frank. Doing a web search about simplification algorithm i found one named '*Ramer-Douglas–Peucker' (*http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm). It appears that 'Geos'' library implement this algorithm. Is thi

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Frank Warmerdam
On Tue, Feb 19, 2013 at 11:28 AM, Jeff Lacoste wrote: > Hi Frank, > > Thanks for your quick response. Following the edges of the pixels seems a > perfect solution for non continuous grid (ex. land use, etc.) as > the boundary between the class is important to keep when constructing the > polygon.

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Jeff Lacoste
Hi Frank, Thanks for your quick response. Following the edges of the pixels seems a perfect solution for non continuous grid (ex. land use, etc.) as the boundary between the class is important to keep when constructing the polygon. However for continuous grid (.ex elevations), the boundaries are a

Re: [gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Frank Warmerdam
On Tue, Feb 19, 2013 at 10:29 AM, Jeff Lacoste wrote: > Hi, > > I'm using gdal_polygonize.py to create polygon from a grid and the output > polygons seems to follow the edges > of the grid pixels. I was wondering if there is any way to change/edit the > code to instead of following the edges > of

[gdal-dev] gdal_polygonize and polygon edges

2013-02-19 Thread Jeff Lacoste
Hi, I'm using gdal_polygonize.py to create polygon from a grid and the output polygons seems to follow the edges of the grid pixels. I was wondering if there is any way to change/edit the code to instead of following the edges of the pixels, use the center of

Re: [gdal-dev] Multiple extensions in GDAL_DMD_EXTENSION ?

2013-02-19 Thread Frank Warmerdam
On Tue, Feb 19, 2013 at 9:39 AM, Etienne Tourigny wrote: > It would be nice to be able to specify many extensions in a > comma-separated list such as "nc,cdf,nc4". It can probably be done > (metadata is just a string), but isn't standard. > > The Gdal driver tutorial states: > GDAL_DMD_EXTENSION:

Re: [gdal-dev] Multiple extensions in GDAL_DMD_EXTENSION ?

2013-02-19 Thread Oyvind Idland
For backward compability, an additional variable (eg. GDAL_DMD_EXTENSION_ALT or something like that) could be added with a specified format. - Oyvind On Tue, Feb 19, 2013 at 6:39 PM, Etienne Tourigny wrote: > It would be nice to be able to specify many extensions in a > comma-separated list such

Re: [gdal-dev] Multiple extensions in GDAL_DMD_EXTENSION ?

2013-02-19 Thread Etienne Tourigny
It would be nice to be able to specify many extensions in a comma-separated list such as "nc,cdf,nc4". It can probably be done (metadata is just a string), but isn't standard. The Gdal driver tutorial states: GDAL_DMD_EXTENSION: The extension used for files of this type. If more than one pick the

Re: [gdal-dev] Multiple extensions in GDAL_DMD_EXTENSION ?

2013-02-19 Thread Frank Warmerdam
I am not aware of a way to list multiple extensions. Best regards, On Feb 19, 2013 2:15 AM, "Oyvind Idland" wrote: > Is it possible to specify multiple file extensions in GDAL_DMD_EXTENSION ? > > I ask because I am working on a driver for a format that has several known > file extensions. > > >

[gdal-dev] Transform from ground control points

2013-02-19 Thread Livneh Yehiyam
Hi I have an image with 4 control points at the 4 corners. From my understanding, this defines a perspective linear transform (not necesserally affine). I'm trying to warp it into an orthophoto. from what I see in the gdalgcptransform code it seems that only an affine transform is created. Is it

Re: [gdal-dev] GDAL/OGR 1.10.0 Beta1

2013-02-19 Thread Sjur Kolberg
Hello, The announcement of GDAL/OGR 1.10 beta1 almost a month ago spawned only a few comments regarding EXIF metadata. I apologize for not having the time to test it myself, but is there a RC lurking around the corner? Sjur :-) > -Original Message- > From: gdal-dev-boun...@lists.os

Re: [gdal-dev] To know about centriod of a polygon shape file

2013-02-19 Thread Chaitanya kumar CH
Siva, Centroid of a polygon need not coincide with the centroid of it's buffer. On Tue, Feb 19, 2013 at 11:21 AM, SIVA RAMA KRISHNA wrote: > Dear All, > > I am just working on Shape files I am unable to detect duplicate > centroids in a shape file > > .After buffering a polygon does centroids

[gdal-dev] Multiple extensions in GDAL_DMD_EXTENSION ?

2013-02-19 Thread Oyvind Idland
Is it possible to specify multiple file extensions in GDAL_DMD_EXTENSION ? I ask because I am working on a driver for a format that has several known file extensions. - Oyvind ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/ma