Re: [gdal-dev] Motion: adopt RFC 66: OGR random layer read/write capabilities

2016-10-05 Thread Daniel Morissette

+1

Daniel

On 2016-10-05 6:44 AM, Even Rouault wrote:

Hi,

I know that Howard has expressed some concerns regarding the potential
confusion that this could add, but I'm not sure what better alternatives there
would be to address the needs it tries to solve.

So I move to adopt RFC 66: OGR random layer read/write capabilities

https://trac.osgeo.org/gdal/wiki/rfc66_randomlayerreadwrite

---

Starting with my +1

Even




--
Daniel Morissette
http://www.mapgears.com/
T: +1 418-696-5056 #201

http://evouala.com/ - Location Intelligence Made Easy
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] GPKG: Drop table but how to drop the rest?

2016-10-05 Thread Even Rouault
Le jeudi 29 septembre 2016 13:13:17, Even Rouault a écrit :
> Hi Jukka,
> 
> > I wonder if it could be possible to do something like "DROP CASCADING" in
> > GeoPackage and delete the spatial index by the same.
> 
> I will work in a short term on this (as well as renaming columns)

Jukka, I wrote too fast and now realize that 
GDALGeoPackageDataset::DeleteLayer() is already implemented in fact (renaming 
is not) and available through the API. It is just that the DELLAYER: shortcut 
is not available.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Need suggestion on clipping vectors in batch

2016-10-05 Thread Even Rouault
Le mercredi 05 octobre 2016 11:29:43, Margherita Di Leo a écrit :
> Hi,
> 
> I need a suggestion on the use of ogr2ogr for clipping vector files
> (points) in batch. For all them I need to reduce the spatial extent of a
> certain quantity DX, DY, so it would be
> 
> ymax = ymax_current - DY
> ymin = ymin_current + DY
> xmax = xmax_current - DX
> xmin = xmin_current + DX
> 
> I could calculate ymax, ymin, xmax, xmin if I could read the current values
> in a FAST way. Or perhaps is there an option to put directly DX and DY in
> ogr2ogr which I didn't spot?

Tiny Python script with GDAL 2.1 :

from osgeo import gdal
src_ds = gdal.OpenEx('your.shp')
lyr = src_ds.GetLayer(0)
minx, maxx, miny, maxy = lyr.GetExtent()
# Note the different order of bounds between previous and next line
gdal.VectorTranslate("out.shp", src_ds, \
 spatFilter=(minx + DX,miny +DY,maxx-DX, maxy-DX))


> 
> Any hints appreciated
> Thanks

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Need suggestion on clipping vectors in batch

2016-10-05 Thread David J. Bakeman

  
  
On 10/05/2016 02:29 AM, Margherita Di
  Leo wrote:


  Hi,


I need a suggestion on the use of ogr2ogr for clipping
  vector files (points) in batch. For all them I need to reduce
  the spatial extent of a certain quantity DX, DY, so it would
  be


ymax = ymax_current - DY
ymin = ymin_current + DY
xmax = xmax_current - DX
xmin = xmin_current + DX


I could calculate ymax, ymin, xmax, xmin if I could read
  the current values in a FAST way. Or perhaps is there an
  option to put directly DX and DY in ogr2ogr which I didn't
  spot?
  

You could use ogrinfo to get the extents.

  


Any hints appreciated  
Thanks
  
  
  -- 
  

  

  

  

  Margherita Di Leo

  

  

  

  

  
  
  
  
  ___
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

Re: [gdal-dev] Motion: adopt RFC 66: OGR random layer read/write capabilities

2016-10-05 Thread jratike80
+1

-Jukka Rahkonen-


Even Rouault-2 wrote
> Hi,
> 
> I know that Howard has expressed some concerns regarding the potential 
> confusion that this could add, but I'm not sure what better alternatives
> there 
> would be to address the needs it tries to solve.
> 
> So I move to adopt RFC 66: OGR random layer read/write capabilities
> 
> https://trac.osgeo.org/gdal/wiki/rfc66_randomlayerreadwrite
> 
> ---
> 
> Starting with my +1
> 
> Even
> 
> -- 
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> ___
> gdal-dev mailing list

> gdal-dev@.osgeo

