<div dir="ltr"><div style="font-family:arial,sans-serif"><div>Hello,</div><div><br></div><div>Please find the GSOC week #9 report as follow.</div></div><div style="font-family:arial,sans-serif"><br></div><div style><font face="arial, sans-serif" style="font-family:arial,sans-serif">Report URL - </font><font face="arial, sans-serif"><a href="https://github.com/panwarnaveen9/View-Module-for-Cartaro-GSOC2014/wiki/Code-Week-%239">https://github.com/panwarnaveen9/View-Module-for-Cartaro-GSOC2014/wiki/Code-Week-%239</a></font></div>

<div style="font-family:arial,sans-serif"><font face="arial, sans-serif"><br></font></div><div style="font-family:arial,sans-serif"><div class="" style="line-height:1.7;overflow:hidden;word-wrap:break-word;padding:0px 30px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif,'Segoe UI Emoji','Segoe UI Symbol'">

<p style="margin-right:0px;margin-bottom:15px;margin-left:0px;margin-top:0px!important"><strong>Weekly Report (13th July to 19th July) -<br><br></strong></p><p style="margin:15px 0px"><strong>Aim</strong> - Implement the spatial filter functions for the module.</p>

<p style="margin:15px 0px"><strong>Things, I have done this week</strong></p><ul class="" style="padding:0px 0px 0px 30px;margin:15px 0px"><li><p style="margin:15px 0px">Changed the input WKT data to geometry_A in operation function.</p>

<p style="margin:15px 0px"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;margin:0px;border:1px solid rgb(221,221,221);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:0px;background-color:rgb(248,248,248)">$geometry_where = "$operation(st_setsrid(:wkt,4326), $table_name.$field_name)";</code></p>

</li><li><p style="margin:15px 0px">Added a complex where clause to the query.</p><p style="margin:15px 0px"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;margin:0px;border:1px solid rgb(221,221,221);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:0px;background-color:rgb(248,248,248)">$this->query->add_where_expression($this->options['group'], $geometry_where, $args = array(':wkt' => $geometry_B_wkt_data) );</code></p>

</li><li>Completed the query function, also successfully tested it for ST_Contains.</li><li>Removed unnecessary lines from the code.</li></ul><p style="margin:15px 0px"><strong>Cautions</strong></p><ul class="" style="padding:0px 0px 0px 30px;margin:15px 0px">

<li>We need to set the SRID as 4326 for input WKT geometry.</li></ul><p style="margin:15px 0px"><strong>Mentor Suggestions</strong></p><ul class="" style="padding:0px 0px 0px 30px;margin:15px 0px"><li>Use psql or pgadmin to have a look at the cartaro database and find out how the postgis field tables are structured and named.</li>

<li>Turn on the "Show the SQL query" setting under Structure > Views > Settings.</li></ul><p style="margin:15px 0px"><strong>Things to do next week</strong></p><ul class="" style="padding:0px 0px 0px 30px;margin:15px 0px">

<li>Test the query function for the remaining operations like: ST_Intersects, ST_Covers etc..</li><li>Define the function "check_wkt_data()", as a part of error handling.</li></ul><p style="margin:15px 0px"><strong>Reference Modules/Files</strong> -</p>

<ul class="" style="padding:0px 0px 0px 30px;margin:15px 0px"><li><a href="https://github.com/panwarnaveen9/View-Module-for-Cartaro-GSOC2014/blob/20964232f29365a6ff28f54c11b09244936f9eec/cartaro/profiles/cartaro/modules/contrib/postgis/views/postgis_views_handler_filter_geometry.inc" style="color:rgb(65,131,196);text-decoration:none;background:transparent">postgis_views_handler_filter_geometry.inc</a></li>

</ul><p style="margin:15px 0px"><strong>Am I blocked on anything ?</strong></p><p style="margin-top:15px;margin-right:0px;margin-left:0px;margin-bottom:0px!important">No.</p><p style="margin-top:15px;margin-right:0px;margin-left:0px;margin-bottom:0px!important">

<br></p></div></div><div><div dir="ltr"><div><font face="arial, helvetica, sans-serif" color="#000000">--</font></div><div><font face="arial, helvetica, sans-serif" color="#666666">Regards,</font></div><div style="text-align:left">

<font face="arial, helvetica, sans-serif" color="#073763"><b>Naveen Panwar</b></font></div><div style="text-align:left"><div style="color:rgb(102,102,102);font-family:arial,helvetica,sans-serif"><span style="text-align:-webkit-auto">IIIT-Hyderabad, India.</span><br>

</div></div><div style="text-align:left"><span style="text-align:-webkit-auto;background-image:initial"><font face="arial, helvetica, sans-serif" color="#666666"><div>+91-9030736015</div><div><br></div></font></span></div>

<div style="text-align:left"><div><span style="background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif" color="#3d85c6"><a href="http://lsi.iiit.ac.in/naveen.panwar" target="_blank">http://lsi.iiit.ac.in/naveen.panwar</a></font></span></div>

<div><span style="background-color:rgb(255,255,255)"><font color="#999999"><br></font></span></div><div><span style="background-color:rgb(255,255,255)"><br></span></div></div></div></div>
</div>