geotools/geotools — pull request #266 by williamvoor (2013-09-10 09:50:23+00:00)
Title: Comprehensive reading of FC schema

Added a new method to FeatureJSON to obtain the a feature collection schema by reading all features in search of the data types of all properties; as opposed to only considering the first feature.

FeatureJSON#readFeatureCollection schema reads the {@link SimpleFeatureType} of a GeoJSON using FeatureTypeHandler, which is a simpler handler when compared to FeatureHandler. In the worst case, it will parse all features searching for attributes not present in previous features. This method only obtains the feature type, which means that a second parse would have to be done in order to obtain the actual feature collection.