Re: [gdal-dev] Stuck with python gdal.Grid throwing an error

2019-06-15 Thread Even Rouault
> err = gdal.Grid(dataset, ds, options=opts) > if err != 0: > print 'gdalGrid error: ', err > return > > The above code is basically the same as what I use for > gdal.RasterizeLayer() and that worked fine. gdal.Grid() prototype is def Grid(destName, sr

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-15 Thread Andrew Bell
How is the line defined? If you have a function, there's calculus. On Sat, Jun 15, 2019, 12:43 AM Nicolas Cadieux wrote: > Thanks, > Could work but I think this will be too slow. I wonder how QGIS does it? I > guess they use code from Proj.4. If anyone has an other idea, shoot! > Cheers > Nicol

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-15 Thread Thomas Knudsen
In the PROJ package, the geod utility is included - you could do echo lat0 lon0 lat1 lon1 | geod -I +ellps=GRS80 Where the "-I" indicates that you want to calculate the "inverse geodetic problem", i.e. you know where you are, and where you want to go, but you need to know how far to go and in wh

Re: [gdal-dev] Using pseudo-field FID as ID_FIELD for GeoJSON

2019-06-15 Thread Denis Rykov
Thanks, that did the trick! On Thu, Jun 13, 2019 at 9:31 AM jratike80 < jukka.rahko...@maanmittauslaitos.fi> wrote: > Hi, > > Have you tried "-preserve_fid" > https://gdal.org/programs/ogr2ogr.html#ogr2ogr ? > > -Jukka Rahkonen- > > > dr wrote > > Is it possible to reflect fids values of features

Re: [gdal-dev] [SeasonOfDocs] Offers for GDAL documenting

2019-06-15 Thread Cameron Shorter
Hi GDAL folks, I'd like to introduce you to Lynden who has dropped by our OSGeo Season of Docs community. He is a developer, has used ogr2ogr, is an "expert gdal newbie", and is keen to give back to GDAL through documentation. Do you have thoughts on where there are documentation needs, and w

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-15 Thread Nicolas Cadieux
Thanks every one for your help, I found good packages out there. I will probably go with Proj. I’am just surprised it’s not part standard libraries like Shapely or OGR since both can calculate line length. Most packages look like they are made to calculate only two point at a time and not, fo

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-15 Thread Even Rouault
$ cat test.csv id,WKT 1,"LINESTRING(2 49,3 50,4 49)" $ ogr2ogr test.db test.csv -f sqlite -dsco spatialite=yes -a_srs EPSG:4326 $ ogrinfo test.db -sql "select st_length(geometry, 1) from test" -al -q Layer name: SELECT OGRFeature(SELECT):0 st_length(geometry, 1) (Real) = 265450.955822012 Cf

Re: [gdal-dev] Ellipsoidal length of a line

2019-06-15 Thread Thomas Knudsen
Awesome! Den lør. 15. jun. 2019 kl. 23.04 skrev Even Rouault < even.roua...@spatialys.com>: > $ cat test.csv > id,WKT > 1,"LINESTRING(2 49,3 50,4 49)" > > $ ogr2ogr test.db test.csv -f sqlite -dsco spatialite=yes -a_srs EPSG:4326 > > $ ogrinfo test.db -sql "select st_length(geometry, 1) from test

Re: [gdal-dev] [SeasonOfDocs] Offers for GDAL documenting

2019-06-15 Thread Lynden Noye
Hi there! While Cameron is not wrong about me being a dev, that's been a more recent thing for me professionally, I'm a much more experienced UX & UI designer ;) Cameron, I've subscribed to this list too, I look forward to hearing back on where I might be able to help out! On Sat, Jun 15, 2019 a