FeatureJSON misses control for coordinate decimals of its GeometryJSON instance
-------------------------------------------------------------------------------

                 Key: GEOT-3533
                 URL: http://jira.codehaus.org/browse/GEOT-3533
             Project: GeoTools
          Issue Type: Improvement
    Affects Versions: 2.7.0
            Reporter: João Belem


_org.geotools.geojson.geom.GeometryJSON_ rounds coordinates to 4 decimals when 
using the default constructor, however, there is another constructor taking a 
decimals parameter.
Now looking into *org.geotools.geojson.feature.FeatureJSON*, the possibility to 
control the *decimals* of its GeometryJSON instance is missing.


The best solution would be to add a *second constructor for FeatureJSON* as 
well, e.g.:
{code:java}
/**
* 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();
}
{code}

..*or like Justin mentioned* (in the geotools-devel mailing list) utilizing 
"inversion of control and  FeatureJSON be able to take a GeometryJSON instance. 
That way you don't have to duplicate constructor arguments from GeometryJSON." 
(see mailing list subject "proposal for controlling decimals on FeatureJSON, 
too" from 4th Apr. 2011)

Would it be possible to integrate this improvement into the next 
milestone/RC/release?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
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