Not quite sure who you are wanting a response from?

For my two cents: don't mind the change, however you we plan to treat the
accessors like accessors we should look at making the fields private (so
there is only one point of truth).


Jody Garnett


On Fri, Apr 11, 2014 at 7:15 PM, Daniele Romagnoli <
[email protected]> wrote:

> Hi again guys.
> Did you have any chance to take a look to this topic?
>
> Cheers,
> Daniele
>
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
> for more information.
> ==
> Ing. Daniele Romagnoli
> Senior Software Engineer
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax:      +39 0584 1660272
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
>> On Fri, Mar 21, 2014 at 5:53 PM, Daniele Romagnoli <
>> [email protected]> wrote:
>>
>>> Hi,
>>> I have a question for you.
>>> I'm doing GridCoverage2D wrapping and GridSampleDimension wrapping to do
>>> some customization of band names, null values, ranges, ...
>>>
>>> Right now I'm having an issue with the geotools crop op which creates a
>>> new coverage on top of another one (a wrapping GridCoverage2D) through a
>>> gridCoverageFactory.
>>>
>>> https://github.com/geotools/geotools/blob/master/modules/library/coverage/src/main/java/org/geotools/coverage/processing/operation/Crop.java#L662
>>>
>>> My wrapped coverage overrides some methods and getters in order to
>>> return custom GridSampleDimensions. Custom GridSampleDimensions override
>>> some getters too like getDescription and so on to return custom names,
>>> descriptions, ranges, ...
>>> The crop op creates a new coverage by also doing a clone of the
>>> sampleDimensions:
>>>
>>>
>>> https://github.com/geotools/geotools/blob/master/modules/library/coverage/src/main/java/org/geotools/coverage/processing/operation/Crop.java#L670
>>>
>>> The GridSampleDimension clone method uses a copy constructor which
>>> simply does a field to field assignment.
>>>
>>> https://github.com/geotools/geotools/blob/master/modules/library/coverage/src/main/java/org/geotools/coverage/GridSampleDimension.java#L639
>>>
>>> The fields are "final private" so no way to change them on my
>>> GridSampleDimension wrapper with reflection (this is why I did
>>> methods/getters override).
>>> What do you think about making the copy constructor using the getters
>>> instead of the field to field assignment?
>>>
>>> as an instance:
>>> this.description = other.getDescription();
>>> instead of
>>> this.description = other.description;
>>>
>>> If you think that this should be ok, I can create a jira and a pull
>>> request for that.
>>> What do you think about it?
>>> Please, let me know if you need more clarifications on that.
>>>
>>> Cheers,
>>> Daniele
>>>
>>>
>>> ==
>>> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
>>> for more information.
>>> ==
>>> Ing. Daniele Romagnoli
>>> Senior Software Engineer
>>>
>>> GeoSolutions S.A.S.
>>> Via Poggio alle Viti 1187
>>> 55054  Massarosa (LU)
>>> Italy
>>> phone: +39 0584 962313
>>> fax:      +39 0584 1660272
>>>
>>> http://www.geo-solutions.it
>>> http://twitter.com/geosolutions_it
>>>
>>> -------------------------------------------------------
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> GeoTools-Devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to