Re: [gdal-dev] [update] Re: Travis CI continuous integration service for GDAL
On 10/10/2012 02:16 AM, Even Rouault wrote: Le dimanche 07 octobre 2012 11:42:30, Even Rouault a écrit : Hi, Following a recent similar move from MapServer, I've setup an instance of Travis CI, hosted continuous integration service. After each SVN commit in trunk, GDAL is built and the Java, Perl and Python tests are run. Travis CI currently offers Ubuntu 12.04 i386 virtual machines. The GDAL build is configured with almost any possible dependencies to external libraries (see http://trac.osgeo.org/gdal/wiki/Buildbot for the list) You can access to the latest builds here : https://travis-ci.org/#!/rouault/gdal/builds Just a follow-up to inform you that GDAL SVN is now fully mirrored (meaning that it includes all branches and tags) at : https://github.com/OSGeo/gdal (The update script still runs on my PC.) Travis builds are available consequently at : https://travis-ci.org/#!/OSGeo/gdal Both trunk and 1.9 branch benefit from Travis configuration. Even ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev Hi all, This is great news. I believe that gdal would benefit a lot with a full move to git. Also I am wondering if we should add more OSGeo projects and members under this OSGeo github account. What do you think? Regards, Angelos -- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Problem with Gdal/ogr Java
Hi Wael. you need to use gdal.jar file in your java project and also include the required DLL(Win) in your class path, then you will be able to use GDAL in your Java project. download from http://www.gisinternals.com/sdk/ or http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries look for GDAL.JAR and the required DLL files in installed folder. regards, Imran On Wed, Oct 10, 2012 at 2:02 PM, Wael Tarhouni waelin...@gmail.com wrote: Good Morning, I'm newbie in Gdal/ogr and i'm working actually with ogr2ogr Api to import .TAB file(Mapinfo) into a postgis database, but i wanna make it automatic without typing in command line or executing bat files. So, i found this source code with gdal/ogr library : http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/ogr2ogr.java but it doesn't work, is there any jar file of gdal/ogr to download ? Best regards -- Wael Tarhouni Élève ingénieur en Réseaux informatiques et Télecommunication à l'INSAT ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- I.R ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Dealing with ogr2ogr and cyrillic TAB files
Hello, I'm trying to convert bunch of MapInfo TAB files from Russian customer to PostGIS using ogr2ogr. Original TAB files are in WindowsCyrillic encoding, and they should be somehow be converted to UTF-8. For some reason, it seems that ogr2ogr messes up encoding during conversion. If I try to convert TAB to Shapefile and from Shapefile to PostGIS end result is complete mess. Direct conversion from TAB to PostGIS seems to fail due to encoding problems (I have tried to set PGCLIENTENCODING, but end result doesn't seem to change). I have managed to create correct Cyrillic output by running ogr2ogr to convert TAB to shape, and then creating SQL from shape and then running that SQL through perl-script which fixes the encoding, but as this includes two-bit characters to columns it causes all field length constraints to break. Does anyone know way how to deal with these encoding issues in a way that doesn't require us to use any external scripts to create correct output? -Tuomas Koivusalo Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] clipping multiple shapefiles from a set of clipping polygons
Dear Eli, Thanks for this. I tried your suggestion: ogr2ogr -overwrite -f 'ESRI shapefile' clipped_roads.shp roads.shp -clipsrc province.shp -clipsrclayer province -clipsrcsql 'SELECT * FROM province WHERE provname='\''SomeName'\''' ERROR 6: GEOS support not enabled. ERROR 6: GEOS support not enabled. ERROR 6: GEOS support not enabled ... More than 1000 errors or warnings have been reported. No more will be reported from now I am using GDAL 1.9 Complete frameworks from KyngChaos which has includes GEOS 3.3.5-1 On Wed, Oct 10, 2012 at 12:14 AM, Eli Adam ea...@co.lincoln.or.us wrote: ogr2ogr -f ESRI shapefile output.shp input.shp -clipsrc AdminPoly.shp -clipsrclayer AdminPoly -clipsrcsql SELECT * FROM AdminPoly WHERE AttributeName_in_AdminPoly='Some_value' -- cheers, maning -- Freedom is still the most radical idea of all -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] S57 dataset boundary issue
Nikhil, I loaded your ENC. I see a number of depth area (DEPARE) and anchor zone area (ACHARE). But no inner ring! Is there an inner rings somewhere I should see? rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 8:00:41 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Duclos, Please see this sample data attached. So as per the code given by you we have tried and got result i.e able to find out area some times it shows area0 and some times area0 hence we get CW and CCW. But how do we classify in layer which is outer boundary and which is inner boundary Geometry testgeo = geomLAKARE.GetBoundary(); double area = 0; for (int l = 0; l testgeo.GetPointCount() - 1; l++) { double x1 = testgeo.GetX(l); double y1 = testgeo.GetY(l); double x2 = testgeo.GetX(l + 1); double y2 = testgeo.GetY(l + 1); area += (x1 * y2) - (x2 * y1); } Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Tuesday, October 09, 2012 11:58 PM To: Frank Warmerdam; Nikhil Sai Parupalli Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Frank Nikhil, Frank asked: are, I'm not sure what I or others can do about the performance cost of checking. If I understand the problem, then it cost nothing! You have to check the winding while loading a OGRGeometryH like so: double area = 0; for (unsigned int i=0; ivert_count-1; i++) { double x1 = OGR_G_GetX(hRing, i); double y1 = OGR_G_GetY(hRing, i); double x2 = OGR_G_GetX(hRing, i+1); double y2 = OGR_G_GetY(hRing, i+1); area += (x1*y2) - (x2*y1); } If the area 0 then it is CW (clockwise) and 0 is CCW (Counter CW). Note that in S57 the exterior ring must be CW and interior ring are CCW. But in S57 there is no order between rings. So interior ring might come first. I think WKT fix this. In my code I assume that OGR place the exterior ring first. We have been trough this before. At the time the question was if S57 allow for many exterior ring for the same poly. I guess it all depend on HO and how they encode the data. I'm using mostly Canadian ENC and found no problem. But other HO might encode ENC differently .. rdgs, Sylvain Duclos. From: Frank Warmerdam warmer...@pobox.com To: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Tuesday, October 9, 2012 12:25:29 PM Subject: Re: [gdal-dev] S57 dataset boundary issue On Mon, Oct 8, 2012 at 10:28 PM, Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com wrote: HI All, , Thanks for the reply in below data NAME_RCNM (IntegerList) = (7:130,130,130,130,130,130,130) NAME_RCID (IntegerList) = (7:691,391,690,52,1336,1503,1512) ORNT (IntegerList) = (7:2,2,2,2,1,1,1) USAG (IntegerList) = (7:1,1,1,1,1,1,1) MASK (IntegerList) = (7:255,255,255,255,255,255,255) RCID 691 ORNT has 2 and USAG is 1 based on this data we could identify that RCID 691 is of exterior boundary with reverse direction. So if I have 1000 RCID in NAME_RCID which is vise versa for the above condition I need to display that RCIDS list as errors. So it makes 1000 conditional checks hence reducing performance. Please let us know further. Nikhil, I'm afraid I don't follow your point. Are you trying to do some sort of ring orientation validation and identify ones that don't match your expectations? And you are concerned about the performance cost? I don't know why you are doing this, and if you are, I'm not sure what I or others can do about the performance cost of checking. 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 Software Developer ___ gdal-dev
Re: [gdal-dev] [update] Re: Travis CI continuous integration service for GDAL
IMHO git (with github) is a great platform for collaboration. You might find yourself swamped with pull requests though... cheers Etienne On Wed, Oct 10, 2012 at 5:34 AM, Angelos Tzotsos gcpp.kal...@gmail.com wrote: On 10/10/2012 02:16 AM, Even Rouault wrote: Le dimanche 07 octobre 2012 11:42:30, Even Rouault a écrit : Hi, Following a recent similar move from MapServer, I've setup an instance of Travis CI, hosted continuous integration service. After each SVN commit in trunk, GDAL is built and the Java, Perl and Python tests are run. Travis CI currently offers Ubuntu 12.04 i386 virtual machines. The GDAL build is configured with almost any possible dependencies to external libraries (see http://trac.osgeo.org/gdal/wiki/Buildbot for the list) You can access to the latest builds here : https://travis-ci.org/#!/rouault/gdal/builds Just a follow-up to inform you that GDAL SVN is now fully mirrored (meaning that it includes all branches and tags) at : https://github.com/OSGeo/gdal (The update script still runs on my PC.) Travis builds are available consequently at : https://travis-ci.org/#!/OSGeo/gdal Both trunk and 1.9 branch benefit from Travis configuration. Even ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev Hi all, This is great news. I believe that gdal would benefit a lot with a full move to git. Also I am wondering if we should add more OSGeo projects and members under this OSGeo github account. What do you think? Regards, Angelos -- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos ___ 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] S57 dataset boundary issue
Hi Nikhil, I loaded US1GC09M//US1GC09M.000 .. it's huge :) It's the Gulf of Mexico .. now where should I look ? About the inner / outer ring. As I said before, I just assume that OGR send me the outer ring first. And, up to now, my code is working fine. rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 9:40:54 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Could you try on this data set please Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 7:02 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Nikhil, I loaded your ENC. I see a number of depth area (DEPARE) and anchor zone area (ACHARE). But no inner ring! Is there an inner rings somewhere I should see? rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 8:00:41 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Duclos, Please see this sample data attached. So as per the code given by you we have tried and got result i.e able to find out area some times it shows area0 and some times area0 hence we get CW and CCW. But how do we classify in layer which is outer boundary and which is inner boundary Geometry testgeo = geomLAKARE.GetBoundary(); double area = 0; for (int l = 0; l testgeo.GetPointCount() - 1; l++) { double x1 = testgeo.GetX(l); double y1 = testgeo.GetY(l); double x2 = testgeo.GetX(l + 1); double y2 = testgeo.GetY(l + 1); area += (x1 * y2) - (x2 * y1); } Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Tuesday, October 09, 2012 11:58 PM To: Frank Warmerdam; Nikhil Sai Parupalli Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Frank Nikhil, Frank asked: are, I'm not sure what I or others can do about the performance cost of checking. If I understand the problem, then it cost nothing! You have to check the winding while loading a OGRGeometryH like so: double area = 0; for (unsigned int i=0; ivert_count-1; i++) { double x1 = OGR_G_GetX(hRing, i); double y1 = OGR_G_GetY(hRing, i); double x2 = OGR_G_GetX(hRing, i+1); double y2 = OGR_G_GetY(hRing, i+1); area += (x1*y2) - (x2*y1); } If the area 0 then it is CW (clockwise) and 0 is CCW (Counter CW). Note that in S57 the exterior ring must be CW and interior ring are CCW. But in S57 there is no order between rings. So interior ring might come first. I think WKT fix this. In my code I assume that OGR place the exterior ring first. We have been trough this before. At the time the question was if S57 allow for many exterior ring for the same poly. I guess it all depend on HO and how they encode the data. I'm using mostly Canadian ENC and found no problem. But other HO might encode ENC differently .. rdgs, Sylvain Duclos. From: Frank Warmerdam warmer...@pobox.com To: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Tuesday, October 9, 2012 12:25:29 PM Subject: Re: [gdal-dev] S57 dataset boundary issue On Mon, Oct 8, 2012 at 10:28 PM, Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com wrote: HI All, , Thanks for the reply in below data NAME_RCNM (IntegerList) = (7:130,130,130,130,130,130,130) NAME_RCID (IntegerList) = (7:691,391,690,52,1336,1503,1512) ORNT (IntegerList) = (7:2,2,2,2,1,1,1) USAG (IntegerList) = (7:1,1,1,1,1,1,1) MASK (IntegerList) =
Re: [gdal-dev] S57 dataset boundary issue
Hey Sylvain, Thanks for trying the data which I have sent. Could you be helping me how this works like outer boundary and inner boundary. Based on the code which you have sent we could find out CW and CCW, but not outer/inner Please have a look at that data set once and let me know. Or if you have any sample data with simple representation of outer and inner boundaries please do share with me. Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 7:59 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Hi Nikhil, I loaded US1GC09M//US1GC09M.000 .. it's huge :) It's the Gulf of Mexico .. now where should I look ? About the inner / outer ring. As I said before, I just assume that OGR send me the outer ring first. And, up to now, my code is working fine. rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 9:40:54 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Could you try on this data set please Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 7:02 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Nikhil, I loaded your ENC. I see a number of depth area (DEPARE) and anchor zone area (ACHARE). But no inner ring! Is there an inner rings somewhere I should see? rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 8:00:41 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Duclos, Please see this sample data attached. So as per the code given by you we have tried and got result i.e able to find out area some times it shows area0 and some times area0 hence we get CW and CCW. But how do we classify in layer which is outer boundary and which is inner boundary Geometry testgeo = geomLAKARE.GetBoundary(); double area = 0; for (int l = 0; l testgeo.GetPointCount() - 1; l++) { double x1 = testgeo.GetX(l); double y1 = testgeo.GetY(l); double x2 = testgeo.GetX(l + 1); double y2 = testgeo.GetY(l + 1); area += (x1 * y2) - (x2 * y1); } Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Tuesday, October 09, 2012 11:58 PM To: Frank Warmerdam; Nikhil Sai Parupalli Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Frank Nikhil, Frank asked: are, I'm not sure what I or others can do about the performance cost of checking. If I understand the problem, then it cost nothing! You have to check the winding while loading a OGRGeometryH like so: double area = 0; for (unsigned int i=0; ivert_count-1; i++) { double x1 = OGR_G_GetX(hRing, i); double y1 = OGR_G_GetY(hRing, i); double x2 = OGR_G_GetX(hRing, i+1); double y2 = OGR_G_GetY(hRing, i+1); area += (x1*y2) - (x2*y1); } If the area 0 then it is CW (clockwise) and 0 is CCW (Counter CW). Note that in S57 the exterior ring must be CW and interior ring are CCW. But in S57 there is no order between rings. So interior ring might come first. I think WKT fix this. In my code I assume that OGR place the exterior ring first. We have been trough this before. At the time the question was if S57 allow for many exterior ring for the same poly. I guess it all depend on HO and how they encode the data. I'm using mostly Canadian ENC and found no problem. But other HO might encode ENC differently .. rdgs,
Re: [gdal-dev] OGRGeometry::Intersection
Hi Hugo, I have the same problem. Regards, -- View this message in context: http://osgeo-org.1560.n6.nabble.com/OGRGeometry-Intersection-tp5007490p5007743.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] S57 dataset boundary issue
Hi Nikhil, Based on the code which you have sent we could find out CW and CCW, but not outer/inner The outer ring of OGRGeometryH poly is the ring 0 (zero). In C code the OGR call: guint nRingCount = OGR_G_GetGeometryCount(hGeom); will give you the number of rings in a poly. Say there is 2 rings for this hGeom. Then the outer ring is OGRGeometryH *hGeomRef_outter = OGR_G_GetGeometryRef(hGeom, 0); and the inner ring is OGRGeometryH *hGeomRef_inner = OGR_G_GetGeometryRef(hGeom, 1); Please have a look at that data set once and let me know. There is nothing in attachment rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 10:40:27 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Hey Sylvain, Thanks for trying the data which I have sent. Could you be helping me how this works like outer boundary and inner boundary. Based on the code which you have sent we could find out CW and CCW, but not outer/inner Please have a look at that data set once and let me know. Or if you have any sample data with simple representation of outer and inner boundaries please do share with me. Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 7:59 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Hi Nikhil, I loaded US1GC09M//US1GC09M.000 .. it's huge :) It's the Gulf of Mexico .. now where should I look ? About the inner / outer ring. As I said before, I just assume that OGR send me the outer ring first. And, up to now, my code is working fine. rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 9:40:54 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Could you try on this data set please Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 7:02 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Nikhil, I loaded your ENC. I see a number of depth area (DEPARE) and anchor zone area (ACHARE). But no inner ring! Is there an inner rings somewhere I should see? rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 8:00:41 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Duclos, Please see this sample data attached. So as per the code given by you we have tried and got result i.e able to find out area some times it shows area0 and some times area0 hence we get CW and CCW. But how do we classify in layer which is outer boundary and which is inner boundary Geometry testgeo = geomLAKARE.GetBoundary(); double area = 0; for (int l = 0; l testgeo.GetPointCount() - 1; l++) { double x1 = testgeo.GetX(l); double y1 = testgeo.GetY(l); double x2 = testgeo.GetX(l + 1); double y2 = testgeo.GetY(l + 1); area += (x1 * y2) - (x2 * y1); } Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Tuesday, October 09, 2012 11:58 PM To: Frank Warmerdam; Nikhil Sai Parupalli Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Frank Nikhil, Frank asked: are, I'm not sure what I or others can do about the performance cost of checking.
[gdal-dev] OGRGeometry::Intersection returns NULL
Hello, guys! I'm truggling through a rough moment here... I have this piece of code in a project that I work on: if(basinPolygon-Intersects(luPolygon)) { OGRGeometry *result = basinPolygon-Intersection(luPolygon); if(result) newLayer.push_back(result); } Somehow, the Intersects function returns true for those polygons (basinPolygon and luPolygon) (i.e. there is a intersection area between them), but basinPolygon-Intersection(luPolygon); Always returns NULL! why is it returning NULL if Intersects returns true?! This is a mistery for me! :( If I replace Intersection by another similar method like Union, I still get a NULL as response. Here is the documentation of OGRGeometry::Intersectionhttp://www.gdal.org/ogr/classOGRGeometry.html#a202ad4c29487ca046c4a2b055042cb6a It tells me that a NULL can be returned if an error occurs. But I don't have any clue to actually know if some error (and which error) has occured! Anyone? Any ideias? :S Thanks in advance, hbobenicio. -- Alisson Barbosa Systems Analyst - FUNCEME - Brazil M.Sc. in Computer Science - MACC Graduate in Computer Science - UECE ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] OGRGeometry::Intersection returns NULL
Le mercredi 10 octobre 2012 19:48:07, Alisson Barbosa a écrit : Hello, guys! I'm truggling through a rough moment here... I have this piece of code in a project that I work on: if(basinPolygon-Intersects(luPolygon)) { OGRGeometry *result = basinPolygon-Intersection(luPolygon); if(result) newLayer.push_back(result); } Somehow, the Intersects function returns true for those polygons (basinPolygon and luPolygon) (i.e. there is a intersection area between them), but basinPolygon-Intersection(luPolygon); Always returns NULL! why is it returning NULL if Intersects returns true?! This is a mistery for me! The likely cause is documented in the page you quoted About Intersection(): This method is built on the GEOS library, check it for the definition of the geometry operation. If OGR is built without the GEOS library, this method will always fail, issuing a CPLE_NotSupported error. About Intersects(): If GEOS is enabled, then this is done in rigerous fashion otherwise TRUE is returned if the envelopes (bounding boxes) of the two features overlap. Take your symptoms and the above highlighted precisions, and you should have the answer. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [update] Re: Travis CI continuous integration service for GDAL
Le mercredi 10 octobre 2012 15:48:48, Etienne Tourigny a écrit : IMHO git (with github) is a great platform for collaboration. You might find yourself swamped with pull requests though... I'd be curious to know if the current use of SVN really deters people from contributing to GDAL, whereas they would contribute more actively if GIT was used as the prime VCS (*). My feeling is that the main barrier to contribution lies more in understanding how the source works rather than the tools around. Anyway, whatever the VCS, as you underlined, you still need competent eyes to review, comment on, fix by themselves the patch or ask the contributor to do changes, apply, or reject patches... Trac has already such patches waiting. But as a SVN committer, my opinion is obviously biased since contributing is of course more straighforward than for a non-GDAL committer. GIT has certainly a more egalitarian approach (everyone can commit or fork), although that someone that hasn't push rights can only send pull requests to the main repository. My knowledge of GIT is rather limited, but, for a GDAL contributor without commit (SVN)/push(GIT) rights to the main repository, what improvements would a full move to GIT would offer with respect to the current git-svn mirroring ? Best regards, Even (*) What would be interesting to know also is : wouldn't a move to GIT deter current GDAL contributors ? ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [update] Re: Travis CI continuous integration service for GDAL
Hi Even, the main advantage of github is that you can manage patches/pull requests more easily, and it's easy for someone to setup a fork with substantial changes, and anyone can pull that fork and try it without much hassle. The other way of doing it with trac/svn is to upload patches to tickets, and then more patches after review etc Which works fine, but a bit clumsy compared to github forks and pull requests. On Wed, Oct 10, 2012 at 4:24 PM, Even Rouault even.roua...@mines-paris.org wrote: Le mercredi 10 octobre 2012 15:48:48, Etienne Tourigny a écrit : IMHO git (with github) is a great platform for collaboration. You might find yourself swamped with pull requests though... I'd be curious to know if the current use of SVN really deters people from contributing to GDAL, whereas they would contribute more actively if GIT was used as the prime VCS (*). You are right, it might deter some devs, but I'm not sure if the balance would be positive or negative in that view. My feeling is that the main barrier to contribution lies more in understanding how the source works rather than the tools around. Anyway, whatever the VCS, as you underlined, you still need competent eyes to review, comment on, fix by themselves the patch or ask the contributor to do changes, apply, or reject patches... Trac has already such patches waiting. I'd also say - if it works don't fix it. Transitioning to git(hub) is certainly possible (QGIS managed to get it working well), but it will entain some productivity loss in the short term. But my experience with github (for QGIS) has been overall a more fluid one than with svn (for gdal). I even did some collaborative work last year in gdal using github as the shared repos, and pushing to svn but that was a bit clumsy (the git-svn part) and I have stopped using that approach. But as a SVN committer, my opinion is obviously biased since contributing is of course more straighforward than for a non-GDAL committer. GIT has certainly a more egalitarian approach (everyone can commit or fork), although that someone that hasn't push rights can only send pull requests to the main repository. I'd say svn is fine for core devs, not optimal for occasional submitters. My knowledge of GIT is rather limited, but, for a GDAL contributor without commit (SVN)/push(GIT) rights to the main repository, what improvements would a full move to GIT would offer with respect to the current git-svn mirroring ? a more seamless flow between the dev's work and pushes to the main source. As far as I can tell, the git part of your setup is just for the continuous builds right? In fact git is used as a read-only, so I don't see how having a git mirror helps contributing code. cheers Etienne Best regards, Even (*) What would be interesting to know also is : wouldn't a move to GIT deter current GDAL contributors ? ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [update] Re: Travis CI continuous integration service for GDAL
On 10 October 2012 20:49, Etienne Tourigny etourigny@gmail.com wrote: Hi Even, the main advantage of github is that (...) Guys, you're discuss apples (Even on Git) and oranges (Etienne on GitHub). Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [update] Re: Travis CI continuous integration service for GDAL
On Wed, Oct 10, 2012 at 4:52 PM, Mateusz Loskot mate...@loskot.net wrote: On 10 October 2012 20:49, Etienne Tourigny etourigny@gmail.com wrote: Hi Even, the main advantage of github is that (...) Guys, you're discuss apples (Even on Git) and oranges (Etienne on GitHub). sort of - I'm advocating for the use of git on github... cheers Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [update] Re: Travis CI continuous integration service for GDAL
Le mercredi 10 octobre 2012 21:49:49, Etienne Tourigny a écrit : Hi Even, the main advantage of github is that you can manage patches/pull requests more easily, and it's easy for someone to setup a fork with substantial changes, and anyone can pull that fork and try it without much hassle. The other way of doing it with trac/svn is to upload patches to tickets, and then more patches after review etc Which works fine, but a bit clumsy compared to github forks and pull requests. If someone submits a pull requests, and if that submitted code needs to be changed due to what is seen during the review, what is the process ? It is certainly nice to be able to merge the history of commits (I often wish that submitted patches to Trac would be split into more logical smaller changesets to make review easier). But that only makes sense when the history is clean (you generally don't care about trial-and-errors intermediate commits that would pollute the history of the main repository). I believe that it is possible to do that with git (git rewrite history leads to http://git- scm.com/book/ch6-4.html), but to my non-git specialists eyes, this looks far from being obvious. Do you know how QGIS for example deal with that ? I even did some collaborative work last year in gdal using github as the shared repos, and pushing to svn but that was a bit clumsy (the git-svn part) and I have stopped using that approach. you mean git svn dcommit didn't work as you expected ? But as a SVN committer, my opinion is obviously biased since contributing is of course more straighforward than for a non-GDAL committer. GIT has certainly a more egalitarian approach (everyone can commit or fork), although that someone that hasn't push rights can only send pull requests to the main repository. I'd say svn is fine for core devs, not optimal for occasional submitters. My knowledge of GIT is rather limited, but, for a GDAL contributor without commit (SVN)/push(GIT) rights to the main repository, what improvements would a full move to GIT would offer with respect to the current git-svn mirroring ? a more seamless flow between the dev's work and pushes to the main source. As far as I can tell, the git part of your setup is just for the continuous builds right? Yes mostly, and because it might be more convenient for people prefering GIT to do work. This could also be a kind of cheap test bench to assess what switching to GIT could bring to GDAL. In fact git is used as a read-only, so I don't see how having a git mirror helps contributing code. Can't people fork the git mirror ? My hope was that a GDAL SVN committer could use its own git-svn mirror, that has a origin to OSGeo/gdal, and try to merge in it pull requests submitted to OSGeo/gdal, and then git svn dcommit. I thought this was possible, but I might be wrong. I'm aware that git-svn would be more complicated than a pure GIT repository. But, from the side of occasional contributors, would that make a difference in their process ? I'm trying to understand if the git-svn mirror can bring some factual evidence that a switch to GIT would be beneficial. Even ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] build error - conflicting cpl_serv.h
Hi Everyone, Just fyi, I can't build gdal with an external libgeotif without doing a hack... Both gdal and libgeotiff from svn trunk. libtiff, geotiff were installed in a fresh sandbox. Then configured gdal to use external libtiff/geotiff. I got gdal to build by removing the libgeotiff installed cpl_serv.h and copying gdal/frmts/gtiff/libgeotiff/cpl_serv.h to gdal/port/cpl_serv.h (in build include path). That's a hack I know but fixed. This was broken before and fixed. Seems like it's back again. Not an issue for me but I thought I'd report it... Error from build below. Take care, Dave make[2]: Entering directory `/home/work/test/gdal/frmts/gtiff' /bin/sh /work/test/gdal/libtool --mode=compile --tag=CXX g++ -g -O2 -Wall -I.. -I../jpeg -DHAVE_LIBJPEG -I/work/test/gdal/port -I/work/test/gdal/gcore -I/work/test/gdal/alg -I/work/test/gdal/ogr -I/work/test/gdal/ogr/ogrsf_frmts -DBIGTIFF_SUPPORT -DOGR_ENABLED -D_REENTRANT -I/work/test/gdal/port -I/usr/local/ossim/include -I/usr/local/ossim/include -c -o ../o/gt_wkt_srs.lo gt_wkt_srs.cpp libtool: compile: g++ -g -O2 -Wall -I.. -I../jpeg -DHAVE_LIBJPEG -I/work/test/gdal/port -I/work/test/gdal/gcore -I/work/test/gdal/alg -I/work/test/gdal/ogr -I/work/test/gdal/ogr/ogrsf_frmts -DBIGTIFF_SUPPORT -DOGR_ENABLED -D_REENTRANT -I/work/test/gdal/port -I/usr/local/ossim/include -I/usr/local/ossim/include -c gt_wkt_srs.cpp -fPIC -DPIC -o ../o/.libs/gt_wkt_srs.o In file included from /work/test/gdal/port/cpl_port.h:84, from /work/test/gdal/ogr/ogr_core.h:33, from /work/test/gdal/ogr/ogr_srs_api.h:34, from /work/test/gdal/ogr/ogr_spatialref.h:34, from gt_wkt_srs.cpp:38: /work/test/gdal/port/cpl_config.h:106:1: warning: HAVE_STDLIB_H redefined In file included from /usr/local/ossim/include/cpl_serv.h:36, from gt_wkt_srs.cpp:33: /usr/local/ossim/include/geo_config.h:5:1: warning: this is the location of the previous definition In file included from /work/test/gdal/port/cpl_port.h:84, from /work/test/gdal/ogr/ogr_core.h:33, from /work/test/gdal/ogr/ogr_srs_api.h:34, from /work/test/gdal/ogr/ogr_spatialref.h:34, from gt_wkt_srs.cpp:38: /work/test/gdal/port/cpl_config.h:112:1: warning: HAVE_STRING_H redefined In file included from /usr/local/ossim/include/cpl_serv.h:36, from gt_wkt_srs.cpp:33: /usr/local/ossim/include/geo_config.h:11:1: warning: this is the location of the previous definition gt_wkt_srs.cpp: In function 'CPLErr GTIFWktFromMemBuf(int, unsigned char*, char**, double*, int*, GDAL_GCP**)': gt_wkt_srs.cpp:2331: error: 'CPLString' was not declared in this scope gt_wkt_srs.cpp:2331: error: expected ';' before 'osFilename' gt_wkt_srs.cpp:2333: error: 'osFilename' was not declared in this scope make[2]: *** [../o/gt_wkt_srs.lo] Error 1 make[2]: Leaving directory `/home/work/test/gdal/frmts/gtiff' make[1]: *** [gtiff-install-obj] Error 2 make[1]: Leaving directory `/home/work/test/gdal/frmts' make: *** [frmts-target] Error 2 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] S57 dataset boundary issue
Hey Sylvain, Thanks for your inputs, we have successfully implemented the same in our project . I have one more question i.e If I have a polygon how to find out edges of it programmatic do we have any function to get all the edges of polygon(area) Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: Nikhil Sai Parupalli Sent: Wednesday, October 10, 2012 9:07 PM To: s duclos Subject: RE: [gdal-dev] S57 dataset boundary issue Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 8:43 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Hi Nikhil, Based on the code which you have sent we could find out CW and CCW, but not outer/inner The outer ring of OGRGeometryH poly is the ring 0 (zero). In C code the OGR call: guintnRingCount = OGR_G_GetGeometryCount(hGeom); will give you the number of rings in a poly. Say there is 2 rings for this hGeom. Then the outer ring is OGRGeometryH *hGeomRef_outter = OGR_G_GetGeometryRef(hGeom, 0); and the inner ring is OGRGeometryH *hGeomRef_inner = OGR_G_GetGeometryRef(hGeom, 1); Please have a look at that data set once and let me know. There is nothing in attachment rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 10:40:27 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Hey Sylvain, Thanks for trying the data which I have sent. Could you be helping me how this works like outer boundary and inner boundary. Based on the code which you have sent we could find out CW and CCW, but not outer/inner Please have a look at that data set once and let me know. Or if you have any sample data with simple representation of outer and inner boundaries please do share with me. Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 7:59 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Hi Nikhil, I loaded US1GC09M//US1GC09M.000 .. it's huge :) It's the Gulf of Mexico .. now where should I look ? About the inner / outer ring. As I said before, I just assume that OGR send me the outer ring first. And, up to now, my code is working fine. rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 9:40:54 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Could you try on this data set please Thanks and Regards Nikhil Sai Parupalli Note: Do not print this email until and unless it is really required. Save paper , stay Green From: s duclos [sylvain_duc...@yahoo.com] Sent: Wednesday, October 10, 2012 7:02 PM To: Nikhil Sai Parupalli; Frank Warmerdam Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] S57 dataset boundary issue Nikhil, I loaded your ENC. I see a number of depth area (DEPARE) and anchor zone area (ACHARE). But no inner ring! Is there an inner rings somewhere I should see? rgds, Sylvain. - Original Message - From: Nikhil Sai Parupalli nikhil.parupa...@iictechnologies.com To: s duclos sylvain_duc...@yahoo.com; Frank Warmerdam warmer...@pobox.com Cc: gdal-dev@lists.osgeo.org gdal-dev@lists.osgeo.org Sent: Wednesday, October 10, 2012 8:00:41 AM Subject: RE: [gdal-dev] S57 dataset boundary issue Duclos, Please see this sample data attached. So as per the code given by you we have tried and got result i.e able to find out area some times it shows area0 and some times area0 hence we get CW and CCW. But how do we classify in layer which is outer boundary and which is inner boundary Geometry testgeo = geomLAKARE.GetBoundary(); double area = 0; for (int l = 0; l testgeo.GetPointCount() - 1; l++) { double x1 = testgeo.GetX(l);