HI all,

On Mon, Apr 18, 2011 at 7:00 PM, Justin Deoliveira <[email protected]> wrote:
> Hi João,
>
> On Mon, Apr 18, 2011 at 3:53 AM, <[email protected]> wrote:
>>
>> While persisting and querying my coordinate data, I was wondering why the
>> decimal digits of my coordinates are rounded to 4 digit places.
>> Therefore I looked up the usage of org.geotools.geojson.geom.GeometryJSON
>> and realized the second constructor supporting to specify the decimals.
>> Now also looking up org.geotools.geojson.feature.FeatureJSON, I was
>> surprised why FeatureJSON does not have a possibility to control the
>> initialization of a GeometryJSON instace supporting a given decimal.
>
> Just lack of time to work on that module from developers is my best guess.
>>
>> The best solution would be to add a second constructor for FeatureJSON as
>> well, e.g.:
>>
>> /**
>> * Constructs a feature json instance specifying the number of decimals
>> * to use when encoding floating point numbers.
>> */
>> public FeatureJSON(int decimals) {
>>  gjson = new GeometryJSON(decimals);
>>  attio = new DefaultAttributeIO();
>> }
>>
>
> Sounds pretty resonable to me. Another method might be to utilize inversion
> of control and  FeatureJSON be able to take a GeometryJSON instance. That
> way you don't have to duplicate constructor arguments from GeometryJSON.
>>
>> ...or is there a circumstance why this is not yet supported?
>
> Not that I know of, like I said just lack of developer time. A patch would
> be much appreciated.
>>

theres relevant jira with discussion opened some time ago here:
http://jira.codehaus.org/browse/GEOS-2613,
maybe it helps,

Regards,
Ivan

>> Thanks
>> João Belém
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Benefiting from Server Virtualization: Beyond Initial Workload
>> Consolidation -- Increasing the use of server virtualization is a top
>> priority.Virtualization can reduce costs, simplify management, and improve
>> application availability and disaster protection. Learn more about
>> boosting
>> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
>> _______________________________________________
>> Geotools-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>
>
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>



-- 
-------------------------------------------------------
Ivan Grcic
GeoSolutions S.A.S.
Software Engineer


Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://twitter.com/geosolutions_it
http://www.youtube.com/user/GeoSolutionsIT

-------------------------------------------------------

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to