Re: [gdal-dev] Tests if the geometry is within the other geometry

2018-06-22 Thread Ian
inlay.SetSpatialFilter(refpoy) did not meet my requirement of "if geomi.Within(refpoly)". if I use both inlay.SetSpatialFilter(refpoy) and geomi.Within(refpoly), speed is same as before. .SetSpatialFilter tested intersect of the envelopes, which i do not need. any idea is appreciated On Sat, J

Re: [gdal-dev] ogr2ogr adding metadata

2018-06-22 Thread Even Rouault
On vendredi 22 juin 2018 09:41:02 CEST Lars wrote: > Hello folks, > > Using ogr2ogr (version 2.2.3) to import s57 into PostgreSQL which works > great. > > What is the recommended approach for adding metadata to all inserted data? > > Say I wanted to add current date to all inserted data. Does og

Re: [gdal-dev] Esri JSON Curves

2018-06-22 Thread Even Rouault
On vendredi 22 juin 2018 14:38:15 CEST James Klassen wrote: > I finally got around to doing a rough implementation of parsing ESRIJSON > with curved geometries. The code is very rough yet, but works enough to > import a polygon layer from an ESRI FeatureService into PostGIS with the > curves intac

Re: [gdal-dev] Tests if the geometry is within the other geometry

2018-06-22 Thread mikeucfl
Use a spatial filter using your refpoly before iterating the features: http://gdal.org/python/osgeo.ogr.Layer-class.html#SetSpatialFilter -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html ___ gdal-dev mailing list gdal-dev@lists.

Re: [gdal-dev] Esri JSON Curves

2018-06-22 Thread James Klassen
I finally got around to doing a rough implementation of parsing ESRIJSON with curved geometries. The code is very rough yet, but works enough to import a polygon layer from an ESRI FeatureService into PostGIS with the curves intact. Code is available at [1]. Main issues: I don't know how to det

[gdal-dev] Tests if the geometry is within the other geometry

2018-06-22 Thread Ian
I have a shape file consisting of thousands of features/polygons. I have to extract only those polygons which are within the reference polygon. I tried as follows: refpoly = feat.GetGeometryRef() fi = 'data.shp' ids = ogr.Open(fi,0) inlay = ids.GetLayer(0) for feat in inlay: ctype = feat.Ge

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-22 Thread Alex HighViz
From: Alex Highviz Sent: 22 June 2018 18:27:14 To: even.roua...@spatialys.com Subject: Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark On 14/06/2018 21:22, Even Rouault wrote: > > [ ] > - 1000x1000 is somewhat small. Perhaps benchm

[gdal-dev] ogr2ogr adding metadata

2018-06-22 Thread Lars
Hello folks, Using ogr2ogr (version 2.2.3) to import s57 into PostgreSQL which works great. What is the recommended approach for adding metadata to all inserted data? Say I wanted to add current date to all inserted data. Does ogr2ogr support such operation? Tried using the "-mo" argument but i

[gdal-dev] GDAL 2.3.1 rc1 available

2018-06-22 Thread Even Rouault
Hi, I've issued a release candidate for GDAL 2.3.1. This adds 75 bug fixes on top of 2.3.0. The C and C++ API and ABI are unchanged. The source is available at: http://download.osgeo.org/gdal/2.3.1/gdal-2.3.1rc1.tar.xz http://download.osgeo.org/gdal/2.3.1/gdal-2.3.1rc1.tar.gz http:/

Re: [gdal-dev] spatial_ref and GeoTransform attributes for HDF5 datasets

2018-06-22 Thread Even Rouault
On mercredi 20 juin 2018 04:05:18 CEST Agram, Piyush S (334D) wrote: > Hi, > I’m looking for a simple convention to represent SRS and Geotransform > information for HDF5 arrays. A fairly thorough reading of available HDF5 > geospatial data representation specs hasn’t resulted in a satisfactory