[Gdal-dev] Parameter names in swig bindings

Ari Jolma ari.jolma at tkk.fi
Tue Oct 16 12:52:28 EDT 2007


Brian Hamlin kirjoitti:
> it looks like in Perl it should be
> Geo::OGR::ExecuteSQL()
>
> but using trunk sources I get
>   can't locate auto/Geo/OGR/Driver/ExecuteSQL.al in @INC(xxx)

It's a DataSource method, i.e.

$ds = Geo::OGR::DataSource somehow
$layer = $ds->ExecuteSQL($sql);

although this does not work with latest from repository since it 
complains geom being undefined

... more woes because of parameter names:

I have a general requirement that OGRGeometryShadow* other should be 
non-null. In AddGeometryDirectly there is a "%apply SWIGTYPE *DISOWN" on 
it and after the method a "%clear OGRGeometryShadow* other;", which 
seems to clear _both_ DISOWN and the non-null requirement.

I guess this is just more reasons to press on putting the checks into C API.

I run into this problem because I'm getting segfaults with the latest 
latest from repository somewhere in my OGR test code where I add 
geometries into a multigeometry. This problem is both in Windows and Linux.

Ari

>
>
> On Oct 16, 2007, at 3:06 AM, Ari Jolma wrote:
>
>> I assume there's no problem in changing the parameter names in the 
>> bindings? I'd like to rename the geom parameter to something else, 
>> probably spatialFilter.
>>
>> This because there's now a problem with the Perl typemap, which  says 
>> that  geom must not  be null (as is the case where it is used 
>> elsewhere) and in ExecuteSQL  geom is usually null.
>>
>> Ari
>>
>> -- 
>> Prof. Ari Jolma
>> Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
>> Teknillinen Korkeakoulu / Helsinki University of Technology
>> tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
>> Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma
>>
>>
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/gdal-dev
>


-- 
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma





More information about the Gdal-dev mailing list