On Mon, Apr 18, 2011 at 7:16 PM, Ivan Grcic <[email protected]> wrote: > 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,
Or maybe not (relevant) ;-) As far as I remember the WFS GeoJSON output format is way older than the gt-geojson module and they are actually built on top of different libraries. So, if my memory still serves me well, completely different code bases (sharing the same issue) Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ 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
