[fdo-internals] RFC 65 Implement Resampling for GDAL Provider

Trevor Wekel trevor_wekel at otxsystems.com
Sun Oct 21 21:39:47 PDT 2012


Hi Jackie,

I did define the property but didn't mark it as enumerable.  Update is below.  I followed the code in the SDF Provider as an example.  "new wchar_t" looks suspiciously leaky to me but it's already in use in another provider. 

FdoRfpConnection.cpp
FdoRfpConnectionInfo::GetConnectionProperties ()
(updated code - also added globals for resampling types)

        wchar_t** pResamplingVals = new wchar_t*[4];
        pResamplingVals[0] = new wchar_t[wcslen(FdoGrfpGlobals::ResamplingBilinear)+1];
        pResamplingVals[1] = new wchar_t[wcslen(FdoGrfpGlobals::ResamplingCubic)+1];
        pResamplingVals[2] = new wchar_t[wcslen(FdoGrfpGlobals::ResamplingCubicSpline)+1];
        pResamplingVals[3] = new wchar_t[wcslen(FdoGrfpGlobals::ResamplingLanczos)+1];
        wcscpy(pResamplingVals[0], FdoGrfpGlobals::ResamplingBilinear);
        wcscpy(pResamplingVals[1], FdoGrfpGlobals::ResamplingCubic);
        wcscpy(pResamplingVals[2], FdoGrfpGlobals::ResamplingCubicSpline);
        wcscpy(pResamplingVals[3], FdoGrfpGlobals::ResamplingLanczos);

        wide_to_multibyte(mbServerName, FdoGrfpGlobals::ResamplingMethod);
        FdoPtr<ConnectionProperty> resamplingMethodProperty = new ConnectionProperty (
                        FdoGrfpGlobals::ResamplingMethod,
                        NlsMsgGet(GRFP_71_RESAMPLING_METHOD, mbServerName),
                        L"", false, false, true, false, false, false, false, 4, (const wchar_t**)pResamplingVals);
        mPropertyDictionary->AddProperty(resamplingMethodProperty);


And some XML output from the MapGuide HTTP GetConnectionPropertyValues test page for OSGeo.Gdal and ResamplingMethod property

<StringCollection>
  <Item>BILINEAR</Item>
  <Item>CUBIC</Item>
  <Item>CUBICSPLINE</Item>
  <Item>LANCZOS</Item>
</StringCollection>


Regards,
Trevor
-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Jackie Ng
Sent: October 21, 2012 9:16 PM
To: fdo-internals at lists.osgeo.org
Subject: Re: [fdo-internals] RFC 65 Implement Resampling for GDAL Provider

Hi Trevor,

Is the ResamplingMethod an enumerable connection property (can't really tell
from the patch)?

If it isn't, I think it should be.

- Jackie



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/RFC-65-Implement-Resampling-for-GDAL-Provider-tp5008350p5010167.html
Sent from the FDO Internals mailing list archive at Nabble.com.
_______________________________________________
fdo-internals mailing list
fdo-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-internals




More information about the fdo-internals mailing list