<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sOgrInput and NULL geometries (TOS Spatial 5.1.1) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/sOgrInput-and-NULL-geometries-TOS-Spatial-5-1-1/m-p/2198486#M1796</link>
    <description>&lt;A href="https://github.com/talend-spatial/talend-spatial/issues/3" rel="nofollow noopener noreferrer"&gt;https://github.com/talend-spatial/talend-spatial/issues/3&lt;/A&gt;&lt;BR /&gt;Fixed thanks for the patch.&lt;BR /&gt;Cheers.&lt;BR /&gt;Francois</description>
    <pubDate>Sun, 30 Sep 2012 17:45:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-30T17:45:16Z</dc:date>
    <item>
      <title>sOgrInput and NULL geometries (TOS Spatial 5.1.1)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/sOgrInput-and-NULL-geometries-TOS-Spatial-5-1-1/m-p/2198484#M1794</link>
      <description>Hi, 
&lt;BR /&gt;I don't know if this forum is the correct place to post bug reports or patches (haven't seen a project in TalendForge's JIRA specifically for the SDI plugin), please inform me if this should go somewhere else. 
&lt;BR /&gt;I've encountered an issue while using the sOgrInput component in a job, when trying to read a MapInfo TAB file containing a NULL geometry. The job fails with a NullPointerException when reading the offending record. NULL geometries are a admittedly an uncommon and odd occurrence, but in this case I have no control over the TAB file contents. 
&lt;BR /&gt;I've been able to work around the problem and pass a NULL value by modifying the component's sOgrInput_begin.javajet code, to check when the call to org.gdal.ogr.Feature.GetGeometryRef() returns null and pass a null value instead of trying to invoke the ExportToWkt() method on the null ogrGeometry (and skip assigning the SRID as well). 
&lt;BR /&gt;Please find a patch with the fix below. 
&lt;BR /&gt;Thanks! 
&lt;BR /&gt;Etienne 
&lt;BR /&gt;---------------------------------------- 
&lt;BR /&gt; .../components/sOgrInput/sOgrInput_begin.javajet | 11 +++++++---- 
&lt;BR /&gt; 1 file changed, 7 insertions(+), 4 deletions(-) 
&lt;BR /&gt;diff --git a/org.talend.sdi.designer.components.sandbox/components/sOgrInput/sOgrInput_begin.javajet b/org.talend.sdi.designer.components.sandbox/components/sOgrInput/sOgrInput_begin.javajet 
&lt;BR /&gt;index 9a23ea5..c71c259 100755 
&lt;BR /&gt;--- a/org.talend.sdi.designer.components.sandbox/components/sOgrInput/sOgrInput_begin.javajet 
&lt;BR /&gt;+++ b/org.talend.sdi.designer.components.sandbox/components/sOgrInput/sOgrInput_begin.javajet 
&lt;BR /&gt;@@ -169,10 +169,13 @@ while ((poFeature_&amp;lt;%=cid %&amp;gt; = poLayer_&amp;lt;%=cid %&amp;gt;.GetNextFeature()) != null) { 
&lt;BR /&gt; 
&lt;BR /&gt; if (typeToGenerate.equals("Geometry")) { 
&lt;BR /&gt; %&amp;gt; 
&lt;BR /&gt;- org.talend.sdi.geometry.Geometry geometry_&amp;lt;%=cid %&amp;gt; = 
&lt;BR /&gt;- new org.talend.sdi.geometry.Geometry( 
&lt;BR /&gt;- poFeature_&amp;lt;%=cid %&amp;gt;.GetGeometryRef().ExportToWkt()); 
&lt;BR /&gt;- geometry_&amp;lt;%=cid %&amp;gt;.setSRID(pszWKT_&amp;lt;%=cid %&amp;gt;); 
&lt;BR /&gt;+ org.gdal.ogr.Geometry ogrGeometry = poFeature_&amp;lt;%=cid %&amp;gt;.GetGeometryRef(); 
&lt;BR /&gt;+ org.talend.sdi.geometry.Geometry geometry_&amp;lt;%=cid %&amp;gt; = ogrGeometry != null ? 
&lt;BR /&gt;+ new org.talend.sdi.geometry.Geometry(ogrGeometry.ExportToWkt()) : null; 
&lt;BR /&gt;+ 
&lt;BR /&gt;+ if (geometry_&amp;lt;%=cid %&amp;gt; != null) { 
&lt;BR /&gt;+ geometry_&amp;lt;%=cid %&amp;gt;.setSRID(pszWKT_&amp;lt;%=cid %&amp;gt;); 
&lt;BR /&gt;+ } 
&lt;BR /&gt; &amp;lt;%=conn.getName() %&amp;gt;.&amp;lt;%=column.getLabel() %&amp;gt; = geometry_&amp;lt;%=cid %&amp;gt;; 
&lt;BR /&gt; &amp;lt;% 
&lt;BR /&gt; } else if (typeToGenerate.equals("String")) {</description>
      <pubDate>Sat, 16 Nov 2024 12:10:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/sOgrInput-and-NULL-geometries-TOS-Spatial-5-1-1/m-p/2198484#M1794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: sOgrInput and NULL geometries (TOS Spatial 5.1.1)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/sOgrInput-and-NULL-geometries-TOS-Spatial-5-1-1/m-p/2198485#M1795</link>
      <description>Hello Etienne, thanks for reporting and the patch.&lt;BR /&gt;You could add an issue to the new code repository issue tracker:&lt;BR /&gt;&lt;A href="https://github.com/talend-spatial/talend-spatial/issues" rel="nofollow noopener noreferrer"&gt;https://github.com/talend-spatial/talend-spatial/issues&lt;/A&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;Francois</description>
      <pubDate>Fri, 28 Sep 2012 07:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/sOgrInput-and-NULL-geometries-TOS-Spatial-5-1-1/m-p/2198485#M1795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-28T07:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: sOgrInput and NULL geometries (TOS Spatial 5.1.1)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/sOgrInput-and-NULL-geometries-TOS-Spatial-5-1-1/m-p/2198486#M1796</link>
      <description>&lt;A href="https://github.com/talend-spatial/talend-spatial/issues/3" rel="nofollow noopener noreferrer"&gt;https://github.com/talend-spatial/talend-spatial/issues/3&lt;/A&gt;&lt;BR /&gt;Fixed thanks for the patch.&lt;BR /&gt;Cheers.&lt;BR /&gt;Francois</description>
      <pubDate>Sun, 30 Sep 2012 17:45:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/sOgrInput-and-NULL-geometries-TOS-Spatial-5-1-1/m-p/2198486#M1796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-30T17:45:16Z</dc:date>
    </item>
  </channel>
</rss>