> http://lists.osgeo.org/mailman/listinfo/gdal-dev





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/gdal-dev-Motion-adopt-RFC-66-OGR-random-layer-read-write-capabilities-tp5289399p5289435.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Motion: adopt RFC 66: OGR random layer read/write capabilities

2016-10-05 Thread Howard Butler
+1

I couldn't come up with anything better, and I was mostly lamenting the need to 
add more to the API surface.

Howard

> On Oct 5, 2016, at 5:53 AM, Tamas Szekeres  wrote:
> 
> +1
> 
> Tamas
> 
> 
> 
> 2016-10-05 12:44 GMT+02:00 Even Rouault :
> Hi,
> 
> I know that Howard has expressed some concerns regarding the potential
> confusion that this could add, but I'm not sure what better alternatives there
> would be to address the needs it tries to solve.
> 
> So I move to adopt RFC 66: OGR random layer read/write capabilities
> 
> https://trac.osgeo.org/gdal/wiki/rfc66_randomlayerreadwrite
> 
> ---
> 
> Starting with my +1
> 
> Even
> 
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> ___
> 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

Re: [gdal-dev] Need suggestion on clipping vectors in batch

2016-10-05 Thread Antonio Falciano

Il 05/10/2016 11:29, Margherita Di Leo ha scritto:

Hi,

I need a suggestion on the use of ogr2ogr for clipping vector files
(points) in batch. For all them I need to reduce the spatial extent of a
certain quantity DX, DY, so it would be

ymax = ymax_current - DY
ymin = ymin_current + DY
xmax = xmax_current - DX
xmin = xmin_current + DX

I could calculate ymax, ymin, xmax, xmin if I could read the current
values in a FAST way. Or perhaps is there an option to put directly DX
and DY in ogr2ogr which I didn't spot?


Ciao Margherita,
the current values can be retrieved using ogrinfo. For instance, a quick
and dirty xmin_current value is:

ogrinfo points.shp -dialect SQLite -sql "SELECT
MbrMinX(ST_Union(geometry)) FROM points" | grep "=" | sed
's/MbrMinX(ST_Union(geometry)) (Real) =//g' | sed 's/^[ \t]*//;s/[ \t]*$//'

...and so on for the other ones. Then you can make the reduction and
finally rebuild the spatial query extents to pass to -spat option in 
ogr2ogr.


Antonio

--
Antonio Falciano
http://www.linkedin.com/in/antoniofalciano
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Motion: adopt RFC 66: OGR random layer read/write capabilities

2016-10-05 Thread Tamas Szekeres
+1

Tamas



2016-10-05 12:44 GMT+02:00 Even Rouault :

> Hi,
>
> I know that Howard has expressed some concerns regarding the potential
> confusion that this could add, but I'm not sure what better alternatives
> there
> would be to address the needs it tries to solve.
>
> So I move to adopt RFC 66: OGR random layer read/write capabilities
>
> https://trac.osgeo.org/gdal/wiki/rfc66_randomlayerreadwrite
>
> ---
>
> Starting with my +1
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> ___
> 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] Motion: adopt RFC 66: OGR random layer read/write capabilities

2016-10-05 Thread Even Rouault
Hi,

I know that Howard has expressed some concerns regarding the potential 
confusion that this could add, but I'm not sure what better alternatives there 
would be to address the needs it tries to solve.

So I move to adopt RFC 66: OGR random layer read/write capabilities

https://trac.osgeo.org/gdal/wiki/rfc66_randomlayerreadwrite

---

Starting with my +1

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Need suggestion on clipping vectors in batch

2016-10-05 Thread Margherita Di Leo
Hi,

I need a suggestion on the use of ogr2ogr for clipping vector files
(points) in batch. For all them I need to reduce the spatial extent of a
certain quantity DX, DY, so it would be

ymax = ymax_current - DY
ymin = ymin_current + DY
xmax = xmax_current - DX
xmin = xmin_current + DX

I could calculate ymax, ymin, xmax, xmin if I could read the current values
in a FAST way. Or perhaps is there an option to put directly DX and DY in
ogr2ogr which I didn't spot?

Any hints appreciated
Thanks

-- 
Margherita Di Leo
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev