[gdal-dev] to make black areas transparent
I want to make black areas transparent, and used: gdalwarp -overwrite -dstnodata 0 -dstalpha geobk_jeo.tif geobk_jeo2.png it didn't make them transparent. regards -- Ahmet Temiz Jeoloji Müh. Planlama ve Zarar Azaltma Dairesi Başkanlığı Bilgi ve CBS grubu Eskişehir Yolu 10. km. Lodumlu / Ankara Tel : 0 312 2872680 / 1535 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] copy features to empty shp file: extent problem
Hello, all! I need to copy features to the empty shp file. The code is really simple: const char *pszDriverName = ESRI Shapefile; OGRSFDriver *poDriver; OGRRegisterAll(); poDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName( pszDriverName ); if( poDriver == NULL ) { printf( %s driver not available.\n, pszDriverName ); exit( 1 ); } OGRDataSource *poDS; poDS = OGRSFDriverRegistrar::Open( C:\\ArcProjects\\Untamo\\Test\\test.shp, TRUE ); if( poDS == NULL ) { printf( Open failed.\n ); exit( 1 ); } OGRLayer *poLayer; poLayer = poDS-GetLayerByName( test ); OGRDataSource *poDS1; poDS1 = OGRSFDriverRegistrar::Open( C:\\ArcProjects\\Untamo\\Test\\arbukle0ot.shp, FALSE ); if( poDS1 == NULL ) { printf( Open failed.\n ); exit( 1 ); } OGRLayer *featuresLayer; featuresLayer = poDS1-GetLayerByName( arbukle0ot ); OGRFeature *poFeature; featuresLayer-ResetReading(); while( (poFeature = featuresLayer-GetNextFeature()) != NULL ) { OGRFeature *newFeature; newFeature = OGRFeature::CreateFeature( poLayer-GetLayerDefn() ); newFeature-SetField( ID, 1); newFeature-SetGeometry(poFeature-GetGeometryRef()); if( poLayer-CreateFeature(newFeature ) != OGRERR_NONE ) { printf( Failed to create feature in shapefile.\n ); exit( 1 ); } OGRFeature::DestroyFeature( newFeature ); OGRFeature::DestroyFeature( poFeature ); } OGRDataSource::DestroyDataSource( poDS ); OGRDataSource::DestroyDataSource( poDS1 ); } arbukle0ot.shp contains features, test is empty shp file, that is created with ArcCatalog. Now if you run this code, features will be copied, however the extent of the shp file will be strange, as the MinX and MinY will be 0 and 0. (however it should not be, the extent of each feature differs from zero) The most interesting thing, that if you will take this test.shp, draw some features in ArcMap, check extent (it will be the right one), than delete this features to make shp file again empty, and run the code, the extent of the output file be the correct! I wonder, what is a problem? emmiolla ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] copy features to empty shp file: extent problem
Emmiolla, the problem is that OGR does not rewrite the extents when updating a dataset; it only calculates and writes the extents when creating a new dataset. This is documented behaviour. You are creating the dataset in ArcCatalog and then updating it with OGR, hence your problem. Is there any reason why you cannot create the dataset from OGR? I do this regularly and have never had problems with ArcGIS reading this output. It would require a few extra lines of code to define the attribute data, but these are very straightforward. Best wishes, Peter Emmiolla Emmiolla wrote: Hello, all! I need to copy features to the empty shp file. The code is really simple: const char *pszDriverName = ESRI Shapefile; OGRSFDriver *poDriver; OGRRegisterAll(); poDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName( pszDriverName ); if( poDriver == NULL ) { printf( %s driver not available.\n, pszDriverName ); exit( 1 ); } OGRDataSource *poDS; poDS = OGRSFDriverRegistrar::Open( C:\\ArcProjects\\Untamo\\Test\\test.shp, TRUE ); if( poDS == NULL ) { printf( Open failed.\n ); exit( 1 ); } OGRLayer *poLayer; poLayer = poDS-GetLayerByName( test ); OGRDataSource *poDS1; poDS1 = OGRSFDriverRegistrar::Open( C:\\ArcProjects\\Untamo\\Test\\arbukle0ot.shp, FALSE ); if( poDS1 == NULL ) { printf( Open failed.\n ); exit( 1 ); } OGRLayer *featuresLayer; featuresLayer = poDS1-GetLayerByName( arbukle0ot ); OGRFeature *poFeature; featuresLayer-ResetReading(); while( (poFeature = featuresLayer-GetNextFeature()) != NULL ) { OGRFeature *newFeature; newFeature = OGRFeature::CreateFeature( poLayer-GetLayerDefn() ); newFeature-SetField( ID, 1); newFeature-SetGeometry(poFeature-GetGeometryRef()); if( poLayer-CreateFeature(newFeature ) != OGRERR_NONE ) { printf( Failed to create feature in shapefile.\n ); exit( 1 ); } OGRFeature::DestroyFeature( newFeature ); OGRFeature::DestroyFeature( poFeature ); } OGRDataSource::DestroyDataSource( poDS ); OGRDataSource::DestroyDataSource( poDS1 ); } arbukle0ot.shp contains features, test is empty shp file, that is created with ArcCatalog. Now if you run this code, features will be copied, however the extent of the shp file will be strange, as the MinX and MinY will be 0 and 0. (however it should not be, the extent of each feature differs from zero) The most interesting thing, that if you will take this test.shp, draw some features in ArcMap, check extent (it will be the right one), than delete this features to make shp file again empty, and run the code, the extent of the output file be the correct! I wonder, what is a problem? emmiolla ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Peter J Halls, GIS Advisor Acting Team Leader Applications Support Group, Information Directorate, University of York Telephone: 01904 323806 Fax: 01904 323740 Snail mail: C/O IT Services, University of York, Heslington, York YO10 5DD This message has the status of a private and personal communication ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] copy features to empty shp file: extent problem
Hey, Peter! Thank you for the hint. Actually no much reason, i can remake my code to create a new shp file in ogr. Thank you! emmiolla. On Thu, Jan 27, 2011 at 11:16 AM, Peter J Halls p.ha...@york.ac.uk wrote: Emmiolla, the problem is that OGR does not rewrite the extents when updating a dataset; it only calculates and writes the extents when creating a new dataset. This is documented behaviour. You are creating the dataset in ArcCatalog and then updating it with OGR, hence your problem. Is there any reason why you cannot create the dataset from OGR? I do this regularly and have never had problems with ArcGIS reading this output. It would require a few extra lines of code to define the attribute data, but these are very straightforward. Best wishes, Peter Emmiolla Emmiolla wrote: Hello, all! I need to copy features to the empty shp file. The code is really simple: const char *pszDriverName = ESRI Shapefile; OGRSFDriver *poDriver; OGRRegisterAll(); poDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName( pszDriverName ); if( poDriver == NULL ) { printf( %s driver not available.\n, pszDriverName ); exit( 1 ); } OGRDataSource *poDS; poDS = OGRSFDriverRegistrar::Open( C:\\ArcProjects\\Untamo\\Test\\test.shp, TRUE ); if( poDS == NULL ) { printf( Open failed.\n ); exit( 1 ); } OGRLayer *poLayer; poLayer = poDS-GetLayerByName( test ); OGRDataSource *poDS1; poDS1 = OGRSFDriverRegistrar::Open( C:\\ArcProjects\\Untamo\\Test\\arbukle0ot.shp, FALSE ); if( poDS1 == NULL ) { printf( Open failed.\n ); exit( 1 ); } OGRLayer *featuresLayer; featuresLayer = poDS1-GetLayerByName( arbukle0ot ); OGRFeature *poFeature; featuresLayer-ResetReading(); while( (poFeature = featuresLayer-GetNextFeature()) != NULL ) { OGRFeature *newFeature; newFeature = OGRFeature::CreateFeature( poLayer-GetLayerDefn() ); newFeature-SetField( ID, 1); newFeature-SetGeometry(poFeature-GetGeometryRef()); if( poLayer-CreateFeature(newFeature ) != OGRERR_NONE ) { printf( Failed to create feature in shapefile.\n ); exit( 1 ); } OGRFeature::DestroyFeature( newFeature ); OGRFeature::DestroyFeature( poFeature ); } OGRDataSource::DestroyDataSource( poDS ); OGRDataSource::DestroyDataSource( poDS1 ); } arbukle0ot.shp contains features, test is empty shp file, that is created with ArcCatalog. Now if you run this code, features will be copied, however the extent of the shp file will be strange, as the MinX and MinY will be 0 and 0. (however it should not be, the extent of each feature differs from zero) The most interesting thing, that if you will take this test.shp, draw some features in ArcMap, check extent (it will be the right one), than delete this features to make shp file again empty, and run the code, the extent of the output file be the correct! I wonder, what is a problem? emmiolla ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Peter J Halls, GIS Advisor Acting Team Leader Applications Support Group, Information Directorate, University of York Telephone: 01904 323806 Fax: 01904 323740 Snail mail: C/O IT Services, University of York, Heslington, York YO10 5DD This message has the status of a private and personal communication ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: General geotiff question
On 1/27/2011 2:12 AM, Fernando Cacciola wrote: Hi, I have a general question (and I don't know where else to ask, sorry if this is off-topic) Can I assume that in practice the transformations from PCS to raster space are lineal? Never mind me... while this is true for, say, a normal mercator projection, it is not for a, say, transverse mercator projection, so in practice that's just wrong. I'll just sample the unit square at a fixed high-enough resolution. Best -- --- Fernando Cacciola SciSoft Consulting, Founder http://www.scisoft-consulting.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Fwd: [gdal-dev] Create a shape file with polygons
Hello, I've tried to develope the program that create a shape file with polygons. But the GIS open the shp but there is nothing inside only the attributes, not the polygons. I have the code from Python but I do not know the problem. Here I paste the code: int write_shapefilePolygon() { const char *pszDriverName = ESRI Shapefile; OGRSFDriver *poDriver; OGRRegisterAll(); poDriver = OGRSFDriverRegistrar::GetRegistrar()-GetDriverByName(pszDriverName); if( poDriver == NULL ) { printf( %s driver not available.\n, pszDriverName ); exit( 1 ); } OGRDataSource *poDS; poDS = poDriver-CreateDataSource( Polygon.shp, NULL ); if( poDS == NULL ) { printf( Creation of output file failed.\n ); exit( 1 ); } OGRLayer *poLayer; poLayer = poDS-CreateLayer( countries, NULL, wkbPolygon, NULL ); if( poLayer == NULL ) { printf( Layer creation failed.\n ); exit( 1 ); } OGRFieldDefn oField( Name, OFTString ); oField.SetWidth(32); if( poLayer-CreateField( oField ) != OGRERR_NONE ) { printf( Creating Name field failed.\n ); exit( 1 ); } double x, y; string szName; char Line[4000]; char *tmp; ifstream infile (/home/jjmf/Desktop/Shape files/polygon/ospy_data2/ut_counties.txt, ifstream::in); while(infile.getline(Line,4000)) { OGRPolygon myPoligon; tmp = strtok (Line, :); szName = string (tmp); while (tmp != NULL) { OGRLinearRing MyRing;// = (OGRLinearRing*) OGRGeometryFactory::createGeometry(wkbLinearRing); tmp = strtok (NULL, ,); if(tmp) { string Coords = string(tmp); size_t pos = Coords.find( ); string CoordX = Coords.substr(0,pos); string CoordY = Coords.substr(pos); x = atof(CoordX.c_str()); y = atof(CoordY.c_str()); MyRing.addPoint(x,y); } myPoligon.addRing(MyRing); } OGRFeature *poFeature; poFeature = OGRFeature::CreateFeature( poLayer-GetLayerDefn() ); poFeature-SetField( Name, szName.c_str() ); poFeature-SetGeometry(myPoligon); if( poLayer-CreateFeature( poFeature ) != OGRERR_NONE ) { printf( Failed to create feature in shapefile.\n ); exit( 1 ); } OGRFeature::DestroyFeature( poFeature ); } OGRDataSource::DestroyDataSource( poDS ); infile.close(); exit( 0 ); } Thanks, Jorge 2011/1/17 Jorge jorma...@gmail.com Hi, Thank you very much in advance. I am developing with C++, but I will try to understand the code. I think it will easy. Thank you. Jorge El 17/01/2011, a las 18:18, Paolo Corti pco...@gmail.com escribió: I`m new developing software with GDAL and OGR libraries. I has used the code from the OGR web that read and write a shapefile (points). What I really want is to read and write shapefiles with polygons. Hi Jorge if you are using Python this [0] is the best resource out there. Look at the sample in week 2 of the tutorial for effectively writing (and reading) a Polygon shapefile. If you are not using Python you should not have too much problems for converting the Python code to the language you are using. Another very good resource is to look at the source code: again, supposing that you are using Python, this sample [1] should work for you ciao P [0] http://www.gis.usu.edu/~chrisg/python/2009/ [1] http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/python/samples/assemblepoly.py -- Paolo Corti GIS specialist and web developer web: http://www.paolocorti.net twitter: @paolo_corti ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] to make black areas transparent
On 11-01-27 04:06 AM, ahmet temiz wrote: I want to make black areas transparent, and used: gdalwarp -overwrite -dstnodata 0 -dstalpha geobk_jeo.tif geobk_jeo2.png it didn't make them transparent. Ahmet, Try -srcnodata 0 instead of -dstnodata 0. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] gdal_grid - cannot get interpolation to work
I'm trying to use gdal_grid to generate a .tiff file from a .csv file. The problem I am encountering is that output file always contains 'no-data' values. The command I am using is: gdal_grid -txe -51.428009 -43.153992 -tye 46.112598 51.347198 -outsize 1024 796 \ -a nearest:radius1=10.0:radius2=10.0:angle=0.0:nodata=0.0 \ -l rs2_file_1 -l rs2_file_2 -l rs2_file_3 \ -of GTiff -ot Byte rs2_file.vrt test.tiff I have also tried the following interpolation parameters: # Results in all black # -a nearest:radius1=1.0:radius2=1.0:angle=0.0:nodata=0.0 \ # -a average:radius1=1.0:radius2=1.0:angle=0.0:min_points=1:nodata=0.0 \ # -a invdist:radius1=1.0:radius2=1.0:angle=0.0:max_points=1:min_points=1:nodata=0.0 \ # Results in all one shade of grey (average of entire image) # -a invdist:radius1=0.0:radius2=0.0:angle=0.0:max_points=10:min_points=1:nodata=0.0 \ The .vrt and csv file used are shown below. rs2_file.vrt :: OGRVRTDataSource OGRVRTLayer name=rs2_file_1 SrcDataSourcers2_file_1.csv/SrcDataSource GeometryTypewkbPoint25D/GeometryType GeometryField encoding=PointFromColumns x=lon y=lat z=red/ /OGRVRTLayer OGRVRTLayer name=rs2_file_2 SrcDataSourcers2_file_2.csv/SrcDataSource GeometryTypewkbPoint25D/GeometryType GeometryField encoding=PointFromColumns x=lon y=lat z=green/ /OGRVRTLayer OGRVRTLayer name=rs2_file_3 SrcDataSourcers2_file_3.csv/SrcDataSource GeometryTypewkbPoint25D/GeometryType GeometryField encoding=PointFromColumns x=lon y=lat z=blue/ /OGRVRTLayer /OGRVRTDataSource rs2_file.vrt (partial) :: lat,lon,red,green,blue -51.428009,50.522499,0,0,143 -50.049011,50.720699,0,0,143 -48.660004,50.902401,0,159,255 -47.260010,51.067501,0,239,255 -45.851013,51.215900,255,255,15 -44.433014,51.347198,255,191,0 -50.433014,50.657600,255,255,0 -49.046997,50.844200,255,223,0 -47.649994,51.014301,255,159,0 -46.243988,51.167599,255,191,0 -44.829010,51.303799,255,255,15 -50.816010,50.593800,255,255,0 -49.433014,50.784698,255,175,0 -48.040009,50.959202,255,239,0 -46.635986,51.117100,255,191,0 -45.222992,51.257999,255,223,0 -51.197998,50.528301,255,175,0 -49.819000,50.724098,255,191,0 -48.428009,50.903500,255,223,0 -47.028015,51.066299,255,207,0 -45.618011,51.211800,255,255,0 -44.199005,51.340199,255,255,0 -50.203003,50.661999,223,255,47 -48.816010,50.845798,255,223,0 -47.417999,51.013000,255,191,0 -46.010986,51.163502,255,207,0 -44.595001,51.297001,255,255,15 -50.585999,50.598900,255,191,0 -49.201996,50.787601,255,255,0 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Can I use ogr2ogr to postgresql with security?
Does ogr2ogr (and ogrinfo) natively support secure connections to postgresql? I need to run ogrinfo and ogr2ogr where the target is a postgresql server elsewhere on the network (in a different domain) and secure the communication. Mike Mike Axelrod, Software Engineer Pictometry International Corp. Suite A, 100 Town Centre Drive, Rochester, NY 14623 Phone: 585-775-7711 E-mail: mike.axel...@pictometry.com Web: http://www.Pictometry.com/http://www.pictometry.com/ NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Can I use ogr2ogr to postgresql with security?
Mike, OGR's postgresql/postgis driver makes the connection using PQconnectdb() method from the libpq library. You can set the option 'sslmode' to 'require', 'verify-ca' or 'verify-full' for a secure connection. Look for the documentation of PQconnectdb() for further details. On Fri, Jan 28, 2011 at 12:13 AM, Mike Axelrod mike.axel...@pictometry.comwrote: Does ogr2ogr (and ogrinfo) natively support secure connections to postgresql? I need to run ogrinfo and ogr2ogr where the target is a postgresql server elsewhere on the network (in a different domain) and secure the communication. Mike Mike Axelrod, Software Engineer Pictometry International Corp. Suite A, 100 Town Centre Drive, Rochester, NY 14623 Phone: 585-775-7711 E-mail: mike.axel...@pictometry.com Web: http://www.Pictometry.com/http://www.pictometry.com/ NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +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] Can I use ogr2ogr to postgresql with security?
Thank you, I’ll be trying that out as soon as I get our postgresql server configured with ssl. Do you know if the postgresql public key is required on the client side? I see references to a ~/.postgresql/postgresql.key being available to the client. But I’m not clear if this is required or an option. BTW I’m currently using the win32 SDK version of ogr2ogr that is distributed here = http://vbkto.dyndns.org/sdk/, I’m hoping these builds support SSL. Can anybody confirm? Mike From: Chaitanya kumar CH [mailto:chaitanya...@gmail.com] Sent: Thursday, January 27, 2011 2:56 PM To: Mike Axelrod Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Can I use ogr2ogr to postgresql with security? Mike, OGR's postgresql/postgis driver makes the connection using PQconnectdb() method from the libpq library. You can set the option 'sslmode' to 'require', 'verify-ca' or 'verify-full' for a secure connection. Look for the documentation of PQconnectdb() for further details. On Fri, Jan 28, 2011 at 12:13 AM, Mike Axelrod mike.axel...@pictometry.commailto:mike.axel...@pictometry.com wrote: Does ogr2ogr (and ogrinfo) natively support secure connections to postgresql? I need to run ogrinfo and ogr2ogr where the target is a postgresql server elsewhere on the network (in a different domain) and secure the communication. Mike Mike Axelrod, Software Engineer Pictometry International Corp. Suite A, 100 Town Centre Drive, Rochester, NY 14623 Phone: 585-775-7711 E-mail: mike.axel...@pictometry.commailto:mike.axel...@pictometry.com Web: http://www.Pictometry.com/http://www.pictometry.com/ NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful. ___ gdal-dev mailing list gdal-dev@lists.osgeo.orgmailto:gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Can I use ogr2ogr to postgresql with security?
Mike, To use SSL mode with OGR, your pqlib should be built with SSL support. On Fri, Jan 28, 2011 at 2:09 AM, Mike Axelrod mike.axel...@pictometry.comwrote: So it seems the build I’m using may not support ssl, I run ogrinfo with sslmode=prefer I connect ok, but when I set sslmode=require I get this error: --- Details... --- call to ogrinfo failed: ERROR 1: PQconnectdb failed. sslmode value require invalid when SSL support is not compiled in -- *From:* gdal-dev-boun...@lists.osgeo.org [mailto: gdal-dev-boun...@lists.osgeo.org] *On Behalf Of *Mike Axelrod *Sent:* Thursday, January 27, 2011 3:21 PM *To:* Chaitanya kumar CH *Cc:* gdal-dev@lists.osgeo.org *Subject:* RE: [gdal-dev] Can I use ogr2ogr to postgresql with security? Thank you, I’ll be trying that out as soon as I get our postgresql server configured with ssl. Do you know if the postgresql public key is required on the client side? I see references to a ~/.postgresql/postgresql.keybeing available to the client. But I’m not clear if this is required or an option. BTW I’m currently using the win32 SDK version of ogr2ogr that is distributed here = http://vbkto.dyndns.org/sdk/, I’m hoping these builds support SSL. Can anybody confirm? Mike -- *From:* Chaitanya kumar CH [mailto:chaitanya...@gmail.com] *Sent:* Thursday, January 27, 2011 2:56 PM *To:* Mike Axelrod *Cc:* gdal-dev@lists.osgeo.org *Subject:* Re: [gdal-dev] Can I use ogr2ogr to postgresql with security? Mike, OGR's postgresql/postgis driver makes the connection using PQconnectdb() method from the libpq library. You can set the option 'sslmode' to 'require', 'verify-ca' or 'verify-full' for a secure connection. Look for the documentation of PQconnectdb() for further details. On Fri, Jan 28, 2011 at 12:13 AM, Mike Axelrod mike.axel...@pictometry.com wrote: Does ogr2ogr (and ogrinfo) natively support secure connections to postgresql? I need to run ogrinfo and ogr2ogr where the target is a postgresql server elsewhere on the network (in a different domain) and secure the communication. Mike Mike Axelrod, Software Engineer Pictometry International Corp. Suite A, 100 Town Centre Drive, Rochester, NY 14623 Phone: 585-775-7711 E-mail: mike.axel...@pictometry.com Web: http://www.Pictometry.com/http://www.pictometry.com/ NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful. NOTICE: This message is covered by the Electronic Communications Privacy Act, Title 18, United States Code, Sections 2510-2521. This e-mail and any attached files are the exclusive property of Pictometry International Corp., are deemed privileged and confidential, and are intended solely for the use of the individual(s) or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or believe that you have received this message in error, please delete this e-mail and any attachments and notify the sender immediately. Any other use, re-creation, dissemination, forwarding or copying of this e-mail is strictly prohibited and may be unlawful. -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E ___ gdal-dev mailing list gdal-dev@lists.osgeo.org
Re: [gdal-dev] gdal_grid - cannot get interpolation to work
Werner, You swapped the X and Y extents in the command. On Thu, Jan 27, 2011 at 11:14 PM, Werner Reiche w.rei...@hotmail.comwrote: I'm trying to use gdal_grid to generate a .tiff file from a .csv file. The problem I am encountering is that output file always contains 'no-data' values. The command I am using is: gdal_grid -txe -51.428009 -43.153992 -tye 46.112598 51.347198 -outsize 1024 796 \ -a nearest:radius1=10.0:radius2=10.0:angle=0.0:nodata=0.0 \ -l rs2_file_1 -l rs2_file_2 -l rs2_file_3 \ -of GTiff -ot Byte rs2_file.vrt test.tiff I have also tried the following interpolation parameters: # Results in all black # -a nearest:radius1=1.0:radius2=1.0:angle=0.0:nodata=0.0 \ # -a average:radius1=1.0:radius2=1.0:angle=0.0:min_points=1:nodata=0.0 \ # -a invdist:radius1=1.0:radius2=1.0:angle=0.0:max_points=1:min_points=1:nodata=0.0 \ # Results in all one shade of grey (average of entire image) # -a invdist:radius1=0.0:radius2=0.0:angle=0.0:max_points=10:min_points=1:nodata=0.0 \ The .vrt and csv file used are shown below. rs2_file.vrt :: OGRVRTDataSource OGRVRTLayer name=rs2_file_1 SrcDataSourcers2_file_1.csv/SrcDataSource GeometryTypewkbPoint25D/GeometryType GeometryField encoding=PointFromColumns x=lon y=lat z=red/ /OGRVRTLayer OGRVRTLayer name=rs2_file_2 SrcDataSourcers2_file_2.csv/SrcDataSource GeometryTypewkbPoint25D/GeometryType GeometryField encoding=PointFromColumns x=lon y=lat z=green/ /OGRVRTLayer OGRVRTLayer name=rs2_file_3 SrcDataSourcers2_file_3.csv/SrcDataSource GeometryTypewkbPoint25D/GeometryType GeometryField encoding=PointFromColumns x=lon y=lat z=blue/ /OGRVRTLayer /OGRVRTDataSource rs2_file.vrt (partial) :: lat,lon,red,green,blue -51.428009,50.522499,0,0,143 -50.049011,50.720699,0,0,143 -48.660004,50.902401,0,159,255 -47.260010,51.067501,0,239,255 -45.851013,51.215900,255,255,15 -44.433014,51.347198,255,191,0 -50.433014,50.657600,255,255,0 -49.046997,50.844200,255,223,0 -47.649994,51.014301,255,159,0 -46.243988,51.167599,255,191,0 -44.829010,51.303799,255,255,15 -50.816010,50.593800,255,255,0 -49.433014,50.784698,255,175,0 -48.040009,50.959202,255,239,0 -46.635986,51.117100,255,191,0 -45.222992,51.257999,255,223,0 -51.197998,50.528301,255,175,0 -49.819000,50.724098,255,191,0 -48.428009,50.903500,255,223,0 -47.028015,51.066299,255,207,0 -45.618011,51.211800,255,255,0 -44.199005,51.340199,255,255,0 -50.203003,50.661999,223,255,47 -48.816010,50.845798,255,223,0 -47.417999,51.013000,255,191,0 -46.010986,51.163502,255,207,0 -44.595001,51.297001,255,255,15 -50.585999,50.598900,255,191,0 -49.201996,50.787601,255,255,0 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev