[gdal-dev] ogr2ogr.py

2014-06-26 Thread Mike Saunt
Hi
​
I've updated ogr2ogr.py
 with
a really small change which is to accept the -dialect parameter that is now
available.  I'm wondering how / what the process is for submitting back.
​
​If someone could let me know or pointing me to the relevant web page with
details it would be much appreciated

Many thanks
Mike​

-- 
​​

--

*Mike Saunt*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 1372 744 009 m:+44 788  680
*
iShare - Data integration and publishing platform

 See the new Helpdesk and Customer portal

*

See our customer commendations and awards


 Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

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

Re: [gdal-dev] ogr2ogr.py

2014-06-26 Thread Chaitanya kumar CH
Mike,

Thanks for the update. But, I have to mention that the python scripts are
primarily to serve as examples.

You can submit a ticket (bug report) on gdal trac and attach a diff patch
along with the description.
http://trac.osgeo.org/gdal/#BugTracking

One of the committers should pick it up.



On Fri, Jun 27, 2014 at 11:39 AM, Mike Saunt 
wrote:

> Hi
> ​
> I've updated ogr2ogr.py
> 
> with a really small change which is to accept the -dialect parameter that
> is now available.  I'm wondering how / what the process is for submitting
> back.
> ​
> ​If someone could let me know or pointing me to the relevant web page with
> details it would be much appreciated
>
> Many thanks
> Mike​
>
> --
> ​​
>
> --
>
> *Mike Saunt*
> Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
> 7RL, UK
> t:+44 1372 744 009 m:+44 788  680
> *
> iShare - Data integration and publishing platform
> 
>  See the new Helpdesk and Customer portal
> 
> *
>
> See our customer commendations and awards
> 
>
>  Company registration no. 5410695. Registered in England and Wales.
> Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
> 864201149.
>
>  
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr2ogr.py

2014-06-27 Thread Mike Saunt
Cool, and understood. It caught me out, that is all and I'd like to make
sure it doesn't for others...

Sent from my phone which isn't an iPhone
On 27 Jun 2014 07:40, "Chaitanya kumar CH"  wrote:

> Mike,
>
> Thanks for the update. But, I have to mention that the python scripts are
> primarily to serve as examples.
>
> You can submit a ticket (bug report) on gdal trac and attach a diff patch
> along with the description.
> http://trac.osgeo.org/gdal/#BugTracking
>
> One of the committers should pick it up.
>
>
>
> On Fri, Jun 27, 2014 at 11:39 AM, Mike Saunt <
> mikesa...@astuntechnology.com> wrote:
>
>> Hi
>> ​
>> I've updated ogr2ogr.py
>> 
>> with a really small change which is to accept the -dialect parameter that
>> is now available.  I'm wondering how / what the process is for submitting
>> back.
>> ​
>> ​If someone could let me know or pointing me to the relevant web page
>> with details it would be much appreciated
>>
>> Many thanks
>> Mike​
>>
>> --
>> ​​
>>
>> --
>>
>> *Mike Saunt*
>> Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
>> KT18 7RL, UK
>> t:+44 1372 744 009 m:+44 788  680
>> *
>> iShare - Data integration and publishing platform
>> 
>>  See the new Helpdesk and Customer portal
>> 
>> *
>>
>> See our customer commendations and awards
>> 
>>
>>  Company registration no. 5410695. Registered in England and Wales.
>> Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
>> 864201149.
>>
>>  
>> ___
>> gdal-dev mailing list
>> gdal-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>

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

[gdal-dev] ogr2ogr.py sqlite dialect unsupported?

2019-09-02 Thread Martin Lacayo
Hello,

I complied GDAL 3.0.1 from source with Python, SQLite, and SpatiLite
enabled. I am trying to dissolve polygons in a Shapefile with the
following command:

ogr2ogr output.shp input.shp -dialect sqlite -sql "SELECT
ST_Union(geometry) FROM input"

This works from the command line, but not as I would like from a
Python call to ogr2ogr.main, although other calls do work. I see from
the code that ogr2ogr.py does not support the dialect parameter, but
ogrinfo.py does.

Is there a way for me to do this from Python without a system call?

Should I report this a bug/feature request to the GitHub repository?

For my own enlightenment, does anyone understand why this command
works from the command line?

The full 32 line script I am working on is here:

https://github.com/mlacayoemery/esws/blob/master/tools/wy_preprocess.py

Thank you,
Martin
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr2ogr.py sqlite dialect unsupported?

2019-09-02 Thread Even Rouault
ogr2ogr.py is a toy / sample file which receives little maintainance, and was 
mostly a one-time port of the ogr2ogr.cpp source, which is the on used by the 
command line utility.

You may use the 'librarified' ogr2ogr with the gdal.VectorTranslate() Python 
function. Examples at 
https://github.com/OSGeo/gdal/blob/master/autotest/utilities/
test_ogr2ogr_lib.py#L63

Even

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

Re: [gdal-dev] ogr2ogr.py sqlite dialect unsupported?

2019-09-03 Thread Martin Lacayo
Thank you, the following code worked perfectly:

import os
import osgeo.gdal

name, ext = os.path.splitext(os.path.basename(in_path))
srcDS = osgeo.gdal.OpenEx(in_path)
ds = osgeo.gdal.VectorTranslate(out_path, srcDS, SQLStatement="SELECT
ST_Union(geometry) FROM " + name , SQLDialect='sqlite')

Cheers,
Martin

On Mon, Sep 2, 2019 at 6:19 PM Even Rouault  wrote:
>
> ogr2ogr.py is a toy / sample file which receives little maintainance, and was
> mostly a one-time port of the ogr2ogr.cpp source, which is the on used by the
> command line utility.
>
> You may use the 'librarified' ogr2ogr with the gdal.VectorTranslate() Python
> function. Examples at
> https://github.com/OSGeo/gdal/blob/master/autotest/utilities/
> test_ogr2ogr_lib.py#L63
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev