[gdal-dev] PostgreSQL

2011-09-22 Thread Andy Colson
Hi List, I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, if I use insert statements the null dates are not a problem, but if I set PG_USE_COPY=YES, then I get errors: ERROR 1: COPY statement failed. ERROR: date/time field value out of range: "/00/00" CONTEXT: COP

[gdal-dev] PostgreSQL drivers

2015-06-11 Thread Robert Inder
I have PostgreSQL 9.4 running on a 64-bit Centos 6.4 machine, I have then used "yum" to install gdal.x86_641.9.2-6.rhel6 gdal-devel.x86_64 1.9.2-6.rhel6 gdal-java.x86_64 1.9.2-6.rhel6 gdal-libs.x86_64 1.9.2-6.rhel6 all from the pgdg94 repository. And w

Re: [gdal-dev] PostgreSQL

2011-09-22 Thread Chaitanya kumar CH
Andy, Send me the problematic shapefiles and explain what conversions you are trying to perform. On Thu, Sep 22, 2011 at 9:18 PM, Andy Colson wrote: > Hi List, > > I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, if > I use insert statements the null dates are not a probl

Re: [gdal-dev] PostgreSQL

2011-09-26 Thread Andy Colson
On Thu, Sep 22, 2011 at 9:18 PM, Andy Colson mailto:a...@squeakycode.net>> wrote: Hi List, I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, if I use insert statements the null dates are not a problem, but if I set PG_USE_COPY=YES, then I get errors: ERROR 1:

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Andy Colson
Sorry to keep pestering. Is there a better place I should be seeking help? Would a $bounty$ help? -Andy On 9/22/2011 10:48 AM, Andy Colson wrote: Hi List, I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, if I use insert statements the null dates are not a problem, but

RE: [gdal-dev] PostgreSQL

2011-09-28 Thread Ivan Price
y Colson Envoyé : Wednesday, 28 September 2011 4:50 PM À : gdal-dev@lists.osgeo.org Objet : Re: [gdal-dev] PostgreSQL Sorry to keep pestering. Is there a better place I should be seeking help? Would a $bounty$ help? -Andy On 9/22/2011 10:48 AM, Andy Colson wrote: > Hi List, > > I&#x

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Andy Colson
g [mailto:gdal-dev-boun...@lists.osgeo.org] De la part de Andy Colson Envoyé : Wednesday, 28 September 2011 4:50 PM À : gdal-dev@lists.osgeo.org Objet : Re: [gdal-dev] PostgreSQL Sorry to keep pestering. Is there a better place I should be seeking help? Would a $bounty$ help? -Andy On 9/22/201

RE: [gdal-dev] PostgreSQL

2011-09-28 Thread Ivan Price
igine- De : Andy Colson [mailto:a...@squeakycode.net] Envoyé : Wednesday, 28 September 2011 5:09 PM À : Ivan Price Cc : gdal-dev@lists.osgeo.org Objet : Re: [gdal-dev] PostgreSQL They use a slightly older version of shapelib that doesnt quite work with null's. If I ogr2ogr shapefile -

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Andy Colson
de.net] Envoyé : Wednesday, 28 September 2011 5:09 PM À : Ivan Price Cc : gdal-dev@lists.osgeo.org Objet : Re: [gdal-dev] PostgreSQL They use a slightly older version of shapelib that doesnt quite work with null's. If I ogr2ogr shapefile -> shapefile (to get it in the projection I want), then

RE: [gdal-dev] PostgreSQL

2011-09-28 Thread Ivan Price
--- De : Andy Colson [mailto:a...@squeakycode.net] Envoyé : Wednesday, 28 September 2011 5:23 PM À : Ivan Price Cc : gdal-dev@lists.osgeo.org Objet : Re: [gdal-dev] PostgreSQL Not simply. I am receiving data from many different places, some places send nice clean data, other's, not so much (all

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Even Rouault
Le jeudi 22 septembre 2011 17:48:29, Andy Colson a écrit : > Hi List, > > I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, > if I use insert statements the null dates are not a problem, but if I > set PG_USE_COPY=YES, then I get errors: > > ERROR 1: COPY statement failed. >

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Andy Colson
Would a 16Meg .zip file, that extracts to 157Meg, be acceptable in Trac? I attempted to copy some records out, but it created the new shapefile with a type of ftString instead of ftDate. -Andy On 9/28/2011 2:28 PM, Even Rouault wrote: Le jeudi 22 septembre 2011 17:48:29, Andy Colson a écrit

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Even Rouault
Le mercredi 28 septembre 2011 23:09:01, Andy Colson a écrit : > Would a 16Meg .zip file, that extracts to 157Meg, be acceptable in Trac? > I attempted to copy some records out, but it created the new shapefile > with a type of ftString instead of ftDate. I'm afraid 16 MB will be too big. Perhaps

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Andy Colson
On 9/28/2011 2:28 PM, Even Rouault wrote: > > On another layer, regardless of insert/copy, I'm getting: > > ERROR: numeric field overflow > DETAIL: A field with precision 19, scale 11 must round to an absolute > value less than 10^8. > CONTEXT: COPY poltwppoly, line 1, column shape_area:

Re: [gdal-dev] PostgreSQL

2011-09-28 Thread Even Rouault
Le mercredi 28 septembre 2011 21:28:26, Even Rouault a écrit : > Le jeudi 22 septembre 2011 17:48:29, Andy Colson a écrit : > > Hi List, > > > > I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, > > if I use insert statements the null dates are not a problem, but if I > > set

Re: [gdal-dev] PostgreSQL

2011-09-29 Thread Andy Colson
On 9/29/2011 1:36 AM, Even Rouault wrote: Le mercredi 28 septembre 2011 21:28:26, Even Rouault a écrit : Le jeudi 22 septembre 2011 17:48:29, Andy Colson a écrit : Hi List, I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, if I use insert statements the null dates are not

Re: [gdal-dev] PostgreSQL

2011-09-29 Thread Even Rouault
Selon Andy Colson : > On 9/29/2011 1:36 AM, Even Rouault wrote: > > Le mercredi 28 septembre 2011 21:28:26, Even Rouault a écrit : > >> Le jeudi 22 septembre 2011 17:48:29, Andy Colson a écrit : > >>> Hi List, > >>> > >>> I'm using ogr2ogr to convert (and reproject) data from shapefile to PG, > >>

[gdal-dev] PostgreSQL problems

2011-10-13 Thread David J. Bakeman
I'm sure I've done something stupid but I've googled for hours and haven't been able to figure this out.  Any help is greatly appreciated! I'm on Fedora core 14 with gdal 1.7.3. I setup postgre and created a spatial enabled database with a table that includes geometry.  I can connect using ps

Re: [gdal-dev] PostgreSQL [RESOLVED]

2011-09-29 Thread Andy Colson
On 9/29/2011 11:28 AM, Even Rouault wrote: Selon Andy Colson: On 9/29/2011 1:36 AM, Even Rouault wrote: Le mercredi 28 septembre 2011 21:28:26, Even Rouault a écrit : Le jeudi 22 septembre 2011 17:48:29, Andy Colson a écrit : Hi List, I'm using ogr2ogr to convert (and reproject) data from s

Re: [gdal-dev] PostgreSQL [RESOLVED]

2011-09-29 Thread Even Rouault
> I can confirm this fixed my problem. I mentioned $bounty$ before, and I > meant it. $50 sound ok? Let me know (off list if you like) an address, > and I'll get you a check. (although its u.s. dollars, looks like you > are from France?) Got a wish list someplace? Thanks for the offer, but I

RE: [gdal-dev] PostgreSQL problems

2011-10-13 Thread Kyle Shannon
Can you show us the output of the command? And also ogrinfo --formats From: gdal-dev-boun...@lists.osgeo.org [mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of David J. Bakeman Sent: Thursday, October 13, 2011 4:47 PM To: gdal-dev@lists.osgeo.org Subject: [gdal-dev] PostgreSQL problems I&#

Re: [gdal-dev] PostgreSQL problems

2011-10-13 Thread Mateusz Łoskot
On 13 October 2011 23:47, David J. Bakeman wrote: > I'm on Fedora core 14 with gdal 1.7.3. > > I setup postgre and created a spatial enabled database with a table that > includes geometry.  I can connect using psql mydb.  However when I try > ogrinfo -ro PG:dbname=mydb it fails saying no driver fo

Re: [gdal-dev] PostgreSQL problems

2011-10-13 Thread David J. Bakeman
Mateusz Łoskot wrote: On 13 October 2011 23:47, David J. Bakeman wrote: I'm on Fedora core 14 with gdal 1.7.3. I setup postgre and created a spatial enabled database with a table that includes geometry. I can connect using psql mydb. However when I try ogrinfo -ro PG:dbname=mydb it fails

Re: [gdal-dev] PostgreSQL problems

2011-10-13 Thread Eli Adam
David, It probably is a configuration or simple error, however, you've not given much detail to let other people try to guess what it might be. Kyle asked for the output of your command. Also, the exact command (copied from terminal) may help too. I looked at the OGR PosrgreSQL/PostGIS for

Re: [gdal-dev] PostgreSQL problems

2011-10-14 Thread David J. Bakeman
Sorry I was trying to limit the bandwidth I used I figured it was probably something really stupid and someone would just say you forgot to XX :<; Anyway this is a test database so it really is named mydb and I copied the ogrinfo command from the PostgreSQL driver page for OGR. I checked bef

Re: [gdal-dev] PostgreSQL problems

2011-10-14 Thread Even Rouault
Le vendredi 14 octobre 2011 21:04:12, David J. Bakeman a écrit : Try ogrinfo --debug on -ro PG:'dbname=mydb' and see if something interesting shows up (and post the output to the list if you don't find the solution by yourself) It is really weird that it works with QGIS but not with OGR. Th

Re: [gdal-dev] PostgreSQL problems

2011-10-14 Thread David J. Bakeman
Even Rouault wrote: Le vendredi 14 octobre 2011 21:04:12, David J. Bakeman a écrit : Try ogrinfo --debug on -ro PG:'dbname=mydb' OK I am totally confused now here is the output: ogrinfo --debug -ro PG:'dbname=mydb' INFO: Open of `PG:dbname=mydb' using driver `PostgreSQL' successful.

Re: [gdal-dev] PostgreSQL problems

2011-10-14 Thread Even Rouault
Le vendredi 14 octobre 2011 22:57:32, David J. Bakeman a écrit : > Even Rouault wrote: > > Le vendredi 14 octobre 2011 21:04:12, David J. Bakeman a écrit : > > > > Try ogrinfo --debug on -ro PG:'dbname=mydb' > > OK I am totally confused now here is the output: > ogrinfo --debug -ro PG:'dbname=m

Re: [gdal-dev] PostgreSQL problems

2011-10-14 Thread David J. Bakeman
Even Rouault wrote: Le vendredi 14 octobre 2011 22:57:32, David J. Bakeman a écrit : Even Rouault wrote: Le vendredi 14 octobre 2011 21:04:12, David J. Bakeman a écrit : Try ogrinfo --debug on -ro PG:'dbname=mydb' OK I am totally confused now here is the output: ogrinfo --

Re: [gdal-dev] PostgreSQL problems

2011-10-14 Thread Even Rouault
> OK now we are getting somewhere! I did the following: > > env PG_LIST_ALL_TABLES=YES ogrinfo --debug on PG:'dbname=mydb' > PG: DBName="mydb" > PG: PostgreSQL version string : 'PostgreSQL 8.4.9 on > x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.5.1 20100924 (Red > Hat 4.5.1-4), 64-bit' >

Re: [gdal-dev] PostgreSQL problems

2011-10-14 Thread David J. Bakeman
Thanks Even and everyone else who responded! It was the fact that I had created the tables without registering the geometry column. I did that and now things appear good to go! That is ogrinfo is successful and lists the three tables with geometry. Perhaps the normal user of ogr is aware th

Re: [gdal-dev] PostgreSQL problems

2011-10-15 Thread Even Rouault
Le samedi 15 octobre 2011 00:51:01, David J. Bakeman a écrit : > Thanks Even and everyone else who responded! It was the fact that I had > created the tables without registering the geometry column. I did that > and now things appear good to go! That is ogrinfo is successful and > lists the thre

Re: [gdal-dev] PostgreSQL problems

2011-10-15 Thread David J. Bakeman
Sounds like 1.8 and my reading the docs more carefully :) would solve my problems. Thanks for the info Even I really appreciate it! Even Rouault wrote: Le samedi 15 octobre 2011 00:51:01, David J. Bakeman a écrit : > Thanks Even and everyone else who responded! It was the fact that

[gdal-dev] PostgreSQL driver for GDAL1.8.1

2012-05-12 Thread Siju Wu
Hi, I began using the GDAL for my master projet last month. Before I used OGR to read directly the maps of shapefile. But now I need to store the data first in the database of PostgreSQL and then make access to the database by using the driver of OGR. However I found that I can't connect the databa

[gdal-dev] PostgreSQL, PostGIS and ogr2ogr

2009-09-04 Thread Casper Børgesen
Hi folks! I hope you can help me. I have searched google for answers, but haven't found any. So I thought going closer to the 'source' might help me. In my organisation, we work with various GIS data in different file formats. I have a project, where I need to put all these data into a PostGIS

Re: [gdal-dev] PostgreSQL driver for GDAL1.8.1

2012-05-12 Thread Dmitry Baryshnikov
12.05.2012 12:00, Siju Wu ???: Hi, I began using the GDAL for my master projet last month. Before I used OGR to read directly the maps of shapefile. But now I need to store the data first in the database of PostgreSQL and then make access to the database by using the driver of OGR. However

Re: [gdal-dev] PostgreSQL driver for GDAL1.8.1

2012-05-12 Thread pcreso
2/12, Siju Wu wrote: From: Siju Wu Subject: [gdal-dev] PostgreSQL driver for GDAL1.8.1 To: gdal-dev@lists.osgeo.org Date: Saturday, May 12, 2012, 8:00 PM Hi,I began using the GDAL for my master projet last month. Before I used OGR to read directly the maps of shapefile. But now I need to store the

Re: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr

2009-09-04 Thread Even Rouault
Selon Casper Børgesen : I'm not sure about options='-c client_encoding=latin1', but setting PGCLIENTENCODING=LATIN1 instead as an environmnent variable/configuration option should definitely work (provided that the source shape is effectively LATIN1 encoded) ogr2ogr --config PGCLIENTENCODING LATI

SV: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr

2009-09-06 Thread Casper Børgesen
eo.org Emne: Re: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr Selon Casper Børgesen : I'm not sure about options='-c client_encoding=latin1', but setting PGCLIENTENCODING=LATIN1 instead as an environmnent variable/configuration option should definitely work (provided that the sourc

SV: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr

2009-09-08 Thread Casper Børgesen
how to get the '--config' method to work? Regards, Casper -Oprindelig meddelelse- Fra: gdal-dev-boun...@lists.osgeo.org [mailto:gdal-dev-boun...@lists.osgeo.org] På vegne af Casper Børgesen Sendt: 7. september 2009 08:57 Til: gdal-dev@lists.osgeo.org Emne: SV: [gdal-dev] Postgr

Re: SV: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr

2009-09-08 Thread Guillaume Sueur
s.osgeo.org > [mailto:gdal-dev-boun...@lists.osgeo.org] På vegne af Casper Børgesen > Sendt: 7. september 2009 08:57 > Til: gdal-dev@lists.osgeo.org > Emne: SV: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr > > Okay and thank you for your answers! > > Since using the '--confi

Re: SV: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr

2009-09-08 Thread Even Rouault
delig meddelelse- > Fra: gdal-dev-boun...@lists.osgeo.org > [mailto:gdal-dev-boun...@lists.osgeo.org] På vegne af Casper Børgesen > Sendt: 7. september 2009 08:57 > Til: gdal-dev@lists.osgeo.org > Emne: SV: [gdal-dev] PostgreSQL, PostGIS and ogr2ogr > > Okay and thank you

[gdal-dev] Postgresql driver ability to add constraints

2010-11-03 Thread Matthieu Rigal
Hi guys, I was checking and I did not found a proper way for now to add a unique or not null constraints to columns of a layer created/edited by OGR. If I am wrong, please correct me. Else, as I saw that a big refactoring of the PgSQL/PostGIS is planned/done for the 1.8 version, this may be add

Re: [gdal-dev] Postgresql driver ability to add constraints

2010-11-03 Thread Frank Warmerdam
On Wed, Nov 3, 2010 at 9:23 AM, Matthieu Rigal wrote: > Hi guys, > > I was checking and I did not found a proper way for now to add a unique or not > null constraints to columns of a layer created/edited by OGR. > > If I am wrong, please correct me. > Else, as I saw that a big refactoring of the P

Re: [gdal-dev] Postgresql driver ability to add constraints

2010-11-03 Thread Matthieu Rigal
Hi Frank, This is actually what I am doing, so no problems here ;-) It was rather a suggestion in case it was not discussed, because it may have been useful differently, but it is fine for me so. Best Regards, Matthieu On Wednesday 03 November 2010 14:30:07 Frank Warmerdam wrote: > On Wed, Nov